]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2003-08-05 David Carlton <carlton@kealia.com>
authorDavid Carlton <carlton@bactrian.org>
Tue, 5 Aug 2003 17:13:34 +0000 (17:13 +0000)
committerDavid Carlton <carlton@bactrian.org>
Tue, 5 Aug 2003 17:13:34 +0000 (17:13 +0000)
* configure.in (build_warnings): Delete -Wformat-nonliteral.
* configure (build_warnings): Ditto.

* Merge with mainline; tag is carlton_dictionary-20030805-merge.

322 files changed:
ChangeLog
Makefile.in
bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in
bfd/archive.c
bfd/archive64.c
bfd/archures.c
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/bfdio.c
bfd/bfdwin.c
bfd/cache.c
bfd/coff-arm.c
bfd/coff-h8300.c
bfd/coff-i860.c
bfd/coffcode.h
bfd/config.bfd
bfd/configure
bfd/configure.host
bfd/configure.in
bfd/corefile.c
bfd/cpu-h8300.c
bfd/cpu-ia64-opc.c
bfd/cpu-m10300.c
bfd/cpu-mips.c
bfd/doc/ChangeLog
bfd/doc/Makefile.am
bfd/doc/Makefile.in
bfd/doc/chew.c
bfd/ecoff.c
bfd/elf-bfd.h
bfd/elf-hppa.h
bfd/elf-m10300.c
bfd/elf.c
bfd/elf32-arm.h
bfd/elf32-h8300.c
bfd/elf32-i370.c
bfd/elf32-i386.c
bfd/elf32-i860.c
bfd/elf32-m32r.c
bfd/elf32-m68hc11.c
bfd/elf32-m68hc1x.c
bfd/elf32-mcore.c
bfd/elf32-ppc.c
bfd/elf32-s390.c
bfd/elf32-sh.c
bfd/elf32-sh64-com.c
bfd/elf32-sh64.c
bfd/elf32-sh64.h
bfd/elf32-sparc.c
bfd/elf32-v850.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-ppc.c
bfd/elf64-ppc.h
bfd/elf64-s390.c
bfd/elf64-sh64.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c
bfd/elfcode.h
bfd/elfcore.h
bfd/elflink.c
bfd/elflink.h
bfd/elfxx-ia64.c
bfd/elfxx-mips.c
bfd/elfxx-mips.h
bfd/elfxx-target.h
bfd/format.c
bfd/init.c
bfd/libbfd-in.h
bfd/libbfd.c
bfd/libbfd.h
bfd/linker.c
bfd/opncls.c
bfd/po/SRC-POTFILES.in
bfd/po/bfd.pot
bfd/po/es.po
bfd/po/fr.po
bfd/po/sv.po
bfd/po/tr.po
bfd/reloc.c
bfd/section.c
bfd/simple.c
bfd/syms.c
bfd/targets.c
bfd/version.h
config-ml.in
config.if
config/ChangeLog
configure
configure.in
gdb/ChangeLog
gdb/Makefile.in
gdb/NEWS
gdb/alpha-mdebug-tdep.c
gdb/alpha-tdep.c
gdb/alpha-tdep.h
gdb/alphafbsd-tdep.c
gdb/annotate.c
gdb/arch-utils.c
gdb/arch-utils.h
gdb/avr-tdep.c
gdb/blockframe.c
gdb/breakpoint.c
gdb/builtin-regs.c [deleted file]
gdb/builtin-regs.h [deleted file]
gdb/charset.c
gdb/cli-out.c
gdb/cli/cli-interp.c
gdb/cli/cli-script.c
gdb/cli/cli-setshow.c
gdb/coff-solib.h
gdb/complaints.c
gdb/config/djgpp/fnchange.lst
gdb/config/i386/x86-64linux.mh
gdb/config/i386/x86-64linux.mt
gdb/config/m32r/m32r.mt
gdb/config/m32r/tm-m32r.h [deleted file]
gdb/config/mips/tm-irix6.h
gdb/config/pa/tm-hppa.h
gdb/config/pa/tm-hppa64.h
gdb/config/powerpc/ppc64-linux.mh
gdb/config/sparc/tm-sp64.h
gdb/config/sparc/tm-sparc.h
gdb/configure.host
gdb/configure.tgt
gdb/cp-support.c
gdb/cp-valprint.c
gdb/d10v-tdep.c
gdb/defs.h
gdb/disasm.c
gdb/doc/ChangeLog
gdb/doc/Makefile.in
gdb/doc/agentexpr.texi
gdb/doc/annotate.texi [deleted file]
gdb/doc/gdb.texinfo
gdb/doc/gdbint.texinfo
gdb/doc/stabs.texinfo
gdb/dummy-frame.c
gdb/dummy-frame.h
gdb/dwarf2-frame.c
gdb/dwarf2-frame.h
gdb/dwarf2expr.c
gdb/dwarf2loc.c
gdb/dwarf2loc.h
gdb/dwarf2read.c
gdb/elfread.c
gdb/eval.c
gdb/event-top.c
gdb/expprint.c
gdb/findvar.c
gdb/frame-base.c
gdb/frame-base.h
gdb/frame-unwind.c
gdb/frame-unwind.h
gdb/frame.c
gdb/frame.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gdbserver/ChangeLog
gdb/gdbserver/config.in
gdb/gdbserver/configure
gdb/gdbserver/configure.in
gdb/gdbserver/gdbreplay.c
gdb/gdbserver/linux-arm-low.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/linux-sh-low.c
gdb/gdbserver/mem-break.c
gdb/gdbserver/server.h
gdb/gdbserver/utils.c
gdb/gnu-v3-abi.c
gdb/h8300-tdep.c
gdb/hppa-hpux-tdep.c
gdb/hppa-tdep.c
gdb/i386-tdep.c
gdb/ia64-linux-nat.c
gdb/ia64-tdep.c
gdb/infcall.c
gdb/infcmd.c
gdb/linux-proc.c
gdb/m32r-rom.c
gdb/m32r-stub.c
gdb/m32r-tdep.c
gdb/m68hc11-tdep.c
gdb/m68k-tdep.c
gdb/m68k-tdep.h
gdb/m68klinux-nat.c
gdb/m68klinux-tdep.c
gdb/mi/ChangeLog
gdb/mi/mi-cmds.c
gdb/mi/mi-cmds.h
gdb/mi/mi-main.c
gdb/mi/mi-out.c
gdb/mi/mi-parse.c
gdb/minsyms.c
gdb/mips-linux-nat.c
gdb/mips-linux-tdep.c
gdb/mips-tdep.c
gdb/mn10300-tdep.c
gdb/monitor.h
gdb/ocd.c
gdb/p-typeprint.c
gdb/p-valprint.c
gdb/parse.c
gdb/printcmd.c
gdb/regcache.c
gdb/reggroups.c
gdb/reggroups.h
gdb/remote-mips.c
gdb/remote-sim.c
gdb/remote-vx.c
gdb/remote.c
gdb/rs6000-nat.c
gdb/s390-tdep.c
gdb/sh-tdep.c
gdb/solib-svr4.c
gdb/solib.h
gdb/somread.c
gdb/source.c
gdb/sparc-linux-nat.c
gdb/sparc-nat.c
gdb/sparc-tdep.c
gdb/sparc64nbsd-nat.c
gdb/sparcnbsd-nat.c
gdb/sparcnbsd-tdep.c
gdb/stack.c
gdb/std-regs.c
gdb/symtab.h
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.asm/asm-source.exp
gdb/testsuite/gdb.asm/powerpc.inc
gdb/testsuite/gdb.base/annota1.exp
gdb/testsuite/gdb.base/completion.exp
gdb/testsuite/gdb.base/constvars.exp
gdb/testsuite/gdb.base/fileio.exp
gdb/testsuite/gdb.base/float.exp
gdb/testsuite/gdb.base/relocate.c
gdb/testsuite/gdb.base/return2.exp
gdb/testsuite/gdb.base/selftest.exp
gdb/testsuite/gdb.base/store.c
gdb/testsuite/gdb.base/store.exp
gdb/testsuite/gdb.base/volatile.exp
gdb/testsuite/gdb.c++/inherit.exp
gdb/testsuite/gdb.c++/maint.exp
gdb/testsuite/gdb.c++/templates.exp
gdb/testsuite/gdb.threads/print-threads.exp
gdb/thread.c
gdb/top.c
gdb/trad-frame.c
gdb/trad-frame.h
gdb/tui/ChangeLog
gdb/tui/tui-interp.c
gdb/tui/tui-out.c
gdb/tui/tui.c
gdb/ui-out.c
gdb/ui-out.h
gdb/utils.c
gdb/valprint.c
gdb/version.in
gdb/win32-nat.c
gdb/x86-64-linux-nat.c
gdb/x86-64-linux-tdep.c
gdb/x86-64-tdep.c
gdb/x86-64-tdep.h
include/ChangeLog
include/coff/ChangeLog
include/coff/ecoff.h
include/coff/i860.h
include/coff/pe.h
include/coff/xcoff.h
include/demangle.h
include/elf/ChangeLog
include/elf/mips.h
include/elf/mmix.h
include/elf/mn10300.h
include/elf/ppc.h
include/elf/s390.h
include/elf/v850.h
include/opcode/ChangeLog
include/opcode/h8300.h
include/opcode/mips.h
include/opcode/mn10300.h
include/opcode/s390.h
include/xtensa-config.h
libiberty/ChangeLog
libiberty/pex-win32.c
mkinstalldirs
opcodes/ChangeLog
opcodes/Makefile.in
opcodes/arm-dis.c
opcodes/configure
opcodes/configure.in
opcodes/i860-dis.c
opcodes/m10300-dis.c
opcodes/m10300-opc.c
opcodes/mips-dis.c
opcodes/po/POTFILES.in
opcodes/po/es.po
opcodes/po/fr.po
opcodes/po/opcodes.pot
opcodes/po/ro.po
opcodes/po/sv.po
opcodes/po/tr.po
opcodes/ppc-dis.c
opcodes/ppc-opc.c
opcodes/s390-dis.c
opcodes/s390-mkopc.c
opcodes/s390-opc.c
opcodes/s390-opc.txt
sim/ChangeLog
sim/configure
sim/configure.in
sim/h8300/ChangeLog
sim/h8300/compile.c
sim/h8300/sim-main.h
sim/sh/ChangeLog
sim/sh/gencode.c
sim/testsuite/ChangeLog

index 2aceb5d21597c7de63690de5d2621fc691eac6db..ec71cb3a8bef3d32cabf0c30202ea7230c55089d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,85 @@
+2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       Merge from gcc:
+
+       2003-08-01  Matt Kraai  <kraai@alumni.cmu.edu>
+       * Makefile.tpl (check, check-c++): Express dependencies using
+       dependencies rather than commands.
+       * Makefile.in: Regenerate.
+
+       2003-07-31  Geoffrey Keating  <geoffk@apple.com>
+       * Makefile.tpl (libsubdir): Use gcc instead of gcc-lib.
+       * Makefile.in: Update.
+
+2003-08-01  Andrew Cagney  <cagney@redhat.com>
+
+       * configure.in (noconfigdirs): Do not add GDB when m32r-*-*.
+       * configure: Ditto.
+
+2003-07-30  Andreas Tobler  <a.tobler@schweiz.ch>
+
+       * configure.in: Enable libgcj for darwin.
+       * configure: Rebuild.
+
+2003-07-29  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * mkinstalldirs: Import autoconf 2.57 / automake 1.7 version.
+
+2003-07-27  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * Makefile.tpl: Use 'mkinstalldirs' rather than 'mkdir' when
+       creating target and build subdirs to build all parent dirs as needed.
+       * Makefile.in: Rebuild.
+       * configure.in: Don't build dirs explicitly here.
+       * configure: Rebuild.
+
+2003-07-22  Alexandre Oliva  <aoliva@redhat.com>
+
+       * Makefile.tpl (all-make): Depend on intl.
+       * Makefile.in: Rebuilt.
+
+2003-07-16  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * config.if: Remove unused libc_interface determination.
+
+2003-07-14  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * Makefile.in: Regenerate, correctly this time.
+
+2003-07-13  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * Makefile.tpl: Set INSTALL and friends using autoconf.  Remove
+       unused INSTALL_PROGRAM_ARGS.
+       * configure.in: Use AC_PROG_INSTALL.
+       * Makefile.in: Regenerate.
+       * configure: Regenerate.
+
+2003-07-10  Alexandre Oliva  <aoliva@redhat.com>
+
+       * configure: Rebuilt.
+       2001-09-26  Alexandre Oliva  <aoliva@redhat.com>
+       * configure.in (noconfigdirs) [am33_2.0-*-linux*]: Don't build
+       newlib nor libgloss.
+       Wed May  9 10:07:19 2001  Alexandre Oliva  <aoliva@redhat.com>
+       * configure.in (am33_2.0-*-linux*): Added.
+
+2003-07-09  Bob Wilson  <bob.wilson@acm.org>
+
+       * configure.in: Add ${libgcj} to noconfigdirs for xtensa-*-* targets.
+       * configure: Regenerate.
+
+2003-07-06  H.J. Lu <hongjiu.lu@intel.com>
+
+       * config-ml.in: Replace PWD with PWD_COMMAND.
+       * Makefile.tpl: Likewise.
+       * Makefile.in: Regenerated.
+
+2003-06-27  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * configure.in: Clean up config-lang.in handling.  Delete
+       useless assignment to "subdirs".
+       * configure: Regenerate.
+
 2003-06-26  Nathanael Nerode  <neroden@gcc.gnu.org>
 
        * configure.in: Rename 'target_libs' to 'target_libraries'.
index 9137641c2ca07fa8de4098a3ba0993ae5179fb1d..6bce12a4db1fc21b82106525ec7ba2ddaf6efd6e 100644 (file)
@@ -61,14 +61,10 @@ man7dir = $(mandir)/man7
 man8dir = $(mandir)/man8
 man9dir = $(mandir)/man9
 
-# INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
-# cygwin host.
-INSTALL_PROGRAM_ARGS =
-
-INSTALL = $(SHELL) $$s/install-sh -c
-INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
-INSTALL_SCRIPT = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_DATA = @INSTALL_DATA@
 
 # -------------------------------------------------
 # Miscellaneous non-standard autoconf-set variables
@@ -89,7 +85,7 @@ tooldir = @tooldir@
 build_tooldir = @build_tooldir@
 
 # Directory in which the compiler finds executables, libraries, etc.
-libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
+libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)
 GDB_NLM_DEPS = 
 
 # This is the name of the environment variable used for the path to
@@ -139,7 +135,9 @@ SHELL = @config_shell@
 # the environment to account for automounters.  The make variable must not
 # be called PWDCMD, otherwise the value set here is passed to make
 # subprocesses and overrides the setting from the user's environment.
-PWD = $${PWDCMD-pwd}
+# Don't use PWD since it is a common shell environment variable and we
+# don't want to corrupt it.
+PWD_COMMAND = $${PWDCMD-pwd}
 
 # compilers to use to create programs which must be run in the build
 # environment.
@@ -811,8 +809,8 @@ maybe-info-gcc:
 info-gcc: \
     configure-gcc 
        @[ -f ./gcc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_GCC_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -834,8 +832,8 @@ maybe-info-ash:
 info-ash: \
     configure-ash 
        @[ -f ./ash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -856,8 +854,8 @@ maybe-info-autoconf:
 info-autoconf: \
     configure-autoconf 
        @[ -f ./autoconf/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -878,8 +876,8 @@ maybe-info-automake:
 info-automake: \
     configure-automake 
        @[ -f ./automake/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -900,8 +898,8 @@ maybe-info-bash:
 info-bash: \
     configure-bash 
        @[ -f ./bash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -922,8 +920,8 @@ maybe-info-bfd:
 info-bfd: \
     configure-bfd 
        @[ -f ./bfd/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -944,8 +942,8 @@ maybe-info-opcodes:
 info-opcodes: \
     configure-opcodes 
        @[ -f ./opcodes/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -966,8 +964,8 @@ maybe-info-binutils:
 info-binutils: \
     configure-binutils 
        @[ -f ./binutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -988,8 +986,8 @@ maybe-info-bison:
 info-bison: \
     configure-bison 
        @[ -f ./bison/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1010,8 +1008,8 @@ maybe-info-byacc:
 info-byacc: \
     configure-byacc 
        @[ -f ./byacc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1032,8 +1030,8 @@ maybe-info-bzip2:
 info-bzip2: \
     configure-bzip2 
        @[ -f ./bzip2/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1054,8 +1052,8 @@ maybe-info-dejagnu:
 info-dejagnu: \
     configure-dejagnu 
        @[ -f ./dejagnu/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1076,8 +1074,8 @@ maybe-info-diff:
 info-diff: \
     configure-diff 
        @[ -f ./diff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1098,8 +1096,8 @@ maybe-info-dosutils:
 info-dosutils: \
     configure-dosutils 
        @[ -f ./dosutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1120,8 +1118,8 @@ maybe-info-etc:
 info-etc: \
     configure-etc 
        @[ -f ./etc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1142,8 +1140,8 @@ maybe-info-fastjar:
 info-fastjar: \
     configure-fastjar 
        @[ -f ./fastjar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1164,8 +1162,8 @@ maybe-info-fileutils:
 info-fileutils: \
     configure-fileutils 
        @[ -f ./fileutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1186,8 +1184,8 @@ maybe-info-findutils:
 info-findutils: \
     configure-findutils 
        @[ -f ./findutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1208,8 +1206,8 @@ maybe-info-find:
 info-find: \
     configure-find 
        @[ -f ./find/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1230,8 +1228,8 @@ maybe-info-flex:
 info-flex: \
     configure-flex 
        @[ -f ./flex/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1252,8 +1250,8 @@ maybe-info-gas:
 info-gas: \
     configure-gas 
        @[ -f ./gas/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1274,8 +1272,8 @@ maybe-info-gawk:
 info-gawk: \
     configure-gawk 
        @[ -f ./gawk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1296,8 +1294,8 @@ maybe-info-gettext:
 info-gettext: \
     configure-gettext 
        @[ -f ./gettext/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1318,8 +1316,8 @@ maybe-info-gnuserv:
 info-gnuserv: \
     configure-gnuserv 
        @[ -f ./gnuserv/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1340,8 +1338,8 @@ maybe-info-gprof:
 info-gprof: \
     configure-gprof 
        @[ -f ./gprof/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1362,8 +1360,8 @@ maybe-info-gzip:
 info-gzip: \
     configure-gzip 
        @[ -f ./gzip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1384,8 +1382,8 @@ maybe-info-hello:
 info-hello: \
     configure-hello 
        @[ -f ./hello/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1406,8 +1404,8 @@ maybe-info-indent:
 info-indent: \
     configure-indent 
        @[ -f ./indent/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1428,8 +1426,8 @@ maybe-info-intl:
 info-intl: \
     configure-intl 
        @[ -f ./intl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1450,8 +1448,8 @@ maybe-info-tcl:
 info-tcl: \
     configure-tcl 
        @[ -f ./tcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1472,8 +1470,8 @@ maybe-info-itcl:
 info-itcl: \
     configure-itcl 
        @[ -f ./itcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1494,8 +1492,8 @@ maybe-info-ld:
 info-ld: \
     configure-ld 
        @[ -f ./ld/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1516,8 +1514,8 @@ maybe-info-libgui:
 info-libgui: \
     configure-libgui 
        @[ -f ./libgui/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1538,8 +1536,8 @@ maybe-info-libiberty:
 info-libiberty: \
     configure-libiberty 
        @[ -f ./libiberty/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1560,8 +1558,8 @@ maybe-info-libtool:
 info-libtool: \
     configure-libtool 
        @[ -f ./libtool/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1582,8 +1580,8 @@ maybe-info-m4:
 info-m4: \
     configure-m4 
        @[ -f ./m4/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1604,8 +1602,8 @@ maybe-info-make:
 info-make: \
     configure-make 
        @[ -f ./make/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1626,8 +1624,8 @@ maybe-info-mmalloc:
 info-mmalloc: \
     configure-mmalloc 
        @[ -f ./mmalloc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1648,8 +1646,8 @@ maybe-info-patch:
 info-patch: \
     configure-patch 
        @[ -f ./patch/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1670,8 +1668,8 @@ maybe-info-perl:
 info-perl: \
     configure-perl 
        @[ -f ./perl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1692,8 +1690,8 @@ maybe-info-prms:
 info-prms: \
     configure-prms 
        @[ -f ./prms/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1714,8 +1712,8 @@ maybe-info-rcs:
 info-rcs: \
     configure-rcs 
        @[ -f ./rcs/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1736,8 +1734,8 @@ maybe-info-readline:
 info-readline: \
     configure-readline 
        @[ -f ./readline/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1758,8 +1756,8 @@ maybe-info-release:
 info-release: \
     configure-release 
        @[ -f ./release/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1780,8 +1778,8 @@ maybe-info-recode:
 info-recode: \
     configure-recode 
        @[ -f ./recode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1802,8 +1800,8 @@ maybe-info-sed:
 info-sed: \
     configure-sed 
        @[ -f ./sed/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1824,8 +1822,8 @@ maybe-info-send-pr:
 info-send-pr: \
     configure-send-pr 
        @[ -f ./send-pr/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1846,8 +1844,8 @@ maybe-info-shellutils:
 info-shellutils: \
     configure-shellutils 
        @[ -f ./shellutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1868,8 +1866,8 @@ maybe-info-sid:
 info-sid: \
     configure-sid 
        @[ -f ./sid/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1890,8 +1888,8 @@ maybe-info-sim:
 info-sim: \
     configure-sim 
        @[ -f ./sim/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1912,8 +1910,8 @@ maybe-info-tar:
 info-tar: \
     configure-tar 
        @[ -f ./tar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1934,8 +1932,8 @@ maybe-info-texinfo:
 info-texinfo: \
     configure-texinfo 
        @[ -f ./texinfo/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1956,8 +1954,8 @@ maybe-info-textutils:
 info-textutils: \
     configure-textutils 
        @[ -f ./textutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -1978,8 +1976,8 @@ maybe-info-time:
 info-time: \
     configure-time 
        @[ -f ./time/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2000,8 +1998,8 @@ maybe-info-uudecode:
 info-uudecode: \
     configure-uudecode 
        @[ -f ./uudecode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2022,8 +2020,8 @@ maybe-info-wdiff:
 info-wdiff: \
     configure-wdiff 
        @[ -f ./wdiff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2044,8 +2042,8 @@ maybe-info-zip:
 info-zip: \
     configure-zip 
        @[ -f ./zip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2066,8 +2064,8 @@ maybe-info-zlib:
 info-zlib: \
     configure-zlib 
        @[ -f ./zlib/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2088,8 +2086,8 @@ maybe-info-gdb:
 info-gdb: \
     configure-gdb 
        @[ -f ./gdb/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2110,8 +2108,8 @@ maybe-info-expect:
 info-expect: \
     configure-expect 
        @[ -f ./expect/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2132,8 +2130,8 @@ maybe-info-guile:
 info-guile: \
     configure-guile 
        @[ -f ./guile/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2154,8 +2152,8 @@ maybe-info-tk:
 info-tk: \
     configure-tk 
        @[ -f ./tk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2176,8 +2174,8 @@ maybe-info-tix:
 info-tix: \
     configure-tix 
        @[ -f ./tix/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2198,8 +2196,8 @@ maybe-info-libtermcap:
 info-libtermcap: \
     configure-libtermcap 
        @[ -f ./libtermcap/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2220,8 +2218,8 @@ maybe-info-utils:
 info-utils: \
     configure-utils 
        @[ -f ./utils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2245,8 +2243,8 @@ maybe-info-target-libstdc++-v3:
 info-target-libstdc++-v3: \
     configure-target-libstdc++-v3 
        @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/libstdc++-v3" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2267,8 +2265,8 @@ maybe-info-target-newlib:
 info-target-newlib: \
     configure-target-newlib 
        @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2289,8 +2287,8 @@ maybe-info-target-libf2c:
 info-target-libf2c: \
     configure-target-libf2c 
        @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/libf2c" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2311,8 +2309,8 @@ maybe-info-target-libobjc:
 info-target-libobjc: \
     configure-target-libobjc 
        @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/libobjc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2333,8 +2331,8 @@ maybe-info-target-libtermcap:
 info-target-libtermcap: \
     configure-target-libtermcap 
        @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/libtermcap" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2355,8 +2353,8 @@ maybe-info-target-winsup:
 info-target-winsup: \
     configure-target-winsup 
        @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/winsup" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2377,8 +2375,8 @@ maybe-info-target-libgloss:
 info-target-libgloss: \
     configure-target-libgloss 
        @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/libgloss" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2399,8 +2397,8 @@ maybe-info-target-libiberty:
 info-target-libiberty: \
     configure-target-libiberty 
        @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2421,8 +2419,8 @@ maybe-info-target-gperf:
 info-target-gperf: \
     configure-target-gperf 
        @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/gperf" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2443,8 +2441,8 @@ maybe-info-target-examples:
 info-target-examples: \
     configure-target-examples 
        @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/examples" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2465,8 +2463,8 @@ maybe-info-target-libffi:
 info-target-libffi: \
     configure-target-libffi 
        @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/libffi" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2487,8 +2485,8 @@ maybe-info-target-libjava:
 info-target-libjava: \
     configure-target-libjava 
        @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/libjava" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2509,8 +2507,8 @@ maybe-info-target-zlib:
 info-target-zlib: \
     configure-target-zlib 
        @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/zlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2531,8 +2529,8 @@ maybe-info-target-boehm-gc:
 info-target-boehm-gc: \
     configure-target-boehm-gc 
        @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/boehm-gc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2553,8 +2551,8 @@ maybe-info-target-qthreads:
 info-target-qthreads: \
     configure-target-qthreads 
        @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/qthreads" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2575,8 +2573,8 @@ maybe-info-target-rda:
 info-target-rda: \
     configure-target-rda 
        @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing info in $(TARGET_SUBDIR)/rda" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -2687,8 +2685,8 @@ maybe-dvi-gcc:
 dvi-gcc: \
     configure-gcc 
        @[ -f ./gcc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_GCC_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2710,8 +2708,8 @@ maybe-dvi-ash:
 dvi-ash: \
     configure-ash 
        @[ -f ./ash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2732,8 +2730,8 @@ maybe-dvi-autoconf:
 dvi-autoconf: \
     configure-autoconf 
        @[ -f ./autoconf/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2754,8 +2752,8 @@ maybe-dvi-automake:
 dvi-automake: \
     configure-automake 
        @[ -f ./automake/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2776,8 +2774,8 @@ maybe-dvi-bash:
 dvi-bash: \
     configure-bash 
        @[ -f ./bash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2798,8 +2796,8 @@ maybe-dvi-bfd:
 dvi-bfd: \
     configure-bfd 
        @[ -f ./bfd/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2820,8 +2818,8 @@ maybe-dvi-opcodes:
 dvi-opcodes: \
     configure-opcodes 
        @[ -f ./opcodes/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2842,8 +2840,8 @@ maybe-dvi-binutils:
 dvi-binutils: \
     configure-binutils 
        @[ -f ./binutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2864,8 +2862,8 @@ maybe-dvi-bison:
 dvi-bison: \
     configure-bison 
        @[ -f ./bison/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2886,8 +2884,8 @@ maybe-dvi-byacc:
 dvi-byacc: \
     configure-byacc 
        @[ -f ./byacc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2908,8 +2906,8 @@ maybe-dvi-bzip2:
 dvi-bzip2: \
     configure-bzip2 
        @[ -f ./bzip2/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2930,8 +2928,8 @@ maybe-dvi-dejagnu:
 dvi-dejagnu: \
     configure-dejagnu 
        @[ -f ./dejagnu/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2952,8 +2950,8 @@ maybe-dvi-diff:
 dvi-diff: \
     configure-diff 
        @[ -f ./diff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2974,8 +2972,8 @@ maybe-dvi-dosutils:
 dvi-dosutils: \
     configure-dosutils 
        @[ -f ./dosutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -2996,8 +2994,8 @@ maybe-dvi-etc:
 dvi-etc: \
     configure-etc 
        @[ -f ./etc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3018,8 +3016,8 @@ maybe-dvi-fastjar:
 dvi-fastjar: \
     configure-fastjar 
        @[ -f ./fastjar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3040,8 +3038,8 @@ maybe-dvi-fileutils:
 dvi-fileutils: \
     configure-fileutils 
        @[ -f ./fileutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3062,8 +3060,8 @@ maybe-dvi-findutils:
 dvi-findutils: \
     configure-findutils 
        @[ -f ./findutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3084,8 +3082,8 @@ maybe-dvi-find:
 dvi-find: \
     configure-find 
        @[ -f ./find/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3106,8 +3104,8 @@ maybe-dvi-flex:
 dvi-flex: \
     configure-flex 
        @[ -f ./flex/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3128,8 +3126,8 @@ maybe-dvi-gas:
 dvi-gas: \
     configure-gas 
        @[ -f ./gas/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3150,8 +3148,8 @@ maybe-dvi-gawk:
 dvi-gawk: \
     configure-gawk 
        @[ -f ./gawk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3172,8 +3170,8 @@ maybe-dvi-gettext:
 dvi-gettext: \
     configure-gettext 
        @[ -f ./gettext/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3194,8 +3192,8 @@ maybe-dvi-gnuserv:
 dvi-gnuserv: \
     configure-gnuserv 
        @[ -f ./gnuserv/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3216,8 +3214,8 @@ maybe-dvi-gprof:
 dvi-gprof: \
     configure-gprof 
        @[ -f ./gprof/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3238,8 +3236,8 @@ maybe-dvi-gzip:
 dvi-gzip: \
     configure-gzip 
        @[ -f ./gzip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3260,8 +3258,8 @@ maybe-dvi-hello:
 dvi-hello: \
     configure-hello 
        @[ -f ./hello/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3282,8 +3280,8 @@ maybe-dvi-indent:
 dvi-indent: \
     configure-indent 
        @[ -f ./indent/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3304,8 +3302,8 @@ maybe-dvi-intl:
 dvi-intl: \
     configure-intl 
        @[ -f ./intl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3326,8 +3324,8 @@ maybe-dvi-tcl:
 dvi-tcl: \
     configure-tcl 
        @[ -f ./tcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3348,8 +3346,8 @@ maybe-dvi-itcl:
 dvi-itcl: \
     configure-itcl 
        @[ -f ./itcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3370,8 +3368,8 @@ maybe-dvi-ld:
 dvi-ld: \
     configure-ld 
        @[ -f ./ld/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3392,8 +3390,8 @@ maybe-dvi-libgui:
 dvi-libgui: \
     configure-libgui 
        @[ -f ./libgui/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3414,8 +3412,8 @@ maybe-dvi-libiberty:
 dvi-libiberty: \
     configure-libiberty 
        @[ -f ./libiberty/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3436,8 +3434,8 @@ maybe-dvi-libtool:
 dvi-libtool: \
     configure-libtool 
        @[ -f ./libtool/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3458,8 +3456,8 @@ maybe-dvi-m4:
 dvi-m4: \
     configure-m4 
        @[ -f ./m4/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3480,8 +3478,8 @@ maybe-dvi-make:
 dvi-make: \
     configure-make 
        @[ -f ./make/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3502,8 +3500,8 @@ maybe-dvi-mmalloc:
 dvi-mmalloc: \
     configure-mmalloc 
        @[ -f ./mmalloc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3524,8 +3522,8 @@ maybe-dvi-patch:
 dvi-patch: \
     configure-patch 
        @[ -f ./patch/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3546,8 +3544,8 @@ maybe-dvi-perl:
 dvi-perl: \
     configure-perl 
        @[ -f ./perl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3568,8 +3566,8 @@ maybe-dvi-prms:
 dvi-prms: \
     configure-prms 
        @[ -f ./prms/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3590,8 +3588,8 @@ maybe-dvi-rcs:
 dvi-rcs: \
     configure-rcs 
        @[ -f ./rcs/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3612,8 +3610,8 @@ maybe-dvi-readline:
 dvi-readline: \
     configure-readline 
        @[ -f ./readline/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3634,8 +3632,8 @@ maybe-dvi-release:
 dvi-release: \
     configure-release 
        @[ -f ./release/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3656,8 +3654,8 @@ maybe-dvi-recode:
 dvi-recode: \
     configure-recode 
        @[ -f ./recode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3678,8 +3676,8 @@ maybe-dvi-sed:
 dvi-sed: \
     configure-sed 
        @[ -f ./sed/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3700,8 +3698,8 @@ maybe-dvi-send-pr:
 dvi-send-pr: \
     configure-send-pr 
        @[ -f ./send-pr/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3722,8 +3720,8 @@ maybe-dvi-shellutils:
 dvi-shellutils: \
     configure-shellutils 
        @[ -f ./shellutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3744,8 +3742,8 @@ maybe-dvi-sid:
 dvi-sid: \
     configure-sid 
        @[ -f ./sid/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3766,8 +3764,8 @@ maybe-dvi-sim:
 dvi-sim: \
     configure-sim 
        @[ -f ./sim/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3788,8 +3786,8 @@ maybe-dvi-tar:
 dvi-tar: \
     configure-tar 
        @[ -f ./tar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3810,8 +3808,8 @@ maybe-dvi-texinfo:
 dvi-texinfo: \
     configure-texinfo 
        @[ -f ./texinfo/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3832,8 +3830,8 @@ maybe-dvi-textutils:
 dvi-textutils: \
     configure-textutils 
        @[ -f ./textutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3854,8 +3852,8 @@ maybe-dvi-time:
 dvi-time: \
     configure-time 
        @[ -f ./time/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3876,8 +3874,8 @@ maybe-dvi-uudecode:
 dvi-uudecode: \
     configure-uudecode 
        @[ -f ./uudecode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3898,8 +3896,8 @@ maybe-dvi-wdiff:
 dvi-wdiff: \
     configure-wdiff 
        @[ -f ./wdiff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3920,8 +3918,8 @@ maybe-dvi-zip:
 dvi-zip: \
     configure-zip 
        @[ -f ./zip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3942,8 +3940,8 @@ maybe-dvi-zlib:
 dvi-zlib: \
     configure-zlib 
        @[ -f ./zlib/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3964,8 +3962,8 @@ maybe-dvi-gdb:
 dvi-gdb: \
     configure-gdb 
        @[ -f ./gdb/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -3986,8 +3984,8 @@ maybe-dvi-expect:
 dvi-expect: \
     configure-expect 
        @[ -f ./expect/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4008,8 +4006,8 @@ maybe-dvi-guile:
 dvi-guile: \
     configure-guile 
        @[ -f ./guile/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4030,8 +4028,8 @@ maybe-dvi-tk:
 dvi-tk: \
     configure-tk 
        @[ -f ./tk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4052,8 +4050,8 @@ maybe-dvi-tix:
 dvi-tix: \
     configure-tix 
        @[ -f ./tix/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4074,8 +4072,8 @@ maybe-dvi-libtermcap:
 dvi-libtermcap: \
     configure-libtermcap 
        @[ -f ./libtermcap/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4096,8 +4094,8 @@ maybe-dvi-utils:
 dvi-utils: \
     configure-utils 
        @[ -f ./utils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4121,8 +4119,8 @@ maybe-dvi-target-libstdc++-v3:
 dvi-target-libstdc++-v3: \
     configure-target-libstdc++-v3 
        @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/libstdc++-v3" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4143,8 +4141,8 @@ maybe-dvi-target-newlib:
 dvi-target-newlib: \
     configure-target-newlib 
        @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4165,8 +4163,8 @@ maybe-dvi-target-libf2c:
 dvi-target-libf2c: \
     configure-target-libf2c 
        @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/libf2c" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4187,8 +4185,8 @@ maybe-dvi-target-libobjc:
 dvi-target-libobjc: \
     configure-target-libobjc 
        @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4209,8 +4207,8 @@ maybe-dvi-target-libtermcap:
 dvi-target-libtermcap: \
     configure-target-libtermcap 
        @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4231,8 +4229,8 @@ maybe-dvi-target-winsup:
 dvi-target-winsup: \
     configure-target-winsup 
        @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/winsup" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4253,8 +4251,8 @@ maybe-dvi-target-libgloss:
 dvi-target-libgloss: \
     configure-target-libgloss 
        @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/libgloss" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4275,8 +4273,8 @@ maybe-dvi-target-libiberty:
 dvi-target-libiberty: \
     configure-target-libiberty 
        @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4297,8 +4295,8 @@ maybe-dvi-target-gperf:
 dvi-target-gperf: \
     configure-target-gperf 
        @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/gperf" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4319,8 +4317,8 @@ maybe-dvi-target-examples:
 dvi-target-examples: \
     configure-target-examples 
        @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/examples" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4341,8 +4339,8 @@ maybe-dvi-target-libffi:
 dvi-target-libffi: \
     configure-target-libffi 
        @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/libffi" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4363,8 +4361,8 @@ maybe-dvi-target-libjava:
 dvi-target-libjava: \
     configure-target-libjava 
        @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/libjava" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4385,8 +4383,8 @@ maybe-dvi-target-zlib:
 dvi-target-zlib: \
     configure-target-zlib 
        @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/zlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4407,8 +4405,8 @@ maybe-dvi-target-boehm-gc:
 dvi-target-boehm-gc: \
     configure-target-boehm-gc 
        @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/boehm-gc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4429,8 +4427,8 @@ maybe-dvi-target-qthreads:
 dvi-target-qthreads: \
     configure-target-qthreads 
        @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/qthreads" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4451,8 +4449,8 @@ maybe-dvi-target-rda:
 dvi-target-rda: \
     configure-target-rda 
        @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -4563,8 +4561,8 @@ maybe-TAGS-gcc:
 TAGS-gcc: \
     configure-gcc 
        @[ -f ./gcc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_GCC_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4586,8 +4584,8 @@ maybe-TAGS-ash:
 TAGS-ash: \
     configure-ash 
        @[ -f ./ash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4608,8 +4606,8 @@ maybe-TAGS-autoconf:
 TAGS-autoconf: \
     configure-autoconf 
        @[ -f ./autoconf/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4630,8 +4628,8 @@ maybe-TAGS-automake:
 TAGS-automake: \
     configure-automake 
        @[ -f ./automake/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4652,8 +4650,8 @@ maybe-TAGS-bash:
 TAGS-bash: \
     configure-bash 
        @[ -f ./bash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4674,8 +4672,8 @@ maybe-TAGS-bfd:
 TAGS-bfd: \
     configure-bfd 
        @[ -f ./bfd/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4696,8 +4694,8 @@ maybe-TAGS-opcodes:
 TAGS-opcodes: \
     configure-opcodes 
        @[ -f ./opcodes/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4718,8 +4716,8 @@ maybe-TAGS-binutils:
 TAGS-binutils: \
     configure-binutils 
        @[ -f ./binutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4740,8 +4738,8 @@ maybe-TAGS-bison:
 TAGS-bison: \
     configure-bison 
        @[ -f ./bison/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4762,8 +4760,8 @@ maybe-TAGS-byacc:
 TAGS-byacc: \
     configure-byacc 
        @[ -f ./byacc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4784,8 +4782,8 @@ maybe-TAGS-bzip2:
 TAGS-bzip2: \
     configure-bzip2 
        @[ -f ./bzip2/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4806,8 +4804,8 @@ maybe-TAGS-dejagnu:
 TAGS-dejagnu: \
     configure-dejagnu 
        @[ -f ./dejagnu/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4828,8 +4826,8 @@ maybe-TAGS-diff:
 TAGS-diff: \
     configure-diff 
        @[ -f ./diff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4850,8 +4848,8 @@ maybe-TAGS-dosutils:
 TAGS-dosutils: \
     configure-dosutils 
        @[ -f ./dosutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4872,8 +4870,8 @@ maybe-TAGS-etc:
 TAGS-etc: \
     configure-etc 
        @[ -f ./etc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4894,8 +4892,8 @@ maybe-TAGS-fastjar:
 TAGS-fastjar: \
     configure-fastjar 
        @[ -f ./fastjar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4916,8 +4914,8 @@ maybe-TAGS-fileutils:
 TAGS-fileutils: \
     configure-fileutils 
        @[ -f ./fileutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4938,8 +4936,8 @@ maybe-TAGS-findutils:
 TAGS-findutils: \
     configure-findutils 
        @[ -f ./findutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4960,8 +4958,8 @@ maybe-TAGS-find:
 TAGS-find: \
     configure-find 
        @[ -f ./find/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -4982,8 +4980,8 @@ maybe-TAGS-flex:
 TAGS-flex: \
     configure-flex 
        @[ -f ./flex/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5004,8 +5002,8 @@ maybe-TAGS-gas:
 TAGS-gas: \
     configure-gas 
        @[ -f ./gas/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5026,8 +5024,8 @@ maybe-TAGS-gawk:
 TAGS-gawk: \
     configure-gawk 
        @[ -f ./gawk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5048,8 +5046,8 @@ maybe-TAGS-gettext:
 TAGS-gettext: \
     configure-gettext 
        @[ -f ./gettext/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5070,8 +5068,8 @@ maybe-TAGS-gnuserv:
 TAGS-gnuserv: \
     configure-gnuserv 
        @[ -f ./gnuserv/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5092,8 +5090,8 @@ maybe-TAGS-gprof:
 TAGS-gprof: \
     configure-gprof 
        @[ -f ./gprof/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5114,8 +5112,8 @@ maybe-TAGS-gzip:
 TAGS-gzip: \
     configure-gzip 
        @[ -f ./gzip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5136,8 +5134,8 @@ maybe-TAGS-hello:
 TAGS-hello: \
     configure-hello 
        @[ -f ./hello/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5158,8 +5156,8 @@ maybe-TAGS-indent:
 TAGS-indent: \
     configure-indent 
        @[ -f ./indent/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5180,8 +5178,8 @@ maybe-TAGS-intl:
 TAGS-intl: \
     configure-intl 
        @[ -f ./intl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5202,8 +5200,8 @@ maybe-TAGS-tcl:
 TAGS-tcl: \
     configure-tcl 
        @[ -f ./tcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5224,8 +5222,8 @@ maybe-TAGS-itcl:
 TAGS-itcl: \
     configure-itcl 
        @[ -f ./itcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5246,8 +5244,8 @@ maybe-TAGS-ld:
 TAGS-ld: \
     configure-ld 
        @[ -f ./ld/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5268,8 +5266,8 @@ maybe-TAGS-libgui:
 TAGS-libgui: \
     configure-libgui 
        @[ -f ./libgui/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5290,8 +5288,8 @@ maybe-TAGS-libiberty:
 TAGS-libiberty: \
     configure-libiberty 
        @[ -f ./libiberty/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5312,8 +5310,8 @@ maybe-TAGS-libtool:
 TAGS-libtool: \
     configure-libtool 
        @[ -f ./libtool/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5334,8 +5332,8 @@ maybe-TAGS-m4:
 TAGS-m4: \
     configure-m4 
        @[ -f ./m4/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5356,8 +5354,8 @@ maybe-TAGS-make:
 TAGS-make: \
     configure-make 
        @[ -f ./make/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5378,8 +5376,8 @@ maybe-TAGS-mmalloc:
 TAGS-mmalloc: \
     configure-mmalloc 
        @[ -f ./mmalloc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5400,8 +5398,8 @@ maybe-TAGS-patch:
 TAGS-patch: \
     configure-patch 
        @[ -f ./patch/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5422,8 +5420,8 @@ maybe-TAGS-perl:
 TAGS-perl: \
     configure-perl 
        @[ -f ./perl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5444,8 +5442,8 @@ maybe-TAGS-prms:
 TAGS-prms: \
     configure-prms 
        @[ -f ./prms/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5466,8 +5464,8 @@ maybe-TAGS-rcs:
 TAGS-rcs: \
     configure-rcs 
        @[ -f ./rcs/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5488,8 +5486,8 @@ maybe-TAGS-readline:
 TAGS-readline: \
     configure-readline 
        @[ -f ./readline/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5510,8 +5508,8 @@ maybe-TAGS-release:
 TAGS-release: \
     configure-release 
        @[ -f ./release/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5532,8 +5530,8 @@ maybe-TAGS-recode:
 TAGS-recode: \
     configure-recode 
        @[ -f ./recode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5554,8 +5552,8 @@ maybe-TAGS-sed:
 TAGS-sed: \
     configure-sed 
        @[ -f ./sed/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5576,8 +5574,8 @@ maybe-TAGS-send-pr:
 TAGS-send-pr: \
     configure-send-pr 
        @[ -f ./send-pr/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5598,8 +5596,8 @@ maybe-TAGS-shellutils:
 TAGS-shellutils: \
     configure-shellutils 
        @[ -f ./shellutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5620,8 +5618,8 @@ maybe-TAGS-sid:
 TAGS-sid: \
     configure-sid 
        @[ -f ./sid/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5642,8 +5640,8 @@ maybe-TAGS-sim:
 TAGS-sim: \
     configure-sim 
        @[ -f ./sim/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5664,8 +5662,8 @@ maybe-TAGS-tar:
 TAGS-tar: \
     configure-tar 
        @[ -f ./tar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5686,8 +5684,8 @@ maybe-TAGS-texinfo:
 TAGS-texinfo: \
     configure-texinfo 
        @[ -f ./texinfo/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5708,8 +5706,8 @@ maybe-TAGS-textutils:
 TAGS-textutils: \
     configure-textutils 
        @[ -f ./textutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5730,8 +5728,8 @@ maybe-TAGS-time:
 TAGS-time: \
     configure-time 
        @[ -f ./time/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5752,8 +5750,8 @@ maybe-TAGS-uudecode:
 TAGS-uudecode: \
     configure-uudecode 
        @[ -f ./uudecode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5774,8 +5772,8 @@ maybe-TAGS-wdiff:
 TAGS-wdiff: \
     configure-wdiff 
        @[ -f ./wdiff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5796,8 +5794,8 @@ maybe-TAGS-zip:
 TAGS-zip: \
     configure-zip 
        @[ -f ./zip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5818,8 +5816,8 @@ maybe-TAGS-zlib:
 TAGS-zlib: \
     configure-zlib 
        @[ -f ./zlib/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5840,8 +5838,8 @@ maybe-TAGS-gdb:
 TAGS-gdb: \
     configure-gdb 
        @[ -f ./gdb/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5862,8 +5860,8 @@ maybe-TAGS-expect:
 TAGS-expect: \
     configure-expect 
        @[ -f ./expect/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5884,8 +5882,8 @@ maybe-TAGS-guile:
 TAGS-guile: \
     configure-guile 
        @[ -f ./guile/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5906,8 +5904,8 @@ maybe-TAGS-tk:
 TAGS-tk: \
     configure-tk 
        @[ -f ./tk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5928,8 +5926,8 @@ maybe-TAGS-tix:
 TAGS-tix: \
     configure-tix 
        @[ -f ./tix/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5950,8 +5948,8 @@ maybe-TAGS-libtermcap:
 TAGS-libtermcap: \
     configure-libtermcap 
        @[ -f ./libtermcap/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5972,8 +5970,8 @@ maybe-TAGS-utils:
 TAGS-utils: \
     configure-utils 
        @[ -f ./utils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -5997,8 +5995,8 @@ maybe-TAGS-target-libstdc++-v3:
 TAGS-target-libstdc++-v3: \
     configure-target-libstdc++-v3 
        @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/libstdc++-v3" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6019,8 +6017,8 @@ maybe-TAGS-target-newlib:
 TAGS-target-newlib: \
     configure-target-newlib 
        @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6041,8 +6039,8 @@ maybe-TAGS-target-libf2c:
 TAGS-target-libf2c: \
     configure-target-libf2c 
        @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/libf2c" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6063,8 +6061,8 @@ maybe-TAGS-target-libobjc:
 TAGS-target-libobjc: \
     configure-target-libobjc 
        @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6085,8 +6083,8 @@ maybe-TAGS-target-libtermcap:
 TAGS-target-libtermcap: \
     configure-target-libtermcap 
        @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6107,8 +6105,8 @@ maybe-TAGS-target-winsup:
 TAGS-target-winsup: \
     configure-target-winsup 
        @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/winsup" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6129,8 +6127,8 @@ maybe-TAGS-target-libgloss:
 TAGS-target-libgloss: \
     configure-target-libgloss 
        @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6151,8 +6149,8 @@ maybe-TAGS-target-libiberty:
 TAGS-target-libiberty: \
     configure-target-libiberty 
        @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6173,8 +6171,8 @@ maybe-TAGS-target-gperf:
 TAGS-target-gperf: \
     configure-target-gperf 
        @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/gperf" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6195,8 +6193,8 @@ maybe-TAGS-target-examples:
 TAGS-target-examples: \
     configure-target-examples 
        @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/examples" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6217,8 +6215,8 @@ maybe-TAGS-target-libffi:
 TAGS-target-libffi: \
     configure-target-libffi 
        @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/libffi" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6239,8 +6237,8 @@ maybe-TAGS-target-libjava:
 TAGS-target-libjava: \
     configure-target-libjava 
        @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/libjava" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6261,8 +6259,8 @@ maybe-TAGS-target-zlib:
 TAGS-target-zlib: \
     configure-target-zlib 
        @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/zlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6283,8 +6281,8 @@ maybe-TAGS-target-boehm-gc:
 TAGS-target-boehm-gc: \
     configure-target-boehm-gc 
        @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/boehm-gc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6305,8 +6303,8 @@ maybe-TAGS-target-qthreads:
 TAGS-target-qthreads: \
     configure-target-qthreads 
        @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/qthreads" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6327,8 +6325,8 @@ maybe-TAGS-target-rda:
 TAGS-target-rda: \
     configure-target-rda 
        @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing TAGS in $(TARGET_SUBDIR)/rda" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -6440,8 +6438,8 @@ install-info-gcc: \
     configure-gcc \
     info-gcc 
        @[ -f ./gcc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_GCC_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6464,8 +6462,8 @@ install-info-ash: \
     configure-ash \
     info-ash 
        @[ -f ./ash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6487,8 +6485,8 @@ install-info-autoconf: \
     configure-autoconf \
     info-autoconf 
        @[ -f ./autoconf/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6510,8 +6508,8 @@ install-info-automake: \
     configure-automake \
     info-automake 
        @[ -f ./automake/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6533,8 +6531,8 @@ install-info-bash: \
     configure-bash \
     info-bash 
        @[ -f ./bash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6556,8 +6554,8 @@ install-info-bfd: \
     configure-bfd \
     info-bfd 
        @[ -f ./bfd/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6579,8 +6577,8 @@ install-info-opcodes: \
     configure-opcodes \
     info-opcodes 
        @[ -f ./opcodes/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6602,8 +6600,8 @@ install-info-binutils: \
     configure-binutils \
     info-binutils 
        @[ -f ./binutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6625,8 +6623,8 @@ install-info-bison: \
     configure-bison \
     info-bison 
        @[ -f ./bison/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6648,8 +6646,8 @@ install-info-byacc: \
     configure-byacc \
     info-byacc 
        @[ -f ./byacc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6671,8 +6669,8 @@ install-info-bzip2: \
     configure-bzip2 \
     info-bzip2 
        @[ -f ./bzip2/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6694,8 +6692,8 @@ install-info-dejagnu: \
     configure-dejagnu \
     info-dejagnu 
        @[ -f ./dejagnu/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6717,8 +6715,8 @@ install-info-diff: \
     configure-diff \
     info-diff 
        @[ -f ./diff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6740,8 +6738,8 @@ install-info-dosutils: \
     configure-dosutils \
     info-dosutils 
        @[ -f ./dosutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6763,8 +6761,8 @@ install-info-etc: \
     configure-etc \
     info-etc 
        @[ -f ./etc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6786,8 +6784,8 @@ install-info-fastjar: \
     configure-fastjar \
     info-fastjar 
        @[ -f ./fastjar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6809,8 +6807,8 @@ install-info-fileutils: \
     configure-fileutils \
     info-fileutils 
        @[ -f ./fileutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6832,8 +6830,8 @@ install-info-findutils: \
     configure-findutils \
     info-findutils 
        @[ -f ./findutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6855,8 +6853,8 @@ install-info-find: \
     configure-find \
     info-find 
        @[ -f ./find/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6878,8 +6876,8 @@ install-info-flex: \
     configure-flex \
     info-flex 
        @[ -f ./flex/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6901,8 +6899,8 @@ install-info-gas: \
     configure-gas \
     info-gas 
        @[ -f ./gas/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6924,8 +6922,8 @@ install-info-gawk: \
     configure-gawk \
     info-gawk 
        @[ -f ./gawk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6947,8 +6945,8 @@ install-info-gettext: \
     configure-gettext \
     info-gettext 
        @[ -f ./gettext/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6970,8 +6968,8 @@ install-info-gnuserv: \
     configure-gnuserv \
     info-gnuserv 
        @[ -f ./gnuserv/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -6993,8 +6991,8 @@ install-info-gprof: \
     configure-gprof \
     info-gprof 
        @[ -f ./gprof/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7016,8 +7014,8 @@ install-info-gzip: \
     configure-gzip \
     info-gzip 
        @[ -f ./gzip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7039,8 +7037,8 @@ install-info-hello: \
     configure-hello \
     info-hello 
        @[ -f ./hello/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7062,8 +7060,8 @@ install-info-indent: \
     configure-indent \
     info-indent 
        @[ -f ./indent/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7085,8 +7083,8 @@ install-info-intl: \
     configure-intl \
     info-intl 
        @[ -f ./intl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7108,8 +7106,8 @@ install-info-tcl: \
     configure-tcl \
     info-tcl 
        @[ -f ./tcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7131,8 +7129,8 @@ install-info-itcl: \
     configure-itcl \
     info-itcl 
        @[ -f ./itcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7154,8 +7152,8 @@ install-info-ld: \
     configure-ld \
     info-ld 
        @[ -f ./ld/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7177,8 +7175,8 @@ install-info-libgui: \
     configure-libgui \
     info-libgui 
        @[ -f ./libgui/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7200,8 +7198,8 @@ install-info-libiberty: \
     configure-libiberty \
     info-libiberty 
        @[ -f ./libiberty/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7223,8 +7221,8 @@ install-info-libtool: \
     configure-libtool \
     info-libtool 
        @[ -f ./libtool/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7246,8 +7244,8 @@ install-info-m4: \
     configure-m4 \
     info-m4 
        @[ -f ./m4/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7269,8 +7267,8 @@ install-info-make: \
     configure-make \
     info-make 
        @[ -f ./make/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7292,8 +7290,8 @@ install-info-mmalloc: \
     configure-mmalloc \
     info-mmalloc 
        @[ -f ./mmalloc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7315,8 +7313,8 @@ install-info-patch: \
     configure-patch \
     info-patch 
        @[ -f ./patch/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7338,8 +7336,8 @@ install-info-perl: \
     configure-perl \
     info-perl 
        @[ -f ./perl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7361,8 +7359,8 @@ install-info-prms: \
     configure-prms \
     info-prms 
        @[ -f ./prms/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7384,8 +7382,8 @@ install-info-rcs: \
     configure-rcs \
     info-rcs 
        @[ -f ./rcs/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7407,8 +7405,8 @@ install-info-readline: \
     configure-readline \
     info-readline 
        @[ -f ./readline/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7430,8 +7428,8 @@ install-info-release: \
     configure-release \
     info-release 
        @[ -f ./release/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7453,8 +7451,8 @@ install-info-recode: \
     configure-recode \
     info-recode 
        @[ -f ./recode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7476,8 +7474,8 @@ install-info-sed: \
     configure-sed \
     info-sed 
        @[ -f ./sed/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7499,8 +7497,8 @@ install-info-send-pr: \
     configure-send-pr \
     info-send-pr 
        @[ -f ./send-pr/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7522,8 +7520,8 @@ install-info-shellutils: \
     configure-shellutils \
     info-shellutils 
        @[ -f ./shellutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7545,8 +7543,8 @@ install-info-sid: \
     configure-sid \
     info-sid 
        @[ -f ./sid/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7568,8 +7566,8 @@ install-info-sim: \
     configure-sim \
     info-sim 
        @[ -f ./sim/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7591,8 +7589,8 @@ install-info-tar: \
     configure-tar \
     info-tar 
        @[ -f ./tar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7614,8 +7612,8 @@ install-info-texinfo: \
     configure-texinfo \
     info-texinfo 
        @[ -f ./texinfo/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7637,8 +7635,8 @@ install-info-textutils: \
     configure-textutils \
     info-textutils 
        @[ -f ./textutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7660,8 +7658,8 @@ install-info-time: \
     configure-time \
     info-time 
        @[ -f ./time/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7683,8 +7681,8 @@ install-info-uudecode: \
     configure-uudecode \
     info-uudecode 
        @[ -f ./uudecode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7706,8 +7704,8 @@ install-info-wdiff: \
     configure-wdiff \
     info-wdiff 
        @[ -f ./wdiff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7729,8 +7727,8 @@ install-info-zip: \
     configure-zip \
     info-zip 
        @[ -f ./zip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7752,8 +7750,8 @@ install-info-zlib: \
     configure-zlib \
     info-zlib 
        @[ -f ./zlib/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7775,8 +7773,8 @@ install-info-gdb: \
     configure-gdb \
     info-gdb 
        @[ -f ./gdb/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7798,8 +7796,8 @@ install-info-expect: \
     configure-expect \
     info-expect 
        @[ -f ./expect/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7821,8 +7819,8 @@ install-info-guile: \
     configure-guile \
     info-guile 
        @[ -f ./guile/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7844,8 +7842,8 @@ install-info-tk: \
     configure-tk \
     info-tk 
        @[ -f ./tk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7867,8 +7865,8 @@ install-info-tix: \
     configure-tix \
     info-tix 
        @[ -f ./tix/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7890,8 +7888,8 @@ install-info-libtermcap: \
     configure-libtermcap \
     info-libtermcap 
        @[ -f ./libtermcap/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7913,8 +7911,8 @@ install-info-utils: \
     configure-utils \
     info-utils 
        @[ -f ./utils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -7939,8 +7937,8 @@ install-info-target-libstdc++-v3: \
     configure-target-libstdc++-v3 \
     info-target-libstdc++-v3 
        @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/libstdc++-v3" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -7962,8 +7960,8 @@ install-info-target-newlib: \
     configure-target-newlib \
     info-target-newlib 
        @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -7985,8 +7983,8 @@ install-info-target-libf2c: \
     configure-target-libf2c \
     info-target-libf2c 
        @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/libf2c" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8008,8 +8006,8 @@ install-info-target-libobjc: \
     configure-target-libobjc \
     info-target-libobjc 
        @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/libobjc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8031,8 +8029,8 @@ install-info-target-libtermcap: \
     configure-target-libtermcap \
     info-target-libtermcap 
        @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/libtermcap" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8054,8 +8052,8 @@ install-info-target-winsup: \
     configure-target-winsup \
     info-target-winsup 
        @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/winsup" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8077,8 +8075,8 @@ install-info-target-libgloss: \
     configure-target-libgloss \
     info-target-libgloss 
        @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/libgloss" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8100,8 +8098,8 @@ install-info-target-libiberty: \
     configure-target-libiberty \
     info-target-libiberty 
        @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/libiberty" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8123,8 +8121,8 @@ install-info-target-gperf: \
     configure-target-gperf \
     info-target-gperf 
        @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/gperf" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8146,8 +8144,8 @@ install-info-target-examples: \
     configure-target-examples \
     info-target-examples 
        @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/examples" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8169,8 +8167,8 @@ install-info-target-libffi: \
     configure-target-libffi \
     info-target-libffi 
        @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/libffi" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8192,8 +8190,8 @@ install-info-target-libjava: \
     configure-target-libjava \
     info-target-libjava 
        @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/libjava" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8215,8 +8213,8 @@ install-info-target-zlib: \
     configure-target-zlib \
     info-target-zlib 
        @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/zlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8238,8 +8236,8 @@ install-info-target-boehm-gc: \
     configure-target-boehm-gc \
     info-target-boehm-gc 
        @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/boehm-gc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8261,8 +8259,8 @@ install-info-target-qthreads: \
     configure-target-qthreads \
     info-target-qthreads 
        @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/qthreads" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8284,8 +8282,8 @@ install-info-target-rda: \
     configure-target-rda \
     info-target-rda 
        @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing install-info in $(TARGET_SUBDIR)/rda" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -8396,8 +8394,8 @@ maybe-installcheck-gcc:
 installcheck-gcc: \
     configure-gcc 
        @[ -f ./gcc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_GCC_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8419,8 +8417,8 @@ maybe-installcheck-ash:
 installcheck-ash: \
     configure-ash 
        @[ -f ./ash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8441,8 +8439,8 @@ maybe-installcheck-autoconf:
 installcheck-autoconf: \
     configure-autoconf 
        @[ -f ./autoconf/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8463,8 +8461,8 @@ maybe-installcheck-automake:
 installcheck-automake: \
     configure-automake 
        @[ -f ./automake/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8485,8 +8483,8 @@ maybe-installcheck-bash:
 installcheck-bash: \
     configure-bash 
        @[ -f ./bash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8507,8 +8505,8 @@ maybe-installcheck-bfd:
 installcheck-bfd: \
     configure-bfd 
        @[ -f ./bfd/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8529,8 +8527,8 @@ maybe-installcheck-opcodes:
 installcheck-opcodes: \
     configure-opcodes 
        @[ -f ./opcodes/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8551,8 +8549,8 @@ maybe-installcheck-binutils:
 installcheck-binutils: \
     configure-binutils 
        @[ -f ./binutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8573,8 +8571,8 @@ maybe-installcheck-bison:
 installcheck-bison: \
     configure-bison 
        @[ -f ./bison/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8595,8 +8593,8 @@ maybe-installcheck-byacc:
 installcheck-byacc: \
     configure-byacc 
        @[ -f ./byacc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8617,8 +8615,8 @@ maybe-installcheck-bzip2:
 installcheck-bzip2: \
     configure-bzip2 
        @[ -f ./bzip2/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8639,8 +8637,8 @@ maybe-installcheck-dejagnu:
 installcheck-dejagnu: \
     configure-dejagnu 
        @[ -f ./dejagnu/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8661,8 +8659,8 @@ maybe-installcheck-diff:
 installcheck-diff: \
     configure-diff 
        @[ -f ./diff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8683,8 +8681,8 @@ maybe-installcheck-dosutils:
 installcheck-dosutils: \
     configure-dosutils 
        @[ -f ./dosutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8705,8 +8703,8 @@ maybe-installcheck-etc:
 installcheck-etc: \
     configure-etc 
        @[ -f ./etc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8727,8 +8725,8 @@ maybe-installcheck-fastjar:
 installcheck-fastjar: \
     configure-fastjar 
        @[ -f ./fastjar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8749,8 +8747,8 @@ maybe-installcheck-fileutils:
 installcheck-fileutils: \
     configure-fileutils 
        @[ -f ./fileutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8771,8 +8769,8 @@ maybe-installcheck-findutils:
 installcheck-findutils: \
     configure-findutils 
        @[ -f ./findutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8793,8 +8791,8 @@ maybe-installcheck-find:
 installcheck-find: \
     configure-find 
        @[ -f ./find/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8815,8 +8813,8 @@ maybe-installcheck-flex:
 installcheck-flex: \
     configure-flex 
        @[ -f ./flex/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8837,8 +8835,8 @@ maybe-installcheck-gas:
 installcheck-gas: \
     configure-gas 
        @[ -f ./gas/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8859,8 +8857,8 @@ maybe-installcheck-gawk:
 installcheck-gawk: \
     configure-gawk 
        @[ -f ./gawk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8881,8 +8879,8 @@ maybe-installcheck-gettext:
 installcheck-gettext: \
     configure-gettext 
        @[ -f ./gettext/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8903,8 +8901,8 @@ maybe-installcheck-gnuserv:
 installcheck-gnuserv: \
     configure-gnuserv 
        @[ -f ./gnuserv/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8925,8 +8923,8 @@ maybe-installcheck-gprof:
 installcheck-gprof: \
     configure-gprof 
        @[ -f ./gprof/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8947,8 +8945,8 @@ maybe-installcheck-gzip:
 installcheck-gzip: \
     configure-gzip 
        @[ -f ./gzip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8969,8 +8967,8 @@ maybe-installcheck-hello:
 installcheck-hello: \
     configure-hello 
        @[ -f ./hello/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -8991,8 +8989,8 @@ maybe-installcheck-indent:
 installcheck-indent: \
     configure-indent 
        @[ -f ./indent/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9013,8 +9011,8 @@ maybe-installcheck-intl:
 installcheck-intl: \
     configure-intl 
        @[ -f ./intl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9035,8 +9033,8 @@ maybe-installcheck-tcl:
 installcheck-tcl: \
     configure-tcl 
        @[ -f ./tcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9057,8 +9055,8 @@ maybe-installcheck-itcl:
 installcheck-itcl: \
     configure-itcl 
        @[ -f ./itcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9079,8 +9077,8 @@ maybe-installcheck-ld:
 installcheck-ld: \
     configure-ld 
        @[ -f ./ld/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9101,8 +9099,8 @@ maybe-installcheck-libgui:
 installcheck-libgui: \
     configure-libgui 
        @[ -f ./libgui/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9123,8 +9121,8 @@ maybe-installcheck-libiberty:
 installcheck-libiberty: \
     configure-libiberty 
        @[ -f ./libiberty/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9145,8 +9143,8 @@ maybe-installcheck-libtool:
 installcheck-libtool: \
     configure-libtool 
        @[ -f ./libtool/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9167,8 +9165,8 @@ maybe-installcheck-m4:
 installcheck-m4: \
     configure-m4 
        @[ -f ./m4/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9189,8 +9187,8 @@ maybe-installcheck-make:
 installcheck-make: \
     configure-make 
        @[ -f ./make/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9211,8 +9209,8 @@ maybe-installcheck-mmalloc:
 installcheck-mmalloc: \
     configure-mmalloc 
        @[ -f ./mmalloc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9233,8 +9231,8 @@ maybe-installcheck-patch:
 installcheck-patch: \
     configure-patch 
        @[ -f ./patch/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9255,8 +9253,8 @@ maybe-installcheck-perl:
 installcheck-perl: \
     configure-perl 
        @[ -f ./perl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9277,8 +9275,8 @@ maybe-installcheck-prms:
 installcheck-prms: \
     configure-prms 
        @[ -f ./prms/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9299,8 +9297,8 @@ maybe-installcheck-rcs:
 installcheck-rcs: \
     configure-rcs 
        @[ -f ./rcs/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9321,8 +9319,8 @@ maybe-installcheck-readline:
 installcheck-readline: \
     configure-readline 
        @[ -f ./readline/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9343,8 +9341,8 @@ maybe-installcheck-release:
 installcheck-release: \
     configure-release 
        @[ -f ./release/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9365,8 +9363,8 @@ maybe-installcheck-recode:
 installcheck-recode: \
     configure-recode 
        @[ -f ./recode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9387,8 +9385,8 @@ maybe-installcheck-sed:
 installcheck-sed: \
     configure-sed 
        @[ -f ./sed/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9409,8 +9407,8 @@ maybe-installcheck-send-pr:
 installcheck-send-pr: \
     configure-send-pr 
        @[ -f ./send-pr/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9431,8 +9429,8 @@ maybe-installcheck-shellutils:
 installcheck-shellutils: \
     configure-shellutils 
        @[ -f ./shellutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9453,8 +9451,8 @@ maybe-installcheck-sid:
 installcheck-sid: \
     configure-sid 
        @[ -f ./sid/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9475,8 +9473,8 @@ maybe-installcheck-sim:
 installcheck-sim: \
     configure-sim 
        @[ -f ./sim/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9497,8 +9495,8 @@ maybe-installcheck-tar:
 installcheck-tar: \
     configure-tar 
        @[ -f ./tar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9519,8 +9517,8 @@ maybe-installcheck-texinfo:
 installcheck-texinfo: \
     configure-texinfo 
        @[ -f ./texinfo/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9541,8 +9539,8 @@ maybe-installcheck-textutils:
 installcheck-textutils: \
     configure-textutils 
        @[ -f ./textutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9563,8 +9561,8 @@ maybe-installcheck-time:
 installcheck-time: \
     configure-time 
        @[ -f ./time/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9585,8 +9583,8 @@ maybe-installcheck-uudecode:
 installcheck-uudecode: \
     configure-uudecode 
        @[ -f ./uudecode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9607,8 +9605,8 @@ maybe-installcheck-wdiff:
 installcheck-wdiff: \
     configure-wdiff 
        @[ -f ./wdiff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9629,8 +9627,8 @@ maybe-installcheck-zip:
 installcheck-zip: \
     configure-zip 
        @[ -f ./zip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9651,8 +9649,8 @@ maybe-installcheck-zlib:
 installcheck-zlib: \
     configure-zlib 
        @[ -f ./zlib/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9673,8 +9671,8 @@ maybe-installcheck-gdb:
 installcheck-gdb: \
     configure-gdb 
        @[ -f ./gdb/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9695,8 +9693,8 @@ maybe-installcheck-expect:
 installcheck-expect: \
     configure-expect 
        @[ -f ./expect/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9717,8 +9715,8 @@ maybe-installcheck-guile:
 installcheck-guile: \
     configure-guile 
        @[ -f ./guile/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9739,8 +9737,8 @@ maybe-installcheck-tk:
 installcheck-tk: \
     configure-tk 
        @[ -f ./tk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9761,8 +9759,8 @@ maybe-installcheck-tix:
 installcheck-tix: \
     configure-tix 
        @[ -f ./tix/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9783,8 +9781,8 @@ maybe-installcheck-libtermcap:
 installcheck-libtermcap: \
     configure-libtermcap 
        @[ -f ./libtermcap/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9805,8 +9803,8 @@ maybe-installcheck-utils:
 installcheck-utils: \
     configure-utils 
        @[ -f ./utils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -9830,8 +9828,8 @@ maybe-installcheck-target-libstdc++-v3:
 installcheck-target-libstdc++-v3: \
     configure-target-libstdc++-v3 
        @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/libstdc++-v3" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -9852,8 +9850,8 @@ maybe-installcheck-target-newlib:
 installcheck-target-newlib: \
     configure-target-newlib 
        @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -9874,8 +9872,8 @@ maybe-installcheck-target-libf2c:
 installcheck-target-libf2c: \
     configure-target-libf2c 
        @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/libf2c" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -9896,8 +9894,8 @@ maybe-installcheck-target-libobjc:
 installcheck-target-libobjc: \
     configure-target-libobjc 
        @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -9918,8 +9916,8 @@ maybe-installcheck-target-libtermcap:
 installcheck-target-libtermcap: \
     configure-target-libtermcap 
        @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -9940,8 +9938,8 @@ maybe-installcheck-target-winsup:
 installcheck-target-winsup: \
     configure-target-winsup 
        @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/winsup" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -9962,8 +9960,8 @@ maybe-installcheck-target-libgloss:
 installcheck-target-libgloss: \
     configure-target-libgloss 
        @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -9984,8 +9982,8 @@ maybe-installcheck-target-libiberty:
 installcheck-target-libiberty: \
     configure-target-libiberty 
        @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -10006,8 +10004,8 @@ maybe-installcheck-target-gperf:
 installcheck-target-gperf: \
     configure-target-gperf 
        @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/gperf" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -10028,8 +10026,8 @@ maybe-installcheck-target-examples:
 installcheck-target-examples: \
     configure-target-examples 
        @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/examples" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -10050,8 +10048,8 @@ maybe-installcheck-target-libffi:
 installcheck-target-libffi: \
     configure-target-libffi 
        @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/libffi" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -10072,8 +10070,8 @@ maybe-installcheck-target-libjava:
 installcheck-target-libjava: \
     configure-target-libjava 
        @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/libjava" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -10094,8 +10092,8 @@ maybe-installcheck-target-zlib:
 installcheck-target-zlib: \
     configure-target-zlib 
        @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/zlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -10116,8 +10114,8 @@ maybe-installcheck-target-boehm-gc:
 installcheck-target-boehm-gc: \
     configure-target-boehm-gc 
        @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/boehm-gc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -10138,8 +10136,8 @@ maybe-installcheck-target-qthreads:
 installcheck-target-qthreads: \
     configure-target-qthreads 
        @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/qthreads" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -10160,8 +10158,8 @@ maybe-installcheck-target-rda:
 installcheck-target-rda: \
     configure-target-rda 
        @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing installcheck in $(TARGET_SUBDIR)/rda" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -10271,8 +10269,8 @@ mostlyclean-target:  \
 maybe-mostlyclean-gcc:
 mostlyclean-gcc: 
        @[ -f ./gcc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_GCC_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10293,8 +10291,8 @@ maybe-mostlyclean-ash:
 
 mostlyclean-ash: 
        @[ -f ./ash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10314,8 +10312,8 @@ maybe-mostlyclean-autoconf:
 
 mostlyclean-autoconf: 
        @[ -f ./autoconf/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10335,8 +10333,8 @@ maybe-mostlyclean-automake:
 
 mostlyclean-automake: 
        @[ -f ./automake/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10356,8 +10354,8 @@ maybe-mostlyclean-bash:
 
 mostlyclean-bash: 
        @[ -f ./bash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10377,8 +10375,8 @@ maybe-mostlyclean-bfd:
 
 mostlyclean-bfd: 
        @[ -f ./bfd/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10398,8 +10396,8 @@ maybe-mostlyclean-opcodes:
 
 mostlyclean-opcodes: 
        @[ -f ./opcodes/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10419,8 +10417,8 @@ maybe-mostlyclean-binutils:
 
 mostlyclean-binutils: 
        @[ -f ./binutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10440,8 +10438,8 @@ maybe-mostlyclean-bison:
 
 mostlyclean-bison: 
        @[ -f ./bison/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10461,8 +10459,8 @@ maybe-mostlyclean-byacc:
 
 mostlyclean-byacc: 
        @[ -f ./byacc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10482,8 +10480,8 @@ maybe-mostlyclean-bzip2:
 
 mostlyclean-bzip2: 
        @[ -f ./bzip2/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10503,8 +10501,8 @@ maybe-mostlyclean-dejagnu:
 
 mostlyclean-dejagnu: 
        @[ -f ./dejagnu/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10524,8 +10522,8 @@ maybe-mostlyclean-diff:
 
 mostlyclean-diff: 
        @[ -f ./diff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10545,8 +10543,8 @@ maybe-mostlyclean-dosutils:
 
 mostlyclean-dosutils: 
        @[ -f ./dosutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10566,8 +10564,8 @@ maybe-mostlyclean-etc:
 
 mostlyclean-etc: 
        @[ -f ./etc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10587,8 +10585,8 @@ maybe-mostlyclean-fastjar:
 
 mostlyclean-fastjar: 
        @[ -f ./fastjar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10608,8 +10606,8 @@ maybe-mostlyclean-fileutils:
 
 mostlyclean-fileutils: 
        @[ -f ./fileutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10629,8 +10627,8 @@ maybe-mostlyclean-findutils:
 
 mostlyclean-findutils: 
        @[ -f ./findutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10650,8 +10648,8 @@ maybe-mostlyclean-find:
 
 mostlyclean-find: 
        @[ -f ./find/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10671,8 +10669,8 @@ maybe-mostlyclean-flex:
 
 mostlyclean-flex: 
        @[ -f ./flex/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10692,8 +10690,8 @@ maybe-mostlyclean-gas:
 
 mostlyclean-gas: 
        @[ -f ./gas/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10713,8 +10711,8 @@ maybe-mostlyclean-gawk:
 
 mostlyclean-gawk: 
        @[ -f ./gawk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10734,8 +10732,8 @@ maybe-mostlyclean-gettext:
 
 mostlyclean-gettext: 
        @[ -f ./gettext/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10755,8 +10753,8 @@ maybe-mostlyclean-gnuserv:
 
 mostlyclean-gnuserv: 
        @[ -f ./gnuserv/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10776,8 +10774,8 @@ maybe-mostlyclean-gprof:
 
 mostlyclean-gprof: 
        @[ -f ./gprof/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10797,8 +10795,8 @@ maybe-mostlyclean-gzip:
 
 mostlyclean-gzip: 
        @[ -f ./gzip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10818,8 +10816,8 @@ maybe-mostlyclean-hello:
 
 mostlyclean-hello: 
        @[ -f ./hello/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10839,8 +10837,8 @@ maybe-mostlyclean-indent:
 
 mostlyclean-indent: 
        @[ -f ./indent/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10860,8 +10858,8 @@ maybe-mostlyclean-intl:
 
 mostlyclean-intl: 
        @[ -f ./intl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10888,8 +10886,8 @@ maybe-mostlyclean-itcl:
 
 mostlyclean-itcl: 
        @[ -f ./itcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10909,8 +10907,8 @@ maybe-mostlyclean-ld:
 
 mostlyclean-ld: 
        @[ -f ./ld/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10930,8 +10928,8 @@ maybe-mostlyclean-libgui:
 
 mostlyclean-libgui: 
        @[ -f ./libgui/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10951,8 +10949,8 @@ maybe-mostlyclean-libiberty:
 
 mostlyclean-libiberty: 
        @[ -f ./libiberty/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10972,8 +10970,8 @@ maybe-mostlyclean-libtool:
 
 mostlyclean-libtool: 
        @[ -f ./libtool/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -10993,8 +10991,8 @@ maybe-mostlyclean-m4:
 
 mostlyclean-m4: 
        @[ -f ./m4/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11014,8 +11012,8 @@ maybe-mostlyclean-make:
 
 mostlyclean-make: 
        @[ -f ./make/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11035,8 +11033,8 @@ maybe-mostlyclean-mmalloc:
 
 mostlyclean-mmalloc: 
        @[ -f ./mmalloc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11056,8 +11054,8 @@ maybe-mostlyclean-patch:
 
 mostlyclean-patch: 
        @[ -f ./patch/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11077,8 +11075,8 @@ maybe-mostlyclean-perl:
 
 mostlyclean-perl: 
        @[ -f ./perl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11098,8 +11096,8 @@ maybe-mostlyclean-prms:
 
 mostlyclean-prms: 
        @[ -f ./prms/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11119,8 +11117,8 @@ maybe-mostlyclean-rcs:
 
 mostlyclean-rcs: 
        @[ -f ./rcs/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11140,8 +11138,8 @@ maybe-mostlyclean-readline:
 
 mostlyclean-readline: 
        @[ -f ./readline/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11161,8 +11159,8 @@ maybe-mostlyclean-release:
 
 mostlyclean-release: 
        @[ -f ./release/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11182,8 +11180,8 @@ maybe-mostlyclean-recode:
 
 mostlyclean-recode: 
        @[ -f ./recode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11203,8 +11201,8 @@ maybe-mostlyclean-sed:
 
 mostlyclean-sed: 
        @[ -f ./sed/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11224,8 +11222,8 @@ maybe-mostlyclean-send-pr:
 
 mostlyclean-send-pr: 
        @[ -f ./send-pr/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11245,8 +11243,8 @@ maybe-mostlyclean-shellutils:
 
 mostlyclean-shellutils: 
        @[ -f ./shellutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11266,8 +11264,8 @@ maybe-mostlyclean-sid:
 
 mostlyclean-sid: 
        @[ -f ./sid/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11287,8 +11285,8 @@ maybe-mostlyclean-sim:
 
 mostlyclean-sim: 
        @[ -f ./sim/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11308,8 +11306,8 @@ maybe-mostlyclean-tar:
 
 mostlyclean-tar: 
        @[ -f ./tar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11329,8 +11327,8 @@ maybe-mostlyclean-texinfo:
 
 mostlyclean-texinfo: 
        @[ -f ./texinfo/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11350,8 +11348,8 @@ maybe-mostlyclean-textutils:
 
 mostlyclean-textutils: 
        @[ -f ./textutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11371,8 +11369,8 @@ maybe-mostlyclean-time:
 
 mostlyclean-time: 
        @[ -f ./time/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11392,8 +11390,8 @@ maybe-mostlyclean-uudecode:
 
 mostlyclean-uudecode: 
        @[ -f ./uudecode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11413,8 +11411,8 @@ maybe-mostlyclean-wdiff:
 
 mostlyclean-wdiff: 
        @[ -f ./wdiff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11434,8 +11432,8 @@ maybe-mostlyclean-zip:
 
 mostlyclean-zip: 
        @[ -f ./zip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11455,8 +11453,8 @@ maybe-mostlyclean-zlib:
 
 mostlyclean-zlib: 
        @[ -f ./zlib/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11476,8 +11474,8 @@ maybe-mostlyclean-gdb:
 
 mostlyclean-gdb: 
        @[ -f ./gdb/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11497,8 +11495,8 @@ maybe-mostlyclean-expect:
 
 mostlyclean-expect: 
        @[ -f ./expect/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11518,8 +11516,8 @@ maybe-mostlyclean-guile:
 
 mostlyclean-guile: 
        @[ -f ./guile/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11539,8 +11537,8 @@ maybe-mostlyclean-tk:
 
 mostlyclean-tk: 
        @[ -f ./tk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11560,8 +11558,8 @@ maybe-mostlyclean-tix:
 
 mostlyclean-tix: 
        @[ -f ./tix/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11588,8 +11586,8 @@ maybe-mostlyclean-utils:
 
 mostlyclean-utils: 
        @[ -f ./utils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -11612,8 +11610,8 @@ maybe-mostlyclean-target-libstdc++-v3:
 
 mostlyclean-target-libstdc++-v3: 
        @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11633,8 +11631,8 @@ maybe-mostlyclean-target-newlib:
 
 mostlyclean-target-newlib: 
        @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11654,8 +11652,8 @@ maybe-mostlyclean-target-libf2c:
 
 mostlyclean-target-libf2c: 
        @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/libf2c" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11675,8 +11673,8 @@ maybe-mostlyclean-target-libobjc:
 
 mostlyclean-target-libobjc: 
        @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11703,8 +11701,8 @@ maybe-mostlyclean-target-winsup:
 
 mostlyclean-target-winsup: 
        @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11724,8 +11722,8 @@ maybe-mostlyclean-target-libgloss:
 
 mostlyclean-target-libgloss: 
        @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11745,8 +11743,8 @@ maybe-mostlyclean-target-libiberty:
 
 mostlyclean-target-libiberty: 
        @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11766,8 +11764,8 @@ maybe-mostlyclean-target-gperf:
 
 mostlyclean-target-gperf: 
        @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/gperf" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11787,8 +11785,8 @@ maybe-mostlyclean-target-examples:
 
 mostlyclean-target-examples: 
        @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/examples" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11808,8 +11806,8 @@ maybe-mostlyclean-target-libffi:
 
 mostlyclean-target-libffi: 
        @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11829,8 +11827,8 @@ maybe-mostlyclean-target-libjava:
 
 mostlyclean-target-libjava: 
        @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11850,8 +11848,8 @@ maybe-mostlyclean-target-zlib:
 
 mostlyclean-target-zlib: 
        @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11871,8 +11869,8 @@ maybe-mostlyclean-target-boehm-gc:
 
 mostlyclean-target-boehm-gc: 
        @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/boehm-gc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11892,8 +11890,8 @@ maybe-mostlyclean-target-qthreads:
 
 mostlyclean-target-qthreads: 
        @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/qthreads" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -11913,8 +11911,8 @@ maybe-mostlyclean-target-rda:
 
 mostlyclean-target-rda: 
        @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -12024,8 +12022,8 @@ clean-target:  \
 maybe-clean-gcc:
 clean-gcc: 
        @[ -f ./gcc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_GCC_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12046,8 +12044,8 @@ maybe-clean-ash:
 
 clean-ash: 
        @[ -f ./ash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12067,8 +12065,8 @@ maybe-clean-autoconf:
 
 clean-autoconf: 
        @[ -f ./autoconf/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12088,8 +12086,8 @@ maybe-clean-automake:
 
 clean-automake: 
        @[ -f ./automake/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12109,8 +12107,8 @@ maybe-clean-bash:
 
 clean-bash: 
        @[ -f ./bash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12130,8 +12128,8 @@ maybe-clean-bfd:
 
 clean-bfd: 
        @[ -f ./bfd/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12151,8 +12149,8 @@ maybe-clean-opcodes:
 
 clean-opcodes: 
        @[ -f ./opcodes/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12172,8 +12170,8 @@ maybe-clean-binutils:
 
 clean-binutils: 
        @[ -f ./binutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12193,8 +12191,8 @@ maybe-clean-bison:
 
 clean-bison: 
        @[ -f ./bison/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12214,8 +12212,8 @@ maybe-clean-byacc:
 
 clean-byacc: 
        @[ -f ./byacc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12235,8 +12233,8 @@ maybe-clean-bzip2:
 
 clean-bzip2: 
        @[ -f ./bzip2/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12256,8 +12254,8 @@ maybe-clean-dejagnu:
 
 clean-dejagnu: 
        @[ -f ./dejagnu/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12277,8 +12275,8 @@ maybe-clean-diff:
 
 clean-diff: 
        @[ -f ./diff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12298,8 +12296,8 @@ maybe-clean-dosutils:
 
 clean-dosutils: 
        @[ -f ./dosutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12319,8 +12317,8 @@ maybe-clean-etc:
 
 clean-etc: 
        @[ -f ./etc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12340,8 +12338,8 @@ maybe-clean-fastjar:
 
 clean-fastjar: 
        @[ -f ./fastjar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12361,8 +12359,8 @@ maybe-clean-fileutils:
 
 clean-fileutils: 
        @[ -f ./fileutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12382,8 +12380,8 @@ maybe-clean-findutils:
 
 clean-findutils: 
        @[ -f ./findutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12403,8 +12401,8 @@ maybe-clean-find:
 
 clean-find: 
        @[ -f ./find/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12424,8 +12422,8 @@ maybe-clean-flex:
 
 clean-flex: 
        @[ -f ./flex/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12445,8 +12443,8 @@ maybe-clean-gas:
 
 clean-gas: 
        @[ -f ./gas/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12466,8 +12464,8 @@ maybe-clean-gawk:
 
 clean-gawk: 
        @[ -f ./gawk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12487,8 +12485,8 @@ maybe-clean-gettext:
 
 clean-gettext: 
        @[ -f ./gettext/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12508,8 +12506,8 @@ maybe-clean-gnuserv:
 
 clean-gnuserv: 
        @[ -f ./gnuserv/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12529,8 +12527,8 @@ maybe-clean-gprof:
 
 clean-gprof: 
        @[ -f ./gprof/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12550,8 +12548,8 @@ maybe-clean-gzip:
 
 clean-gzip: 
        @[ -f ./gzip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12571,8 +12569,8 @@ maybe-clean-hello:
 
 clean-hello: 
        @[ -f ./hello/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12592,8 +12590,8 @@ maybe-clean-indent:
 
 clean-indent: 
        @[ -f ./indent/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12613,8 +12611,8 @@ maybe-clean-intl:
 
 clean-intl: 
        @[ -f ./intl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12634,8 +12632,8 @@ maybe-clean-tcl:
 
 clean-tcl: 
        @[ -f ./tcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12655,8 +12653,8 @@ maybe-clean-itcl:
 
 clean-itcl: 
        @[ -f ./itcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12676,8 +12674,8 @@ maybe-clean-ld:
 
 clean-ld: 
        @[ -f ./ld/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12697,8 +12695,8 @@ maybe-clean-libgui:
 
 clean-libgui: 
        @[ -f ./libgui/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12718,8 +12716,8 @@ maybe-clean-libiberty:
 
 clean-libiberty: 
        @[ -f ./libiberty/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12739,8 +12737,8 @@ maybe-clean-libtool:
 
 clean-libtool: 
        @[ -f ./libtool/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12760,8 +12758,8 @@ maybe-clean-m4:
 
 clean-m4: 
        @[ -f ./m4/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12781,8 +12779,8 @@ maybe-clean-make:
 
 clean-make: 
        @[ -f ./make/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12802,8 +12800,8 @@ maybe-clean-mmalloc:
 
 clean-mmalloc: 
        @[ -f ./mmalloc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12823,8 +12821,8 @@ maybe-clean-patch:
 
 clean-patch: 
        @[ -f ./patch/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12844,8 +12842,8 @@ maybe-clean-perl:
 
 clean-perl: 
        @[ -f ./perl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12865,8 +12863,8 @@ maybe-clean-prms:
 
 clean-prms: 
        @[ -f ./prms/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12886,8 +12884,8 @@ maybe-clean-rcs:
 
 clean-rcs: 
        @[ -f ./rcs/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12907,8 +12905,8 @@ maybe-clean-readline:
 
 clean-readline: 
        @[ -f ./readline/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12928,8 +12926,8 @@ maybe-clean-release:
 
 clean-release: 
        @[ -f ./release/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12949,8 +12947,8 @@ maybe-clean-recode:
 
 clean-recode: 
        @[ -f ./recode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12970,8 +12968,8 @@ maybe-clean-sed:
 
 clean-sed: 
        @[ -f ./sed/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -12991,8 +12989,8 @@ maybe-clean-send-pr:
 
 clean-send-pr: 
        @[ -f ./send-pr/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13012,8 +13010,8 @@ maybe-clean-shellutils:
 
 clean-shellutils: 
        @[ -f ./shellutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13033,8 +13031,8 @@ maybe-clean-sid:
 
 clean-sid: 
        @[ -f ./sid/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13054,8 +13052,8 @@ maybe-clean-sim:
 
 clean-sim: 
        @[ -f ./sim/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13075,8 +13073,8 @@ maybe-clean-tar:
 
 clean-tar: 
        @[ -f ./tar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13096,8 +13094,8 @@ maybe-clean-texinfo:
 
 clean-texinfo: 
        @[ -f ./texinfo/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13117,8 +13115,8 @@ maybe-clean-textutils:
 
 clean-textutils: 
        @[ -f ./textutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13138,8 +13136,8 @@ maybe-clean-time:
 
 clean-time: 
        @[ -f ./time/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13159,8 +13157,8 @@ maybe-clean-uudecode:
 
 clean-uudecode: 
        @[ -f ./uudecode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13180,8 +13178,8 @@ maybe-clean-wdiff:
 
 clean-wdiff: 
        @[ -f ./wdiff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13201,8 +13199,8 @@ maybe-clean-zip:
 
 clean-zip: 
        @[ -f ./zip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13222,8 +13220,8 @@ maybe-clean-zlib:
 
 clean-zlib: 
        @[ -f ./zlib/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13243,8 +13241,8 @@ maybe-clean-gdb:
 
 clean-gdb: 
        @[ -f ./gdb/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13264,8 +13262,8 @@ maybe-clean-expect:
 
 clean-expect: 
        @[ -f ./expect/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13285,8 +13283,8 @@ maybe-clean-guile:
 
 clean-guile: 
        @[ -f ./guile/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13306,8 +13304,8 @@ maybe-clean-tk:
 
 clean-tk: 
        @[ -f ./tk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13327,8 +13325,8 @@ maybe-clean-tix:
 
 clean-tix: 
        @[ -f ./tix/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13355,8 +13353,8 @@ maybe-clean-utils:
 
 clean-utils: 
        @[ -f ./utils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13379,8 +13377,8 @@ maybe-clean-target-libstdc++-v3:
 
 clean-target-libstdc++-v3: 
        @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13400,8 +13398,8 @@ maybe-clean-target-newlib:
 
 clean-target-newlib: 
        @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13421,8 +13419,8 @@ maybe-clean-target-libf2c:
 
 clean-target-libf2c: 
        @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/libf2c" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13442,8 +13440,8 @@ maybe-clean-target-libobjc:
 
 clean-target-libobjc: 
        @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/libobjc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13470,8 +13468,8 @@ maybe-clean-target-winsup:
 
 clean-target-winsup: 
        @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/winsup" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13491,8 +13489,8 @@ maybe-clean-target-libgloss:
 
 clean-target-libgloss: 
        @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/libgloss" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13512,8 +13510,8 @@ maybe-clean-target-libiberty:
 
 clean-target-libiberty: 
        @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13533,8 +13531,8 @@ maybe-clean-target-gperf:
 
 clean-target-gperf: 
        @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/gperf" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13554,8 +13552,8 @@ maybe-clean-target-examples:
 
 clean-target-examples: 
        @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/examples" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13575,8 +13573,8 @@ maybe-clean-target-libffi:
 
 clean-target-libffi: 
        @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/libffi" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13596,8 +13594,8 @@ maybe-clean-target-libjava:
 
 clean-target-libjava: 
        @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/libjava" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13617,8 +13615,8 @@ maybe-clean-target-zlib:
 
 clean-target-zlib: 
        @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/zlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13638,8 +13636,8 @@ maybe-clean-target-boehm-gc:
 
 clean-target-boehm-gc: 
        @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/boehm-gc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13659,8 +13657,8 @@ maybe-clean-target-qthreads:
 
 clean-target-qthreads: 
        @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/qthreads" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13680,8 +13678,8 @@ maybe-clean-target-rda:
 
 clean-target-rda: 
        @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing clean in $(TARGET_SUBDIR)/rda" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -13791,8 +13789,8 @@ distclean-target:  \
 maybe-distclean-gcc:
 distclean-gcc: 
        @[ -f ./gcc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_GCC_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13813,8 +13811,8 @@ maybe-distclean-ash:
 
 distclean-ash: 
        @[ -f ./ash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13834,8 +13832,8 @@ maybe-distclean-autoconf:
 
 distclean-autoconf: 
        @[ -f ./autoconf/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13855,8 +13853,8 @@ maybe-distclean-automake:
 
 distclean-automake: 
        @[ -f ./automake/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13876,8 +13874,8 @@ maybe-distclean-bash:
 
 distclean-bash: 
        @[ -f ./bash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13897,8 +13895,8 @@ maybe-distclean-bfd:
 
 distclean-bfd: 
        @[ -f ./bfd/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13918,8 +13916,8 @@ maybe-distclean-opcodes:
 
 distclean-opcodes: 
        @[ -f ./opcodes/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13939,8 +13937,8 @@ maybe-distclean-binutils:
 
 distclean-binutils: 
        @[ -f ./binutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13960,8 +13958,8 @@ maybe-distclean-bison:
 
 distclean-bison: 
        @[ -f ./bison/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -13981,8 +13979,8 @@ maybe-distclean-byacc:
 
 distclean-byacc: 
        @[ -f ./byacc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14002,8 +14000,8 @@ maybe-distclean-bzip2:
 
 distclean-bzip2: 
        @[ -f ./bzip2/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14023,8 +14021,8 @@ maybe-distclean-dejagnu:
 
 distclean-dejagnu: 
        @[ -f ./dejagnu/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14044,8 +14042,8 @@ maybe-distclean-diff:
 
 distclean-diff: 
        @[ -f ./diff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14065,8 +14063,8 @@ maybe-distclean-dosutils:
 
 distclean-dosutils: 
        @[ -f ./dosutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14086,8 +14084,8 @@ maybe-distclean-etc:
 
 distclean-etc: 
        @[ -f ./etc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14107,8 +14105,8 @@ maybe-distclean-fastjar:
 
 distclean-fastjar: 
        @[ -f ./fastjar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14128,8 +14126,8 @@ maybe-distclean-fileutils:
 
 distclean-fileutils: 
        @[ -f ./fileutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14149,8 +14147,8 @@ maybe-distclean-findutils:
 
 distclean-findutils: 
        @[ -f ./findutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14170,8 +14168,8 @@ maybe-distclean-find:
 
 distclean-find: 
        @[ -f ./find/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14191,8 +14189,8 @@ maybe-distclean-flex:
 
 distclean-flex: 
        @[ -f ./flex/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14212,8 +14210,8 @@ maybe-distclean-gas:
 
 distclean-gas: 
        @[ -f ./gas/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14233,8 +14231,8 @@ maybe-distclean-gawk:
 
 distclean-gawk: 
        @[ -f ./gawk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14254,8 +14252,8 @@ maybe-distclean-gettext:
 
 distclean-gettext: 
        @[ -f ./gettext/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14275,8 +14273,8 @@ maybe-distclean-gnuserv:
 
 distclean-gnuserv: 
        @[ -f ./gnuserv/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14296,8 +14294,8 @@ maybe-distclean-gprof:
 
 distclean-gprof: 
        @[ -f ./gprof/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14317,8 +14315,8 @@ maybe-distclean-gzip:
 
 distclean-gzip: 
        @[ -f ./gzip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14338,8 +14336,8 @@ maybe-distclean-hello:
 
 distclean-hello: 
        @[ -f ./hello/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14359,8 +14357,8 @@ maybe-distclean-indent:
 
 distclean-indent: 
        @[ -f ./indent/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14380,8 +14378,8 @@ maybe-distclean-intl:
 
 distclean-intl: 
        @[ -f ./intl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14401,8 +14399,8 @@ maybe-distclean-tcl:
 
 distclean-tcl: 
        @[ -f ./tcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14422,8 +14420,8 @@ maybe-distclean-itcl:
 
 distclean-itcl: 
        @[ -f ./itcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14443,8 +14441,8 @@ maybe-distclean-ld:
 
 distclean-ld: 
        @[ -f ./ld/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14464,8 +14462,8 @@ maybe-distclean-libgui:
 
 distclean-libgui: 
        @[ -f ./libgui/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14485,8 +14483,8 @@ maybe-distclean-libiberty:
 
 distclean-libiberty: 
        @[ -f ./libiberty/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14506,8 +14504,8 @@ maybe-distclean-libtool:
 
 distclean-libtool: 
        @[ -f ./libtool/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14527,8 +14525,8 @@ maybe-distclean-m4:
 
 distclean-m4: 
        @[ -f ./m4/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14548,8 +14546,8 @@ maybe-distclean-make:
 
 distclean-make: 
        @[ -f ./make/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14569,8 +14567,8 @@ maybe-distclean-mmalloc:
 
 distclean-mmalloc: 
        @[ -f ./mmalloc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14590,8 +14588,8 @@ maybe-distclean-patch:
 
 distclean-patch: 
        @[ -f ./patch/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14611,8 +14609,8 @@ maybe-distclean-perl:
 
 distclean-perl: 
        @[ -f ./perl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14632,8 +14630,8 @@ maybe-distclean-prms:
 
 distclean-prms: 
        @[ -f ./prms/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14653,8 +14651,8 @@ maybe-distclean-rcs:
 
 distclean-rcs: 
        @[ -f ./rcs/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14674,8 +14672,8 @@ maybe-distclean-readline:
 
 distclean-readline: 
        @[ -f ./readline/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14695,8 +14693,8 @@ maybe-distclean-release:
 
 distclean-release: 
        @[ -f ./release/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14716,8 +14714,8 @@ maybe-distclean-recode:
 
 distclean-recode: 
        @[ -f ./recode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14737,8 +14735,8 @@ maybe-distclean-sed:
 
 distclean-sed: 
        @[ -f ./sed/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14758,8 +14756,8 @@ maybe-distclean-send-pr:
 
 distclean-send-pr: 
        @[ -f ./send-pr/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14779,8 +14777,8 @@ maybe-distclean-shellutils:
 
 distclean-shellutils: 
        @[ -f ./shellutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14800,8 +14798,8 @@ maybe-distclean-sid:
 
 distclean-sid: 
        @[ -f ./sid/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14821,8 +14819,8 @@ maybe-distclean-sim:
 
 distclean-sim: 
        @[ -f ./sim/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14842,8 +14840,8 @@ maybe-distclean-tar:
 
 distclean-tar: 
        @[ -f ./tar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14863,8 +14861,8 @@ maybe-distclean-texinfo:
 
 distclean-texinfo: 
        @[ -f ./texinfo/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14884,8 +14882,8 @@ maybe-distclean-textutils:
 
 distclean-textutils: 
        @[ -f ./textutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14905,8 +14903,8 @@ maybe-distclean-time:
 
 distclean-time: 
        @[ -f ./time/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14926,8 +14924,8 @@ maybe-distclean-uudecode:
 
 distclean-uudecode: 
        @[ -f ./uudecode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14947,8 +14945,8 @@ maybe-distclean-wdiff:
 
 distclean-wdiff: 
        @[ -f ./wdiff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14968,8 +14966,8 @@ maybe-distclean-zip:
 
 distclean-zip: 
        @[ -f ./zip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -14989,8 +14987,8 @@ maybe-distclean-zlib:
 
 distclean-zlib: 
        @[ -f ./zlib/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15010,8 +15008,8 @@ maybe-distclean-gdb:
 
 distclean-gdb: 
        @[ -f ./gdb/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15031,8 +15029,8 @@ maybe-distclean-expect:
 
 distclean-expect: 
        @[ -f ./expect/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15052,8 +15050,8 @@ maybe-distclean-guile:
 
 distclean-guile: 
        @[ -f ./guile/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15073,8 +15071,8 @@ maybe-distclean-tk:
 
 distclean-tk: 
        @[ -f ./tk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15094,8 +15092,8 @@ maybe-distclean-tix:
 
 distclean-tix: 
        @[ -f ./tix/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15122,8 +15120,8 @@ maybe-distclean-utils:
 
 distclean-utils: 
        @[ -f ./utils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15146,8 +15144,8 @@ maybe-distclean-target-libstdc++-v3:
 
 distclean-target-libstdc++-v3: 
        @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15167,8 +15165,8 @@ maybe-distclean-target-newlib:
 
 distclean-target-newlib: 
        @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15188,8 +15186,8 @@ maybe-distclean-target-libf2c:
 
 distclean-target-libf2c: 
        @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/libf2c" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15209,8 +15207,8 @@ maybe-distclean-target-libobjc:
 
 distclean-target-libobjc: 
        @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/libobjc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15237,8 +15235,8 @@ maybe-distclean-target-winsup:
 
 distclean-target-winsup: 
        @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/winsup" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15258,8 +15256,8 @@ maybe-distclean-target-libgloss:
 
 distclean-target-libgloss: 
        @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/libgloss" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15279,8 +15277,8 @@ maybe-distclean-target-libiberty:
 
 distclean-target-libiberty: 
        @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15300,8 +15298,8 @@ maybe-distclean-target-gperf:
 
 distclean-target-gperf: 
        @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/gperf" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15321,8 +15319,8 @@ maybe-distclean-target-examples:
 
 distclean-target-examples: 
        @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/examples" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15342,8 +15340,8 @@ maybe-distclean-target-libffi:
 
 distclean-target-libffi: 
        @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/libffi" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15363,8 +15361,8 @@ maybe-distclean-target-libjava:
 
 distclean-target-libjava: 
        @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/libjava" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15384,8 +15382,8 @@ maybe-distclean-target-zlib:
 
 distclean-target-zlib: 
        @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/zlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15405,8 +15403,8 @@ maybe-distclean-target-boehm-gc:
 
 distclean-target-boehm-gc: 
        @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/boehm-gc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15426,8 +15424,8 @@ maybe-distclean-target-qthreads:
 
 distclean-target-qthreads: 
        @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/qthreads" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15447,8 +15445,8 @@ maybe-distclean-target-rda:
 
 distclean-target-rda: 
        @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing distclean in $(TARGET_SUBDIR)/rda" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -15558,8 +15556,8 @@ maintainer-clean-target:  \
 maybe-maintainer-clean-gcc:
 maintainer-clean-gcc: 
        @[ -f ./gcc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_GCC_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15580,8 +15578,8 @@ maybe-maintainer-clean-ash:
 
 maintainer-clean-ash: 
        @[ -f ./ash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15601,8 +15599,8 @@ maybe-maintainer-clean-autoconf:
 
 maintainer-clean-autoconf: 
        @[ -f ./autoconf/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15622,8 +15620,8 @@ maybe-maintainer-clean-automake:
 
 maintainer-clean-automake: 
        @[ -f ./automake/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15643,8 +15641,8 @@ maybe-maintainer-clean-bash:
 
 maintainer-clean-bash: 
        @[ -f ./bash/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15664,8 +15662,8 @@ maybe-maintainer-clean-bfd:
 
 maintainer-clean-bfd: 
        @[ -f ./bfd/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15685,8 +15683,8 @@ maybe-maintainer-clean-opcodes:
 
 maintainer-clean-opcodes: 
        @[ -f ./opcodes/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15706,8 +15704,8 @@ maybe-maintainer-clean-binutils:
 
 maintainer-clean-binutils: 
        @[ -f ./binutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15727,8 +15725,8 @@ maybe-maintainer-clean-bison:
 
 maintainer-clean-bison: 
        @[ -f ./bison/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15748,8 +15746,8 @@ maybe-maintainer-clean-byacc:
 
 maintainer-clean-byacc: 
        @[ -f ./byacc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15769,8 +15767,8 @@ maybe-maintainer-clean-bzip2:
 
 maintainer-clean-bzip2: 
        @[ -f ./bzip2/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15790,8 +15788,8 @@ maybe-maintainer-clean-dejagnu:
 
 maintainer-clean-dejagnu: 
        @[ -f ./dejagnu/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15811,8 +15809,8 @@ maybe-maintainer-clean-diff:
 
 maintainer-clean-diff: 
        @[ -f ./diff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15832,8 +15830,8 @@ maybe-maintainer-clean-dosutils:
 
 maintainer-clean-dosutils: 
        @[ -f ./dosutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15853,8 +15851,8 @@ maybe-maintainer-clean-etc:
 
 maintainer-clean-etc: 
        @[ -f ./etc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15874,8 +15872,8 @@ maybe-maintainer-clean-fastjar:
 
 maintainer-clean-fastjar: 
        @[ -f ./fastjar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15895,8 +15893,8 @@ maybe-maintainer-clean-fileutils:
 
 maintainer-clean-fileutils: 
        @[ -f ./fileutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15916,8 +15914,8 @@ maybe-maintainer-clean-findutils:
 
 maintainer-clean-findutils: 
        @[ -f ./findutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15937,8 +15935,8 @@ maybe-maintainer-clean-find:
 
 maintainer-clean-find: 
        @[ -f ./find/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15958,8 +15956,8 @@ maybe-maintainer-clean-flex:
 
 maintainer-clean-flex: 
        @[ -f ./flex/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -15979,8 +15977,8 @@ maybe-maintainer-clean-gas:
 
 maintainer-clean-gas: 
        @[ -f ./gas/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16000,8 +15998,8 @@ maybe-maintainer-clean-gawk:
 
 maintainer-clean-gawk: 
        @[ -f ./gawk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16021,8 +16019,8 @@ maybe-maintainer-clean-gettext:
 
 maintainer-clean-gettext: 
        @[ -f ./gettext/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16042,8 +16040,8 @@ maybe-maintainer-clean-gnuserv:
 
 maintainer-clean-gnuserv: 
        @[ -f ./gnuserv/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16063,8 +16061,8 @@ maybe-maintainer-clean-gprof:
 
 maintainer-clean-gprof: 
        @[ -f ./gprof/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16084,8 +16082,8 @@ maybe-maintainer-clean-gzip:
 
 maintainer-clean-gzip: 
        @[ -f ./gzip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16105,8 +16103,8 @@ maybe-maintainer-clean-hello:
 
 maintainer-clean-hello: 
        @[ -f ./hello/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16126,8 +16124,8 @@ maybe-maintainer-clean-indent:
 
 maintainer-clean-indent: 
        @[ -f ./indent/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16147,8 +16145,8 @@ maybe-maintainer-clean-intl:
 
 maintainer-clean-intl: 
        @[ -f ./intl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16168,8 +16166,8 @@ maybe-maintainer-clean-tcl:
 
 maintainer-clean-tcl: 
        @[ -f ./tcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16189,8 +16187,8 @@ maybe-maintainer-clean-itcl:
 
 maintainer-clean-itcl: 
        @[ -f ./itcl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16210,8 +16208,8 @@ maybe-maintainer-clean-ld:
 
 maintainer-clean-ld: 
        @[ -f ./ld/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16231,8 +16229,8 @@ maybe-maintainer-clean-libgui:
 
 maintainer-clean-libgui: 
        @[ -f ./libgui/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16252,8 +16250,8 @@ maybe-maintainer-clean-libiberty:
 
 maintainer-clean-libiberty: 
        @[ -f ./libiberty/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16273,8 +16271,8 @@ maybe-maintainer-clean-libtool:
 
 maintainer-clean-libtool: 
        @[ -f ./libtool/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16294,8 +16292,8 @@ maybe-maintainer-clean-m4:
 
 maintainer-clean-m4: 
        @[ -f ./m4/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16315,8 +16313,8 @@ maybe-maintainer-clean-make:
 
 maintainer-clean-make: 
        @[ -f ./make/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16336,8 +16334,8 @@ maybe-maintainer-clean-mmalloc:
 
 maintainer-clean-mmalloc: 
        @[ -f ./mmalloc/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16357,8 +16355,8 @@ maybe-maintainer-clean-patch:
 
 maintainer-clean-patch: 
        @[ -f ./patch/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16378,8 +16376,8 @@ maybe-maintainer-clean-perl:
 
 maintainer-clean-perl: 
        @[ -f ./perl/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16399,8 +16397,8 @@ maybe-maintainer-clean-prms:
 
 maintainer-clean-prms: 
        @[ -f ./prms/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16420,8 +16418,8 @@ maybe-maintainer-clean-rcs:
 
 maintainer-clean-rcs: 
        @[ -f ./rcs/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16441,8 +16439,8 @@ maybe-maintainer-clean-readline:
 
 maintainer-clean-readline: 
        @[ -f ./readline/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16462,8 +16460,8 @@ maybe-maintainer-clean-release:
 
 maintainer-clean-release: 
        @[ -f ./release/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16483,8 +16481,8 @@ maybe-maintainer-clean-recode:
 
 maintainer-clean-recode: 
        @[ -f ./recode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16504,8 +16502,8 @@ maybe-maintainer-clean-sed:
 
 maintainer-clean-sed: 
        @[ -f ./sed/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16525,8 +16523,8 @@ maybe-maintainer-clean-send-pr:
 
 maintainer-clean-send-pr: 
        @[ -f ./send-pr/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16546,8 +16544,8 @@ maybe-maintainer-clean-shellutils:
 
 maintainer-clean-shellutils: 
        @[ -f ./shellutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16567,8 +16565,8 @@ maybe-maintainer-clean-sid:
 
 maintainer-clean-sid: 
        @[ -f ./sid/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16588,8 +16586,8 @@ maybe-maintainer-clean-sim:
 
 maintainer-clean-sim: 
        @[ -f ./sim/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16609,8 +16607,8 @@ maybe-maintainer-clean-tar:
 
 maintainer-clean-tar: 
        @[ -f ./tar/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16630,8 +16628,8 @@ maybe-maintainer-clean-texinfo:
 
 maintainer-clean-texinfo: 
        @[ -f ./texinfo/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16651,8 +16649,8 @@ maybe-maintainer-clean-textutils:
 
 maintainer-clean-textutils: 
        @[ -f ./textutils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16672,8 +16670,8 @@ maybe-maintainer-clean-time:
 
 maintainer-clean-time: 
        @[ -f ./time/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16693,8 +16691,8 @@ maybe-maintainer-clean-uudecode:
 
 maintainer-clean-uudecode: 
        @[ -f ./uudecode/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16714,8 +16712,8 @@ maybe-maintainer-clean-wdiff:
 
 maintainer-clean-wdiff: 
        @[ -f ./wdiff/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16735,8 +16733,8 @@ maybe-maintainer-clean-zip:
 
 maintainer-clean-zip: 
        @[ -f ./zip/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16756,8 +16754,8 @@ maybe-maintainer-clean-zlib:
 
 maintainer-clean-zlib: 
        @[ -f ./zlib/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16777,8 +16775,8 @@ maybe-maintainer-clean-gdb:
 
 maintainer-clean-gdb: 
        @[ -f ./gdb/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16798,8 +16796,8 @@ maybe-maintainer-clean-expect:
 
 maintainer-clean-expect: 
        @[ -f ./expect/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16819,8 +16817,8 @@ maybe-maintainer-clean-guile:
 
 maintainer-clean-guile: 
        @[ -f ./guile/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16840,8 +16838,8 @@ maybe-maintainer-clean-tk:
 
 maintainer-clean-tk: 
        @[ -f ./tk/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16861,8 +16859,8 @@ maybe-maintainer-clean-tix:
 
 maintainer-clean-tix: 
        @[ -f ./tix/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16889,8 +16887,8 @@ maybe-maintainer-clean-utils:
 
 maintainer-clean-utils: 
        @[ -f ./utils/Makefile ] || exit 0; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        for flag in $(EXTRA_HOST_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
@@ -16913,8 +16911,8 @@ maybe-maintainer-clean-target-libstdc++-v3:
 
 maintainer-clean-target-libstdc++-v3: 
        @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -16934,8 +16932,8 @@ maybe-maintainer-clean-target-newlib:
 
 maintainer-clean-target-newlib: 
        @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -16955,8 +16953,8 @@ maybe-maintainer-clean-target-libf2c:
 
 maintainer-clean-target-libf2c: 
        @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libf2c" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -16976,8 +16974,8 @@ maybe-maintainer-clean-target-libobjc:
 
 maintainer-clean-target-libobjc: 
        @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libobjc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17004,8 +17002,8 @@ maybe-maintainer-clean-target-winsup:
 
 maintainer-clean-target-winsup: 
        @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/winsup" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17025,8 +17023,8 @@ maybe-maintainer-clean-target-libgloss:
 
 maintainer-clean-target-libgloss: 
        @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgloss" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17046,8 +17044,8 @@ maybe-maintainer-clean-target-libiberty:
 
 maintainer-clean-target-libiberty: 
        @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libiberty" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17067,8 +17065,8 @@ maybe-maintainer-clean-target-gperf:
 
 maintainer-clean-target-gperf: 
        @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/gperf" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17088,8 +17086,8 @@ maybe-maintainer-clean-target-examples:
 
 maintainer-clean-target-examples: 
        @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/examples" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17109,8 +17107,8 @@ maybe-maintainer-clean-target-libffi:
 
 maintainer-clean-target-libffi: 
        @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libffi" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17130,8 +17128,8 @@ maybe-maintainer-clean-target-libjava:
 
 maintainer-clean-target-libjava: 
        @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17151,8 +17149,8 @@ maybe-maintainer-clean-target-zlib:
 
 maintainer-clean-target-zlib: 
        @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/zlib" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17172,8 +17170,8 @@ maybe-maintainer-clean-target-boehm-gc:
 
 maintainer-clean-target-boehm-gc: 
        @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/boehm-gc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17193,8 +17191,8 @@ maybe-maintainer-clean-target-qthreads:
 
 maintainer-clean-target-qthreads: 
        @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/qthreads" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17214,8 +17212,8 @@ maybe-maintainer-clean-target-rda:
 
 maintainer-clean-target-rda: 
        @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Doing maintainer-clean in $(TARGET_SUBDIR)/rda" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
@@ -17246,7 +17244,7 @@ dvi: do-dvi
 do-info: maybe-all-texinfo
 
 install-info: do-install-info dir.info
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        if [ -f dir.info ] ; then \
          $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
        else true ; fi
@@ -17289,8 +17287,7 @@ clean-target-libgcc:
 # Check target.
 
 .PHONY: check do-check
-check:
-       $(MAKE) do-check
+check: do-check
 
 # Only include modules actually being configured and built.
 do-check: maybe-check-gcc  \
@@ -17560,7 +17557,7 @@ uninstall:
 .PHONY: install.all
 install.all: install-no-fixedincludes
        @if [ -f ./gcc/Makefile ] ; then \
-               r=`${PWD}` ; export r ; \
+               r=`${PWD_COMMAND}` ; export r ; \
                $(SET_LIB_PATH) \
                (cd ./gcc && \
                $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
@@ -17612,10 +17609,9 @@ TAGS: do-TAGS
 maybe-configure-build-libiberty:
 configure-build-libiberty:
        @test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \
-       [ -d $(BUILD_SUBDIR)/libiberty ] || \
-         mkdir $(BUILD_SUBDIR)/libiberty;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        AR="$(AR_FOR_BUILD)"; export AR; \
        AS="$(AS_FOR_BUILD)"; export AS; \
        CC="$(CC_FOR_BUILD)"; export CC; \
@@ -17673,8 +17669,8 @@ configure-build-libiberty:
 .PHONY: all-build-libiberty maybe-all-build-libiberty
 maybe-all-build-libiberty:
 all-build-libiberty: configure-build-libiberty
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all)
 
 
@@ -17687,8 +17683,8 @@ maybe-configure-ash:
 configure-ash:
        @test ! -f ash/Makefile || exit 0; \
        [ -d ash ] || mkdir ash; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -17723,8 +17719,8 @@ configure-ash:
 .PHONY: all-ash maybe-all-ash
 maybe-all-ash:
 all-ash: configure-ash
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd ash && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -17732,8 +17728,8 @@ all-ash: configure-ash
 maybe-check-ash:
 
 check-ash:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd ash && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -17742,8 +17738,8 @@ check-ash:
 maybe-install-ash:
 
 install-ash: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd ash && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -17753,8 +17749,8 @@ maybe-configure-autoconf:
 configure-autoconf:
        @test ! -f autoconf/Makefile || exit 0; \
        [ -d autoconf ] || mkdir autoconf; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -17789,8 +17785,8 @@ configure-autoconf:
 .PHONY: all-autoconf maybe-all-autoconf
 maybe-all-autoconf:
 all-autoconf: configure-autoconf
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -17798,8 +17794,8 @@ all-autoconf: configure-autoconf
 maybe-check-autoconf:
 
 check-autoconf:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -17808,8 +17804,8 @@ check-autoconf:
 maybe-install-autoconf:
 
 install-autoconf: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -17819,8 +17815,8 @@ maybe-configure-automake:
 configure-automake:
        @test ! -f automake/Makefile || exit 0; \
        [ -d automake ] || mkdir automake; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -17855,8 +17851,8 @@ configure-automake:
 .PHONY: all-automake maybe-all-automake
 maybe-all-automake:
 all-automake: configure-automake
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd automake && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -17864,8 +17860,8 @@ all-automake: configure-automake
 maybe-check-automake:
 
 check-automake:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd automake && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -17874,8 +17870,8 @@ check-automake:
 maybe-install-automake:
 
 install-automake: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd automake && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -17885,8 +17881,8 @@ maybe-configure-bash:
 configure-bash:
        @test ! -f bash/Makefile || exit 0; \
        [ -d bash ] || mkdir bash; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -17921,8 +17917,8 @@ configure-bash:
 .PHONY: all-bash maybe-all-bash
 maybe-all-bash:
 all-bash: configure-bash
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd bash && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -17930,8 +17926,8 @@ all-bash: configure-bash
 maybe-check-bash:
 
 check-bash:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd bash && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -17940,8 +17936,8 @@ check-bash:
 maybe-install-bash:
 
 install-bash: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd bash && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -17951,8 +17947,8 @@ maybe-configure-bfd:
 configure-bfd:
        @test ! -f bfd/Makefile || exit 0; \
        [ -d bfd ] || mkdir bfd; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -17987,8 +17983,8 @@ configure-bfd:
 .PHONY: all-bfd maybe-all-bfd
 maybe-all-bfd:
 all-bfd: configure-bfd
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -17996,8 +17992,8 @@ all-bfd: configure-bfd
 maybe-check-bfd:
 
 check-bfd:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd bfd && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -18006,8 +18002,8 @@ check-bfd:
 maybe-install-bfd:
 
 install-bfd: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd bfd && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18017,8 +18013,8 @@ maybe-configure-opcodes:
 configure-opcodes:
        @test ! -f opcodes/Makefile || exit 0; \
        [ -d opcodes ] || mkdir opcodes; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18053,8 +18049,8 @@ configure-opcodes:
 .PHONY: all-opcodes maybe-all-opcodes
 maybe-all-opcodes:
 all-opcodes: configure-opcodes
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18062,8 +18058,8 @@ all-opcodes: configure-opcodes
 maybe-check-opcodes:
 
 check-opcodes:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -18072,8 +18068,8 @@ check-opcodes:
 maybe-install-opcodes:
 
 install-opcodes: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18083,8 +18079,8 @@ maybe-configure-binutils:
 configure-binutils:
        @test ! -f binutils/Makefile || exit 0; \
        [ -d binutils ] || mkdir binutils; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18119,8 +18115,8 @@ configure-binutils:
 .PHONY: all-binutils maybe-all-binutils
 maybe-all-binutils:
 all-binutils: configure-binutils
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18128,8 +18124,8 @@ all-binutils: configure-binutils
 maybe-check-binutils:
 
 check-binutils:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd binutils && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -18138,8 +18134,8 @@ check-binutils:
 maybe-install-binutils:
 
 install-binutils: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd binutils && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18149,8 +18145,8 @@ maybe-configure-bison:
 configure-bison:
        @test ! -f bison/Makefile || exit 0; \
        [ -d bison ] || mkdir bison; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18185,8 +18181,8 @@ configure-bison:
 .PHONY: all-bison maybe-all-bison
 maybe-all-bison:
 all-bison: configure-bison
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd bison && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18196,8 +18192,8 @@ maybe-check-bison:
 # This module is only tested in a native toolchain.
 check-bison:
        @if [ '$(host)' = '$(target)' ] ; then \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \
        fi
@@ -18207,8 +18203,8 @@ check-bison:
 maybe-install-bison:
 
 install-bison: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd bison && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18218,8 +18214,8 @@ maybe-configure-byacc:
 configure-byacc:
        @test ! -f byacc/Makefile || exit 0; \
        [ -d byacc ] || mkdir byacc; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18254,8 +18250,8 @@ configure-byacc:
 .PHONY: all-byacc maybe-all-byacc
 maybe-all-byacc:
 all-byacc: configure-byacc
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18265,8 +18261,8 @@ maybe-check-byacc:
 # This module is only tested in a native toolchain.
 check-byacc:
        @if [ '$(host)' = '$(target)' ] ; then \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \
        fi
@@ -18276,8 +18272,8 @@ check-byacc:
 maybe-install-byacc:
 
 install-byacc: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd byacc && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18287,8 +18283,8 @@ maybe-configure-bzip2:
 configure-bzip2:
        @test ! -f bzip2/Makefile || exit 0; \
        [ -d bzip2 ] || mkdir bzip2; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18323,8 +18319,8 @@ configure-bzip2:
 .PHONY: all-bzip2 maybe-all-bzip2
 maybe-all-bzip2:
 all-bzip2: configure-bzip2
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18332,8 +18328,8 @@ all-bzip2: configure-bzip2
 maybe-check-bzip2:
 
 check-bzip2:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -18342,8 +18338,8 @@ check-bzip2:
 maybe-install-bzip2:
 
 install-bzip2: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18353,8 +18349,8 @@ maybe-configure-dejagnu:
 configure-dejagnu:
        @test ! -f dejagnu/Makefile || exit 0; \
        [ -d dejagnu ] || mkdir dejagnu; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18389,8 +18385,8 @@ configure-dejagnu:
 .PHONY: all-dejagnu maybe-all-dejagnu
 maybe-all-dejagnu:
 all-dejagnu: configure-dejagnu
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18398,8 +18394,8 @@ all-dejagnu: configure-dejagnu
 maybe-check-dejagnu:
 
 check-dejagnu:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -18408,8 +18404,8 @@ check-dejagnu:
 maybe-install-dejagnu:
 
 install-dejagnu: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18419,8 +18415,8 @@ maybe-configure-diff:
 configure-diff:
        @test ! -f diff/Makefile || exit 0; \
        [ -d diff ] || mkdir diff; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18455,8 +18451,8 @@ configure-diff:
 .PHONY: all-diff maybe-all-diff
 maybe-all-diff:
 all-diff: configure-diff
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd diff && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18464,8 +18460,8 @@ all-diff: configure-diff
 maybe-check-diff:
 
 check-diff:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd diff && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -18474,8 +18470,8 @@ check-diff:
 maybe-install-diff:
 
 install-diff: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd diff && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18485,8 +18481,8 @@ maybe-configure-dosutils:
 configure-dosutils:
        @test ! -f dosutils/Makefile || exit 0; \
        [ -d dosutils ] || mkdir dosutils; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18521,8 +18517,8 @@ configure-dosutils:
 .PHONY: all-dosutils maybe-all-dosutils
 maybe-all-dosutils:
 all-dosutils: configure-dosutils
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18536,8 +18532,8 @@ check-dosutils:
 maybe-install-dosutils:
 
 install-dosutils: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18547,8 +18543,8 @@ maybe-configure-etc:
 configure-etc:
        @test ! -f etc/Makefile || exit 0; \
        [ -d etc ] || mkdir etc; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18583,8 +18579,8 @@ configure-etc:
 .PHONY: all-etc maybe-all-etc
 maybe-all-etc:
 all-etc: configure-etc
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd etc && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18592,8 +18588,8 @@ all-etc: configure-etc
 maybe-check-etc:
 
 check-etc:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd etc && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -18602,8 +18598,8 @@ check-etc:
 maybe-install-etc:
 
 install-etc: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd etc && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18613,8 +18609,8 @@ maybe-configure-fastjar:
 configure-fastjar:
        @test ! -f fastjar/Makefile || exit 0; \
        [ -d fastjar ] || mkdir fastjar; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18649,8 +18645,8 @@ configure-fastjar:
 .PHONY: all-fastjar maybe-all-fastjar
 maybe-all-fastjar:
 all-fastjar: configure-fastjar
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18660,8 +18656,8 @@ maybe-check-fastjar:
 # This module is only tested in a native toolchain.
 check-fastjar:
        @if [ '$(host)' = '$(target)' ] ; then \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \
        fi
@@ -18671,8 +18667,8 @@ check-fastjar:
 maybe-install-fastjar:
 
 install-fastjar: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18682,8 +18678,8 @@ maybe-configure-fileutils:
 configure-fileutils:
        @test ! -f fileutils/Makefile || exit 0; \
        [ -d fileutils ] || mkdir fileutils; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18718,8 +18714,8 @@ configure-fileutils:
 .PHONY: all-fileutils maybe-all-fileutils
 maybe-all-fileutils:
 all-fileutils: configure-fileutils
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18727,8 +18723,8 @@ all-fileutils: configure-fileutils
 maybe-check-fileutils:
 
 check-fileutils:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -18737,8 +18733,8 @@ check-fileutils:
 maybe-install-fileutils:
 
 install-fileutils: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18748,8 +18744,8 @@ maybe-configure-findutils:
 configure-findutils:
        @test ! -f findutils/Makefile || exit 0; \
        [ -d findutils ] || mkdir findutils; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18784,8 +18780,8 @@ configure-findutils:
 .PHONY: all-findutils maybe-all-findutils
 maybe-all-findutils:
 all-findutils: configure-findutils
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18793,8 +18789,8 @@ all-findutils: configure-findutils
 maybe-check-findutils:
 
 check-findutils:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd findutils && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -18803,8 +18799,8 @@ check-findutils:
 maybe-install-findutils:
 
 install-findutils: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd findutils && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18814,8 +18810,8 @@ maybe-configure-find:
 configure-find:
        @test ! -f find/Makefile || exit 0; \
        [ -d find ] || mkdir find; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18850,8 +18846,8 @@ configure-find:
 .PHONY: all-find maybe-all-find
 maybe-all-find:
 all-find: configure-find
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd find && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18859,8 +18855,8 @@ all-find: configure-find
 maybe-check-find:
 
 check-find:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd find && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -18869,8 +18865,8 @@ check-find:
 maybe-install-find:
 
 install-find: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd find && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18880,8 +18876,8 @@ maybe-configure-flex:
 configure-flex:
        @test ! -f flex/Makefile || exit 0; \
        [ -d flex ] || mkdir flex; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18916,8 +18912,8 @@ configure-flex:
 .PHONY: all-flex maybe-all-flex
 maybe-all-flex:
 all-flex: configure-flex
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd flex && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18927,8 +18923,8 @@ maybe-check-flex:
 # This module is only tested in a native toolchain.
 check-flex:
        @if [ '$(host)' = '$(target)' ] ; then \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \
        fi
@@ -18938,8 +18934,8 @@ check-flex:
 maybe-install-flex:
 
 install-flex: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd flex && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -18949,8 +18945,8 @@ maybe-configure-gas:
 configure-gas:
        @test ! -f gas/Makefile || exit 0; \
        [ -d gas ] || mkdir gas; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -18985,8 +18981,8 @@ configure-gas:
 .PHONY: all-gas maybe-all-gas
 maybe-all-gas:
 all-gas: configure-gas
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gas && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -18994,8 +18990,8 @@ all-gas: configure-gas
 maybe-check-gas:
 
 check-gas:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gas && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19004,8 +19000,8 @@ check-gas:
 maybe-install-gas:
 
 install-gas: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gas && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19015,8 +19011,8 @@ maybe-configure-gawk:
 configure-gawk:
        @test ! -f gawk/Makefile || exit 0; \
        [ -d gawk ] || mkdir gawk; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19051,8 +19047,8 @@ configure-gawk:
 .PHONY: all-gawk maybe-all-gawk
 maybe-all-gawk:
 all-gawk: configure-gawk
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19060,8 +19056,8 @@ all-gawk: configure-gawk
 maybe-check-gawk:
 
 check-gawk:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gawk && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19070,8 +19066,8 @@ check-gawk:
 maybe-install-gawk:
 
 install-gawk: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gawk && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19081,8 +19077,8 @@ maybe-configure-gettext:
 configure-gettext:
        @test ! -f gettext/Makefile || exit 0; \
        [ -d gettext ] || mkdir gettext; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19117,8 +19113,8 @@ configure-gettext:
 .PHONY: all-gettext maybe-all-gettext
 maybe-all-gettext:
 all-gettext: configure-gettext
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19126,8 +19122,8 @@ all-gettext: configure-gettext
 maybe-check-gettext:
 
 check-gettext:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gettext && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19136,8 +19132,8 @@ check-gettext:
 maybe-install-gettext:
 
 install-gettext: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gettext && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19147,8 +19143,8 @@ maybe-configure-gnuserv:
 configure-gnuserv:
        @test ! -f gnuserv/Makefile || exit 0; \
        [ -d gnuserv ] || mkdir gnuserv; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19183,8 +19179,8 @@ configure-gnuserv:
 .PHONY: all-gnuserv maybe-all-gnuserv
 maybe-all-gnuserv:
 all-gnuserv: configure-gnuserv
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19192,8 +19188,8 @@ all-gnuserv: configure-gnuserv
 maybe-check-gnuserv:
 
 check-gnuserv:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19202,8 +19198,8 @@ check-gnuserv:
 maybe-install-gnuserv:
 
 install-gnuserv: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19213,8 +19209,8 @@ maybe-configure-gprof:
 configure-gprof:
        @test ! -f gprof/Makefile || exit 0; \
        [ -d gprof ] || mkdir gprof; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19249,8 +19245,8 @@ configure-gprof:
 .PHONY: all-gprof maybe-all-gprof
 maybe-all-gprof:
 all-gprof: configure-gprof
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19258,8 +19254,8 @@ all-gprof: configure-gprof
 maybe-check-gprof:
 
 check-gprof:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gprof && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19268,8 +19264,8 @@ check-gprof:
 maybe-install-gprof:
 
 install-gprof: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gprof && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19279,8 +19275,8 @@ maybe-configure-gzip:
 configure-gzip:
        @test ! -f gzip/Makefile || exit 0; \
        [ -d gzip ] || mkdir gzip; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19315,8 +19311,8 @@ configure-gzip:
 .PHONY: all-gzip maybe-all-gzip
 maybe-all-gzip:
 all-gzip: configure-gzip
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19324,8 +19320,8 @@ all-gzip: configure-gzip
 maybe-check-gzip:
 
 check-gzip:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gzip && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19334,8 +19330,8 @@ check-gzip:
 maybe-install-gzip:
 
 install-gzip: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gzip && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19345,8 +19341,8 @@ maybe-configure-hello:
 configure-hello:
        @test ! -f hello/Makefile || exit 0; \
        [ -d hello ] || mkdir hello; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19381,8 +19377,8 @@ configure-hello:
 .PHONY: all-hello maybe-all-hello
 maybe-all-hello:
 all-hello: configure-hello
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd hello && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19390,8 +19386,8 @@ all-hello: configure-hello
 maybe-check-hello:
 
 check-hello:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd hello && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19400,8 +19396,8 @@ check-hello:
 maybe-install-hello:
 
 install-hello: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd hello && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19411,8 +19407,8 @@ maybe-configure-indent:
 configure-indent:
        @test ! -f indent/Makefile || exit 0; \
        [ -d indent ] || mkdir indent; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19447,8 +19443,8 @@ configure-indent:
 .PHONY: all-indent maybe-all-indent
 maybe-all-indent:
 all-indent: configure-indent
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd indent && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19456,8 +19452,8 @@ all-indent: configure-indent
 maybe-check-indent:
 
 check-indent:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd indent && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19466,8 +19462,8 @@ check-indent:
 maybe-install-indent:
 
 install-indent: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd indent && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19477,8 +19473,8 @@ maybe-configure-intl:
 configure-intl:
        @test ! -f intl/Makefile || exit 0; \
        [ -d intl ] || mkdir intl; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19513,8 +19509,8 @@ configure-intl:
 .PHONY: all-intl maybe-all-intl
 maybe-all-intl:
 all-intl: configure-intl
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd intl && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19522,8 +19518,8 @@ all-intl: configure-intl
 maybe-check-intl:
 
 check-intl:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd intl && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19532,8 +19528,8 @@ check-intl:
 maybe-install-intl:
 
 install-intl: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd intl && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19543,8 +19539,8 @@ maybe-configure-tcl:
 configure-tcl:
        @test ! -f tcl/Makefile || exit 0; \
        [ -d tcl ] || mkdir tcl; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19579,8 +19575,8 @@ configure-tcl:
 .PHONY: all-tcl maybe-all-tcl
 maybe-all-tcl:
 all-tcl: configure-tcl
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19588,8 +19584,8 @@ all-tcl: configure-tcl
 maybe-check-tcl:
 
 check-tcl:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tcl && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19598,8 +19594,8 @@ check-tcl:
 maybe-install-tcl:
 
 install-tcl: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tcl && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19609,8 +19605,8 @@ maybe-configure-itcl:
 configure-itcl:
        @test ! -f itcl/Makefile || exit 0; \
        [ -d itcl ] || mkdir itcl; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19645,8 +19641,8 @@ configure-itcl:
 .PHONY: all-itcl maybe-all-itcl
 maybe-all-itcl:
 all-itcl: configure-itcl
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19654,8 +19650,8 @@ all-itcl: configure-itcl
 maybe-check-itcl:
 
 check-itcl:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd itcl && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19664,8 +19660,8 @@ check-itcl:
 maybe-install-itcl:
 
 install-itcl: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd itcl && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19675,8 +19671,8 @@ maybe-configure-ld:
 configure-ld:
        @test ! -f ld/Makefile || exit 0; \
        [ -d ld ] || mkdir ld; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19711,8 +19707,8 @@ configure-ld:
 .PHONY: all-ld maybe-all-ld
 maybe-all-ld:
 all-ld: configure-ld
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd ld && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19720,8 +19716,8 @@ all-ld: configure-ld
 maybe-check-ld:
 
 check-ld:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd ld && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19730,8 +19726,8 @@ check-ld:
 maybe-install-ld:
 
 install-ld: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd ld && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19741,8 +19737,8 @@ maybe-configure-libgui:
 configure-libgui:
        @test ! -f libgui/Makefile || exit 0; \
        [ -d libgui ] || mkdir libgui; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19777,8 +19773,8 @@ configure-libgui:
 .PHONY: all-libgui maybe-all-libgui
 maybe-all-libgui:
 all-libgui: configure-libgui
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19786,8 +19782,8 @@ all-libgui: configure-libgui
 maybe-check-libgui:
 
 check-libgui:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd libgui && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19796,8 +19792,8 @@ check-libgui:
 maybe-install-libgui:
 
 install-libgui: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd libgui && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19807,8 +19803,8 @@ maybe-configure-libiberty:
 configure-libiberty:
        @test ! -f libiberty/Makefile || exit 0; \
        [ -d libiberty ] || mkdir libiberty; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19843,8 +19839,8 @@ configure-libiberty:
 .PHONY: all-libiberty maybe-all-libiberty
 maybe-all-libiberty:
 all-libiberty: configure-libiberty
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19852,8 +19848,8 @@ all-libiberty: configure-libiberty
 maybe-check-libiberty:
 
 check-libiberty:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19862,8 +19858,8 @@ check-libiberty:
 maybe-install-libiberty:
 
 install-libiberty: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19873,8 +19869,8 @@ maybe-configure-libtool:
 configure-libtool:
        @test ! -f libtool/Makefile || exit 0; \
        [ -d libtool ] || mkdir libtool; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19909,8 +19905,8 @@ configure-libtool:
 .PHONY: all-libtool maybe-all-libtool
 maybe-all-libtool:
 all-libtool: configure-libtool
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19918,8 +19914,8 @@ all-libtool: configure-libtool
 maybe-check-libtool:
 
 check-libtool:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd libtool && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19928,8 +19924,8 @@ check-libtool:
 maybe-install-libtool:
 
 install-libtool: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd libtool && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -19939,8 +19935,8 @@ maybe-configure-m4:
 configure-m4:
        @test ! -f m4/Makefile || exit 0; \
        [ -d m4 ] || mkdir m4; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -19975,8 +19971,8 @@ configure-m4:
 .PHONY: all-m4 maybe-all-m4
 maybe-all-m4:
 all-m4: configure-m4
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -19984,8 +19980,8 @@ all-m4: configure-m4
 maybe-check-m4:
 
 check-m4:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd m4 && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -19994,8 +19990,8 @@ check-m4:
 maybe-install-m4:
 
 install-m4: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd m4 && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20005,8 +20001,8 @@ maybe-configure-make:
 configure-make:
        @test ! -f make/Makefile || exit 0; \
        [ -d make ] || mkdir make; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20041,8 +20037,8 @@ configure-make:
 .PHONY: all-make maybe-all-make
 maybe-all-make:
 all-make: configure-make
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd make && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20050,8 +20046,8 @@ all-make: configure-make
 maybe-check-make:
 
 check-make:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd make && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20060,8 +20056,8 @@ check-make:
 maybe-install-make:
 
 install-make: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd make && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20071,8 +20067,8 @@ maybe-configure-mmalloc:
 configure-mmalloc:
        @test ! -f mmalloc/Makefile || exit 0; \
        [ -d mmalloc ] || mkdir mmalloc; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20107,8 +20103,8 @@ configure-mmalloc:
 .PHONY: all-mmalloc maybe-all-mmalloc
 maybe-all-mmalloc:
 all-mmalloc: configure-mmalloc
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20122,8 +20118,8 @@ check-mmalloc:
 maybe-install-mmalloc:
 
 install-mmalloc: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20133,8 +20129,8 @@ maybe-configure-patch:
 configure-patch:
        @test ! -f patch/Makefile || exit 0; \
        [ -d patch ] || mkdir patch; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20169,8 +20165,8 @@ configure-patch:
 .PHONY: all-patch maybe-all-patch
 maybe-all-patch:
 all-patch: configure-patch
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd patch && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20178,8 +20174,8 @@ all-patch: configure-patch
 maybe-check-patch:
 
 check-patch:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd patch && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20188,8 +20184,8 @@ check-patch:
 maybe-install-patch:
 
 install-patch: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd patch && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20199,8 +20195,8 @@ maybe-configure-perl:
 configure-perl:
        @test ! -f perl/Makefile || exit 0; \
        [ -d perl ] || mkdir perl; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20235,8 +20231,8 @@ configure-perl:
 .PHONY: all-perl maybe-all-perl
 maybe-all-perl:
 all-perl: configure-perl
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd perl && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20244,8 +20240,8 @@ all-perl: configure-perl
 maybe-check-perl:
 
 check-perl:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd perl && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20254,8 +20250,8 @@ check-perl:
 maybe-install-perl:
 
 install-perl: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd perl && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20265,8 +20261,8 @@ maybe-configure-prms:
 configure-prms:
        @test ! -f prms/Makefile || exit 0; \
        [ -d prms ] || mkdir prms; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20301,8 +20297,8 @@ configure-prms:
 .PHONY: all-prms maybe-all-prms
 maybe-all-prms:
 all-prms: configure-prms
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd prms && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20310,8 +20306,8 @@ all-prms: configure-prms
 maybe-check-prms:
 
 check-prms:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd prms && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20320,8 +20316,8 @@ check-prms:
 maybe-install-prms:
 
 install-prms: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd prms && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20331,8 +20327,8 @@ maybe-configure-rcs:
 configure-rcs:
        @test ! -f rcs/Makefile || exit 0; \
        [ -d rcs ] || mkdir rcs; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20367,8 +20363,8 @@ configure-rcs:
 .PHONY: all-rcs maybe-all-rcs
 maybe-all-rcs:
 all-rcs: configure-rcs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20376,8 +20372,8 @@ all-rcs: configure-rcs
 maybe-check-rcs:
 
 check-rcs:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd rcs && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20386,8 +20382,8 @@ check-rcs:
 maybe-install-rcs:
 
 install-rcs: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd rcs && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20397,8 +20393,8 @@ maybe-configure-readline:
 configure-readline:
        @test ! -f readline/Makefile || exit 0; \
        [ -d readline ] || mkdir readline; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20433,8 +20429,8 @@ configure-readline:
 .PHONY: all-readline maybe-all-readline
 maybe-all-readline:
 all-readline: configure-readline
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd readline && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20442,8 +20438,8 @@ all-readline: configure-readline
 maybe-check-readline:
 
 check-readline:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd readline && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20452,8 +20448,8 @@ check-readline:
 maybe-install-readline:
 
 install-readline: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd readline && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20463,8 +20459,8 @@ maybe-configure-release:
 configure-release:
        @test ! -f release/Makefile || exit 0; \
        [ -d release ] || mkdir release; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20499,8 +20495,8 @@ configure-release:
 .PHONY: all-release maybe-all-release
 maybe-all-release:
 all-release: configure-release
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd release && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20521,8 +20517,8 @@ maybe-configure-recode:
 configure-recode:
        @test ! -f recode/Makefile || exit 0; \
        [ -d recode ] || mkdir recode; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20557,8 +20553,8 @@ configure-recode:
 .PHONY: all-recode maybe-all-recode
 maybe-all-recode:
 all-recode: configure-recode
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd recode && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20566,8 +20562,8 @@ all-recode: configure-recode
 maybe-check-recode:
 
 check-recode:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd recode && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20576,8 +20572,8 @@ check-recode:
 maybe-install-recode:
 
 install-recode: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd recode && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20587,8 +20583,8 @@ maybe-configure-sed:
 configure-sed:
        @test ! -f sed/Makefile || exit 0; \
        [ -d sed ] || mkdir sed; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20623,8 +20619,8 @@ configure-sed:
 .PHONY: all-sed maybe-all-sed
 maybe-all-sed:
 all-sed: configure-sed
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd sed && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20632,8 +20628,8 @@ all-sed: configure-sed
 maybe-check-sed:
 
 check-sed:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd sed && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20642,8 +20638,8 @@ check-sed:
 maybe-install-sed:
 
 install-sed: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd sed && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20653,8 +20649,8 @@ maybe-configure-send-pr:
 configure-send-pr:
        @test ! -f send-pr/Makefile || exit 0; \
        [ -d send-pr ] || mkdir send-pr; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20689,8 +20685,8 @@ configure-send-pr:
 .PHONY: all-send-pr maybe-all-send-pr
 maybe-all-send-pr:
 all-send-pr: configure-send-pr
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20698,8 +20694,8 @@ all-send-pr: configure-send-pr
 maybe-check-send-pr:
 
 check-send-pr:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20708,8 +20704,8 @@ check-send-pr:
 maybe-install-send-pr:
 
 install-send-pr: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20719,8 +20715,8 @@ maybe-configure-shellutils:
 configure-shellutils:
        @test ! -f shellutils/Makefile || exit 0; \
        [ -d shellutils ] || mkdir shellutils; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20755,8 +20751,8 @@ configure-shellutils:
 .PHONY: all-shellutils maybe-all-shellutils
 maybe-all-shellutils:
 all-shellutils: configure-shellutils
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20764,8 +20760,8 @@ all-shellutils: configure-shellutils
 maybe-check-shellutils:
 
 check-shellutils:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20774,8 +20770,8 @@ check-shellutils:
 maybe-install-shellutils:
 
 install-shellutils: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20785,8 +20781,8 @@ maybe-configure-sid:
 configure-sid:
        @test ! -f sid/Makefile || exit 0; \
        [ -d sid ] || mkdir sid; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20821,8 +20817,8 @@ configure-sid:
 .PHONY: all-sid maybe-all-sid
 maybe-all-sid:
 all-sid: configure-sid
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd sid && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20830,8 +20826,8 @@ all-sid: configure-sid
 maybe-check-sid:
 
 check-sid:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd sid && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20840,8 +20836,8 @@ check-sid:
 maybe-install-sid:
 
 install-sid: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd sid && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20851,8 +20847,8 @@ maybe-configure-sim:
 configure-sim:
        @test ! -f sim/Makefile || exit 0; \
        [ -d sim ] || mkdir sim; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20887,8 +20883,8 @@ configure-sim:
 .PHONY: all-sim maybe-all-sim
 maybe-all-sim:
 all-sim: configure-sim
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd sim && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20896,8 +20892,8 @@ all-sim: configure-sim
 maybe-check-sim:
 
 check-sim:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd sim && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20906,8 +20902,8 @@ check-sim:
 maybe-install-sim:
 
 install-sim: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd sim && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20917,8 +20913,8 @@ maybe-configure-tar:
 configure-tar:
        @test ! -f tar/Makefile || exit 0; \
        [ -d tar ] || mkdir tar; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -20953,8 +20949,8 @@ configure-tar:
 .PHONY: all-tar maybe-all-tar
 maybe-all-tar:
 all-tar: configure-tar
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tar && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -20962,8 +20958,8 @@ all-tar: configure-tar
 maybe-check-tar:
 
 check-tar:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tar && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -20972,8 +20968,8 @@ check-tar:
 maybe-install-tar:
 
 install-tar: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tar && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -20983,8 +20979,8 @@ maybe-configure-texinfo:
 configure-texinfo:
        @test ! -f texinfo/Makefile || exit 0; \
        [ -d texinfo ] || mkdir texinfo; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21019,8 +21015,8 @@ configure-texinfo:
 .PHONY: all-texinfo maybe-all-texinfo
 maybe-all-texinfo:
 all-texinfo: configure-texinfo
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -21028,8 +21024,8 @@ all-texinfo: configure-texinfo
 maybe-check-texinfo:
 
 check-texinfo:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -21045,8 +21041,8 @@ maybe-configure-textutils:
 configure-textutils:
        @test ! -f textutils/Makefile || exit 0; \
        [ -d textutils ] || mkdir textutils; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21081,8 +21077,8 @@ configure-textutils:
 .PHONY: all-textutils maybe-all-textutils
 maybe-all-textutils:
 all-textutils: configure-textutils
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -21090,8 +21086,8 @@ all-textutils: configure-textutils
 maybe-check-textutils:
 
 check-textutils:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd textutils && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -21100,8 +21096,8 @@ check-textutils:
 maybe-install-textutils:
 
 install-textutils: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd textutils && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -21111,8 +21107,8 @@ maybe-configure-time:
 configure-time:
        @test ! -f time/Makefile || exit 0; \
        [ -d time ] || mkdir time; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21147,8 +21143,8 @@ configure-time:
 .PHONY: all-time maybe-all-time
 maybe-all-time:
 all-time: configure-time
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd time && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -21156,8 +21152,8 @@ all-time: configure-time
 maybe-check-time:
 
 check-time:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd time && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -21166,8 +21162,8 @@ check-time:
 maybe-install-time:
 
 install-time: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd time && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -21177,8 +21173,8 @@ maybe-configure-uudecode:
 configure-uudecode:
        @test ! -f uudecode/Makefile || exit 0; \
        [ -d uudecode ] || mkdir uudecode; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21213,8 +21209,8 @@ configure-uudecode:
 .PHONY: all-uudecode maybe-all-uudecode
 maybe-all-uudecode:
 all-uudecode: configure-uudecode
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -21222,8 +21218,8 @@ all-uudecode: configure-uudecode
 maybe-check-uudecode:
 
 check-uudecode:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -21232,8 +21228,8 @@ check-uudecode:
 maybe-install-uudecode:
 
 install-uudecode: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -21243,8 +21239,8 @@ maybe-configure-wdiff:
 configure-wdiff:
        @test ! -f wdiff/Makefile || exit 0; \
        [ -d wdiff ] || mkdir wdiff; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21279,8 +21275,8 @@ configure-wdiff:
 .PHONY: all-wdiff maybe-all-wdiff
 maybe-all-wdiff:
 all-wdiff: configure-wdiff
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -21288,8 +21284,8 @@ all-wdiff: configure-wdiff
 maybe-check-wdiff:
 
 check-wdiff:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check)
 
@@ -21298,8 +21294,8 @@ check-wdiff:
 maybe-install-wdiff:
 
 install-wdiff: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -21309,8 +21305,8 @@ maybe-configure-zip:
 configure-zip:
        @test ! -f zip/Makefile || exit 0; \
        [ -d zip ] || mkdir zip; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21345,8 +21341,8 @@ configure-zip:
 .PHONY: all-zip maybe-all-zip
 maybe-all-zip:
 all-zip: configure-zip
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd zip && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -21356,8 +21352,8 @@ maybe-check-zip:
 # This module is only tested in a native toolchain.
 check-zip:
        @if [ '$(host)' = '$(target)' ] ; then \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \
        fi
@@ -21367,8 +21363,8 @@ check-zip:
 maybe-install-zip:
 
 install-zip: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd zip && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -21378,8 +21374,8 @@ maybe-configure-zlib:
 configure-zlib:
        @test ! -f zlib/Makefile || exit 0; \
        [ -d zlib ] || mkdir zlib; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21414,8 +21410,8 @@ configure-zlib:
 .PHONY: all-zlib maybe-all-zlib
 maybe-all-zlib:
 all-zlib: configure-zlib
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -21436,8 +21432,8 @@ maybe-configure-gdb:
 configure-gdb:
        @test ! -f gdb/Makefile || exit 0; \
        [ -d gdb ] || mkdir gdb; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21472,8 +21468,8 @@ configure-gdb:
 .PHONY: all-gdb maybe-all-gdb
 maybe-all-gdb:
 all-gdb: configure-gdb
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
@@ -21481,8 +21477,8 @@ all-gdb: configure-gdb
 maybe-check-gdb:
 
 check-gdb:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
@@ -21491,8 +21487,8 @@ check-gdb:
 maybe-install-gdb:
 
 install-gdb: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
@@ -21502,8 +21498,8 @@ maybe-configure-expect:
 configure-expect:
        @test ! -f expect/Makefile || exit 0; \
        [ -d expect ] || mkdir expect; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21538,8 +21534,8 @@ configure-expect:
 .PHONY: all-expect maybe-all-expect
 maybe-all-expect:
 all-expect: configure-expect
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
@@ -21547,8 +21543,8 @@ all-expect: configure-expect
 maybe-check-expect:
 
 check-expect:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
@@ -21557,8 +21553,8 @@ check-expect:
 maybe-install-expect:
 
 install-expect: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
@@ -21568,8 +21564,8 @@ maybe-configure-guile:
 configure-guile:
        @test ! -f guile/Makefile || exit 0; \
        [ -d guile ] || mkdir guile; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21604,8 +21600,8 @@ configure-guile:
 .PHONY: all-guile maybe-all-guile
 maybe-all-guile:
 all-guile: configure-guile
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
@@ -21613,8 +21609,8 @@ all-guile: configure-guile
 maybe-check-guile:
 
 check-guile:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
@@ -21623,8 +21619,8 @@ check-guile:
 maybe-install-guile:
 
 install-guile: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
@@ -21634,8 +21630,8 @@ maybe-configure-tk:
 configure-tk:
        @test ! -f tk/Makefile || exit 0; \
        [ -d tk ] || mkdir tk; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21670,8 +21666,8 @@ configure-tk:
 .PHONY: all-tk maybe-all-tk
 maybe-all-tk:
 all-tk: configure-tk
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
@@ -21679,8 +21675,8 @@ all-tk: configure-tk
 maybe-check-tk:
 
 check-tk:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
@@ -21689,8 +21685,8 @@ check-tk:
 maybe-install-tk:
 
 install-tk: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
@@ -21700,8 +21696,8 @@ maybe-configure-tix:
 configure-tix:
        @test ! -f tix/Makefile || exit 0; \
        [ -d tix ] || mkdir tix; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21736,8 +21732,8 @@ configure-tix:
 .PHONY: all-tix maybe-all-tix
 maybe-all-tix:
 all-tix: configure-tix
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
@@ -21745,8 +21741,8 @@ all-tix: configure-tix
 maybe-check-tix:
 
 check-tix:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
@@ -21755,8 +21751,8 @@ check-tix:
 maybe-install-tix:
 
 install-tix: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
@@ -21766,8 +21762,8 @@ maybe-configure-libtermcap:
 configure-libtermcap:
        @test ! -f libtermcap/Makefile || exit 0; \
        [ -d libtermcap ] || mkdir libtermcap; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21802,8 +21798,8 @@ configure-libtermcap:
 .PHONY: all-libtermcap maybe-all-libtermcap
 maybe-all-libtermcap:
 all-libtermcap: configure-libtermcap
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -21817,8 +21813,8 @@ check-libtermcap:
 maybe-install-libtermcap:
 
 install-libtermcap: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -21828,8 +21824,8 @@ maybe-configure-utils:
 configure-utils:
        @test ! -f utils/Makefile || exit 0; \
        [ -d utils ] || mkdir utils; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -21864,8 +21860,8 @@ configure-utils:
 .PHONY: all-utils maybe-all-utils
 maybe-all-utils:
 all-utils: configure-utils
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd utils && $(MAKE) $(FLAGS_TO_PASS) all)
 
@@ -21879,8 +21875,8 @@ check-utils:
 maybe-install-utils:
 
 install-utils: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd utils && $(MAKE) $(FLAGS_TO_PASS) install)
 
@@ -21895,17 +21891,15 @@ maybe-configure-target-libstdc++-v3:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || \
-         mkdir $(TARGET_SUBDIR)/libstdc++-v3; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
        rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
 
 configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
        @test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || \
-         mkdir $(TARGET_SUBDIR)/libstdc++-v3;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -21966,8 +21960,8 @@ configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
 .PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3
 maybe-all-target-libstdc++-v3:
 all-target-libstdc++-v3: configure-target-libstdc++-v3
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  all)
@@ -21976,8 +21970,8 @@ all-target-libstdc++-v3: configure-target-libstdc++-v3
 maybe-check-target-libstdc++-v3:
 
 check-target-libstdc++-v3:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  check)
@@ -21987,8 +21981,8 @@ check-target-libstdc++-v3:
 maybe-install-target-libstdc++-v3:
 
 install-target-libstdc++-v3: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -21999,17 +21993,15 @@ maybe-configure-target-newlib:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/newlib/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/newlib ] || \
-         mkdir $(TARGET_SUBDIR)/newlib; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \
        rm -f $(TARGET_SUBDIR)/newlib/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/newlib/multilib.out
 
 configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out
        @test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/newlib ] || \
-         mkdir $(TARGET_SUBDIR)/newlib;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -22069,8 +22061,8 @@ configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out
 .PHONY: all-target-newlib maybe-all-target-newlib
 maybe-all-target-newlib:
 all-target-newlib: configure-target-newlib
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/newlib && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -22079,8 +22071,8 @@ all-target-newlib: configure-target-newlib
 maybe-check-target-newlib:
 
 check-target-newlib:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/newlib && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
@@ -22090,8 +22082,8 @@ check-target-newlib:
 maybe-install-target-newlib:
 
 install-target-newlib: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/newlib && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -22102,17 +22094,15 @@ maybe-configure-target-libf2c:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/libf2c/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/libf2c ] || \
-         mkdir $(TARGET_SUBDIR)/libf2c; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \
        rm -f $(TARGET_SUBDIR)/libf2c/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/libf2c/multilib.out
 
 configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out
        @test ! -f $(TARGET_SUBDIR)/libf2c/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/libf2c ] || \
-         mkdir $(TARGET_SUBDIR)/libf2c;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -22172,8 +22162,8 @@ configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out
 .PHONY: all-target-libf2c maybe-all-target-libf2c
 maybe-all-target-libf2c:
 all-target-libf2c: configure-target-libf2c
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libf2c && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -22182,8 +22172,8 @@ all-target-libf2c: configure-target-libf2c
 maybe-check-target-libf2c:
 
 check-target-libf2c:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libf2c && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
@@ -22193,8 +22183,8 @@ check-target-libf2c:
 maybe-install-target-libf2c:
 
 install-target-libf2c: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libf2c && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -22205,17 +22195,15 @@ maybe-configure-target-libobjc:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/libobjc ] || \
-         mkdir $(TARGET_SUBDIR)/libobjc; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \
        rm -f $(TARGET_SUBDIR)/libobjc/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/libobjc/multilib.out
 
 configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out
        @test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/libobjc ] || \
-         mkdir $(TARGET_SUBDIR)/libobjc;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -22275,8 +22263,8 @@ configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out
 .PHONY: all-target-libobjc maybe-all-target-libobjc
 maybe-all-target-libobjc:
 all-target-libobjc: configure-target-libobjc
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libobjc && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -22285,8 +22273,8 @@ all-target-libobjc: configure-target-libobjc
 maybe-check-target-libobjc:
 
 check-target-libobjc:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libobjc && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
@@ -22296,8 +22284,8 @@ check-target-libobjc:
 maybe-install-target-libobjc:
 
 install-target-libobjc: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libobjc && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -22308,17 +22296,15 @@ maybe-configure-target-libtermcap:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/libtermcap ] || \
-         mkdir $(TARGET_SUBDIR)/libtermcap; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \
        rm -f $(TARGET_SUBDIR)/libtermcap/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/libtermcap/multilib.out
 
 configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out
        @test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/libtermcap ] || \
-         mkdir $(TARGET_SUBDIR)/libtermcap;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -22378,8 +22364,8 @@ configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out
 .PHONY: all-target-libtermcap maybe-all-target-libtermcap
 maybe-all-target-libtermcap:
 all-target-libtermcap: configure-target-libtermcap
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libtermcap && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -22395,8 +22381,8 @@ check-target-libtermcap:
 maybe-install-target-libtermcap:
 
 install-target-libtermcap: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libtermcap && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -22407,17 +22393,15 @@ maybe-configure-target-winsup:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/winsup/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/winsup ] || \
-         mkdir $(TARGET_SUBDIR)/winsup; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \
        rm -f $(TARGET_SUBDIR)/winsup/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/winsup/multilib.out
 
 configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out
        @test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/winsup ] || \
-         mkdir $(TARGET_SUBDIR)/winsup;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -22477,8 +22461,8 @@ configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out
 .PHONY: all-target-winsup maybe-all-target-winsup
 maybe-all-target-winsup:
 all-target-winsup: configure-target-winsup
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/winsup && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -22487,8 +22471,8 @@ all-target-winsup: configure-target-winsup
 maybe-check-target-winsup:
 
 check-target-winsup:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/winsup && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
@@ -22498,8 +22482,8 @@ check-target-winsup:
 maybe-install-target-winsup:
 
 install-target-winsup: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/winsup && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -22510,17 +22494,15 @@ maybe-configure-target-libgloss:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/libgloss ] || \
-         mkdir $(TARGET_SUBDIR)/libgloss; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \
        rm -f $(TARGET_SUBDIR)/libgloss/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/libgloss/multilib.out
 
 configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out
        @test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/libgloss ] || \
-         mkdir $(TARGET_SUBDIR)/libgloss;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -22580,8 +22562,8 @@ configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out
 .PHONY: all-target-libgloss maybe-all-target-libgloss
 maybe-all-target-libgloss:
 all-target-libgloss: configure-target-libgloss
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libgloss && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -22597,8 +22579,8 @@ check-target-libgloss:
 maybe-install-target-libgloss:
 
 install-target-libgloss: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libgloss && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -22609,17 +22591,15 @@ maybe-configure-target-libiberty:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/libiberty ] || \
-         mkdir $(TARGET_SUBDIR)/libiberty; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \
        rm -f $(TARGET_SUBDIR)/libiberty/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/libiberty/multilib.out
 
 configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out
        @test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/libiberty ] || \
-         mkdir $(TARGET_SUBDIR)/libiberty;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -22679,8 +22659,8 @@ configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out
 .PHONY: all-target-libiberty maybe-all-target-libiberty
 maybe-all-target-libiberty:
 all-target-libiberty: configure-target-libiberty
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libiberty && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -22689,8 +22669,8 @@ all-target-libiberty: configure-target-libiberty
 maybe-check-target-libiberty:
 
 check-target-libiberty:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libiberty && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
@@ -22700,8 +22680,8 @@ check-target-libiberty:
 maybe-install-target-libiberty:
 
 install-target-libiberty: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libiberty && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -22712,17 +22692,15 @@ maybe-configure-target-gperf:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/gperf/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/gperf ] || \
-         mkdir $(TARGET_SUBDIR)/gperf; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \
        rm -f $(TARGET_SUBDIR)/gperf/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/gperf/multilib.out
 
 configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out
        @test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/gperf ] || \
-         mkdir $(TARGET_SUBDIR)/gperf;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -22782,8 +22760,8 @@ configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out
 .PHONY: all-target-gperf maybe-all-target-gperf
 maybe-all-target-gperf:
 all-target-gperf: configure-target-gperf
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/gperf && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -22792,8 +22770,8 @@ all-target-gperf: configure-target-gperf
 maybe-check-target-gperf:
 
 check-target-gperf:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/gperf && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
@@ -22803,8 +22781,8 @@ check-target-gperf:
 maybe-install-target-gperf:
 
 install-target-gperf: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/gperf && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -22815,17 +22793,15 @@ maybe-configure-target-examples:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/examples/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/examples ] || \
-         mkdir $(TARGET_SUBDIR)/examples; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \
        rm -f $(TARGET_SUBDIR)/examples/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/examples/multilib.out
 
 configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out
        @test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/examples ] || \
-         mkdir $(TARGET_SUBDIR)/examples;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -22885,8 +22861,8 @@ configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out
 .PHONY: all-target-examples maybe-all-target-examples
 maybe-all-target-examples:
 all-target-examples: configure-target-examples
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/examples && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -22910,17 +22886,15 @@ maybe-configure-target-libffi:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/libffi/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/libffi ] || \
-         mkdir $(TARGET_SUBDIR)/libffi; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \
        rm -f $(TARGET_SUBDIR)/libffi/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/libffi/multilib.out
 
 configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out
        @test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/libffi ] || \
-         mkdir $(TARGET_SUBDIR)/libffi;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -22980,8 +22954,8 @@ configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out
 .PHONY: all-target-libffi maybe-all-target-libffi
 maybe-all-target-libffi:
 all-target-libffi: configure-target-libffi
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libffi && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -22990,8 +22964,8 @@ all-target-libffi: configure-target-libffi
 maybe-check-target-libffi:
 
 check-target-libffi:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libffi && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
@@ -23001,8 +22975,8 @@ check-target-libffi:
 maybe-install-target-libffi:
 
 install-target-libffi: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libffi && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -23013,17 +22987,15 @@ maybe-configure-target-libjava:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/libjava/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/libjava ] || \
-         mkdir $(TARGET_SUBDIR)/libjava; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \
        rm -f $(TARGET_SUBDIR)/libjava/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/libjava/multilib.out
 
 configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out
        @test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/libjava ] || \
-         mkdir $(TARGET_SUBDIR)/libjava;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -23084,8 +23056,8 @@ configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out
 .PHONY: all-target-libjava maybe-all-target-libjava
 maybe-all-target-libjava:
 all-target-libjava: configure-target-libjava
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libjava && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  all)
@@ -23094,8 +23066,8 @@ all-target-libjava: configure-target-libjava
 maybe-check-target-libjava:
 
 check-target-libjava:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libjava && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  check)
@@ -23105,8 +23077,8 @@ check-target-libjava:
 maybe-install-target-libjava:
 
 install-target-libjava: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/libjava && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -23117,17 +23089,15 @@ maybe-configure-target-zlib:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/zlib/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/zlib ] || \
-         mkdir $(TARGET_SUBDIR)/zlib; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \
        rm -f $(TARGET_SUBDIR)/zlib/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/zlib/multilib.out
 
 configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out
        @test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/zlib ] || \
-         mkdir $(TARGET_SUBDIR)/zlib;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -23187,8 +23157,8 @@ configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out
 .PHONY: all-target-zlib maybe-all-target-zlib
 maybe-all-target-zlib:
 all-target-zlib: configure-target-zlib
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/zlib && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -23197,8 +23167,8 @@ all-target-zlib: configure-target-zlib
 maybe-check-target-zlib:
 
 check-target-zlib:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/zlib && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
@@ -23208,8 +23178,8 @@ check-target-zlib:
 maybe-install-target-zlib:
 
 install-target-zlib: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/zlib && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -23220,17 +23190,15 @@ maybe-configure-target-boehm-gc:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/boehm-gc ] || \
-         mkdir $(TARGET_SUBDIR)/boehm-gc; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \
        rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/boehm-gc/multilib.out
 
 configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out
        @test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/boehm-gc ] || \
-         mkdir $(TARGET_SUBDIR)/boehm-gc;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -23290,8 +23258,8 @@ configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out
 .PHONY: all-target-boehm-gc maybe-all-target-boehm-gc
 maybe-all-target-boehm-gc:
 all-target-boehm-gc: configure-target-boehm-gc
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/boehm-gc && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -23300,8 +23268,8 @@ all-target-boehm-gc: configure-target-boehm-gc
 maybe-check-target-boehm-gc:
 
 check-target-boehm-gc:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/boehm-gc && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
@@ -23311,8 +23279,8 @@ check-target-boehm-gc:
 maybe-install-target-boehm-gc:
 
 install-target-boehm-gc: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/boehm-gc && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -23323,17 +23291,15 @@ maybe-configure-target-qthreads:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/qthreads ] || \
-         mkdir $(TARGET_SUBDIR)/qthreads; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \
        rm -f $(TARGET_SUBDIR)/qthreads/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/qthreads/multilib.out
 
 configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out
        @test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/qthreads ] || \
-         mkdir $(TARGET_SUBDIR)/qthreads;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -23393,8 +23359,8 @@ configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out
 .PHONY: all-target-qthreads maybe-all-target-qthreads
 maybe-all-target-qthreads:
 all-target-qthreads: configure-target-qthreads
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/qthreads && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -23403,8 +23369,8 @@ all-target-qthreads: configure-target-qthreads
 maybe-check-target-qthreads:
 
 check-target-qthreads:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/qthreads && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
@@ -23414,8 +23380,8 @@ check-target-qthreads:
 maybe-install-target-qthreads:
 
 install-target-qthreads: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/qthreads && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -23426,17 +23392,15 @@ maybe-configure-target-rda:
 
 # There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
 $(TARGET_SUBDIR)/rda/multilib.out: multilib.out
-       @[ -d $(TARGET_SUBDIR)/rda ] || \
-         mkdir $(TARGET_SUBDIR)/rda; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \
        rm -f $(TARGET_SUBDIR)/rda/Makefile || : ; \
        cp multilib.out $(TARGET_SUBDIR)/rda/multilib.out
 
 configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out
        @test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \
-       [ -d $(TARGET_SUBDIR)/rda ] || \
-         mkdir $(TARGET_SUBDIR)/rda;\
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        AR="$(AR_FOR_TARGET)"; export AR; \
        AS="$(AS_FOR_TARGET)"; export AS; \
@@ -23496,8 +23460,8 @@ configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out
 .PHONY: all-target-rda maybe-all-target-rda
 maybe-all-target-rda:
 all-target-rda: configure-target-rda
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/rda && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
@@ -23506,8 +23470,8 @@ all-target-rda: configure-target-rda
 maybe-check-target-rda:
 
 check-target-rda:
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/rda && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
@@ -23517,8 +23481,8 @@ check-target-rda:
 maybe-install-target-rda:
 
 install-target-rda: installdirs
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        (cd $(TARGET_SUBDIR)/rda && \
          $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@@ -23539,8 +23503,8 @@ maybe-configure-gcc:
 configure-gcc:
        @test ! -f gcc/Makefile || exit 0; \
        [ -d gcc ] || mkdir gcc; \
-       r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        CC="$(CC)"; export CC; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CXX="$(CXX)"; export CXX; \
@@ -23580,13 +23544,13 @@ configure-gcc:
 maybe-all-gcc:
 all-gcc: configure-gcc
        @if [ -f gcc/stage_last ] ; then \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
        else \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
        fi
@@ -23604,13 +23568,13 @@ all-gcc: configure-gcc
 GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
 .PHONY: $(GCC_STRAP_TARGETS)
 $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Bootstrapping the compiler"; \
        cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        case "$@" in \
          *bootstrap4-lean ) \
            msg="Comparing stage3 and stage4 of the compiler"; \
@@ -23628,38 +23592,38 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
        $(SET_LIB_PATH) \
        echo "$$msg"; \
        cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}` ; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
        $(SET_LIB_PATH) \
        echo "Building runtime libraries"; \
        $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
 
 profiledbootstrap: all-bootstrap configure-gcc
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Bootstrapping the compiler"; \
        cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}` ; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
        $(SET_LIB_PATH) \
        echo "Building runtime libraries and training compiler"; \
        $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Building feedback based compiler"; \
        cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
 
 .PHONY: cross
 cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}`; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        echo "Building the C and C++ compiler"; \
        cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
-       @r=`${PWD}`; export r; \
-       s=`cd $(srcdir); ${PWD}` ; export s; \
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
        $(SET_LIB_PATH) \
        echo "Building runtime libraries"; \
        $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
@@ -23669,8 +23633,8 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
 maybe-check-gcc:
 check-gcc:
        @if [ -f ./gcc/Makefile ] ; then \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
        else \
@@ -23680,8 +23644,8 @@ check-gcc:
 .PHONY: check-gcc-c++
 check-gcc-c++:
        @if [ -f ./gcc/Makefile ] ; then \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
        else \
@@ -23689,15 +23653,14 @@ check-gcc-c++:
        fi
 
 .PHONY: check-c++
-check-c++:
-       $(MAKE) check-target-libstdc++-v3 check-gcc-c++
+check-c++: check-target-libstdc++-v3 check-gcc-c++
 
 .PHONY: install-gcc maybe-install-gcc
 maybe-install-gcc:
 install-gcc:
        @if [ -f ./gcc/Makefile ] ; then \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
        else \
@@ -23716,8 +23679,8 @@ gcc-no-fixedincludes:
          cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
          touch gcc/stmp-fixinc gcc/include/fixed; \
          rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}` ; export s; \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
          $(SET_LIB_PATH) \
          (cd ./gcc && \
           $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
@@ -23738,12 +23701,13 @@ gcc-no-fixedincludes:
 
 # Host modules specific to gcc.
 # GCC needs to identify certain tools.
-configure-gcc: maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
-all-gcc: maybe-all-libiberty maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
+# GCC also needs the information exported by the intl configure script.
+configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
+all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
 # This is a slightly kludgy method of getting dependencies on 
 # all-build-libiberty correct; it would be better to build it every time.
 all-gcc: maybe-all-build-libiberty
-all-bootstrap: maybe-all-libiberty maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
+all-bootstrap: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
 
 # Host modules specific to gdb.
 # GDB needs to know that the simulator is being built.
@@ -23798,7 +23762,7 @@ all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
 all-gzip: maybe-all-libiberty
 all-hello: maybe-all-libiberty
 all-m4: maybe-all-libiberty maybe-all-texinfo
-all-make: maybe-all-libiberty
+all-make: maybe-all-libiberty maybe-all-intl
 all-patch: maybe-all-libiberty
 all-prms: maybe-all-libiberty
 all-recode: maybe-all-libiberty
@@ -23861,7 +23825,7 @@ configure-target-qthreads: $(ALL_GCC_C)
 # We use move-if-change so that it's only considered updated when it
 # actually changes, because it has to depend on a phony target.
 multilib.out: maybe-all-gcc
-       @r=`${PWD}`; export r; \
+       @r=`${PWD_COMMAND}`; export r; \
        echo "Checking multilib configuration..."; \
        $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \
        $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \
index 44159e5a1c1dd05f52b46b8b5e57d32dd8599d17..e4c4f92d6ef4bb6911f7564b65a2cab7e3690051 100644 (file)
@@ -1,3 +1,826 @@
+2003-08-03  Jeff Muizelaar  <muizelaar@rogers.com>
+
+       * coffcode.h: (coff_slurp_line_table) Return with a warning
+       message if the line number table could not be read.
+
+2003-08-04  Nick Clifton  <nickc@redhat.com>
+
+       * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
+       to messages produced for .gnu.warning.SYMBOL sections.
+
+2003-08-04  Alan Modra  <amodra@bigpond.net.au>
+
+       * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
+       * elfcore.h: Likewise.
+       * elflink.c: Likewise.
+       * elflink.h: Likewise.
+       * elf.c (sym_is_global): Remove INLINE.
+       (align_file_position): Replace INLINE with inline.
+       * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
+       (elf_file_p): Replace INLINE with inline.
+
+2003-08-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+       * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
+
+2003-08-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
+
+2003-08-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
+       ElfNN_External_Rela instead of Elf64_External_Rela.
+
+2003-08-01  Nick Clifton  <nickc@redhat.com>
+
+       * config.bfd: Add code to catch obsolete configurations and warn
+       about them unless --enable-obsolete is used.  Use this to mark
+       vax-vms port as obsolete.
+
+2003-07-30  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-ppc.c (ppc_elf_install_value): Tidy.
+       (ppc_elf_relax_section): Remove dead code.  Remove unnecessary casts.
+       Formatting.
+       * elfxx-target.h: Remove PARAMS macro.  Formatting.
+
+2003-07-30  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
+       * elf64-ppc.c (get_fdh): New function, split out from
+       ppc64_elf_edit_opd.
+       (ppc64_elf_check_relocs): Use get_fdh.
+       (func_desc_adjust): Likewise.  Tidy.
+       (ppc64_elf_edit_opd): Tighten reloc checks.  Free local_syms on error
+       exit.  Use get_fdh.  Account for superfluous dynamic relocs.
+       (ppc64_elf_relocate_section): Warning fix.
+
+2003-07-30  Jason Eckhardt  <jle@rice.edu>
+
+       * coff-i860.c: Convert to ISO C90.  Remove superflous prototypes.
+
+2003-07-30  Jason Eckhardt  <jle@rice.edu>
+
+       * elf32-i860.c: Convert to ISO C90.  Remove superflous prototypes.
+
+2003-07-30  Randolph Chung  <tausq@debian.org>
+
+       * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
+       * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
+
+2003-07-30  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf.c: Convert to C90, remove unnecessary prototypes and casts.
+       Replace PTR with void *.  Formatting.
+       (_bfd_elf_assign_file_position_for_section): Remove INLINE.
+       (make_mapping): Likewise.
+
+2003-07-29  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (func_desc_adjust): Give linker created function
+       descriptor symbols a size and type.
+       (ppc64_elf_relocate_section): Correct lq insn test.
+
+2003-07-28  Eric Christopher  <echristo@redhat.com>
+
+       * elf32-ppc.c (R_PPC_RELAX32): New relocation.
+       (ppc_elf_install_value): New function.
+       (ppc_elf_sort_rela): Remove.
+       (ppc_elf_relax_section): Rewrite. Remove old relaxation
+       and replace with out of range branch stubs.
+       (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
+
+2003-07-29  Alexandre Oliva  <aoliva@redhat.com>
+
+       * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
+       from input_bfd.
+
+2003-07-28  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf.c (special_sections): Set attributes for .got and .plt.
+
+2003-07-27  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
+       on function descriptors.
+       (ELIMINATE_COPY_RELOCS): Expand comment.
+       (ppc64_elf_special_sections): Move.  Don't include non-ppc64 sections.
+       Do include ".toc1".
+
+2003-07-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf.c (_bfd_elf_new_section_hook): Set the default section
+       type to SHT_NULL.
+       (elf_fake_sections): Set the section type based on asect->flags
+       if it is SHT_NULL. Don't abort on processor specific section
+       types.
+
+2003-07-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * bfd-in2.h: Regenerated.
+
+2003-07-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf-bfd.h (bfd_elf_special_section): New.
+       (elf_backend_data): Add special_sections, a pointer to
+       bfd_elf_special_section.
+       (elf_section_type). New.
+       (elf_section_flags): New.
+       (_bfd_elf_get_sec_type_attr): New.
+
+       * elf.c (_bfd_elf_make_section_from_shdr): Always use the
+       real section type/flags.
+       (special_sections): New.
+       (get_special_section): New.
+       (_bfd_elf_get_sec_type_attr): New.
+       (_bfd_elf_new_section_hook): Check special_section to set
+       elf_section_type and elf_section_flags.
+       (elf_fake_sections): Don't use section name to set ELF section
+       data.
+
+       * elf32-m32r.c (m32r_elf_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elf32-mcore.c (mcore_elf_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elf32-ppc.c (ppc_elf_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elf32-sh64.c (sh64_elf_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elf32-v850.c (v850_elf_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elf32-xtensa.c (elf_xtensa_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elf64-alpha.c (elf64_alpha_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elf64-hppa.c (elf64_hppa_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elf64-ppc.c (ppc64_elf_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elf64-sh64.c (sh64_elf64_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elfxx-ia64.c (elfNN_ia64_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
+
+       * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
+       (elf_backend_special_sections): Defined.
+
+       * elfxx-target.h (elf_backend_special_sections): New. Default
+       to NULL.
+       (elfNN_bed): Initialize special_sections.
+
+       * section.c (bfd_abs_section): Remove const.
+       (bfd_und_section): Likewise.
+       (bfd_com_section): Likewise.
+       (bfd_ind_section): Likewise.
+
+2003-07-24  Nick Clifton  <nickc@redhat.com>
+
+       * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
+       sections are assigned the LOAD attribute.
+
+2003-07-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+       * elf32-sh.c: Convert to C90.  Replace PTR with void *.
+       * elf32-sh64-com.c: Likewise.
+       * elf32-sh64.c: Likewise.
+       * elf32-sh64.h: Likewise.
+       * elf64-sh64.c: Likewise.
+
+2003-07-24  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+       * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
+       (allocate_dynrelocs): Likewise.
+       (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
+       (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
+
+2003-07-24  Nick Clifton  <nickc@redhat.com>
+
+       * po/fr.po: Updated French translation.
+
+2003-07-23  Bob Wilson  <bob.wilson@acm.org>
+
+       * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
+       near the beginning of the file.  Swap order of arguments.  Call
+       _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
+       (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
+       (elf_xtensa_relocate_section): Likewise.
+       (shrink_dynamic_reloc_sections): Likewise.
+
+2003-07-23  Bob Wilson  <bob.wilson@acm.org>
+
+       * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
+       (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
+       (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
+       first printing an error message.
+       (elf_xtensa_finish_dynamic_sections): Likewise.
+       (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
+       discarding literal table entries.
+       (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
+       (elf_xtensa_do_asm_simplify): Likewise.
+
+2003-07-23  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
+       we have a local symbol in common section.
+
+2003-07-22  H.J. Lu <hongjiu.lu@intel.com>
+
+       * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
+       weak symbols.
+
+2003-07-22  Nick Clifton  <nickc@redhat.com>
+
+       * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
+       expected RS6000 storage classes.
+
+2003-07-21  H.J. Lu <hongjiu.lu@intel.com>
+
+       * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
+       output_bfd unused to silence gcc.
+
+2003-07-21  Nick Clifton  <nickc@redhat.com>
+
+       * po/sv.po: Updated Swedish translation.
+
+2003-07-21  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
+       (_bfd_elf_symbol_refs_local_p): ..this.  Declare.
+       * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
+       * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
+       now done in _bfd_elf_symbol_refs_local_p.
+       * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+       * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+       * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+
+2003-07-18  H.J. Lu <hongjiu.lu@intel.com>
+
+       * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
+
+2003-07-18  H.J. Lu <hongjiu.lu@intel.com>
+
+       * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
+       (SYMBOL_CALLS_LOCAL): Likewise.
+
+       * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
+       immediately if symbol isn't defined locally.
+
+2003-07-18  Richard Henderson  <rth@redhat.com>
+
+       * elflink.c (_bfd_elf_dynamic_symbol_p): New.
+       * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
+       (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
+       * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
+       * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
+       * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
+       * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
+       Update all callers to provide the relocation being resolved.
+
+2003-07-17  Shaun Jackman <sjackman@pathwayconnect.com>
+
+       * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
+       targ_cflags.
+
+2003-07-17  Nick Clifton  <nickc@redhat.com>
+
+       * po/es.po: New Spanish translation.
+       * po/sv.po: New Swedish translation.
+       * po/opcodes.pot: Regenerate.
+
+2003-07-16  Richard Henderson  <rth@redhat.com>
+
+       * config.bfd, configure.host, configure.in: Remove ia64-aix support.
+       * elfxx-ia64.c, targets.c: Likewise.
+
+2003-07-16  Richard Henderson  <rth@redhat.com>
+
+       * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
+       for symbols defined locally plus -Bsymbolic.  Tidy logic.
+
+2003-07-15  Richard Sandiford  <rsandifo@redhat.com>
+
+       * archures.c (bfd_mach_mips7000): New.
+       * bfd-in2.h: Regenerated.
+       * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
+       * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
+       (mips_mach_extensions): Add an entry for it.
+
+2003-07-14  Nick Clifton  <nickc@redhat.com>
+
+       * po/tr.po: Update with latest version.
+       * po/SRC-POTFILES.in: Regenerate.
+       * po/bfd.pot: Regenerate.
+       * Makfile.in: Regenerate.
+       * configure: Regenerate.
+
+2003-07-12  Jeff Baker  <jbaker@qnx.com>
+
+       * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
+       * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
+       * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
+       * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
+
+2003-07-12  Jeff Muizelaar  <muizelaar@rogers.com>
+
+       * coffcode.h (coff_set_section_contents): Set the
+       IMAGE_FILE_32BIT_MACHINE flag for PE targets.
+
+2003-07-11  Richard Sandiford  <rsandifo@redhat.com>
+
+       * bfd-in.h (bfd_h8300_pad_address): Declare.
+       * bfd-in2.h: Regenerate.
+       * cpu-h8300.c (bfd_h8300_pad_address): New function.
+       * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
+       addresses before checking whether they can be relaxed.
+       (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
+       Don't complain about overflows in general 8-bit relocations.
+       * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
+       Fix handling of R_H8_DIR24A8.
+
+2003-07-11  Richard Sandiford  <rsandifo@redhat.com>
+
+       * elf32-h8300.c: Convert function prototypes and definitions
+       to C90 syntax.
+       * coff-h8300.c: Likewise.
+       * cpu-h8300.c: Likewise.
+
+2003-07-11  Alan Modra  <amodra@bigpond.net.au>
+
+       * po/SRC-POTFILES.in: Regenerate.
+       * po/bfd.pot: Likewise.
+
+2003-07-10  Bob Wilson  <bob.wilson@acm.org>
+
+       * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
+       .got.loc section.  Do not set SEC_ALLOC or SEC_LOAD flags for the
+       .xt.lit.plt section.
+       (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
+       and allocate memory for it.
+       (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
+       section to the .got.loc section.
+       (elf_xtensa_finish_dynamic_sections): Fix up call to
+       elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
+       the address of .got.loc.
+       (relax_property_section): Shrink .got.loc to match changes in any
+       literal table section.
+       (xtensa_is_property_section): Change to match
+       xtensa_get_property_section_name.
+       (xtensa_is_littable_section): New.
+
+2003-07-10  H.J. Lu <hongjiu.lu@intel.com>
+
+       * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
+       -1LL.
+
+2003-07-10  Alan Modra  <amodra@bigpond.net.au>
+
+       * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
+       (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
+       Run "make dep-am".
+       * Makefile.in: Regenerate.
+
+2003-07-10  Alexandre Oliva  <aoliva@redhat.com>
+
+       2001-09-12  Alexandre Oliva  <aoliva@redhat.com>
+       * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
+       (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
+       2001-06-02  Nick Clifton  <nickc@cambridge.redhat.com>
+       * elf32-am33lin.c: Rename global functions.
+       2001-05-09  Alexandre Oliva  <aoliva@redhat.com>
+       * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
+       * configure.in (bfd_elf32_am33lin_vec): Added.
+       * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
+       (elf32-am33lin.lo): List dependencies.
+       * aclocal.m4, configure, Makefile.in: Rebuilt.
+       * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
+       ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
+       ELF_ARCH was not defined before.
+       (elf_symbol_leading_char): Define if not defined.
+       * elf32-am33lin.c: Override the definitions above.
+       * targets.c (bfd_elf32_am33lin_vec): New.
+
+2003-07-09  Alexandre Oliva  <aoliva@redhat.com>
+
+       2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
+       * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
+       pcrel_relocs_copied.
+       2001-12-13  Alexandre Oliva  <aoliva@redhat.com>
+       * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
+       ld-linux.so.2 to ld.so.1.
+       2001-10-10  Alexandre Oliva  <aoliva@redhat.com>
+       * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
+       (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
+       (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
+       * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
+       .rela.* section contents with bfd_zalloc.
+       2001-09-25  Alexandre Oliva  <aoliva@redhat.com>
+       * elf-m10300.c: Added declarations for functions missing them.
+       Merge some shared-library changes from the i386 back-end.  Use
+       R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
+       R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
+       (struct elf32_mn10300_link_hash_entry): Remove duplicates of
+       members of elf_link_hash_entry.  Adjusted references.
+       (mn10300_elf_final_link_relocate): dynobj was already loaded
+       into a local variable, use it.
+       2001-09-21  Nick Clifton  <nickc@cambridge.redhat.com>
+       * elf-m10300.c: Add missing function prototypes.
+       2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
+       * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
+       relocation for dynamic relocations.
+       2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
+       * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
+       * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
+       PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
+       (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
+       (_bfd_mn10300_elf_create_got_section): ... here, so that its
+       adress is already known at the time we compute relaxations.
+       (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
+       and PLT32 to narrower relocations.
+       * libbfd.h, bfd-in2.h: Rebuilt.
+       2001-04-12  Alexandre Oliva  <aoliva@redhat.com>
+       * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
+       BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
+       BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
+       BFD_RELOC_MN10300_RELATIVE): New relocs.
+       * libbfd.h, bfd-in2.h: Rebuilt.
+       * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
+       (struct elf32_mn10300_link_hash_entry): Added DSO-related
+       fields.
+       (elf_mn10300_howto): Defined new relocation types.
+       (mn10300_reloc_map): Map them.
+       (_bfd_mn10300_elf_create_got_section): New fn.
+       (mn10300_elf_check_relocs): Handle PIC relocs.
+       (mn10300_elf_final_link_relocate): Likewise.
+       (mn10300_elf_relocate_section): Handle DSOs.
+       (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
+       (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
+       elf_mn10300_pic_plt_entry): New.
+       (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
+       elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
+       elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
+       elf_mn10300_plt_reloc_offset: New macros.
+       (ELF_DYNAMIC_INTERPRETER): Likewise.
+       (_bfd_mn10300_elf_create_dynamic_sections): New function.
+       (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
+       (_bfd_mn10300_elf_discard_copies): Likewise.
+       (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
+       (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
+       (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
+       (elf_backend_can_gc_sections,
+       elf_backend_create_dynamic_sections,
+       elf_backend_adjust_dynamic_sections,
+       elf_backend_size_dynamic_sections,
+       elf_backend_finish_dynamic_symbol,
+       elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
+       elf_backend_plt_readonly, elf_backend_want_plt_sym,
+       elf_backend_got_header_size, elf_backend_plt_header_size): New
+       macros.
+
+2003-07-09  Alexandre Oliva  <aoliva@redhat.com>
+
+       2001-05-06  Alexandre Oliva  <aoliva@redhat.com>
+       * elf-m10300.c (compute_function_info): Account for AM33
+       registers in `movm' when computing stack space for `call' when
+       linking for AM33/2.0 link.
+       2000-04-01  Alexandre Oliva  <aoliva@cygnus.com>
+       * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
+       * bfd-in2.h: Rebuilt.
+       * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
+       * elf-m10300.c: Updated.
+       2000-03-31  Alexandre Oliva  <aoliva@cygnus.com>
+       * archures.c (bfd_mach_am332): Defined.
+       * bfd-in2.h: Rebuilt.
+       * cpu-m10300.c (bfd_am332_arch): Defined.
+       (bfd_am33_arch): Chained with am33-2.
+       * elf-m10300.c (elf_mn10300_mach): Handle am332.
+       (_bfd_mn10300_elf_final_write_processing): Likewise.
+
+2003-07-09  H.J. Lu <hongjiu.lu@intel.com>
+
+       * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
+
+2003-07-10  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (bfd_elf64_mkobject): Define.
+       (struct ppc64_elf_obj_tdata): New.
+       (ppc64_elf_tdata, ppc64_tlsld_got): Define.
+       (ppc64_elf_mkobject): New function.
+       (struct got_entry): Add "owner".  Move "tls_type".
+       (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
+       (ppc64_elf_init_stub_bfd): New function.
+       (create_got_section): Create header .got in dynobj.  Create .got
+       and .rela.got in each bfd.  Stash pointers in ppc64_elf_obj_tdata.
+       (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
+       Look for dynobj .got, and test it.
+       (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
+       (update_local_sym_info): Likewise.
+       (ppc64_elf_check_relocs): Likewise.
+       (ppc64_elf_gc_sweep_hook): Likewise.
+       (ppc64_elf_tls_optimize): Likewise.
+       (allocate_dynrelocs): Likewise.
+       (ppc64_elf_size_dynamic_sections): Likewise.
+       (ppc64_elf_relocate_section): Likewise.
+       (ppc64_elf_next_toc_section): Update comment.
+       (toc_adjusting_stub_needed): Remove unneeded cast.
+       (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
+       testing section flags.
+       (ppc64_elf_build_stubs): Likewise.
+       (ppc64_elf_size_stubs): Likewise.  Remove stub_bfd param.
+       (ppc64_elf_finish_dynamic_sections): Write out got sections.
+       (func_desc_adjust): Copy over dynamic info for undef weaks.
+       * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
+       (ppc64_elf_size_stubs): Update prototype.
+       * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
+       input sections rather than scanning dynobj.
+
+2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
+
+       * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
+       (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
+       (mips_elf_create_msym_section): Delete.
+       (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
+       (_bfd_mips_elf_copy_indirect_symbol): Likewise.
+       (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
+       (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
+       (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
+       (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
+       (_bfd_mips_elf_finish_dynamic_sections): Likewise.
+
+2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
+
+       * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
+       symbols protected.
+
+2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
+
+       * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
+       of relocations whose offset is -2.
+
+2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
+
+       * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
+       forced-local symbols like other locals.  Don't create relocations
+       against STN_UNDEF in irix objects.
+
+2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
+
+       * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
+       compatible objects, add the values of defined external symbols
+       to the addend.
+
+2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
+
+       * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
+       initialize a GOT entry to the symbol's st_value.
+
+2003-07-08  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
+       * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here.  New.
+       (ppc_elf_tdata): Define.
+       (elf_local_ptr_offsets): Adjust.
+       (ppc_elf_mkobject): New function.
+       (bfd_elf32_mkobject): Define.
+
+       * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
+       * elfcore.h (elf_core_file_p): Likewise.
+       * section.c (bfd_section_init): Remove prototype.
+
+2003-07-08  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
+       field.
+       (enum elf_linker_section_enum): Delete.
+       (struct elf_linker_section): Delete.
+       (struct elf_linker_section_pointers): Delete.
+       (struct elf_obj_tdata): Remove #if 0 chunk.  Remove linker_section.
+       Make linker_section_pointers a void**.
+       (elf_local_ptr_offsets, elf_linker_section): Don't define.
+       * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
+       of old item in elf-bfd.h.
+       (struct elf_linker_section): Likewise.
+       (struct elf_linker_section_pointers): Likewise.
+       (elf_local_ptr_offsets): Define.
+       (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
+       (ppc_elf_link_hash_newfunc): Init it.
+       (struct ppc_elf_link_hash_table): Add sbss.
+       (ppc_elf_link_hash_table_create): zmalloc rather than clearing
+       individual fields.
+       (elf_create_linker_section): Fold into..
+       (ppc_elf_create_linker_section): ..here.  Remove hole_size code.
+       Make rela section here if shared.
+       (elf_find_pointer_linker_section): Pass lsect rather than enum.
+       (elf_create_pointer_linker_section): Adjust.  zalloc rather than
+       clearing in a loop.
+       (elf_finish_pointer_linker_section): Adjust.  Don't make rela
+       section here.
+       (ppc_elf_check_relocs): Adjust.
+       (ppc_elf_add_symbol_hook): Tighten hash creator test.  Remove code
+       creating .sbss by hand.
+       * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
+
+2003-07-04  Jakub Jelinek  <jakub@redhat.com>
+
+       * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
+       complain_overflow_bitfield.
+       * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
+       complain_overflow_bitfield.
+
+2003-07-04  Jakub Jelinek  <jakub@redhat.com>
+
+       * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
+       true even if -pie.
+
+2003-07-04  Jakub Jelinek  <jakub@redhat.com>
+
+       * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
+       (elfNN_ia64_dynamic_symbol_p): Change info->shared into
+       !info->executable.
+       (get_fptr): For -pie create .opd as writable section and create
+       .rela.opd as well.
+       (elfNN_ia64_check_relocs): Change info->shared into
+       !info->executable.
+       (allocate_fptr): Likewise.
+       (allocate_dynrel_entries): Account for a relative reloc for -pie
+       @fptr().  Don't account for a relative reloc if -pie want_ltoff_fptr
+       for undefweak symbol.  Account for an IPLT reloc in .rela.opd
+       section if -pie.
+       (set_got_entry): Don't create a relative reloc if -pie
+       want_ltoff_fptr for undefweak symbol.
+       (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
+       (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
+       @fptr().
+
+       * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
+       even if -pie.
+       * elf32-i386.c (elf_i386_relocate_section): Likewise.
+       * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+       * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+       * elf64-s390.c (elf_s390_relocate_section): Likewise.
+       * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+       * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+       * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+       * elf32-s390.c (elf_s390_relocate_section): Likewise.
+       * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+
+2003-07-04  Paul Clarke <paulc@senet.com.au>
+
+       * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
+       (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
+       <R_H8_DIR32A16>: Fix type of relocation.
+
+2003-07-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+       * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
+       sections were created already.  Remove unnecessary tests of
+       the previous change.
+
+2003-07-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+       * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
+       bfd_make_section for existing sections.
+
+2003-07-04  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
+       create_got_section if we already have done so.
+       * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
+       (sh_elf_check_relocs): Likewise.
+       (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var.  Use
+       htab->root.dynobj instead.
+       (sh_elf_check_relocs): Likewise.
+       (sh_elf_finish_dynamic_sections): Likewise.
+
+       * section.c (bfd_make_section): Return NULL for existing section.
+
+2003-07-04  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
+       ppc_elf_create_got if we've already done so.
+
+       * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
+       (_bfd_elf_find_pointer_linker_section): Likewise.
+       (bfd_elf32_create_pointer_linker_section): Likewise.
+       (bfd_elf32_finish_pointer_linker_section): Likewise.
+       (bfd_elf64_create_pointer_linker_section): Likewise.
+       (bfd_elf64_finish_pointer_linker_section): Likewise.
+       (_bfd_elf_make_linker_section_rela): Likewise.
+       * elfcode.h (elf_create_pointer_linker_section): Don't define.
+       (elf_finish_pointer_linker_section): Likewise.
+       * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
+       (_bfd_elf_create_linker_section): Move this function..
+       (_bfd_elf_find_pointer_linker_section): ..and this..
+       * elflink.h (elf_create_pointer_linker_section): ..and this..
+       (elf_finish_pointer_linker_section): ..and this..
+       * elf32-ppc.c: ..to here, renaming to the following, and adjusting
+       calls.
+       (elf_create_linker_section): Convert to C90, tidy.
+       (elf_find_pointer_linker_section): Likewise.
+       (elf_create_pointer_linker_section): Likewise.
+       (elf_finish_pointer_linker_section): Likewise.
+       * elf32-i370.c: Delete #if 0 code.
+
+2003-07-02  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
+       _restf* to be satisfied by shared libs, and always force them local.
+       (toc_adjusting_stub_needed): Avoid scanning linker created sections.
+       Correct test for "bl".
+       (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
+       primary opcode 31.
+
+2003-07-01  Martin Schwidefsky  <schwidefsky@de.ibm.com>
+
+       * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
+       (s390_tls_reloc): New function.
+       (elf_howto_table): Add long displacement relocations R_390_20,
+       R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
+       (elf_s390_reloc_type_lookup): Likewise.
+       (elf_s390_check_relocs): Likewise.
+       (elf_s390_gc_sweep_hook): Likewise.
+       (elf_s390_relocate_section): Likewise.
+       * elf64-s390.c: Same changes as for elf32-s390.c.
+       * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
+       BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
+       BFD_RELOC_390_TLS_GOTIE20.
+       * bfd-in2.h: Regenerate.
+       * libbfd.h: Likewise.
+
+2003-06-30  Alan Modra  <amodra@bigpond.net.au>
+
+       * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
+       (ins_imms, ins_immsm1u4): Likewise.  Warning fix.
+
+2003-06-29  Alan Modra  <amodra@bigpond.net.au>
+
+       * archive.c: Convert to C90, remove unnecessary prototypes and casts.
+       Replace PTR with void *.  Formatting.
+       * archive64.c: Likewise.
+       * archures.c: Likewise.
+       * bfd-in.h: Likewise.
+       * bfd.c: Likewise.
+       * bfdio.c: Likewise.
+       * bfdwin.c: Likewise.
+       * cache.c: Likewise.
+       * corefile.c: Likewise.
+       * format.c: Likewise.
+       * init.c: Likewise.
+       * libbfd-in.h: Likewise.
+       * libbfd.c: Likewise.
+       * linker.c: Likewise.
+       * opncls.c: Likewise.
+       * reloc.c: Likewise.
+       * section.c: Likewise.
+       * simple.c: Likewise.
+       * syms.c: Likewise.
+       * targets.c: Likewise.
+       * bfd-in2.h: Regenerate.
+       * libbfd.h: Regenerate.
+
+       * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
+       * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
+       * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
+       (bfd_getb64): Rewrite without parens.
+       (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
+       * cache.c (insert, snip): Remove INLINE.
+       * linker.c (bfd_link_add_undef): Likewise.
+
+2003-06-29  Andreas Jaeger  <aj@suse.de>
+
+       * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
+       unnecessary prototypes.  Replace PTR with void *.
+       (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
+       trim plt entries.  Move undefweak non-default visibility test ...
+       (allocate_dynrelocs): ... from here.
+       (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
+       Change all callers.
+       (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.  Use
+       SYMBOL_REFERENCES_LOCAL for dynreloc check.
+       (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
+       dynreloc and .got relocs.
+       (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
+       for .got relocs.
+
+2003-06-29  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+       * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
+
 2003-06-27  Nick Clifton  <nickc@redhat.com>
 
        * opncls.c (bfd_add_gnu_debuglink_section): Rename to
        (aout_link_write_symbols): Cast enums in comparisons, int values to
        boolean, enums in assignments to int.
        (aout_link_input_section_std): Cast rel->r_index to unsigned int.
-       (aout_link_input_section_ext): Likewise.  Cast enums used in comparisons
-       with unsigned ints.
+       (aout_link_input_section_ext): Likewise.  Cast enums used in
+       comparisons with unsigned ints.
        (aout_link_reloc_link_order): Cast enum to int in assignment.
        * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
        calls to char *.
        (merge_strings): Add casts to const unsigned char *.
        * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
        (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
-       * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
-       struct bfd_hash_entry *.
+       * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
+       to struct bfd_hash_entry *.
        (bfd_set_section_content): Add cast to PTR in comparison.
        * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
        simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
index 6240f35c251b2d3003f25f7025514de36007ab24..eaec975636541ad61ae423ae2f13e9044ee6dca5 100644 (file)
@@ -208,6 +208,7 @@ BFD32_BACKENDS = \
        ecofflink.lo \
        efi-app-ia32.lo \
        elf.lo \
+       elf32-am33lin.lo \
        elf32-arc.lo \
        elfarm-oabi.lo \
        elfarm-nabi.lo \
@@ -372,6 +373,7 @@ BFD32_BACKENDS_CFILES = \
        ecofflink.c \
        efi-app-ia32.c \
        elf.c \
+       elf32-am33lin.c \
        elf32-arc.c \
        elfarm-oabi.c \
        elfarm-nabi.c \
@@ -1123,6 +1125,10 @@ efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \
 elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h
+elf32-am33lin.lo: elf32-am33lin.c elf-m10300.c $(INCDIR)/filenames.h \
+  elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h \
+  $(INCDIR)/elf/reloc-macros.h elf32-target.h
 elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
index aca93712044eb41feef497ad758fec614dad385d..38ecfab33a604c5a0950618406408cf0fdb253bf 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 
 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -335,6 +335,7 @@ BFD32_BACKENDS = \
        ecofflink.lo \
        efi-app-ia32.lo \
        elf.lo \
+       elf32-am33lin.lo \
        elf32-arc.lo \
        elfarm-oabi.lo \
        elfarm-nabi.lo \
@@ -500,6 +501,7 @@ BFD32_BACKENDS_CFILES = \
        ecofflink.c \
        efi-app-ia32.c \
        elf.c \
+       elf32-am33lin.c \
        elf32-arc.c \
        elfarm-oabi.c \
        elfarm-nabi.c \
@@ -809,7 +811,7 @@ configure.in version.h
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
 OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
@@ -1656,6 +1658,10 @@ efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \
 elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
   elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
   $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h
+elf32-am33lin.lo: elf32-am33lin.c elf-m10300.c $(INCDIR)/filenames.h \
+  elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h \
+  $(INCDIR)/elf/reloc-macros.h elf32-target.h
 elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.h elf-bfd.h \
   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
   $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
index ffb0bd4c8756afc7e67c353007a2bd2fc4b73b8b..c4171e7bc8393475c6910c08a16e6b362799ca5a 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for archive files (libraries).
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002
+   2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Written by Cygnus Support.  Mostly Gumby Henkel-Wallace's fault.
 
@@ -158,28 +158,15 @@ struct ar_cache {
 #define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen)
 
 #define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))
-#define arch_hdr(bfd) ((struct ar_hdr *)arch_eltdata(bfd)->arch_header)
-
-static char *get_extended_arelt_filename
-  PARAMS ((bfd *arch, const char *name));
-static bfd_boolean do_slurp_bsd_armap
-  PARAMS ((bfd *abfd));
-static bfd_boolean do_slurp_coff_armap
-  PARAMS ((bfd *abfd));
-bfd_boolean bfd_elf64_archive_slurp_armap
-  PARAMS ((bfd *abfd));
-static const char *normalize
-  PARAMS ((bfd *, const char *file));
-static struct areltdata *bfd_ar_hdr_from_filesystem
-  PARAMS ((bfd *abfd, const char *, bfd *member));
+#define arch_hdr(bfd) ((struct ar_hdr *) arch_eltdata(bfd)->arch_header)
+
 \f
 bfd_boolean
-_bfd_generic_mkarchive (abfd)
-     bfd *abfd;
+_bfd_generic_mkarchive (bfd *abfd)
 {
   bfd_size_type amt = sizeof (struct artdata);
 
-  abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
+  abfd->tdata.aout_ar_data = bfd_zalloc (abfd, amt);
   if (bfd_ardata (abfd) == NULL)
     return FALSE;
 
@@ -197,7 +184,8 @@ FUNCTION
        bfd_get_next_mapent
 
 SYNOPSIS
-       symindex bfd_get_next_mapent(bfd *abfd, symindex previous, carsym **sym);
+       symindex bfd_get_next_mapent
+         (bfd *abfd, symindex previous, carsym **sym);
 
 DESCRIPTION
        Step through archive @var{abfd}'s symbol table (if it
@@ -214,10 +202,7 @@ DESCRIPTION
 */
 
 symindex
-bfd_get_next_mapent (abfd, prev, entry)
-     bfd *abfd;
-     symindex prev;
-     carsym **entry;
+bfd_get_next_mapent (bfd *abfd, symindex prev, carsym **entry)
 {
   if (!bfd_has_map (abfd))
     {
@@ -239,8 +224,7 @@ bfd_get_next_mapent (abfd, prev, entry)
 /* To be called by backends only */
 
 bfd *
-_bfd_create_empty_archive_element_shell (obfd)
-     bfd *obfd;
+_bfd_create_empty_archive_element_shell (bfd *obfd)
 {
   return _bfd_new_bfd_contained_in (obfd);
 }
@@ -250,7 +234,7 @@ FUNCTION
        bfd_set_archive_head
 
 SYNOPSIS
-       bfd_boolean bfd_set_archive_head(bfd *output, bfd *new_head);
+       bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
 
 DESCRIPTION
        Set the head of the chain of
@@ -258,19 +242,14 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_set_archive_head (output_archive, new_head)
-     bfd *output_archive;
-     bfd *new_head;
+bfd_set_archive_head (bfd *output_archive, bfd *new_head)
 {
-
   output_archive->archive_head = new_head;
   return TRUE;
 }
 
 bfd *
-_bfd_look_for_bfd_in_cache (arch_bfd, filepos)
-     bfd *arch_bfd;
-     file_ptr filepos;
+_bfd_look_for_bfd_in_cache (bfd *arch_bfd, file_ptr filepos)
 {
   struct ar_cache *current;
 
@@ -284,19 +263,17 @@ _bfd_look_for_bfd_in_cache (arch_bfd, filepos)
 
 /* Kind of stupid to call cons for each one, but we don't do too many */
 bfd_boolean
-_bfd_add_bfd_to_archive_cache (arch_bfd, filepos, new_elt)
-     bfd *arch_bfd, *new_elt;
-     file_ptr filepos;
+_bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt)
 {
   bfd_size_type amt = sizeof (struct ar_cache);
 
-  struct ar_cache *new_cache = (struct ar_cache *) bfd_zalloc (arch_bfd, amt);
+  struct ar_cache *new_cache = bfd_zalloc (arch_bfd, amt);
   if (new_cache == NULL)
     return FALSE;
 
   new_cache->ptr = filepos;
   new_cache->arelt = new_elt;
-  new_cache->next = (struct ar_cache *) NULL;
+  new_cache->next = NULL;
   if (bfd_ardata (arch_bfd)->cache == NULL)
     bfd_ardata (arch_bfd)->cache = new_cache;
   else
@@ -315,9 +292,7 @@ _bfd_add_bfd_to_archive_cache (arch_bfd, filepos, new_elt)
    the string table.  */
 
 static char *
-get_extended_arelt_filename (arch, name)
-     bfd *arch;
-     const char *name;
+get_extended_arelt_filename (bfd *arch, const char *name)
 {
   unsigned long index = 0;
 
@@ -344,20 +319,17 @@ get_extended_arelt_filename (arch, name)
    could have been moved arbitrarily.
 */
 
-PTR
-_bfd_generic_read_ar_hdr (abfd)
-     bfd *abfd;
+void *
+_bfd_generic_read_ar_hdr (bfd *abfd)
 {
-  return _bfd_generic_read_ar_hdr_mag (abfd, (const char *) NULL);
+  return _bfd_generic_read_ar_hdr_mag (abfd, NULL);
 }
 
 /* Alpha ECOFF uses an optional different ARFMAG value, so we have a
    variant of _bfd_generic_read_ar_hdr which accepts a magic string.  */
 
-PTR
-_bfd_generic_read_ar_hdr_mag (abfd, mag)
-     bfd *abfd;
-     const char *mag;
+void *
+_bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag)
 {
   struct ar_hdr hdr;
   char *hdrp = (char *) &hdr;
@@ -368,8 +340,7 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
   bfd_size_type allocsize = sizeof (struct areltdata) + sizeof (struct ar_hdr);
   char *allocptr = 0;
 
-  if (bfd_bread ((PTR) hdrp, (bfd_size_type) sizeof (struct ar_hdr), abfd)
-      != sizeof (struct ar_hdr))
+  if (bfd_bread (hdrp, sizeof (struct ar_hdr), abfd) != sizeof (struct ar_hdr))
     {
       if (bfd_get_error () != bfd_error_system_call)
        bfd_set_error (bfd_error_no_more_archived_files);
@@ -439,12 +410,12 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
         spaces, so only look for ' ' if we don't find '/'.  */
 
       char *e;
-      e = (char *) memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd));
+      e = memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd));
       if (e == NULL)
        {
-         e = (char *) memchr (hdr.ar_name, '/', ar_maxnamelen (abfd));
+         e = memchr (hdr.ar_name, '/', ar_maxnamelen (abfd));
          if (e == NULL)
-           e = (char *) memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd));
+           e = memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd));
        }
 
       if (e != NULL)
@@ -469,7 +440,7 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
   ared = (struct areltdata *) allocptr;
 
   ared->arch_header = allocptr + sizeof (struct areltdata);
-  memcpy ((char *) ared->arch_header, (char *) &hdr, sizeof (struct ar_hdr));
+  memcpy (ared->arch_header, &hdr, sizeof (struct ar_hdr));
   ared->parsed_size = parsed_size;
 
   if (filename != NULL)
@@ -479,11 +450,11 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
       ared->filename = allocptr + (sizeof (struct areltdata) +
                                   sizeof (struct ar_hdr));
       if (namelen)
-       memcpy (ared->filename, hdr.ar_name, (size_t) namelen);
+       memcpy (ared->filename, hdr.ar_name, namelen);
       ared->filename[namelen] = '\0';
     }
 
-  return (PTR) ared;
+  return ared;
 }
 \f
 /* This is an internal function; it's mainly used when indexing
@@ -491,9 +462,7 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
    element, since it handles the bookkeeping so nicely for us.  */
 
 bfd *
-_bfd_get_elt_at_filepos (archive, filepos)
-     bfd *archive;
-     file_ptr filepos;
+_bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
 {
   struct areltdata *new_areldata;
   bfd *n_nfd;
@@ -505,26 +474,26 @@ _bfd_get_elt_at_filepos (archive, filepos)
   if (0 > bfd_seek (archive, filepos, SEEK_SET))
     return NULL;
 
-  if ((new_areldata = (struct areltdata *) _bfd_read_ar_hdr (archive)) == NULL)
+  if ((new_areldata = _bfd_read_ar_hdr (archive)) == NULL)
     return NULL;
 
   n_nfd = _bfd_create_empty_archive_element_shell (archive);
   if (n_nfd == NULL)
     {
-      bfd_release (archive, (PTR) new_areldata);
+      bfd_release (archive, new_areldata);
       return NULL;
     }
 
   n_nfd->origin = bfd_tell (archive);
-  n_nfd->arelt_data = (PTR) new_areldata;
+  n_nfd->arelt_data = new_areldata;
   n_nfd->filename = new_areldata->filename;
 
   if (_bfd_add_bfd_to_archive_cache (archive, filepos, n_nfd))
     return n_nfd;
 
   /* Huh?  */
-  bfd_release (archive, (PTR) n_nfd);
-  bfd_release (archive, (PTR) new_areldata);
+  bfd_release (archive, n_nfd);
+  bfd_release (archive, new_areldata);
   return NULL;
 }
 
@@ -532,9 +501,7 @@ _bfd_get_elt_at_filepos (archive, filepos)
    INDEX.  INDEX should have been returned by bfd_get_next_mapent.  */
 
 bfd *
-_bfd_generic_get_elt_at_index (abfd, index)
-     bfd *abfd;
-     symindex index;
+_bfd_generic_get_elt_at_index (bfd *abfd, symindex index)
 {
   carsym *entry;
 
@@ -547,7 +514,7 @@ FUNCTION
        bfd_openr_next_archived_file
 
 SYNOPSIS
-       bfd *bfd_openr_next_archived_file(bfd *archive, bfd *previous);
+       bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
 
 DESCRIPTION
        Provided a BFD, @var{archive}, containing an archive and NULL, open
@@ -559,9 +526,7 @@ DESCRIPTION
 */
 
 bfd *
-bfd_openr_next_archived_file (archive, last_file)
-     bfd *archive;
-     bfd *last_file;
+bfd_openr_next_archived_file (bfd *archive, bfd *last_file)
 {
   if ((bfd_get_format (archive) != bfd_archive) ||
       (archive->direction == write_direction))
@@ -571,15 +536,11 @@ bfd_openr_next_archived_file (archive, last_file)
     }
 
   return BFD_SEND (archive,
-                  openr_next_archived_file,
-                  (archive,
-                   last_file));
+                  openr_next_archived_file, (archive, last_file));
 }
 
 bfd *
-bfd_generic_openr_next_archived_file (archive, last_file)
-     bfd *archive;
-     bfd *last_file;
+bfd_generic_openr_next_archived_file (bfd *archive, bfd *last_file)
 {
   file_ptr filestart;
 
@@ -599,14 +560,13 @@ bfd_generic_openr_next_archived_file (archive, last_file)
 }
 
 const bfd_target *
-bfd_generic_archive_p (abfd)
-     bfd *abfd;
+bfd_generic_archive_p (bfd *abfd)
 {
   struct artdata *tdata_hold;
   char armag[SARMAG + 1];
   bfd_size_type amt;
 
-  if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG)
+  if (bfd_bread (armag, SARMAG, abfd) != SARMAG)
     {
       if (bfd_get_error () != bfd_error_system_call)
        bfd_set_error (bfd_error_wrong_format);
@@ -625,7 +585,7 @@ bfd_generic_archive_p (abfd)
   tdata_hold = bfd_ardata (abfd);
 
   amt = sizeof (struct artdata);
-  bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt);
+  bfd_ardata (abfd) = bfd_zalloc (abfd, amt);
   if (bfd_ardata (abfd) == NULL)
     {
       bfd_ardata (abfd) = tdata_hold;
@@ -664,7 +624,7 @@ bfd_generic_archive_p (abfd)
         normal archive, regardless of the format of the object files.
         We do accept an empty archive.  */
 
-      first = bfd_openr_next_archived_file (abfd, (bfd *) NULL);
+      first = bfd_openr_next_archived_file (abfd, NULL);
       if (first != NULL)
        {
          bfd_boolean fail;
@@ -679,7 +639,7 @@ bfd_generic_archive_p (abfd)
                 we have no way to remove it from the archive cache.
                 It's close to impossible to figure out when we can
                 release bfd_ardata.  FIXME.  */
-             (void) bfd_close (first);
+             bfd_close (first);
              bfd_release (abfd, bfd_ardata (abfd));
 #endif
              bfd_set_error (bfd_error_wrong_object_format);
@@ -713,8 +673,7 @@ bfd_generic_archive_p (abfd)
 /* Returns FALSE on error, TRUE otherwise */
 
 static bfd_boolean
-do_slurp_bsd_armap (abfd)
-     bfd *abfd;
+do_slurp_bsd_armap (bfd *abfd)
 {
   struct areltdata *mapdata;
   unsigned int counter;
@@ -724,22 +683,22 @@ do_slurp_bsd_armap (abfd)
   bfd_size_type parsed_size, amt;
   carsym *set;
 
-  mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
+  mapdata = _bfd_read_ar_hdr (abfd);
   if (mapdata == NULL)
     return FALSE;
   parsed_size = mapdata->parsed_size;
-  bfd_release (abfd, (PTR) mapdata);   /* Don't need it any more.  */
+  bfd_release (abfd, mapdata); /* Don't need it any more.  */
 
-  raw_armap = (bfd_byte *) bfd_zalloc (abfd, parsed_size);
-  if (raw_armap == (bfd_byte *) NULL)
+  raw_armap = bfd_zalloc (abfd, parsed_size);
+  if (raw_armap == NULL)
     return FALSE;
 
-  if (bfd_bread ((PTR) raw_armap, parsed_size, abfd) != parsed_size)
+  if (bfd_bread (raw_armap, parsed_size, abfd) != parsed_size)
     {
       if (bfd_get_error () != bfd_error_system_call)
        bfd_set_error (bfd_error_malformed_archive);
     byebye:
-      bfd_release (abfd, (PTR) raw_armap);
+      bfd_release (abfd, raw_armap);
       return FALSE;
     }
 
@@ -758,8 +717,8 @@ do_slurp_bsd_armap (abfd)
   stringbase = ((char *) rbase
                + ardata->symdef_count * BSD_SYMDEF_SIZE
                + BSD_STRING_COUNT_SIZE);
-  amt = (bfd_size_type) ardata->symdef_count * sizeof (carsym);
-  ardata->symdefs = (carsym *) bfd_alloc (abfd, amt);
+  amt = ardata->symdef_count * sizeof (carsym);
+  ardata->symdefs = bfd_alloc (abfd, amt);
   if (!ardata->symdefs)
     return FALSE;
 
@@ -784,8 +743,7 @@ do_slurp_bsd_armap (abfd)
 /* Returns FALSE on error, TRUE otherwise.  */
 
 static bfd_boolean
-do_slurp_coff_armap (abfd)
-     bfd *abfd;
+do_slurp_coff_armap (bfd *abfd)
 {
   struct areltdata *mapdata;
   int *raw_armap, *rawptr;
@@ -795,18 +753,18 @@ do_slurp_coff_armap (abfd)
   unsigned int parsed_size;
   carsym *carsyms;
   bfd_size_type nsymz;         /* Number of symbols in armap.  */
-  bfd_vma (*swap) PARAMS ((const bfd_byte *));
+  bfd_vma (*swap) (const bfd_byte *);
   char int_buf[sizeof (long)];
   bfd_size_type carsym_size, ptrsize;
   unsigned int i;
 
-  mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
+  mapdata = _bfd_read_ar_hdr (abfd);
   if (mapdata == NULL)
     return FALSE;
   parsed_size = mapdata->parsed_size;
-  bfd_release (abfd, (PTR) mapdata);   /* Don't need it any more.  */
+  bfd_release (abfd, mapdata); /* Don't need it any more.  */
 
-  if (bfd_bread ((PTR) int_buf, (bfd_size_type) 4, abfd) != 4)
+  if (bfd_bread (int_buf, 4, abfd) != 4)
     {
       if (bfd_get_error () != bfd_error_system_call)
        bfd_set_error (bfd_error_malformed_archive);
@@ -815,7 +773,7 @@ do_slurp_coff_armap (abfd)
   /* It seems that all numeric information in a coff archive is always
      in big endian format, nomatter the host or target.  */
   swap = bfd_getb32;
-  nsymz = bfd_getb32 ((PTR) int_buf);
+  nsymz = bfd_getb32 (int_buf);
   stringsize = parsed_size - (4 * nsymz) - 4;
 
 #if 1
@@ -829,7 +787,7 @@ do_slurp_coff_armap (abfd)
       && bfd_get_flavour (abfd) == bfd_target_coff_flavour)
     {
       /* This looks dangerous, let's do it the other way around.  */
-      nsymz = bfd_getl32 ((PTR) int_buf);
+      nsymz = bfd_getl32 (int_buf);
       stringsize = parsed_size - (4 * nsymz) - 4;
       swap = bfd_getl32;
     }
@@ -841,18 +799,18 @@ do_slurp_coff_armap (abfd)
   carsym_size = (nsymz * sizeof (carsym));
   ptrsize = (4 * nsymz);
 
-  ardata->symdefs = (carsym *) bfd_zalloc (abfd, carsym_size + stringsize + 1);
+  ardata->symdefs = bfd_zalloc (abfd, carsym_size + stringsize + 1);
   if (ardata->symdefs == NULL)
     return FALSE;
   carsyms = ardata->symdefs;
   stringbase = ((char *) ardata->symdefs) + carsym_size;
 
   /* Allocate and read in the raw offsets.  */
-  raw_armap = (int *) bfd_alloc (abfd, ptrsize);
+  raw_armap = bfd_alloc (abfd, ptrsize);
   if (raw_armap == NULL)
     goto release_symdefs;
-  if (bfd_bread ((PTR) raw_armap, ptrsize, abfd) != ptrsize
-      || (bfd_bread ((PTR) stringbase, stringsize, abfd) != stringsize))
+  if (bfd_bread (raw_armap, ptrsize, abfd) != ptrsize
+      || (bfd_bread (stringbase, stringsize, abfd) != stringsize))
     {
       if (bfd_get_error () != bfd_error_system_call)
        bfd_set_error (bfd_error_malformed_archive);
@@ -863,7 +821,7 @@ do_slurp_coff_armap (abfd)
   for (i = 0; i < nsymz; i++)
     {
       rawptr = raw_armap + i;
-      carsyms->file_offset = swap ((PTR) rawptr);
+      carsyms->file_offset = swap ((bfd_byte *) rawptr);
       carsyms->name = stringbase;
       stringbase += strlen (stringbase) + 1;
       carsyms++;
@@ -876,14 +834,14 @@ do_slurp_coff_armap (abfd)
   ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
 
   bfd_has_map (abfd) = TRUE;
-  bfd_release (abfd, (PTR) raw_armap);
+  bfd_release (abfd, raw_armap);
 
   /* Check for a second archive header (as used by PE).  */
   {
     struct areltdata *tmp;
 
     bfd_seek (abfd, ardata->first_file_filepos, SEEK_SET);
-    tmp = (struct areltdata *) _bfd_read_ar_hdr (abfd);
+    tmp = _bfd_read_ar_hdr (abfd);
     if (tmp != NULL)
       {
        if (tmp->arch_header[0] == '/'
@@ -899,9 +857,9 @@ do_slurp_coff_armap (abfd)
   return TRUE;
 
 release_raw_armap:
-  bfd_release (abfd, (PTR) raw_armap);
+  bfd_release (abfd, raw_armap);
 release_symdefs:
-  bfd_release (abfd, (PTR) (ardata)->symdefs);
+  bfd_release (abfd, (ardata)->symdefs);
   return FALSE;
 }
 
@@ -909,11 +867,10 @@ release_symdefs:
    Returns FALSE on error, TRUE otherwise */
 
 bfd_boolean
-bfd_slurp_armap (abfd)
-     bfd *abfd;
+bfd_slurp_armap (bfd *abfd)
 {
   char nextname[17];
-  int i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
+  int i = bfd_bread (nextname, 16, abfd);
 
   if (i == 0)
     return TRUE;
@@ -932,6 +889,7 @@ bfd_slurp_armap (abfd)
     {
       /* 64bit ELF (Irix 6) archive.  */
 #ifdef BFD64
+      extern bfd_boolean bfd_elf64_archive_slurp_armap (bfd *);
       return bfd_elf64_archive_slurp_armap (abfd);
 #else
       bfd_set_error (bfd_error_wrong_format);
@@ -951,8 +909,7 @@ bfd_slurp_armap (abfd)
 #define HPUX_SYMDEF_COUNT_SIZE 2
 
 bfd_boolean
-bfd_slurp_bsd_armap_f2 (abfd)
-     bfd *abfd;
+bfd_slurp_bsd_armap_f2 (bfd *abfd)
 {
   struct areltdata *mapdata;
   char nextname[17];
@@ -963,7 +920,7 @@ bfd_slurp_bsd_armap_f2 (abfd)
   unsigned int stringsize;
   bfd_size_type amt;
   carsym *set;
-  int i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
+  int i = bfd_bread (nextname, 16, abfd);
 
   if (i == 0)
     return TRUE;
@@ -984,29 +941,29 @@ bfd_slurp_bsd_armap_f2 (abfd)
       return TRUE;
     }
 
-  mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
+  mapdata = _bfd_read_ar_hdr (abfd);
   if (mapdata == NULL)
     return FALSE;
 
   amt = mapdata->parsed_size;
-  raw_armap = (bfd_byte *) bfd_zalloc (abfd, amt);
+  raw_armap = bfd_zalloc (abfd, amt);
   if (raw_armap == NULL)
     {
     byebye:
-      bfd_release (abfd, (PTR) mapdata);
+      bfd_release (abfd, mapdata);
       return FALSE;
     }
 
-  if (bfd_bread ((PTR) raw_armap, amt, abfd) != amt)
+  if (bfd_bread (raw_armap, amt, abfd) != amt)
     {
       if (bfd_get_error () != bfd_error_system_call)
        bfd_set_error (bfd_error_malformed_archive);
     byebyebye:
-      bfd_release (abfd, (PTR) raw_armap);
+      bfd_release (abfd, raw_armap);
       goto byebye;
     }
 
-  ardata->symdef_count = H_GET_16 (abfd, (PTR) raw_armap);
+  ardata->symdef_count = H_GET_16 (abfd, raw_armap);
 
   if (ardata->symdef_count * BSD_SYMDEF_SIZE
       > mapdata->parsed_size - HPUX_SYMDEF_COUNT_SIZE)
@@ -1024,8 +981,8 @@ bfd_slurp_bsd_armap_f2 (abfd)
                + HPUX_SYMDEF_COUNT_SIZE
                + BSD_STRING_COUNT_SIZE);
   rbase = (bfd_byte *) stringbase + stringsize;
-  amt = (bfd_size_type) ardata->symdef_count * BSD_SYMDEF_SIZE;
-  ardata->symdefs = (carsym *) bfd_alloc (abfd, amt);
+  amt = ardata->symdef_count * BSD_SYMDEF_SIZE;
+  ardata->symdefs = bfd_alloc (abfd, amt);
   if (!ardata->symdefs)
     return FALSE;
 
@@ -1060,8 +1017,7 @@ bfd_slurp_bsd_armap_f2 (abfd)
 /* Returns FALSE on error, TRUE otherwise.  */
 
 bfd_boolean
-_bfd_slurp_extended_name_table (abfd)
-     bfd *abfd;
+_bfd_slurp_extended_name_table (bfd *abfd)
 {
   char nextname[17];
   struct areltdata *namedata;
@@ -1070,7 +1026,7 @@ _bfd_slurp_extended_name_table (abfd)
   /* FIXME:  Formatting sucks here, and in case of failure of BFD_READ,
      we probably don't want to return TRUE.  */
   bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET);
-  if (bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd) == 16)
+  if (bfd_bread (nextname, 16, abfd) == 16)
     {
       if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
        return FALSE;
@@ -1082,7 +1038,7 @@ _bfd_slurp_extended_name_table (abfd)
          return TRUE;
        }
 
-      namedata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
+      namedata = _bfd_read_ar_hdr (abfd);
       if (namedata == NULL)
        return FALSE;
 
@@ -1091,15 +1047,15 @@ _bfd_slurp_extended_name_table (abfd)
       if (bfd_ardata (abfd)->extended_names == NULL)
        {
        byebye:
-         bfd_release (abfd, (PTR) namedata);
+         bfd_release (abfd, namedata);
          return FALSE;
        }
 
-      if (bfd_bread ((PTR) bfd_ardata (abfd)->extended_names, amt, abfd) != amt)
+      if (bfd_bread (bfd_ardata (abfd)->extended_names, amt, abfd) != amt)
        {
          if (bfd_get_error () != bfd_error_system_call)
            bfd_set_error (bfd_error_malformed_archive);
-         bfd_release (abfd, (PTR) (bfd_ardata (abfd)->extended_names));
+         bfd_release (abfd, (bfd_ardata (abfd)->extended_names));
          bfd_ardata (abfd)->extended_names = NULL;
          goto byebye;
        }
@@ -1141,9 +1097,7 @@ _bfd_slurp_extended_name_table (abfd)
    semicolon.  */
 
 static const char *
-normalize (abfd, file)
-     bfd *abfd;
-     const char *file;
+normalize (bfd *abfd, const char *file)
 {
   const char *first;
   const char *last;
@@ -1164,7 +1118,7 @@ normalize (abfd, file)
       first--;
     }
 
-  copy = (char *) bfd_alloc (abfd, (bfd_size_type) (last - first + 1));
+  copy = bfd_alloc (abfd, last - first + 1);
   if (copy == NULL)
     return NULL;
 
@@ -1176,9 +1130,7 @@ normalize (abfd, file)
 
 #else
 static const char *
-normalize (abfd, file)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     const char *file;
+normalize (bfd *abfd ATTRIBUTE_UNUSED, const char *file)
 {
   const char *filename = strrchr (file, '/');
 
@@ -1192,7 +1144,7 @@ normalize (abfd, file)
       filename = file + 1;
   }
 #endif
-  if (filename != (char *) NULL)
+  if (filename != NULL)
     filename++;
   else
     filename = file;
@@ -1203,11 +1155,10 @@ normalize (abfd, file)
 /* Build a BFD style extended name table.  */
 
 bfd_boolean
-_bfd_archive_bsd_construct_extended_name_table (abfd, tabloc, tablen, name)
-     bfd *abfd;
-     char **tabloc;
-     bfd_size_type *tablen;
-     const char **name;
+_bfd_archive_bsd_construct_extended_name_table (bfd *abfd,
+                                               char **tabloc,
+                                               bfd_size_type *tablen,
+                                               const char **name)
 {
   *name = "ARFILENAMES/";
   return _bfd_construct_extended_name_table (abfd, FALSE, tabloc, tablen);
@@ -1216,11 +1167,10 @@ _bfd_archive_bsd_construct_extended_name_table (abfd, tabloc, tablen, name)
 /* Build an SVR4 style extended name table.  */
 
 bfd_boolean
-_bfd_archive_coff_construct_extended_name_table (abfd, tabloc, tablen, name)
-     bfd *abfd;
-     char **tabloc;
-     bfd_size_type *tablen;
-     const char **name;
+_bfd_archive_coff_construct_extended_name_table (bfd *abfd,
+                                                char **tabloc,
+                                                bfd_size_type *tablen,
+                                                const char **name)
 {
   *name = "//";
   return _bfd_construct_extended_name_table (abfd, TRUE, tabloc, tablen);
@@ -1235,11 +1185,10 @@ _bfd_archive_coff_construct_extended_name_table (abfd, tabloc, tablen, name)
    zero-length tablen!  */
 
 bfd_boolean
-_bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
-     bfd *abfd;
-     bfd_boolean trailing_slash;
-     char **tabloc;
-     bfd_size_type *tablen;
+_bfd_construct_extended_name_table (bfd *abfd,
+                                   bfd_boolean trailing_slash,
+                                   char **tabloc,
+                                   bfd_size_type *tablen)
 {
   unsigned int maxname = abfd->xvec->ar_max_namelen;
   bfd_size_type total_namelen = 0;
@@ -1353,9 +1302,7 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
 /* Function to encode large UID/GID values according to HP.  */
 
 static void
-hpux_uid_gid_encode (str, id)
-     char str[6];
-     long int id;
+hpux_uid_gid_encode (char str[6], long int id)
 {
   int cnt;
 
@@ -1381,10 +1328,7 @@ hpux_uid_gid_encode (str, id)
    is set, and it's an in-memory bfd, we fake it.  */
 
 static struct areltdata *
-bfd_ar_hdr_from_filesystem (abfd, filename, member)
-     bfd *abfd;
-     const char *filename;
-     bfd *member;
+bfd_ar_hdr_from_filesystem (bfd *abfd, const char *filename, bfd *member)
 {
   struct stat status;
   struct areltdata *ared;
@@ -1395,7 +1339,7 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member)
   if (member && (member->flags & BFD_IN_MEMORY) != 0)
     {
       /* Assume we just "made" the member, and fake it.  */
-      struct bfd_in_memory *bim = (struct bfd_in_memory *) member->iostream;
+      struct bfd_in_memory *bim = member->iostream;
       time (&status.st_mtime);
       status.st_uid = getuid ();
       status.st_gid = getgid ();
@@ -1409,13 +1353,13 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member)
     }
 
   amt = sizeof (struct ar_hdr) + sizeof (struct areltdata);
-  ared = (struct areltdata *) bfd_zalloc (abfd, amt);
+  ared = bfd_zalloc (abfd, amt);
   if (ared == NULL)
     return NULL;
   hdr = (struct ar_hdr *) (((char *) ared) + sizeof (struct areltdata));
 
   /* ar headers are space padded, not null padded!  */
-  memset ((PTR) hdr, ' ', sizeof (struct ar_hdr));
+  memset (hdr, ' ', sizeof (struct ar_hdr));
 
   strncpy (hdr->ar_fmag, ARFMAG, 2);
 
@@ -1461,13 +1405,10 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member)
    a strong stomach to write this, and it does, but it takes even a
    stronger stomach to try to code around such a thing!  */
 
-struct ar_hdr *bfd_special_undocumented_glue
-  PARAMS ((bfd *, const char *));
+struct ar_hdr *bfd_special_undocumented_glue (bfd *, const char *);
 
 struct ar_hdr *
-bfd_special_undocumented_glue (abfd, filename)
-     bfd *abfd;
-     const char *filename;
+bfd_special_undocumented_glue (bfd *abfd, const char *filename)
 {
   struct areltdata *ar_elt = bfd_ar_hdr_from_filesystem (abfd, filename, 0);
   if (ar_elt == NULL)
@@ -1478,9 +1419,7 @@ bfd_special_undocumented_glue (abfd, filename)
 /* Analogous to stat call.  */
 
 int
-bfd_generic_stat_arch_elt (abfd, buf)
-     bfd *abfd;
-     struct stat *buf;
+bfd_generic_stat_arch_elt (bfd *abfd, struct stat *buf)
 {
   struct ar_hdr *hdr;
   char *aloser;
@@ -1535,10 +1474,7 @@ bfd_generic_stat_arch_elt (abfd, buf)
 }
 
 void
-bfd_dont_truncate_arname (abfd, pathname, arhdr)
-     bfd *abfd;
-     const char *pathname;
-     char *arhdr;
+bfd_dont_truncate_arname (bfd *abfd, const char *pathname, char *arhdr)
 {
   /* FIXME: This interacts unpleasantly with ar's quick-append option.
      Fortunately ic960 users will never use that option.  Fixing this
@@ -1575,10 +1511,7 @@ bfd_dont_truncate_arname (abfd, pathname, arhdr)
 }
 
 void
-bfd_bsd_truncate_arname (abfd, pathname, arhdr)
-     bfd *abfd;
-     const char *pathname;
-     char *arhdr;
+bfd_bsd_truncate_arname (bfd *abfd, const char *pathname, char *arhdr)
 {
   struct ar_hdr *hdr = (struct ar_hdr *) arhdr;
   size_t length;
@@ -1626,10 +1559,7 @@ bfd_bsd_truncate_arname (abfd, pathname, arhdr)
    bsd ar.  */
 
 void
-bfd_gnu_truncate_arname (abfd, pathname, arhdr)
-     bfd *abfd;
-     const char *pathname;
-     char *arhdr;
+bfd_gnu_truncate_arname (bfd *abfd, const char *pathname, char *arhdr)
 {
   struct ar_hdr *hdr = (struct ar_hdr *) arhdr;
   size_t length;
@@ -1674,8 +1604,7 @@ bfd_gnu_truncate_arname (abfd, pathname, arhdr)
 /* The BFD is open for write and has its format set to bfd_archive.  */
 
 bfd_boolean
-_bfd_write_archive_contents (arch)
-     bfd *arch;
+_bfd_write_archive_contents (bfd *arch)
 {
   bfd *current;
   char *etable = NULL;
@@ -1706,14 +1635,13 @@ _bfd_write_archive_contents (arch)
       if (!current->arelt_data)
        {
          current->arelt_data =
-           (PTR) bfd_ar_hdr_from_filesystem (arch, current->filename, current);
+           bfd_ar_hdr_from_filesystem (arch, current->filename, current);
          if (!current->arelt_data)
            return FALSE;
 
          /* Put in the file name.  */
-         BFD_SEND (arch, _bfd_truncate_arname, (arch,
-                                                current->filename,
-                                             (char *) arch_hdr (current)));
+         BFD_SEND (arch, _bfd_truncate_arname,
+                   (arch, current->filename, (char *) arch_hdr (current)));
        }
 
       if (makemap && ! hasobjects)
@@ -1734,9 +1662,9 @@ _bfd_write_archive_contents (arch)
   if (bfd_seek (arch, (file_ptr) 0, SEEK_SET) != 0)
     return FALSE;
 #ifdef GNU960
-  wrote = bfd_bwrite (BFD_GNU960_ARMAG (arch), (bfd_size_type) SARMAG, arch);
+  wrote = bfd_bwrite (BFD_GNU960_ARMAG (arch), SARMAG, arch);
 #else
-  wrote = bfd_bwrite (ARMAG, (bfd_size_type) SARMAG, arch);
+  wrote = bfd_bwrite (ARMAG, SARMAG, arch);
 #endif
   if (wrote != SARMAG)
     return FALSE;
@@ -1751,7 +1679,7 @@ _bfd_write_archive_contents (arch)
     {
       struct ar_hdr hdr;
 
-      memset ((char *) (&hdr), 0, sizeof (struct ar_hdr));
+      memset (&hdr, 0, sizeof (struct ar_hdr));
       strcpy (hdr.ar_name, ename);
       /* Round size up to even number in archive header.  */
       sprintf (&(hdr.ar_size[0]), "%-10d",
@@ -1760,13 +1688,13 @@ _bfd_write_archive_contents (arch)
       for (i = 0; i < sizeof (struct ar_hdr); i++)
        if (((char *) (&hdr))[i] == '\0')
          (((char *) (&hdr))[i]) = ' ';
-      if ((bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
+      if ((bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
           != sizeof (struct ar_hdr))
          || bfd_bwrite (etable, elength, arch) != elength)
        return FALSE;
       if ((elength % 2) == 1)
        {
-         if (bfd_bwrite ("\012", (bfd_size_type) 1, arch) != 1)
+         if (bfd_bwrite ("\012", 1, arch) != 1)
            return FALSE;
        }
     }
@@ -1778,7 +1706,7 @@ _bfd_write_archive_contents (arch)
       struct ar_hdr *hdr = arch_hdr (current);
 
       /* Write ar header.  */
-      if (bfd_bwrite ((PTR) hdr, (bfd_size_type) sizeof (*hdr), arch)
+      if (bfd_bwrite (hdr, sizeof (*hdr), arch)
          != sizeof (*hdr))
        return FALSE;
       if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
@@ -1789,19 +1717,19 @@ _bfd_write_archive_contents (arch)
          if (amt > remaining)
            amt = remaining;
          errno = 0;
-         if (bfd_bread (buffer, (bfd_size_type) amt, current) != amt)
+         if (bfd_bread (buffer, amt, current) != amt)
            {
              if (bfd_get_error () != bfd_error_system_call)
                bfd_set_error (bfd_error_malformed_archive);
              return FALSE;
            }
-         if (bfd_bwrite (buffer, (bfd_size_type) amt, arch) != amt)
+         if (bfd_bwrite (buffer, amt, arch) != amt)
            return FALSE;
          remaining -= amt;
        }
       if ((arelt_size (current) % 2) == 1)
        {
-         if (bfd_bwrite ("\012", (bfd_size_type) 1, arch) != 1)
+         if (bfd_bwrite ("\012", 1, arch) != 1)
            return FALSE;
        }
     }
@@ -1831,9 +1759,7 @@ _bfd_write_archive_contents (arch)
 /* Note that the namidx for the first symbol is 0.  */
 
 bfd_boolean
-_bfd_compute_and_write_armap (arch, elength)
-     bfd *arch;
-     unsigned int elength;
+_bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
 {
   char *first_name = NULL;
   bfd *current;
@@ -1852,14 +1778,14 @@ _bfd_compute_and_write_armap (arch, elength)
     elength += sizeof (struct ar_hdr);
   elength += elength % 2;
 
-  amt = (bfd_size_type) orl_max * sizeof (struct orl);
-  map = (struct orl *) bfd_malloc (amt);
+  amt = orl_max * sizeof (struct orl);
+  map = bfd_malloc (amt);
   if (map == NULL)
     goto error_return;
 
   /* We put the symbol names on the arch objalloc, and then discard
      them when done.  */
-  first_name = bfd_alloc (arch, (bfd_size_type) 1);
+  first_name = bfd_alloc (arch, 1);
   if (first_name == NULL)
     goto error_return;
 
@@ -1870,7 +1796,7 @@ _bfd_compute_and_write_armap (arch, elength)
 
   /* Map over each element.  */
   for (current = arch->archive_head;
-       current != (bfd *) NULL;
+       current != NULL;
        current = current->next, elt_no++)
     {
       if (bfd_check_format (current, bfd_object)
@@ -1891,7 +1817,7 @@ _bfd_compute_and_write_armap (arch, elength)
                  if (syms_max > 0)
                    free (syms);
                  syms_max = storage;
-                 syms = (asymbol **) bfd_malloc ((bfd_size_type) syms_max);
+                 syms = bfd_malloc (syms_max);
                  if (syms == NULL)
                    goto error_return;
                }
@@ -1919,9 +1845,9 @@ _bfd_compute_and_write_armap (arch, elength)
                      if (orl_count == orl_max)
                        {
                          orl_max *= 2;
-                         amt = (bfd_size_type) orl_max * sizeof (struct orl);
-                         new_map = (struct orl *) bfd_realloc (map, amt);
-                         if (new_map == (struct orl *) NULL)
+                         amt = orl_max * sizeof (struct orl);
+                         new_map = bfd_realloc (map, amt);
+                         if (new_map == NULL)
                            goto error_return;
 
                          map = new_map;
@@ -1929,7 +1855,7 @@ _bfd_compute_and_write_armap (arch, elength)
 
                      namelen = strlen (syms[src_count]->name);
                      amt = sizeof (char *);
-                     map[orl_count].name = (char **) bfd_alloc (arch, amt);
+                     map[orl_count].name = bfd_alloc (arch, amt);
                      if (map[orl_count].name == NULL)
                        goto error_return;
                      *(map[orl_count].name) = bfd_alloc (arch, namelen + 1);
@@ -1977,12 +1903,11 @@ _bfd_compute_and_write_armap (arch, elength)
 }
 
 bfd_boolean
-bsd_write_armap (arch, elength, map, orl_count, stridx)
-     bfd *arch;
-     unsigned int elength;
-     struct orl *map;
-     unsigned int orl_count;
-     int stridx;
+bsd_write_armap (bfd *arch,
+                unsigned int elength,
+                struct orl *map,
+                unsigned int orl_count,
+                int stridx)
 {
   int padit = stridx & 1;
   unsigned int ranlibsize = orl_count * BSD_SYMDEF_SIZE;
@@ -2001,7 +1926,7 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
   firstreal = mapsize + elength + sizeof (struct ar_hdr) + SARMAG;
 
   stat (arch->filename, &statbuf);
-  memset ((char *) (&hdr), 0, sizeof (struct ar_hdr));
+  memset (&hdr, 0, sizeof (struct ar_hdr));
   sprintf (hdr.ar_name, RANLIBMAG);
   /* Remember the timestamp, to keep it holy.  But fudge it a little.  */
   bfd_ardata (arch)->armap_timestamp = statbuf.st_mtime + ARMAP_TIME_OFFSET;
@@ -2015,11 +1940,11 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
   for (i = 0; i < sizeof (struct ar_hdr); i++)
     if (((char *) (&hdr))[i] == '\0')
       (((char *) (&hdr))[i]) = ' ';
-  if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
+  if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
       != sizeof (struct ar_hdr))
     return FALSE;
   H_PUT_32 (arch, ranlibsize, temp);
-  if (bfd_bwrite (temp, (bfd_size_type) sizeof (temp), arch) != sizeof (temp))
+  if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp))
     return FALSE;
 
   for (count = 0; count < orl_count; count++)
@@ -2040,20 +1965,20 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
       last_elt = current;
       H_PUT_32 (arch, map[count].namidx, buf);
       H_PUT_32 (arch, firstreal, buf + BSD_SYMDEF_OFFSET_SIZE);
-      if (bfd_bwrite (buf, (bfd_size_type) BSD_SYMDEF_SIZE, arch)
+      if (bfd_bwrite (buf, BSD_SYMDEF_SIZE, arch)
          != BSD_SYMDEF_SIZE)
        return FALSE;
     }
 
   /* Now write the strings themselves.  */
   H_PUT_32 (arch, stringsize, temp);
-  if (bfd_bwrite (temp, (bfd_size_type) sizeof (temp), arch) != sizeof (temp))
+  if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp))
     return FALSE;
   for (count = 0; count < orl_count; count++)
     {
       size_t len = strlen (*map[count].name) + 1;
 
-      if (bfd_bwrite (*map[count].name, (bfd_size_type) len, arch) != len)
+      if (bfd_bwrite (*map[count].name, len, arch) != len)
        return FALSE;
     }
 
@@ -2061,7 +1986,7 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
      bug-compatible for sun's ar we use a null.  */
   if (padit)
     {
-      if (bfd_bwrite ("", (bfd_size_type) 1, arch) != 1)
+      if (bfd_bwrite ("", 1, arch) != 1)
        return FALSE;
     }
 
@@ -2075,8 +2000,7 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
    Return FALSE if we updated the timestamp.  */
 
 bfd_boolean
-_bfd_archive_bsd_update_armap_timestamp (arch)
-     bfd *arch;
+_bfd_archive_bsd_update_armap_timestamp (bfd *arch)
 {
   struct stat archstat;
   struct ar_hdr hdr;
@@ -2110,7 +2034,7 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
   bfd_ardata (arch)->armap_datepos = (SARMAG
                                      + offsetof (struct ar_hdr, ar_date[0]));
   if (bfd_seek (arch, bfd_ardata (arch)->armap_datepos, SEEK_SET) != 0
-      || (bfd_bwrite (hdr.ar_date, (bfd_size_type) sizeof (hdr.ar_date), arch)
+      || (bfd_bwrite (hdr.ar_date, sizeof (hdr.ar_date), arch)
          != sizeof (hdr.ar_date)))
     {
       bfd_perror (_("Writing updated armap timestamp"));
@@ -2138,12 +2062,11 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
 */
 
 bfd_boolean
-coff_write_armap (arch, elength, map, symbol_count, stridx)
-     bfd *arch;
-     unsigned int elength;
-     struct orl *map;
-     unsigned int symbol_count;
-     int stridx;
+coff_write_armap (bfd *arch,
+                 unsigned int elength,
+                 struct orl *map,
+                 unsigned int symbol_count,
+                 int stridx)
 {
   /* The size of the ranlib is the number of exported symbols in the
      archive * the number of bytes in an int, + an int for the count.  */
@@ -2166,7 +2089,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
                             + sizeof (struct ar_hdr)
                             + SARMAG);
 
-  memset ((char *) (&hdr), 0, sizeof (struct ar_hdr));
+  memset (&hdr, 0, sizeof (struct ar_hdr));
   hdr.ar_name[0] = '/';
   sprintf (hdr.ar_size, "%-10d", (int) mapsize);
   sprintf (hdr.ar_date, "%ld", (long) time (NULL));
@@ -2182,7 +2105,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
 
   /* Write the ar header for this item and the number of symbols.  */
 
-  if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
+  if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
       != sizeof (struct ar_hdr))
     return FALSE;
 
@@ -2197,7 +2120,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
 
   current = arch->archive_head;
   count = 0;
-  while (current != (bfd *) NULL && count < symbol_count)
+  while (current != NULL && count < symbol_count)
     {
       /* For each symbol which is used defined in this object, write
         out the object file's address in the archive.  */
@@ -2209,8 +2132,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
          count++;
        }
       /* Add size of this archive entry.  */
-      archive_member_file_ptr += (arelt_size (current)
-                                 + sizeof (struct ar_hdr));
+      archive_member_file_ptr += arelt_size (current) + sizeof (struct ar_hdr);
       /* Remember aboout the even alignment.  */
       archive_member_file_ptr += archive_member_file_ptr % 2;
       current = current->next;
@@ -2221,7 +2143,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
     {
       size_t len = strlen (*map[count].name) + 1;
 
-      if (bfd_bwrite (*map[count].name, (bfd_size_type) len, arch) != len)
+      if (bfd_bwrite (*map[count].name, len, arch) != len)
        return FALSE;
     }
 
@@ -2229,7 +2151,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
      bug-compatible for arc960 we use a null.  */
   if (padit)
     {
-      if (bfd_bwrite ("", (bfd_size_type) 1, arch) != 1)
+      if (bfd_bwrite ("", 1, arch) != 1)
        return FALSE;
     }
 
index 6267e68b3e218e15b2f5ac24fbeb316457e752fa..1b9f5f3c0f2e12408a12ca94522a25681bad48c1 100644 (file)
@@ -1,5 +1,5 @@
 /* MIPS-specific support for 64-bit ELF
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Ian Lance Taylor, Cygnus Support
    Linker support added by Mark Mitchell, CodeSourcery, LLC.
@@ -31,15 +31,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* Irix 6 defines a 64bit archive map format, so that they can
    have archives more than 4 GB in size.  */
 
-bfd_boolean bfd_elf64_archive_slurp_armap PARAMS ((bfd *));
+bfd_boolean bfd_elf64_archive_slurp_armap (bfd *);
 bfd_boolean bfd_elf64_archive_write_armap
-  PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+  (bfd *, unsigned int, struct orl *, unsigned int, int);
 
 /* Read an Irix 6 armap.  */
 
 bfd_boolean
-bfd_elf64_archive_slurp_armap (abfd)
-     bfd *abfd;
+bfd_elf64_archive_slurp_armap (bfd *abfd)
 {
   struct artdata *ardata = bfd_ardata (abfd);
   char nextname[17];
@@ -56,7 +55,7 @@ bfd_elf64_archive_slurp_armap (abfd)
 
   /* Get the name of the first element.  */
   arhdrpos = bfd_tell (abfd);
-  i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
+  i = bfd_bread (nextname, 16, abfd);
   if (i == 0)
     return TRUE;
   if (i != 16)
@@ -79,9 +78,9 @@ bfd_elf64_archive_slurp_armap (abfd)
   if (mapdata == NULL)
     return FALSE;
   parsed_size = mapdata->parsed_size;
-  bfd_release (abfd, (PTR) mapdata);
+  bfd_release (abfd, mapdata);
 
-  if (bfd_bread (int_buf, (bfd_size_type) 8, abfd) != 8)
+  if (bfd_bread (int_buf, 8, abfd) != 8)
     {
       if (bfd_get_error () != bfd_error_system_call)
        bfd_set_error (bfd_error_malformed_archive);
@@ -95,13 +94,13 @@ bfd_elf64_archive_slurp_armap (abfd)
   ptrsize = 8 * nsymz;
 
   amt = carsym_size + stringsize + 1;
-  ardata->symdefs = (carsym *) bfd_zalloc (abfd, amt);
+  ardata->symdefs = bfd_zalloc (abfd, amt);
   if (ardata->symdefs == NULL)
     return FALSE;
   carsyms = ardata->symdefs;
   stringbase = ((char *) ardata->symdefs) + carsym_size;
 
-  raw_armap = (bfd_byte *) bfd_alloc (abfd, ptrsize);
+  raw_armap = bfd_alloc (abfd, ptrsize);
   if (raw_armap == NULL)
     goto release_symdefs;
 
@@ -144,12 +143,11 @@ release_symdefs:
    linker crashes.  */
 
 bfd_boolean
-bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
-     bfd *arch;
-     unsigned int elength;
-     struct orl *map;
-     unsigned int symbol_count;
-     int stridx;
+bfd_elf64_archive_write_armap (bfd *arch,
+                              unsigned int elength,
+                              struct orl *map,
+                              unsigned int symbol_count,
+                              int stridx)
 {
   unsigned int ranlibsize = (symbol_count * 8) + 8;
   unsigned int stringsize = stridx;
@@ -171,7 +169,7 @@ bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
                             + sizeof (struct ar_hdr)
                             + SARMAG);
 
-  memset ((char *) (&hdr), 0, sizeof (struct ar_hdr));
+  memset (&hdr, 0, sizeof (struct ar_hdr));
   strcpy (hdr.ar_name, "/SYM64/");
   sprintf (hdr.ar_size, "%-10d", (int) mapsize);
   sprintf (hdr.ar_date, "%ld", (long) time (NULL));
@@ -187,12 +185,12 @@ bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
 
   /* Write the ar header for this item and the number of symbols */
 
-  if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
+  if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch)
       != sizeof (struct ar_hdr))
     return FALSE;
 
   bfd_putb64 ((bfd_vma) symbol_count, buf);
-  if (bfd_bwrite (buf, (bfd_size_type) 8, arch) != 8)
+  if (bfd_bwrite (buf, 8, arch) != 8)
     return FALSE;
 
   /* Two passes, first write the file offsets for each symbol -
@@ -203,7 +201,7 @@ bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
 
   current = arch->archive_head;
   count = 0;
-  while (current != (bfd *) NULL && count < symbol_count)
+  while (current != NULL && count < symbol_count)
     {
       /* For each symbol which is used defined in this object, write out
         the object file's address in the archive */
@@ -211,7 +209,7 @@ bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
       while (map[count].u.abfd == current)
        {
          bfd_putb64 ((bfd_vma) archive_member_file_ptr, buf);
-         if (bfd_bwrite (buf, (bfd_size_type) 8, arch) != 8)
+         if (bfd_bwrite (buf, 8, arch) != 8)
            return FALSE;
          count++;
        }
@@ -228,7 +226,7 @@ bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
     {
       size_t len = strlen (*map[count].name) + 1;
 
-      if (bfd_bwrite (*map[count].name, (bfd_size_type) len, arch) != len)
+      if (bfd_bwrite (*map[count].name, len, arch) != len)
        return FALSE;
     }
 
@@ -236,7 +234,7 @@ bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
      However, the Irix 6.2 tools do not appear to do this.  */
   while (padding != 0)
     {
-      if (bfd_bwrite ("", (bfd_size_type) 1, arch) != 1)
+      if (bfd_bwrite ("", 1, arch) != 1)
        return FALSE;
       --padding;
     }
index 6132f155df0f2ef396b59c32924ab4ec72d9f95a..77f6a9e6e132b9fbdb017b943910d951e26c3fb5 100644 (file)
@@ -138,6 +138,7 @@ DESCRIPTION
 .#define bfd_mach_mips5400             5400
 .#define bfd_mach_mips5500             5500
 .#define bfd_mach_mips6000             6000
+.#define bfd_mach_mips7000             7000
 .#define bfd_mach_mips8000             8000
 .#define bfd_mach_mips10000            10000
 .#define bfd_mach_mips12000            12000
@@ -264,6 +265,7 @@ DESCRIPTION
 .  bfd_arch_mn10300,   {* Matsushita MN10300 *}
 .#define bfd_mach_mn10300              300
 .#define bfd_mach_am33         330
+.#define bfd_mach_am33_2       332
 .  bfd_arch_fr30,
 .#define bfd_mach_fr30         0x46523330
 .  bfd_arch_frv,
@@ -342,10 +344,9 @@ DESCRIPTION
 .     all the entries for that arch can be accessed via <<next>>.  *}
 .  bfd_boolean the_default;
 .  const struct bfd_arch_info * (*compatible)
-.      PARAMS ((const struct bfd_arch_info *a,
-.               const struct bfd_arch_info *b));
+.    (const struct bfd_arch_info *a, const struct bfd_arch_info *b);
 .
-.  bfd_boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
+.  bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
 .
 .  const struct bfd_arch_info *next;
 .}
@@ -474,7 +475,7 @@ FUNCTION
        bfd_printable_name
 
 SYNOPSIS
-       const char *bfd_printable_name(bfd *abfd);
+       const char *bfd_printable_name (bfd *abfd);
 
 DESCRIPTION
        Return a printable string representing the architecture and machine
@@ -483,8 +484,7 @@ DESCRIPTION
 */
 
 const char *
-bfd_printable_name (abfd)
-     bfd *abfd;
+bfd_printable_name (bfd *abfd)
 {
   return abfd->arch_info->printable_name;
 }
@@ -494,7 +494,7 @@ FUNCTION
        bfd_scan_arch
 
 SYNOPSIS
-       const bfd_arch_info_type *bfd_scan_arch(const char *string);
+       const bfd_arch_info_type *bfd_scan_arch (const char *string);
 
 DESCRIPTION
        Figure out if BFD supports any cpu which could be described with
@@ -503,8 +503,7 @@ DESCRIPTION
 */
 
 const bfd_arch_info_type *
-bfd_scan_arch (string)
-     const char *string;
+bfd_scan_arch (const char *string)
 {
   const bfd_arch_info_type * const *app, *ap;
 
@@ -526,7 +525,7 @@ FUNCTION
        bfd_arch_list
 
 SYNOPSIS
-       const char **bfd_arch_list(void);
+       const char **bfd_arch_list (void);
 
 DESCRIPTION
        Return a freshly malloced NULL-terminated vector of the names
@@ -534,7 +533,7 @@ DESCRIPTION
 */
 
 const char **
-bfd_arch_list ()
+bfd_arch_list (void)
 {
   int vec_length = 0;
   const char **name_ptr;
@@ -554,7 +553,7 @@ bfd_arch_list ()
     }
 
   amt = (vec_length + 1) * sizeof (char **);
-  name_list = (const char **) bfd_malloc (amt);
+  name_list = bfd_malloc (amt);
   if (name_list == NULL)
     return NULL;
 
@@ -579,10 +578,8 @@ FUNCTION
        bfd_arch_get_compatible
 
 SYNOPSIS
-       const bfd_arch_info_type *bfd_arch_get_compatible(
-               const bfd *abfd,
-               const bfd *bbfd,
-               bfd_boolean accept_unknowns);
+       const bfd_arch_info_type *bfd_arch_get_compatible
+         (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
 
 DESCRIPTION
        Determine whether two BFDs' architectures and machine types
@@ -593,10 +590,9 @@ DESCRIPTION
 */
 
 const bfd_arch_info_type *
-bfd_arch_get_compatible (abfd, bbfd, accept_unknowns)
-     const bfd *abfd;
-     const bfd *bbfd;
-     bfd_boolean accept_unknowns;
+bfd_arch_get_compatible (const bfd *abfd,
+                        const bfd *bbfd,
+                        bfd_boolean accept_unknowns)
 {
   const bfd * ubfd = NULL;
 
@@ -645,16 +641,14 @@ FUNCTION
        bfd_set_arch_info
 
 SYNOPSIS
-       void bfd_set_arch_info(bfd *abfd, const bfd_arch_info_type *arg);
+       void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
 
 DESCRIPTION
        Set the architecture info of @var{abfd} to @var{arg}.
 */
 
 void
-bfd_set_arch_info (abfd, arg)
-     bfd *abfd;
-     const bfd_arch_info_type *arg;
+bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg)
 {
   abfd->arch_info = arg;
 }
@@ -664,9 +658,8 @@ INTERNAL_FUNCTION
        bfd_default_set_arch_mach
 
 SYNOPSIS
-       bfd_boolean bfd_default_set_arch_mach(bfd *abfd,
-               enum bfd_architecture arch,
-               unsigned long mach);
+       bfd_boolean bfd_default_set_arch_mach
+         (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
 
 DESCRIPTION
        Set the architecture and machine type in BFD @var{abfd}
@@ -676,10 +669,9 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_default_set_arch_mach (abfd, arch, mach)
-     bfd *abfd;
-     enum bfd_architecture arch;
-     unsigned long mach;
+bfd_default_set_arch_mach (bfd *abfd,
+                          enum bfd_architecture arch,
+                          unsigned long mach)
 {
   abfd->arch_info = bfd_lookup_arch (arch, mach);
   if (abfd->arch_info != NULL)
@@ -695,7 +687,7 @@ FUNCTION
        bfd_get_arch
 
 SYNOPSIS
-       enum bfd_architecture bfd_get_arch(bfd *abfd);
+       enum bfd_architecture bfd_get_arch (bfd *abfd);
 
 DESCRIPTION
        Return the enumerated type which describes the BFD @var{abfd}'s
@@ -703,8 +695,7 @@ DESCRIPTION
 */
 
 enum bfd_architecture
-bfd_get_arch (abfd)
-     bfd *abfd;
+bfd_get_arch (bfd *abfd)
 {
   return abfd->arch_info->arch;
 }
@@ -714,7 +705,7 @@ FUNCTION
        bfd_get_mach
 
 SYNOPSIS
-       unsigned long bfd_get_mach(bfd *abfd);
+       unsigned long bfd_get_mach (bfd *abfd);
 
 DESCRIPTION
        Return the long type which describes the BFD @var{abfd}'s
@@ -722,8 +713,7 @@ DESCRIPTION
 */
 
 unsigned long
-bfd_get_mach (abfd)
-     bfd *abfd;
+bfd_get_mach (bfd *abfd)
 {
   return abfd->arch_info->mach;
 }
@@ -733,7 +723,7 @@ FUNCTION
        bfd_arch_bits_per_byte
 
 SYNOPSIS
-       unsigned int bfd_arch_bits_per_byte(bfd *abfd);
+       unsigned int bfd_arch_bits_per_byte (bfd *abfd);
 
 DESCRIPTION
        Return the number of bits in one of the BFD @var{abfd}'s
@@ -741,8 +731,7 @@ DESCRIPTION
 */
 
 unsigned int
-bfd_arch_bits_per_byte (abfd)
-     bfd *abfd;
+bfd_arch_bits_per_byte (bfd *abfd)
 {
   return abfd->arch_info->bits_per_byte;
 }
@@ -752,7 +741,7 @@ FUNCTION
        bfd_arch_bits_per_address
 
 SYNOPSIS
-       unsigned int bfd_arch_bits_per_address(bfd *abfd);
+       unsigned int bfd_arch_bits_per_address (bfd *abfd);
 
 DESCRIPTION
        Return the number of bits in one of the BFD @var{abfd}'s
@@ -760,8 +749,7 @@ DESCRIPTION
 */
 
 unsigned int
-bfd_arch_bits_per_address (abfd)
-     bfd *abfd;
+bfd_arch_bits_per_address (bfd *abfd)
 {
   return abfd->arch_info->bits_per_address;
 }
@@ -772,17 +760,15 @@ INTERNAL_FUNCTION
 
 SYNOPSIS
        const bfd_arch_info_type *bfd_default_compatible
-       (const bfd_arch_info_type *a,
-       const bfd_arch_info_type *b);
+         (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
 
 DESCRIPTION
        The default function for testing for compatibility.
 */
 
 const bfd_arch_info_type *
-bfd_default_compatible (a, b)
-     const bfd_arch_info_type *a;
-     const bfd_arch_info_type *b;
+bfd_default_compatible (const bfd_arch_info_type *a,
+                       const bfd_arch_info_type *b)
 {
   if (a->arch != b->arch)
     return NULL;
@@ -804,7 +790,8 @@ INTERNAL_FUNCTION
        bfd_default_scan
 
 SYNOPSIS
-       bfd_boolean bfd_default_scan(const struct bfd_arch_info *info, const char *string);
+       bfd_boolean bfd_default_scan
+         (const struct bfd_arch_info *info, const char *string);
 
 DESCRIPTION
        The default function for working out whether this is an
@@ -812,9 +799,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_default_scan (info, string)
-     const bfd_arch_info_type *info;
-     const char *string;
+bfd_default_scan (const bfd_arch_info_type *info, const char *string)
 {
   const char *ptr_src;
   const char *ptr_tst;
@@ -1023,15 +1008,14 @@ FUNCTION
        bfd_get_arch_info
 
 SYNOPSIS
-       const bfd_arch_info_type * bfd_get_arch_info(bfd *abfd);
+       const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
 
 DESCRIPTION
        Return the architecture info struct in @var{abfd}.
 */
 
 const bfd_arch_info_type *
-bfd_get_arch_info (abfd)
-     bfd *abfd;
+bfd_get_arch_info (bfd *abfd)
 {
   return abfd->arch_info;
 }
@@ -1042,9 +1026,7 @@ FUNCTION
 
 SYNOPSIS
        const bfd_arch_info_type *bfd_lookup_arch
-               (enum bfd_architecture
-               arch,
-               unsigned long machine);
+         (enum bfd_architecture arch, unsigned long machine);
 
 DESCRIPTION
        Look for the architecure info structure which matches the
@@ -1054,9 +1036,7 @@ DESCRIPTION
 */
 
 const bfd_arch_info_type *
-bfd_lookup_arch (arch, machine)
-     enum bfd_architecture arch;
-     unsigned long machine;
+bfd_lookup_arch (enum bfd_architecture arch, unsigned long machine)
 {
   const bfd_arch_info_type * const *app, *ap;
 
@@ -1080,7 +1060,7 @@ FUNCTION
 
 SYNOPSIS
        const char *bfd_printable_arch_mach
-               (enum bfd_architecture arch, unsigned long machine);
+         (enum bfd_architecture arch, unsigned long machine);
 
 DESCRIPTION
        Return a printable string representing the architecture and
@@ -1090,9 +1070,7 @@ DESCRIPTION
 */
 
 const char *
-bfd_printable_arch_mach (arch, machine)
-     enum bfd_architecture arch;
-     unsigned long machine;
+bfd_printable_arch_mach (enum bfd_architecture arch, unsigned long machine)
 {
   const bfd_arch_info_type *ap = bfd_lookup_arch (arch, machine);
 
@@ -1106,7 +1084,7 @@ FUNCTION
        bfd_octets_per_byte
 
 SYNOPSIS
-       unsigned int bfd_octets_per_byte(bfd *abfd);
+       unsigned int bfd_octets_per_byte (bfd *abfd);
 
 DESCRIPTION
        Return the number of octets (8-bit quantities) per target byte
@@ -1115,8 +1093,7 @@ DESCRIPTION
 */
 
 unsigned int
-bfd_octets_per_byte (abfd)
-     bfd *abfd;
+bfd_octets_per_byte (bfd *abfd)
 {
   return bfd_arch_mach_octets_per_byte (bfd_get_arch (abfd),
                                        bfd_get_mach (abfd));
@@ -1127,8 +1104,8 @@ FUNCTION
        bfd_arch_mach_octets_per_byte
 
 SYNOPSIS
-       unsigned int bfd_arch_mach_octets_per_byte(enum bfd_architecture arch,
-                                                   unsigned long machine);
+       unsigned int bfd_arch_mach_octets_per_byte
+         (enum bfd_architecture arch, unsigned long machine);
 
 DESCRIPTION
        See bfd_octets_per_byte.
@@ -1138,9 +1115,8 @@ DESCRIPTION
 */
 
 unsigned int
-bfd_arch_mach_octets_per_byte (arch, mach)
-     enum bfd_architecture arch;
-     unsigned long mach;
+bfd_arch_mach_octets_per_byte (enum bfd_architecture arch,
+                              unsigned long mach)
 {
   const bfd_arch_info_type *ap = bfd_lookup_arch (arch, mach);
 
index 977095e1966318c9c59f0a16148a589159eaabf5..63c86f7f91fed3c3c203af5de582fadd0fa4494c 100644 (file)
@@ -172,10 +172,8 @@ typedef unsigned long bfd_size_type;
 typedef bfd_signed_vma file_ptr;
 typedef bfd_vma ufile_ptr;
 
-extern void bfd_sprintf_vma
-  PARAMS ((bfd *, char *, bfd_vma));
-extern void bfd_fprintf_vma
-  PARAMS ((bfd *, PTR, bfd_vma));
+extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
+extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
 
 #define printf_vma(x) fprintf_vma(stdout,x)
 #define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
@@ -361,8 +359,7 @@ typedef struct _symbol_info
 
 /* Get the name of a stabs type code.  */
 
-extern const char *bfd_get_stab_name
-  PARAMS ((int));
+extern const char *bfd_get_stab_name (int);
 \f
 /* Hash table routines.  There is no way to free up a hash table.  */
 
@@ -396,80 +393,73 @@ struct bfd_hash_table
      each function should be written to allocate a new block of memory
      only if the argument is NULL.  */
   struct bfd_hash_entry *(*newfunc)
-    PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+    (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
    /* An objalloc for this hash table.  This is a struct objalloc *,
-     but we use PTR to avoid requiring the inclusion of objalloc.h.  */
-  PTR memory;
+     but we use void * to avoid requiring the inclusion of objalloc.h.  */
+  void *memory;
 };
 
 /* Initialize a hash table.  */
 extern bfd_boolean bfd_hash_table_init
-  PARAMS ((struct bfd_hash_table *,
-          struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
-                                      struct bfd_hash_table *,
-                                      const char *)));
+  (struct bfd_hash_table *,
+   struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+                              struct bfd_hash_table *,
+                              const char *));
 
 /* Initialize a hash table specifying a size.  */
 extern bfd_boolean bfd_hash_table_init_n
-  PARAMS ((struct bfd_hash_table *,
-          struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
-                                      struct bfd_hash_table *,
-                                      const char *),
-          unsigned int size));
+  (struct bfd_hash_table *,
+   struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+                              struct bfd_hash_table *,
+                              const char *),
+   unsigned int size);
 
 /* Free up a hash table.  */
 extern void bfd_hash_table_free
-  PARAMS ((struct bfd_hash_table *));
+  (struct bfd_hash_table *);
 
 /* Look up a string in a hash table.  If CREATE is TRUE, a new entry
    will be created for this string if one does not already exist.  The
    COPY argument must be TRUE if this routine should copy the string
    into newly allocated memory when adding an entry.  */
 extern struct bfd_hash_entry *bfd_hash_lookup
-  PARAMS ((struct bfd_hash_table *, const char *, bfd_boolean create,
-          bfd_boolean copy));
+  (struct bfd_hash_table *, const char *, bfd_boolean create,
+   bfd_boolean copy);
 
 /* Replace an entry in a hash table.  */
 extern void bfd_hash_replace
-  PARAMS ((struct bfd_hash_table *, struct bfd_hash_entry *old,
-          struct bfd_hash_entry *nw));
+  (struct bfd_hash_table *, struct bfd_hash_entry *old,
+   struct bfd_hash_entry *nw);
 
 /* Base method for creating a hash table entry.  */
 extern struct bfd_hash_entry *bfd_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
-          const char *));
+  (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
 
 /* Grab some space for a hash table entry.  */
-extern PTR bfd_hash_allocate
-  PARAMS ((struct bfd_hash_table *, unsigned int));
+extern void *bfd_hash_allocate
+  (struct bfd_hash_table *, unsigned int);
 
 /* Traverse a hash table in a random order, calling a function on each
    element.  If the function returns FALSE, the traversal stops.  The
    INFO argument is passed to the function.  */
 extern void bfd_hash_traverse
-  PARAMS ((struct bfd_hash_table *,
-          bfd_boolean (*) (struct bfd_hash_entry *, PTR),
-          PTR info));
+  (struct bfd_hash_table *,
+   bfd_boolean (*) (struct bfd_hash_entry *, void *),
+   void *info);
 
-#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
+#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
 
 /* User program access to BFD facilities.  */
 
 /* Direct I/O routines, for programs which know more about the object
    file than BFD does.  Use higher level routines if possible.  */
 
-extern bfd_size_type bfd_bread
-  PARAMS ((PTR, bfd_size_type, bfd *));
-extern bfd_size_type bfd_bwrite
-  PARAMS ((const PTR, bfd_size_type, bfd *));
-extern int bfd_seek
-  PARAMS ((bfd *, file_ptr, int));
-extern ufile_ptr bfd_tell
-  PARAMS ((bfd *));
-extern int bfd_flush
-  PARAMS ((bfd *));
-extern int bfd_stat
-  PARAMS ((bfd *, struct stat *));
+extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
+extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
+extern int bfd_seek (bfd *, file_ptr, int);
+extern ufile_ptr bfd_tell (bfd *);
+extern int bfd_flush (bfd *);
+extern int bfd_stat (bfd *, struct stat *);
 
 /* Deprecated old routines.  */
 #if __GNUC__
@@ -487,8 +477,7 @@ extern int bfd_stat
   (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #endif
-extern void warn_deprecated
-  PARAMS ((const char *, const char *, int, const char *));
+extern void warn_deprecated (const char *, const char *, int, const char *);
 
 /* Cast from const char * to char * so that caller can assign to
    a char * without a warning.  */
@@ -527,58 +516,38 @@ extern void warn_deprecated
 #define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
 
 extern bfd_boolean bfd_cache_close
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 /* NB: This declaration should match the autogenerated one in libbfd.h.  */
 
 extern bfd_boolean bfd_record_phdr
-  PARAMS ((bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
-          bfd_boolean, bfd_boolean, unsigned int, struct sec **));
+  (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
+          bfd_boolean, bfd_boolean, unsigned int, struct sec **);
 
 /* Byte swapping routines.  */
 
-bfd_vma bfd_getb64
-  PARAMS ((const unsigned char *));
-bfd_vma bfd_getl64
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getb_signed_64
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getl_signed_64
-  PARAMS ((const unsigned char *));
-bfd_vma bfd_getb32
-  PARAMS ((const unsigned char *));
-bfd_vma bfd_getl32
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getb_signed_32
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getl_signed_32
-  PARAMS ((const unsigned char *));
-bfd_vma bfd_getb16
-  PARAMS ((const unsigned char *));
-bfd_vma bfd_getl16
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getb_signed_16
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getl_signed_16
-  PARAMS ((const unsigned char *));
-void bfd_putb64
-  PARAMS ((bfd_vma, unsigned char *));
-void bfd_putl64
-  PARAMS ((bfd_vma, unsigned char *));
-void bfd_putb32
-  PARAMS ((bfd_vma, unsigned char *));
-void bfd_putl32
-  PARAMS ((bfd_vma, unsigned char *));
-void bfd_putb16
-  PARAMS ((bfd_vma, unsigned char *));
-void bfd_putl16
-  PARAMS ((bfd_vma, unsigned char *));
+bfd_vma bfd_getb64 (const unsigned char *);
+bfd_vma bfd_getl64 (const unsigned char *);
+bfd_signed_vma bfd_getb_signed_64 (const unsigned char *);
+bfd_signed_vma bfd_getl_signed_64 (const unsigned char *);
+bfd_vma bfd_getb32 (const unsigned char *);
+bfd_vma bfd_getl32 (const unsigned char *);
+bfd_signed_vma bfd_getb_signed_32 (const unsigned char *);
+bfd_signed_vma bfd_getl_signed_32 (const unsigned char *);
+bfd_vma bfd_getb16 (const unsigned char *);
+bfd_vma bfd_getl16 (const unsigned char *);
+bfd_signed_vma bfd_getb_signed_16 (const unsigned char *);
+bfd_signed_vma bfd_getl_signed_16 (const unsigned char *);
+void bfd_putb64 (bfd_vma, unsigned char *);
+void bfd_putl64 (bfd_vma, unsigned char *);
+void bfd_putb32 (bfd_vma, unsigned char *);
+void bfd_putl32 (bfd_vma, unsigned char *);
+void bfd_putb16 (bfd_vma, unsigned char *);
+void bfd_putl16 (bfd_vma, unsigned char *);
 
 /* Byte swapping routines which take size and endiannes as arguments.  */
 
-bfd_vma bfd_get_bits
-  PARAMS ((bfd_byte *, int, bfd_boolean));
-void bfd_put_bits
-  PARAMS ((bfd_vma, bfd_byte *, int, bfd_boolean));
+bfd_vma bfd_get_bits (bfd_byte *, int, bfd_boolean);
+void bfd_put_bits (bfd_vma, bfd_byte *, int, bfd_boolean);
 \f
 /* Externally visible ECOFF routines.  */
 
@@ -592,55 +561,48 @@ struct bfd_link_hash_entry;
 struct bfd_elf_version_tree;
 #endif
 extern bfd_vma bfd_ecoff_get_gp_value
-  PARAMS ((bfd * abfd));
+  (bfd * abfd);
 extern bfd_boolean bfd_ecoff_set_gp_value
-  PARAMS ((bfd *abfd, bfd_vma gp_value));
+  (bfd *abfd, bfd_vma gp_value);
 extern bfd_boolean bfd_ecoff_set_regmasks
-  PARAMS ((bfd *abfd, unsigned long gprmask, unsigned long fprmask,
-          unsigned long *cprmask));
-extern PTR bfd_ecoff_debug_init
-  PARAMS ((bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap,
-          struct bfd_link_info *));
+  (bfd *abfd, unsigned long gprmask, unsigned long fprmask,
+   unsigned long *cprmask);
+extern void *bfd_ecoff_debug_init
+  (bfd *output_bfd, struct ecoff_debug_info *output_debug,
+   const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
 extern void bfd_ecoff_debug_free
-  PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap,
-          struct bfd_link_info *));
+  (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
+   const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
 extern bfd_boolean bfd_ecoff_debug_accumulate
-  PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap,
-          bfd *input_bfd, struct ecoff_debug_info *input_debug,
-          const struct ecoff_debug_swap *input_swap,
-          struct bfd_link_info *));
+  (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
+   const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
+   struct ecoff_debug_info *input_debug,
+   const struct ecoff_debug_swap *input_swap, struct bfd_link_info *);
 extern bfd_boolean bfd_ecoff_debug_accumulate_other
-  PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
-          struct bfd_link_info *));
+  (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
+   const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
+   struct bfd_link_info *);
 extern bfd_boolean bfd_ecoff_debug_externals
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap,
-          bfd_boolean relocatable,
-          bfd_boolean (*get_extr) (struct symbol_cache_entry *,
-                                   struct ecoff_extr *),
-          void (*set_index) (struct symbol_cache_entry *,
-                             bfd_size_type)));
+  (bfd *abfd, struct ecoff_debug_info *debug,
+   const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
+   bfd_boolean (*get_extr) (struct symbol_cache_entry *, struct ecoff_extr *),
+   void (*set_index) (struct symbol_cache_entry *, bfd_size_type));
 extern bfd_boolean bfd_ecoff_debug_one_external
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap,
-          const char *name, struct ecoff_extr *esym));
+  (bfd *abfd, struct ecoff_debug_info *debug,
+   const struct ecoff_debug_swap *swap, const char *name,
+   struct ecoff_extr *esym);
 extern bfd_size_type bfd_ecoff_debug_size
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap));
+  (bfd *abfd, struct ecoff_debug_info *debug,
+   const struct ecoff_debug_swap *swap);
 extern bfd_boolean bfd_ecoff_write_debug
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap, file_ptr where));
+  (bfd *abfd, struct ecoff_debug_info *debug,
+   const struct ecoff_debug_swap *swap, file_ptr where);
 extern bfd_boolean bfd_ecoff_write_accumulated_debug
-  PARAMS ((PTR handle, bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap,
-          struct bfd_link_info *info, file_ptr where));
+  (void *handle, bfd *abfd, struct ecoff_debug_info *debug,
+   const struct ecoff_debug_swap *swap,
+   struct bfd_link_info *info, file_ptr where);
 extern bfd_boolean bfd_mips_ecoff_create_embedded_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
-          char **));
+  (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
 
 /* Externally visible ELF routines.  */
 
@@ -652,37 +614,35 @@ struct bfd_link_needed_list
 };
 
 extern bfd_boolean bfd_elf_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *, bfd_boolean));
+  (bfd *, struct bfd_link_info *, const char *, bfd_boolean);
 extern struct bfd_link_needed_list *bfd_elf_get_needed_list
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_elf_get_bfd_needed_list
-  PARAMS ((bfd *, struct bfd_link_needed_list **));
+  (bfd *, struct bfd_link_needed_list **);
 extern bfd_boolean bfd_elf32_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, const char *,
-          const char * const *, struct bfd_link_info *, struct sec **,
-          struct bfd_elf_version_tree *));
+  (bfd *, const char *, const char *, const char *, const char * const *,
+   struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *);
 extern bfd_boolean bfd_elf64_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, const char *,
-          const char * const *, struct bfd_link_info *, struct sec **,
-          struct bfd_elf_version_tree *));
+  (bfd *, const char *, const char *, const char *, const char * const *,
+   struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *);
 extern void bfd_elf_set_dt_needed_name
-  PARAMS ((bfd *, const char *));
+  (bfd *, const char *);
 extern void bfd_elf_set_dt_needed_soname
-  PARAMS ((bfd *, const char *));
+  (bfd *, const char *);
 extern const char *bfd_elf_get_dt_soname
-  PARAMS ((bfd *));
+  (bfd *);
 extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_elf32_discard_info
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_elf64_discard_info
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* Return an upper bound on the number of bytes required to store a
    copy of ABFD's program header table entries.  Return -1 if an error
    occurs; bfd_get_error will return an appropriate code.  */
 extern long bfd_get_elf_phdr_upper_bound
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 
 /* Copy ABFD's program header table entries to *PHDRS.  The entries
    will be stored as an array of Elf_Internal_Phdr structures, as
@@ -692,7 +652,7 @@ extern long bfd_get_elf_phdr_upper_bound
    Return the number of program header table entries read, or -1 if an
    error occurs; bfd_get_error will return an appropriate code.  */
 extern int bfd_get_elf_phdrs
-  PARAMS ((bfd *abfd, void *phdrs));
+  (bfd *abfd, void *phdrs);
 
 /* Create a new BFD as if by bfd_openr.  Rather than opening a file,
    reconstruct an ELF file by reading the segments out of remote memory
@@ -707,42 +667,39 @@ extern int bfd_get_elf_phdrs
    be a BFD for an ELF target with the word size and byte order found in
    the remote memory.  */
 extern bfd *bfd_elf_bfd_from_remote_memory
-  PARAMS ((bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
-          int (*target_read_memory) (bfd_vma vma, char *myaddr, int len)));
+  (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
+   int (*target_read_memory) (bfd_vma vma, char *myaddr, int len));
 
 /* Return the arch_size field of an elf bfd, or -1 if not elf.  */
 extern int bfd_get_arch_size
-  PARAMS ((bfd *));
+  (bfd *);
 
 /* Return TRUE if address "naturally" sign extends, or -1 if not elf.  */
 extern int bfd_get_sign_extend_vma
-  PARAMS ((bfd *));
+  (bfd *);
 
 extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
-          char **));
+  (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
 extern bfd_boolean bfd_mips_elf32_create_embedded_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
-          char **));
+  (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
 
 /* SunOS shared library support routines for the linker.  */
 
 extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_sunos_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *));
+  (bfd *, struct bfd_link_info *, const char *);
 extern bfd_boolean bfd_sunos_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec **, struct sec **,
-          struct sec **));
+  (bfd *, struct bfd_link_info *, struct sec **, struct sec **, struct sec **);
 
 /* Linux shared library support routines for the linker.  */
 
 extern bfd_boolean bfd_i386linux_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_m68klinux_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_sparclinux_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* mmap hacks */
 
@@ -752,7 +709,7 @@ typedef struct _bfd_window_internal bfd_window_internal;
 typedef struct _bfd_window
 {
   /* What the user asked for.  */
-  PTR data;
+  void *data;
   bfd_size_type size;
   /* The actual window used by BFD.  Small user-requested read-only
      regions sharing a page may share a single window into the object
@@ -765,36 +722,35 @@ typedef struct _bfd_window
 bfd_window;
 
 extern void bfd_init_window
-  PARAMS ((bfd_window *));
+  (bfd_window *);
 extern void bfd_free_window
-  PARAMS ((bfd_window *));
+  (bfd_window *);
 extern bfd_boolean bfd_get_file_window
-  PARAMS ((bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean));
+  (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
 
 /* XCOFF support routines for the linker.  */
 
 extern bfd_boolean bfd_xcoff_link_record_set
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
-          bfd_size_type));
+  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
 extern bfd_boolean bfd_xcoff_import_symbol
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
-          bfd_vma, const char *, const char *, const char *, unsigned int));
+  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
+   const char *, const char *, const char *, unsigned int);
 extern bfd_boolean bfd_xcoff_export_symbol
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *));
+  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
 extern bfd_boolean bfd_xcoff_link_count_reloc
-  PARAMS ((bfd *, struct bfd_link_info *, const char *));
+  (bfd *, struct bfd_link_info *, const char *);
 extern bfd_boolean bfd_xcoff_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *));
+  (bfd *, struct bfd_link_info *, const char *);
 extern bfd_boolean bfd_xcoff_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *,
-          unsigned long, unsigned long, unsigned long, bfd_boolean,
-          int, bfd_boolean, bfd_boolean, struct sec **, bfd_boolean));
+  (bfd *, struct bfd_link_info *, const char *, const char *,
+   unsigned long, unsigned long, unsigned long, bfd_boolean,
+   int, bfd_boolean, bfd_boolean, struct sec **, bfd_boolean);
 extern bfd_boolean bfd_xcoff_link_generate_rtinit
-  PARAMS ((bfd *, const char *, const char *, bfd_boolean));
+  (bfd *, const char *, const char *, bfd_boolean);
 
 /* XCOFF support routines for ar.  */
 extern bfd_boolean bfd_xcoff_ar_archive_set_magic
-  PARAMS ((bfd *, char *));
+  (bfd *, char *);
 
 /* Externally visible COFF routines.  */
 
@@ -804,65 +760,68 @@ union internal_auxent;
 #endif
 
 extern bfd_boolean bfd_coff_get_syment
-  PARAMS ((bfd *, struct symbol_cache_entry *, struct internal_syment *));
+  (bfd *, struct symbol_cache_entry *, struct internal_syment *);
 
 extern bfd_boolean bfd_coff_get_auxent
-  PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *));
+  (bfd *, struct symbol_cache_entry *, int, union internal_auxent *);
 
 extern bfd_boolean bfd_coff_set_symbol_class
-  PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int));
+  (bfd *, struct symbol_cache_entry *, unsigned int);
 
 extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
-          char **));
+  (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
 
 /* ARM Interworking support.  Called from linker.  */
 extern bfd_boolean bfd_arm_allocate_interworking_sections
-  PARAMS ((struct bfd_link_info *));
+  (struct bfd_link_info *);
 
 extern bfd_boolean bfd_arm_process_before_allocation
-  PARAMS ((bfd *, struct bfd_link_info *, int));
+  (bfd *, struct bfd_link_info *, int);
 
 extern bfd_boolean bfd_arm_get_bfd_for_interworking
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* PE ARM Interworking support.  Called from linker.  */
 extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
-  PARAMS ((struct bfd_link_info *));
+  (struct bfd_link_info *);
 
 extern bfd_boolean bfd_arm_pe_process_before_allocation
-  PARAMS ((bfd *, struct bfd_link_info *, int));
+  (bfd *, struct bfd_link_info *, int);
 
 extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* ELF ARM Interworking support.  Called from linker.  */
 extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
-  PARAMS ((struct bfd_link_info *));
+  (struct bfd_link_info *);
 
 extern bfd_boolean bfd_elf32_arm_process_before_allocation
-  PARAMS ((bfd *, struct bfd_link_info *, int));
+  (bfd *, struct bfd_link_info *, int);
 
 extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* ARM Note section processing.  */
 extern bfd_boolean bfd_arm_merge_machines
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 
 extern bfd_boolean bfd_arm_update_notes
-  PARAMS ((bfd *, const char *));
+  (bfd *, const char *);
 
 extern unsigned int bfd_arm_get_mach_from_notes
-  PARAMS ((bfd *, const char *));
+  (bfd *, const char *);
 
 /* TI COFF load page support.  */
 extern void bfd_ticoff_set_section_load_page
-  PARAMS ((struct sec *, int));
+  (struct sec *, int);
 
 extern int bfd_ticoff_get_section_load_page
-  PARAMS ((struct sec *));
+  (struct sec *);
+
+/* H8/300 functions.  */
+extern bfd_vma bfd_h8300_pad_address
+  (bfd *, bfd_vma);
 
index c6815ccb07b33b90ad84018887d537b2a23c7c45..11d4e90e34f9fb6a1d4b71a4a32c8778c02bb241 100644 (file)
@@ -179,10 +179,8 @@ typedef unsigned long bfd_size_type;
 typedef bfd_signed_vma file_ptr;
 typedef bfd_vma ufile_ptr;
 
-extern void bfd_sprintf_vma
-  PARAMS ((bfd *, char *, bfd_vma));
-extern void bfd_fprintf_vma
-  PARAMS ((bfd *, PTR, bfd_vma));
+extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
+extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
 
 #define printf_vma(x) fprintf_vma(stdout,x)
 #define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
@@ -368,8 +366,7 @@ typedef struct _symbol_info
 
 /* Get the name of a stabs type code.  */
 
-extern const char *bfd_get_stab_name
-  PARAMS ((int));
+extern const char *bfd_get_stab_name (int);
 \f
 /* Hash table routines.  There is no way to free up a hash table.  */
 
@@ -403,80 +400,73 @@ struct bfd_hash_table
      each function should be written to allocate a new block of memory
      only if the argument is NULL.  */
   struct bfd_hash_entry *(*newfunc)
-    PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+    (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
    /* An objalloc for this hash table.  This is a struct objalloc *,
-     but we use PTR to avoid requiring the inclusion of objalloc.h.  */
-  PTR memory;
+     but we use void * to avoid requiring the inclusion of objalloc.h.  */
+  void *memory;
 };
 
 /* Initialize a hash table.  */
 extern bfd_boolean bfd_hash_table_init
-  PARAMS ((struct bfd_hash_table *,
-          struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
-                                      struct bfd_hash_table *,
-                                      const char *)));
+  (struct bfd_hash_table *,
+   struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+                              struct bfd_hash_table *,
+                              const char *));
 
 /* Initialize a hash table specifying a size.  */
 extern bfd_boolean bfd_hash_table_init_n
-  PARAMS ((struct bfd_hash_table *,
-          struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
-                                      struct bfd_hash_table *,
-                                      const char *),
-          unsigned int size));
+  (struct bfd_hash_table *,
+   struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+                              struct bfd_hash_table *,
+                              const char *),
+   unsigned int size);
 
 /* Free up a hash table.  */
 extern void bfd_hash_table_free
-  PARAMS ((struct bfd_hash_table *));
+  (struct bfd_hash_table *);
 
 /* Look up a string in a hash table.  If CREATE is TRUE, a new entry
    will be created for this string if one does not already exist.  The
    COPY argument must be TRUE if this routine should copy the string
    into newly allocated memory when adding an entry.  */
 extern struct bfd_hash_entry *bfd_hash_lookup
-  PARAMS ((struct bfd_hash_table *, const char *, bfd_boolean create,
-          bfd_boolean copy));
+  (struct bfd_hash_table *, const char *, bfd_boolean create,
+   bfd_boolean copy);
 
 /* Replace an entry in a hash table.  */
 extern void bfd_hash_replace
-  PARAMS ((struct bfd_hash_table *, struct bfd_hash_entry *old,
-          struct bfd_hash_entry *nw));
+  (struct bfd_hash_table *, struct bfd_hash_entry *old,
+   struct bfd_hash_entry *nw);
 
 /* Base method for creating a hash table entry.  */
 extern struct bfd_hash_entry *bfd_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
-          const char *));
+  (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
 
 /* Grab some space for a hash table entry.  */
-extern PTR bfd_hash_allocate
-  PARAMS ((struct bfd_hash_table *, unsigned int));
+extern void *bfd_hash_allocate
+  (struct bfd_hash_table *, unsigned int);
 
 /* Traverse a hash table in a random order, calling a function on each
    element.  If the function returns FALSE, the traversal stops.  The
    INFO argument is passed to the function.  */
 extern void bfd_hash_traverse
-  PARAMS ((struct bfd_hash_table *,
-          bfd_boolean (*) (struct bfd_hash_entry *, PTR),
-          PTR info));
+  (struct bfd_hash_table *,
+   bfd_boolean (*) (struct bfd_hash_entry *, void *),
+   void *info);
 
-#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
+#define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table
 
 /* User program access to BFD facilities.  */
 
 /* Direct I/O routines, for programs which know more about the object
    file than BFD does.  Use higher level routines if possible.  */
 
-extern bfd_size_type bfd_bread
-  PARAMS ((PTR, bfd_size_type, bfd *));
-extern bfd_size_type bfd_bwrite
-  PARAMS ((const PTR, bfd_size_type, bfd *));
-extern int bfd_seek
-  PARAMS ((bfd *, file_ptr, int));
-extern ufile_ptr bfd_tell
-  PARAMS ((bfd *));
-extern int bfd_flush
-  PARAMS ((bfd *));
-extern int bfd_stat
-  PARAMS ((bfd *, struct stat *));
+extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
+extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
+extern int bfd_seek (bfd *, file_ptr, int);
+extern ufile_ptr bfd_tell (bfd *);
+extern int bfd_flush (bfd *);
+extern int bfd_stat (bfd *, struct stat *);
 
 /* Deprecated old routines.  */
 #if __GNUC__
@@ -494,8 +484,7 @@ extern int bfd_stat
   (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #endif
-extern void warn_deprecated
-  PARAMS ((const char *, const char *, int, const char *));
+extern void warn_deprecated (const char *, const char *, int, const char *);
 
 /* Cast from const char * to char * so that caller can assign to
    a char * without a warning.  */
@@ -534,58 +523,38 @@ extern void warn_deprecated
 #define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
 
 extern bfd_boolean bfd_cache_close
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 /* NB: This declaration should match the autogenerated one in libbfd.h.  */
 
 extern bfd_boolean bfd_record_phdr
-  PARAMS ((bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
-          bfd_boolean, bfd_boolean, unsigned int, struct sec **));
+  (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
+          bfd_boolean, bfd_boolean, unsigned int, struct sec **);
 
 /* Byte swapping routines.  */
 
-bfd_vma bfd_getb64
-  PARAMS ((const unsigned char *));
-bfd_vma bfd_getl64
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getb_signed_64
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getl_signed_64
-  PARAMS ((const unsigned char *));
-bfd_vma bfd_getb32
-  PARAMS ((const unsigned char *));
-bfd_vma bfd_getl32
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getb_signed_32
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getl_signed_32
-  PARAMS ((const unsigned char *));
-bfd_vma bfd_getb16
-  PARAMS ((const unsigned char *));
-bfd_vma bfd_getl16
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getb_signed_16
-  PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getl_signed_16
-  PARAMS ((const unsigned char *));
-void bfd_putb64
-  PARAMS ((bfd_vma, unsigned char *));
-void bfd_putl64
-  PARAMS ((bfd_vma, unsigned char *));
-void bfd_putb32
-  PARAMS ((bfd_vma, unsigned char *));
-void bfd_putl32
-  PARAMS ((bfd_vma, unsigned char *));
-void bfd_putb16
-  PARAMS ((bfd_vma, unsigned char *));
-void bfd_putl16
-  PARAMS ((bfd_vma, unsigned char *));
+bfd_vma bfd_getb64 (const unsigned char *);
+bfd_vma bfd_getl64 (const unsigned char *);
+bfd_signed_vma bfd_getb_signed_64 (const unsigned char *);
+bfd_signed_vma bfd_getl_signed_64 (const unsigned char *);
+bfd_vma bfd_getb32 (const unsigned char *);
+bfd_vma bfd_getl32 (const unsigned char *);
+bfd_signed_vma bfd_getb_signed_32 (const unsigned char *);
+bfd_signed_vma bfd_getl_signed_32 (const unsigned char *);
+bfd_vma bfd_getb16 (const unsigned char *);
+bfd_vma bfd_getl16 (const unsigned char *);
+bfd_signed_vma bfd_getb_signed_16 (const unsigned char *);
+bfd_signed_vma bfd_getl_signed_16 (const unsigned char *);
+void bfd_putb64 (bfd_vma, unsigned char *);
+void bfd_putl64 (bfd_vma, unsigned char *);
+void bfd_putb32 (bfd_vma, unsigned char *);
+void bfd_putl32 (bfd_vma, unsigned char *);
+void bfd_putb16 (bfd_vma, unsigned char *);
+void bfd_putl16 (bfd_vma, unsigned char *);
 
 /* Byte swapping routines which take size and endiannes as arguments.  */
 
-bfd_vma bfd_get_bits
-  PARAMS ((bfd_byte *, int, bfd_boolean));
-void bfd_put_bits
-  PARAMS ((bfd_vma, bfd_byte *, int, bfd_boolean));
+bfd_vma bfd_get_bits (bfd_byte *, int, bfd_boolean);
+void bfd_put_bits (bfd_vma, bfd_byte *, int, bfd_boolean);
 \f
 /* Externally visible ECOFF routines.  */
 
@@ -599,55 +568,48 @@ struct bfd_link_hash_entry;
 struct bfd_elf_version_tree;
 #endif
 extern bfd_vma bfd_ecoff_get_gp_value
-  PARAMS ((bfd * abfd));
+  (bfd * abfd);
 extern bfd_boolean bfd_ecoff_set_gp_value
-  PARAMS ((bfd *abfd, bfd_vma gp_value));
+  (bfd *abfd, bfd_vma gp_value);
 extern bfd_boolean bfd_ecoff_set_regmasks
-  PARAMS ((bfd *abfd, unsigned long gprmask, unsigned long fprmask,
-          unsigned long *cprmask));
-extern PTR bfd_ecoff_debug_init
-  PARAMS ((bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap,
-          struct bfd_link_info *));
+  (bfd *abfd, unsigned long gprmask, unsigned long fprmask,
+   unsigned long *cprmask);
+extern void *bfd_ecoff_debug_init
+  (bfd *output_bfd, struct ecoff_debug_info *output_debug,
+   const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
 extern void bfd_ecoff_debug_free
-  PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap,
-          struct bfd_link_info *));
+  (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
+   const struct ecoff_debug_swap *output_swap, struct bfd_link_info *);
 extern bfd_boolean bfd_ecoff_debug_accumulate
-  PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap,
-          bfd *input_bfd, struct ecoff_debug_info *input_debug,
-          const struct ecoff_debug_swap *input_swap,
-          struct bfd_link_info *));
+  (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
+   const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
+   struct ecoff_debug_info *input_debug,
+   const struct ecoff_debug_swap *input_swap, struct bfd_link_info *);
 extern bfd_boolean bfd_ecoff_debug_accumulate_other
-  PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
-          struct bfd_link_info *));
+  (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
+   const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
+   struct bfd_link_info *);
 extern bfd_boolean bfd_ecoff_debug_externals
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap,
-          bfd_boolean relocatable,
-          bfd_boolean (*get_extr) (struct symbol_cache_entry *,
-                                   struct ecoff_extr *),
-          void (*set_index) (struct symbol_cache_entry *,
-                             bfd_size_type)));
+  (bfd *abfd, struct ecoff_debug_info *debug,
+   const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
+   bfd_boolean (*get_extr) (struct symbol_cache_entry *, struct ecoff_extr *),
+   void (*set_index) (struct symbol_cache_entry *, bfd_size_type));
 extern bfd_boolean bfd_ecoff_debug_one_external
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap,
-          const char *name, struct ecoff_extr *esym));
+  (bfd *abfd, struct ecoff_debug_info *debug,
+   const struct ecoff_debug_swap *swap, const char *name,
+   struct ecoff_extr *esym);
 extern bfd_size_type bfd_ecoff_debug_size
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap));
+  (bfd *abfd, struct ecoff_debug_info *debug,
+   const struct ecoff_debug_swap *swap);
 extern bfd_boolean bfd_ecoff_write_debug
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap, file_ptr where));
+  (bfd *abfd, struct ecoff_debug_info *debug,
+   const struct ecoff_debug_swap *swap, file_ptr where);
 extern bfd_boolean bfd_ecoff_write_accumulated_debug
-  PARAMS ((PTR handle, bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap,
-          struct bfd_link_info *info, file_ptr where));
+  (void *handle, bfd *abfd, struct ecoff_debug_info *debug,
+   const struct ecoff_debug_swap *swap,
+   struct bfd_link_info *info, file_ptr where);
 extern bfd_boolean bfd_mips_ecoff_create_embedded_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
-          char **));
+  (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
 
 /* Externally visible ELF routines.  */
 
@@ -659,37 +621,35 @@ struct bfd_link_needed_list
 };
 
 extern bfd_boolean bfd_elf_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *, bfd_boolean));
+  (bfd *, struct bfd_link_info *, const char *, bfd_boolean);
 extern struct bfd_link_needed_list *bfd_elf_get_needed_list
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_elf_get_bfd_needed_list
-  PARAMS ((bfd *, struct bfd_link_needed_list **));
+  (bfd *, struct bfd_link_needed_list **);
 extern bfd_boolean bfd_elf32_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, const char *,
-          const char * const *, struct bfd_link_info *, struct sec **,
-          struct bfd_elf_version_tree *));
+  (bfd *, const char *, const char *, const char *, const char * const *,
+   struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *);
 extern bfd_boolean bfd_elf64_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, const char *,
-          const char * const *, struct bfd_link_info *, struct sec **,
-          struct bfd_elf_version_tree *));
+  (bfd *, const char *, const char *, const char *, const char * const *,
+   struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *);
 extern void bfd_elf_set_dt_needed_name
-  PARAMS ((bfd *, const char *));
+  (bfd *, const char *);
 extern void bfd_elf_set_dt_needed_soname
-  PARAMS ((bfd *, const char *));
+  (bfd *, const char *);
 extern const char *bfd_elf_get_dt_soname
-  PARAMS ((bfd *));
+  (bfd *);
 extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_elf32_discard_info
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_elf64_discard_info
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* Return an upper bound on the number of bytes required to store a
    copy of ABFD's program header table entries.  Return -1 if an error
    occurs; bfd_get_error will return an appropriate code.  */
 extern long bfd_get_elf_phdr_upper_bound
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 
 /* Copy ABFD's program header table entries to *PHDRS.  The entries
    will be stored as an array of Elf_Internal_Phdr structures, as
@@ -699,7 +659,7 @@ extern long bfd_get_elf_phdr_upper_bound
    Return the number of program header table entries read, or -1 if an
    error occurs; bfd_get_error will return an appropriate code.  */
 extern int bfd_get_elf_phdrs
-  PARAMS ((bfd *abfd, void *phdrs));
+  (bfd *abfd, void *phdrs);
 
 /* Create a new BFD as if by bfd_openr.  Rather than opening a file,
    reconstruct an ELF file by reading the segments out of remote memory
@@ -714,42 +674,39 @@ extern int bfd_get_elf_phdrs
    be a BFD for an ELF target with the word size and byte order found in
    the remote memory.  */
 extern bfd *bfd_elf_bfd_from_remote_memory
-  PARAMS ((bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
-          int (*target_read_memory) (bfd_vma vma, char *myaddr, int len)));
+  (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
+   int (*target_read_memory) (bfd_vma vma, char *myaddr, int len));
 
 /* Return the arch_size field of an elf bfd, or -1 if not elf.  */
 extern int bfd_get_arch_size
-  PARAMS ((bfd *));
+  (bfd *);
 
 /* Return TRUE if address "naturally" sign extends, or -1 if not elf.  */
 extern int bfd_get_sign_extend_vma
-  PARAMS ((bfd *));
+  (bfd *);
 
 extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
-          char **));
+  (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
 extern bfd_boolean bfd_mips_elf32_create_embedded_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
-          char **));
+  (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
 
 /* SunOS shared library support routines for the linker.  */
 
 extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_sunos_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *));
+  (bfd *, struct bfd_link_info *, const char *);
 extern bfd_boolean bfd_sunos_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec **, struct sec **,
-          struct sec **));
+  (bfd *, struct bfd_link_info *, struct sec **, struct sec **, struct sec **);
 
 /* Linux shared library support routines for the linker.  */
 
 extern bfd_boolean bfd_i386linux_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_m68klinux_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_sparclinux_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* mmap hacks */
 
@@ -759,7 +716,7 @@ typedef struct _bfd_window_internal bfd_window_internal;
 typedef struct _bfd_window
 {
   /* What the user asked for.  */
-  PTR data;
+  void *data;
   bfd_size_type size;
   /* The actual window used by BFD.  Small user-requested read-only
      regions sharing a page may share a single window into the object
@@ -772,36 +729,35 @@ typedef struct _bfd_window
 bfd_window;
 
 extern void bfd_init_window
-  PARAMS ((bfd_window *));
+  (bfd_window *);
 extern void bfd_free_window
-  PARAMS ((bfd_window *));
+  (bfd_window *);
 extern bfd_boolean bfd_get_file_window
-  PARAMS ((bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean));
+  (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
 
 /* XCOFF support routines for the linker.  */
 
 extern bfd_boolean bfd_xcoff_link_record_set
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
-          bfd_size_type));
+  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
 extern bfd_boolean bfd_xcoff_import_symbol
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
-          bfd_vma, const char *, const char *, const char *, unsigned int));
+  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
+   const char *, const char *, const char *, unsigned int);
 extern bfd_boolean bfd_xcoff_export_symbol
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *));
+  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
 extern bfd_boolean bfd_xcoff_link_count_reloc
-  PARAMS ((bfd *, struct bfd_link_info *, const char *));
+  (bfd *, struct bfd_link_info *, const char *);
 extern bfd_boolean bfd_xcoff_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *));
+  (bfd *, struct bfd_link_info *, const char *);
 extern bfd_boolean bfd_xcoff_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *,
-          unsigned long, unsigned long, unsigned long, bfd_boolean,
-          int, bfd_boolean, bfd_boolean, struct sec **, bfd_boolean));
+  (bfd *, struct bfd_link_info *, const char *, const char *,
+   unsigned long, unsigned long, unsigned long, bfd_boolean,
+   int, bfd_boolean, bfd_boolean, struct sec **, bfd_boolean);
 extern bfd_boolean bfd_xcoff_link_generate_rtinit
-  PARAMS ((bfd *, const char *, const char *, bfd_boolean));
+  (bfd *, const char *, const char *, bfd_boolean);
 
 /* XCOFF support routines for ar.  */
 extern bfd_boolean bfd_xcoff_ar_archive_set_magic
-  PARAMS ((bfd *, char *));
+  (bfd *, char *);
 
 /* Externally visible COFF routines.  */
 
@@ -811,165 +767,157 @@ union internal_auxent;
 #endif
 
 extern bfd_boolean bfd_coff_get_syment
-  PARAMS ((bfd *, struct symbol_cache_entry *, struct internal_syment *));
+  (bfd *, struct symbol_cache_entry *, struct internal_syment *);
 
 extern bfd_boolean bfd_coff_get_auxent
-  PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *));
+  (bfd *, struct symbol_cache_entry *, int, union internal_auxent *);
 
 extern bfd_boolean bfd_coff_set_symbol_class
-  PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int));
+  (bfd *, struct symbol_cache_entry *, unsigned int);
 
 extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
-          char **));
+  (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
 
 /* ARM Interworking support.  Called from linker.  */
 extern bfd_boolean bfd_arm_allocate_interworking_sections
-  PARAMS ((struct bfd_link_info *));
+  (struct bfd_link_info *);
 
 extern bfd_boolean bfd_arm_process_before_allocation
-  PARAMS ((bfd *, struct bfd_link_info *, int));
+  (bfd *, struct bfd_link_info *, int);
 
 extern bfd_boolean bfd_arm_get_bfd_for_interworking
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* PE ARM Interworking support.  Called from linker.  */
 extern bfd_boolean bfd_arm_pe_allocate_interworking_sections
-  PARAMS ((struct bfd_link_info *));
+  (struct bfd_link_info *);
 
 extern bfd_boolean bfd_arm_pe_process_before_allocation
-  PARAMS ((bfd *, struct bfd_link_info *, int));
+  (bfd *, struct bfd_link_info *, int);
 
 extern bfd_boolean bfd_arm_pe_get_bfd_for_interworking
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* ELF ARM Interworking support.  Called from linker.  */
 extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
-  PARAMS ((struct bfd_link_info *));
+  (struct bfd_link_info *);
 
 extern bfd_boolean bfd_elf32_arm_process_before_allocation
-  PARAMS ((bfd *, struct bfd_link_info *, int));
+  (bfd *, struct bfd_link_info *, int);
 
 extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* ARM Note section processing.  */
 extern bfd_boolean bfd_arm_merge_machines
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 
 extern bfd_boolean bfd_arm_update_notes
-  PARAMS ((bfd *, const char *));
+  (bfd *, const char *);
 
 extern unsigned int bfd_arm_get_mach_from_notes
-  PARAMS ((bfd *, const char *));
+  (bfd *, const char *);
 
 /* TI COFF load page support.  */
 extern void bfd_ticoff_set_section_load_page
-  PARAMS ((struct sec *, int));
+  (struct sec *, int);
 
 extern int bfd_ticoff_get_section_load_page
-  PARAMS ((struct sec *));
+  (struct sec *);
+
+/* H8/300 functions.  */
+extern bfd_vma bfd_h8300_pad_address
+  (bfd *, bfd_vma);
 
 /* Extracted from init.c.  */
-void
-bfd_init PARAMS ((void));
+void bfd_init (void);
 
 /* Extracted from opncls.c.  */
-bfd *
-bfd_openr PARAMS ((const char *filename, const char *target));
+bfd *bfd_openr (const char *filename, const char *target);
 
-bfd *
-bfd_fdopenr PARAMS ((const char *filename, const char *target, int fd));
+bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
 
-bfd *
-bfd_openstreamr PARAMS ((const char *, const char *, PTR));
+bfd *bfd_openstreamr (const char *, const char *, void *);
 
-bfd *
-bfd_openw PARAMS ((const char *filename, const char *target));
+bfd *bfd_openw (const char *filename, const char *target);
 
-bfd_boolean
-bfd_close PARAMS ((bfd *abfd));
+bfd_boolean bfd_close (bfd *abfd);
 
-bfd_boolean
-bfd_close_all_done PARAMS ((bfd *));
+bfd_boolean bfd_close_all_done (bfd *);
 
-bfd *
-bfd_create PARAMS ((const char *filename, bfd *templ));
+bfd *bfd_create (const char *filename, bfd *templ);
 
-bfd_boolean
-bfd_make_writable PARAMS ((bfd *abfd));
+bfd_boolean bfd_make_writable (bfd *abfd);
 
-bfd_boolean
-bfd_make_readable PARAMS ((bfd *abfd));
+bfd_boolean bfd_make_readable (bfd *abfd);
 
-unsigned long
-bfd_calc_gnu_debuglink_crc32 PARAMS ((unsigned long crc, const unsigned char *buf, bfd_size_type len));
+unsigned long bfd_calc_gnu_debuglink_crc32
+   (unsigned long crc, const unsigned char *buf, bfd_size_type len);
 
-char *
-bfd_follow_gnu_debuglink PARAMS ((bfd *abfd, const char *dir));
+char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
 
-struct sec *
-bfd_create_gnu_debuglink_section PARAMS ((bfd * abfd, const char * filename));
+struct sec *bfd_create_gnu_debuglink_section
+   (bfd *abfd, const char *filename);
 
-bfd_boolean
-bfd_fill_in_gnu_debuglink_section PARAMS ((bfd * abfd, struct sec * sect, const char * filename));
+bfd_boolean bfd_fill_in_gnu_debuglink_section
+   (bfd *abfd, struct sec *sect, const char *filename);
 
 /* Extracted from libbfd.c.  */
 
 /* Byte swapping macros for user section data.  */
 
 #define bfd_put_8(abfd, val, ptr) \
-                ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val)))
+  ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val)))
 #define bfd_put_signed_8 \
-               bfd_put_8
+  bfd_put_8
 #define bfd_get_8(abfd, ptr) \
-                (*(unsigned char *) (ptr) & 0xff)
+  (*(unsigned char *) (ptr) & 0xff)
 #define bfd_get_signed_8(abfd, ptr) \
-               (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
+  (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
 
 #define bfd_put_16(abfd, val, ptr) \
-                BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
+  BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
 #define bfd_put_signed_16 \
-                bfd_put_16
+  bfd_put_16
 #define bfd_get_16(abfd, ptr) \
-                BFD_SEND(abfd, bfd_getx16, (ptr))
+  BFD_SEND (abfd, bfd_getx16, (ptr))
 #define bfd_get_signed_16(abfd, ptr) \
-                BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
+  BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
 
 #define bfd_put_32(abfd, val, ptr) \
-                BFD_SEND(abfd, bfd_putx32, ((val),(ptr)))
+  BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
 #define bfd_put_signed_32 \
-                bfd_put_32
+  bfd_put_32
 #define bfd_get_32(abfd, ptr) \
-                BFD_SEND(abfd, bfd_getx32, (ptr))
+  BFD_SEND (abfd, bfd_getx32, (ptr))
 #define bfd_get_signed_32(abfd, ptr) \
-                BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
+  BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
 
 #define bfd_put_64(abfd, val, ptr) \
-                BFD_SEND(abfd, bfd_putx64, ((val), (ptr)))
+  BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
 #define bfd_put_signed_64 \
-                bfd_put_64
+  bfd_put_64
 #define bfd_get_64(abfd, ptr) \
-                BFD_SEND(abfd, bfd_getx64, (ptr))
+  BFD_SEND (abfd, bfd_getx64, (ptr))
 #define bfd_get_signed_64(abfd, ptr) \
-                BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
+  BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
 
-#define bfd_get(bits, abfd, ptr)                               \
-                ( (bits) ==  8 ? (bfd_vma) bfd_get_8 (abfd, ptr)       \
-                : (bits) == 16 ? bfd_get_16 (abfd, ptr)        \
-                : (bits) == 32 ? bfd_get_32 (abfd, ptr)        \
-                : (bits) == 64 ? bfd_get_64 (abfd, ptr)        \
-                : (abort (), (bfd_vma) - 1))
+#define bfd_get(bits, abfd, ptr)                       \
+  ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr)       \
+   : (bits) == 16 ? bfd_get_16 (abfd, ptr)             \
+   : (bits) == 32 ? bfd_get_32 (abfd, ptr)             \
+   : (bits) == 64 ? bfd_get_64 (abfd, ptr)             \
+   : (abort (), (bfd_vma) - 1))
 
-#define bfd_put(bits, abfd, val, ptr)                          \
-                ( (bits) ==  8 ? bfd_put_8  (abfd, val, ptr)   \
-                : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)   \
-                : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)   \
-                : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)   \
-                : (abort (), (void) 0))
+#define bfd_put(bits, abfd, val, ptr)                  \
+  ((bits) == 8 ? bfd_put_8  (abfd, val, ptr)           \
+   : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)                \
+   : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)                \
+   : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)                \
+   : (abort (), (void) 0))
 
 
 /* Byte swapping macros for file header data.  */
@@ -1059,11 +1007,9 @@ bfd_fill_in_gnu_debuglink_section PARAMS ((bfd * abfd, struct sec * sect, const
 
 
 /* Extracted from bfdio.c.  */
-long
-bfd_get_mtime PARAMS ((bfd *abfd));
+long bfd_get_mtime (bfd *abfd);
 
-long
-bfd_get_size PARAMS ((bfd *abfd));
+long bfd_get_size (bfd *abfd);
 
 /* Extracted from bfdwin.c.  */
 /* Extracted from section.c.  */
@@ -1393,7 +1339,7 @@ typedef struct sec
   file_ptr line_filepos;
 
   /* Pointer to data for applications.  */
-  PTR userdata;
+  void *userdata;
 
   /* If the SEC_IN_MEMORY flag is set, this points to the actual
      contents.  */
@@ -1422,7 +1368,7 @@ typedef struct sec
   /* What the section number is in the target world.  */
   int target_index;
 
-  PTR used_by_bfd;
+  void *used_by_bfd;
 
   /* If this is a constructor section then here is a list of the
      relocations created to relocate items within it.  */
@@ -1450,18 +1396,18 @@ typedef struct sec
 #define BFD_IND_SECTION_NAME "*IND*"
 
 /* The absolute section.  */
-extern const asection bfd_abs_section;
+extern 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;
+extern 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;
+extern asection bfd_com_section;
 #define bfd_com_section_ptr ((asection *) &bfd_com_section)
 /* Pointer to the indirect section.  */
-extern const asection bfd_ind_section;
+extern asection bfd_ind_section;
 #define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
 #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
 
@@ -1507,61 +1453,48 @@ extern const struct symbol_cache_entry * const bfd_ind_symbol;
     }                                                  \
   while (0)
 
-void
-bfd_section_list_clear PARAMS ((bfd *));
+void bfd_section_list_clear (bfd *);
 
-asection *
-bfd_get_section_by_name PARAMS ((bfd *abfd, const char *name));
+asection *bfd_get_section_by_name (bfd *abfd, const char *name);
 
-char *
-bfd_get_unique_section_name PARAMS ((bfd *abfd,
-    const char *templat,
-    int *count));
+char *bfd_get_unique_section_name
+   (bfd *abfd, const char *templat, int *count);
 
-asection *
-bfd_make_section_old_way PARAMS ((bfd *abfd, const char *name));
+asection *bfd_make_section_old_way (bfd *abfd, const char *name);
 
-asection *
-bfd_make_section_anyway PARAMS ((bfd *abfd, const char *name));
+asection *bfd_make_section_anyway (bfd *abfd, const char *name);
 
-asection *
-bfd_make_section PARAMS ((bfd *, const char *name));
+asection *bfd_make_section (bfd *, const char *name);
 
-bfd_boolean
-bfd_set_section_flags PARAMS ((bfd *abfd, asection *sec, flagword flags));
+bfd_boolean bfd_set_section_flags
+   (bfd *abfd, asection *sec, flagword flags);
 
-void
-bfd_map_over_sections PARAMS ((bfd *abfd,
-    void (*func) (bfd *abfd,
-    asection *sect,
-    PTR obj),
-    PTR obj));
+void bfd_map_over_sections
+   (bfd *abfd,
+    void (*func) (bfd *abfd, asection *sect, void *obj),
+    void *obj);
 
-bfd_boolean
-bfd_set_section_size PARAMS ((bfd *abfd, asection *sec, bfd_size_type val));
+bfd_boolean bfd_set_section_size
+   (bfd *abfd, asection *sec, bfd_size_type val);
 
-bfd_boolean
-bfd_set_section_contents PARAMS ((bfd *abfd, asection *section,
-    PTR data, file_ptr offset,
-    bfd_size_type count));
+bfd_boolean bfd_set_section_contents
+   (bfd *abfd, asection *section, void *data, file_ptr offset,
+    bfd_size_type count);
 
-bfd_boolean
-bfd_get_section_contents PARAMS ((bfd *abfd, asection *section,
-    PTR location, file_ptr offset,
-    bfd_size_type count));
+bfd_boolean bfd_get_section_contents
+   (bfd *abfd, asection *section, void *location, file_ptr offset,
+    bfd_size_type count);
 
-bfd_boolean
-bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec,
-    bfd *obfd, asection *osec));
+bfd_boolean bfd_copy_private_section_data
+   (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
 
 #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
      BFD_SEND (obfd, _bfd_copy_private_section_data, \
                (ibfd, isection, obfd, osection))
-void
-_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
+void _bfd_strip_section_from_output
+   (struct bfd_link_info *info, asection *section);
 
-bfd_boolean
-bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group));
+bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
 
 /* Extracted from archures.c.  */
 enum bfd_architecture
@@ -1635,6 +1568,7 @@ enum bfd_architecture
 #define bfd_mach_mips5400              5400
 #define bfd_mach_mips5500              5500
 #define bfd_mach_mips6000              6000
+#define bfd_mach_mips7000              7000
 #define bfd_mach_mips8000              8000
 #define bfd_mach_mips10000             10000
 #define bfd_mach_mips12000             12000
@@ -1761,6 +1695,7 @@ enum bfd_architecture
   bfd_arch_mn10300,   /* Matsushita MN10300 */
 #define bfd_mach_mn10300               300
 #define bfd_mach_am33          330
+#define bfd_mach_am33_2        332
   bfd_arch_fr30,
 #define bfd_mach_fr30          0x46523330
   bfd_arch_frv,
@@ -1829,62 +1764,45 @@ typedef struct bfd_arch_info
      all the entries for that arch can be accessed via <<next>>.  */
   bfd_boolean the_default;
   const struct bfd_arch_info * (*compatible)
-       PARAMS ((const struct bfd_arch_info *a,
-                const struct bfd_arch_info *b));
+    (const struct bfd_arch_info *a, const struct bfd_arch_info *b);
 
-  bfd_boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
+  bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
 
   const struct bfd_arch_info *next;
 }
 bfd_arch_info_type;
 
-const char *
-bfd_printable_name PARAMS ((bfd *abfd));
+const char *bfd_printable_name (bfd *abfd);
 
-const bfd_arch_info_type *
-bfd_scan_arch PARAMS ((const char *string));
+const bfd_arch_info_type *bfd_scan_arch (const char *string);
 
-const char **
-bfd_arch_list PARAMS ((void));
+const char **bfd_arch_list (void);
 
-const bfd_arch_info_type *
-bfd_arch_get_compatible PARAMS ((
-    const bfd *abfd,
-    const bfd *bbfd,
-    bfd_boolean accept_unknowns));
+const bfd_arch_info_type *bfd_arch_get_compatible
+   (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
 
-void
-bfd_set_arch_info PARAMS ((bfd *abfd, const bfd_arch_info_type *arg));
+void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
 
-enum bfd_architecture
-bfd_get_arch PARAMS ((bfd *abfd));
+enum bfd_architecture bfd_get_arch (bfd *abfd);
 
-unsigned long
-bfd_get_mach PARAMS ((bfd *abfd));
+unsigned long bfd_get_mach (bfd *abfd);
 
-unsigned int
-bfd_arch_bits_per_byte PARAMS ((bfd *abfd));
+unsigned int bfd_arch_bits_per_byte (bfd *abfd);
 
-unsigned int
-bfd_arch_bits_per_address PARAMS ((bfd *abfd));
+unsigned int bfd_arch_bits_per_address (bfd *abfd);
 
-const bfd_arch_info_type *
-bfd_get_arch_info PARAMS ((bfd *abfd));
+const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
 
-const bfd_arch_info_type *
-bfd_lookup_arch PARAMS ((enum bfd_architecture
-    arch,
-    unsigned long machine));
+const bfd_arch_info_type *bfd_lookup_arch
+   (enum bfd_architecture arch, unsigned long machine);
 
-const char *
-bfd_printable_arch_mach PARAMS ((enum bfd_architecture arch, unsigned long machine));
+const char *bfd_printable_arch_mach
+   (enum bfd_architecture arch, unsigned long machine);
 
-unsigned int
-bfd_octets_per_byte PARAMS ((bfd *abfd));
+unsigned int bfd_octets_per_byte (bfd *abfd);
 
-unsigned int
-bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
-    unsigned long machine));
+unsigned int bfd_arch_mach_octets_per_byte
+   (enum bfd_architecture arch, unsigned long machine);
 
 /* Extracted from reloc.c.  */
 typedef enum bfd_reloc_status
@@ -1996,8 +1914,8 @@ struct reloc_howto_struct
      strange relocation methods to be accomodated (e.g., i960 callj
      instructions).  */
   bfd_reloc_status_type (*special_function)
-    PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
-             bfd *, char **));
+    (bfd *, arelent *, struct symbol_cache_entry *, void *, asection *,
+     bfd *, char **);
 
   /* The textual name of the relocation type.  */
   char *name;
@@ -2054,7 +1972,7 @@ struct reloc_howto_struct
 
 #define HOWTO_PREPARE(relocation, symbol)               \
   {                                                     \
-    if (symbol != (asymbol *) NULL)                     \
+    if (symbol != NULL)                                 \
       {                                                 \
         if (bfd_is_com_section (symbol->section))       \
           {                                             \
@@ -2067,8 +1985,7 @@ struct reloc_howto_struct
       }                                                 \
   }
 
-unsigned int
-bfd_get_reloc_size PARAMS ((reloc_howto_type *));
+unsigned int bfd_get_reloc_size (reloc_howto_type *);
 
 typedef struct relent_chain
 {
@@ -2077,27 +1994,27 @@ typedef struct relent_chain
 }
 arelent_chain;
 
-bfd_reloc_status_type
-bfd_check_overflow PARAMS ((enum complain_overflow how,
+bfd_reloc_status_type bfd_check_overflow
+   (enum complain_overflow how,
     unsigned int bitsize,
     unsigned int rightshift,
     unsigned int addrsize,
-    bfd_vma relocation));
+    bfd_vma relocation);
 
-bfd_reloc_status_type
-bfd_perform_relocation PARAMS ((bfd *abfd,
+bfd_reloc_status_type bfd_perform_relocation
+   (bfd *abfd,
     arelent *reloc_entry,
-    PTR data,
+    void *data,
     asection *input_section,
     bfd *output_bfd,
-    char **error_message));
+    char **error_message);
 
-bfd_reloc_status_type
-bfd_install_relocation PARAMS ((bfd *abfd,
+bfd_reloc_status_type bfd_install_relocation
+   (bfd *abfd,
     arelent *reloc_entry,
-    PTR data, bfd_vma data_start,
+    void *data, bfd_vma data_start,
     asection *input_section,
-    char **error_message));
+    char **error_message);
 
 enum bfd_reloc_code_real {
   _dummy_first_bfd_reloc_code_real,
@@ -2417,6 +2334,33 @@ to compensate for the borrow when the low bits are added.  */
   BFD_RELOC_FRV_GPRELHI,
   BFD_RELOC_FRV_GPRELLO,
 
+/* This is a 24bit GOT-relative reloc for the mn10300.  */
+  BFD_RELOC_MN10300_GOTOFF24,
+
+/* This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes
+in the instruction.  */
+  BFD_RELOC_MN10300_GOT32,
+
+/* This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes
+in the instruction.  */
+  BFD_RELOC_MN10300_GOT24,
+
+/* This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes
+in the instruction.  */
+  BFD_RELOC_MN10300_GOT16,
+
+/* Copy symbol at runtime.  */
+  BFD_RELOC_MN10300_COPY,
+
+/* Create GOT entry.  */
+  BFD_RELOC_MN10300_GLOB_DAT,
+
+/* Create PLT entry.  */
+  BFD_RELOC_MN10300_JMP_SLOT,
+
+/* Adjust by program base.  */
+  BFD_RELOC_MN10300_RELATIVE,
+
 
 /* i386/elf relocations  */
   BFD_RELOC_386_GOT32,
@@ -3194,6 +3138,12 @@ into 22 bits.  */
   BFD_RELOC_390_TLS_DTPOFF,
   BFD_RELOC_390_TLS_TPOFF,
 
+/* Long displacement extension.  */
+  BFD_RELOC_390_20,
+  BFD_RELOC_390_GOT20,
+  BFD_RELOC_390_GOTPLT20,
+  BFD_RELOC_390_TLS_GOTIE20,
+
 /* Scenix IP2K - 9-bit register number / data address  */
   BFD_RELOC_IP2K_FR9,
 
@@ -3508,11 +3458,10 @@ BFD_RELOC_XTENSA_ASM_EXPAND.  */
   BFD_RELOC_XTENSA_ASM_SIMPLIFY,
   BFD_RELOC_UNUSED };
 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
-reloc_howto_type *
-bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+reloc_howto_type *bfd_reloc_type_lookup
+   (bfd *abfd, bfd_reloc_code_real_type code);
 
-const char *
-bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
+const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
 
 /* Extracted from syms.c.  */
 
@@ -3633,7 +3582,7 @@ typedef struct symbol_cache_entry
   /* Back end special data.  */
   union
     {
-      PTR p;
+      void *p;
       bfd_vma i;
     }
   udata;
@@ -3643,49 +3592,41 @@ asymbol;
 #define bfd_get_symtab_upper_bound(abfd) \
      BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
 
-bfd_boolean
-bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym));
+bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
 
-bfd_boolean
-bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name));
+bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
 
 #define bfd_is_local_label_name(abfd, name) \
-     BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
+  BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
 
 #define bfd_canonicalize_symtab(abfd, location) \
-     BFD_SEND (abfd, _bfd_canonicalize_symtab,\
-                  (abfd, location))
+  BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
 
-bfd_boolean
-bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
+bfd_boolean bfd_set_symtab
+   (bfd *abfd, asymbol **location, unsigned int count);
 
-void
-bfd_print_symbol_vandf PARAMS ((bfd *abfd, PTR file, asymbol *symbol));
+void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
 
 #define bfd_make_empty_symbol(abfd) \
-     BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
+  BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
 
-asymbol *
-_bfd_generic_make_empty_symbol PARAMS ((bfd *));
+asymbol *_bfd_generic_make_empty_symbol (bfd *);
 
 #define bfd_make_debug_symbol(abfd,ptr,size) \
-        BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
+  BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
 
-int
-bfd_decode_symclass PARAMS ((asymbol *symbol));
+int bfd_decode_symclass (asymbol *symbol);
 
-bfd_boolean
-bfd_is_undefined_symclass PARAMS ((int symclass));
+bfd_boolean bfd_is_undefined_symclass (int symclass);
 
-void
-bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret));
+void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
 
-bfd_boolean
-bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym));
+bfd_boolean bfd_copy_private_symbol_data
+   (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
 
 #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
-     BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
-               (ibfd, isymbol, obfd, osymbol))
+  BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
+            (ibfd, isymbol, obfd, osymbol))
 
 /* Extracted from bfd.c.  */
 struct bfd
@@ -3706,7 +3647,7 @@ struct bfd
      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;
+  void *iostream;
 
   /* Is the file descriptor being cached?  That is, can it be closed as
      needed, and re-opened when accessed later?  */
@@ -3792,7 +3733,7 @@ struct bfd
   const struct bfd_arch_info *arch_info;
 
   /* Stuff only useful for archives.  */
-  PTR arelt_data;
+  void *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.  */
@@ -3842,17 +3783,17 @@ struct bfd
       struct bfd_pef_data_struct *pef_data;
       struct bfd_pef_xlib_data_struct *pef_xlib_data;
       struct bfd_sym_data_struct *sym_data;
-      PTR any;
+      void *any;
     }
   tdata;
 
   /* Used by the application to hold private data.  */
-  PTR usrdata;
+  void *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;
+     struct objalloc *, but we use void * to avoid requiring the inclusion
+     of objalloc.h.  */
+  void *memory;
 };
 
 typedef enum bfd_error
@@ -3880,79 +3821,57 @@ typedef enum bfd_error
 }
 bfd_error_type;
 
-bfd_error_type
-bfd_get_error PARAMS ((void));
+bfd_error_type bfd_get_error (void);
 
-void
-bfd_set_error PARAMS ((bfd_error_type error_tag));
+void bfd_set_error (bfd_error_type error_tag);
 
-const char *
-bfd_errmsg PARAMS ((bfd_error_type error_tag));
+const char *bfd_errmsg (bfd_error_type error_tag);
 
-void
-bfd_perror PARAMS ((const char *message));
+void bfd_perror (const char *message);
 
-typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...));
+typedef void (*bfd_error_handler_type) (const char *, ...);
 
-bfd_error_handler_type
-bfd_set_error_handler PARAMS ((bfd_error_handler_type));
+bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
 
-void
-bfd_set_error_program_name PARAMS ((const char *));
+void bfd_set_error_program_name (const char *);
 
-bfd_error_handler_type
-bfd_get_error_handler PARAMS ((void));
+bfd_error_handler_type bfd_get_error_handler (void);
 
-const char *
-bfd_archive_filename PARAMS ((bfd *));
+const char *bfd_archive_filename (bfd *);
 
-long
-bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
+long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
 
-long
-bfd_canonicalize_reloc PARAMS ((bfd *abfd,
-    asection *sec,
-    arelent **loc,
-    asymbol **syms));
+long bfd_canonicalize_reloc
+   (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
 
-void
-bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count));
+void bfd_set_reloc
+   (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
 
-bfd_boolean
-bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags));
+bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
 
-int
-bfd_get_arch_size PARAMS ((bfd *abfd));
+int bfd_get_arch_size (bfd *abfd);
 
-int
-bfd_get_sign_extend_vma PARAMS ((bfd *abfd));
+int bfd_get_sign_extend_vma (bfd *abfd);
 
-bfd_boolean
-bfd_set_start_address PARAMS ((bfd *abfd, bfd_vma vma));
+bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
 
-unsigned int
-bfd_get_gp_size PARAMS ((bfd *abfd));
+unsigned int bfd_get_gp_size (bfd *abfd);
 
-void
-bfd_set_gp_size PARAMS ((bfd *abfd, unsigned int i));
+void bfd_set_gp_size (bfd *abfd, unsigned int i);
 
-bfd_vma
-bfd_scan_vma PARAMS ((const char *string, const char **end, int base));
+bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
 
-bfd_boolean
-bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
+bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
 
 #define bfd_copy_private_bfd_data(ibfd, obfd) \
      BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
                (ibfd, obfd))
-bfd_boolean
-bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
+bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
 
 #define bfd_merge_private_bfd_data(ibfd, obfd) \
      BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
                (ibfd, obfd))
-bfd_boolean
-bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
+bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
 
 #define bfd_set_private_flags(abfd, flags) \
      BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
@@ -4027,17 +3946,15 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
        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 *,
-                 bfd_boolean, asymbol **));
+  (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
+   bfd_boolean, asymbol **);
 
-bfd_boolean
-bfd_alt_mach_code PARAMS ((bfd *abfd, int alternative));
+bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
 
 struct bfd_preserve
 {
-  PTR marker;
-  PTR tdata;
+  void *marker;
+  void *tdata;
   flagword flags;
   const struct bfd_arch_info *arch_info;
   struct sec *sections;
@@ -4046,38 +3963,31 @@ struct bfd_preserve
   struct bfd_hash_table section_htab;
 };
 
-bfd_boolean
-bfd_preserve_save PARAMS ((bfd *, struct bfd_preserve *));
+bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
 
-void
-bfd_preserve_restore PARAMS ((bfd *, struct bfd_preserve *));
+void bfd_preserve_restore (bfd *, struct bfd_preserve *);
 
-void
-bfd_preserve_finish PARAMS ((bfd *, struct bfd_preserve *));
+void bfd_preserve_finish (bfd *, struct bfd_preserve *);
 
 /* Extracted from archive.c.  */
-symindex
-bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
+symindex bfd_get_next_mapent
+   (bfd *abfd, symindex previous, carsym **sym);
 
-bfd_boolean
-bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
+bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
 
-bfd *
-bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
+bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
 
 /* Extracted from corefile.c.  */
-const char *
-bfd_core_file_failing_command PARAMS ((bfd *abfd));
+const char *bfd_core_file_failing_command (bfd *abfd);
 
-int
-bfd_core_file_failing_signal PARAMS ((bfd *abfd));
+int bfd_core_file_failing_signal (bfd *abfd);
 
-bfd_boolean
-core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
+bfd_boolean core_file_matches_executable_p
+   (bfd *core_bfd, bfd *exec_bfd);
 
 /* Extracted from targets.c.  */
 #define BFD_SEND(bfd, message, arglist) \
-               ((*((bfd)->xvec->message)) arglist)
+  ((*((bfd)->xvec->message)) arglist)
 
 #ifdef DEBUG_BFD_SEND
 #undef BFD_SEND
@@ -4087,7 +3997,7 @@ core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
     (bfd_assert (__FILE__,__LINE__), NULL))
 #endif
 #define BFD_SEND_FMT(bfd, message, arglist) \
-            (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
+  (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
 
 #ifdef DEBUG_BFD_SEND
 #undef BFD_SEND_FMT
@@ -4165,307 +4075,303 @@ typedef struct bfd_target
   /* 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 *));
+  bfd_vma        (*bfd_getx64) (const bfd_byte *);
+  bfd_signed_vma (*bfd_getx_signed_64) (const bfd_byte *);
+  void           (*bfd_putx64) (bfd_vma, bfd_byte *);
+  bfd_vma        (*bfd_getx32) (const bfd_byte *);
+  bfd_signed_vma (*bfd_getx_signed_32) (const bfd_byte *);
+  void           (*bfd_putx32) (bfd_vma, bfd_byte *);
+  bfd_vma        (*bfd_getx16) (const bfd_byte *);
+  bfd_signed_vma (*bfd_getx_signed_16) (const bfd_byte *);
+  void           (*bfd_putx16) (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 *));
+  bfd_vma        (*bfd_h_getx64) (const bfd_byte *);
+  bfd_signed_vma (*bfd_h_getx_signed_64) (const bfd_byte *);
+  void           (*bfd_h_putx64) (bfd_vma, bfd_byte *);
+  bfd_vma        (*bfd_h_getx32) (const bfd_byte *);
+  bfd_signed_vma (*bfd_h_getx_signed_32) (const bfd_byte *);
+  void           (*bfd_h_putx32) (bfd_vma, bfd_byte *);
+  bfd_vma        (*bfd_h_getx16) (const bfd_byte *);
+  bfd_signed_vma (*bfd_h_getx_signed_16) (const bfd_byte *);
+  void           (*bfd_h_putx16) (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 *));
+  const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *);
 
   /* Set the format of a file being written.  */
-  bfd_boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
+  bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
 
   /* Write cached information into a file being written, at <<bfd_close>>.  */
-  bfd_boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
+  bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
 
 
   /* Generic entry points.  */
 #define BFD_JUMP_TABLE_GENERIC(NAME) \
-CONCAT2 (NAME,_close_and_cleanup), \
-CONCAT2 (NAME,_bfd_free_cached_info), \
-CONCAT2 (NAME,_new_section_hook), \
-CONCAT2 (NAME,_get_section_contents), \
-CONCAT2 (NAME,_get_section_contents_in_window)
+  NAME##_close_and_cleanup, \
+  NAME##_bfd_free_cached_info, \
+  NAME##_new_section_hook, \
+  NAME##_get_section_contents, \
+  NAME##_get_section_contents_in_window
 
   /* Called when the BFD is being closed to do any necessary cleanup.  */
-  bfd_boolean (*_close_and_cleanup) PARAMS ((bfd *));
+  bfd_boolean (*_close_and_cleanup) (bfd *);
   /* Ask the BFD to free all cached information.  */
-  bfd_boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
+  bfd_boolean (*_bfd_free_cached_info) (bfd *);
   /* Called when a new section is created.  */
-  bfd_boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
+  bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
   /* Read the contents of a section.  */
   bfd_boolean (*_bfd_get_section_contents)
-    PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+    (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
   bfd_boolean (*_bfd_get_section_contents_in_window)
-    PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type));
+    (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type);
 
   /* Entry points to copy private data.  */
 #define BFD_JUMP_TABLE_COPY(NAME) \
-CONCAT2 (NAME,_bfd_copy_private_bfd_data), \
-CONCAT2 (NAME,_bfd_merge_private_bfd_data), \
-CONCAT2 (NAME,_bfd_copy_private_section_data), \
-CONCAT2 (NAME,_bfd_copy_private_symbol_data), \
-CONCAT2 (NAME,_bfd_set_private_flags), \
-CONCAT2 (NAME,_bfd_print_private_bfd_data) \
+  NAME##_bfd_copy_private_bfd_data, \
+  NAME##_bfd_merge_private_bfd_data, \
+  NAME##_bfd_copy_private_section_data, \
+  NAME##_bfd_copy_private_symbol_data, \
+  NAME##_bfd_set_private_flags, \
+  NAME##_bfd_print_private_bfd_data
+
   /* Called to copy BFD general private data from one object file
      to another.  */
-  bfd_boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
+  bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
   /* Called to merge BFD general private data from one object file
      to a common output file when linking.  */
-  bfd_boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
+  bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
   /* Called to copy BFD private section data from one object file
      to another.  */
   bfd_boolean (*_bfd_copy_private_section_data)
-    PARAMS ((bfd *, sec_ptr, bfd *, sec_ptr));
+    (bfd *, sec_ptr, bfd *, sec_ptr);
   /* Called to copy BFD private symbol data from one symbol
      to another.  */
   bfd_boolean (*_bfd_copy_private_symbol_data)
-    PARAMS ((bfd *, asymbol *, bfd *, asymbol *));
+    (bfd *, asymbol *, bfd *, asymbol *);
   /* Called to set private backend flags.  */
-  bfd_boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
+  bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
 
   /* Called to print private BFD data.  */
-  bfd_boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
+  bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
 
   /* Core file entry points.  */
 #define BFD_JUMP_TABLE_CORE(NAME) \
-CONCAT2 (NAME,_core_file_failing_command), \
-CONCAT2 (NAME,_core_file_failing_signal), \
-CONCAT2 (NAME,_core_file_matches_executable_p)
-  char *      (*_core_file_failing_command) PARAMS ((bfd *));
-  int         (*_core_file_failing_signal) PARAMS ((bfd *));
-  bfd_boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
+  NAME##_core_file_failing_command, \
+  NAME##_core_file_failing_signal, \
+  NAME##_core_file_matches_executable_p
+
+  char *      (*_core_file_failing_command) (bfd *);
+  int         (*_core_file_failing_signal) (bfd *);
+  bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
 
   /* Archive entry points.  */
 #define BFD_JUMP_TABLE_ARCHIVE(NAME) \
-CONCAT2 (NAME,_slurp_armap), \
-CONCAT2 (NAME,_slurp_extended_name_table), \
-CONCAT2 (NAME,_construct_extended_name_table), \
-CONCAT2 (NAME,_truncate_arname), \
-CONCAT2 (NAME,_write_armap), \
-CONCAT2 (NAME,_read_ar_hdr), \
-CONCAT2 (NAME,_openr_next_archived_file), \
-CONCAT2 (NAME,_get_elt_at_index), \
-CONCAT2 (NAME,_generic_stat_arch_elt), \
-CONCAT2 (NAME,_update_armap_timestamp)
-  bfd_boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
-  bfd_boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
+  NAME##_slurp_armap, \
+  NAME##_slurp_extended_name_table, \
+  NAME##_construct_extended_name_table, \
+  NAME##_truncate_arname, \
+  NAME##_write_armap, \
+  NAME##_read_ar_hdr, \
+  NAME##_openr_next_archived_file, \
+  NAME##_get_elt_at_index, \
+  NAME##_generic_stat_arch_elt, \
+  NAME##_update_armap_timestamp
+
+  bfd_boolean (*_bfd_slurp_armap) (bfd *);
+  bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
   bfd_boolean (*_bfd_construct_extended_name_table)
-    PARAMS ((bfd *, char **, bfd_size_type *, const char **));
-  void        (*_bfd_truncate_arname) PARAMS ((bfd *, const char *, char *));
+    (bfd *, char **, bfd_size_type *, const char **);
+  void        (*_bfd_truncate_arname) (bfd *, const char *, char *);
   bfd_boolean (*write_armap)
-    PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
-  PTR         (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
-  bfd *       (*openr_next_archived_file) PARAMS ((bfd *, bfd *));
-#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 *));
-  bfd_boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
+    (bfd *, unsigned int, struct orl *, unsigned int, int);
+  void *      (*_bfd_read_ar_hdr_fn) (bfd *);
+  bfd *       (*openr_next_archived_file) (bfd *, bfd *);
+#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
+  bfd *       (*_bfd_get_elt_at_index) (bfd *, symindex);
+  int         (*_bfd_stat_arch_elt) (bfd *, struct stat *);
+  bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
 
   /* Entry points used for symbols.  */
 #define BFD_JUMP_TABLE_SYMBOLS(NAME) \
-CONCAT2 (NAME,_get_symtab_upper_bound), \
-CONCAT2 (NAME,_get_symtab), \
-CONCAT2 (NAME,_make_empty_symbol), \
-CONCAT2 (NAME,_print_symbol), \
-CONCAT2 (NAME,_get_symbol_info), \
-CONCAT2 (NAME,_bfd_is_local_label_name), \
-CONCAT2 (NAME,_get_lineno), \
-CONCAT2 (NAME,_find_nearest_line), \
-CONCAT2 (NAME,_bfd_make_debug_symbol), \
-CONCAT2 (NAME,_read_minisymbols), \
-CONCAT2 (NAME,_minisymbol_to_symbol)
-  long        (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
-  long        (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
-                                                struct symbol_cache_entry **));
+  NAME##_get_symtab_upper_bound, \
+  NAME##_get_symtab, \
+  NAME##_make_empty_symbol, \
+  NAME##_print_symbol, \
+  NAME##_get_symbol_info, \
+  NAME##_bfd_is_local_label_name, \
+  NAME##_get_lineno, \
+  NAME##_find_nearest_line, \
+  NAME##_bfd_make_debug_symbol, \
+  NAME##_read_minisymbols, \
+  NAME##_minisymbol_to_symbol
+
+  long        (*_bfd_get_symtab_upper_bound) (bfd *);
+  long        (*_bfd_canonicalize_symtab)
+    (bfd *, struct symbol_cache_entry **);
   struct symbol_cache_entry *
-              (*_bfd_make_empty_symbol) PARAMS ((bfd *));
+              (*_bfd_make_empty_symbol) (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))
+    (bfd *, void *, 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))
-  bfd_boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
+    (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))
+  bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
 
-  alent *     (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
+  alent *     (*_get_lineno) (bfd *, struct symbol_cache_entry *);
   bfd_boolean (*_bfd_find_nearest_line)
-    PARAMS ((bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
-             const char **, const char **, unsigned int *));
+    (bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
+     const char **, const char **, unsigned int *);
  /* 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 *, void *, unsigned long size));
+    (bfd *, void *, 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 *, bfd_boolean, PTR *, unsigned int *));
+    (bfd *, bfd_boolean, void **, 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 *, bfd_boolean, const PTR, asymbol *));
+    (bfd *, bfd_boolean, const void *, asymbol *);
 
   /* Routines for relocs.  */
 #define BFD_JUMP_TABLE_RELOCS(NAME) \
-CONCAT2 (NAME,_get_reloc_upper_bound), \
-CONCAT2 (NAME,_canonicalize_reloc), \
-CONCAT2 (NAME,_bfd_reloc_type_lookup)
-  long        (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
+  NAME##_get_reloc_upper_bound, \
+  NAME##_canonicalize_reloc, \
+  NAME##_bfd_reloc_type_lookup
+
+  long        (*_get_reloc_upper_bound) (bfd *, sec_ptr);
   long        (*_bfd_canonicalize_reloc)
-    PARAMS ((bfd *, sec_ptr, arelent **, struct symbol_cache_entry **));
+    (bfd *, sec_ptr, arelent **, struct symbol_cache_entry **);
   /* See documentation on reloc types.  */
   reloc_howto_type *
-              (*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type));
+              (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
 
   /* Routines used when writing an object file.  */
 #define BFD_JUMP_TABLE_WRITE(NAME) \
-CONCAT2 (NAME,_set_arch_mach), \
-CONCAT2 (NAME,_set_section_contents)
+  NAME##_set_arch_mach, \
+  NAME##_set_section_contents
+
   bfd_boolean (*_bfd_set_arch_mach)
-    PARAMS ((bfd *, enum bfd_architecture, unsigned long));
+    (bfd *, enum bfd_architecture, unsigned long);
   bfd_boolean (*_bfd_set_section_contents)
-    PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+    (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
 
   /* Routines used by the linker.  */
 #define BFD_JUMP_TABLE_LINK(NAME) \
-CONCAT2 (NAME,_sizeof_headers), \
-CONCAT2 (NAME,_bfd_get_relocated_section_contents), \
-CONCAT2 (NAME,_bfd_relax_section), \
-CONCAT2 (NAME,_bfd_link_hash_table_create), \
-CONCAT2 (NAME,_bfd_link_hash_table_free), \
-CONCAT2 (NAME,_bfd_link_add_symbols), \
-CONCAT2 (NAME,_bfd_link_just_syms), \
-CONCAT2 (NAME,_bfd_final_link), \
-CONCAT2 (NAME,_bfd_link_split_section), \
-CONCAT2 (NAME,_bfd_gc_sections), \
-CONCAT2 (NAME,_bfd_merge_sections), \
-CONCAT2 (NAME,_bfd_discard_group)
-  int         (*_bfd_sizeof_headers) PARAMS ((bfd *, bfd_boolean));
+  NAME##_sizeof_headers, \
+  NAME##_bfd_get_relocated_section_contents, \
+  NAME##_bfd_relax_section, \
+  NAME##_bfd_link_hash_table_create, \
+  NAME##_bfd_link_hash_table_free, \
+  NAME##_bfd_link_add_symbols, \
+  NAME##_bfd_link_just_syms, \
+  NAME##_bfd_final_link, \
+  NAME##_bfd_link_split_section, \
+  NAME##_bfd_gc_sections, \
+  NAME##_bfd_merge_sections, \
+  NAME##_bfd_discard_group
+
+  int         (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
   bfd_byte *  (*_bfd_get_relocated_section_contents)
-    PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
-             bfd_byte *, bfd_boolean, struct symbol_cache_entry **));
+    (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+     bfd_byte *, bfd_boolean, struct symbol_cache_entry **);
 
   bfd_boolean (*_bfd_relax_section)
-    PARAMS ((bfd *, struct sec *, struct bfd_link_info *, bfd_boolean *));
+    (bfd *, struct sec *, struct bfd_link_info *, bfd_boolean *);
 
   /* 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 *));
+              (*_bfd_link_hash_table_create) (bfd *);
 
   /* Release the memory associated with the linker hash table.  */
-  void        (*_bfd_link_hash_table_free)
-    PARAMS ((struct bfd_link_hash_table *));
+  void        (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *);
 
   /* Add symbols from this object file into the hash table.  */
-  bfd_boolean (*_bfd_link_add_symbols)
-    PARAMS ((bfd *, struct bfd_link_info *));
+  bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
 
   /* Indicate that we are only retrieving symbol values from this section.  */
-  void        (*_bfd_link_just_syms)
-    PARAMS ((asection *, struct bfd_link_info *));
+  void        (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
 
   /* Do a link based on the link_order structures attached to each
      section of the BFD.  */
-  bfd_boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
+  bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
 
   /* Should this section be split up into smaller pieces during linking.  */
-  bfd_boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
+  bfd_boolean (*_bfd_link_split_section) (bfd *, struct sec *);
 
   /* Remove sections that are not referenced from the output.  */
-  bfd_boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
+  bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
 
   /* Attempt to merge SEC_MERGE sections.  */
-  bfd_boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
+  bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
 
   /* Discard members of a group.  */
-  bfd_boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
+  bfd_boolean (*_bfd_discard_group) (bfd *, struct sec *);
 
   /* Routines to handle dynamic symbols and relocs.  */
 #define BFD_JUMP_TABLE_DYNAMIC(NAME) \
-CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
-CONCAT2 (NAME,_canonicalize_dynamic_symtab), \
-CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \
-CONCAT2 (NAME,_canonicalize_dynamic_reloc)
+  NAME##_get_dynamic_symtab_upper_bound, \
+  NAME##_canonicalize_dynamic_symtab, \
+  NAME##_get_dynamic_reloc_upper_bound, \
+  NAME##_canonicalize_dynamic_reloc
+
   /* Get the amount of memory required to hold the dynamic symbols.  */
-  long        (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
+  long        (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
   /* Read in the dynamic symbols.  */
   long        (*_bfd_canonicalize_dynamic_symtab)
-    PARAMS ((bfd *, struct symbol_cache_entry **));
+    (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 *));
+  long        (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
   /* Read in the dynamic relocs.  */
   long        (*_bfd_canonicalize_dynamic_reloc)
-    PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
+    (bfd *, arelent **, struct symbol_cache_entry **);
 
   /* Opposite endian version of this target.  */
   const struct bfd_target * alternative_target;
 
   /* Data for use by back-end routines, which isn't
      generic enough to belong in this structure.  */
-  PTR backend_data;
+  void *backend_data;
 
 } bfd_target;
 
-bfd_boolean
-bfd_set_default_target PARAMS ((const char *name));
+bfd_boolean bfd_set_default_target (const char *name);
 
-const bfd_target *
-bfd_find_target PARAMS ((const char *target_name, bfd *abfd));
+const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
 
-const char **
-bfd_target_list PARAMS ((void));
+const char ** bfd_target_list (void);
 
-const bfd_target *
-bfd_search_for_target PARAMS ((int (* search_func)
-       (const bfd_target *, void *),
-    void *));
+const bfd_target *bfd_search_for_target
+   (int (*search_func) (const bfd_target *, void *),
+    void *);
 
 /* Extracted from format.c.  */
-bfd_boolean
-bfd_check_format PARAMS ((bfd *abfd, bfd_format format));
+bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
 
-bfd_boolean
-bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format,
-    char ***matching));
+bfd_boolean bfd_check_format_matches
+   (bfd *abfd, bfd_format format, char ***matching);
 
-bfd_boolean
-bfd_set_format PARAMS ((bfd *abfd, bfd_format format));
+bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
 
-const char *
-bfd_format_string PARAMS ((bfd_format format));
+const char *bfd_format_string (bfd_format format);
 
 /* Extracted from linker.c.  */
-bfd_boolean
-bfd_link_split_section PARAMS ((bfd *abfd, asection *sec));
+bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
 
 #define bfd_link_split_section(abfd, sec) \
        BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
 
 /* Extracted from simple.c.  */
-bfd_byte *
-bfd_simple_get_relocated_section_contents PARAMS ((bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table));
+bfd_byte *bfd_simple_get_relocated_section_contents
+   (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
 
 #ifdef __cplusplus
 }
index e54bd89d6c279cb47ac1b016cfa50d657436b6a4..472d0ed9fbf8c949a1e68c1b556011bc0e309153 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -52,7 +52,7 @@ CODE_FRAGMENT
 .     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;
+.  void *iostream;
 .
 .  {* Is the file descriptor being cached?  That is, can it be closed as
 .     needed, and re-opened when accessed later?  *}
@@ -138,7 +138,7 @@ CODE_FRAGMENT
 .  const struct bfd_arch_info *arch_info;
 .
 .  {* Stuff only useful for archives.  *}
-.  PTR arelt_data;
+.  void *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.  *}
@@ -188,17 +188,17 @@ CODE_FRAGMENT
 .      struct bfd_pef_data_struct *pef_data;
 .      struct bfd_pef_xlib_data_struct *pef_xlib_data;
 .      struct bfd_sym_data_struct *sym_data;
-.      PTR any;
+.      void *any;
 .    }
 .  tdata;
 .
 .  {* Used by the application to hold private data.  *}
-.  PTR usrdata;
+.  void *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;
+.     struct objalloc *, but we use void * to avoid requiring the inclusion
+.     of objalloc.h.  *}
+.  void *memory;
 .};
 .
 */
@@ -206,13 +206,7 @@ CODE_FRAGMENT
 #include "bfd.h"
 #include "bfdver.h"
 #include "sysdep.h"
-
-#ifdef ANSI_PROTOTYPES
 #include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
 #include "libiberty.h"
 #include "safe-ctype.h"
 #include "bfdlink.h"
@@ -317,7 +311,7 @@ DESCRIPTION
 */
 
 bfd_error_type
-bfd_get_error ()
+bfd_get_error (void)
 {
   return bfd_error;
 }
@@ -334,8 +328,7 @@ DESCRIPTION
 */
 
 void
-bfd_set_error (error_tag)
-     bfd_error_type error_tag;
+bfd_set_error (bfd_error_type error_tag)
 {
   bfd_error = error_tag;
 }
@@ -353,8 +346,7 @@ DESCRIPTION
 */
 
 const char *
-bfd_errmsg (error_tag)
-     bfd_error_type error_tag;
+bfd_errmsg (bfd_error_type error_tag)
 {
 #ifndef errno
   extern int errno;
@@ -362,11 +354,10 @@ bfd_errmsg (error_tag)
   if (error_tag == bfd_error_system_call)
     return xstrerror (errno);
 
-  if ((((int) error_tag < (int) bfd_error_no_error) ||
-       ((int) error_tag > (int) bfd_error_invalid_error_code)))
-    error_tag = bfd_error_invalid_error_code;/* sanity check */
+  if (error_tag > bfd_error_invalid_error_code)
+    error_tag = bfd_error_invalid_error_code;  /* sanity check */
 
-  return _(bfd_errmsgs [(int)error_tag]);
+  return _(bfd_errmsgs [error_tag]);
 }
 
 /*
@@ -385,12 +376,11 @@ DESCRIPTION
 */
 
 void
-bfd_perror (message)
-     const char *message;
+bfd_perror (const char *message)
 {
   if (bfd_get_error () == bfd_error_system_call)
     /* Must be a system error then.  */
-    perror ((char *)message);
+    perror ((char *) message);
   else
     {
       if (message == NULL || *message == '\0')
@@ -412,7 +402,7 @@ SUBSECTION
 
 CODE_FRAGMENT
 .
-.typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...));
+.typedef void (*bfd_error_handler_type) (const char *, ...);
 .
 */
 
@@ -422,20 +412,19 @@ static const char *_bfd_error_program_name;
 
 /* This is the default routine to handle BFD error messages.  */
 
-static void _bfd_default_error_handler PARAMS ((const char *s, ...));
-
 static void
-_bfd_default_error_handler VPARAMS ((const char *s, ...))
+_bfd_default_error_handler (const char *s, ...)
 {
+  va_list p;
+
   if (_bfd_error_program_name != NULL)
     fprintf (stderr, "%s: ", _bfd_error_program_name);
   else
     fprintf (stderr, "BFD: ");
 
-  VA_OPEN (p, s);
-  VA_FIXEDARG (p, const char *, s);
+  va_start (p, s);
   vfprintf (stderr, s, p);
-  VA_CLOSE (p);
+  va_end (p);
 
   fprintf (stderr, "\n");
 }
@@ -461,8 +450,7 @@ DESCRIPTION
 */
 
 bfd_error_handler_type
-bfd_set_error_handler (pnew)
-     bfd_error_handler_type pnew;
+bfd_set_error_handler (bfd_error_handler_type pnew)
 {
   bfd_error_handler_type pold;
 
@@ -486,8 +474,7 @@ DESCRIPTION
 */
 
 void
-bfd_set_error_program_name (name)
-     const char *name;
+bfd_set_error_program_name (const char *name)
 {
   _bfd_error_program_name = name;
 }
@@ -504,7 +491,7 @@ DESCRIPTION
 */
 
 bfd_error_handler_type
-bfd_get_error_handler ()
+bfd_get_error_handler (void)
 {
   return _bfd_error_handler;
 }
@@ -523,8 +510,7 @@ DESCRIPTION
 */
 
 const char *
-bfd_archive_filename (abfd)
-     bfd *abfd;
+bfd_archive_filename (bfd *abfd)
 {
   if (abfd->my_archive)
     {
@@ -539,7 +525,7 @@ bfd_archive_filename (abfd)
          if (curr)
            free (buf);
          curr = needed + (needed >> 1);
-         buf = bfd_malloc ((bfd_size_type) curr);
+         buf = bfd_malloc (curr);
          /* If we can't malloc, fail safe by returning just the file
             name. This function is only used when building error
             messages.  */
@@ -577,9 +563,7 @@ DESCRIPTION
 */
 
 long
-bfd_get_reloc_upper_bound (abfd, asect)
-     bfd *abfd;
-     sec_ptr asect;
+bfd_get_reloc_upper_bound (bfd *abfd, sec_ptr asect)
 {
   if (abfd->format != bfd_object)
     {
@@ -596,10 +580,7 @@ FUNCTION
 
 SYNOPSIS
        long bfd_canonicalize_reloc
-               (bfd *abfd,
-               asection *sec,
-               arelent **loc,
-               asymbol **syms);
+         (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
 
 DESCRIPTION
        Call the back end associated with the open BFD
@@ -615,11 +596,10 @@ DESCRIPTION
 
 */
 long
-bfd_canonicalize_reloc (abfd, asect, location, symbols)
-     bfd *abfd;
-     sec_ptr asect;
-     arelent **location;
-     asymbol **symbols;
+bfd_canonicalize_reloc (bfd *abfd,
+                       sec_ptr asect,
+                       arelent **location,
+                       asymbol **symbols)
 {
   if (abfd->format != bfd_object)
     {
@@ -647,11 +627,10 @@ DESCRIPTION
 */
 
 void
-bfd_set_reloc (ignore_abfd, asect, location, count)
-     bfd *ignore_abfd ATTRIBUTE_UNUSED;
-     sec_ptr asect;
-     arelent **location;
-     unsigned int count;
+bfd_set_reloc (bfd *ignore_abfd ATTRIBUTE_UNUSED,
+              sec_ptr asect,
+              arelent **location,
+              unsigned int count)
 {
   asect->orelocation = location;
   asect->reloc_count = count;
@@ -678,9 +657,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_set_file_flags (abfd, flags)
-     bfd *abfd;
-     flagword flags;
+bfd_set_file_flags (bfd *abfd, flagword flags)
 {
   if (abfd->format != bfd_object)
     {
@@ -705,9 +682,7 @@ bfd_set_file_flags (abfd, flags)
 }
 
 void
-bfd_assert (file, line)
-     const char *file;
-     int line;
+bfd_assert (const char *file, int line)
 {
   (*_bfd_error_handler) (_("BFD %s assertion fail %s:%d"),
                         BFD_VERSION_STRING, file, line);
@@ -721,10 +696,7 @@ bfd_assert (file, line)
 #endif
 
 void
-_bfd_abort (file, line, fn)
-     const char *file;
-     int line;
-     const char *fn;
+_bfd_abort (const char *file, int line, const char *fn)
 {
   if (fn != NULL)
     (*_bfd_error_handler)
@@ -755,11 +727,10 @@ RETURNS
 */
 
 int
-bfd_get_arch_size (abfd)
-     bfd *abfd;
+bfd_get_arch_size (bfd *abfd)
 {
   if (abfd->xvec->flavour == bfd_target_elf_flavour)
-    return (get_elf_backend_data (abfd))->s->arch_size;
+    return get_elf_backend_data (abfd)->s->arch_size;
 
   return -1;
 }
@@ -786,13 +757,12 @@ RETURNS
 */
 
 int
-bfd_get_sign_extend_vma (abfd)
-     bfd *abfd;
+bfd_get_sign_extend_vma (bfd *abfd)
 {
   char *name;
 
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
-    return (get_elf_backend_data (abfd)->sign_extend_vma);
+    return get_elf_backend_data (abfd)->sign_extend_vma;
 
   name = bfd_get_target (abfd);
 
@@ -823,9 +793,7 @@ RETURNS
 */
 
 bfd_boolean
-bfd_set_start_address (abfd, vma)
-     bfd *abfd;
-     bfd_vma vma;
+bfd_set_start_address (bfd *abfd, bfd_vma vma)
 {
   abfd->start_address = vma;
   return TRUE;
@@ -845,8 +813,7 @@ DESCRIPTION
 */
 
 unsigned int
-bfd_get_gp_size (abfd)
-     bfd *abfd;
+bfd_get_gp_size (bfd *abfd)
 {
   if (abfd->format == bfd_object)
     {
@@ -872,9 +839,7 @@ DESCRIPTION
 */
 
 void
-bfd_set_gp_size (abfd, i)
-     bfd *abfd;
-     unsigned int i;
+bfd_set_gp_size (bfd *abfd, unsigned int i)
 {
   /* Don't try to set GP size on an archive or core file!  */
   if (abfd->format != bfd_object)
@@ -891,8 +856,7 @@ bfd_set_gp_size (abfd, i)
    register.  */
 
 bfd_vma
-_bfd_get_gp_value (abfd)
-     bfd *abfd;
+_bfd_get_gp_value (bfd *abfd)
 {
   if (! abfd)
     return 0;
@@ -910,9 +874,7 @@ _bfd_get_gp_value (abfd)
 /* Set the GP value.  */
 
 void
-_bfd_set_gp_value (abfd, v)
-     bfd *abfd;
-     bfd_vma v;
+_bfd_set_gp_value (bfd *abfd, bfd_vma v)
 {
   if (! abfd)
     BFD_FAIL ();
@@ -947,10 +909,7 @@ DESCRIPTION
 */
 
 bfd_vma
-bfd_scan_vma (string, end, base)
-     const char *string;
-     const char **end;
-     int base;
+bfd_scan_vma (const char *string, const char **end, int base)
 {
   bfd_vma value;
   bfd_vma cutoff;
@@ -959,7 +918,7 @@ bfd_scan_vma (string, end, base)
 
   /* Let the host do it if possible.  */
   if (sizeof (bfd_vma) <= sizeof (unsigned long))
-    return (bfd_vma) strtoul (string, (char **) end, base);
+    return strtoul (string, (char **) end, base);
 
   if (base == 0)
     {
@@ -1155,27 +1114,23 @@ DESCRIPTION
 .      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 *,
-.                bfd_boolean, asymbol **));
+.  (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
+.   bfd_boolean, asymbol **);
 .
 
 */
 
 bfd_byte *
-bfd_get_relocated_section_contents (abfd, link_info, link_order, data,
-                                   relocatable, symbols)
-     bfd *abfd;
-     struct bfd_link_info *link_info;
-     struct bfd_link_order *link_order;
-     bfd_byte *data;
-     bfd_boolean relocatable;
-     asymbol **symbols;
+bfd_get_relocated_section_contents (bfd *abfd,
+                                   struct bfd_link_info *link_info,
+                                   struct bfd_link_order *link_order,
+                                   bfd_byte *data,
+                                   bfd_boolean relocatable,
+                                   asymbol **symbols)
 {
   bfd *abfd2;
-  bfd_byte *(*fn) PARAMS ((bfd *, struct bfd_link_info *,
-                          struct bfd_link_order *, bfd_byte *, bfd_boolean,
-                          asymbol **));
+  bfd_byte *(*fn) (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+                  bfd_byte *, bfd_boolean, asymbol **);
 
   if (link_order->type == bfd_indirect_link_order)
     {
@@ -1194,18 +1149,16 @@ bfd_get_relocated_section_contents (abfd, link_info, link_order, data,
 /* Record information about an ELF program header.  */
 
 bfd_boolean
-bfd_record_phdr (abfd, type, flags_valid, flags, at_valid, at,
-                includes_filehdr, includes_phdrs, count, secs)
-     bfd *abfd;
-     unsigned long type;
-     bfd_boolean flags_valid;
-     flagword flags;
-     bfd_boolean at_valid;
-     bfd_vma at;
-     bfd_boolean includes_filehdr;
-     bfd_boolean includes_phdrs;
-     unsigned int count;
-     asection **secs;
+bfd_record_phdr (bfd *abfd,
+                unsigned long type,
+                bfd_boolean flags_valid,
+                flagword flags,
+                bfd_boolean at_valid,
+                bfd_vma at,
+                bfd_boolean includes_filehdr,
+                bfd_boolean includes_phdrs,
+                unsigned int count,
+                asection **secs)
 {
   struct elf_segment_map *m, **pm;
   bfd_size_type amt;
@@ -1215,7 +1168,7 @@ bfd_record_phdr (abfd, type, flags_valid, flags, at_valid, at,
 
   amt = sizeof (struct elf_segment_map);
   amt += ((bfd_size_type) count - 1) * sizeof (asection *);
-  m = (struct elf_segment_map *) bfd_alloc (abfd, amt);
+  m = bfd_alloc (abfd, amt);
   if (m == NULL)
     return FALSE;
 
@@ -1223,10 +1176,10 @@ bfd_record_phdr (abfd, type, flags_valid, flags, at_valid, at,
   m->p_type = type;
   m->p_flags = flags;
   m->p_paddr = at;
-  m->p_flags_valid = (unsigned int) flags_valid;
-  m->p_paddr_valid = (unsigned int) at_valid;
-  m->includes_filehdr = (unsigned int) includes_filehdr;
-  m->includes_phdrs = (unsigned int) includes_phdrs;
+  m->p_flags_valid = flags_valid;
+  m->p_paddr_valid = at_valid;
+  m->includes_filehdr = includes_filehdr;
+  m->includes_phdrs = includes_phdrs;
   m->count = count;
   if (count > 0)
     memcpy (m->sections, secs, count * sizeof (asection *));
@@ -1239,10 +1192,7 @@ bfd_record_phdr (abfd, type, flags_valid, flags, at_valid, at,
 }
 
 void
-bfd_sprintf_vma (abfd, buf, value)
-     bfd *abfd;
-     char *buf;
-     bfd_vma value;
+bfd_sprintf_vma (bfd *abfd, char *buf, bfd_vma value)
 {
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
     get_elf_backend_data (abfd)->elf_backend_sprintf_vma (abfd, buf, value);
@@ -1251,10 +1201,7 @@ bfd_sprintf_vma (abfd, buf, value)
 }
 
 void
-bfd_fprintf_vma (abfd, stream, value)
-     bfd *abfd;
-     PTR stream;
-     bfd_vma value;
+bfd_fprintf_vma (bfd *abfd, void *stream, bfd_vma value)
 {
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
     get_elf_backend_data (abfd)->elf_backend_fprintf_vma (abfd, stream, value);
@@ -1279,9 +1226,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_alt_mach_code (abfd, alternative)
-     bfd *abfd;
-     int alternative;
+bfd_alt_mach_code (bfd *abfd, int alternative)
 {
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
     {
@@ -1322,8 +1267,8 @@ CODE_FRAGMENT
 
 .struct bfd_preserve
 .{
-.  PTR marker;
-.  PTR tdata;
+.  void *marker;
+.  void *tdata;
 .  flagword flags;
 .  const struct bfd_arch_info *arch_info;
 .  struct sec *sections;
@@ -1355,9 +1300,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_preserve_save (abfd, preserve)
-     bfd *abfd;
-     struct bfd_preserve *preserve;
+bfd_preserve_save (bfd *abfd, struct bfd_preserve *preserve)
 {
   preserve->tdata = abfd->tdata.any;
   preserve->arch_info = abfd->arch_info;
@@ -1395,9 +1338,7 @@ DESCRIPTION
 */
 
 void
-bfd_preserve_restore (abfd, preserve)
-     bfd *abfd;
-     struct bfd_preserve *preserve;
+bfd_preserve_restore (bfd *abfd, struct bfd_preserve *preserve)
 {
   bfd_hash_table_free (&abfd->section_htab);
 
@@ -1433,9 +1374,7 @@ DESCRIPTION
 */
 
 void
-bfd_preserve_finish (abfd, preserve)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct bfd_preserve *preserve;
+bfd_preserve_finish (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_preserve *preserve)
 {
   /* It would be nice to be able to free more memory here, eg. old
      tdata, but that's not possible since these blocks are sitting
index 322931623674a7319efd714f517e7fd19cf3fcc2..377622fe55774b3a43c2b1a22b921553112561b4 100644 (file)
@@ -43,13 +43,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    contents (0 for non-archive elements).  For archive entries this is the
    first octet in the file, NOT the beginning of the archive header.  */
 
-static size_t real_read PARAMS ((PTR where, size_t a, size_t b, FILE *file));
 static size_t
-real_read (where, a, b, file)
-     PTR where;
-     size_t a;
-     size_t b;
-     FILE *file;
+real_read (void *where, size_t a, size_t b, FILE *file)
 {
   /* FIXME - this looks like an optimization, but it's really to cover
      up for a feature of some OSs (not solaris - sigh) that
@@ -76,10 +71,7 @@ real_read (where, a, b, file)
 /* Return value is amount read.  */
 
 bfd_size_type
-bfd_bread (ptr, size, abfd)
-     PTR ptr;
-     bfd_size_type size;
-     bfd *abfd;
+bfd_bread (void *ptr, bfd_size_type size, bfd *abfd)
 {
   size_t nread;
 
@@ -88,7 +80,7 @@ bfd_bread (ptr, size, abfd)
       struct bfd_in_memory *bim;
       bfd_size_type get;
 
-      bim = (struct bfd_in_memory *) abfd->iostream;
+      bim = abfd->iostream;
       get = size;
       if (abfd->where + get > bim->size)
        {
@@ -126,16 +118,13 @@ bfd_bread (ptr, size, abfd)
 }
 
 bfd_size_type
-bfd_bwrite (ptr, size, abfd)
-     const PTR ptr;
-     bfd_size_type size;
-     bfd *abfd;
+bfd_bwrite (const void *ptr, bfd_size_type size, bfd *abfd)
 {
   size_t nwrote;
 
   if ((abfd->flags & BFD_IN_MEMORY) != 0)
     {
-      struct bfd_in_memory *bim = (struct bfd_in_memory *) (abfd->iostream);
+      struct bfd_in_memory *bim = abfd->iostream;
       size = (size_t) size;
       if (abfd->where + size > bim->size)
        {
@@ -147,7 +136,7 @@ bfd_bwrite (ptr, size, abfd)
          newsize = (bim->size + 127) & ~(bfd_size_type) 127;
          if (newsize > oldsize)
            {
-             bim->buffer = (bfd_byte *) bfd_realloc (bim->buffer, newsize);
+             bim->buffer = bfd_realloc (bim->buffer, newsize);
              if (bim->buffer == 0)
                {
                  bim->size = 0;
@@ -174,8 +163,7 @@ bfd_bwrite (ptr, size, abfd)
 }
 
 bfd_vma
-bfd_tell (abfd)
-     bfd *abfd;
+bfd_tell (bfd *abfd)
 {
   file_ptr ptr;
 
@@ -191,8 +179,7 @@ bfd_tell (abfd)
 }
 
 int
-bfd_flush (abfd)
-     bfd *abfd;
+bfd_flush (bfd *abfd)
 {
   if ((abfd->flags & BFD_IN_MEMORY) != 0)
     return 0;
@@ -202,9 +189,7 @@ bfd_flush (abfd)
 /* Returns 0 for success, negative value for failure (in which case
    bfd_get_error can retrieve the error code).  */
 int
-bfd_stat (abfd, statbuf)
-     bfd *abfd;
-     struct stat *statbuf;
+bfd_stat (bfd *abfd, struct stat *statbuf)
 {
   FILE *f;
   int result;
@@ -228,10 +213,7 @@ bfd_stat (abfd, statbuf)
    can retrieve the error code).  */
 
 int
-bfd_seek (abfd, position, direction)
-     bfd *abfd;
-     file_ptr position;
-     int direction;
+bfd_seek (bfd *abfd, file_ptr position, int direction)
 {
   int result;
   FILE *f;
@@ -249,7 +231,7 @@ bfd_seek (abfd, position, direction)
     {
       struct bfd_in_memory *bim;
 
-      bim = (struct bfd_in_memory *) abfd->iostream;
+      bim = abfd->iostream;
 
       if (direction == SEEK_SET)
        abfd->where = position;
@@ -268,7 +250,7 @@ bfd_seek (abfd, position, direction)
              newsize = (bim->size + 127) & ~(bfd_size_type) 127;
              if (newsize > oldsize)
                {
-                 bim->buffer = (bfd_byte *) bfd_realloc (bim->buffer, newsize);
+                 bim->buffer = bfd_realloc (bim->buffer, newsize);
                  if (bim->buffer == 0)
                    {
                      bim->size = 0;
@@ -359,7 +341,7 @@ FUNCTION
        bfd_get_mtime
 
 SYNOPSIS
-       long bfd_get_mtime(bfd *abfd);
+       long bfd_get_mtime (bfd *abfd);
 
 DESCRIPTION
        Return the file modification time (as read from the file system, or
@@ -368,8 +350,7 @@ DESCRIPTION
 */
 
 long
-bfd_get_mtime (abfd)
-     bfd *abfd;
+bfd_get_mtime (bfd *abfd)
 {
   FILE *fp;
   struct stat buf;
@@ -390,7 +371,7 @@ FUNCTION
        bfd_get_size
 
 SYNOPSIS
-       long bfd_get_size(bfd *abfd);
+       long bfd_get_size (bfd *abfd);
 
 DESCRIPTION
        Return the file size (as read from file system) for the file
@@ -419,8 +400,7 @@ DESCRIPTION
 */
 
 long
-bfd_get_size (abfd)
-     bfd *abfd;
+bfd_get_size (bfd *abfd)
 {
   FILE *fp;
   struct stat buf;
index 442a8a4905bf835cd402f4071360f6a660ae94f4..00d1a146e0728677672456ff5030a47909c9268b 100644 (file)
@@ -52,7 +52,7 @@ INTERNAL_DEFINITION
 
 .struct _bfd_window_internal {
 .  struct _bfd_window_internal *next;
-.  PTR data;
+.  void *data;
 .  bfd_size_type size;
 .  int refcount : 31;          {* should be enough...  *}
 .  unsigned mapped : 1;                {* 1 = mmap, 0 = malloc *}
@@ -60,8 +60,7 @@ INTERNAL_DEFINITION
 */
 
 void
-bfd_init_window (windowp)
-     bfd_window *windowp;
+bfd_init_window (bfd_window *windowp)
 {
   windowp->data = 0;
   windowp->i = 0;
@@ -69,8 +68,7 @@ bfd_init_window (windowp)
 }
 
 void
-bfd_free_window (windowp)
-     bfd_window *windowp;
+bfd_free_window (bfd_window *windowp)
 {
   bfd_window_internal *i = windowp->i;
   windowp->i = 0;
@@ -108,12 +106,11 @@ bfd_free_window (windowp)
 static int ok_to_map = 1;
 
 bfd_boolean
-bfd_get_file_window (abfd, offset, size, windowp, writable)
-     bfd *abfd;
-     file_ptr offset;
-     bfd_size_type size;
-     bfd_window *windowp;
-     bfd_boolean writable;
+bfd_get_file_window (bfd *abfd,
+                    file_ptr offset,
+                    bfd_size_type size,
+                    bfd_window *windowp,
+                    bfd_boolean writable)
 {
   static size_t pagesize;
   bfd_window_internal *i = windowp->i;
@@ -133,8 +130,7 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
 
   if (i == 0)
     {
-      i = ((bfd_window_internal *)
-          bfd_zmalloc ((bfd_size_type) sizeof (bfd_window_internal)));
+      i = bfd_zmalloc (sizeof (bfd_window_internal));
       windowp->i = i;
       if (i == 0)
        return FALSE;
@@ -180,7 +176,7 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
                       ? MAP_FILE | MAP_PRIVATE
                       : MAP_FILE | MAP_SHARED),
                      fd, file_offset);
-      if (i->data == (PTR) -1)
+      if (i->data == (void *) -1)
        {
          /* An error happened.  Report it, or try using malloc, or
             something.  */
@@ -195,7 +191,7 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
        fprintf (stderr, "\n\tmapped %ld at %p, offset is %ld\n",
                 (long) real_size, i->data, (long) offset2);
       i->size = real_size;
-      windowp->data = (PTR) ((bfd_byte *) i->data + offset2);
+      windowp->data = (bfd_byte *) i->data + offset2;
       windowp->size = size;
       i->mapped = 1;
       return TRUE;
@@ -222,7 +218,7 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
   if (debug_windows)
     fprintf (stderr, "\n\t%s(%6ld)",
             i->data ? "realloc" : " malloc", (long) size_to_alloc);
-  i->data = (PTR) bfd_realloc (i->data, size_to_alloc);
+  i->data = bfd_realloc (i->data, size_to_alloc);
   if (debug_windows)
     fprintf (stderr, "\t-> %p\n", i->data);
   i->refcount = 1;
index 98a1c72e88437141498d60169c9e6071b465f99d..b3091659984c4c91d31ded8a49443b97f1fe76f1 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD library -- caching of file descriptors.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001, 2002
+   Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
 
@@ -40,10 +40,7 @@ SECTION
 #include "sysdep.h"
 #include "libbfd.h"
 
-static void insert PARAMS ((bfd *));
-static void snip PARAMS ((bfd *));
-static bfd_boolean close_one PARAMS ((void));
-static bfd_boolean bfd_cache_delete PARAMS ((bfd *));
+static bfd_boolean bfd_cache_delete (bfd *);
 
 /*
 INTERNAL_FUNCTION
@@ -95,9 +92,8 @@ bfd *bfd_last_cache;
 
 /* Insert a BFD into the cache.  */
 
-static INLINE void
-insert (abfd)
-     bfd *abfd;
+static void
+insert (bfd *abfd)
 {
   if (bfd_last_cache == NULL)
     {
@@ -116,9 +112,8 @@ insert (abfd)
 
 /* Remove a BFD from the cache.  */
 
-static INLINE void
-snip (abfd)
-     bfd *abfd;
+static void
+snip (bfd *abfd)
 {
   abfd->lru_prev->lru_next = abfd->lru_next;
   abfd->lru_next->lru_prev = abfd->lru_prev;
@@ -134,7 +129,7 @@ snip (abfd)
    recently used cacheable BFD and close it.  */
 
 static bfd_boolean
-close_one ()
+close_one (void)
 {
   register bfd *kill;
 
@@ -168,8 +163,7 @@ close_one ()
 /* Close a BFD and remove it from the cache.  */
 
 static bfd_boolean
-bfd_cache_delete (abfd)
-     bfd *abfd;
+bfd_cache_delete (bfd *abfd)
 {
   bfd_boolean ret;
 
@@ -201,8 +195,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_cache_init (abfd)
-     bfd *abfd;
+bfd_cache_init (bfd *abfd)
 {
   BFD_ASSERT (abfd->iostream != NULL);
   if (open_files >= BFD_CACHE_MAX_OPEN)
@@ -232,8 +225,7 @@ RETURNS
 */
 
 bfd_boolean
-bfd_cache_close (abfd)
-     bfd *abfd;
+bfd_cache_close (bfd *abfd)
 {
   if (abfd->iostream == NULL
       || (abfd->flags & BFD_IN_MEMORY) != 0)
@@ -247,7 +239,7 @@ INTERNAL_FUNCTION
        bfd_open_file
 
 SYNOPSIS
-       FILE* bfd_open_file(bfd *abfd);
+       FILE* bfd_open_file (bfd *abfd);
 
 DESCRIPTION
        Call the OS to open a file for @var{abfd}.  Return the <<FILE *>>
@@ -258,8 +250,7 @@ DESCRIPTION
 */
 
 FILE *
-bfd_open_file (abfd)
-     bfd *abfd;
+bfd_open_file (bfd *abfd)
 {
   abfd->cacheable = TRUE;      /* Allow it to be closed later.  */
 
@@ -331,7 +322,7 @@ INTERNAL_FUNCTION
        bfd_cache_lookup_worker
 
 SYNOPSIS
-       FILE *bfd_cache_lookup_worker(bfd *abfd);
+       FILE *bfd_cache_lookup_worker (bfd *abfd);
 
 DESCRIPTION
        Called when the macro <<bfd_cache_lookup>> fails to find a
@@ -342,8 +333,7 @@ DESCRIPTION
 */
 
 FILE *
-bfd_cache_lookup_worker (abfd)
-     bfd *abfd;
+bfd_cache_lookup_worker (bfd *abfd)
 {
   if ((abfd->flags & BFD_IN_MEMORY) != 0)
     abort ();
index 98d7048a26cc3a13bbb2019251e355af3ff8eed2..3655a30903b46d1304594071bb56be678bc2ef43 100644 (file)
@@ -2613,9 +2613,9 @@ coff_arm_final_link_postscript (abfd, pfinfo)
 
 #ifndef EXTRA_S_FLAGS
 #ifdef COFF_WITH_PE
-#define EXTRA_S_FLAGS (SEC_LINK_ONCE | SEC_LINK_DUPLICATES)
+#define EXTRA_S_FLAGS (SEC_CODE | SEC_LINK_ONCE | SEC_LINK_DUPLICATES)
 #else
-#define EXTRA_S_FLAGS 0
+#define EXTRA_S_FLAGS SEC_CODE
 #endif
 #endif
 
index 9ef907b87df96ddbadc17f2e6dd54c6fbcb4c5d6..bfe31c6cd4ee10bb34d4a5ad94027c2ac5048e40 100644 (file)
@@ -61,33 +61,33 @@ struct funcvec_hash_table
 
 static struct bfd_hash_entry *
 funcvec_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+  (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
 
 static bfd_boolean
 funcvec_hash_table_init
-  PARAMS ((struct funcvec_hash_table *, bfd *,
-          struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
-                                      struct bfd_hash_table *,
-                                      const char *)));
+  (struct funcvec_hash_table *, bfd *,
+   struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+                              struct bfd_hash_table *,
+                              const char *));
 
 static bfd_reloc_status_type special
-  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+  (bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **);
 static int select_reloc
-  PARAMS ((reloc_howto_type *));
+  (reloc_howto_type *);
 static void rtype2howto
-  PARAMS ((arelent *, struct internal_reloc *));
+  (arelent *, struct internal_reloc *);
 static void reloc_processing
-  PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
+  (arelent *, struct internal_reloc *, asymbol **, bfd *, asection *);
 static bfd_boolean h8300_symbol_address_p
-  PARAMS ((bfd *, asection *, bfd_vma));
+  (bfd *, asection *, bfd_vma);
 static int h8300_reloc16_estimate
-  PARAMS ((bfd *, asection *, arelent *, unsigned int,
-    struct bfd_link_info *));
+  (bfd *, asection *, arelent *, unsigned int,
+   struct bfd_link_info *);
 static void h8300_reloc16_extra_cases
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
-    bfd_byte *, unsigned int *, unsigned int *));
+  (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
+   bfd_byte *, unsigned int *, unsigned int *);
 static bfd_boolean h8300_bfd_link_add_symbols
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* To lookup a value in the function vector hash table.  */
 #define funcvec_hash_lookup(table, string, create, copy) \
@@ -111,8 +111,7 @@ struct h8300_coff_link_hash_table {
   struct funcvec_hash_table *funcvec_hash_table;
 };
 
-static struct bfd_link_hash_table *h8300_coff_link_hash_table_create
-  PARAMS ((bfd *));
+static struct bfd_link_hash_table *h8300_coff_link_hash_table_create (bfd *);
 
 /* Get the H8/300 COFF linker hash table from a link_info structure.  */
 
@@ -123,10 +122,9 @@ static struct bfd_link_hash_table *h8300_coff_link_hash_table_create
    a new entry is added to the funcvec hash table.  */
 
 static struct bfd_hash_entry *
-funcvec_hash_newfunc (entry, gen_table, string)
-     struct bfd_hash_entry *entry;
-     struct bfd_hash_table *gen_table;
-     const char *string;
+funcvec_hash_newfunc (struct bfd_hash_entry *entry,
+                     struct bfd_hash_table *gen_table,
+                     const char *string)
 {
   struct funcvec_hash_entry *ret;
   struct funcvec_hash_table *table;
@@ -171,12 +169,12 @@ funcvec_hash_newfunc (entry, gen_table, string)
 /* Initialize the function vector hash table.  */
 
 static bfd_boolean
-funcvec_hash_table_init (table, abfd, newfunc)
-     struct funcvec_hash_table *table;
-     bfd *abfd;
-     struct bfd_hash_entry *(*newfunc)
-       PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
-               const char *));
+funcvec_hash_table_init (struct funcvec_hash_table *table,
+                        bfd *abfd,
+                        struct bfd_hash_entry *(*newfunc)
+                          (struct bfd_hash_entry *,
+                           struct bfd_hash_table *,
+                           const char *))
 {
   /* Initialize our local fields, then call the generic initialization
      routine.  */
@@ -190,8 +188,7 @@ funcvec_hash_table_init (table, abfd, newfunc)
    without using static variables.  */
 
 static struct bfd_link_hash_table *
-h8300_coff_link_hash_table_create (abfd)
-     bfd *abfd;
+h8300_coff_link_hash_table_create (bfd *abfd)
 {
   struct h8300_coff_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct h8300_coff_link_hash_table);
@@ -224,15 +221,13 @@ h8300_coff_link_hash_table_create (abfd)
    the addend until the final link.  */
 
 static bfd_reloc_status_type
-special (abfd, reloc_entry, symbol, data, input_section, output_bfd,
-        error_message)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *reloc_entry ATTRIBUTE_UNUSED;
-     asymbol *symbol ATTRIBUTE_UNUSED;
-     PTR data ATTRIBUTE_UNUSED;
-     asection *input_section ATTRIBUTE_UNUSED;
-     bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
+special (bfd *abfd ATTRIBUTE_UNUSED,
+        arelent *reloc_entry ATTRIBUTE_UNUSED,
+        asymbol *symbol ATTRIBUTE_UNUSED,
+        PTR data ATTRIBUTE_UNUSED,
+        asection *input_section ATTRIBUTE_UNUSED,
+        bfd *output_bfd,
+        char **error_message ATTRIBUTE_UNUSED)
 {
   if (output_bfd == (bfd *) NULL)
     return bfd_reloc_continue;
@@ -294,8 +289,7 @@ static reloc_howto_type howto_table[] = {
   dst->r_stuff[1] = 'C';
 
 static int
-select_reloc (howto)
-     reloc_howto_type *howto;
+select_reloc (reloc_howto_type *howto)
 {
   return howto->type;
 }
@@ -303,9 +297,7 @@ select_reloc (howto)
 /* Code to turn a r_type into a howto ptr, uses the above howto table.  */
 
 static void
-rtype2howto (internal, dst)
-     arelent *internal;
-     struct internal_reloc *dst;
+rtype2howto (arelent *internal, struct internal_reloc *dst)
 {
   switch (dst->r_type)
     {
@@ -386,12 +378,8 @@ rtype2howto (internal, dst)
  reloc_processing (relent, reloc, symbols, abfd, section)
 
 static void
-reloc_processing (relent, reloc, symbols, abfd, section)
-     arelent *relent;
-     struct internal_reloc *reloc;
-     asymbol **symbols;
-     bfd *abfd;
-     asection *section;
+reloc_processing (arelent *relent, struct internal_reloc *reloc,
+                 asymbol **symbols, bfd *abfd, asection *section)
 {
   relent->address = reloc->r_vaddr;
   rtype2howto (relent, reloc);
@@ -410,10 +398,7 @@ reloc_processing (relent, reloc, symbols, abfd, section)
 }
 
 static bfd_boolean
-h8300_symbol_address_p (abfd, input_section, address)
-     bfd *abfd;
-     asection *input_section;
-     bfd_vma address;
+h8300_symbol_address_p (bfd *abfd, asection *input_section, bfd_vma address)
 {
   asymbol **s;
 
@@ -445,12 +430,8 @@ h8300_symbol_address_p (abfd, input_section, address)
    in the howto table.  This needs to be fixed.  */
 
 static int
-h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
-     bfd *abfd;
-     asection *input_section;
-     arelent *reloc;
-     unsigned int shrink;
-     struct bfd_link_info *link_info;
+h8300_reloc16_estimate (bfd *abfd, asection *input_section, arelent *reloc,
+                       unsigned int shrink, struct bfd_link_info *link_info)
 {
   bfd_vma value;
   bfd_vma dot;
@@ -592,17 +573,11 @@ h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
     case R_MOV16B1:
       /* Get the address of the data referenced by this mov.b insn.  */
       value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
+      value = bfd_h8300_pad_address (abfd, value);
 
-      /* The address is in 0xff00..0xffff inclusive on the h8300 or
-        0xffff00..0xffffff inclusive on the h8300h, then we can
-        relax this mov.b  */
-      if ((bfd_get_mach (abfd) == bfd_mach_h8300
-          && value >= 0xff00
-          && value <= 0xffff)
-         || ((bfd_get_mach (abfd) == bfd_mach_h8300h
-              || bfd_get_mach (abfd) == bfd_mach_h8300s)
-             && value >= 0xffff00
-             && value <= 0xffffff))
+      /* If the address is in the top 256 bytes of the address space
+        then we can relax this instruction.  */
+      if (value >= 0xffffff00u)
        {
          /* Change the reloc type.  */
          reloc->howto = reloc->howto + 1;
@@ -619,13 +594,9 @@ h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
     case R_MOV24B1:
       /* Get the address of the data referenced by this mov.b insn.  */
       value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
+      value = bfd_h8300_pad_address (abfd, value);
 
-      /* The address is in 0xffff00..0xffffff inclusive on the h8300h,
-        then we can relax this mov.b  */
-      if ((bfd_get_mach (abfd) == bfd_mach_h8300h
-          || bfd_get_mach (abfd) == bfd_mach_h8300s)
-         && value >= 0xffff00
-         && value <= 0xffffff)
+      if (value >= 0xffffff00u)
        {
          /* Change the reloc type.  */
          reloc->howto = reloc->howto + 1;
@@ -646,10 +617,11 @@ h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
     case R_MOVL1:
       /* Get the address of the data referenced by this mov insn.  */
       value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
+      value = bfd_h8300_pad_address (abfd, value);
 
-      /* If this address is in 0x0000..0x7fff inclusive or
-        0xff8000..0xffffff inclusive, then it can be relaxed.  */
-      if (value <= 0x7fff || value >= 0xff8000)
+      /* If the address is a sign-extended 16-bit value then we can
+         relax this instruction.  */
+      if (value <= 0x7fff || value >= 0xffff8000u)
        {
          /* Change the reloc type.  */
          reloc->howto = howto_table + 17;
@@ -676,15 +648,10 @@ h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
    FIXME: Not all relocations check for overflow!  */
 
 static void
-h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
-                          dst_ptr)
-     bfd *abfd;
-     struct bfd_link_info *link_info;
-     struct bfd_link_order *link_order;
-     arelent *reloc;
-     bfd_byte *data;
-     unsigned int *src_ptr;
-     unsigned int *dst_ptr;
+h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
+                          struct bfd_link_order *link_order, arelent *reloc,
+                          bfd_byte *data, unsigned int *src_ptr,
+                          unsigned int *dst_ptr)
 {
   unsigned int src_address = *src_ptr;
   unsigned int dst_address = *dst_ptr;
@@ -761,26 +728,9 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
       /* Get the address of the object referenced by this insn.  */
       value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
 
-      /* Sanity check.  */
-      if (value <= 0xff
-         || (value >= 0x0000ff00 && value <= 0x0000ffff)
-         || (value >= 0x00ffff00 && value <= 0x00ffffff)
-         || (value >= 0xffffff00 && value <= 0xffffffff))
-       {
-         /* Everything looks OK.  Apply the relocation and update the
-            src/dst address appropriately.  */
-         bfd_put_8 (abfd, value & 0xff, data + dst_address);
-         dst_address += 1;
-         src_address += 1;
-       }
-      else
-       {
-         if (! ((*link_info->callbacks->reloc_overflow)
-                (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
-                 reloc->howto->name, reloc->addend, input_section->owner,
-                 input_section, reloc->address)))
-           abort ();
-       }
+      bfd_put_8 (abfd, value & 0xff, data + dst_address);
+      dst_address += 1;
+      src_address += 1;
 
       /* All done.  */
       break;
@@ -822,9 +772,10 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
        absolute relocation.  */
     case R_MOVL2:
       value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
+      value = bfd_h8300_pad_address (abfd, value);
 
       /* Sanity check.  */
-      if (value <= 0x7fff || value >= 0xff8000)
+      if (value <= 0x7fff || value >= 0xffff8000u)
        {
          /* Insert the 16bit value into the proper location.  */
          bfd_put_16 (abfd, value, data + dst_address);
@@ -1221,9 +1172,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
    selected static symbols to the bfd linker hash table.  */
 
 static bfd_boolean
-h8300_bfd_link_add_symbols (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+h8300_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
 {
   asection *sec;
   struct funcvec_hash_table *funcvec_hash_table;
index b862ff7f0c292b0f3c227a5acaa7d7bc40420596..1906615bee3446220e242a77c3d93882ee3f52b1 100644 (file)
@@ -30,13 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "libcoff.h"
 
-static bfd_reloc_status_type coff_i860_reloc
-  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static reloc_howto_type *coff_i860_rtype_to_howto
-  PARAMS ((bfd *, asection *, struct internal_reloc *,
-          struct coff_link_hash_entry *, struct internal_syment *,
-          bfd_vma *));
-static const bfd_target * i3coff_object_p PARAMS ((bfd *));
 
 #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
 /* The page size is a guess based on ELF.  */
@@ -53,15 +46,13 @@ static const bfd_target * i3coff_object_p PARAMS ((bfd *));
    reloc type to make any required adjustments.  */
 
 static bfd_reloc_status_type
-coff_i860_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
-                error_message)
-     bfd *abfd;
-     arelent *reloc_entry;
-     asymbol *symbol;
-     PTR data;
-     asection *input_section ATTRIBUTE_UNUSED;
-     bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
+coff_i860_reloc (bfd *abfd,
+                arelent *reloc_entry,
+                asymbol *symbol,
+                void *data,
+                asection *input_section ATTRIBUTE_UNUSED,
+                bfd *output_bfd,
+                char **error_message ATTRIBUTE_UNUSED)
 {
   symvalue diff;
 
@@ -312,13 +303,12 @@ static reloc_howto_type howto_table[] =
 #define coff_relocate_section _bfd_coff_generic_relocate_section
 
 static reloc_howto_type *
-coff_i860_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *sec;
-     struct internal_reloc *rel;
-     struct coff_link_hash_entry *h;
-     struct internal_syment *sym;
-     bfd_vma *addendp;
+coff_i860_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+                         asection *sec,
+                         struct internal_reloc *rel,
+                         struct coff_link_hash_entry *h,
+                         struct internal_syment *sym,
+                         bfd_vma *addendp)
 {
 
   reloc_howto_type *howto;
@@ -361,8 +351,7 @@ coff_i860_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
 #include "coffcode.h"
 
 static const bfd_target *
-i3coff_object_p(a)
-     bfd *a;
+i3coff_object_p(bfd *a)
 {
   return coff_object_p (a);
 }
index e9ad4df7e80fd734f1fcf0ae8d45b9c384180b1d..3b39f095af648c5994bd632070edb0bebef9774c 100644 (file)
@@ -3873,7 +3873,9 @@ coff_write_object_contents (abfd)
     internal_f.f_flags |= IMAGE_FILE_DEBUG_STRIPPED;
 #endif
 
-#ifndef COFF_WITH_PE
+#ifdef COFF_WITH_PE
+  internal_f.f_flags |= IMAGE_FILE_32BIT_MACHINE;
+#else
   if (bfd_little_endian (abfd))
     internal_f.f_flags |= F_AR32WR;
   else
@@ -4405,6 +4407,13 @@ coff_slurp_line_table (abfd, asect)
 
   amt = (bfd_size_type) bfd_coff_linesz (abfd) * asect->lineno_count;
   native_lineno = (LINENO *) buy_and_read (abfd, asect->line_filepos, amt);
+  if (native_lineno == NULL)
+    {
+      (*_bfd_error_handler)
+        (_("%s: warning: line number table read failed"),
+        bfd_archive_filename (abfd));
+      return FALSE;
+    }
   amt = ((bfd_size_type) asect->lineno_count + 1) * sizeof (alent);
   lineno_cache = (alent *) bfd_alloc (abfd, amt);
   if (lineno_cache == NULL)
@@ -4693,7 +4702,9 @@ coff_slurp_symbol_table (abfd)
            case C_RSYM:
            case C_RPSYM:
            case C_STSYM:
+           case C_TCSYM:
            case C_BCOMM:
+           case C_ECOML:
            case C_ECOMM:
            case C_DECL:
            case C_ENTRY:
index e1aa6b74cbad8bad9f133d445388f607abf83c93..a14967541d89bfbccd5ce1981c93f43777d8bad5 100644 (file)
@@ -29,6 +29,20 @@ targ64_selvecs=
 targ_cflags=
 targ_underscore=no
 
+# Catch obsolete configurations.
+case $targ in
+ vax-*-vms*                    \
+ )
+    if test "x$enable_obsolete" != xyes; then
+      echo "*** Configuration $targ is obsolete." >&2
+      echo "*** Specify --enable-obsolete to build it anyway." >&2
+      echo "*** Support will be REMOVED in the next major release of BINUTILS," >&2
+      echo "*** unless a maintainer comes forward." >&2
+      exit 1
+    fi;;
+esac
+
+
 targ_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 case "${targ_cpu}" in
 alpha*)          targ_archs=bfd_alpha_arch ;;
@@ -60,6 +74,7 @@ x86_64)          targ_archs=bfd_i386_arch ;;
 xscale*)         targ_archs=bfd_arm_arch ;;
 xtensa*)         targ_archs=bfd_xtensa_arch ;;
 z8k*)           targ_archs=bfd_z8k_arch ;;
+am33_2.0)        targ_archs=bfd_mn10300_arch ;;
 *)              targ_archs=bfd_${targ_cpu}_arch ;;
 esac
 
@@ -116,10 +131,6 @@ case "${targ}" in
   alpha*-*-*)
     targ_defvec=ecoffalpha_little_vec
     ;;
-  ia64*-*-aix*)
-    targ_defvec=bfd_elf64_ia64_aix_little_vec
-    targ_selvecs="bfd_elf64_ia64_aix_big_vec bfd_efi_app_ia64_vec"
-    ;;
   ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf*)
     targ_defvec=bfd_elf64_ia64_little_vec
     targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
@@ -134,6 +145,9 @@ case "${targ}" in
     ;;
 #endif /* BFD64 */
 
+  am33_2.0-*-linux*)
+    targ_defvec=bfd_elf32_am33lin_vec
+    ;;
   arc-*-elf*)
     targ_defvec=bfd_elf32_littlearc_vec
     targ_selvecs=bfd_elf32_bigarc_vec
@@ -151,6 +165,7 @@ case "${targ}" in
     targ_defvec=armnetbsd_vec
     targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
     targ_underscore=yes
+    targ_cflags=-D__QNXTARGET__
     ;;
   arm-*-nto* | nto*arm*)
     targ_defvec=bfd_elf32_littlearm_vec
@@ -169,7 +184,7 @@ case "${targ}" in
     targ_defvec=armpe_little_vec
     targ_selvecs="armpe_little_vec armpe_big_vec armpei_little_vec armpei_big_vec"
     targ_underscore=no
-    targ_cflags=-DARM_WINCE
+    targ_cflags="-DARM_WINCE -DARM_COFF_BUGFIX"
     ;;
   arm-*-pe*)
     targ_defvec=armpe_little_vec
@@ -830,6 +845,7 @@ case "${targ}" in
 
   mn10300-*-*)
     targ_defvec=bfd_elf32_mn10300_vec
+    targ_underscore=yes
     ;;
 
   msp430-*-*)
index 3b37998b4c2b4870e9bf7395eff68f6221ca0b87..80225237b71614ed0ccda5bc8f61b0f01faaace4 100755 (executable)
@@ -6106,6 +6106,7 @@ do
     b_out_vec_little_host)     tb="$tb bout.lo aout32.lo" ;;
     bfd_efi_app_ia32_vec)      tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
     bfd_efi_app_ia64_vec)      tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
+    bfd_elf32_am33lin_vec)     tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
     bfd_elf32_avr_vec)         tb="$tb elf32-avr.lo elf32.lo $elf" ;;
     bfd_elf32_big_generic_vec)         tb="$tb elf32-gen.lo elf32.lo $elf" ;;
     bfd_elf32_bigarc_vec)      tb="$tb elf32-arc.lo elf32.lo $elf" ;;
@@ -6187,8 +6188,6 @@ do
     bfd_elf64_bigmips_vec)     tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_hppa_linux_vec)  tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_hppa_vec)                tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_ia64_aix_big_vec)        tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_ia64_aix_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_ia64_big_vec)    tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
@@ -6398,10 +6397,10 @@ case ${host64}-${target64}-${want64} in
     if test -n "$GCC" ; then
        bad_64bit_gcc=no;
        echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6402: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6401: checking for gcc version with buggy 64-bit support" >&5
        # Add more tests for gcc versions with non-working 64-bit support here.
        cat > conftest.$ac_ext <<EOF
-#line 6405 "configure"
+#line 6404 "configure"
 #include "confdefs.h"
 :__GNUC__:__GNUC_MINOR__:__i386__:
 EOF
@@ -6447,17 +6446,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6451: checking for $ac_hdr" >&5
+echo "configure:6450: 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
-#line 6456 "configure"
+#line 6455 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6460: \"$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*
@@ -6486,12 +6485,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6490: checking for $ac_func" >&5
+echo "configure:6489: 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 <<EOF
-#line 6495 "configure"
+#line 6494 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6514,7 +6513,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6517: \"$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
@@ -6539,7 +6538,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6543: checking for working mmap" >&5
+echo "configure:6542: 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
@@ -6547,7 +6546,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 6551 "configure"
+#line 6550 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6687,7 +6686,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:6691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6690: \"$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
@@ -6712,12 +6711,12 @@ fi
 for ac_func in madvise mprotect
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6716: checking for $ac_func" >&5
+echo "configure:6715: 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 <<EOF
-#line 6721 "configure"
+#line 6720 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6740,7 +6739,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6743: \"$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
index b690fb9c01e5a41c937bc11d0839afe8bb69ceb6..c9aa356dcb595807c9235d0a66febb2f8c8da7f1 100644 (file)
@@ -31,7 +31,6 @@ hppa*-*-bsd*)         HDEFINES=-DHOST_HPPABSD ;;
 hppa*-*-osf*)          HDEFINES=-DHOST_HPPAOSF ;;
 
 ia64-*-linux*)         host64=true; HOST_64BIT_TYPE=long ;;
-ia64-*-aix*)           host64=true; HOST_64BIT_TYPE=long ;;
 ia64-*-hpux*)          host64=true
                        HOST_64BIT_TYPE="long long";
                        HOST_U_64BIT_TYPE="unsigned long long";
index 379b3ac55773bdcc96d4f74842535b963fb9e830..04ccf0ae6e7d468ff5c2c37b58c32486d909ff51 100644 (file)
@@ -568,6 +568,7 @@ do
     b_out_vec_little_host)     tb="$tb bout.lo aout32.lo" ;;
     bfd_efi_app_ia32_vec)      tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
     bfd_efi_app_ia64_vec)      tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
+    bfd_elf32_am33lin_vec)     tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
     bfd_elf32_avr_vec)         tb="$tb elf32-avr.lo elf32.lo $elf" ;;
     bfd_elf32_big_generic_vec)         tb="$tb elf32-gen.lo elf32.lo $elf" ;;
     bfd_elf32_bigarc_vec)      tb="$tb elf32-arc.lo elf32.lo $elf" ;;
@@ -649,8 +650,6 @@ do
     bfd_elf64_bigmips_vec)     tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_hppa_linux_vec)  tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_hppa_vec)                tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_ia64_aix_big_vec)        tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_ia64_aix_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_ia64_big_vec)    tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
     bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
index da9d4d739dc5d4310af99267ba0775e466de432a..8af4f451784648211677034730049b992abfbb1d 100644 (file)
@@ -1,5 +1,5 @@
 /* Core file generic interface routines for BFD.
-   Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2002
+   Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -36,7 +36,7 @@ FUNCTION
        bfd_core_file_failing_command
 
 SYNOPSIS
-       const char *bfd_core_file_failing_command(bfd *abfd);
+       const char *bfd_core_file_failing_command (bfd *abfd);
 
 DESCRIPTION
        Return a read-only string explaining which program was running
@@ -45,13 +45,13 @@ DESCRIPTION
 */
 
 const char *
-bfd_core_file_failing_command (abfd)
-     bfd *abfd;
+bfd_core_file_failing_command (bfd *abfd)
 {
-  if (abfd->format != bfd_core) {
-    bfd_set_error (bfd_error_invalid_operation);
-    return NULL;
-  }
+  if (abfd->format != bfd_core)
+    {
+      bfd_set_error (bfd_error_invalid_operation);
+      return NULL;
+    }
   return BFD_SEND (abfd, _core_file_failing_command, (abfd));
 }
 
@@ -60,7 +60,7 @@ FUNCTION
        bfd_core_file_failing_signal
 
 SYNOPSIS
-       int bfd_core_file_failing_signal(bfd *abfd);
+       int bfd_core_file_failing_signal (bfd *abfd);
 
 DESCRIPTION
        Returns the signal number which caused the core dump which
@@ -68,13 +68,13 @@ DESCRIPTION
 */
 
 int
-bfd_core_file_failing_signal (abfd)
-     bfd *abfd;
+bfd_core_file_failing_signal (bfd *abfd)
 {
-  if (abfd->format != bfd_core) {
-    bfd_set_error (bfd_error_invalid_operation);
-    return 0;
-  }
+  if (abfd->format != bfd_core)
+    {
+      bfd_set_error (bfd_error_invalid_operation);
+      return 0;
+    }
   return BFD_SEND (abfd, _core_file_failing_signal, (abfd));
 }
 
@@ -84,22 +84,23 @@ FUNCTION
 
 SYNOPSIS
        bfd_boolean core_file_matches_executable_p
-               (bfd *core_bfd, bfd *exec_bfd);
+         (bfd *core_bfd, bfd *exec_bfd);
 
 DESCRIPTION
        Return <<TRUE>> if the core file attached to @var{core_bfd}
        was generated by a run of the executable file attached to
        @var{exec_bfd}, <<FALSE>> otherwise.
 */
+
 bfd_boolean
-core_file_matches_executable_p (core_bfd, exec_bfd)
-     bfd *core_bfd, *exec_bfd;
+core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
 {
-    if ((core_bfd->format != bfd_core) || (exec_bfd->format != bfd_object)) {
-           bfd_set_error (bfd_error_wrong_format);
-           return FALSE;
-       }
-
-    return BFD_SEND (core_bfd, _core_file_matches_executable_p,
-                    (core_bfd, exec_bfd));
+  if (core_bfd->format != bfd_core || exec_bfd->format != bfd_object)
+    {
+      bfd_set_error (bfd_error_wrong_format);
+      return FALSE;
+    }
+
+  return BFD_SEND (core_bfd, _core_file_matches_executable_p,
+                  (core_bfd, exec_bfd));
 }
index e1c77bfe2e61edfce74610f20653dc030ae2b615..1a4f4d7a065af94fa05ff7832dc2deaabcd9145c 100644 (file)
 #include "libbfd.h"
 
 static bfd_boolean h8300_scan
-  PARAMS ((const struct bfd_arch_info *, const char *));
+  (const struct bfd_arch_info *, const char *);
 static const bfd_arch_info_type * compatible
-  PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
+  (const bfd_arch_info_type *, const bfd_arch_info_type *);
 
 static bfd_boolean
-h8300_scan (info, string)
-     const struct bfd_arch_info *info;
-     const char *string;
+h8300_scan (const struct bfd_arch_info *info, const char *string)
 {
   if (*string != 'h' && *string != 'H')
     return FALSE;
@@ -101,9 +99,7 @@ h8300_scan (info, string)
    info structure.  */
 
 static const bfd_arch_info_type *
-compatible (in, out)
-     const bfd_arch_info_type *in;
-     const bfd_arch_info_type *out;
+compatible (const bfd_arch_info_type *in, const bfd_arch_info_type *out)
 {
   /* It's really not a good idea to mix and match modes.  */
   if (in->arch != out->arch || in->mach != out->mach)
@@ -224,3 +220,38 @@ const bfd_arch_info_type bfd_h8300_arch =
   h8300_scan,
   &h8300h_info_struct
 };
+
+/* Pad the given address to 32 bits, converting 16-bit and 24-bit
+   addresses into the values they would have had on a h8s target.  */
+
+bfd_vma
+bfd_h8300_pad_address (bfd *abfd, bfd_vma address)
+{
+  /* Cope with bfd_vma's larger than 32 bits.  */
+  address &= 0xffffffffu;
+
+  switch (bfd_get_mach (abfd))
+    {
+    case bfd_mach_h8300:
+    case bfd_mach_h8300hn:
+    case bfd_mach_h8300sn:
+    case bfd_mach_h8300sxn:
+      /* Sign extend a 16-bit address.  */
+      if (address >= 0x8000)
+       return address | 0xffff0000u;
+      return address;
+
+    case bfd_mach_h8300h:
+      /* Sign extend a 24-bit address.  */
+      if (address >= 0x800000)
+       return address | 0xff000000u;
+      return address;
+
+    case bfd_mach_h8300s:
+    case bfd_mach_h8300sx:
+      return address;
+
+    default:
+      abort ();
+    }
+}
index 1025256490e568d3a578e2409dc54723189d5687..3cafb9f14d9f090ba1b54751c84fb53fbf705335 100644 (file)
@@ -161,8 +161,8 @@ static const char*
 ext_imms_scaled (const struct ia64_operand *self, ia64_insn code,
                 ia64_insn *valuep, int scale)
 {
-  int i, bits = 0, total = 0, shift;
-  BFD_HOST_64_BIT val = 0;
+  int i, bits = 0, total = 0;
+  BFD_HOST_64_BIT val = 0, sign;
 
   for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i)
     {
@@ -172,8 +172,8 @@ ext_imms_scaled (const struct ia64_operand *self, ia64_insn code,
       total += bits;
     }
   /* sign extend: */
-  shift = 8*sizeof (val) - total;
-  val = (val << shift) >> shift;
+  sign = (BFD_HOST_64_BIT) 1 << (total - 1);
+  val = (val ^ sign) - sign;
 
   *valuep = (val << scale);
   return 0;
@@ -188,10 +188,7 @@ ins_imms (const struct ia64_operand *self, ia64_insn value, ia64_insn *code)
 static const char*
 ins_immsu4 (const struct ia64_operand *self, ia64_insn value, ia64_insn *code)
 {
-  if (value == (BFD_HOST_U_64_BIT) 0x100000000)
-    value = 0;
-  else
-    value = (((BFD_HOST_64_BIT)value << 32) >> 32);
+  value = ((value & 0xffffffff) ^ 0x80000000) - 0x80000000;
 
   return ins_imms_scaled (self, value, code, 0);
 }
@@ -213,10 +210,7 @@ static const char*
 ins_immsm1u4 (const struct ia64_operand *self, ia64_insn value,
              ia64_insn *code)
 {
-  if (value == (BFD_HOST_U_64_BIT) 0x100000000)
-    value = 0;
-  else
-    value = (((BFD_HOST_64_BIT)value << 32) >> 32);
+  value = ((value & 0xffffffff) ^ 0x80000000) - 0x80000000;
 
   --value;
   return ins_imms_scaled (self, value, code, 0);
index a67c48b68796ddd4e80f3b4d5a98b4cbe0fdbf0d..2de9cd1a7815021ab6309ace1a5208956a9fa7bb 100644 (file)
@@ -21,6 +21,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "sysdep.h"
 #include "libbfd.h"
 
+const bfd_arch_info_type bfd_am33_2_arch =
+  {
+    32, /* 32 bits in a word */
+    32, /* 32 bits in an address */
+    8,  /* 8 bits in a byte */
+    bfd_arch_mn10300,
+    332,
+    "am33_2",
+    "am33-2",
+    2,
+    FALSE,
+    bfd_default_compatible,
+    bfd_default_scan,
+    0,
+  };
+
 const bfd_arch_info_type bfd_am33_arch =
   {
     32, /* 32 bits in a word */
@@ -34,7 +50,7 @@ const bfd_arch_info_type bfd_am33_arch =
     FALSE,
     bfd_default_compatible,
     bfd_default_scan,
-    0,
+    &bfd_am33_2_arch,
   };
 
 const bfd_arch_info_type bfd_mn10300_arch =
index 13355c5c5afb4c55dbdad990449e1d960adb7ff5..e64ee069c57172383943d64212866eaec69be569 100644 (file)
@@ -76,6 +76,7 @@ enum
   I_mips5400,
   I_mips5500,
   I_mips6000,
+  I_mips7000,
   I_mips8000,
   I_mips10000,
   I_mips12000,
@@ -106,6 +107,7 @@ static const bfd_arch_info_type arch_info_struct[] =
   N (64, 64, bfd_mach_mips5400, "mips:5400",      FALSE, NN(I_mips5400)),
   N (64, 64, bfd_mach_mips5500, "mips:5500",      FALSE, NN(I_mips5500)),
   N (32, 32, bfd_mach_mips6000, "mips:6000",      FALSE, NN(I_mips6000)),
+  N (64, 64, bfd_mach_mips7000, "mips:7000",      FALSE, NN(I_mips7000)),
   N (64, 64, bfd_mach_mips8000, "mips:8000",      FALSE, NN(I_mips8000)),
   N (64, 64, bfd_mach_mips10000,"mips:10000",     FALSE, NN(I_mips10000)),
   N (64, 64, bfd_mach_mips12000,"mips:12000",     FALSE, NN(I_mips12000)),
index b13399111060c4a0b6cbf4b695d03d7f4ecfed56..d345d8098235db55a7f4b7a81312b3b2fa73c984 100644 (file)
@@ -1,3 +1,13 @@
+2003-07-04  Josh Baratz  <baratz@intersystems.com>
+
+       * Makefile.am (MKDOC rule): Add $(CFLAGS) in case it contains
+       CC_FOR_BUILD specific switches.
+       * Makefile.in: Regenerate.
+
+2003-06-29  Alan Modra  <amodra@bigpond.net.au>
+
+       * chew.c (paramstuff): Don't emit PARAMS.
+
 2003-02-12  Bob Wilson  <bob.wilson@acm.org>
 
        * bfd.texinfo: Fix quotes for texinfo.  Make section title
index 4202b8a6af7b338f352f0a980638c01f40a2c5b5..4aaa341807ce56134d768735d556fba5fd3a36af 100644 (file)
@@ -55,7 +55,7 @@ info_TEXINFOS = bfd.texinfo
 MKDOC = chew$(EXEEXT_FOR_BUILD)
 
 $(MKDOC): chew.o
-       $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
+       $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
 
 chew.o: chew.c
        $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
index 1bca51ecf82dec3354ce7ce313e37a94786682d8..667d6589dba0d1d50af81b0357f0094894dff609 100644 (file)
@@ -469,7 +469,7 @@ mostlyclean distclean maintainer-clean
 
 
 $(MKDOC): chew.o
-       $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(LOADLIBES) $(LDFLAGS)
+       $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
 
 chew.o: chew.c
        $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
index bdf76e46e1975f4b70bc7f5866d21b8696fdc3bd..7c060da2d1cb3068d86988f5267a2de1c05c00be 100644 (file)
@@ -1,6 +1,6 @@
 /* chew
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
-   2002
+   2002, 2003
    Free Software Foundation, Inc.
    Contributed by steve chamberlain @cygnus
 
@@ -494,8 +494,11 @@ paramstuff ()
   string_type out;
   init_string (&out);
 
+#define NO_PARAMS 1
+
   /* Make sure that it's not already param'd or proto'd.  */
-  if (find (tos, "PARAMS") || find (tos, "PROTO") || !find (tos, "("))
+  if (NO_PARAMS
+      || find (tos, "PARAMS") || find (tos, "PROTO") || !find (tos, "("))
     {
       catstr (&out, tos);
     }
index ce18f54b0b1c509fda98a045a8296e983e4d1162..021c1fe13207ac3202433017ec18490257ac6121 100644 (file)
@@ -95,8 +95,8 @@ static asection bfd_debug_section =
      NULL,       NULL,        0,           0,       0,
   /* line_filepos, userdata, contents, lineno, lineno_count,       */
      0,            NULL,     NULL,     NULL,   0,
-  /* entsize, comdat, moving_line_filepos,                         */
-     0,       NULL,   0,
+  /* entsize, comdat, kept_section, moving_line_filepos,           */
+     0,       NULL,   NULL,         0,
   /* target_index, used_by_bfd, constructor_chain, owner,          */
      0,            NULL,        NULL,              NULL,
   /* symbol,                                                       */
index 5e4c1807c7c83a28db7f3c3d702c6445fb7ea21d..d297a77318f45778563d91653fd4e0e6bc16ce80 100644 (file)
@@ -118,11 +118,6 @@ struct elf_link_hash_entry
      one.  Otherwise it is NULL.  */
   struct elf_link_hash_entry *weakdef;
 
-  /* If this symbol is used in the linker created sections, the processor
-     specific backend uses this field to map the field into the offset
-     from the beginning of the section.  */
-  struct elf_linker_section_pointers *linker_section_pointer;
-
   /* Version information.  */
   union
   {
@@ -216,23 +211,12 @@ struct elf_link_hash_entry
    function symbols not defined in an app are set to their .plt entry,
    it's necessary for shared libs to also reference the .plt even
    though the symbol is really local to the shared lib.  */
-#define SYMBOL_REFERENCES_LOCAL(INFO, H)                               \
-  ((! (INFO)->shared                                                   \
-    || (INFO)->symbolic                                                        \
-    || (H)->dynindx == -1                                              \
-    || ELF_ST_VISIBILITY ((H)->other) == STV_INTERNAL                  \
-    || ELF_ST_VISIBILITY ((H)->other) == STV_HIDDEN                    \
-    || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)                \
-   && ((H)->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
+#define SYMBOL_REFERENCES_LOCAL(INFO, H) \
+  _bfd_elf_symbol_refs_local_p (H, INFO, 0)
 
 /* Will _calls_ to this symbol always call the version in this object?  */
-#define SYMBOL_CALLS_LOCAL(INFO, H)                                    \
-  ((! (INFO)->shared                                                   \
-    || (INFO)->symbolic                                                        \
-    || (H)->dynindx == -1                                              \
-    || ELF_ST_VISIBILITY ((H)->other) != STV_DEFAULT                   \
-    || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)                \
-   && ((H)->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
+#define SYMBOL_CALLS_LOCAL(INFO, H) \
+  _bfd_elf_symbol_refs_local_p (H, INFO, 1)
 
 /* Records local symbols to be emitted in the dynamic symbol table.  */
 
@@ -526,6 +510,17 @@ typedef enum {
   ict_irix6
 } irix_compat_t;
 
+/* Mapping of ELF section names and types.  */
+struct bfd_elf_special_section
+{
+  const char *prefix;
+  size_t prefix_length;
+  const char *suffix;
+  size_t suffix_length;
+  int type;
+  int attributes;
+};
+
 struct elf_backend_data
 {
   /* The architecture for this backend.  */
@@ -887,6 +882,9 @@ struct elf_backend_data
 
   const struct elf_size_info *s;
 
+  /* An array of target specific special section map.  */
+  const struct bfd_elf_special_section *special_sections;
+
   /* offset of the _GLOBAL_OFFSET_TABLE_ symbol from the start of the
      .got section */
   bfd_vma got_symbol_offset;
@@ -1022,6 +1020,8 @@ struct bfd_elf_section_data
 };
 
 #define elf_section_data(sec)  ((struct bfd_elf_section_data*)sec->used_by_bfd)
+#define elf_section_type(sec)  (elf_section_data(sec)->this_hdr.sh_type)
+#define elf_section_flags(sec) (elf_section_data(sec)->this_hdr.sh_flags)
 #define elf_group_name(sec)    (elf_section_data(sec)->group.name)
 #define elf_group_id(sec)      (elf_section_data(sec)->group.id)
 #define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group)
@@ -1036,52 +1036,6 @@ struct bfd_elf_section_data
 #define get_elf_backend_data(abfd) \
   ((struct elf_backend_data *) (abfd)->xvec->backend_data)
 
-/* Enumeration to specify the special section.  */
-typedef enum elf_linker_section_enum
-{
-  LINKER_SECTION_UNKNOWN,              /* not used */
-  LINKER_SECTION_GOT,                  /* .got section for global offset pointers */
-  LINKER_SECTION_PLT,                  /* .plt section for generated procedure stubs */
-  LINKER_SECTION_SDATA,                        /* .sdata/.sbss section for PowerPC */
-  LINKER_SECTION_SDATA2,               /* .sdata2/.sbss2 section for PowerPC */
-  LINKER_SECTION_MAX                   /* # of linker sections */
-} elf_linker_section_enum_t;
-
-/* Sections created by the linker.  */
-
-typedef struct elf_linker_section
-{
-  char *name;                          /* name of the section */
-  char *rel_name;                      /* name of the associated .rel{,a}. section */
-  char *bss_name;                      /* name of a related .bss section */
-  char *sym_name;                      /* name of symbol to reference this section */
-  asection *section;                   /* pointer to the section */
-  asection *bss_section;               /* pointer to the bss section associated with this */
-  asection *rel_section;               /* pointer to the relocations needed for this section */
-  struct elf_link_hash_entry *sym_hash;        /* pointer to the created symbol hash value */
-  bfd_vma initial_size;                        /* initial size before any linker generated allocations */
-  bfd_vma sym_offset;                  /* offset of symbol from beginning of section */
-  bfd_vma hole_size;                   /* size of reserved address hole in allocation */
-  bfd_vma hole_offset;                 /* current offset for the hole */
-  bfd_vma max_hole_offset;             /* maximum offset for the hole */
-  elf_linker_section_enum_t which;     /* which section this is */
-  bfd_boolean hole_written_p;          /* whether the hole has been initialized */
-  unsigned int alignment;              /* alignment for the section */
-  flagword flags;                      /* flags to use to create the section */
-} elf_linker_section_t;
-
-/* Linked list of allocated pointer entries.  This hangs off of the symbol lists, and
-   provides allows us to return different pointers, based on different addend's.  */
-
-typedef struct elf_linker_section_pointers
-{
-  struct elf_linker_section_pointers *next;    /* next allocated pointer for this symbol */
-  bfd_vma offset;                              /* offset of pointer from beginning of section */
-  bfd_vma addend;                              /* addend used */
-  elf_linker_section_enum_t which;             /* which linker section this is */
-  bfd_boolean written_address_p;               /* whether address was written yet */
-} elf_linker_section_pointers_t;
-
 /* This struct is used to pass information to routines called via
    elf_link_hash_traverse which must return failure.  */
 
@@ -1151,12 +1105,6 @@ struct elf_obj_tdata
   unsigned int symtab_shndx_section;
   unsigned int dynversym_section, dynverdef_section, dynverref_section;
   file_ptr next_file_pos;
-#if 0
-  /* we don't need these inside bfd anymore, and I think
-     these weren't used outside bfd.  */
-  void *prstatus;                      /* The raw /proc prstatus structure */
-  void *prpsinfo;                      /* The raw /proc prpsinfo structure */
-#endif
   bfd_vma gp;                          /* The gp value */
   unsigned int gp_size;                        /* The gp size */
 
@@ -1189,10 +1137,6 @@ struct elf_obj_tdata
       struct got_entry **ents;
     } local_got;
 
-  /* A mapping from local symbols to offsets into the various linker
-     sections added.  This is index by the symbol index.  */
-  elf_linker_section_pointers_t **linker_section_pointers;
-
   /* The linker ELF emulation code needs to let the backend ELF linker
      know what filename should be used for a dynamic object if the
      dynamic object is found using a search.  The emulation code then
@@ -1263,9 +1207,6 @@ struct elf_obj_tdata
   /* Symbol version references to external objects.  */
   Elf_Internal_Verneed *verref;
 
-  /* Linker sections that we are interested in.  */
-  struct elf_linker_section *linker_section[ (int)LINKER_SECTION_MAX ];
-
   /* The Irix 5 support uses two virtual sections, which represent
      text/data symbols defined in dynamic objects.  */
   asymbol *elf_data_symbol;
@@ -1297,12 +1238,10 @@ struct elf_obj_tdata
 #define elf_local_got_refcounts(bfd) (elf_tdata(bfd) -> local_got.refcounts)
 #define elf_local_got_offsets(bfd) (elf_tdata(bfd) -> local_got.offsets)
 #define elf_local_got_ents(bfd) (elf_tdata(bfd) -> local_got.ents)
-#define elf_local_ptr_offsets(bfd) (elf_tdata(bfd) -> linker_section_pointers)
 #define elf_dt_name(bfd)       (elf_tdata(bfd) -> dt_name)
 #define elf_dt_soname(bfd)     (elf_tdata(bfd) -> dt_soname)
 #define elf_bad_symtab(bfd)    (elf_tdata(bfd) -> bad_symtab)
 #define elf_flags_init(bfd)    (elf_tdata(bfd) -> flags_init)
-#define elf_linker_section(bfd,n) (elf_tdata(bfd) -> linker_section[(int)n])
 \f
 extern void _bfd_elf_swap_verdef_in
   PARAMS ((bfd *, const Elf_External_Verdef *, Elf_Internal_Verdef *));
@@ -1451,6 +1390,8 @@ extern bfd_boolean _bfd_elf_new_section_hook
   PARAMS ((bfd *, asection *));
 extern bfd_boolean _bfd_elf_init_reloc_shdr
   PARAMS ((bfd *, Elf_Internal_Shdr *, asection *, bfd_boolean));
+extern bfd_boolean _bfd_elf_get_sec_type_attr (bfd *, const char *,
+                                              int *, int *);
 
 /* If the target doesn't have reloc handling written yet:  */
 extern void _bfd_elf_no_info_to_howto
@@ -1554,35 +1495,6 @@ extern bfd_boolean _bfd_elfcore_make_pseudosection
 extern char *_bfd_elfcore_strndup
   PARAMS ((bfd *, char *, size_t));
 
-extern elf_linker_section_t *_bfd_elf_create_linker_section
-  PARAMS ((bfd *, struct bfd_link_info *, enum elf_linker_section_enum,
-          elf_linker_section_t *));
-
-extern elf_linker_section_pointers_t *_bfd_elf_find_pointer_linker_section
-  PARAMS ((elf_linker_section_pointers_t *, bfd_vma,
-          elf_linker_section_enum_t));
-
-extern bfd_boolean bfd_elf32_create_pointer_linker_section
-  PARAMS ((bfd *, struct bfd_link_info *, elf_linker_section_t *,
-          struct elf_link_hash_entry *, const Elf_Internal_Rela *));
-
-extern bfd_vma bfd_elf32_finish_pointer_linker_section
-  PARAMS ((bfd *, bfd *, struct bfd_link_info *, elf_linker_section_t *,
-          struct elf_link_hash_entry *, bfd_vma,
-          const Elf_Internal_Rela *, int));
-
-extern bfd_boolean bfd_elf64_create_pointer_linker_section
-  PARAMS ((bfd *, struct bfd_link_info *, elf_linker_section_t *,
-          struct elf_link_hash_entry *, const Elf_Internal_Rela *));
-
-extern bfd_vma bfd_elf64_finish_pointer_linker_section
-  PARAMS ((bfd *, bfd *, struct bfd_link_info *, elf_linker_section_t *,
-          struct elf_link_hash_entry *, bfd_vma,
-          const Elf_Internal_Rela *, int));
-
-extern bfd_boolean _bfd_elf_make_linker_section_rela
-  PARAMS ((bfd *, elf_linker_section_t *, int));
-
 extern Elf_Internal_Rela *_bfd_elf_link_read_relocs
   PARAMS ((bfd *, asection *, PTR, Elf_Internal_Rela *, bfd_boolean));
 
@@ -1601,6 +1513,12 @@ extern bfd_boolean _bfd_elf_adjust_dynamic_symbol
 extern bfd_boolean _bfd_elf_link_sec_merge_syms
   PARAMS ((struct elf_link_hash_entry *, PTR));
 
+extern bfd_boolean _bfd_elf_dynamic_symbol_p
+  PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean));
+
+extern bfd_boolean _bfd_elf_symbol_refs_local_p
+  PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean));
+
 extern const bfd_target *bfd_elf32_object_p
   PARAMS ((bfd *));
 extern const bfd_target *bfd_elf32_core_file_p
index f3727466015a2893cf0ac3acfef06931c9e18eca..90f648289f67c45c8e409d606d23c50308f04611 100644 (file)
@@ -1491,12 +1491,25 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
                    (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
                     bfd_archive_filename (input_bfd), h->root.root.string,
                     bfd_get_section_name (input_bfd, input_section));
-                 relocation = 0;
                }
              relocation = 0;
            }
          else if (h->root.type == bfd_link_hash_undefweak)
-           relocation = 0;
+            {
+             dyn_name = get_dyn_name (input_section, h, rel,
+                                      &dynh_buf, &dynh_buflen);
+             dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table,
+                                                 dyn_name, FALSE, FALSE);
+
+             if (dyn_h == NULL)
+               {
+                 (*_bfd_error_handler)
+                   (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
+                    bfd_archive_filename (input_bfd), h->root.root.string,
+                    bfd_get_section_name (input_bfd, input_section));
+               }
+             relocation = 0;
+           }
          else
            {
              /* Ignore dynamic loader defined symbols.  */
index 15d1a336ff9c3caa56dfa883e2e93d9785ad5fd7..0d68fe5119b70e14ec0bf4051e1ef1f3b107cbfd 100644 (file)
@@ -26,7 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 static bfd_reloc_status_type mn10300_elf_final_link_relocate
   PARAMS ((reloc_howto_type *, bfd *, bfd *, asection *, bfd_byte *,
-          bfd_vma, bfd_vma, bfd_vma, struct bfd_link_info *,
+          bfd_vma, bfd_vma, bfd_vma,
+          struct elf_link_hash_entry *, unsigned long, struct bfd_link_info *,
           asection *, int));
 static bfd_boolean mn10300_elf_relocate_section
   PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
@@ -45,6 +46,25 @@ bfd_boolean _bfd_mn10300_elf_object_p
 bfd_boolean _bfd_mn10300_elf_merge_private_bfd_data
   PARAMS ((bfd *,bfd *));
 
+/* The mn10300 linker needs to keep track of the number of relocs that
+   it decides to copy in check_relocs for each symbol.  This is so
+   that it can discard PC relative relocs if it doesn't need them when
+   linking with -Bsymbolic.  We store the information in a field
+   extending the regular ELF linker hash table.  */
+
+/* This structure keeps track of the number of PC relative relocs we
+   have copied for a given symbol.  */
+
+struct elf_mn10300_pcrel_relocs_copied
+{
+  /* Next section.  */
+  struct elf_mn10300_pcrel_relocs_copied * next;
+  /* A section in dynobj.  */
+  asection * section;
+  /* Number of relocs copied in this section.  */
+  bfd_size_type count;
+};
+
 struct elf32_mn10300_link_hash_entry {
   /* The basic elf link hash table entry.  */
   struct elf_link_hash_entry root;
@@ -70,6 +90,9 @@ struct elf32_mn10300_link_hash_entry {
      add it to the hash table to avoid computing it over and over.  */
   unsigned char movm_stack_size;
 
+  /* Number of PC relative relocs copied for this symbol.  */
+  struct elf_mn10300_pcrel_relocs_copied * pcrel_relocs_copied;
+
 /* When set, convert all "call" instructions to this target into "calls"
    instructions.  */
 #define MN10300_CONVERT_CALL_TO_CALLS 0x1
@@ -137,6 +160,23 @@ static void compute_function_info
   PARAMS ((bfd *, struct elf32_mn10300_link_hash_entry *,
           bfd_vma, unsigned char *));
 
+static bfd_boolean _bfd_mn10300_elf_create_got_section
+  PARAMS ((bfd *, struct bfd_link_info *));
+static bfd_boolean _bfd_mn10300_elf_create_dynamic_sections
+  PARAMS ((bfd *, struct bfd_link_info *));
+static bfd_boolean _bfd_mn10300_elf_adjust_dynamic_symbol
+  PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static bfd_boolean _bfd_mn10300_elf_discard_copies
+  PARAMS ((struct elf32_mn10300_link_hash_entry *,
+          struct bfd_link_info *));
+static bfd_boolean _bfd_mn10300_elf_size_dynamic_sections
+  PARAMS ((bfd *, struct bfd_link_info *));
+static bfd_boolean _bfd_mn10300_elf_finish_dynamic_symbol
+  PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+          Elf_Internal_Sym *));
+static bfd_boolean _bfd_mn10300_elf_finish_dynamic_sections
+  PARAMS ((bfd *, struct bfd_link_info *));
+
 static reloc_howto_type elf_mn10300_howto_table[] = {
   /* Dummy relocation.  Does nothing.  */
   HOWTO (R_MN10300_NONE,
@@ -281,6 +321,202 @@ static reloc_howto_type elf_mn10300_howto_table[] = {
         0xffffff,
         0xffffff,
         FALSE),
+  HOWTO (R_MN10300_GOTPC32,    /* type */
+        0,                     /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        32,                    /* bitsize */
+        TRUE,                  /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_GOTPC32",   /* name */
+        FALSE,                 /* partial_inplace */
+        0xffffffff,            /* src_mask */
+        0xffffffff,            /* dst_mask */
+        TRUE),                 /* pcrel_offset */
+
+  HOWTO (R_MN10300_GOTPC16,    /* type */
+        0,                     /* rightshift */
+        1,                     /* size (0 = byte, 1 = short, 2 = long) */
+        16,                    /* bitsize */
+        TRUE,                  /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_GOTPC16",   /* name */
+        FALSE,                 /* partial_inplace */
+        0xffff,                /* src_mask */
+        0xffff,                /* dst_mask */
+        TRUE),                 /* pcrel_offset */
+
+  HOWTO (R_MN10300_GOTOFF32,   /* type */
+        0,                     /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        32,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_GOTOFF32",  /* name */
+        FALSE,                 /* partial_inplace */
+        0xffffffff,            /* src_mask */
+        0xffffffff,            /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
+  HOWTO (R_MN10300_GOTOFF24,   /* type */
+        0,                     /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        24,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_GOTOFF24",  /* name */
+        FALSE,                 /* partial_inplace */
+        0xffffff,              /* src_mask */
+        0xffffff,              /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
+  HOWTO (R_MN10300_GOTOFF16,   /* type */
+        0,                     /* rightshift */
+        1,                     /* size (0 = byte, 1 = short, 2 = long) */
+        16,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_GOTOFF16",  /* name */
+        FALSE,                 /* partial_inplace */
+        0xffff,                /* src_mask */
+        0xffff,                /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
+  HOWTO (R_MN10300_PLT32,      /* type */
+        0,                     /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        32,                    /* bitsize */
+        TRUE,                  /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_PLT32",     /* name */
+        FALSE,                 /* partial_inplace */
+        0xffffffff,            /* src_mask */
+        0xffffffff,            /* dst_mask */
+        TRUE),                 /* pcrel_offset */
+
+  HOWTO (R_MN10300_PLT16,      /* type */
+        0,                     /* rightshift */
+        1,                     /* size (0 = byte, 1 = short, 2 = long) */
+        16,                    /* bitsize */
+        TRUE,                  /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_PLT16",     /* name */
+        FALSE,                 /* partial_inplace */
+        0xffff,                /* src_mask */
+        0xffff,                /* dst_mask */
+        TRUE),                 /* pcrel_offset */
+
+  HOWTO (R_MN10300_GOT32,      /* type */
+        0,                     /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        32,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_GOT32",     /* name */
+        FALSE,                 /* partial_inplace */
+        0xffffffff,            /* src_mask */
+        0xffffffff,            /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
+  HOWTO (R_MN10300_GOT24,      /* type */
+        0,                     /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        24,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_GOT24",     /* name */
+        FALSE,                 /* partial_inplace */
+        0xffffffff,            /* src_mask */
+        0xffffffff,            /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
+  HOWTO (R_MN10300_GOT16,      /* type */
+        0,                     /* rightshift */
+        1,                     /* size (0 = byte, 1 = short, 2 = long) */
+        16,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_GOT16",     /* name */
+        FALSE,                 /* partial_inplace */
+        0xffffffff,            /* src_mask */
+        0xffffffff,            /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
+  HOWTO (R_MN10300_COPY,       /* type */
+        0,                     /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        32,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_COPY",              /* name */
+        FALSE,                 /* partial_inplace */
+        0xffffffff,            /* src_mask */
+        0xffffffff,            /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
+  HOWTO (R_MN10300_GLOB_DAT,   /* type */
+        0,                     /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        32,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_GLOB_DAT",  /* name */
+        FALSE,                 /* partial_inplace */
+        0xffffffff,            /* src_mask */
+        0xffffffff,            /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
+  HOWTO (R_MN10300_JMP_SLOT,   /* type */
+        0,                     /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        32,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_JMP_SLOT",  /* name */
+        FALSE,                 /* partial_inplace */
+        0xffffffff,            /* src_mask */
+        0xffffffff,            /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
+  HOWTO (R_MN10300_RELATIVE,   /* type */
+        0,                     /* rightshift */
+        2,                     /* size (0 = byte, 1 = short, 2 = long) */
+        32,                    /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_bitfield, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* */
+        "R_MN10300_RELATIVE",  /* name */
+        FALSE,                 /* partial_inplace */
+        0xffffffff,            /* src_mask */
+        0xffffffff,            /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
 };
 
 struct mn10300_reloc_map {
@@ -299,8 +535,130 @@ static const struct mn10300_reloc_map mn10300_reloc_map[] = {
   { BFD_RELOC_24, R_MN10300_24, },
   { BFD_RELOC_VTABLE_INHERIT, R_MN10300_GNU_VTINHERIT },
   { BFD_RELOC_VTABLE_ENTRY, R_MN10300_GNU_VTENTRY },
+  { BFD_RELOC_32_GOT_PCREL, R_MN10300_GOTPC32 },
+  { BFD_RELOC_16_GOT_PCREL, R_MN10300_GOTPC16 },
+  { BFD_RELOC_32_GOTOFF, R_MN10300_GOTOFF32 },
+  { BFD_RELOC_MN10300_GOTOFF24, R_MN10300_GOTOFF24 },
+  { BFD_RELOC_16_GOTOFF, R_MN10300_GOTOFF16 },
+  { BFD_RELOC_32_PLT_PCREL, R_MN10300_PLT32 },
+  { BFD_RELOC_16_PLT_PCREL, R_MN10300_PLT16 },
+  { BFD_RELOC_MN10300_GOT32, R_MN10300_GOT32 },
+  { BFD_RELOC_MN10300_GOT24, R_MN10300_GOT24 },
+  { BFD_RELOC_MN10300_GOT16, R_MN10300_GOT16 },
+  { BFD_RELOC_MN10300_COPY, R_MN10300_COPY },
+  { BFD_RELOC_MN10300_GLOB_DAT, R_MN10300_GLOB_DAT },
+  { BFD_RELOC_MN10300_JMP_SLOT, R_MN10300_JMP_SLOT },
+  { BFD_RELOC_MN10300_RELATIVE, R_MN10300_RELATIVE },
 };
 
+/* Create the GOT section.  */
+
+static bfd_boolean
+_bfd_mn10300_elf_create_got_section (abfd, info)
+     bfd * abfd;
+     struct bfd_link_info * info;
+{
+  flagword   flags;
+  flagword   pltflags;
+  asection * s;
+  struct elf_link_hash_entry * h;
+  struct elf_backend_data *    bed = get_elf_backend_data (abfd);
+  int ptralign;
+
+  /* This function may be called more than once.  */
+  if (bfd_get_section_by_name (abfd, ".got") != NULL)
+    return TRUE;
+
+  switch (bed->s->arch_size)
+    {
+    case 32:
+      ptralign = 2;
+      break;
+
+    case 64:
+      ptralign = 3;
+      break;
+
+    default:
+      bfd_set_error (bfd_error_bad_value);
+      return FALSE;
+    }
+
+  flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+          | SEC_LINKER_CREATED);
+
+  pltflags = flags;
+  pltflags |= SEC_CODE;
+  if (bed->plt_not_loaded)
+    pltflags &= ~ (SEC_LOAD | SEC_HAS_CONTENTS);
+  if (bed->plt_readonly)
+    pltflags |= SEC_READONLY;
+
+  s = bfd_make_section (abfd, ".plt");
+  if (s == NULL
+      || ! bfd_set_section_flags (abfd, s, pltflags)
+      || ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
+    return FALSE;
+
+  if (bed->want_plt_sym)
+    {
+      /* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
+        .plt section.  */
+      struct elf_link_hash_entry *h = NULL;
+      if (! (_bfd_generic_link_add_one_symbol
+            (info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
+             (bfd_vma) 0, (const char *) NULL, FALSE,
+             get_elf_backend_data (abfd)->collect,
+             (struct bfd_link_hash_entry **) &h)))
+       return FALSE;
+      h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+      h->type = STT_OBJECT;
+
+      if (info->shared
+         && ! _bfd_elf_link_record_dynamic_symbol (info, h))
+       return FALSE;
+    }
+
+  s = bfd_make_section (abfd, ".got");
+  if (s == NULL
+      || ! bfd_set_section_flags (abfd, s, flags)
+      || ! bfd_set_section_alignment (abfd, s, ptralign))
+    return FALSE;
+
+  if (bed->want_got_plt)
+    {
+      s = bfd_make_section (abfd, ".got.plt");
+      if (s == NULL
+         || ! bfd_set_section_flags (abfd, s, flags)
+         || ! bfd_set_section_alignment (abfd, s, ptralign))
+       return FALSE;
+    }
+
+  /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the .got
+     (or .got.plt) section.  We don't do this in the linker script
+     because we don't want to define the symbol if we are not creating
+     a global offset table.  */
+  h = NULL;
+  if (!(_bfd_generic_link_add_one_symbol
+       (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
+        bed->got_symbol_offset, (const char *) NULL, FALSE,
+        bed->collect, (struct bfd_link_hash_entry **) &h)))
+    return FALSE;
+  h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+  h->type = STT_OBJECT;
+
+  if (info->shared
+      && ! _bfd_elf_link_record_dynamic_symbol (info, h))
+    return FALSE;
+
+  elf_hash_table (info)->hgot = h;
+
+  /* The first bit of the global offset table is the header.  */
+  s->_raw_size += bed->got_header_size + bed->got_symbol_offset;
+
+  return TRUE;
+}
+
 static reloc_howto_type *
 bfd_elf32_bfd_reloc_type_lookup (abfd, code)
      bfd *abfd ATTRIBUTE_UNUSED;
@@ -349,6 +707,15 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
   struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
+  bfd *      dynobj;
+  bfd_vma *  local_got_offsets;
+  asection * sgot;
+  asection * srelgot;
+  asection * sreloc;
+
+  sgot    = NULL;
+  srelgot = NULL;
+  sreloc  = NULL;
 
   if (info->relocatable)
     return TRUE;
@@ -359,6 +726,8 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
   if (!elf_bad_symtab (abfd))
     sym_hashes_end -= symtab_hdr->sh_info;
 
+  dynobj = elf_hash_table (info)->dynobj;
+  local_got_offsets = elf_local_got_offsets (abfd);
   rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; rel++)
     {
@@ -371,6 +740,29 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
       else
        h = sym_hashes[r_symndx - symtab_hdr->sh_info];
 
+      /* Some relocs require a global offset table.  */
+      if (dynobj == NULL)
+       {
+         switch (ELF32_R_TYPE (rel->r_info))
+           {
+           case R_MN10300_GOT32:
+           case R_MN10300_GOT24:
+           case R_MN10300_GOT16:
+           case R_MN10300_GOTOFF32:
+           case R_MN10300_GOTOFF24:
+           case R_MN10300_GOTOFF16:
+           case R_MN10300_GOTPC32:
+           case R_MN10300_GOTPC16:
+             elf_hash_table (info)->dynobj = dynobj = abfd;
+             if (! _bfd_mn10300_elf_create_got_section (dynobj, info))
+               return FALSE;
+             break;
+
+           default:
+             break;
+           }
+       }
+
       switch (ELF32_R_TYPE (rel->r_info))
        {
        /* This relocation describes the C++ object vtable hierarchy.
@@ -386,6 +778,221 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
          if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
            return FALSE;
          break;
+       case R_MN10300_GOT32:
+       case R_MN10300_GOT24:
+       case R_MN10300_GOT16:
+         /* This symbol requires a global offset table entry.  */
+
+         if (sgot == NULL)
+           {
+             sgot = bfd_get_section_by_name (dynobj, ".got");
+             BFD_ASSERT (sgot != NULL);
+           }
+
+         if (srelgot == NULL
+             && (h != NULL || info->shared))
+           {
+             srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+             if (srelgot == NULL)
+               {
+                 srelgot = bfd_make_section (dynobj, ".rela.got");
+                 if (srelgot == NULL
+                     || ! bfd_set_section_flags (dynobj, srelgot,
+                                                 (SEC_ALLOC
+                                                  | SEC_LOAD
+                                                  | SEC_HAS_CONTENTS
+                                                  | SEC_IN_MEMORY
+                                                  | SEC_LINKER_CREATED
+                                                  | SEC_READONLY))
+                     || ! bfd_set_section_alignment (dynobj, srelgot, 2))
+                   return FALSE;
+               }
+           }
+
+         if (h != NULL)
+           {
+             if (h->got.offset != (bfd_vma) -1)
+               /* We have already allocated space in the .got.  */
+               break;
+
+             h->got.offset = sgot->_raw_size;
+
+             /* Make sure this symbol is output as a dynamic symbol.  */
+             if (h->dynindx == -1)
+               {
+                 if (! bfd_elf32_link_record_dynamic_symbol (info, h))
+                   return FALSE;
+               }
+
+             srelgot->_raw_size += sizeof (Elf32_External_Rela);
+           }
+         else
+           {
+             /* This is a global offset table entry for a local
+                symbol.  */
+             if (local_got_offsets == NULL)
+               {
+                 size_t       size;
+                 unsigned int i;
+
+                 size = symtab_hdr->sh_info * sizeof (bfd_vma);
+                 local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size);
+
+                 if (local_got_offsets == NULL)
+                   return FALSE;
+                 elf_local_got_offsets (abfd) = local_got_offsets;
+
+                 for (i = 0; i < symtab_hdr->sh_info; i++)
+                   local_got_offsets[i] = (bfd_vma) -1;
+               }
+
+             if (local_got_offsets[r_symndx] != (bfd_vma) -1)
+               /* We have already allocated space in the .got.  */
+               break;
+
+             local_got_offsets[r_symndx] = sgot->_raw_size;
+
+             if (info->shared)
+               /* If we are generating a shared object, we need to
+                  output a R_MN10300_RELATIVE reloc so that the dynamic
+                  linker can adjust this GOT entry.  */
+               srelgot->_raw_size += sizeof (Elf32_External_Rela);
+           }
+
+         sgot->_raw_size += 4;
+
+         break;
+
+       case R_MN10300_PLT32:
+       case R_MN10300_PLT16:
+         /* This symbol requires a procedure linkage table entry.  We
+            actually build the entry in adjust_dynamic_symbol,
+            because this might be a case of linking PIC code which is
+            never referenced by a dynamic object, in which case we
+            don't need to generate a procedure linkage table entry
+            after all.  */
+
+         /* If this is a local symbol, we resolve it directly without
+            creating a procedure linkage table entry.  */
+         if (h == NULL)
+           continue;
+
+         if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
+             || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN)
+           break;
+
+         h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+
+         break;
+
+       case R_MN10300_32:
+       case R_MN10300_24:
+       case R_MN10300_16:
+       case R_MN10300_8:
+       case R_MN10300_PCREL32:
+       case R_MN10300_PCREL16:
+       case R_MN10300_PCREL8:
+         if (h != NULL)
+           h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+
+         /* If we are creating a shared library, and this is a reloc
+            against a global symbol, or a non PC relative reloc
+            against a local symbol, then we need to copy the reloc
+            into the shared library.  However, if we are linking with
+            -Bsymbolic, we do not need to copy a reloc against a
+            global symbol which is defined in an object we are
+            including in the link (i.e., DEF_REGULAR is set).  At
+            this point we have not seen all the input files, so it is
+            possible that DEF_REGULAR is not set now but will be set
+            later (it is never cleared).  We account for that
+            possibility below by storing information in the
+            pcrel_relocs_copied field of the hash table entry.  */
+         if (info->shared
+             && (sec->flags & SEC_ALLOC) != 0
+             && (! (elf_mn10300_howto_table[ELF32_R_TYPE (rel->r_info)]
+                    .pc_relative)
+                 || (h != NULL
+                     && (! info->symbolic
+                         || h->root.type == bfd_link_hash_defweak
+                         || (h->elf_link_hash_flags
+                             & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+           {
+             /* When creating a shared object, we must copy these
+                reloc types into the output file.  We create a reloc
+                section in dynobj and make room for this reloc.  */
+             if (sreloc == NULL)
+               {
+                 const char * name;
+
+                 name = (bfd_elf_string_from_elf_section
+                         (abfd,
+                          elf_elfheader (abfd)->e_shstrndx,
+                          elf_section_data (sec)->rel_hdr.sh_name));
+                 if (name == NULL)
+                   return FALSE;
+
+                 BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+                             && strcmp (bfd_get_section_name (abfd, sec),
+                                        name + 5) == 0);
+
+                 sreloc = bfd_get_section_by_name (dynobj, name);
+                 if (sreloc == NULL)
+                   {
+                     flagword flags;
+
+                     sreloc = bfd_make_section (dynobj, name);
+                     flags = (SEC_HAS_CONTENTS | SEC_READONLY
+                              | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+                     if ((sec->flags & SEC_ALLOC) != 0)
+                       flags |= SEC_ALLOC | SEC_LOAD;
+                     if (sreloc == NULL
+                         || ! bfd_set_section_flags (dynobj, sreloc, flags)
+                         || ! bfd_set_section_alignment (dynobj, sreloc, 2))
+                       return FALSE;
+                   }
+               }
+
+             sreloc->_raw_size += sizeof (Elf32_External_Rela);
+
+             /* If we are linking with -Bsymbolic, and this is a
+                global symbol, we count the number of PC relative
+                relocations we have entered for this symbol, so that
+                we can discard them again if the symbol is later
+                defined by a regular object.  Note that this function
+                is only called if we are using an elf_sh linker
+                hash table, which means that h is really a pointer to
+                an elf32_mn10300_link_hash_entry.  */
+             if (h != NULL
+                 && (elf_mn10300_howto_table[ELF32_R_TYPE (rel->r_info)]
+                     .pc_relative))
+               {
+                 struct elf32_mn10300_link_hash_entry *eh;
+                 struct elf_mn10300_pcrel_relocs_copied *p;
+
+                 eh = (struct elf32_mn10300_link_hash_entry *) h;
+
+                 for (p = eh->pcrel_relocs_copied; p != NULL; p = p->next)
+                   if (p->section == sreloc)
+                     break;
+
+                 if (p == NULL)
+                   {
+                     p = ((struct elf_mn10300_pcrel_relocs_copied *)
+                          bfd_alloc (dynobj, sizeof *p));
+                     if (p == NULL)
+                       return FALSE;
+
+                     p->next = eh->pcrel_relocs_copied;
+                     eh->pcrel_relocs_copied = p;
+                     p->section = sreloc;
+                     p->count = 0;
+                   }
+
+                 ++p->count;
+               }
+           }
+
+         break;
        }
     }
 
@@ -436,7 +1043,7 @@ mn10300_elf_gc_mark_hook (sec, info, rel, h, sym)
 static bfd_reloc_status_type
 mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
                                 input_section, contents, offset, value,
-                                addend, info, sym_sec, is_local)
+                                addend, h, symndx, info, sym_sec, is_local)
      reloc_howto_type *howto;
      bfd *input_bfd;
      bfd *output_bfd ATTRIBUTE_UNUSED;
@@ -445,12 +1052,26 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
      bfd_vma offset;
      bfd_vma value;
      bfd_vma addend;
+     struct elf_link_hash_entry * h;
+     unsigned long symndx;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      asection *sym_sec ATTRIBUTE_UNUSED;
      int is_local ATTRIBUTE_UNUSED;
 {
   unsigned long r_type = howto->type;
   bfd_byte *hit_data = contents + offset;
+  bfd *      dynobj;
+  bfd_vma *  local_got_offsets;
+  asection * sgot;
+  asection * splt;
+  asection * sreloc;
+
+  dynobj = elf_hash_table (info)->dynobj;
+  local_got_offsets = elf_local_got_offsets (input_bfd);
+
+  sgot   = NULL;
+  splt   = NULL;
+  sreloc = NULL;
 
   switch (r_type)
     {
@@ -458,6 +1079,97 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
       return bfd_reloc_ok;
 
     case R_MN10300_32:
+      if (info->shared
+         && (input_section->flags & SEC_ALLOC) != 0)
+       {
+         Elf_Internal_Rela outrel;
+         bfd_boolean skip, relocate;
+
+         /* When generating a shared object, these relocations are
+            copied into the output file to be resolved at run
+            time.  */
+         if (sreloc == NULL)
+           {
+             const char * name;
+
+             name = (bfd_elf_string_from_elf_section
+                     (input_bfd,
+                      elf_elfheader (input_bfd)->e_shstrndx,
+                      elf_section_data (input_section)->rel_hdr.sh_name));
+             if (name == NULL)
+               return FALSE;
+
+             BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+                         && strcmp (bfd_get_section_name (input_bfd,
+                                                          input_section),
+                                    name + 5) == 0);
+
+             sreloc = bfd_get_section_by_name (dynobj, name);
+             BFD_ASSERT (sreloc != NULL);
+           }
+
+         skip = FALSE;
+
+         if (elf_section_data (input_section)->sec_info == NULL
+             || (input_section->sec_info_type != ELF_INFO_TYPE_STABS))
+           outrel.r_offset = offset;
+         else
+           {
+             bfd_vma off;
+
+             off = (_bfd_stab_section_offset
+                    (output_bfd, & elf_hash_table (info)->stab_info,
+                     input_section,
+                     & elf_section_data (input_section)->sec_info,
+                     offset));
+             if (off == (bfd_vma) -1)
+               skip = TRUE;
+             outrel.r_offset = off;
+           }
+
+         outrel.r_offset += (input_section->output_section->vma
+                             + input_section->output_offset);
+
+         if (skip)
+           {
+             memset (&outrel, 0, sizeof outrel);
+             relocate = FALSE;
+           }
+         else
+           {
+             /* h->dynindx may be -1 if this symbol was marked to
+                become local.  */
+             if (h == NULL
+                 || ((info->symbolic || h->dynindx == -1)
+                     && (h->elf_link_hash_flags
+                         & ELF_LINK_HASH_DEF_REGULAR) != 0))
+               {
+                 relocate = TRUE;
+                 outrel.r_info = ELF32_R_INFO (0, R_MN10300_RELATIVE);
+                 outrel.r_addend = value + addend;
+               }
+             else
+               {
+                 BFD_ASSERT (h->dynindx != -1);
+                 relocate = FALSE;
+                 outrel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_32);
+                 outrel.r_addend = value + addend;
+               }
+           }
+
+         bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+                                    (((Elf32_External_Rela *)
+                                      sreloc->contents)
+                                     + sreloc->reloc_count));
+         ++sreloc->reloc_count;
+
+         /* If this reloc is against an external symbol, we do
+            not want to fiddle with the addend.  Otherwise, we
+            need to include the symbol value so that it becomes
+            an addend for the dynamic reloc.  */
+         if (! relocate)
+           return bfd_reloc_ok;
+       }
       value += addend;
       bfd_put_32 (input_bfd, value, hit_data);
       return bfd_reloc_ok;
@@ -516,6 +1228,81 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
       return bfd_reloc_ok;
 
     case R_MN10300_PCREL32:
+      if (info->shared
+         && (input_section->flags & SEC_ALLOC) != 0
+         && h != NULL
+         && h->dynindx != -1
+         && (! info->symbolic
+             || (h->elf_link_hash_flags
+                 & ELF_LINK_HASH_DEF_REGULAR) == 0))
+       {
+         Elf_Internal_Rela outrel;
+         bfd_boolean skip;
+
+         /* When generating a shared object, these relocations
+            are copied into the output file to be resolved at run
+            time.  */
+
+         if (sreloc == NULL)
+           {
+             const char * name;
+
+             name = (bfd_elf_string_from_elf_section
+                     (input_bfd,
+                      elf_elfheader (input_bfd)->e_shstrndx,
+                      elf_section_data (input_section)->rel_hdr.sh_name));
+             if (name == NULL)
+               return FALSE;
+
+             BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+                         && strcmp (bfd_get_section_name (input_bfd,
+                                                          input_section),
+                                    name + 5) == 0);
+
+             sreloc = bfd_get_section_by_name (dynobj, name);
+             BFD_ASSERT (sreloc != NULL);
+           }
+
+         skip = FALSE;
+
+         if (elf_section_data (input_section)->sec_info == NULL
+             || (input_section->sec_info_type != ELF_INFO_TYPE_STABS))
+           outrel.r_offset = offset;
+         else
+           {
+             bfd_vma off;
+
+             off = (_bfd_stab_section_offset
+                    (output_bfd, & elf_hash_table (info)->stab_info,
+                     input_section,
+                     & elf_section_data (input_section)->sec_info,
+                     offset));
+             if (off == (bfd_vma) -1)
+               skip = TRUE;
+             outrel.r_offset = off;
+           }
+
+         outrel.r_offset += (input_section->output_section->vma
+                             + input_section->output_offset);
+
+         if (skip)
+           memset (&outrel, 0, sizeof outrel);
+         else
+           {
+             BFD_ASSERT (h != NULL && h->dynindx != -1);
+             outrel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_PCREL32);
+             outrel.r_addend = addend;
+           }
+
+         bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+                                    (((Elf32_External_Rela *)
+                                      sreloc->contents)
+                                     + sreloc->reloc_count));
+         ++sreloc->reloc_count;
+
+         return bfd_reloc_ok;
+       }
+
       value -= (input_section->output_section->vma
                + input_section->output_offset);
       value -= offset;
@@ -528,6 +1315,208 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
     case R_MN10300_GNU_VTENTRY:
       return bfd_reloc_ok;
 
+    case R_MN10300_GOTPC32:
+      /* Use global offset table as symbol value.  */
+
+      value = bfd_get_section_by_name (dynobj,
+                                      ".got")->output_section->vma;
+      value -= (input_section->output_section->vma
+               + input_section->output_offset);
+      value -= offset;
+      value += addend;
+
+      bfd_put_32 (input_bfd, value, hit_data);
+      return bfd_reloc_ok;
+      
+    case R_MN10300_GOTPC16:
+      /* Use global offset table as symbol value.  */
+
+      value = bfd_get_section_by_name (dynobj,
+                                      ".got")->output_section->vma;
+      value -= (input_section->output_section->vma
+               + input_section->output_offset);
+      value -= offset;
+      value += addend;
+
+      if ((long) value > 0xffff || (long) value < -0x10000)
+       return bfd_reloc_overflow;
+
+      bfd_put_16 (input_bfd, value, hit_data);
+      return bfd_reloc_ok;
+
+    case R_MN10300_GOTOFF32:
+      value -= bfd_get_section_by_name (dynobj,
+                                       ".got")->output_section->vma;
+      value += addend;
+      
+      bfd_put_32 (input_bfd, value, hit_data);
+      return bfd_reloc_ok;
+
+    case R_MN10300_GOTOFF24:
+      value -= bfd_get_section_by_name (dynobj,
+                                       ".got")->output_section->vma;
+      value += addend;
+      
+      if ((long) value > 0x7fffff || (long) value < -0x800000)
+       return bfd_reloc_overflow;
+
+      bfd_put_8 (input_bfd, value, hit_data);
+      bfd_put_8 (input_bfd, (value >> 8) & 0xff, hit_data + 1);
+      bfd_put_8 (input_bfd, (value >> 16) & 0xff, hit_data + 2);
+      return bfd_reloc_ok;
+
+    case R_MN10300_GOTOFF16:
+      value -= bfd_get_section_by_name (dynobj,
+                                       ".got")->output_section->vma;
+      value += addend;
+      
+      if ((long) value > 0xffff || (long) value < -0x10000)
+       return bfd_reloc_overflow;
+
+      bfd_put_16 (input_bfd, value, hit_data);
+      return bfd_reloc_ok;
+
+    case R_MN10300_PLT32:
+      if (h != NULL
+         && ELF_ST_VISIBILITY (h->other) != STV_INTERNAL
+         && ELF_ST_VISIBILITY (h->other) != STV_HIDDEN
+         && h->plt.offset != (bfd_vma) -1)
+       {
+         asection * splt;
+
+         splt = bfd_get_section_by_name (dynobj, ".plt");
+         
+         value = (splt->output_section->vma
+                  + splt->output_offset
+                  + h->plt.offset) - value;
+       }
+
+      value -= (input_section->output_section->vma
+               + input_section->output_offset);
+      value -= offset;
+      value += addend;
+
+      bfd_put_32 (input_bfd, value, hit_data);
+      return bfd_reloc_ok;
+
+    case R_MN10300_PLT16:
+      if (h != NULL
+         && ELF_ST_VISIBILITY (h->other) != STV_INTERNAL
+         && ELF_ST_VISIBILITY (h->other) != STV_HIDDEN
+         && h->plt.offset != (bfd_vma) -1)
+       {
+         asection * splt;
+
+         splt = bfd_get_section_by_name (dynobj, ".plt");
+         
+         value = (splt->output_section->vma
+                  + splt->output_offset
+                  + h->plt.offset) - value;
+       }
+
+      value -= (input_section->output_section->vma
+               + input_section->output_offset);
+      value -= offset;
+      value += addend;
+
+      if ((long) value > 0xffff || (long) value < -0x10000)
+       return bfd_reloc_overflow;
+
+      bfd_put_16 (input_bfd, value, hit_data);
+      return bfd_reloc_ok;
+
+    case R_MN10300_GOT32:
+    case R_MN10300_GOT24:
+    case R_MN10300_GOT16:
+      {
+       asection * sgot;
+
+       sgot = bfd_get_section_by_name (dynobj, ".got");
+       
+         if (h != NULL)
+           {
+             bfd_vma off;
+
+             off = h->got.offset;
+             BFD_ASSERT (off != (bfd_vma) -1);
+
+             if (! elf_hash_table (info)->dynamic_sections_created
+                 || (info->shared
+                     && (info->symbolic || h->dynindx == -1)
+                     && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+               /* This is actually a static link, or it is a
+                  -Bsymbolic link and the symbol is defined
+                  locally, or the symbol was forced to be local
+                  because of a version file.  We must initialize
+                  this entry in the global offset table.
+
+                  When doing a dynamic link, we create a .rela.got
+                  relocation entry to initialize the value.  This
+                  is done in the finish_dynamic_symbol routine.  */
+               bfd_put_32 (output_bfd, value,
+                           sgot->contents + off);
+
+             value = sgot->output_offset + off;
+           }
+         else
+           {
+             bfd_vma off;
+
+             off = elf_local_got_offsets (input_bfd)[symndx];
+
+             bfd_put_32 (output_bfd, value, sgot->contents + off);
+
+             if (info->shared)
+               {
+                 asection * srelgot;
+                 Elf_Internal_Rela outrel;
+
+                 srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+                 BFD_ASSERT (srelgot != NULL);
+
+                 outrel.r_offset = (sgot->output_section->vma
+                                    + sgot->output_offset
+                                    + off);
+                 outrel.r_info = ELF32_R_INFO (0, R_MN10300_RELATIVE);
+                 outrel.r_addend = value;
+                 bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+                                            (((Elf32_External_Rela *)
+                                              srelgot->contents)
+                                             + srelgot->reloc_count));
+                 ++ srelgot->reloc_count;
+               }
+
+             value = sgot->output_offset + off;
+           }
+      }
+
+      value += addend;
+
+      if (r_type == R_MN10300_GOT32)
+       {
+         bfd_put_32 (input_bfd, value, hit_data);
+         return bfd_reloc_ok;
+       }
+      else if (r_type == R_MN10300_GOT24)
+       {
+         if ((long) value > 0x7fffff || (long) value < -0x800000)
+           return bfd_reloc_overflow;
+
+         bfd_put_8 (input_bfd, value & 0xff, hit_data);
+         bfd_put_8 (input_bfd, (value >> 8) & 0xff, hit_data + 1);
+         bfd_put_8 (input_bfd, (value >> 16) & 0xff, hit_data + 2);
+         return bfd_reloc_ok;
+       }
+      else if (r_type == R_MN10300_GOT16)
+       {
+         if ((long) value > 0xffff || (long) value < -0x10000)
+           return bfd_reloc_overflow;
+
+         bfd_put_16 (input_bfd, value, hit_data);
+         return bfd_reloc_ok;
+       }
+      /* Fall through.  */
+      
     default:
       return bfd_reloc_notsupported;
     }
@@ -598,17 +1587,66 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
              || h->root.root.type == bfd_link_hash_defweak)
            {
              sec = h->root.root.u.def.section;
-             relocation = (h->root.root.u.def.value
-                           + sec->output_section->vma
-                           + sec->output_offset);
+             if (   r_type == R_MN10300_GOTPC32
+                 || r_type == R_MN10300_GOTPC16
+                 || ((   r_type == R_MN10300_PLT32
+                      || r_type == R_MN10300_PLT16)
+                     && ELF_ST_VISIBILITY (h->root.other) != STV_INTERNAL
+                     && ELF_ST_VISIBILITY (h->root.other) != STV_HIDDEN
+                     && h->root.plt.offset != (bfd_vma) -1)
+                 || ((   r_type == R_MN10300_GOT32
+                      || r_type == R_MN10300_GOT24
+                      || r_type == R_MN10300_GOT16)
+                     && elf_hash_table (info)->dynamic_sections_created
+                     && (! info->shared
+                         || (! info->symbolic && h->root.dynindx != -1)
+                         || (h->root.elf_link_hash_flags
+                             & ELF_LINK_HASH_DEF_REGULAR) == 0))
+                 || (info->shared
+                     && ((! info->symbolic && h->root.dynindx != -1)
+                         || (h->root.elf_link_hash_flags
+                             & ELF_LINK_HASH_DEF_REGULAR) == 0)
+                     && (   r_type == R_MN10300_32
+                         || r_type == R_MN10300_PCREL32)
+                     && ((input_section->flags & SEC_ALLOC) != 0
+                         /* DWARF will emit R_MN10300_32 relocations
+                            in its sections against symbols defined
+                            externally in shared libraries.  We can't
+                            do anything with them here.  */
+                         || ((input_section->flags & SEC_DEBUGGING) != 0
+                             && (h->root.elf_link_hash_flags
+                                 & ELF_LINK_HASH_DEF_DYNAMIC) != 0))))
+               {
+                 /* In these cases, we don't need the relocation
+                     value.  We check specially because in some
+                     obscure cases sec->output_section will be NULL.  */
+                 relocation = 0;
+               }
+             else if (sec->output_section == NULL)
+               {
+                 (*_bfd_error_handler)
+                   (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
+                    bfd_get_filename (input_bfd), h->root.root.root.string,
+                    bfd_get_section_name (input_bfd, input_section));
+                 relocation = 0;
+               }
+             else            
+               relocation = (h->root.root.u.def.value
+                             + sec->output_section->vma
+                             + sec->output_offset);
            }
          else if (h->root.root.type == bfd_link_hash_undefweak)
            relocation = 0;
+         else if (info->shared && !info->symbolic && !info->no_undefined
+                  && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
+           relocation = 0;
          else
            {
              if (! ((*info->callbacks->undefined_symbol)
                     (info, h->root.root.root.string, input_bfd,
-                     input_section, rel->r_offset, TRUE)))
+                     input_section, rel->r_offset,
+                     (!info->shared || info->no_undefined
+                      || ELF_ST_VISIBILITY (h->root.other)))))
                return FALSE;
              relocation = 0;
            }
@@ -618,6 +1656,8 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
                                           input_section,
                                           contents, rel->r_offset,
                                           relocation, rel->r_addend,
+                                          (struct elf_link_hash_entry *)h,
+                                          r_symndx,
                                           info, sec, h == NULL);
 
       if (r != bfd_reloc_ok)
@@ -953,6 +1993,8 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
                         direct_calls counter.  Else force "call" to
                         "calls" conversions.  */
                      if (r_type == R_MN10300_PCREL32
+                         || r_type == R_MN10300_PLT32
+                         || r_type == R_MN10300_PLT16
                          || r_type == R_MN10300_PCREL16)
                        hash->direct_calls++;
                      else
@@ -1023,7 +2065,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
                  symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
                              - symtab_hdr->sh_info);
-                 hashes = elf_sym_hashes (abfd);
+                 hashes = elf_sym_hashes (input_bfd);
                  end_hashes = hashes + symcount;
                  for (; hashes < end_hashes; hashes++)
                    {
@@ -1241,7 +2283,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
                 need insns deleted from their prologues.  */
              symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
                          - symtab_hdr->sh_info);
-             hashes = elf_sym_hashes (abfd);
+             hashes = elf_sym_hashes (input_bfd);
              end_hashes = hashes + symcount;
              for (; hashes < end_hashes; hashes++)
                {
@@ -1475,10 +2517,30 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
       /* Try to turn a 32bit pc-relative branch/call into a 16bit pc-relative
         branch/call, also deal with "call" -> "calls" conversions and
         insertion of prologue data into "call" instructions.  */
-      if (ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_PCREL32)
+      if (ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_PCREL32
+         || ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_PLT32)
        {
          bfd_vma value = symval;
 
+         if (ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_PLT32
+             && h != NULL
+             && ELF_ST_VISIBILITY (h->root.other) != STV_INTERNAL
+             && ELF_ST_VISIBILITY (h->root.other) != STV_HIDDEN
+             && h->root.plt.offset != (bfd_vma) -1)
+           {
+             asection * splt;
+
+             splt = bfd_get_section_by_name (elf_hash_table (link_info)
+                                             ->dynobj, ".plt");
+         
+             value = ((splt->output_section->vma
+                       + splt->output_offset
+                       + h->root.plt.offset)
+                      - (sec->output_section->vma
+                         + sec->output_offset
+                         + irel->r_offset));
+           }
+
          /* If we've got a "call" instruction that needs to be turned
             into a "calls" instruction, do so now.  It saves a byte.  */
          if (h && (h->flags & MN10300_CONVERT_CALL_TO_CALLS))
@@ -1567,6 +2629,9 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
              /* Fix the relocation's type.  */
              irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                          (ELF32_R_TYPE (irel->r_info)
+                                           == (int) R_MN10300_PLT32)
+                                          ? R_MN10300_PLT16 :
                                           R_MN10300_PCREL16);
 
              /* Delete two bytes of data.  */
@@ -1889,9 +2954,41 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
       /* Try to turn a 32bit immediate, displacement or absolute address
         into a 16bit immediate, displacement or absolute address.  */
-      if (ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_32)
+      if (ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_32
+         || ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_GOT32
+         || ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_GOTOFF32
+         || ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_GOTPC32)
        {
          bfd_vma value = symval;
+
+         if (ELF32_R_TYPE (irel->r_info) != (int) R_MN10300_32)
+           {
+             asection * sgot;
+
+             sgot = bfd_get_section_by_name (elf_hash_table (link_info)
+                                             ->dynobj, ".got");
+
+             if (ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_GOT32)
+               {
+                 value = sgot->output_offset;
+
+                 if (h)
+                   value += h->root.got.offset;
+                 else
+                   value += (elf_local_got_offsets
+                             (abfd)[ELF32_R_SYM (irel->r_info)]);
+               }
+             else if (ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_GOTOFF32)
+               value -= sgot->output_section->vma;
+             else if (ELF32_R_TYPE (irel->r_info) == (int) R_MN10300_GOTPC32)
+               value = (sgot->output_section->vma
+                        - (sec->output_section->vma
+                           + sec->output_offset
+                           + irel->r_offset));
+             else
+               abort ();
+           }
+
          value += irel->r_addend;
 
          /* See if the value will fit in 24 bits.
@@ -1917,6 +3014,8 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
                     equivalent instructions exists.  */
                  if (code != 0x6b && code != 0x7b
                      && code != 0x8b && code != 0x9b
+                     && (ELF32_R_TYPE (irel->r_info)
+                         != (int) R_MN10300_GOTPC32)
                      && ((code & 0x0f) == 0x09 || (code & 0x0f) == 0x08
                          || (code & 0x0f) == 0x0a || (code & 0x0f) == 0x0b
                          || (code & 0x0f) == 0x0e))
@@ -1940,6 +3039,12 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
                          /* Fix the relocation's type.  */
                          irel->r_info =
                            ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                         (ELF32_R_TYPE (irel->r_info)
+                                          == (int) R_MN10300_GOTOFF32)
+                                         ? R_MN10300_GOTOFF24
+                                         : (ELF32_R_TYPE (irel->r_info)
+                                            == (int) R_MN10300_GOT32)
+                                         ? R_MN10300_GOT24 :
                                          R_MN10300_24);
 
                          /* Delete one byte of data.  */
@@ -2018,6 +3123,15 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
                    /* Fix the relocation's type.  */
                    irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                                (ELF32_R_TYPE (irel->r_info)
+                                                 == (int) R_MN10300_GOTOFF32)
+                                                ? R_MN10300_GOTOFF16
+                                                : (ELF32_R_TYPE (irel->r_info)
+                                                   == (int) R_MN10300_GOT32)
+                                                ? R_MN10300_GOT16
+                                                : (ELF32_R_TYPE (irel->r_info)
+                                                   == (int) R_MN10300_GOTPC32)
+                                                ? R_MN10300_GOTPC16 :
                                                 R_MN10300_16);
 
                    /* Delete two bytes of data.  */
@@ -2059,6 +3173,15 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
                    /* Fix the relocation's type.  */
                    irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                                (ELF32_R_TYPE (irel->r_info)
+                                                 == (int) R_MN10300_GOTOFF32)
+                                                ? R_MN10300_GOTOFF16
+                                                : (ELF32_R_TYPE (irel->r_info)
+                                                   == (int) R_MN10300_GOT32)
+                                                ? R_MN10300_GOT16
+                                                : (ELF32_R_TYPE (irel->r_info)
+                                                   == (int) R_MN10300_GOTPC32)
+                                                ? R_MN10300_GOTPC16 :
                                                 R_MN10300_16);
 
                    /* The opcode got shorter too, so we have to fix the
@@ -2101,6 +3224,15 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
                    /* Fix the relocation's type.  */
                    irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                                (ELF32_R_TYPE (irel->r_info)
+                                                 == (int) R_MN10300_GOTOFF32)
+                                                ? R_MN10300_GOTOFF16
+                                                : (ELF32_R_TYPE (irel->r_info)
+                                                   == (int) R_MN10300_GOT32)
+                                                ? R_MN10300_GOT16
+                                                : (ELF32_R_TYPE (irel->r_info)
+                                                   == (int) R_MN10300_GOTPC32)
+                                                ? R_MN10300_GOTPC16 :
                                                 R_MN10300_16);
 
                    /* Delete two bytes of data.  */
@@ -2161,6 +3293,15 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
                    /* Fix the relocation's type.  */
                    irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                                (ELF32_R_TYPE (irel->r_info)
+                                                 == (int) R_MN10300_GOTOFF32)
+                                                ? R_MN10300_GOTOFF16
+                                                : (ELF32_R_TYPE (irel->r_info)
+                                                   == (int) R_MN10300_GOT32)
+                                                ? R_MN10300_GOT16
+                                                : (ELF32_R_TYPE (irel->r_info)
+                                                   == (int) R_MN10300_GOTPC32)
+                                                ? R_MN10300_GOTPC16 :
                                                 R_MN10300_16);
 
                    /* The opcode got shorter too, so we have to fix the
@@ -2226,6 +3367,15 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
                    /* Fix the relocation's type.  */
                    irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                                (ELF32_R_TYPE (irel->r_info)
+                                                 == (int) R_MN10300_GOTOFF32)
+                                                ? R_MN10300_GOTOFF16
+                                                : (ELF32_R_TYPE (irel->r_info)
+                                                   == (int) R_MN10300_GOT32)
+                                                ? R_MN10300_GOT16
+                                                : (ELF32_R_TYPE (irel->r_info)
+                                                   == (int) R_MN10300_GOTPC32)
+                                                ? R_MN10300_GOTPC16 :
                                                 R_MN10300_16);
 
                    /* Delete two bytes of data.  */
@@ -2253,6 +3403,15 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
                  /* Fix the relocation's type.  */
                  irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                              (ELF32_R_TYPE (irel->r_info)
+                                               == (int) R_MN10300_GOT32)
+                                              ? R_MN10300_GOT16
+                                              : (ELF32_R_TYPE (irel->r_info)
+                                                 == (int) R_MN10300_GOTOFF32)
+                                              ? R_MN10300_GOTOFF16
+                                              : (ELF32_R_TYPE (irel->r_info)
+                                                 == (int) R_MN10300_GOTPC32)
+                                              ? R_MN10300_GOTPC16 :
                                               R_MN10300_16);
 
                  /* Delete two bytes of data.  */
@@ -2370,7 +3529,8 @@ compute_function_info (abfd, hash, addr, contents)
       if (hash->movm_args & 0x08)
        hash->movm_stack_size += 8 * 4;
 
-      if (bfd_get_mach (abfd) == bfd_mach_am33)
+      if (bfd_get_mach (abfd) == bfd_mach_am33
+         || bfd_get_mach (abfd) == bfd_mach_am33_2)
        {
          /* "exother" space.  e0, e1, mdrq, mcrh, mcrl, mcvf */
          if (hash->movm_args & 0x1)
@@ -2677,6 +3837,7 @@ elf32_mn10300_link_hash_newfunc (entry, table, string)
       ret->stack_size = 0;
       ret->movm_args = 0;
       ret->movm_stack_size = 0;
+      ret->pcrel_relocs_copied = NULL;
       ret->flags = 0;
     }
 
@@ -2750,6 +3911,9 @@ elf_mn10300_mach (flags)
 
     case E_MN10300_MACH_AM33:
       return bfd_mach_am33;
+
+    case E_MN10300_MACH_AM33_2:
+      return bfd_mach_am33_2;
     }
 }
 
@@ -2774,6 +3938,10 @@ _bfd_mn10300_elf_final_write_processing (abfd, linker)
     case bfd_mach_am33:
       val = E_MN10300_MACH_AM33;
       break;
+
+    case bfd_mach_am33_2:
+      val = E_MN10300_MACH_AM33_2;
+      break;
     }
 
   elf_elfheader (abfd)->e_flags &= ~ (EF_MN10300_MACH);
@@ -2812,12 +3980,876 @@ _bfd_mn10300_elf_merge_private_bfd_data (ibfd, obfd)
   return TRUE;
 }
 
+#define PLT0_ENTRY_SIZE 15
+#define PLT_ENTRY_SIZE 20
+#define PIC_PLT_ENTRY_SIZE 24
+
+static const bfd_byte elf_mn10300_plt0_entry[PLT0_ENTRY_SIZE] =
+{
+  0xfc, 0xa0, 0, 0, 0, 0,      /* mov  (.got+8),a0 */
+  0xfe, 0xe, 0x10, 0, 0, 0, 0, /* mov  (.got+4),r1 */
+  0xf0, 0xf4,                  /* jmp  (a0) */
+};
+
+static const bfd_byte elf_mn10300_plt_entry[PLT_ENTRY_SIZE] =
+{
+  0xfc, 0xa0, 0, 0, 0, 0,      /* mov  (nameN@GOT + .got),a0 */
+  0xf0, 0xf4,                  /* jmp  (a0) */
+  0xfe, 8, 0, 0, 0, 0, 0,      /* mov  reloc-table-address,r0 */
+  0xdc, 0, 0, 0, 0,            /* jmp  .plt0 */
+};
+
+static const bfd_byte elf_mn10300_pic_plt_entry[PIC_PLT_ENTRY_SIZE] =
+{
+  0xfc, 0x22, 0, 0, 0, 0,      /* mov  (nameN@GOT,a2),a0 */
+  0xf0, 0xf4,                  /* jmp  (a0) */
+  0xfe, 8, 0, 0, 0, 0, 0,      /* mov  reloc-table-address,r0 */
+  0xf8, 0x22, 8,               /* mov  (8,a2),a0 */
+  0xfb, 0xa, 0x1a, 4,          /* mov  (4,a2),r1 */
+  0xf0, 0xf4,                  /* jmp  (a0) */
+};
+
+/* Return size of the first PLT entry.  */
+#define elf_mn10300_sizeof_plt0(info) \
+  (info->shared ? PIC_PLT_ENTRY_SIZE : PLT0_ENTRY_SIZE)
+
+/* Return size of a PLT entry.  */
+#define elf_mn10300_sizeof_plt(info) \
+  (info->shared ? PIC_PLT_ENTRY_SIZE : PLT_ENTRY_SIZE)
+
+/* Return offset of the PLT0 address in an absolute PLT entry.  */
+#define elf_mn10300_plt_plt0_offset(info) 16
+
+/* Return offset of the linker in PLT0 entry.  */
+#define elf_mn10300_plt0_linker_offset(info) 2
+
+/* Return offset of the GOT id in PLT0 entry.  */
+#define elf_mn10300_plt0_gotid_offset(info) 9
+
+/* Return offset of the tempoline in PLT entry */
+#define elf_mn10300_plt_temp_offset(info) 8
+
+/* Return offset of the symbol in PLT entry.  */
+#define elf_mn10300_plt_symbol_offset(info) 2
+
+/* Return offset of the relocation in PLT entry.  */
+#define elf_mn10300_plt_reloc_offset(info) 11
+
+/* The name of the dynamic interpreter.  This is put in the .interp
+   section.  */
+
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+
+/* Create dynamic sections when linking against a dynamic object.  */
+
+static bfd_boolean
+_bfd_mn10300_elf_create_dynamic_sections (abfd, info)
+     bfd *abfd;
+     struct bfd_link_info *info;
+{
+  flagword   flags;
+  asection * s;
+  struct elf_backend_data * bed = get_elf_backend_data (abfd);
+  int ptralign = 0;
+
+  switch (bed->s->arch_size)
+    {
+    case 32:
+      ptralign = 2;
+      break;
+
+    case 64:
+      ptralign = 3;
+      break;
+
+    default:
+      bfd_set_error (bfd_error_bad_value);
+      return FALSE;
+    }
+
+  /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
+     .rel[a].bss sections.  */
+
+  flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+          | SEC_LINKER_CREATED);
+
+  s = bfd_make_section (abfd,
+                       bed->default_use_rela_p ? ".rela.plt" : ".rel.plt");
+  if (s == NULL
+      || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
+      || ! bfd_set_section_alignment (abfd, s, ptralign))
+    return FALSE;
+
+  if (! _bfd_mn10300_elf_create_got_section (abfd, info))
+    return FALSE;
+
+  {
+    const char * secname;
+    char *       relname;
+    flagword     secflags;
+    asection *   sec;
+
+    for (sec = abfd->sections; sec; sec = sec->next)
+      {
+       secflags = bfd_get_section_flags (abfd, sec);
+       if ((secflags & (SEC_DATA | SEC_LINKER_CREATED))
+           || ((secflags & SEC_HAS_CONTENTS) != SEC_HAS_CONTENTS))
+         continue;
+
+       secname = bfd_get_section_name (abfd, sec);
+       relname = (char *) bfd_malloc (strlen (secname) + 6);
+       strcpy (relname, ".rela");
+       strcat (relname, secname);
+
+       s = bfd_make_section (abfd, relname);
+       if (s == NULL
+           || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
+           || ! bfd_set_section_alignment (abfd, s, ptralign))
+         return FALSE;
+      }
+  }
+
+  if (bed->want_dynbss)
+    {
+      /* The .dynbss section is a place to put symbols which are defined
+        by dynamic objects, are referenced by regular objects, and are
+        not functions.  We must allocate space for them in the process
+        image and use a R_*_COPY reloc to tell the dynamic linker to
+        initialize them at run time.  The linker script puts the .dynbss
+        section into the .bss section of the final image.  */
+      s = bfd_make_section (abfd, ".dynbss");
+      if (s == NULL
+         || ! bfd_set_section_flags (abfd, s, SEC_ALLOC))
+       return FALSE;
+
+      /* The .rel[a].bss section holds copy relocs.  This section is not
+        normally needed.  We need to create it here, though, so that the
+        linker will map it to an output section.  We can't just create it
+        only if we need it, because we will not know whether we need it
+        until we have seen all the input files, and the first time the
+        main linker code calls BFD after examining all the input files
+        (size_dynamic_sections) the input sections have already been
+        mapped to the output sections.  If the section turns out not to
+        be needed, we can discard it later.  We will never need this
+        section when generating a shared object, since they do not use
+        copy relocs.  */
+      if (! info->shared)
+       {
+         s = bfd_make_section (abfd,
+                               (bed->default_use_rela_p
+                                ? ".rela.bss" : ".rel.bss"));
+         if (s == NULL
+             || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
+             || ! bfd_set_section_alignment (abfd, s, ptralign))
+           return FALSE;
+       }
+    }
+
+  return TRUE;
+}
+\f
+/* Adjust a symbol defined by a dynamic object and referenced by a
+   regular object.  The current definition is in some section of the
+   dynamic object, but we're not including those sections.  We have to
+   change the definition to something the rest of the link can
+   understand.  */
+
+static bfd_boolean
+_bfd_mn10300_elf_adjust_dynamic_symbol (info, h)
+     struct bfd_link_info * info;
+     struct elf_link_hash_entry * h;
+{
+  bfd * dynobj;
+  asection * s;
+  unsigned int power_of_two;
+
+  dynobj = elf_hash_table (info)->dynobj;
+
+  /* Make sure we know what is going on here.  */
+  BFD_ASSERT (dynobj != NULL
+             && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
+                 || h->weakdef != NULL
+                 || ((h->elf_link_hash_flags
+                      & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+                     && (h->elf_link_hash_flags
+                         & ELF_LINK_HASH_REF_REGULAR) != 0
+                     && (h->elf_link_hash_flags
+                         & ELF_LINK_HASH_DEF_REGULAR) == 0)));
+
+  /* If this is a function, put it in the procedure linkage table.  We
+     will fill in the contents of the procedure linkage table later,
+     when we know the address of the .got section.  */
+  if (h->type == STT_FUNC
+      || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+    {
+      if (! info->shared
+         && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
+         && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0)
+       {
+         /* This case can occur if we saw a PLT reloc in an input
+            file, but the symbol was never referred to by a dynamic
+            object.  In such a case, we don't actually need to build
+            a procedure linkage table, and we can just do a REL32
+            reloc instead.  */
+         BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0);
+         return TRUE;
+       }
+
+      /* Make sure this symbol is output as a dynamic symbol.  */
+      if (h->dynindx == -1)
+       {
+         if (! bfd_elf32_link_record_dynamic_symbol (info, h))
+           return FALSE;
+       }
+
+      s = bfd_get_section_by_name (dynobj, ".plt");
+      BFD_ASSERT (s != NULL);
+
+      /* If this is the first .plt entry, make room for the special
+        first entry.  */
+      if (s->_raw_size == 0)
+       s->_raw_size += elf_mn10300_sizeof_plt0 (info);
+
+      /* If this symbol is not defined in a regular file, and we are
+        not generating a shared library, then set the symbol to this
+        location in the .plt.  This is required to make function
+        pointers compare as equal between the normal executable and
+        the shared library.  */
+      if (! info->shared
+         && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+       {
+         h->root.u.def.section = s;
+         h->root.u.def.value = s->_raw_size;
+       }
+
+      h->plt.offset = s->_raw_size;
+
+      /* Make room for this entry.  */
+      s->_raw_size += elf_mn10300_sizeof_plt (info);
+
+      /* We also need to make an entry in the .got.plt section, which
+        will be placed in the .got section by the linker script.  */
+
+      s = bfd_get_section_by_name (dynobj, ".got.plt");
+      BFD_ASSERT (s != NULL);
+      s->_raw_size += 4;
+
+      /* We also need to make an entry in the .rela.plt section.  */
+
+      s = bfd_get_section_by_name (dynobj, ".rela.plt");
+      BFD_ASSERT (s != NULL);
+      s->_raw_size += sizeof (Elf32_External_Rela);
+
+      return TRUE;
+    }
+
+  /* If this is a weak symbol, and there is a real definition, the
+     processor independent code will have arranged for us to see the
+     real definition first, and we can just use the same value.  */
+  if (h->weakdef != NULL)
+    {
+      BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
+                 || h->weakdef->root.type == bfd_link_hash_defweak);
+      h->root.u.def.section = h->weakdef->root.u.def.section;
+      h->root.u.def.value = h->weakdef->root.u.def.value;
+      return TRUE;
+    }
+
+  /* This is a reference to a symbol defined by a dynamic object which
+     is not a function.  */
+
+  /* If we are creating a shared library, we must presume that the
+     only references to the symbol are via the global offset table.
+     For such cases we need not do anything here; the relocations will
+     be handled correctly by relocate_section.  */
+  if (info->shared)
+    return TRUE;
+
+  /* If there are no references to this symbol that do not use the
+     GOT, we don't need to generate a copy reloc.  */
+  if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
+    return TRUE;
+
+  /* We must allocate the symbol in our .dynbss section, which will
+     become part of the .bss section of the executable.  There will be
+     an entry for this symbol in the .dynsym section.  The dynamic
+     object will contain position independent code, so all references
+     from the dynamic object to this symbol will go through the global
+     offset table.  The dynamic linker will use the .dynsym entry to
+     determine the address it must put in the global offset table, so
+     both the dynamic object and the regular object will refer to the
+     same memory location for the variable.  */
+
+  s = bfd_get_section_by_name (dynobj, ".dynbss");
+  BFD_ASSERT (s != NULL);
+
+  /* We must generate a R_MN10300_COPY reloc to tell the dynamic linker to
+     copy the initial value out of the dynamic object and into the
+     runtime process image.  We need to remember the offset into the
+     .rela.bss section we are going to use.  */
+  if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+    {
+      asection * srel;
+
+      srel = bfd_get_section_by_name (dynobj, ".rela.bss");
+      BFD_ASSERT (srel != NULL);
+      srel->_raw_size += sizeof (Elf32_External_Rela);
+      h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+    }
+
+  /* We need to figure out the alignment required for this symbol.  I
+     have no idea how ELF linkers handle this.  */
+  power_of_two = bfd_log2 (h->size);
+  if (power_of_two > 3)
+    power_of_two = 3;
+
+  /* Apply the required alignment.  */
+  s->_raw_size = BFD_ALIGN (s->_raw_size,
+                           (bfd_size_type) (1 << power_of_two));
+  if (power_of_two > bfd_get_section_alignment (dynobj, s))
+    {
+      if (! bfd_set_section_alignment (dynobj, s, power_of_two))
+       return FALSE;
+    }
+
+  /* Define the symbol as being at this point in the section.  */
+  h->root.u.def.section = s;
+  h->root.u.def.value = s->_raw_size;
+
+  /* Increment the section size to make room for the symbol.  */
+  s->_raw_size += h->size;
+
+  return TRUE;
+}
+
+/* This function is called via elf32_mn10300_link_hash_traverse if we are
+   creating a shared object with -Bsymbolic.  It discards the space
+   allocated to copy PC relative relocs against symbols which are
+   defined in regular objects.  We allocated space for them in the
+   check_relocs routine, but we won't fill them in in the
+   relocate_section routine.  */
+
+static bfd_boolean
+_bfd_mn10300_elf_discard_copies (h, info)
+     struct elf32_mn10300_link_hash_entry *h;
+     struct bfd_link_info *info;
+{
+  struct elf_mn10300_pcrel_relocs_copied *s;
+
+  /* If a symbol has been forced local or we have found a regular
+     definition for the symbolic link case, then we won't be needing
+     any relocs.  */
+  if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
+      && ((h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
+         || info->symbolic))
+    {
+      for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
+       s->section->_raw_size -= s->count * sizeof (Elf32_External_Rel);
+    }
+
+  return TRUE;
+}
+
+/* Set the sizes of the dynamic sections.  */
+
+static bfd_boolean
+_bfd_mn10300_elf_size_dynamic_sections (output_bfd, info)
+     bfd * output_bfd;
+     struct bfd_link_info * info;
+{
+  bfd * dynobj;
+  asection * s;
+  bfd_boolean plt;
+  bfd_boolean relocs;
+  bfd_boolean reltext;
+
+  dynobj = elf_hash_table (info)->dynobj;
+  BFD_ASSERT (dynobj != NULL);
+
+  if (elf_hash_table (info)->dynamic_sections_created)
+    {
+      /* Set the contents of the .interp section to the interpreter.  */
+      if (! info->shared)
+       {
+         s = bfd_get_section_by_name (dynobj, ".interp");
+         BFD_ASSERT (s != NULL);
+         s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+         s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+       }
+    }
+  else
+    {
+      /* We may have created entries in the .rela.got section.
+        However, if we are not creating the dynamic sections, we will
+        not actually use these entries.  Reset the size of .rela.got,
+        which will cause it to get stripped from the output file
+        below.  */
+      s = bfd_get_section_by_name (dynobj, ".rela.got");
+      if (s != NULL)
+       s->_raw_size = 0;
+    }
+
+  /* If this is a -Bsymbolic shared link, then we need to discard all
+     PC relative relocs against symbols defined in a regular object.
+     We allocated space for them in the check_relocs routine, but we
+     will not fill them in in the relocate_section routine.  */
+  if (info->shared && info->symbolic)
+    elf32_mn10300_link_hash_traverse (elf32_mn10300_hash_table (info),
+                                     _bfd_mn10300_elf_discard_copies,
+                                     info);
+
+  /* The check_relocs and adjust_dynamic_symbol entry points have
+     determined the sizes of the various dynamic sections.  Allocate
+     memory for them.  */
+  plt = FALSE;
+  relocs = FALSE;
+  reltext = FALSE;
+  for (s = dynobj->sections; s != NULL; s = s->next)
+    {
+      const char * name;
+      bfd_boolean strip;
+
+      if ((s->flags & SEC_LINKER_CREATED) == 0)
+       continue;
+
+      /* It's OK to base decisions on the section name, because none
+        of the dynobj section names depend upon the input files.  */
+      name = bfd_get_section_name (dynobj, s);
+
+      strip = FALSE;
+
+      if (strcmp (name, ".plt") == 0)
+       {
+         if (s->_raw_size == 0)
+           /* Strip this section if we don't need it; see the
+              comment below.  */
+           strip = TRUE;
+         else
+           /* Remember whether there is a PLT.  */
+           plt = TRUE;
+       }
+      else if (strncmp (name, ".rela", 5) == 0)
+       {
+         if (s->_raw_size == 0)
+           {
+             /* If we don't need this section, strip it from the
+                output file.  This is mostly to handle .rela.bss and
+                .rela.plt.  We must create both sections in
+                create_dynamic_sections, because they must be created
+                before the linker maps input sections to output
+                sections.  The linker does that before
+                adjust_dynamic_symbol is called, and it is that
+                function which decides whether anything needs to go
+                into these sections.  */
+             strip = TRUE;
+           }
+         else
+           {
+             asection * target;
+
+             /* Remember whether there are any reloc sections other
+                than .rela.plt.  */
+             if (strcmp (name, ".rela.plt") != 0)
+               {
+                 const char * outname;
+
+                 relocs = TRUE;
+
+                 /* If this relocation section applies to a read only
+                    section, then we probably need a DT_TEXTREL
+                    entry.  The entries in the .rela.plt section
+                    really apply to the .got section, which we
+                    created ourselves and so know is not readonly.  */
+                 outname = bfd_get_section_name (output_bfd,
+                                                 s->output_section);
+                 target = bfd_get_section_by_name (output_bfd, outname + 5);
+                 if (target != NULL
+                     && (target->flags & SEC_READONLY) != 0
+                     && (target->flags & SEC_ALLOC) != 0)
+                   reltext = TRUE;
+               }
+
+             /* We use the reloc_count field as a counter if we need
+                to copy relocs into the output file.  */
+             s->reloc_count = 0;
+           }
+       }
+      else if (strncmp (name, ".got", 4) != 0)
+       /* It's not one of our sections, so don't allocate space.  */
+       continue;
+
+      if (strip)
+       {
+         _bfd_strip_section_from_output (info, s);
+         continue;
+       }
+
+      /* Allocate memory for the section contents.  We use bfd_zalloc
+        here in case unused entries are not reclaimed before the
+        section's contents are written out.  This should not happen,
+        but this way if it does, we get a R_MN10300_NONE reloc
+        instead of garbage.  */
+      s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+      if (s->contents == NULL && s->_raw_size != 0)
+       return FALSE;
+    }
+
+  if (elf_hash_table (info)->dynamic_sections_created)
+    {
+      /* Add some entries to the .dynamic section.  We fill in the
+        values later, in _bfd_mn10300_elf_finish_dynamic_sections,
+        but we must add the entries now so that we get the correct
+        size for the .dynamic section.  The DT_DEBUG entry is filled
+        in by the dynamic linker and used by the debugger.  */
+      if (! info->shared)
+       {
+         if (! bfd_elf32_add_dynamic_entry (info, DT_DEBUG, 0))
+           return FALSE;
+       }
+
+      if (plt)
+       {
+         if (! bfd_elf32_add_dynamic_entry (info, DT_PLTGOT, 0)
+             || ! bfd_elf32_add_dynamic_entry (info, DT_PLTRELSZ, 0)
+             || ! bfd_elf32_add_dynamic_entry (info, DT_PLTREL, DT_RELA)
+             || ! bfd_elf32_add_dynamic_entry (info, DT_JMPREL, 0))
+           return FALSE;
+       }
+
+      if (relocs)
+       {
+         if (! bfd_elf32_add_dynamic_entry (info, DT_RELA, 0)
+             || ! bfd_elf32_add_dynamic_entry (info, DT_RELASZ, 0)
+             || ! bfd_elf32_add_dynamic_entry (info, DT_RELAENT,
+                                               sizeof (Elf32_External_Rela)))
+           return FALSE;
+       }
+
+      if (reltext)
+       {
+         if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
+           return FALSE;
+       }
+    }
+
+  return TRUE;
+}
+
+/* Finish up dynamic symbol handling.  We set the contents of various
+   dynamic sections here.  */
+
+static bfd_boolean
+_bfd_mn10300_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
+     bfd * output_bfd;
+     struct bfd_link_info * info;
+     struct elf_link_hash_entry * h;
+     Elf_Internal_Sym * sym;
+{
+  bfd * dynobj;
+
+  dynobj = elf_hash_table (info)->dynobj;
+
+  if (h->plt.offset != (bfd_vma) -1)
+    {
+      asection *        splt;
+      asection *        sgot;
+      asection *        srel;
+      bfd_vma           plt_index;
+      bfd_vma           got_offset;
+      Elf_Internal_Rela rel;
+
+      /* This symbol has an entry in the procedure linkage table.  Set
+        it up.  */
+
+      BFD_ASSERT (h->dynindx != -1);
+
+      splt = bfd_get_section_by_name (dynobj, ".plt");
+      sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+      srel = bfd_get_section_by_name (dynobj, ".rela.plt");
+      BFD_ASSERT (splt != NULL && sgot != NULL && srel != NULL);
+
+      /* Get the index in the procedure linkage table which
+        corresponds to this symbol.  This is the index of this symbol
+        in all the symbols for which we are making plt entries.  The
+        first entry in the procedure linkage table is reserved.  */
+      plt_index = ((h->plt.offset - elf_mn10300_sizeof_plt0 (info))
+                  / elf_mn10300_sizeof_plt (info));
+
+      /* Get the offset into the .got table of the entry that
+        corresponds to this function.  Each .got entry is 4 bytes.
+        The first three are reserved.  */
+      got_offset = (plt_index + 3) * 4;
+
+      /* Fill in the entry in the procedure linkage table.  */
+      if (! info->shared)
+       {
+         memcpy (splt->contents + h->plt.offset, elf_mn10300_plt_entry,
+                 elf_mn10300_sizeof_plt (info));
+         bfd_put_32 (output_bfd,
+                     (sgot->output_section->vma
+                      + sgot->output_offset
+                      + got_offset),
+                     (splt->contents + h->plt.offset
+                      + elf_mn10300_plt_symbol_offset (info)));
+
+         bfd_put_32 (output_bfd,
+                     (1 - h->plt.offset - elf_mn10300_plt_plt0_offset (info)),
+                     (splt->contents + h->plt.offset
+                      + elf_mn10300_plt_plt0_offset (info)));
+       }
+      else
+       {
+         memcpy (splt->contents + h->plt.offset, elf_mn10300_pic_plt_entry,
+                 elf_mn10300_sizeof_plt (info));
+
+         bfd_put_32 (output_bfd, got_offset,
+                     (splt->contents + h->plt.offset
+                      + elf_mn10300_plt_symbol_offset (info)));
+       }
+
+      bfd_put_32 (output_bfd, plt_index * sizeof (Elf32_External_Rela),
+                 (splt->contents + h->plt.offset
+                  + elf_mn10300_plt_reloc_offset (info)));
+
+      /* Fill in the entry in the global offset table.  */
+      bfd_put_32 (output_bfd,
+                 (splt->output_section->vma
+                  + splt->output_offset
+                  + h->plt.offset
+                  + elf_mn10300_plt_temp_offset (info)),
+                 sgot->contents + got_offset);
+
+      /* Fill in the entry in the .rela.plt section.  */
+      rel.r_offset = (sgot->output_section->vma
+                     + sgot->output_offset
+                     + got_offset);
+      rel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_JMP_SLOT);
+      rel.r_addend = 0;
+      bfd_elf32_swap_reloca_out (output_bfd, &rel,
+                               ((Elf32_External_Rela *) srel->contents
+                                + plt_index));
+
+      if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+       /* Mark the symbol as undefined, rather than as defined in
+          the .plt section.  Leave the value alone.  */
+       sym->st_shndx = SHN_UNDEF;
+    }
+
+  if (h->got.offset != (bfd_vma) -1)
+    {
+      asection *        sgot;
+      asection *        srel;
+      Elf_Internal_Rela rel;
+
+      /* This symbol has an entry in the global offset table.  Set it up.  */
+
+      sgot = bfd_get_section_by_name (dynobj, ".got");
+      srel = bfd_get_section_by_name (dynobj, ".rela.got");
+      BFD_ASSERT (sgot != NULL && srel != NULL);
+
+      rel.r_offset = (sgot->output_section->vma
+                     + sgot->output_offset
+                     + (h->got.offset &~ 1));
+
+      /* If this is a -Bsymbolic link, and the symbol is defined
+        locally, we just want to emit a RELATIVE reloc.  Likewise if
+        the symbol was forced to be local because of a version file.
+        The entry in the global offset table will already have been
+        initialized in the relocate_section function.  */
+      if (info->shared
+         && (info->symbolic || h->dynindx == -1)
+         && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+       {
+         rel.r_info = ELF32_R_INFO (0, R_MN10300_RELATIVE);
+         rel.r_addend = (h->root.u.def.value
+                         + h->root.u.def.section->output_section->vma
+                         + h->root.u.def.section->output_offset);
+       }
+      else
+       {
+         bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
+         rel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_GLOB_DAT);
+         rel.r_addend = 0;
+       }
+
+      bfd_elf32_swap_reloca_out (output_bfd, &rel,
+                                ((Elf32_External_Rela *) srel->contents
+                                 + srel->reloc_count));
+      ++ srel->reloc_count;
+    }
+
+  if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+    {
+      asection *        s;
+      Elf_Internal_Rela rel;
+
+      /* This symbol needs a copy reloc.  Set it up.  */
+      BFD_ASSERT (h->dynindx != -1
+                 && (h->root.type == bfd_link_hash_defined
+                     || h->root.type == bfd_link_hash_defweak));
+
+      s = bfd_get_section_by_name (h->root.u.def.section->owner,
+                                  ".rela.bss");
+      BFD_ASSERT (s != NULL);
+
+      rel.r_offset = (h->root.u.def.value
+                     + h->root.u.def.section->output_section->vma
+                     + h->root.u.def.section->output_offset);
+      rel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_COPY);
+      rel.r_addend = 0;
+      bfd_elf32_swap_reloca_out (output_bfd, &rel,
+                                ((Elf32_External_Rela *) s->contents
+                                 + s->reloc_count));
+      ++ s->reloc_count;
+    }
+
+  /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */
+  if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+      || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
+    sym->st_shndx = SHN_ABS;
+
+  return TRUE;
+}
+
+/* Finish up the dynamic sections.  */
+
+static bfd_boolean
+_bfd_mn10300_elf_finish_dynamic_sections (output_bfd, info)
+     bfd * output_bfd;
+     struct bfd_link_info * info;
+{
+  bfd *      dynobj;
+  asection * sgot;
+  asection * sdyn;
+
+  dynobj = elf_hash_table (info)->dynobj;
+
+  sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+  BFD_ASSERT (sgot != NULL);
+  sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+  if (elf_hash_table (info)->dynamic_sections_created)
+    {
+      asection *           splt;
+      Elf32_External_Dyn * dyncon;
+      Elf32_External_Dyn * dynconend;
+
+      BFD_ASSERT (sdyn != NULL);
+
+      dyncon = (Elf32_External_Dyn *) sdyn->contents;
+      dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+
+      for (; dyncon < dynconend; dyncon++)
+       {
+         Elf_Internal_Dyn dyn;
+         const char * name;
+         asection * s;
+
+         bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+
+         switch (dyn.d_tag)
+           {
+           default:
+             break;
+
+           case DT_PLTGOT:
+             name = ".got";
+             goto get_vma;
+
+           case DT_JMPREL:
+             name = ".rela.plt";
+           get_vma:
+             s = bfd_get_section_by_name (output_bfd, name);
+             BFD_ASSERT (s != NULL);
+             dyn.d_un.d_ptr = s->vma;
+             bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+             break;
+
+           case DT_PLTRELSZ:
+             s = bfd_get_section_by_name (output_bfd, ".rela.plt");
+             BFD_ASSERT (s != NULL);
+             if (s->_cooked_size != 0)
+               dyn.d_un.d_val = s->_cooked_size;
+             else
+               dyn.d_un.d_val = s->_raw_size;
+             bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+             break;
+
+           case DT_RELASZ:
+             /* My reading of the SVR4 ABI indicates that the
+                procedure linkage table relocs (DT_JMPREL) should be
+                included in the overall relocs (DT_RELA).  This is
+                what Solaris does.  However, UnixWare can not handle
+                that case.  Therefore, we override the DT_RELASZ entry
+                here to make it not include the JMPREL relocs.  Since
+                the linker script arranges for .rela.plt to follow all
+                other relocation sections, we don't have to worry
+                about changing the DT_RELA entry.  */
+             s = bfd_get_section_by_name (output_bfd, ".rela.plt");
+             if (s != NULL)
+               {
+                 if (s->_cooked_size != 0)
+                   dyn.d_un.d_val -= s->_cooked_size;
+                 else
+                   dyn.d_un.d_val -= s->_raw_size;
+               }
+             bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+             break;
+           }
+       }
+
+      /* Fill in the first entry in the procedure linkage table.  */
+      splt = bfd_get_section_by_name (dynobj, ".plt");
+      if (splt && splt->_raw_size > 0)
+       {
+         if (info->shared)
+           {
+             memcpy (splt->contents, elf_mn10300_pic_plt_entry,
+                     elf_mn10300_sizeof_plt (info));
+           }
+         else
+           {
+             memcpy (splt->contents, elf_mn10300_plt0_entry, PLT0_ENTRY_SIZE);
+             bfd_put_32 (output_bfd,
+                         sgot->output_section->vma + sgot->output_offset + 4,
+                         splt->contents + elf_mn10300_plt0_gotid_offset (info));
+             bfd_put_32 (output_bfd,
+                         sgot->output_section->vma + sgot->output_offset + 8,
+                         splt->contents + elf_mn10300_plt0_linker_offset (info));
+           }
+
+         /* UnixWare sets the entsize of .plt to 4, although that doesn't
+            really seem like the right value.  */
+         elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+       }
+    }
+
+  /* Fill in the first three entries in the global offset table.  */
+  if (sgot->_raw_size > 0)
+    {
+      if (sdyn == NULL)
+       bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
+      else
+       bfd_put_32 (output_bfd,
+                   sdyn->output_section->vma + sdyn->output_offset,
+                   sgot->contents);
+      bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 4);
+      bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 8);
+    }
+
+  elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
+
+  return TRUE;
+}
+
+#ifndef ELF_ARCH
 #define TARGET_LITTLE_SYM      bfd_elf32_mn10300_vec
 #define TARGET_LITTLE_NAME     "elf32-mn10300"
 #define ELF_ARCH               bfd_arch_mn10300
 #define ELF_MACHINE_CODE       EM_MN10300
 #define ELF_MACHINE_ALT1       EM_CYGNUS_MN10300
 #define ELF_MAXPAGESIZE                0x1000
+#endif
 
 #define elf_info_to_howto              mn10300_info_to_howto
 #define elf_info_to_howto_rel          0
@@ -2834,7 +4866,9 @@ _bfd_mn10300_elf_merge_private_bfd_data (ibfd, obfd)
 #define bfd_elf32_bfd_link_hash_table_free \
                                elf32_mn10300_link_hash_table_free
 
+#ifndef elf_symbol_leading_char
 #define elf_symbol_leading_char '_'
+#endif
 
 /* So we can set bits in e_flags.  */
 #define elf_backend_final_write_processing \
@@ -2844,4 +4878,22 @@ _bfd_mn10300_elf_merge_private_bfd_data (ibfd, obfd)
 #define bfd_elf32_bfd_merge_private_bfd_data \
                                         _bfd_mn10300_elf_merge_private_bfd_data
 
+#define elf_backend_can_gc_sections    1
+#define elf_backend_create_dynamic_sections \
+  _bfd_mn10300_elf_create_dynamic_sections
+#define elf_backend_adjust_dynamic_symbol \
+  _bfd_mn10300_elf_adjust_dynamic_symbol
+#define elf_backend_size_dynamic_sections \
+  _bfd_mn10300_elf_size_dynamic_sections
+#define elf_backend_finish_dynamic_symbol \
+  _bfd_mn10300_elf_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_sections \
+  _bfd_mn10300_elf_finish_dynamic_sections
+
+#define elf_backend_want_got_plt       1
+#define elf_backend_plt_readonly       1
+#define elf_backend_want_plt_sym       0
+#define elf_backend_got_header_size    12
+#define elf_backend_plt_header_size    PLT0_ENTRY_SIZE
+
 #include "elf32-target.h"
index 470f3c2f76e3220bff153ac9c7f9a6181237a704..33848a2b4dc802c4d8073c6d7fbd03525d9a5d3a 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
 #include "elf-bfd.h"
 #include "libiberty.h"
 
-static INLINE struct elf_segment_map *make_mapping
-  PARAMS ((bfd *, asection **, unsigned int, unsigned int, bfd_boolean));
-static bfd_boolean map_sections_to_segments
-  PARAMS ((bfd *));
-static int elf_sort_sections
-  PARAMS ((const PTR, const PTR));
-static bfd_boolean assign_file_positions_for_segments
-  PARAMS ((bfd *));
-static bfd_boolean assign_file_positions_except_relocs
-  PARAMS ((bfd *));
-static bfd_boolean prep_headers
-  PARAMS ((bfd *));
-static bfd_boolean swap_out_syms
-  PARAMS ((bfd *, struct bfd_strtab_hash **, int));
-static bfd_boolean copy_private_bfd_data
-  PARAMS ((bfd *, bfd *));
-static char *elf_read
-  PARAMS ((bfd *, file_ptr, bfd_size_type));
-static const char *group_signature
-  PARAMS ((bfd *, Elf_Internal_Shdr *));
-static bfd_boolean setup_group
-  PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
-static void merge_sections_remove_hook
-  PARAMS ((bfd *, asection *));
-static void elf_fake_sections
-  PARAMS ((bfd *, asection *, PTR));
-static bfd_boolean assign_section_numbers
-  PARAMS ((bfd *));
-static INLINE int sym_is_global
-  PARAMS ((bfd *, asymbol *));
-static bfd_boolean elf_map_symbols
-  PARAMS ((bfd *));
-static bfd_size_type get_program_header_size
-  PARAMS ((bfd *));
-static bfd_boolean elfcore_read_notes
-  PARAMS ((bfd *, file_ptr, bfd_size_type));
-static bfd_boolean elf_find_function
-  PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
-          const char **));
-static int elfcore_make_pid
-  PARAMS ((bfd *));
-static bfd_boolean elfcore_maybe_make_sect
-  PARAMS ((bfd *, char *, asection *));
-static bfd_boolean elfcore_make_note_pseudosection
-  PARAMS ((bfd *, char *, Elf_Internal_Note *));
-static bfd_boolean elfcore_grok_prfpreg
-  PARAMS ((bfd *, Elf_Internal_Note *));
-static bfd_boolean elfcore_grok_prxfpreg
-  PARAMS ((bfd *, Elf_Internal_Note *));
-static bfd_boolean elfcore_grok_note
-  PARAMS ((bfd *, Elf_Internal_Note *));
-static bfd_boolean elfcore_netbsd_get_lwpid
-  PARAMS ((Elf_Internal_Note *, int *));
-static bfd_boolean elfcore_grok_netbsd_procinfo
-  PARAMS ((bfd *, Elf_Internal_Note *));
-static bfd_boolean elfcore_grok_netbsd_note
-  PARAMS ((bfd *, Elf_Internal_Note *));
-static bfd_boolean elfcore_grok_nto_gregs
-  PARAMS ((bfd *, Elf_Internal_Note *, pid_t));
-static bfd_boolean elfcore_grok_nto_status
-  PARAMS ((bfd *, Elf_Internal_Note *, pid_t *));
-static bfd_boolean elfcore_grok_nto_note
-  PARAMS ((bfd *, Elf_Internal_Note *));
+static int elf_sort_sections (const void *, const void *);
+static bfd_boolean assign_file_positions_except_relocs (bfd *);
+static bfd_boolean prep_headers (bfd *);
+static bfd_boolean swap_out_syms (bfd *, struct bfd_strtab_hash **, int) ;
+static bfd_boolean elfcore_read_notes (bfd *, file_ptr, bfd_size_type) ;
 
 /* Swap version information in and out.  The version information is
    currently size independent.  If that ever changes, this code will
@@ -111,10 +53,9 @@ static bfd_boolean elfcore_grok_nto_note
 /* Swap in a Verdef structure.  */
 
 void
-_bfd_elf_swap_verdef_in (abfd, src, dst)
-     bfd *abfd;
-     const Elf_External_Verdef *src;
-     Elf_Internal_Verdef *dst;
+_bfd_elf_swap_verdef_in (bfd *abfd,
+                        const Elf_External_Verdef *src,
+                        Elf_Internal_Verdef *dst)
 {
   dst->vd_version = H_GET_16 (abfd, src->vd_version);
   dst->vd_flags   = H_GET_16 (abfd, src->vd_flags);
@@ -128,10 +69,9 @@ _bfd_elf_swap_verdef_in (abfd, src, dst)
 /* Swap out a Verdef structure.  */
 
 void
-_bfd_elf_swap_verdef_out (abfd, src, dst)
-     bfd *abfd;
-     const Elf_Internal_Verdef *src;
-     Elf_External_Verdef *dst;
+_bfd_elf_swap_verdef_out (bfd *abfd,
+                         const Elf_Internal_Verdef *src,
+                         Elf_External_Verdef *dst)
 {
   H_PUT_16 (abfd, src->vd_version, dst->vd_version);
   H_PUT_16 (abfd, src->vd_flags, dst->vd_flags);
@@ -145,10 +85,9 @@ _bfd_elf_swap_verdef_out (abfd, src, dst)
 /* Swap in a Verdaux structure.  */
 
 void
-_bfd_elf_swap_verdaux_in (abfd, src, dst)
-     bfd *abfd;
-     const Elf_External_Verdaux *src;
-     Elf_Internal_Verdaux *dst;
+_bfd_elf_swap_verdaux_in (bfd *abfd,
+                         const Elf_External_Verdaux *src,
+                         Elf_Internal_Verdaux *dst)
 {
   dst->vda_name = H_GET_32 (abfd, src->vda_name);
   dst->vda_next = H_GET_32 (abfd, src->vda_next);
@@ -157,10 +96,9 @@ _bfd_elf_swap_verdaux_in (abfd, src, dst)
 /* Swap out a Verdaux structure.  */
 
 void
-_bfd_elf_swap_verdaux_out (abfd, src, dst)
-     bfd *abfd;
-     const Elf_Internal_Verdaux *src;
-     Elf_External_Verdaux *dst;
+_bfd_elf_swap_verdaux_out (bfd *abfd,
+                          const Elf_Internal_Verdaux *src,
+                          Elf_External_Verdaux *dst)
 {
   H_PUT_32 (abfd, src->vda_name, dst->vda_name);
   H_PUT_32 (abfd, src->vda_next, dst->vda_next);
@@ -169,10 +107,9 @@ _bfd_elf_swap_verdaux_out (abfd, src, dst)
 /* Swap in a Verneed structure.  */
 
 void
-_bfd_elf_swap_verneed_in (abfd, src, dst)
-     bfd *abfd;
-     const Elf_External_Verneed *src;
-     Elf_Internal_Verneed *dst;
+_bfd_elf_swap_verneed_in (bfd *abfd,
+                         const Elf_External_Verneed *src,
+                         Elf_Internal_Verneed *dst)
 {
   dst->vn_version = H_GET_16 (abfd, src->vn_version);
   dst->vn_cnt     = H_GET_16 (abfd, src->vn_cnt);
@@ -184,10 +121,9 @@ _bfd_elf_swap_verneed_in (abfd, src, dst)
 /* Swap out a Verneed structure.  */
 
 void
-_bfd_elf_swap_verneed_out (abfd, src, dst)
-     bfd *abfd;
-     const Elf_Internal_Verneed *src;
-     Elf_External_Verneed *dst;
+_bfd_elf_swap_verneed_out (bfd *abfd,
+                          const Elf_Internal_Verneed *src,
+                          Elf_External_Verneed *dst)
 {
   H_PUT_16 (abfd, src->vn_version, dst->vn_version);
   H_PUT_16 (abfd, src->vn_cnt, dst->vn_cnt);
@@ -199,10 +135,9 @@ _bfd_elf_swap_verneed_out (abfd, src, dst)
 /* Swap in a Vernaux structure.  */
 
 void
-_bfd_elf_swap_vernaux_in (abfd, src, dst)
-     bfd *abfd;
-     const Elf_External_Vernaux *src;
-     Elf_Internal_Vernaux *dst;
+_bfd_elf_swap_vernaux_in (bfd *abfd,
+                         const Elf_External_Vernaux *src,
+                         Elf_Internal_Vernaux *dst)
 {
   dst->vna_hash  = H_GET_32 (abfd, src->vna_hash);
   dst->vna_flags = H_GET_16 (abfd, src->vna_flags);
@@ -214,10 +149,9 @@ _bfd_elf_swap_vernaux_in (abfd, src, dst)
 /* Swap out a Vernaux structure.  */
 
 void
-_bfd_elf_swap_vernaux_out (abfd, src, dst)
-     bfd *abfd;
-     const Elf_Internal_Vernaux *src;
-     Elf_External_Vernaux *dst;
+_bfd_elf_swap_vernaux_out (bfd *abfd,
+                          const Elf_Internal_Vernaux *src,
+                          Elf_External_Vernaux *dst)
 {
   H_PUT_32 (abfd, src->vna_hash, dst->vna_hash);
   H_PUT_16 (abfd, src->vna_flags, dst->vna_flags);
@@ -229,10 +163,9 @@ _bfd_elf_swap_vernaux_out (abfd, src, dst)
 /* Swap in a Versym structure.  */
 
 void
-_bfd_elf_swap_versym_in (abfd, src, dst)
-     bfd *abfd;
-     const Elf_External_Versym *src;
-     Elf_Internal_Versym *dst;
+_bfd_elf_swap_versym_in (bfd *abfd,
+                        const Elf_External_Versym *src,
+                        Elf_Internal_Versym *dst)
 {
   dst->vs_vers = H_GET_16 (abfd, src->vs_vers);
 }
@@ -240,10 +173,9 @@ _bfd_elf_swap_versym_in (abfd, src, dst)
 /* Swap out a Versym structure.  */
 
 void
-_bfd_elf_swap_versym_out (abfd, src, dst)
-     bfd *abfd;
-     const Elf_Internal_Versym *src;
-     Elf_External_Versym *dst;
+_bfd_elf_swap_versym_out (bfd *abfd,
+                         const Elf_Internal_Versym *src,
+                         Elf_External_Versym *dst)
 {
   H_PUT_16 (abfd, src->vs_vers, dst->vs_vers);
 }
@@ -252,8 +184,7 @@ _bfd_elf_swap_versym_out (abfd, src, dst)
    cause invalid hash tables to be generated.  */
 
 unsigned long
-bfd_elf_hash (namearg)
-     const char *namearg;
+bfd_elf_hash (const char *namearg)
 {
   const unsigned char *name = (const unsigned char *) namearg;
   unsigned long h = 0;
@@ -279,10 +210,7 @@ bfd_elf_hash (namearg)
    buffer.  */
 
 static char *
-elf_read (abfd, offset, size)
-     bfd *abfd;
-     file_ptr offset;
-     bfd_size_type size;
+elf_read (bfd *abfd, file_ptr offset, bfd_size_type size)
 {
   char *buf;
 
@@ -290,7 +218,7 @@ elf_read (abfd, offset, size)
     return NULL;
   if (bfd_seek (abfd, offset, SEEK_SET) != 0)
     return NULL;
-  if (bfd_bread ((PTR) buf, size, abfd) != size)
+  if (bfd_bread (buf, size, abfd) != size)
     {
       if (bfd_get_error () != bfd_error_system_call)
        bfd_set_error (bfd_error_file_truncated);
@@ -300,13 +228,11 @@ elf_read (abfd, offset, size)
 }
 
 bfd_boolean
-bfd_elf_mkobject (abfd)
-     bfd *abfd;
+bfd_elf_mkobject (bfd *abfd)
 {
   /* This just does initialization.  */
   /* coff_mkobject zalloc's space for tdata.coff_obj_data ...  */
-  bfd_size_type amt = sizeof (struct elf_obj_tdata);
-  elf_tdata (abfd) = (struct elf_obj_tdata *) bfd_zalloc (abfd, amt);
+  elf_tdata (abfd) = bfd_zalloc (abfd, sizeof (struct elf_obj_tdata));
   if (elf_tdata (abfd) == 0)
     return FALSE;
   /* Since everything is done at close time, do we need any
@@ -316,17 +242,14 @@ bfd_elf_mkobject (abfd)
 }
 
 bfd_boolean
-bfd_elf_mkcorefile (abfd)
-     bfd *abfd;
+bfd_elf_mkcorefile (bfd *abfd)
 {
   /* I think this can be done just like an object file.  */
   return bfd_elf_mkobject (abfd);
 }
 
 char *
-bfd_elf_get_str_section (abfd, shindex)
-     bfd *abfd;
-     unsigned int shindex;
+bfd_elf_get_str_section (bfd *abfd, unsigned int shindex)
 {
   Elf_Internal_Shdr **i_shdrp;
   char *shstrtab = NULL;
@@ -344,16 +267,15 @@ bfd_elf_get_str_section (abfd, shindex)
       offset = i_shdrp[shindex]->sh_offset;
       shstrtabsize = i_shdrp[shindex]->sh_size;
       shstrtab = elf_read (abfd, offset, shstrtabsize);
-      i_shdrp[shindex]->contents = (PTR) shstrtab;
+      i_shdrp[shindex]->contents = shstrtab;
     }
   return shstrtab;
 }
 
 char *
-bfd_elf_string_from_elf_section (abfd, shindex, strindex)
-     bfd *abfd;
-     unsigned int shindex;
-     unsigned int strindex;
+bfd_elf_string_from_elf_section (bfd *abfd,
+                                unsigned int shindex,
+                                unsigned int strindex)
 {
   Elf_Internal_Shdr *hdr;
 
@@ -388,18 +310,16 @@ bfd_elf_string_from_elf_section (abfd, shindex, strindex)
    symbols, and symbol section index extensions, respectively.  */
 
 Elf_Internal_Sym *
-bfd_elf_get_elf_syms (ibfd, symtab_hdr, symcount, symoffset,
-                     intsym_buf, extsym_buf, extshndx_buf)
-     bfd *ibfd;
-     Elf_Internal_Shdr *symtab_hdr;
-     size_t symcount;
-     size_t symoffset;
-     Elf_Internal_Sym *intsym_buf;
-     PTR extsym_buf;
-     Elf_External_Sym_Shndx *extshndx_buf;
+bfd_elf_get_elf_syms (bfd *ibfd,
+                     Elf_Internal_Shdr *symtab_hdr,
+                     size_t symcount,
+                     size_t symoffset,
+                     Elf_Internal_Sym *intsym_buf,
+                     void *extsym_buf,
+                     Elf_External_Sym_Shndx *extshndx_buf)
 {
   Elf_Internal_Shdr *shndx_hdr;
-  PTR alloc_ext;
+  void *alloc_ext;
   const bfd_byte *esym;
   Elf_External_Sym_Shndx *alloc_extshndx;
   Elf_External_Sym_Shndx *shndx;
@@ -446,7 +366,7 @@ bfd_elf_get_elf_syms (ibfd, symtab_hdr, symcount, symoffset,
       pos = shndx_hdr->sh_offset + symoffset * sizeof (Elf_External_Sym_Shndx);
       if (extshndx_buf == NULL)
        {
-         alloc_extshndx = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
+         alloc_extshndx = bfd_malloc (amt);
          extshndx_buf = alloc_extshndx;
        }
       if (extshndx_buf == NULL
@@ -461,7 +381,7 @@ bfd_elf_get_elf_syms (ibfd, symtab_hdr, symcount, symoffset,
   if (intsym_buf == NULL)
     {
       bfd_size_type amt = symcount * sizeof (Elf_Internal_Sym);
-      intsym_buf = (Elf_Internal_Sym *) bfd_malloc (amt);
+      intsym_buf = bfd_malloc (amt);
       if (intsym_buf == NULL)
        goto out;
     }
@@ -471,7 +391,7 @@ bfd_elf_get_elf_syms (ibfd, symtab_hdr, symcount, symoffset,
   for (esym = extsym_buf, isym = intsym_buf, shndx = extshndx_buf;
        isym < isymend;
        esym += extsym_size, isym++, shndx = shndx != NULL ? shndx + 1 : NULL)
-    (*bed->s->swap_symbol_in) (ibfd, esym, (const PTR) shndx, isym);
+    (*bed->s->swap_symbol_in) (ibfd, esym, shndx, isym);
 
  out:
   if (alloc_ext != NULL)
@@ -484,9 +404,7 @@ bfd_elf_get_elf_syms (ibfd, symtab_hdr, symcount, symoffset,
 
 /* Look up a symbol name.  */
 const char *
-bfd_elf_local_sym_name (abfd, isym)
-     bfd *abfd;
-     Elf_Internal_Sym *isym;
+bfd_elf_local_sym_name (bfd *abfd, Elf_Internal_Sym *isym)
 {
   unsigned int iname = isym->st_name;
   unsigned int shindex = elf_tdata (abfd)->symtab_hdr.sh_link;
@@ -512,9 +430,7 @@ typedef union elf_internal_group {
    signature just a string?  */
 
 static const char *
-group_signature (abfd, ghdr)
-     bfd *abfd;
-     Elf_Internal_Shdr *ghdr;
+group_signature (bfd *abfd, Elf_Internal_Shdr *ghdr)
 {
   Elf_Internal_Shdr *hdr;
   unsigned char esym[sizeof (Elf64_External_Sym)];
@@ -537,10 +453,7 @@ group_signature (abfd, ghdr)
 /* Set next_in_group list pointer, and group name for NEWSECT.  */
 
 static bfd_boolean
-setup_group (abfd, hdr, newsect)
-     bfd *abfd;
-     Elf_Internal_Shdr *hdr;
-     asection *newsect;
+setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
 {
   unsigned int num_group = elf_tdata (abfd)->num_group;
 
@@ -699,9 +612,7 @@ setup_group (abfd, hdr, newsect)
 }
 
 bfd_boolean
-bfd_elf_discard_group (abfd, group)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *group;
+bfd_elf_discard_group (bfd *abfd ATTRIBUTE_UNUSED, asection *group)
 {
   asection *first = elf_next_in_group (group);
   asection *s = first;
@@ -721,10 +632,9 @@ bfd_elf_discard_group (abfd, group)
    BFD section in the bfd_section field of the header.  */
 
 bfd_boolean
-_bfd_elf_make_section_from_shdr (abfd, hdr, name)
-     bfd *abfd;
-     Elf_Internal_Shdr *hdr;
-     const char *name;
+_bfd_elf_make_section_from_shdr (bfd *abfd,
+                                Elf_Internal_Shdr *hdr,
+                                const char *name)
 {
   asection *newsect;
   flagword flags;
@@ -741,6 +651,10 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name)
   if (newsect == NULL)
     return FALSE;
 
+  /* Always use the real type/flags.  */
+  elf_section_type (newsect) = hdr->sh_type;
+  elf_section_flags (newsect) = hdr->sh_flags;
+
   newsect->filepos = hdr->sh_offset;
 
   if (! bfd_set_section_vma (abfd, newsect, hdr->sh_addr)
@@ -905,9 +819,7 @@ DESCRIPTION
 */
 
 struct elf_internal_shdr *
-bfd_elf_find_section (abfd, name)
-     bfd *abfd;
-     char *name;
+bfd_elf_find_section (bfd *abfd, char *name)
 {
   Elf_Internal_Shdr **i_shdrp;
   char *shstrtab;
@@ -947,22 +859,15 @@ const char *const bfd_elf_section_type_names[] = {
    relocatable output against an external symbol.  */
 
 bfd_reloc_status_type
-bfd_elf_generic_reloc (abfd,
-                      reloc_entry,
-                      symbol,
-                      data,
-                      input_section,
-                      output_bfd,
-                      error_message)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *reloc_entry;
-     asymbol *symbol;
-     PTR data ATTRIBUTE_UNUSED;
-     asection *input_section;
-     bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
-{
-  if (output_bfd != (bfd *) NULL
+bfd_elf_generic_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+                      arelent *reloc_entry,
+                      asymbol *symbol,
+                      void *data ATTRIBUTE_UNUSED,
+                      asection *input_section,
+                      bfd *output_bfd,
+                      char **error_message ATTRIBUTE_UNUSED)
+{
+  if (output_bfd != NULL
       && (symbol->flags & BSF_SECTION_SYM) == 0
       && (! reloc_entry->howto->partial_inplace
          || reloc_entry->addend == 0))
@@ -977,9 +882,8 @@ bfd_elf_generic_reloc (abfd,
 /* Make sure sec_info_type is cleared if sec_info is cleared too.  */
 
 static void
-merge_sections_remove_hook (abfd, sec)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *sec;
+merge_sections_remove_hook (bfd *abfd ATTRIBUTE_UNUSED,
+                           asection *sec)
 {
   BFD_ASSERT (sec->sec_info_type == ELF_INFO_TYPE_MERGE);
   sec->sec_info_type = ELF_INFO_TYPE_NONE;
@@ -988,9 +892,7 @@ merge_sections_remove_hook (abfd, sec)
 /* Finish SHF_MERGE section merging.  */
 
 bfd_boolean
-_bfd_elf_merge_sections (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+_bfd_elf_merge_sections (bfd *abfd, struct bfd_link_info *info)
 {
   if (!is_elf_hash_table (info))
     return FALSE;
@@ -1001,9 +903,7 @@ _bfd_elf_merge_sections (abfd, info)
 }
 
 void
-_bfd_elf_link_just_syms (sec, info)
-     asection *sec;
-     struct bfd_link_info *info;
+_bfd_elf_link_just_syms (asection *sec, struct bfd_link_info *info)
 {
   sec->output_section = bfd_abs_section_ptr;
   sec->output_offset = sec->vma;
@@ -1017,9 +917,7 @@ _bfd_elf_link_just_syms (sec, info)
    another.  */
 
 bfd_boolean
-_bfd_elf_copy_private_bfd_data (ibfd, obfd)
-     bfd *ibfd;
-     bfd *obfd;
+_bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
 {
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
       || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -1038,11 +936,9 @@ _bfd_elf_copy_private_bfd_data (ibfd, obfd)
 /* Print out the program headers.  */
 
 bfd_boolean
-_bfd_elf_print_private_bfd_data (abfd, farg)
-     bfd *abfd;
-     PTR farg;
+_bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
 {
-  FILE *f = (FILE *) farg;
+  FILE *f = farg;
   Elf_Internal_Phdr *p;
   asection *s;
   bfd_byte *dynbuf = NULL;
@@ -1101,15 +997,14 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
       unsigned long shlink;
       bfd_byte *extdyn, *extdynend;
       size_t extdynsize;
-      void (*swap_dyn_in) PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
+      void (*swap_dyn_in) (bfd *, const void *, Elf_Internal_Dyn *);
 
       fprintf (f, _("\nDynamic Section:\n"));
 
-      dynbuf = (bfd_byte *) bfd_malloc (s->_raw_size);
+      dynbuf = bfd_malloc (s->_raw_size);
       if (dynbuf == NULL)
        goto error_return;
-      if (! bfd_get_section_contents (abfd, s, (PTR) dynbuf, (file_ptr) 0,
-                                     s->_raw_size))
+      if (! bfd_get_section_contents (abfd, s, dynbuf, 0, s->_raw_size))
        goto error_return;
 
       elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
@@ -1129,7 +1024,7 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
          char ab[20];
          bfd_boolean stringp;
 
-         (*swap_dyn_in) (abfd, (PTR) extdyn, &dyn);
+         (*swap_dyn_in) (abfd, extdyn, &dyn);
 
          if (dyn.d_tag == DT_NULL)
            break;
@@ -1278,13 +1173,12 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
 /* Display ELF-specific fields of a symbol.  */
 
 void
-bfd_elf_print_symbol (abfd, filep, symbol, how)
-     bfd *abfd;
-     PTR filep;
-     asymbol *symbol;
-     bfd_print_symbol_type how;
+bfd_elf_print_symbol (bfd *abfd,
+                     void *filep,
+                     asymbol *symbol,
+                     bfd_print_symbol_type how)
 {
-  FILE *file = (FILE *) filep;
+  FILE *file = filep;
   switch (how)
     {
     case bfd_print_symbol_name:
@@ -1312,7 +1206,7 @@ bfd_elf_print_symbol (abfd, filep, symbol, how)
        if (name == NULL)
          {
            name = symbol->name;
-           bfd_print_symbol_vandf (abfd, (PTR) file, symbol);
+           bfd_print_symbol_vandf (abfd, file, symbol);
          }
 
        fprintf (file, " %s\t", section_name);
@@ -1401,10 +1295,9 @@ bfd_elf_print_symbol (abfd, filep, symbol, how)
 /* Create an entry in an ELF linker hash table.  */
 
 struct bfd_hash_entry *
-_bfd_elf_link_hash_newfunc (entry, table, string)
-     struct bfd_hash_entry *entry;
-     struct bfd_hash_table *table;
-     const char *string;
+_bfd_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
+                           struct bfd_hash_table *table,
+                           const char *string)
 {
   /* Allocate the structure if it has not already been allocated by a
      subclass.  */
@@ -1428,7 +1321,6 @@ _bfd_elf_link_hash_newfunc (entry, table, string)
       ret->dynstr_index = 0;
       ret->elf_hash_value = 0;
       ret->weakdef = NULL;
-      ret->linker_section_pointer = NULL;
       ret->verinfo.verdef = NULL;
       ret->vtable_entries_size = 0;
       ret->vtable_entries_used = NULL;
@@ -1452,9 +1344,9 @@ _bfd_elf_link_hash_newfunc (entry, table, string)
    old indirect symbol.  Also used for copying flags to a weakdef.  */
 
 void
-_bfd_elf_link_hash_copy_indirect (bed, dir, ind)
-     struct elf_backend_data *bed;
-     struct elf_link_hash_entry *dir, *ind;
+_bfd_elf_link_hash_copy_indirect (struct elf_backend_data *bed,
+                                 struct elf_link_hash_entry *dir,
+                                 struct elf_link_hash_entry *ind)
 {
   bfd_signed_vma tmp;
   bfd_signed_vma lowest_valid = bed->can_refcount;
@@ -1504,10 +1396,9 @@ _bfd_elf_link_hash_copy_indirect (bed, dir, ind)
 }
 
 void
-_bfd_elf_link_hash_hide_symbol (info, h, force_local)
-     struct bfd_link_info *info;
-     struct elf_link_hash_entry *h;
-     bfd_boolean force_local;
+_bfd_elf_link_hash_hide_symbol (struct bfd_link_info *info,
+                               struct elf_link_hash_entry *h,
+                               bfd_boolean force_local)
 {
   h->plt = elf_hash_table (info)->init_offset;
   h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
@@ -1526,12 +1417,12 @@ _bfd_elf_link_hash_hide_symbol (info, h, force_local)
 /* Initialize an ELF linker hash table.  */
 
 bfd_boolean
-_bfd_elf_link_hash_table_init (table, abfd, newfunc)
-     struct elf_link_hash_table *table;
-     bfd *abfd;
-     struct bfd_hash_entry *(*newfunc)
-       PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
-               const char *));
+_bfd_elf_link_hash_table_init
+  (struct elf_link_hash_table *table,
+   bfd *abfd,
+   struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
+                                     struct bfd_hash_table *,
+                                     const char *))
 {
   bfd_boolean ret;
 
@@ -1565,14 +1456,13 @@ _bfd_elf_link_hash_table_init (table, abfd, newfunc)
 /* Create an ELF linker hash table.  */
 
 struct bfd_link_hash_table *
-_bfd_elf_link_hash_table_create (abfd)
-     bfd *abfd;
+_bfd_elf_link_hash_table_create (bfd *abfd)
 {
   struct elf_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct elf_link_hash_table);
 
-  ret = (struct elf_link_hash_table *) bfd_malloc (amt);
-  if (ret == (struct elf_link_hash_table *) NULL)
+  ret = bfd_malloc (amt);
+  if (ret == NULL)
     return NULL;
 
   if (! _bfd_elf_link_hash_table_init (ret, abfd, _bfd_elf_link_hash_newfunc))
@@ -1590,9 +1480,7 @@ _bfd_elf_link_hash_table_create (abfd)
    empty string to indicate that no DT_NEEDED entry should be made.  */
 
 void
-bfd_elf_set_dt_needed_name (abfd, name)
-     bfd *abfd;
-     const char *name;
+bfd_elf_set_dt_needed_name (bfd *abfd, const char *name)
 {
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
       && bfd_get_format (abfd) == bfd_object)
@@ -1600,9 +1488,7 @@ bfd_elf_set_dt_needed_name (abfd, name)
 }
 
 void
-bfd_elf_set_dt_needed_soname (abfd, name)
-     bfd *abfd;
-     const char *name;
+bfd_elf_set_dt_needed_soname (bfd *abfd, const char *name)
 {
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
       && bfd_get_format (abfd) == bfd_object)
@@ -1613,9 +1499,8 @@ bfd_elf_set_dt_needed_soname (abfd, name)
    the linker ELF emulation code.  */
 
 struct bfd_link_needed_list *
-bfd_elf_get_needed_list (abfd, info)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info;
+bfd_elf_get_needed_list (bfd *abfd ATTRIBUTE_UNUSED,
+                        struct bfd_link_info *info)
 {
   if (! is_elf_hash_table (info))
     return NULL;
@@ -1626,9 +1511,8 @@ bfd_elf_get_needed_list (abfd, info)
    hook for the linker ELF emulation code.  */
 
 struct bfd_link_needed_list *
-bfd_elf_get_runpath_list (abfd, info)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info;
+bfd_elf_get_runpath_list (bfd *abfd ATTRIBUTE_UNUSED,
+                         struct bfd_link_info *info)
 {
   if (! is_elf_hash_table (info))
     return NULL;
@@ -1640,8 +1524,7 @@ bfd_elf_get_runpath_list (abfd, info)
    passed to bfd_elf_set_dt_needed_name, or it is the filename.  */
 
 const char *
-bfd_elf_get_dt_soname (abfd)
-     bfd *abfd;
+bfd_elf_get_dt_soname (bfd *abfd)
 {
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
       && bfd_get_format (abfd) == bfd_object)
@@ -1653,9 +1536,8 @@ bfd_elf_get_dt_soname (abfd)
    the ELF linker emulation code.  */
 
 bfd_boolean
-bfd_elf_get_bfd_needed_list (abfd, pneeded)
-     bfd *abfd;
-     struct bfd_link_needed_list **pneeded;
+bfd_elf_get_bfd_needed_list (bfd *abfd,
+                            struct bfd_link_needed_list **pneeded)
 {
   asection *s;
   bfd_byte *dynbuf = NULL;
@@ -1663,7 +1545,7 @@ bfd_elf_get_bfd_needed_list (abfd, pneeded)
   unsigned long shlink;
   bfd_byte *extdyn, *extdynend;
   size_t extdynsize;
-  void (*swap_dyn_in) PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
+  void (*swap_dyn_in) (bfd *, const void *, Elf_Internal_Dyn *);
 
   *pneeded = NULL;
 
@@ -1675,12 +1557,11 @@ bfd_elf_get_bfd_needed_list (abfd, pneeded)
   if (s == NULL || s->_raw_size == 0)
     return TRUE;
 
-  dynbuf = (bfd_byte *) bfd_malloc (s->_raw_size);
+  dynbuf = bfd_malloc (s->_raw_size);
   if (dynbuf == NULL)
     goto error_return;
 
-  if (! bfd_get_section_contents (abfd, s, (PTR) dynbuf, (file_ptr) 0,
-                                 s->_raw_size))
+  if (! bfd_get_section_contents (abfd, s, dynbuf, 0, s->_raw_size))
     goto error_return;
 
   elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
@@ -1698,7 +1579,7 @@ bfd_elf_get_bfd_needed_list (abfd, pneeded)
     {
       Elf_Internal_Dyn dyn;
 
-      (*swap_dyn_in) (abfd, (PTR) extdyn, &dyn);
+      (*swap_dyn_in) (abfd, extdyn, &dyn);
 
       if (dyn.d_tag == DT_NULL)
        break;
@@ -1715,7 +1596,7 @@ bfd_elf_get_bfd_needed_list (abfd, pneeded)
            goto error_return;
 
          amt = sizeof *l;
-         l = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
+         l = bfd_alloc (abfd, amt);
          if (l == NULL)
            goto error_return;
 
@@ -1739,7 +1620,7 @@ bfd_elf_get_bfd_needed_list (abfd, pneeded)
 /* Allocate an ELF string table--force the first byte to be zero.  */
 
 struct bfd_strtab_hash *
-_bfd_elf_stringtab_init ()
+_bfd_elf_stringtab_init (void)
 {
   struct bfd_strtab_hash *ret;
 
@@ -1764,9 +1645,7 @@ _bfd_elf_stringtab_init ()
 /* Create a new bfd section from an ELF section header.  */
 
 bfd_boolean
-bfd_section_from_shdr (abfd, shindex)
-     bfd *abfd;
-     unsigned int shindex;
+bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
 {
   Elf_Internal_Shdr *hdr = elf_elfsections (abfd)[shindex];
   Elf_Internal_Ehdr *ehdr = elf_elfheader (abfd);
@@ -2006,7 +1885,7 @@ bfd_section_from_shdr (abfd, shindex)
            bfd_size_type amt;
            BFD_ASSERT (elf_section_data (target_sect)->rel_hdr2 == NULL);
            amt = sizeof (*hdr2);
-           hdr2 = (Elf_Internal_Shdr *) bfd_alloc (abfd, amt);
+           hdr2 = bfd_alloc (abfd, amt);
            elf_section_data (target_sect)->rel_hdr2 = hdr2;
          }
        *hdr2 = *hdr;
@@ -2090,11 +1969,10 @@ bfd_section_from_shdr (abfd, shindex)
    Return SEC for sections that have no elf section, and NULL on error.  */
 
 asection *
-bfd_section_from_r_symndx (abfd, cache, sec, r_symndx)
-     bfd *abfd;
-     struct sym_sec_cache *cache;
-     asection *sec;
-     unsigned long r_symndx;
+bfd_section_from_r_symndx (bfd *abfd,
+                          struct sym_sec_cache *cache,
+                          asection *sec,
+                          unsigned long r_symndx)
 {
   Elf_Internal_Shdr *symtab_hdr;
   unsigned char esym[sizeof (Elf64_External_Sym)];
@@ -2117,7 +1995,8 @@ bfd_section_from_r_symndx (abfd, cache, sec, r_symndx)
     }
   cache->indx[ent] = r_symndx;
   cache->sec[ent] = sec;
-  if (isym.st_shndx < SHN_LORESERVE || isym.st_shndx > SHN_HIRESERVE)
+  if ((isym.st_shndx != SHN_UNDEF && isym.st_shndx < SHN_LORESERVE)
+      || isym.st_shndx > SHN_HIRESERVE)
     {
       asection *s;
       s = bfd_section_from_elf_index (abfd, isym.st_shndx);
@@ -2131,30 +2010,165 @@ bfd_section_from_r_symndx (abfd, cache, sec, r_symndx)
    section.  */
 
 asection *
-bfd_section_from_elf_index (abfd, index)
-     bfd *abfd;
-     unsigned int index;
+bfd_section_from_elf_index (bfd *abfd, unsigned int index)
 {
   if (index >= elf_numsections (abfd))
     return NULL;
   return elf_elfsections (abfd)[index]->bfd_section;
 }
 
+static struct bfd_elf_special_section const special_sections[] =
+{
+  { ".bss",            0,      NULL,   0,
+    SHT_NOBITS,                SHF_ALLOC + SHF_WRITE },
+  { ".comment",                0,      NULL,   0,
+    SHT_PROGBITS,      0 },
+  { ".data",           0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".data1",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".debug",          0,      NULL,   0,
+    SHT_PROGBITS,      0 },
+  { ".fini",           0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_EXECINSTR },
+  { ".init",           0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_EXECINSTR },
+  { ".line",           0,      NULL,   0,
+    SHT_PROGBITS,      0 },
+  { ".rodata",         0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC },
+  { ".rodata1",                0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC },
+  { ".tbss",           0,      NULL,   0,
+    SHT_NOBITS,                SHF_ALLOC + SHF_WRITE + SHF_TLS },
+  { ".tdata",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE + SHF_TLS },
+  { ".text",           0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_EXECINSTR },
+  { ".init_array",     0,      NULL,   0,
+    SHT_INIT_ARRAY,    SHF_ALLOC + SHF_WRITE },
+  { ".fini_array",     0,      NULL,   0,
+    SHT_FINI_ARRAY,    SHF_ALLOC + SHF_WRITE },
+  { ".preinit_array",  0,      NULL,   0,
+    SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE },
+  { ".debug_line",     0,      NULL,   0,
+    SHT_PROGBITS,      0 },
+  { ".debug_info",     0,      NULL,   0,
+    SHT_PROGBITS,      0 },
+  { ".debug_abbrev",   0,      NULL,   0,
+    SHT_PROGBITS,      0 },
+  { ".debug_aranges",  0,      NULL,   0,
+    SHT_PROGBITS,      0 },
+  { ".dynamic",                0,      NULL,   0,
+    SHT_DYNAMIC,       SHF_ALLOC },
+  { ".dynstr",         0,      NULL,   0,
+    SHT_STRTAB,                SHF_ALLOC },
+  { ".dynsym",         0,      NULL,   0,
+    SHT_DYNSYM,                SHF_ALLOC },
+  { ".got",            0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".hash",           0,      NULL,   0,
+    SHT_HASH,          SHF_ALLOC },
+  { ".interp",         0,      NULL,   0,
+    SHT_PROGBITS,      0 },
+  { ".plt",            0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_EXECINSTR },
+  { ".shstrtab",       0,      NULL,   0,
+    SHT_STRTAB,                0 },
+  { ".strtab",         0,      NULL,   0,
+    SHT_STRTAB,                0 },
+  { ".symtab",         0,      NULL,   0,
+    SHT_SYMTAB,                0 },
+  { ".gnu.version",    0,      NULL,   0,
+    SHT_GNU_versym,    0 },
+  { ".gnu.version_d",  0,      NULL,   0,
+    SHT_GNU_verdef,    0 },
+  { ".gnu.version_r",  0,      NULL,   0,
+    SHT_GNU_verneed,   0 },
+  { ".note",           5,      NULL,   0,
+    SHT_NOTE,          0 },
+  { ".rela",           5,      NULL,   0,
+    SHT_RELA,          0 },
+  { ".rel",            4,      NULL,   0,
+    SHT_REL,           0 },
+  { ".stab",           5,      "str",  3,
+    SHT_STRTAB,                0 },
+  { NULL,              0,      NULL,   0,
+    0,          0 }
+};
+
+static const struct bfd_elf_special_section *
+get_special_section (const char *name,
+                    const struct bfd_elf_special_section *special_sections,
+                    unsigned int rela)
+{
+  int i;
+
+  for (i = 0; special_sections[i].prefix != NULL; i++)
+    if (((special_sections[i].prefix_length
+         && strncmp (name, special_sections[i].prefix,
+                     special_sections[i].prefix_length) == 0
+         && (! special_sections[i].suffix_length
+             || strcmp ((name + strlen (name)
+                         - special_sections[i].suffix_length),
+                        special_sections[i].suffix) == 0))
+        || strcmp (name, special_sections[i].prefix) == 0)
+       && (rela || special_sections[i].type != SHT_RELA))
+      return &special_sections[i];
+
+  return NULL;
+}
+
 bfd_boolean
-_bfd_elf_new_section_hook (abfd, sec)
-     bfd *abfd;
-     asection *sec;
+_bfd_elf_get_sec_type_attr (bfd *abfd, const char *name, int *type, int *attr)
+{
+  bfd_boolean found = FALSE;
+  struct elf_backend_data *bed = get_elf_backend_data (abfd);
+
+  /* See if this is one of the special sections.  */
+  if (name)
+    {
+      const struct bfd_elf_special_section *ssect = NULL;
+      unsigned int rela = get_elf_backend_data (abfd)->default_use_rela_p;
+
+      if (bed->special_sections)
+       ssect = get_special_section (name, bed->special_sections, rela);
+
+      if (! ssect)
+       ssect = get_special_section (name, special_sections, rela);
+
+      if (ssect)
+       {
+         *type = ssect->type;
+         *attr = ssect->attributes;
+         found = TRUE;
+       }
+    }
+
+  return found;
+}
+
+bfd_boolean
+_bfd_elf_new_section_hook (bfd *abfd, asection *sec)
 {
   struct bfd_elf_section_data *sdata;
+  int type, attr;
 
   sdata = (struct bfd_elf_section_data *) sec->used_by_bfd;
   if (sdata == NULL)
     {
-      bfd_size_type amt = sizeof (*sdata);
-      sdata = (struct bfd_elf_section_data *) bfd_zalloc (abfd, amt);
+      sdata = bfd_zalloc (abfd, sizeof (*sdata));
       if (sdata == NULL)
        return FALSE;
-      sec->used_by_bfd = (PTR) sdata;
+      sec->used_by_bfd = sdata;
+    }
+
+  elf_section_type (sec) = SHT_NULL;
+  if (sec->name && _bfd_elf_get_sec_type_attr (abfd, sec->name,
+                                              &type, &attr))
+    {
+      elf_section_type (sec) = type;
+      elf_section_flags (sec) = attr;
     }
 
   /* Indicate whether or not this section should use RELA relocations.  */
@@ -2186,11 +2200,10 @@ _bfd_elf_new_section_hook (abfd, sec)
  */
 
 bfd_boolean
-_bfd_elf_make_section_from_phdr (abfd, hdr, index, typename)
-     bfd *abfd;
-     Elf_Internal_Phdr *hdr;
-     int index;
-     const char *typename;
+_bfd_elf_make_section_from_phdr (bfd *abfd,
+                                Elf_Internal_Phdr *hdr,
+                                int index,
+                                const char *typename)
 {
   asection *newsect;
   char *name;
@@ -2203,7 +2216,7 @@ _bfd_elf_make_section_from_phdr (abfd, hdr, index, typename)
            && (hdr->p_memsz > hdr->p_filesz));
   sprintf (namebuf, "%s%d%s", typename, index, split ? "a" : "");
   len = strlen (namebuf) + 1;
-  name = bfd_alloc (abfd, (bfd_size_type) len);
+  name = bfd_alloc (abfd, len);
   if (!name)
     return FALSE;
   memcpy (name, namebuf, len);
@@ -2235,7 +2248,7 @@ _bfd_elf_make_section_from_phdr (abfd, hdr, index, typename)
     {
       sprintf (namebuf, "%s%db", typename, index);
       len = strlen (namebuf) + 1;
-      name = bfd_alloc (abfd, (bfd_size_type) len);
+      name = bfd_alloc (abfd, len);
       if (!name)
        return FALSE;
       memcpy (name, namebuf, len);
@@ -2259,10 +2272,7 @@ _bfd_elf_make_section_from_phdr (abfd, hdr, index, typename)
 }
 
 bfd_boolean
-bfd_section_from_phdr (abfd, hdr, index)
-     bfd *abfd;
-     Elf_Internal_Phdr *hdr;
-     int index;
+bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index)
 {
   struct elf_backend_data *bed;
 
@@ -2283,7 +2293,7 @@ bfd_section_from_phdr (abfd, hdr, index)
     case PT_NOTE:
       if (! _bfd_elf_make_section_from_phdr (abfd, hdr, index, "note"))
        return FALSE;
-      if (! elfcore_read_notes (abfd, (file_ptr) hdr->p_offset, hdr->p_filesz))
+      if (! elfcore_read_notes (abfd, hdr->p_offset, hdr->p_filesz))
        return FALSE;
       return TRUE;
 
@@ -2316,11 +2326,10 @@ bfd_section_from_phdr (abfd, hdr, index)
    relocations; otherwise, we use REL relocations.  */
 
 bfd_boolean
-_bfd_elf_init_reloc_shdr (abfd, rel_hdr, asect, use_rela_p)
-     bfd *abfd;
-     Elf_Internal_Shdr *rel_hdr;
-     asection *asect;
-     bfd_boolean use_rela_p;
+_bfd_elf_init_reloc_shdr (bfd *abfd,
+                         Elf_Internal_Shdr *rel_hdr,
+                         asection *asect,
+                         bfd_boolean use_rela_p)
 {
   char *name;
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
@@ -2351,13 +2360,10 @@ _bfd_elf_init_reloc_shdr (abfd, rel_hdr, asect, use_rela_p)
 /* Set up an ELF internal section header for a section.  */
 
 static void
-elf_fake_sections (abfd, asect, failedptrarg)
-     bfd *abfd;
-     asection *asect;
-     PTR failedptrarg;
+elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
 {
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
-  bfd_boolean *failedptr = (bfd_boolean *) failedptrarg;
+  bfd_boolean *failedptr = failedptrarg;
   Elf_Internal_Shdr *this_hdr;
 
   if (*failedptr)
@@ -2395,55 +2401,59 @@ elf_fake_sections (abfd, asect, failedptrarg)
   this_hdr->bfd_section = asect;
   this_hdr->contents = NULL;
 
-  /* FIXME: This should not be based on section names.  */
-  if (strcmp (asect->name, ".dynstr") == 0)
-    this_hdr->sh_type = SHT_STRTAB;
-  else if (strcmp (asect->name, ".hash") == 0)
+  /* If the section type is unspecified, we set it based on
+     asect->flags.  */
+  if (this_hdr->sh_type == SHT_NULL)
     {
-      this_hdr->sh_type = SHT_HASH;
-      this_hdr->sh_entsize = bed->s->sizeof_hash_entry;
+      if ((asect->flags & SEC_ALLOC) != 0
+         && (((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+             || (asect->flags & SEC_NEVER_LOAD) != 0))
+       this_hdr->sh_type = SHT_NOBITS;
+      else
+       this_hdr->sh_type = SHT_PROGBITS;
     }
-  else if (strcmp (asect->name, ".dynsym") == 0)
+
+  switch (this_hdr->sh_type)
     {
-      this_hdr->sh_type = SHT_DYNSYM;
+    default:
+      break;
+
+    case SHT_STRTAB:
+    case SHT_INIT_ARRAY:
+    case SHT_FINI_ARRAY:
+    case SHT_PREINIT_ARRAY:
+    case SHT_NOTE:
+    case SHT_NOBITS:
+    case SHT_PROGBITS:
+      break;
+
+    case SHT_HASH:
+      this_hdr->sh_entsize = bed->s->sizeof_hash_entry;
+      break;
+  
+    case SHT_DYNSYM:
       this_hdr->sh_entsize = bed->s->sizeof_sym;
-    }
-  else if (strcmp (asect->name, ".dynamic") == 0)
-    {
-      this_hdr->sh_type = SHT_DYNAMIC;
+      break;
+
+    case SHT_DYNAMIC:
       this_hdr->sh_entsize = bed->s->sizeof_dyn;
-    }
-  else if (strncmp (asect->name, ".rela", 5) == 0
-          && get_elf_backend_data (abfd)->may_use_rela_p)
-    {
-      this_hdr->sh_type = SHT_RELA;
-      this_hdr->sh_entsize = bed->s->sizeof_rela;
-    }
-  else if (strncmp (asect->name, ".rel", 4) == 0
-          && get_elf_backend_data (abfd)->may_use_rel_p)
-    {
-      this_hdr->sh_type = SHT_REL;
-      this_hdr->sh_entsize = bed->s->sizeof_rel;
-    }
-  else if (strcmp (asect->name, ".init_array") == 0)
-    this_hdr->sh_type = SHT_INIT_ARRAY;
-  else if (strcmp (asect->name, ".fini_array") == 0)
-    this_hdr->sh_type = SHT_FINI_ARRAY;
-  else if (strcmp (asect->name, ".preinit_array") == 0)
-    this_hdr->sh_type = SHT_PREINIT_ARRAY;
-  else if (strncmp (asect->name, ".note", 5) == 0)
-    this_hdr->sh_type = SHT_NOTE;
-  else if (strncmp (asect->name, ".stab", 5) == 0
-          && strcmp (asect->name + strlen (asect->name) - 3, "str") == 0)
-    this_hdr->sh_type = SHT_STRTAB;
-  else if (strcmp (asect->name, ".gnu.version") == 0)
-    {
-      this_hdr->sh_type = SHT_GNU_versym;
+      break;
+
+    case SHT_RELA:
+      if (get_elf_backend_data (abfd)->may_use_rela_p)
+       this_hdr->sh_entsize = bed->s->sizeof_rela;
+      break;
+
+     case SHT_REL:
+      if (get_elf_backend_data (abfd)->may_use_rel_p)
+       this_hdr->sh_entsize = bed->s->sizeof_rel;
+      break;
+
+     case SHT_GNU_versym:
       this_hdr->sh_entsize = sizeof (Elf_External_Versym);
-    }
-  else if (strcmp (asect->name, ".gnu.version_d") == 0)
-    {
-      this_hdr->sh_type = SHT_GNU_verdef;
+      break;
+
+     case SHT_GNU_verdef:
       this_hdr->sh_entsize = 0;
       /* objcopy or strip will copy over sh_info, but may not set
          cverdefs.  The linker will set cverdefs, but sh_info will be
@@ -2453,10 +2463,9 @@ elf_fake_sections (abfd, asect, failedptrarg)
       else
        BFD_ASSERT (elf_tdata (abfd)->cverdefs == 0
                    || this_hdr->sh_info == elf_tdata (abfd)->cverdefs);
-    }
-  else if (strcmp (asect->name, ".gnu.version_r") == 0)
-    {
-      this_hdr->sh_type = SHT_GNU_verneed;
+      break;
+
+    case SHT_GNU_verneed:
       this_hdr->sh_entsize = 0;
       /* objcopy or strip will copy over sh_info, but may not set
          cverrefs.  The linker will set cverrefs, but sh_info will be
@@ -2466,18 +2475,12 @@ elf_fake_sections (abfd, asect, failedptrarg)
       else
        BFD_ASSERT (elf_tdata (abfd)->cverrefs == 0
                    || this_hdr->sh_info == elf_tdata (abfd)->cverrefs);
-    }
-  else if ((asect->flags & SEC_GROUP) != 0)
-    {
-      this_hdr->sh_type = SHT_GROUP;
+      break;
+
+    case SHT_GROUP:
       this_hdr->sh_entsize = 4;
+      break;
     }
-  else if ((asect->flags & SEC_ALLOC) != 0
-          && (((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
-              || (asect->flags & SEC_NEVER_LOAD) != 0))
-    this_hdr->sh_type = SHT_NOBITS;
-  else
-    this_hdr->sh_type = SHT_PROGBITS;
 
   if ((asect->flags & SEC_ALLOC) != 0)
     this_hdr->sh_flags |= SHF_ALLOC;
@@ -2530,12 +2533,9 @@ elf_fake_sections (abfd, asect, failedptrarg)
 /* Fill in the contents of a SHT_GROUP section.  */
 
 void
-bfd_elf_set_group_contents (abfd, sec, failedptrarg)
-     bfd *abfd;
-     asection *sec;
-     PTR failedptrarg;
+bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg)
 {
-  bfd_boolean *failedptr = (bfd_boolean *) failedptrarg;
+  bfd_boolean *failedptr = failedptrarg;
   unsigned long symindx;
   asection *elt, *first;
   unsigned char *loc;
@@ -2639,8 +2639,7 @@ bfd_elf_set_group_contents (abfd, sec, failedptrarg)
    in here too, while we're at it.  */
 
 static bfd_boolean
-assign_section_numbers (abfd)
-     bfd *abfd;
+assign_section_numbers (bfd *abfd)
 {
   struct elf_obj_tdata *t = elf_tdata (abfd);
   asection *sec;
@@ -2721,12 +2720,12 @@ assign_section_numbers (abfd)
   /* Set up the list of section header pointers, in agreement with the
      indices.  */
   amt = section_number * sizeof (Elf_Internal_Shdr *);
-  i_shdrp = (Elf_Internal_Shdr **) bfd_zalloc (abfd, amt);
+  i_shdrp = bfd_zalloc (abfd, amt);
   if (i_shdrp == NULL)
     return FALSE;
 
   amt = sizeof (Elf_Internal_Shdr);
-  i_shdrp[0] = (Elf_Internal_Shdr *) bfd_zalloc (abfd, amt);
+  i_shdrp[0] = bfd_zalloc (abfd, amt);
   if (i_shdrp[0] == NULL)
     {
       bfd_release (abfd, i_shdrp);
@@ -2812,7 +2811,7 @@ assign_section_numbers (abfd)
              char *alc;
 
              len = strlen (sec->name);
-             alc = (char *) bfd_malloc ((bfd_size_type) (len - 2));
+             alc = bfd_malloc (len - 2);
              if (alc == NULL)
                return FALSE;
              memcpy (alc, sec->name, len - 3);
@@ -2869,15 +2868,13 @@ assign_section_numbers (abfd)
 /* Map symbol from it's internal number to the external number, moving
    all local symbols to be at the head of the list.  */
 
-static INLINE int
-sym_is_global (abfd, sym)
-     bfd *abfd;
-     asymbol *sym;
+static int
+sym_is_global (bfd *abfd, asymbol *sym)
 {
   /* If the backend has a special mapping, use it.  */
-  if (get_elf_backend_data (abfd)->elf_backend_sym_is_global)
-    return ((*get_elf_backend_data (abfd)->elf_backend_sym_is_global)
-           (abfd, sym));
+  struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  if (bed->elf_backend_sym_is_global)
+    return (*bed->elf_backend_sym_is_global) (abfd, sym);
 
   return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
          || bfd_is_und_section (bfd_get_section (sym))
@@ -2885,8 +2882,7 @@ sym_is_global (abfd, sym)
 }
 
 static bfd_boolean
-elf_map_symbols (abfd)
-     bfd *abfd;
+elf_map_symbols (bfd *abfd)
 {
   unsigned int symcount = bfd_get_symcount (abfd);
   asymbol **syms = bfd_get_outsymbols (abfd);
@@ -2914,7 +2910,7 @@ elf_map_symbols (abfd)
 
   max_index++;
   amt = max_index * sizeof (asymbol *);
-  sect_syms = (asymbol **) bfd_zalloc (abfd, amt);
+  sect_syms = bfd_zalloc (abfd, amt);
   if (sect_syms == NULL)
     return FALSE;
   elf_section_syms (abfd) = sect_syms;
@@ -2988,7 +2984,7 @@ elf_map_symbols (abfd)
 
   /* Now sort the symbols so the local symbols are first.  */
   amt = (num_locals + num_globals) * sizeof (asymbol *);
-  new_syms = (asymbol **) bfd_alloc (abfd, amt);
+  new_syms = bfd_alloc (abfd, amt);
 
   if (new_syms == NULL)
     return FALSE;
@@ -3032,12 +3028,8 @@ elf_map_symbols (abfd)
 /* Align to the maximum file alignment that could be required for any
    ELF data structure.  */
 
-static INLINE file_ptr align_file_position
-  PARAMS ((file_ptr, int));
-static INLINE file_ptr
-align_file_position (off, align)
-     file_ptr off;
-     int align;
+static inline file_ptr
+align_file_position (file_ptr off, int align)
 {
   return (off + align - 1) & ~(align - 1);
 }
@@ -3045,11 +3037,10 @@ align_file_position (off, align)
 /* Assign a file position to a section, optionally aligning to the
    required section alignment.  */
 
-INLINE file_ptr
-_bfd_elf_assign_file_position_for_section (i_shdrp, offset, align)
-     Elf_Internal_Shdr *i_shdrp;
-     file_ptr offset;
-     bfd_boolean align;
+file_ptr
+_bfd_elf_assign_file_position_for_section (Elf_Internal_Shdr *i_shdrp,
+                                          file_ptr offset,
+                                          bfd_boolean align)
 {
   if (align)
     {
@@ -3072,9 +3063,8 @@ _bfd_elf_assign_file_position_for_section (i_shdrp, offset, align)
    is not NULL, this is being called by the ELF backend linker.  */
 
 bfd_boolean
-_bfd_elf_compute_section_file_positions (abfd, link_info)
-     bfd *abfd;
-     struct bfd_link_info *link_info;
+_bfd_elf_compute_section_file_positions (bfd *abfd,
+                                        struct bfd_link_info *link_info)
 {
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
   bfd_boolean failed;
@@ -3169,13 +3159,12 @@ _bfd_elf_compute_section_file_positions (abfd, link_info)
 
 /* Create a mapping from a set of sections to a program segment.  */
 
-static INLINE struct elf_segment_map *
-make_mapping (abfd, sections, from, to, phdr)
-     bfd *abfd;
-     asection **sections;
-     unsigned int from;
-     unsigned int to;
-     bfd_boolean phdr;
+static struct elf_segment_map *
+make_mapping (bfd *abfd,
+             asection **sections,
+             unsigned int from,
+             unsigned int to,
+             bfd_boolean phdr)
 {
   struct elf_segment_map *m;
   unsigned int i;
@@ -3184,7 +3173,7 @@ make_mapping (abfd, sections, from, to, phdr)
 
   amt = sizeof (struct elf_segment_map);
   amt += (to - from - 1) * sizeof (asection *);
-  m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
+  m = bfd_zalloc (abfd, amt);
   if (m == NULL)
     return NULL;
   m->next = NULL;
@@ -3206,8 +3195,7 @@ make_mapping (abfd, sections, from, to, phdr)
 /* Set up a mapping from BFD sections to program segments.  */
 
 static bfd_boolean
-map_sections_to_segments (abfd)
-     bfd *abfd;
+map_sections_to_segments (bfd *abfd)
 {
   asection **sections = NULL;
   asection *s;
@@ -3236,7 +3224,7 @@ map_sections_to_segments (abfd)
   /* Select the allocated sections, and sort them.  */
 
   amt = bfd_count_sections (abfd) * sizeof (asection *);
-  sections = (asection **) bfd_malloc (amt);
+  sections = bfd_malloc (amt);
   if (sections == NULL)
     goto error_return;
 
@@ -3266,7 +3254,7 @@ map_sections_to_segments (abfd)
   if (s != NULL && (s->flags & SEC_LOAD) != 0)
     {
       amt = sizeof (struct elf_segment_map);
-      m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
+      m = bfd_zalloc (abfd, amt);
       if (m == NULL)
        goto error_return;
       m->next = NULL;
@@ -3280,7 +3268,7 @@ map_sections_to_segments (abfd)
       pm = &m->next;
 
       amt = sizeof (struct elf_segment_map);
-      m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
+      m = bfd_zalloc (abfd, amt);
       if (m == NULL)
        goto error_return;
       m->next = NULL;
@@ -3429,7 +3417,7 @@ map_sections_to_segments (abfd)
   if (dynsec != NULL)
     {
       amt = sizeof (struct elf_segment_map);
-      m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
+      m = bfd_zalloc (abfd, amt);
       if (m == NULL)
        goto error_return;
       m->next = NULL;
@@ -3452,7 +3440,7 @@ map_sections_to_segments (abfd)
          && strncmp (s->name, ".note", 5) == 0)
        {
          amt = sizeof (struct elf_segment_map);
-         m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
+         m = bfd_zalloc (abfd, amt);
          if (m == NULL)
            goto error_return;
          m->next = NULL;
@@ -3478,7 +3466,7 @@ map_sections_to_segments (abfd)
 
       amt = sizeof (struct elf_segment_map);
       amt += (tls_count - 1) * sizeof (asection *);
-      m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
+      m = bfd_zalloc (abfd, amt);
       if (m == NULL)
        goto error_return;
       m->next = NULL;
@@ -3505,7 +3493,7 @@ map_sections_to_segments (abfd)
       && (eh_frame_hdr->output_section->flags & SEC_LOAD) != 0)
     {
       amt = sizeof (struct elf_segment_map);
-      m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
+      m = bfd_zalloc (abfd, amt);
       if (m == NULL)
        goto error_return;
       m->next = NULL;
@@ -3520,7 +3508,7 @@ map_sections_to_segments (abfd)
   if (elf_tdata (abfd)->stack_flags)
     {
       amt = sizeof (struct elf_segment_map);
-      m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
+      m = bfd_zalloc (abfd, amt);
       if (m == NULL)
        goto error_return;
       m->next = NULL;
@@ -3547,9 +3535,7 @@ map_sections_to_segments (abfd)
 /* Sort sections by address.  */
 
 static int
-elf_sort_sections (arg1, arg2)
-     const PTR arg1;
-     const PTR arg2;
+elf_sort_sections (const void *arg1, const void *arg2)
 {
   const asection *sec1 = *(const asection **) arg1;
   const asection *sec2 = *(const asection **) arg2;
@@ -3609,8 +3595,7 @@ elf_sort_sections (arg1, arg2)
    the file header, and writes out the program headers.  */
 
 static bfd_boolean
-assign_file_positions_for_segments (abfd)
-     bfd *abfd;
+assign_file_positions_for_segments (bfd *abfd)
 {
   const struct elf_backend_data *bed = get_elf_backend_data (abfd);
   unsigned int count;
@@ -3694,7 +3679,7 @@ assign_file_positions_for_segments (abfd)
     alloc = count;
 
   amt = alloc * sizeof (Elf_Internal_Phdr);
-  phdrs = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt);
+  phdrs = bfd_alloc (abfd, amt);
   if (phdrs == NULL)
     return FALSE;
 
@@ -4070,8 +4055,7 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
    will be two segments.  */
 
 static bfd_size_type
-get_program_header_size (abfd)
-     bfd *abfd;
+get_program_header_size (bfd *abfd)
 {
   size_t segs;
   asection *s;
@@ -4171,8 +4155,7 @@ get_program_header_size (abfd)
    We also don't set the positions of the .symtab and .strtab here.  */
 
 static bfd_boolean
-assign_file_positions_except_relocs (abfd)
-     bfd *abfd;
+assign_file_positions_except_relocs (bfd *abfd)
 {
   struct elf_obj_tdata * const tdata = elf_tdata (abfd);
   Elf_Internal_Ehdr * const i_ehdrp = elf_elfheader (abfd);
@@ -4280,8 +4263,7 @@ assign_file_positions_except_relocs (abfd)
 }
 
 static bfd_boolean
-prep_headers (abfd)
-     bfd *abfd;
+prep_headers (bfd *abfd)
 {
   Elf_Internal_Ehdr *i_ehdrp;  /* Elf file header, internal form */
   Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */
@@ -4389,8 +4371,7 @@ prep_headers (abfd)
    of the loadable file image.  */
 
 void
-_bfd_elf_assign_file_positions_for_relocs (abfd)
-     bfd *abfd;
+_bfd_elf_assign_file_positions_for_relocs (bfd *abfd)
 {
   file_ptr off;
   unsigned int i, num_sec;
@@ -4413,8 +4394,7 @@ _bfd_elf_assign_file_positions_for_relocs (abfd)
 }
 
 bfd_boolean
-_bfd_elf_write_object_contents (abfd)
-     bfd *abfd;
+_bfd_elf_write_object_contents (bfd *abfd)
 {
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
   Elf_Internal_Ehdr *i_ehdrp;
@@ -4423,8 +4403,7 @@ _bfd_elf_write_object_contents (abfd)
   unsigned int count, num_sec;
 
   if (! abfd->output_has_begun
-      && ! _bfd_elf_compute_section_file_positions
-             (abfd, (struct bfd_link_info *) NULL))
+      && ! _bfd_elf_compute_section_file_positions (abfd, NULL))
     return FALSE;
 
   i_shdrp = elf_elfsections (abfd);
@@ -4468,8 +4447,7 @@ _bfd_elf_write_object_contents (abfd)
 }
 
 bfd_boolean
-_bfd_elf_write_corefile_contents (abfd)
-     bfd *abfd;
+_bfd_elf_write_corefile_contents (bfd *abfd)
 {
   /* Hopefully this can be done just like an object file.  */
   return _bfd_elf_write_object_contents (abfd);
@@ -4478,9 +4456,7 @@ _bfd_elf_write_corefile_contents (abfd)
 /* Given a section, search the header to find them.  */
 
 int
-_bfd_elf_section_from_bfd_section (abfd, asect)
-     bfd *abfd;
-     struct sec *asect;
+_bfd_elf_section_from_bfd_section (bfd *abfd, struct sec *asect)
 {
   struct elf_backend_data *bed;
   int index;
@@ -4529,9 +4505,7 @@ _bfd_elf_section_from_bfd_section (abfd, asect)
    on error.  */
 
 int
-_bfd_elf_symbol_from_bfd_symbol (abfd, asym_ptr_ptr)
-     bfd *abfd;
-     asymbol **asym_ptr_ptr;
+_bfd_elf_symbol_from_bfd_symbol (bfd *abfd, asymbol **asym_ptr_ptr)
 {
   asymbol *asym_ptr = *asym_ptr_ptr;
   int idx;
@@ -4586,9 +4560,7 @@ _bfd_elf_symbol_from_bfd_symbol (abfd, asym_ptr_ptr)
 /* Copy private BFD data.  This copies any program header information.  */
 
 static bfd_boolean
-copy_private_bfd_data (ibfd, obfd)
-     bfd *ibfd;
-     bfd *obfd;
+copy_private_bfd_data (bfd *ibfd, bfd *obfd)
 {
   Elf_Internal_Ehdr *iehdr;
   struct elf_segment_map *map;
@@ -4812,7 +4784,7 @@ copy_private_bfd_data (ibfd, obfd)
         all of the sections we have selected.  */
       amt = sizeof (struct elf_segment_map);
       amt += ((bfd_size_type) section_count - 1) * sizeof (asection *);
-      map = (struct elf_segment_map *) bfd_alloc (obfd, amt);
+      map = bfd_alloc (obfd, amt);
       if (map == NULL)
        return FALSE;
 
@@ -4893,7 +4865,7 @@ copy_private_bfd_data (ibfd, obfd)
       /* Gcc 2.96 miscompiles this code on mips. Don't do casting here
         to work around this long long bug.  */
       amt = section_count * sizeof (asection *);
-      sections = (asection **) bfd_malloc (amt);
+      sections = bfd_malloc (amt);
       if (sections == NULL)
        return FALSE;
 
@@ -5095,7 +5067,7 @@ copy_private_bfd_data (ibfd, obfd)
                 and carry on looping.  */
              amt = sizeof (struct elf_segment_map);
              amt += ((bfd_size_type) section_count - 1) * sizeof (asection *);
-             map = (struct elf_segment_map *) bfd_alloc (obfd, amt);
+             map = bfd_alloc (obfd, amt);
              if (map == NULL)
                {
                  free (sections);
@@ -5189,11 +5161,10 @@ copy_private_bfd_data (ibfd, obfd)
    field, and sometimes the info field.  */
 
 bfd_boolean
-_bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
-     bfd *ibfd;
-     asection *isec;
-     bfd *obfd;
-     asection *osec;
+_bfd_elf_copy_private_section_data (bfd *ibfd,
+                                   asection *isec,
+                                   bfd *obfd,
+                                   asection *osec)
 {
   Elf_Internal_Shdr *ihdr, *ohdr;
 
@@ -5254,11 +5225,10 @@ _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
 #define MAP_SYM_SHNDX (SHN_HIOS + 5)
 
 bfd_boolean
-_bfd_elf_copy_private_symbol_data (ibfd, isymarg, obfd, osymarg)
-     bfd *ibfd;
-     asymbol *isymarg;
-     bfd *obfd;
-     asymbol *osymarg;
+_bfd_elf_copy_private_symbol_data (bfd *ibfd,
+                                  asymbol *isymarg,
+                                  bfd *obfd,
+                                  asymbol *osymarg)
 {
   elf_symbol_type *isym, *osym;
 
@@ -5295,10 +5265,9 @@ _bfd_elf_copy_private_symbol_data (ibfd, isymarg, obfd, osymarg)
 /* Swap out the symbols.  */
 
 static bfd_boolean
-swap_out_syms (abfd, sttp, relocatable_p)
-     bfd *abfd;
-     struct bfd_strtab_hash **sttp;
-     int relocatable_p;
+swap_out_syms (bfd *abfd,
+              struct bfd_strtab_hash **sttp,
+              int relocatable_p)
 {
   struct elf_backend_data *bed;
   int symcount;
@@ -5339,7 +5308,7 @@ swap_out_syms (abfd, sttp, relocatable_p)
       _bfd_stringtab_free (stt);
       return FALSE;
     }
-  symtab_hdr->contents = (PTR) outbound_syms;
+  symtab_hdr->contents = outbound_syms;
 
   outbound_shndx = NULL;
   symtab_shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
@@ -5580,8 +5549,7 @@ Unable to find equivalent output section for symbol '%s' from section '%s'"),
    always has a dummy entry as symbol #0, so it ends up even.  */
 
 long
-_bfd_elf_get_symtab_upper_bound (abfd)
-     bfd *abfd;
+_bfd_elf_get_symtab_upper_bound (bfd *abfd)
 {
   long symcount;
   long symtab_size;
@@ -5596,8 +5564,7 @@ _bfd_elf_get_symtab_upper_bound (abfd)
 }
 
 long
-_bfd_elf_get_dynamic_symtab_upper_bound (abfd)
-     bfd *abfd;
+_bfd_elf_get_dynamic_symtab_upper_bound (bfd *abfd)
 {
   long symcount;
   long symtab_size;
@@ -5618,9 +5585,8 @@ _bfd_elf_get_dynamic_symtab_upper_bound (abfd)
 }
 
 long
-_bfd_elf_get_reloc_upper_bound (abfd, asect)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     sec_ptr asect;
+_bfd_elf_get_reloc_upper_bound (bfd *abfd ATTRIBUTE_UNUSED,
+                               sec_ptr asect)
 {
   return (asect->reloc_count + 1) * sizeof (arelent *);
 }
@@ -5628,11 +5594,10 @@ _bfd_elf_get_reloc_upper_bound (abfd, asect)
 /* Canonicalize the relocs.  */
 
 long
-_bfd_elf_canonicalize_reloc (abfd, section, relptr, symbols)
-     bfd *abfd;
-     sec_ptr section;
-     arelent **relptr;
-     asymbol **symbols;
+_bfd_elf_canonicalize_reloc (bfd *abfd,
+                            sec_ptr section,
+                            arelent **relptr,
+                            asymbol **symbols)
 {
   arelent *tblptr;
   unsigned int i;
@@ -5651,12 +5616,10 @@ _bfd_elf_canonicalize_reloc (abfd, section, relptr, symbols)
 }
 
 long
-_bfd_elf_get_symtab (abfd, alocation)
-     bfd *abfd;
-     asymbol **alocation;
+_bfd_elf_get_symtab (bfd *abfd, asymbol **allocation)
 {
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
-  long symcount = bed->s->slurp_symbol_table (abfd, alocation, FALSE);
+  long symcount = bed->s->slurp_symbol_table (abfd, allocation, FALSE);
 
   if (symcount >= 0)
     bfd_get_symcount (abfd) = symcount;
@@ -5664,12 +5627,11 @@ _bfd_elf_get_symtab (abfd, alocation)
 }
 
 long
-_bfd_elf_canonicalize_dynamic_symtab (abfd, alocation)
-     bfd *abfd;
-     asymbol **alocation;
+_bfd_elf_canonicalize_dynamic_symtab (bfd *abfd,
+                                     asymbol **allocation)
 {
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
-  long symcount = bed->s->slurp_symbol_table (abfd, alocation, TRUE);
+  long symcount = bed->s->slurp_symbol_table (abfd, allocation, TRUE);
 
   if (symcount >= 0)
     bfd_get_dynamic_symcount (abfd) = symcount;
@@ -5682,8 +5644,7 @@ _bfd_elf_canonicalize_dynamic_symtab (abfd, alocation)
    considered to be a dynamic reloc section.  */
 
 long
-_bfd_elf_get_dynamic_reloc_upper_bound (abfd)
-     bfd *abfd;
+_bfd_elf_get_dynamic_reloc_upper_bound (bfd *abfd)
 {
   long ret;
   asection *s;
@@ -5715,13 +5676,11 @@ _bfd_elf_get_dynamic_reloc_upper_bound (abfd)
    section.  */
 
 long
-_bfd_elf_canonicalize_dynamic_reloc (abfd, storage, syms)
-     bfd *abfd;
-     arelent **storage;
-     asymbol **syms;
+_bfd_elf_canonicalize_dynamic_reloc (bfd *abfd,
+                                    arelent **storage,
+                                    asymbol **syms)
 {
-  bfd_boolean (*slurp_relocs)
-    PARAMS ((bfd *, asection *, asymbol **, bfd_boolean));
+  bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean);
   asection *s;
   long ret;
 
@@ -5760,8 +5719,7 @@ _bfd_elf_canonicalize_dynamic_reloc (abfd, storage, syms)
 /* Read in the version information.  */
 
 bfd_boolean
-_bfd_elf_slurp_version_tables (abfd)
-     bfd *abfd;
+_bfd_elf_slurp_version_tables (bfd *abfd)
 {
   bfd_byte *contents = NULL;
   bfd_size_type amt;
@@ -5778,11 +5736,11 @@ _bfd_elf_slurp_version_tables (abfd)
 
       hdr = &elf_tdata (abfd)->dynverdef_hdr;
 
-      contents = (bfd_byte *) bfd_malloc (hdr->sh_size);
+      contents = bfd_malloc (hdr->sh_size);
       if (contents == NULL)
        goto error_return;
       if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0
-         || bfd_bread ((PTR) contents, hdr->sh_size, abfd) != hdr->sh_size)
+         || bfd_bread (contents, hdr->sh_size, abfd) != hdr->sh_size)
        goto error_return;
 
       /* We know the number of entries in the section but not the maximum
@@ -5802,7 +5760,7 @@ _bfd_elf_slurp_version_tables (abfd)
        }
 
       amt = (bfd_size_type) maxidx * sizeof (Elf_Internal_Verdef);
-      elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
+      elf_tdata (abfd)->verdef = bfd_zalloc (abfd, amt);
       if (elf_tdata (abfd)->verdef == NULL)
        goto error_return;
 
@@ -5824,7 +5782,7 @@ _bfd_elf_slurp_version_tables (abfd)
          iverdef->vd_bfd = abfd;
 
          amt = (bfd_size_type) iverdef->vd_cnt * sizeof (Elf_Internal_Verdaux);
-         iverdef->vd_auxptr = (Elf_Internal_Verdaux *) bfd_alloc (abfd, amt);
+         iverdef->vd_auxptr = bfd_alloc (abfd, amt);
          if (iverdef->vd_auxptr == NULL)
            goto error_return;
 
@@ -5875,18 +5833,17 @@ _bfd_elf_slurp_version_tables (abfd)
       hdr = &elf_tdata (abfd)->dynverref_hdr;
 
       amt = (bfd_size_type) hdr->sh_info * sizeof (Elf_Internal_Verneed);
-      elf_tdata (abfd)->verref =
-       (Elf_Internal_Verneed *) bfd_zalloc (abfd, amt);
+      elf_tdata (abfd)->verref = bfd_zalloc (abfd, amt);
       if (elf_tdata (abfd)->verref == NULL)
        goto error_return;
 
       elf_tdata (abfd)->cverrefs = hdr->sh_info;
 
-      contents = (bfd_byte *) bfd_malloc (hdr->sh_size);
+      contents = bfd_malloc (hdr->sh_size);
       if (contents == NULL)
        goto error_return;
       if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0
-         || bfd_bread ((PTR) contents, hdr->sh_size, abfd) != hdr->sh_size)
+         || bfd_bread (contents, hdr->sh_size, abfd) != hdr->sh_size)
        goto error_return;
 
       everneed = (Elf_External_Verneed *) contents;
@@ -5909,7 +5866,7 @@ _bfd_elf_slurp_version_tables (abfd)
 
          amt = iverneed->vn_cnt;
          amt *= sizeof (Elf_Internal_Vernaux);
-         iverneed->vn_auxptr = (Elf_Internal_Vernaux *) bfd_alloc (abfd, amt);
+         iverneed->vn_auxptr = bfd_alloc (abfd, amt);
 
          evernaux = ((Elf_External_Vernaux *)
                      ((bfd_byte *) everneed + iverneed->vn_aux));
@@ -5955,13 +5912,12 @@ _bfd_elf_slurp_version_tables (abfd)
 }
 \f
 asymbol *
-_bfd_elf_make_empty_symbol (abfd)
-     bfd *abfd;
+_bfd_elf_make_empty_symbol (bfd *abfd)
 {
   elf_symbol_type *newsym;
   bfd_size_type amt = sizeof (elf_symbol_type);
 
-  newsym = (elf_symbol_type *) bfd_zalloc (abfd, amt);
+  newsym = bfd_zalloc (abfd, amt);
   if (!newsym)
     return NULL;
   else
@@ -5972,10 +5928,9 @@ _bfd_elf_make_empty_symbol (abfd)
 }
 
 void
-_bfd_elf_get_symbol_info (ignore_abfd, symbol, ret)
-     bfd *ignore_abfd ATTRIBUTE_UNUSED;
-     asymbol *symbol;
-     symbol_info *ret;
+_bfd_elf_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED,
+                         asymbol *symbol,
+                         symbol_info *ret)
 {
   bfd_symbol_info (symbol, ret);
 }
@@ -5985,9 +5940,8 @@ _bfd_elf_get_symbol_info (ignore_abfd, symbol, ret)
    override it.  */
 
 bfd_boolean
-_bfd_elf_is_local_label_name (abfd, name)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     const char *name;
+_bfd_elf_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
+                             const char *name)
 {
   /* Normal local symbols start with ``.L''.  */
   if (name[0] == '.' && name[1] == 'L')
@@ -6011,19 +5965,17 @@ _bfd_elf_is_local_label_name (abfd, name)
 }
 
 alent *
-_bfd_elf_get_lineno (ignore_abfd, symbol)
-     bfd *ignore_abfd ATTRIBUTE_UNUSED;
-     asymbol *symbol ATTRIBUTE_UNUSED;
+_bfd_elf_get_lineno (bfd *abfd ATTRIBUTE_UNUSED,
+                    asymbol *symbol ATTRIBUTE_UNUSED)
 {
   abort ();
   return NULL;
 }
 
 bfd_boolean
-_bfd_elf_set_arch_mach (abfd, arch, machine)
-     bfd *abfd;
-     enum bfd_architecture arch;
-     unsigned long machine;
+_bfd_elf_set_arch_mach (bfd *abfd,
+                       enum bfd_architecture arch,
+                       unsigned long machine)
 {
   /* If this isn't the right architecture for this backend, and this
      isn't the generic backend, fail.  */
@@ -6039,14 +5991,12 @@ _bfd_elf_set_arch_mach (abfd, arch, machine)
    for error reporting.  */
 
 static bfd_boolean
-elf_find_function (abfd, section, symbols, offset,
-                  filename_ptr, functionname_ptr)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *section;
-     asymbol **symbols;
-     bfd_vma offset;
-     const char **filename_ptr;
-     const char **functionname_ptr;
+elf_find_function (bfd *abfd ATTRIBUTE_UNUSED,
+                  asection *section,
+                  asymbol **symbols,
+                  bfd_vma offset,
+                  const char **filename_ptr,
+                  const char **functionname_ptr)
 {
   const char *filename;
   asymbol *func;
@@ -6101,15 +6051,13 @@ elf_find_function (abfd, section, symbols, offset,
    for error reporting.  */
 
 bfd_boolean
-_bfd_elf_find_nearest_line (abfd, section, symbols, offset,
-                           filename_ptr, functionname_ptr, line_ptr)
-     bfd *abfd;
-     asection *section;
-     asymbol **symbols;
-     bfd_vma offset;
-     const char **filename_ptr;
-     const char **functionname_ptr;
-     unsigned int *line_ptr;
+_bfd_elf_find_nearest_line (bfd *abfd,
+                           asection *section,
+                           asymbol **symbols,
+                           bfd_vma offset,
+                           const char **filename_ptr,
+                           const char **functionname_ptr,
+                           unsigned int *line_ptr)
 {
   bfd_boolean found;
 
@@ -6158,9 +6106,7 @@ _bfd_elf_find_nearest_line (abfd, section, symbols, offset,
 }
 
 int
-_bfd_elf_sizeof_headers (abfd, reloc)
-     bfd *abfd;
-     bfd_boolean reloc;
+_bfd_elf_sizeof_headers (bfd *abfd, bfd_boolean reloc)
 {
   int ret;
 
@@ -6171,19 +6117,17 @@ _bfd_elf_sizeof_headers (abfd, reloc)
 }
 
 bfd_boolean
-_bfd_elf_set_section_contents (abfd, section, location, offset, count)
-     bfd *abfd;
-     sec_ptr section;
-     PTR location;
-     file_ptr offset;
-     bfd_size_type count;
+_bfd_elf_set_section_contents (bfd *abfd,
+                              sec_ptr section,
+                              void *location,
+                              file_ptr offset,
+                              bfd_size_type count)
 {
   Elf_Internal_Shdr *hdr;
   bfd_signed_vma pos;
 
   if (! abfd->output_has_begun
-      && ! (_bfd_elf_compute_section_file_positions
-           (abfd, (struct bfd_link_info *) NULL)))
+      && ! _bfd_elf_compute_section_file_positions (abfd, NULL))
     return FALSE;
 
   hdr = &elf_section_data (section)->this_hdr;
@@ -6196,10 +6140,9 @@ _bfd_elf_set_section_contents (abfd, section, location, offset, count)
 }
 
 void
-_bfd_elf_no_info_to_howto (abfd, cache_ptr, dst)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *cache_ptr ATTRIBUTE_UNUSED;
-     Elf_Internal_Rela *dst ATTRIBUTE_UNUSED;
+_bfd_elf_no_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+                          arelent *cache_ptr ATTRIBUTE_UNUSED,
+                          Elf_Internal_Rela *dst ATTRIBUTE_UNUSED)
 {
   abort ();
 }
@@ -6207,9 +6150,7 @@ _bfd_elf_no_info_to_howto (abfd, cache_ptr, dst)
 /* Try to convert a non-ELF reloc into an ELF one.  */
 
 bfd_boolean
-_bfd_elf_validate_reloc (abfd, areloc)
-     bfd *abfd;
-     arelent *areloc;
+_bfd_elf_validate_reloc (bfd *abfd, arelent *areloc)
 {
   /* Check whether we really have an ELF howto.  */
 
@@ -6303,8 +6244,7 @@ _bfd_elf_validate_reloc (abfd, areloc)
 }
 
 bfd_boolean
-_bfd_elf_close_and_cleanup (abfd)
-     bfd *abfd;
+_bfd_elf_close_and_cleanup (bfd *abfd)
 {
   if (bfd_get_format (abfd) == bfd_object)
     {
@@ -6321,14 +6261,11 @@ _bfd_elf_close_and_cleanup (abfd)
    this reloc.  */
 
 bfd_reloc_status_type
-_bfd_elf_rel_vtable_reloc_fn (abfd, re, symbol, data, is, obfd, errmsg)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *re ATTRIBUTE_UNUSED;
-     struct symbol_cache_entry *symbol ATTRIBUTE_UNUSED;
-     PTR data ATTRIBUTE_UNUSED;
-     asection *is ATTRIBUTE_UNUSED;
-     bfd *obfd ATTRIBUTE_UNUSED;
-     char **errmsg ATTRIBUTE_UNUSED;
+_bfd_elf_rel_vtable_reloc_fn
+  (bfd *abfd ATTRIBUTE_UNUSED, arelent *re ATTRIBUTE_UNUSED,
+   struct symbol_cache_entry *symbol ATTRIBUTE_UNUSED,
+   void *data ATTRIBUTE_UNUSED, asection *is ATTRIBUTE_UNUSED,
+   bfd *obfd ATTRIBUTE_UNUSED, char **errmsg ATTRIBUTE_UNUSED)
 {
   return bfd_reloc_ok;
 }
@@ -6345,8 +6282,7 @@ _bfd_elf_rel_vtable_reloc_fn (abfd, re, symbol, data, is, obfd, errmsg)
 /* FIXME: this is kinda wrong, but it's what gdb wants.  */
 
 static int
-elfcore_make_pid (abfd)
-     bfd *abfd;
+elfcore_make_pid (bfd *abfd)
 {
   return ((elf_tdata (abfd)->core_lwpid << 16)
          + (elf_tdata (abfd)->core_pid));
@@ -6358,10 +6294,7 @@ elfcore_make_pid (abfd)
    overwrite it.  */
 
 static bfd_boolean
-elfcore_maybe_make_sect (abfd, name, sect)
-     bfd *abfd;
-     char *name;
-     asection *sect;
+elfcore_maybe_make_sect (bfd *abfd, char *name, asection *sect)
 {
   asection *sect2;
 
@@ -6387,11 +6320,10 @@ elfcore_maybe_make_sect (abfd, name, sect)
      PID is elfcore_make_pid (abfd).
    Both pseudosections have identical contents. */
 bfd_boolean
-_bfd_elfcore_make_pseudosection (abfd, name, size, filepos)
-     bfd *abfd;
-     char *name;
-     size_t size;
-     ufile_ptr filepos;
+_bfd_elfcore_make_pseudosection (bfd *abfd,
+                                char *name,
+                                size_t size,
+                                ufile_ptr filepos)
 {
   char buf[100];
   char *threaded_name;
@@ -6402,7 +6334,7 @@ _bfd_elfcore_make_pseudosection (abfd, name, size, filepos)
 
   sprintf (buf, "%s/%d", name, elfcore_make_pid (abfd));
   len = strlen (buf) + 1;
-  threaded_name = bfd_alloc (abfd, (bfd_size_type) len);
+  threaded_name = bfd_alloc (abfd, len);
   if (threaded_name == NULL)
     return FALSE;
   memcpy (threaded_name, buf, len);
@@ -6425,13 +6357,9 @@ _bfd_elfcore_make_pseudosection (abfd, name, size, filepos)
 */
 
 #if defined (HAVE_PRSTATUS_T)
-static bfd_boolean elfcore_grok_prstatus
-  PARAMS ((bfd *, Elf_Internal_Note *));
 
 static bfd_boolean
-elfcore_grok_prstatus (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
 {
   size_t raw_size;
   int offset;
@@ -6502,10 +6430,9 @@ elfcore_grok_prstatus (abfd, note)
 
 /* Create a pseudosection containing the exact contents of NOTE.  */
 static bfd_boolean
-elfcore_make_note_pseudosection (abfd, name, note)
-     bfd *abfd;
-     char *name;
-     Elf_Internal_Note *note;
+elfcore_make_note_pseudosection (bfd *abfd,
+                                char *name,
+                                Elf_Internal_Note *note)
 {
   return _bfd_elfcore_make_pseudosection (abfd, name,
                                          note->descsz, note->descpos);
@@ -6516,9 +6443,7 @@ elfcore_make_note_pseudosection (abfd, name, note)
    data structure apart.  */
 
 static bfd_boolean
-elfcore_grok_prfpreg (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elfcore_grok_prfpreg (bfd *abfd, Elf_Internal_Note *note)
 {
   return elfcore_make_note_pseudosection (abfd, ".reg2", note);
 }
@@ -6528,9 +6453,7 @@ elfcore_grok_prfpreg (abfd, note)
    literally.  */
 
 static bfd_boolean
-elfcore_grok_prxfpreg (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elfcore_grok_prxfpreg (bfd *abfd, Elf_Internal_Note *note)
 {
   return elfcore_make_note_pseudosection (abfd, ".reg-xfp", note);
 }
@@ -6554,10 +6477,7 @@ typedef psinfo32_t elfcore_psinfo32_t;
    the copy will always have a terminating '\0'.  */
 
 char *
-_bfd_elfcore_strndup (abfd, start, max)
-     bfd *abfd;
-     char *start;
-     size_t max;
+_bfd_elfcore_strndup (bfd *abfd, char *start, size_t max)
 {
   char *dups;
   char *end = memchr (start, '\0', max);
@@ -6568,7 +6488,7 @@ _bfd_elfcore_strndup (abfd, start, max)
   else
     len = end - start;
 
-  dups = bfd_alloc (abfd, (bfd_size_type) len + 1);
+  dups = bfd_alloc (abfd, len + 1);
   if (dups == NULL)
     return NULL;
 
@@ -6579,13 +6499,8 @@ _bfd_elfcore_strndup (abfd, start, max)
 }
 
 #if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
-static bfd_boolean elfcore_grok_psinfo
-  PARAMS ((bfd *, Elf_Internal_Note *));
-
 static bfd_boolean
-elfcore_grok_psinfo (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elfcore_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
 {
   if (note->descsz == sizeof (elfcore_psinfo_t))
     {
@@ -6643,13 +6558,8 @@ elfcore_grok_psinfo (abfd, note)
 #endif /* defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T) */
 
 #if defined (HAVE_PSTATUS_T)
-static bfd_boolean elfcore_grok_pstatus
-  PARAMS ((bfd *, Elf_Internal_Note *));
-
 static bfd_boolean
-elfcore_grok_pstatus (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elfcore_grok_pstatus (bfd *abfd, Elf_Internal_Note *note)
 {
   if (note->descsz == sizeof (pstatus_t)
 #if defined (HAVE_PXSTATUS_T)
@@ -6683,13 +6593,8 @@ elfcore_grok_pstatus (abfd, note)
 #endif /* defined (HAVE_PSTATUS_T) */
 
 #if defined (HAVE_LWPSTATUS_T)
-static bfd_boolean elfcore_grok_lwpstatus
-  PARAMS ((bfd *, Elf_Internal_Note *));
-
 static bfd_boolean
-elfcore_grok_lwpstatus (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
 {
   lwpstatus_t lwpstat;
   char buf[100];
@@ -6713,7 +6618,7 @@ elfcore_grok_lwpstatus (abfd, note)
 
   sprintf (buf, ".reg/%d", elfcore_make_pid (abfd));
   len = strlen (buf) + 1;
-  name = bfd_alloc (abfd, (bfd_size_type) len);
+  name = bfd_alloc (abfd, len);
   if (name == NULL)
     return FALSE;
   memcpy (name, buf, len);
@@ -6743,7 +6648,7 @@ elfcore_grok_lwpstatus (abfd, note)
 
   sprintf (buf, ".reg2/%d", elfcore_make_pid (abfd));
   len = strlen (buf) + 1;
-  name = bfd_alloc (abfd, (bfd_size_type) len);
+  name = bfd_alloc (abfd, len);
   if (name == NULL)
     return FALSE;
   memcpy (name, buf, len);
@@ -6772,9 +6677,7 @@ elfcore_grok_lwpstatus (abfd, note)
 
 #if defined (HAVE_WIN32_PSTATUS_T)
 static bfd_boolean
-elfcore_grok_win32pstatus (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
 {
   char buf[30];
   char *name;
@@ -6800,7 +6703,7 @@ elfcore_grok_win32pstatus (abfd, note)
       sprintf (buf, ".reg/%d", pstatus.data.thread_info.tid);
 
       len = strlen (buf) + 1;
-      name = bfd_alloc (abfd, (bfd_size_type) len);
+      name = bfd_alloc (abfd, len);
       if (name == NULL)
        return FALSE;
 
@@ -6827,7 +6730,7 @@ elfcore_grok_win32pstatus (abfd, note)
       sprintf (buf, ".module/%08x", pstatus.data.module_info.base_address);
 
       len = strlen (buf) + 1;
-      name = bfd_alloc (abfd, (bfd_size_type) len);
+      name = bfd_alloc (abfd, len);
       if (name == NULL)
        return FALSE;
 
@@ -6853,9 +6756,7 @@ elfcore_grok_win32pstatus (abfd, note)
 #endif /* HAVE_WIN32_PSTATUS_T */
 
 static bfd_boolean
-elfcore_grok_note (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
 {
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
 
@@ -6927,9 +6828,7 @@ elfcore_grok_note (abfd, note)
 }
 
 static bfd_boolean
-elfcore_netbsd_get_lwpid (note, lwpidp)
-     Elf_Internal_Note *note;
-     int *lwpidp;
+elfcore_netbsd_get_lwpid (Elf_Internal_Note *note, int *lwpidp)
 {
   char *cp;
 
@@ -6943,9 +6842,7 @@ elfcore_netbsd_get_lwpid (note, lwpidp)
 }
 
 static bfd_boolean
-elfcore_grok_netbsd_procinfo (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elfcore_grok_netbsd_procinfo (bfd *abfd, Elf_Internal_Note *note)
 {
 
   /* Signal number at offset 0x08. */
@@ -6964,9 +6861,7 @@ elfcore_grok_netbsd_procinfo (abfd, note)
 }
 
 static bfd_boolean
-elfcore_grok_netbsd_note (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note)
 {
   int lwp;
 
@@ -7031,10 +6926,7 @@ elfcore_grok_netbsd_note (abfd, note)
 }
 
 static bfd_boolean
-elfcore_grok_nto_status (abfd, note, tid)
-     bfd *abfd;
-     Elf_Internal_Note *note;
-     pid_t *tid;
+elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid)
 {
   void *ddata = note->descdata;
   char buf[100];
@@ -7068,7 +6960,7 @@ elfcore_grok_nto_status (abfd, note, tid)
   /* Make a ".qnx_core_status/%d" section.  */
   sprintf (buf, ".qnx_core_status/%d", *tid);
 
-  name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1);
+  name = bfd_alloc (abfd, strlen (buf) + 1);
   if (name == NULL)
     return FALSE;
   strcpy (name, buf);
@@ -7086,10 +6978,7 @@ elfcore_grok_nto_status (abfd, note, tid)
 }
 
 static bfd_boolean
-elfcore_grok_nto_gregs (abfd, note, tid)
-     bfd *abfd;
-     Elf_Internal_Note *note;
-     pid_t tid;
+elfcore_grok_nto_gregs (bfd *abfd, Elf_Internal_Note *note, pid_t tid)
 {
   char buf[100];
   char *name;
@@ -7098,7 +6987,7 @@ elfcore_grok_nto_gregs (abfd, note, tid)
   /* Make a ".reg/%d" section.  */
   sprintf (buf, ".reg/%d", tid);
 
-  name = bfd_alloc (abfd, (bfd_size_type) strlen (buf) + 1);
+  name = bfd_alloc (abfd, strlen (buf) + 1);
   if (name == NULL)
     return FALSE;
   strcpy (name, buf);
@@ -7125,9 +7014,7 @@ elfcore_grok_nto_gregs (abfd, note, tid)
 #define BFD_QNT_CORE_FPREG     10
 
 static bfd_boolean
-elfcore_grok_nto_note (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note)
 {
   /* Every GREG section has a STATUS section before it.  Store the
      tid from the previous call to pass down to the next gregs
@@ -7157,14 +7044,13 @@ elfcore_grok_nto_note (abfd, note)
    End of buffer containing note.  */
 
 char *
-elfcore_write_note (abfd, buf, bufsiz, name, type, input, size)
-     bfd  *abfd;
-     char *buf;
-     int  *bufsiz;
-     const char *name;
-     int  type;
-     const PTR input;
-     int  size;
+elfcore_write_note (bfd  *abfd,
+                   char *buf,
+                   int  *bufsiz,
+                   const char *name,
+                   int  type,
+                   const void *input,
+                   int  size)
 {
   Elf_External_Note *xnp;
   size_t namesz;
@@ -7209,12 +7095,11 @@ elfcore_write_note (abfd, buf, bufsiz, name, type, input, size)
 
 #if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
 char *
-elfcore_write_prpsinfo (abfd, buf, bufsiz, fname, psargs)
-     bfd  *abfd;
-     char *buf;
-     int  *bufsiz;
-     const char *fname;
-     const char *psargs;
+elfcore_write_prpsinfo (bfd  *abfd,
+                       char *buf,
+                       int  *bufsiz,
+                       const char *fname,
+                       const char *psargs)
 {
   int note_type;
   char *note_name = "CORE";
@@ -7237,13 +7122,12 @@ elfcore_write_prpsinfo (abfd, buf, bufsiz, fname, psargs)
 
 #if defined (HAVE_PRSTATUS_T)
 char *
-elfcore_write_prstatus (abfd, buf, bufsiz, pid, cursig, gregs)
-     bfd *abfd;
-     char *buf;
-     int *bufsiz;
-     long pid;
-     int cursig;
-     const PTR gregs;
+elfcore_write_prstatus (bfd *abfd,
+                       char *buf,
+                       int *bufsiz,
+                       long pid,
+                       int cursig,
+                       const void *gregs)
 {
   prstatus_t prstat;
   char *note_name = "CORE";
@@ -7259,13 +7143,12 @@ elfcore_write_prstatus (abfd, buf, bufsiz, pid, cursig, gregs)
 
 #if defined (HAVE_LWPSTATUS_T)
 char *
-elfcore_write_lwpstatus (abfd, buf, bufsiz, pid, cursig, gregs)
-     bfd *abfd;
-     char *buf;
-     int *bufsiz;
-     long pid;
-     int cursig;
-     const PTR gregs;
+elfcore_write_lwpstatus (bfd *abfd,
+                        char *buf,
+                        int *bufsiz,
+                        long pid,
+                        int cursig,
+                        const void *gregs)
 {
   lwpstatus_t lwpstat;
   char *note_name = "CORE";
@@ -7291,13 +7174,12 @@ elfcore_write_lwpstatus (abfd, buf, bufsiz, pid, cursig, gregs)
 
 #if defined (HAVE_PSTATUS_T)
 char *
-elfcore_write_pstatus (abfd, buf, bufsiz, pid, cursig, gregs)
-     bfd *abfd;
-     char *buf;
-     int *bufsiz;
-     long pid;
-     int cursig;
-     const PTR gregs;
+elfcore_write_pstatus (bfd *abfd,
+                      char *buf,
+                      int *bufsiz,
+                      long pid,
+                      int cursig,
+                      const void *gregs)
 {
   pstatus_t pstat;
   char *note_name = "CORE";
@@ -7311,12 +7193,11 @@ elfcore_write_pstatus (abfd, buf, bufsiz, pid, cursig, gregs)
 #endif /* HAVE_PSTATUS_T */
 
 char *
-elfcore_write_prfpreg (abfd, buf, bufsiz, fpregs, size)
-     bfd  *abfd;
-     char *buf;
-     int  *bufsiz;
-     const PTR fpregs;
-     int size;
+elfcore_write_prfpreg (bfd *abfd,
+                      char *buf,
+                      int *bufsiz,
+                      const void *fpregs,
+                      int size)
 {
   char *note_name = "CORE";
   return elfcore_write_note (abfd, buf, bufsiz,
@@ -7324,12 +7205,11 @@ elfcore_write_prfpreg (abfd, buf, bufsiz, fpregs, size)
 }
 
 char *
-elfcore_write_prxfpreg (abfd, buf, bufsiz, xfpregs, size)
-     bfd  *abfd;
-     char *buf;
-     int  *bufsiz;
-     const PTR xfpregs;
-     int size;
+elfcore_write_prxfpreg (bfd *abfd,
+                       char *buf,
+                       int *bufsiz,
+                       const void *xfpregs,
+                       int size)
 {
   char *note_name = "LINUX";
   return elfcore_write_note (abfd, buf, bufsiz,
@@ -7337,10 +7217,7 @@ elfcore_write_prxfpreg (abfd, buf, bufsiz, xfpregs, size)
 }
 
 static bfd_boolean
-elfcore_read_notes (abfd, offset, size)
-     bfd *abfd;
-     file_ptr offset;
-     bfd_size_type size;
+elfcore_read_notes (bfd *abfd, file_ptr offset, bfd_size_type size)
 {
   char *buf;
   char *p;
@@ -7408,8 +7285,7 @@ elfcore_read_notes (abfd, offset, size)
    occurs; bfd_get_error will return an appropriate code.  */
 
 long
-bfd_get_elf_phdr_upper_bound (abfd)
-     bfd *abfd;
+bfd_get_elf_phdr_upper_bound (bfd *abfd)
 {
   if (abfd->xvec->flavour != bfd_target_elf_flavour)
     {
@@ -7429,9 +7305,7 @@ bfd_get_elf_phdr_upper_bound (abfd)
    error occurs; bfd_get_error will return an appropriate code.  */
 
 int
-bfd_get_elf_phdrs (abfd, phdrs)
-     bfd *abfd;
-     void *phdrs;
+bfd_get_elf_phdrs (bfd *abfd, void *phdrs)
 {
   int num_phdrs;
 
@@ -7449,10 +7323,7 @@ bfd_get_elf_phdrs (abfd, phdrs)
 }
 
 void
-_bfd_elf_sprintf_vma (abfd, buf, value)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     char *buf;
-     bfd_vma value;
+_bfd_elf_sprintf_vma (bfd *abfd ATTRIBUTE_UNUSED, char *buf, bfd_vma value)
 {
 #ifdef BFD64
   Elf_Internal_Ehdr *i_ehdrp;  /* Elf file header, internal form */
@@ -7480,10 +7351,7 @@ _bfd_elf_sprintf_vma (abfd, buf, value)
 }
 
 void
-_bfd_elf_fprintf_vma (abfd, stream, value)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     PTR stream;
-     bfd_vma value;
+_bfd_elf_fprintf_vma (bfd *abfd ATTRIBUTE_UNUSED, void *stream, bfd_vma value)
 {
 #ifdef BFD64
   Elf_Internal_Ehdr *i_ehdrp;  /* Elf file header, internal form */
@@ -7512,8 +7380,7 @@ _bfd_elf_fprintf_vma (abfd, stream, value)
 }
 
 enum elf_reloc_type_class
-_bfd_elf_reloc_type_class (rela)
-     const Elf_Internal_Rela *rela ATTRIBUTE_UNUSED;
+_bfd_elf_reloc_type_class (const Elf_Internal_Rela *rela ATTRIBUTE_UNUSED)
 {
   return reloc_class_normal;
 }
@@ -7522,11 +7389,10 @@ _bfd_elf_reloc_type_class (rela)
    relocation against a local symbol.  */
 
 bfd_vma
-_bfd_elf_rela_local_sym (abfd, sym, sec, rel)
-     bfd *abfd;
-     Elf_Internal_Sym *sym;
-     asection *sec;
-     Elf_Internal_Rela *rel;
+_bfd_elf_rela_local_sym (bfd *abfd,
+                        Elf_Internal_Sym *sym,
+                        asection *sec,
+                        Elf_Internal_Rela *rel)
 {
   bfd_vma relocation;
 
@@ -7544,7 +7410,7 @@ _bfd_elf_rela_local_sym (abfd, sym, sec, rel)
        _bfd_merged_section_offset (abfd, &msec,
                                    elf_section_data (sec)->sec_info,
                                    sym->st_value + rel->r_addend,
-                                   (bfd_vma) 0)
+                                   0)
        - relocation;
       rel->r_addend += msec->output_section->vma + msec->output_offset;
     }
@@ -7552,11 +7418,10 @@ _bfd_elf_rela_local_sym (abfd, sym, sec, rel)
 }
 
 bfd_vma
-_bfd_elf_rel_local_sym (abfd, sym, psec, addend)
-     bfd *abfd;
-     Elf_Internal_Sym *sym;
-     asection **psec;
-     bfd_vma addend;
+_bfd_elf_rel_local_sym (bfd *abfd,
+                       Elf_Internal_Sym *sym,
+                       asection **psec,
+                       bfd_vma addend)
 {
   asection *sec = *psec;
 
@@ -7565,15 +7430,14 @@ _bfd_elf_rel_local_sym (abfd, sym, psec, addend)
 
   return _bfd_merged_section_offset (abfd, psec,
                                     elf_section_data (sec)->sec_info,
-                                    sym->st_value + addend, (bfd_vma) 0);
+                                    sym->st_value + addend, 0);
 }
 
 bfd_vma
-_bfd_elf_section_offset (abfd, info, sec, offset)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *sec;
-     bfd_vma offset;
+_bfd_elf_section_offset (bfd *abfd,
+                        struct bfd_link_info *info,
+                        asection *sec,
+                        bfd_vma offset)
 {
   struct bfd_elf_section_data *sec_data;
 
@@ -7605,11 +7469,11 @@ _bfd_elf_section_offset (abfd, info, sec, offset)
    the remote memory.  */
 
 bfd *
-bfd_elf_bfd_from_remote_memory (templ, ehdr_vma, loadbasep, target_read_memory)
-     bfd *templ;
-     bfd_vma ehdr_vma;
-     bfd_vma *loadbasep;
-     int (*target_read_memory) PARAMS ((bfd_vma vma, char *myaddr, int len));
+bfd_elf_bfd_from_remote_memory
+  (bfd *templ,
+   bfd_vma ehdr_vma,
+   bfd_vma *loadbasep,
+   int (*target_read_memory) (bfd_vma, char *, int))
 {
   return (*get_elf_backend_data (templ)->elf_backend_bfd_from_remote_memory)
     (templ, ehdr_vma, loadbasep, target_read_memory);
index e2d66adb8ca88abf6b6e22878d5dfcb81f02af17..f073e7a1a639e7fbc0b55269b2bf0e94976b0bc1 100644 (file)
@@ -3699,7 +3699,11 @@ elf32_arm_final_write_processing (abfd, linker)
 
 #define ELF_ARCH                       bfd_arch_arm
 #define ELF_MACHINE_CODE               EM_ARM
+#ifdef __QNXTARGET__
+#define ELF_MAXPAGESIZE                        0x1000
+#else
 #define ELF_MAXPAGESIZE                        0x8000
+#endif
 
 #define bfd_elf32_bfd_copy_private_bfd_data    elf32_arm_copy_private_bfd_data
 #define bfd_elf32_bfd_merge_private_bfd_data   elf32_arm_merge_private_bfd_data
index 1b623f27f21edc6df3578956589cba0e0952ec01..efd14bb582fb0f763548979dec3d32e94640f19f 100644 (file)
 #include "elf/h8.h"
 
 static reloc_howto_type *elf32_h8_reloc_type_lookup
-  PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+  (bfd *abfd, bfd_reloc_code_real_type code);
 static void elf32_h8_info_to_howto
-  PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+  (bfd *, arelent *, Elf_Internal_Rela *);
 static void elf32_h8_info_to_howto_rel
-  PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+  (bfd *, arelent *, Elf_Internal_Rela *);
 static unsigned long elf32_h8_mach
-  PARAMS ((flagword));
+  (flagword);
 static void elf32_h8_final_write_processing
-  PARAMS ((bfd *, bfd_boolean));
+  (bfd *, bfd_boolean);
 static bfd_boolean elf32_h8_object_p
-  PARAMS ((bfd *));
+  (bfd *);
 static bfd_boolean elf32_h8_merge_private_bfd_data
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 static bfd_boolean elf32_h8_relax_section
-  PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+  (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
 static bfd_boolean elf32_h8_relax_delete_bytes
-  PARAMS ((bfd *, asection *, bfd_vma, int));
+  (bfd *, asection *, bfd_vma, int);
 static bfd_boolean elf32_h8_symbol_address_p
-  PARAMS ((bfd *, asection *, bfd_vma));
+  (bfd *, asection *, bfd_vma);
 static bfd_byte *elf32_h8_get_relocated_section_contents
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
-          bfd_byte *, bfd_boolean, asymbol **));
+  (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+   bfd_byte *, bfd_boolean, asymbol **);
 static bfd_reloc_status_type elf32_h8_final_link_relocate
-  PARAMS ((unsigned long, bfd *, bfd *, asection *,
-          bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
-          struct bfd_link_info *, asection *, int));
+  (unsigned long, bfd *, bfd *, asection *,
+   bfd_byte *, bfd_vma, bfd_vma, bfd_vma,
+   struct bfd_link_info *, asection *, int);
 static bfd_boolean elf32_h8_relocate_section
-  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
-          bfd_byte *, Elf_Internal_Rela *,
-          Elf_Internal_Sym *, asection **));
+  (bfd *, struct bfd_link_info *, bfd *, asection *,
+   bfd_byte *, Elf_Internal_Rela *,
+   Elf_Internal_Sym *, asection **);
 static bfd_reloc_status_type special
-  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+  (bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **);
 
 /* This does not include any relocation information, but should be
    good enough for GDB or objdump to read the file.  */
@@ -183,7 +183,7 @@ static reloc_howto_type h8_elf_howto_table[] = {
         0,                     /* bitpos */
         complain_overflow_dont,/* complain_on_overflow */
         special,               /* special_function */
-        "R_H8_DIR32",          /* name */
+        "R_H8_DIR32A16",       /* name */
         FALSE,                 /* partial_inplace */
         0,                     /* src_mask */
         0xffffffff,            /* dst_mask */
@@ -243,9 +243,8 @@ static const struct elf_reloc_map h8_reloc_map[] = {
 
 
 static reloc_howto_type *
-elf32_h8_reloc_type_lookup (abfd, code)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
+elf32_h8_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                           bfd_reloc_code_real_type code)
 {
   unsigned int i;
 
@@ -258,10 +257,8 @@ elf32_h8_reloc_type_lookup (abfd, code)
 }
 
 static void
-elf32_h8_info_to_howto (abfd, bfd_reloc, elf_reloc)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *bfd_reloc;
-     Elf_Internal_Rela *elf_reloc;
+elf32_h8_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc,
+                       Elf_Internal_Rela *elf_reloc)
 {
   unsigned int r;
   unsigned int i;
@@ -277,10 +274,8 @@ elf32_h8_info_to_howto (abfd, bfd_reloc, elf_reloc)
 }
 
 static void
-elf32_h8_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *bfd_reloc;
-     Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
+elf32_h8_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc,
+                           Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED)
 {
   unsigned int r;
 
@@ -294,15 +289,13 @@ elf32_h8_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
    When doing -r, we can't do any arithmetic for the pcrel stuff, because
    we support relaxing on the H8/300 series chips.  */
 static bfd_reloc_status_type
-special (abfd, reloc_entry, symbol, data, input_section, output_bfd,
-        error_message)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *reloc_entry ATTRIBUTE_UNUSED;
-     asymbol *symbol ATTRIBUTE_UNUSED;
-     PTR data ATTRIBUTE_UNUSED;
-     asection *input_section ATTRIBUTE_UNUSED;
-     bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
+special (bfd *abfd ATTRIBUTE_UNUSED,
+        arelent *reloc_entry ATTRIBUTE_UNUSED,
+        asymbol *symbol ATTRIBUTE_UNUSED,
+        PTR data ATTRIBUTE_UNUSED,
+        asection *input_section ATTRIBUTE_UNUSED,
+        bfd *output_bfd,
+        char **error_message ATTRIBUTE_UNUSED)
 {
   if (output_bfd == (bfd *) NULL)
     return bfd_reloc_continue;
@@ -314,26 +307,19 @@ special (abfd, reloc_entry, symbol, data, input_section, output_bfd,
 
 /* Perform a relocation as part of a final link.  */
 static bfd_reloc_status_type
-elf32_h8_final_link_relocate (r_type, input_bfd, output_bfd,
-                             input_section, contents, offset, value,
-                             addend, info, sym_sec, is_local)
-     unsigned long r_type;
-     bfd *input_bfd;
-     bfd *output_bfd ATTRIBUTE_UNUSED;
-     asection *input_section ATTRIBUTE_UNUSED;
-     bfd_byte *contents;
-     bfd_vma offset;
-     bfd_vma value;
-     bfd_vma addend;
-     struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     asection *sym_sec ATTRIBUTE_UNUSED;
-     int is_local ATTRIBUTE_UNUSED;
+elf32_h8_final_link_relocate (unsigned long r_type, bfd *input_bfd,
+                             bfd *output_bfd ATTRIBUTE_UNUSED,
+                             asection *input_section ATTRIBUTE_UNUSED,
+                             bfd_byte *contents, bfd_vma offset,
+                             bfd_vma value, bfd_vma addend,
+                             struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                             asection *sym_sec ATTRIBUTE_UNUSED,
+                             int is_local ATTRIBUTE_UNUSED)
 {
   bfd_byte *hit_data = contents + offset;
 
   switch (r_type)
     {
-
     case R_H8_NONE:
       return bfd_reloc_ok;
 
@@ -411,16 +397,11 @@ elf32_h8_final_link_relocate (r_type, input_bfd, output_bfd,
 \f
 /* Relocate an H8 ELF section.  */
 static bfd_boolean
-elf32_h8_relocate_section (output_bfd, info, input_bfd, input_section,
-                          contents, relocs, local_syms, local_sections)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     Elf_Internal_Rela *relocs;
-     Elf_Internal_Sym *local_syms;
-     asection **local_sections;
+elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
+                          bfd *input_bfd, asection *input_section,
+                          bfd_byte *contents, Elf_Internal_Rela *relocs,
+                          Elf_Internal_Sym *local_syms,
+                          asection **local_sections)
 {
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
@@ -559,8 +540,7 @@ elf32_h8_relocate_section (output_bfd, info, input_bfd, input_section,
    Examine that field and return the proper BFD machine type for
    the object file.  */
 static unsigned long
-elf32_h8_mach (flags)
-     flagword flags;
+elf32_h8_mach (flagword flags)
 {
   switch (flags & EF_H8_MACH)
     {
@@ -593,9 +573,8 @@ elf32_h8_mach (flags)
    into the flags field in the object file.  */
 
 static void
-elf32_h8_final_write_processing (abfd, linker)
-     bfd *abfd;
-     bfd_boolean linker ATTRIBUTE_UNUSED;
+elf32_h8_final_write_processing (bfd *abfd,
+                                bfd_boolean linker ATTRIBUTE_UNUSED)
 {
   unsigned long val;
 
@@ -639,8 +618,7 @@ elf32_h8_final_write_processing (abfd, linker)
    record the encoded machine type found in the ELF flags.  */
 
 static bfd_boolean
-elf32_h8_object_p (abfd)
-     bfd *abfd;
+elf32_h8_object_p (bfd *abfd)
 {
   bfd_default_set_arch_mach (abfd, bfd_arch_h8300,
                             elf32_h8_mach (elf_elfheader (abfd)->e_flags));
@@ -652,9 +630,7 @@ elf32_h8_object_p (abfd)
    time is the architecture/machine information.  */
 
 static bfd_boolean
-elf32_h8_merge_private_bfd_data (ibfd, obfd)
-     bfd *ibfd;
-     bfd *obfd;
+elf32_h8_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
 {
   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
       || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -689,11 +665,8 @@ elf32_h8_merge_private_bfd_data (ibfd, obfd)
      mov.[bwl]:24/32 ->    mov.[bwl]:16           2 bytes */
 
 static bfd_boolean
-elf32_h8_relax_section (abfd, sec, link_info, again)
-     bfd *abfd;
-     asection *sec;
-     struct bfd_link_info *link_info;
-     bfd_boolean *again;
+elf32_h8_relax_section (bfd *abfd, asection *sec,
+                       struct bfd_link_info *link_info, bfd_boolean *again)
 {
   Elf_Internal_Shdr *symtab_hdr;
   Elf_Internal_Rela *internal_relocs;
@@ -1031,18 +1004,10 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
           become an 8 bit absolute address if its in the right range.  */
        case R_H8_DIR16A8:
          {
-           bfd_vma value = symval + irel->r_addend;
+           bfd_vma value;
 
-           if ((bfd_get_mach (abfd) == bfd_mach_h8300
-                && value >= 0xff00
-                && value <= 0xffff)
-               || ((bfd_get_mach (abfd) == bfd_mach_h8300h
-                    /* FIXME: h8300hn? */
-                    || bfd_get_mach (abfd) == bfd_mach_h8300s
-                    /* FIXME: h8300sn? */
-                    || bfd_get_mach (abfd) == bfd_mach_h8300sx)
-                   && value >= 0xffff00
-                   && value <= 0xffffff))
+           value = bfd_h8300_pad_address (abfd, symval + irel->r_addend);
+           if (value >= 0xffffff00u)
              {
                unsigned char code;
 
@@ -1076,6 +1041,9 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
                irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
                                             R_H8_DIR8);
 
+               /* Move the relocation.  */
+               irel->r_offset--;
+
                /* Delete two bytes of data.  */
                if (!elf32_h8_relax_delete_bytes (abfd, sec,
                                                  irel->r_offset + 1, 2))
@@ -1092,20 +1060,11 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
           become an 8 bit absolute address if its in the right range.  */
        case R_H8_DIR24A8:
          {
-           bfd_vma value = symval + irel->r_addend;
+           bfd_vma value;
 
-           if ((bfd_get_mach (abfd) == bfd_mach_h8300
-                && value >= 0xff00
-                && value <= 0xffff)
-               || ((bfd_get_mach (abfd) == bfd_mach_h8300h
-                    /* FIXME: h8300hn? */
-                    || bfd_get_mach (abfd) == bfd_mach_h8300s
-                    /* FIXME: h8300sn? */
-                    || bfd_get_mach (abfd) == bfd_mach_h8300sx)
-                   && value >= 0xffff00
-                   && value <= 0xffffff))
+           value = bfd_h8300_pad_address (abfd, symval + irel->r_addend);
+           if (value >= 0xffffff00u)
              {
-               bfd_boolean skip = FALSE;
                unsigned char code;
 
                /* Note that we've changed the relocs, section contents,
@@ -1125,37 +1084,32 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
 
                switch (code & 0xf0)
                  {
-                 case 0x00:
+                 case 0x20:
                    bfd_put_8 (abfd, (code & 0xf) | 0x20,
                               contents + irel->r_offset - 2);
                    break;
-                 case 0x80:
+                 case 0xa0:
                    bfd_put_8 (abfd, (code & 0xf) | 0x30,
                               contents + irel->r_offset - 2);
                    break;
-                 case 0x20:
-                 case 0xa0:
-                   /* Skip 32bit versions.  */
-                   skip = TRUE;
-                   break;
                  default:
                    abort ();
                  }
 
-               if (skip)
-                 break;
-
                /* Fix the relocation's type.  */
                irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
                                             R_H8_DIR8);
+               irel->r_offset--;
 
                /* Delete two bytes of data.  */
-               if (!elf32_h8_relax_delete_bytes (abfd, sec, irel->r_offset, 2))
+               if (!elf32_h8_relax_delete_bytes (abfd, sec,
+                                                 irel->r_offset + 1, 4))
                  goto error_return;
 
                /* That will change things, so, we should relax again.
                   Note that this is not required, and it may be slow.  */
                *again = TRUE;
+               break;
              }
          }
 
@@ -1165,9 +1119,10 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
           become a 16bit absoulte address if it is in the right range.  */
        case R_H8_DIR32A16:
          {
-           bfd_vma value = symval + irel->r_addend;
+           bfd_vma value;
 
-           if (value <= 0x7fff || value >= 0xff8000)
+           value = bfd_h8300_pad_address (abfd, symval + irel->r_addend);
+           if (value <= 0x7fff || value >= 0xffff8000u)
              {
                unsigned char code;
 
@@ -1187,7 +1142,7 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
 
                /* Fix the relocation's type.  */
                irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
-                                            R_H8_DIR16A8);
+                                            R_H8_DIR16);
 
                /* Delete two bytes of data.  */
                if (!elf32_h8_relax_delete_bytes (abfd, sec,
@@ -1249,11 +1204,7 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
 /* Delete some bytes from a section while relaxing.  */
 
 static bfd_boolean
-elf32_h8_relax_delete_bytes (abfd, sec, addr, count)
-     bfd *abfd;
-     asection *sec;
-     bfd_vma addr;
-     int count;
+elf32_h8_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count)
 {
   Elf_Internal_Shdr *symtab_hdr;
   unsigned int sec_shndx;
@@ -1330,10 +1281,7 @@ elf32_h8_relax_delete_bytes (abfd, sec, addr, count)
 /* Return TRUE if a symbol exists at the given address, else return
    FALSE.  */
 static bfd_boolean
-elf32_h8_symbol_address_p (abfd, sec, addr)
-     bfd *abfd;
-     asection *sec;
-     bfd_vma addr;
+elf32_h8_symbol_address_p (bfd *abfd, asection *sec, bfd_vma addr)
 {
   Elf_Internal_Shdr *symtab_hdr;
   unsigned int sec_shndx;
@@ -1377,14 +1325,12 @@ elf32_h8_symbol_address_p (abfd, sec, addr)
    which uses elf32_h8_relocate_section.  */
 
 static bfd_byte *
-elf32_h8_get_relocated_section_contents (output_bfd, link_info, link_order,
-                                        data, relocatable, symbols)
-     bfd *output_bfd;
-     struct bfd_link_info *link_info;
-     struct bfd_link_order *link_order;
-     bfd_byte *data;
-     bfd_boolean relocatable;
-     asymbol **symbols;
+elf32_h8_get_relocated_section_contents (bfd *output_bfd,
+                                        struct bfd_link_info *link_info,
+                                        struct bfd_link_order *link_order,
+                                        bfd_byte *data,
+                                        bfd_boolean relocatable,
+                                        asymbol **symbols)
 {
   Elf_Internal_Shdr *symtab_hdr;
   asection *input_section = link_order->u.indirect.section;
index 2eacb81035aa25e5b4e4d2b01e29839e98b7053c..4a06ac08fae4f648062b293fe1bdfebcdb3cda53 100644 (file)
@@ -290,11 +290,6 @@ static bfd_boolean i370_elf_section_from_shdr
   PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
 static bfd_boolean i370_elf_fake_sections
   PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
-#if 0
-static elf_linker_section_t *i370_elf_create_linker_section
-  PARAMS ((bfd *abfd, struct bfd_link_info *info,
-          enum elf_linker_section_enum));
-#endif
 static bfd_boolean i370_elf_check_relocs
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
           const Elf_Internal_Rela *));
@@ -434,84 +429,6 @@ i370_elf_fake_sections (abfd, shdr, asect)
   return TRUE;
 }
 \f
-#if 0
-/* Create a special linker section */
-/* XXX hack alert bogus This routine is mostly all junk and almost
- * certainly does the wrong thing.  Its here simply because it does
- * just enough to allow glibc-2.1 ld.so to compile & link.
- */
-
-static elf_linker_section_t *
-i370_elf_create_linker_section (abfd, info, which)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     enum elf_linker_section_enum which;
-{
-  bfd *dynobj = elf_hash_table (info)->dynobj;
-  elf_linker_section_t *lsect;
-
-  /* Record the first bfd section that needs the special section */
-  if (!dynobj)
-    dynobj = elf_hash_table (info)->dynobj = abfd;
-
-  /* If this is the first time, create the section */
-  lsect = elf_linker_section (dynobj, which);
-  if (!lsect)
-    {
-      elf_linker_section_t defaults;
-      static elf_linker_section_t zero_section;
-
-      defaults = zero_section;
-      defaults.which = which;
-      defaults.hole_written_p = FALSE;
-      defaults.alignment = 2;
-
-      /* Both of these sections are (technically) created by the user
-        putting data in them, so they shouldn't be marked
-        SEC_LINKER_CREATED.
-
-        The linker creates them so it has somewhere to attach their
-        respective symbols. In fact, if they were empty it would
-        be OK to leave the symbol set to 0 (or any random number), because
-        the appropriate register should never be used.  */
-      defaults.flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-                       | SEC_IN_MEMORY);
-
-      switch (which)
-       {
-       default:
-         (*_bfd_error_handler) ("%s: Unknown special linker type %d",
-                                bfd_archive_filename (abfd),
-                                (int) which);
-
-         bfd_set_error (bfd_error_bad_value);
-         return (elf_linker_section_t *)0;
-
-       case LINKER_SECTION_SDATA:      /* .sdata/.sbss section */
-         defaults.name           = ".sdata";
-         defaults.rel_name       = ".rela.sdata";
-         defaults.bss_name       = ".sbss";
-         defaults.sym_name       = "_SDA_BASE_";
-         defaults.sym_offset     = 32768;
-         break;
-
-       case LINKER_SECTION_SDATA2:     /* .sdata2/.sbss2 section */
-         defaults.name           = ".sdata2";
-         defaults.rel_name       = ".rela.sdata2";
-         defaults.bss_name       = ".sbss2";
-         defaults.sym_name       = "_SDA2_BASE_";
-         defaults.sym_offset     = 32768;
-         defaults.flags         |= SEC_READONLY;
-         break;
-       }
-
-      lsect = _bfd_elf_create_linker_section (abfd, info, which, &defaults);
-    }
-
-  return lsect;
-}
-#endif
-\f
 /* We have to create .dynsbss and .rela.sbss here so that they get mapped
    to output sections (just like _bfd_elf_create_dynamic_sections has
    to create .dynbss and .rela.bss).  */
index 3c7bbd991daaaec5f591f1575111efd34ec6cbcf..60bccb8078b00ed5c60bdbb30dfa34d63475d1d8 100644 (file)
@@ -2177,7 +2177,7 @@ elf_i386_relocate_section (bfd *output_bfd,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            ;
-         else if (info->shared
+         else if (!info->executable
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            ;
@@ -2338,8 +2338,7 @@ elf_i386_relocate_section (bfd *output_bfd,
                   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
                   || h->root.type != bfd_link_hash_undefweak)
               && (r_type != R_386_PC32
-                  || (h != NULL
-                      && !SYMBOL_CALLS_LOCAL (info, h))))
+                  || !SYMBOL_CALLS_LOCAL (info, h)))
              || (ELIMINATE_COPY_RELOCS
                  && !info->shared
                  && h != NULL
index cec42be7e3a90b086aca4ebefdff5b3acf1ca667..fd68dc6336285afede28efa564cd9f184bbab985 100644 (file)
@@ -26,38 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "elf-bfd.h"
 #include "elf/i860.h"
 
-/* Prototypes.  */
-static reloc_howto_type *lookup_howto
-  PARAMS ((unsigned int));
-
-static reloc_howto_type *elf32_i860_reloc_type_lookup
-  PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-
-static void elf32_i860_info_to_howto_rela
-  PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-
-static bfd_reloc_status_type elf32_i860_relocate_splitn
-  PARAMS ((bfd *,  Elf_Internal_Rela *, bfd_byte *, bfd_vma));
-
-static bfd_reloc_status_type elf32_i860_relocate_pc16
-  PARAMS ((bfd *,  asection *, Elf_Internal_Rela *, bfd_byte *, bfd_vma));
-
-static bfd_reloc_status_type elf32_i860_relocate_pc26
-  PARAMS ((bfd *,  asection *, Elf_Internal_Rela *, bfd_byte *, bfd_vma));
-
-static bfd_reloc_status_type elf32_i860_relocate_highadj
-  PARAMS ((bfd *,  Elf_Internal_Rela *, bfd_byte *, bfd_vma));
-
-static bfd_boolean elf32_i860_relocate_section
-  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
-          Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-
-static bfd_reloc_status_type i860_final_link_relocate
-  PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
-          Elf_Internal_Rela *, bfd_vma));
-
-static bfd_boolean elf32_i860_is_local_label_name
-  PARAMS ((bfd *, const char *));
 
 /* This howto table is preliminary.  */
 static reloc_howto_type elf32_i860_howto_table [] =
@@ -546,8 +514,7 @@ static reloc_howto_type elf32_i860_howto_table [] =
 static unsigned char elf_code_to_howto_index[R_860_max + 1];
 
 static reloc_howto_type *
-lookup_howto (rtype)
-     unsigned int rtype;
+lookup_howto (unsigned int rtype)
 {
   static int initialized = 0;
   int i;
@@ -572,9 +539,8 @@ lookup_howto (rtype)
 
 /* Given a BFD reloc, return the matching HOWTO structure.  */
 static reloc_howto_type *
-elf32_i860_reloc_type_lookup (abfd, code)
-     bfd * abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
+elf32_i860_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                             bfd_reloc_code_real_type code)
 {
   unsigned int rtype;
 
@@ -691,10 +657,9 @@ elf32_i860_reloc_type_lookup (abfd, code)
 
 /* Given a ELF reloc, return the matching HOWTO structure.  */
 static void
-elf32_i860_info_to_howto_rela (abfd, bfd_reloc, elf_reloc)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *bfd_reloc;
-     Elf_Internal_Rela *elf_reloc;
+elf32_i860_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED,
+                              arelent *bfd_reloc,
+                              Elf_Internal_Rela *elf_reloc)
 {
   bfd_reloc->howto
     = lookup_howto ((unsigned) ELF32_R_TYPE (elf_reloc->r_info));
@@ -703,11 +668,10 @@ elf32_i860_info_to_howto_rela (abfd, bfd_reloc, elf_reloc)
 /* Specialized relocation handler for R_860_SPLITn.  These relocations
    involves a 16-bit field that is split into two contiguous parts.  */
 static bfd_reloc_status_type
-elf32_i860_relocate_splitn (input_bfd, rello, contents, value)
-     bfd *input_bfd;
-     Elf_Internal_Rela *rello;
-     bfd_byte *contents;
-     bfd_vma value;
+elf32_i860_relocate_splitn (bfd *input_bfd,
+                           Elf_Internal_Rela *rello,
+                           bfd_byte *contents,
+                           bfd_vma value)
 {
   bfd_vma insn;
   reloc_howto_type *howto;
@@ -729,12 +693,11 @@ elf32_i860_relocate_splitn (input_bfd, rello, contents, value)
    involves a 16-bit, PC-relative field that is split into two contiguous
    parts.  */
 static bfd_reloc_status_type
-elf32_i860_relocate_pc16 (input_bfd, input_section, rello, contents, value)
-     bfd *input_bfd;
-     asection *input_section;
-     Elf_Internal_Rela *rello;
-     bfd_byte *contents;
-     bfd_vma value;
+elf32_i860_relocate_pc16 (bfd *input_bfd,
+                         asection *input_section,
+                         Elf_Internal_Rela *rello,
+                         bfd_byte *contents,
+                         bfd_vma value)
 {
   bfd_vma insn;
   reloc_howto_type *howto;
@@ -761,12 +724,11 @@ elf32_i860_relocate_pc16 (input_bfd, input_section, rello, contents, value)
 /* Specialized relocation handler for R_860_PC26.  This relocation
    involves a 26-bit, PC-relative field which must be adjusted by 4.  */
 static bfd_reloc_status_type
-elf32_i860_relocate_pc26 (input_bfd, input_section, rello, contents, value)
-     bfd *input_bfd;
-     asection *input_section;
-     Elf_Internal_Rela *rello;
-     bfd_byte *contents;
-     bfd_vma value;
+elf32_i860_relocate_pc26 (bfd *input_bfd,
+                         asection *input_section,
+                         Elf_Internal_Rela *rello,
+                         bfd_byte *contents,
+                         bfd_vma value)
 {
   bfd_vma insn;
   reloc_howto_type *howto;
@@ -792,11 +754,10 @@ elf32_i860_relocate_pc26 (input_bfd, input_section, rello, contents, value)
 
 /* Specialized relocation handler for R_860_HIGHADJ.  */
 static bfd_reloc_status_type
-elf32_i860_relocate_highadj (input_bfd, rel, contents, value)
-     bfd *input_bfd;
-     Elf_Internal_Rela *rel;
-     bfd_byte *contents;
-     bfd_vma value;
+elf32_i860_relocate_highadj (bfd *input_bfd,
+                            Elf_Internal_Rela *rel,
+                            bfd_byte *contents,
+                            bfd_vma value)
 {
   bfd_vma insn;
 
@@ -815,13 +776,12 @@ elf32_i860_relocate_highadj (input_bfd, rel, contents, value)
 /* Perform a single relocation.  By default we use the standard BFD
    routines. However, we handle some specially.  */
 static bfd_reloc_status_type
-i860_final_link_relocate (howto, input_bfd, input_section, contents, rel, relocation)
-     reloc_howto_type *  howto;
-     bfd *               input_bfd;
-     asection *          input_section;
-     bfd_byte *          contents;
-     Elf_Internal_Rela * rel;
-     bfd_vma             relocation;
+i860_final_link_relocate (reloc_howto_type *howto,
+                         bfd *input_bfd,
+                         asection *input_section,
+                         bfd_byte *contents,
+                         Elf_Internal_Rela *rel,
+                         bfd_vma relocation)
 {
   return _bfd_final_link_relocate (howto, input_bfd, input_section,
                                   contents, rel->r_offset, relocation,
@@ -860,16 +820,14 @@ i860_final_link_relocate (howto, input_bfd, input_section, contents, rel, reloca
    section, which means that the addend must be adjusted
    accordingly.  */
 static bfd_boolean
-elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
-                            contents, relocs, local_syms, local_sections)
-     bfd *output_bfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     Elf_Internal_Rela *relocs;
-     Elf_Internal_Sym *local_syms;
-     asection **local_sections;
+elf32_i860_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
+                            struct bfd_link_info *info,
+                            bfd *input_bfd,
+                            asection *input_section,
+                            bfd_byte *contents,
+                            Elf_Internal_Rela *relocs,
+                            Elf_Internal_Sym *local_syms,
+                            asection **local_sections)
 {
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
@@ -1059,9 +1017,7 @@ elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
    ??? Do any other SVR4 compilers have this convention? If so, this should
    be added to the generic routine.  */
 static bfd_boolean
-elf32_i860_is_local_label_name (abfd, name)
-     bfd *abfd;
-     const char *name;
+elf32_i860_is_local_label_name (bfd *abfd, const char *name)
 {
   if (name[0] == '.' && name[1] == 'e' && name[2] == 'p' && name[3] == '.')
     return TRUE;
index 34773ce1a642c6b204f4ef758da76b2abc383114..7e955e9b1168df931319f98334da32be9f948236 100644 (file)
@@ -2091,6 +2091,16 @@ m32r_elf_check_relocs (abfd, info, sec, relocs)
 
   return TRUE;
 }
+
+static struct bfd_elf_special_section const m32r_elf_special_sections[]=
+{
+  { ".sdata",  0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".sbss",   0,      NULL,   0,
+    SHT_NOBITS,        SHF_ALLOC + SHF_WRITE },
+  { NULL,      0,      NULL,   0,
+    0,         0 }
+};
 \f
 #define ELF_ARCH               bfd_arch_m32r
 #define ELF_MACHINE_CODE       EM_M32R
@@ -2126,5 +2136,6 @@ m32r_elf_check_relocs (abfd, info, sec, relocs)
 #define bfd_elf32_bfd_merge_private_bfd_data   m32r_elf_merge_private_bfd_data
 #define bfd_elf32_bfd_set_private_flags                m32r_elf_set_private_flags
 #define bfd_elf32_bfd_print_private_bfd_data   m32r_elf_print_private_bfd_data
+#define elf_backend_special_sections           m32r_elf_special_sections
 
 #include "elf32-target.h"
index 038390745491e1209b5d66ebeab7ad4d75671f6b..b9d9bfc312f31b5bffa651214356be9848b830dd 100644 (file)
@@ -1281,6 +1281,25 @@ m68hc11_elf_relax_delete_bytes (abfd, sec, addr, count)
     }
 }
 
+/* Specific sections:
+   - The .page0 is a data section that is mapped in [0x0000..0x00FF].
+     Page0 accesses are faster on the M68HC11. Soft registers used by GCC-m6811
+     are located in .page0.
+   - The .vectors is the data section that represents the interrupt
+     vectors.  */
+static struct bfd_elf_special_section const elf32_m68hc11_special_sections[]=
+{
+  { ".eeprom",         0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".softregs",       0,      NULL,   0,
+    SHT_NOBITS,        SHF_ALLOC + SHF_WRITE },
+  { ".page0",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".vectors",                0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
 \f
 #define ELF_ARCH               bfd_arch_m68hc11
 #define ELF_MACHINE_CODE       EM_68HC11
@@ -1300,6 +1319,7 @@ m68hc11_elf_relax_delete_bytes (abfd, sec, addr, count)
 #define elf_backend_object_p   0
 #define elf_backend_final_write_processing     0
 #define elf_backend_can_gc_sections            1
+#define elf_backend_special_sections elf32_m68hc11_special_sections
 
 #define bfd_elf32_bfd_link_hash_table_create \
                                 m68hc11_elf_bfd_link_hash_table_create
index a3def112f1ffe71a2af260a7212df115a9026b53..7733f05f1fdb933d9240f3284773c88483ffb266 100644 (file)
@@ -512,11 +512,12 @@ elf32_m68hc11_size_stubs (output_bfd, stub_bfd, info, add_stub_section)
                   bfd_boolean is_far;
 
                   sym = local_syms + r_indx;
-                  hdr = elf_elfsections (input_bfd)[sym->st_shndx];
-                  sym_sec = hdr->bfd_section;
                   is_far = (sym && (sym->st_other & STO_M68HC12_FAR));
                   if (!is_far)
                     continue;
+
+                  hdr = elf_elfsections (input_bfd)[sym->st_shndx];
+                  sym_sec = hdr->bfd_section;
                   stub_name = (bfd_elf_string_from_elf_section
                                (input_bfd, symtab_hdr->sh_link,
                                 sym->st_name));
index e88f01d64be4b44a8f0f0efeb6735457a54c09f8..3f878cfaca93f54d6c03751cf76cf823ce025329 100644 (file)
@@ -681,6 +681,16 @@ mcore_elf_check_relocs (abfd, info, sec, relocs)
   return TRUE;
 }
 
+static struct bfd_elf_special_section const mcore_elf_special_sections[]=
+{
+  { ".ctors",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".dtors",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
+
 #define TARGET_BIG_SYM         bfd_elf32_mcore_big_vec
 #define TARGET_BIG_NAME                "elf32-mcore-big"
 #define TARGET_LITTLE_SYM       bfd_elf32_mcore_little_vec
@@ -699,6 +709,7 @@ mcore_elf_check_relocs (abfd, info, sec, relocs)
 #define elf_backend_gc_mark_hook               mcore_elf_gc_mark_hook
 #define elf_backend_gc_sweep_hook              mcore_elf_gc_sweep_hook
 #define elf_backend_check_relocs                mcore_elf_check_relocs
+#define elf_backend_special_sections           mcore_elf_special_sections
 
 #define elf_backend_can_gc_sections            1
 #define elf_backend_rela_normal                        1
index 2e1353fdf7ef8934dc7069308aa16d27aa26377f..dff4126e155ef99786dc7186640ae3756f2c7c99 100644 (file)
@@ -70,6 +70,72 @@ static bfd_reloc_status_type ppc_elf_unhandled_reloc
 #define DTP_OFFSET     0x8000
 
 \f
+/* Enumeration to specify the special section.  */
+enum elf_linker_section_enum
+{
+  LINKER_SECTION_SDATA,
+  LINKER_SECTION_SDATA2
+};
+
+/* Sections created by the linker.  */
+
+typedef struct elf_linker_section
+{
+  /* pointer to the section */
+  asection *section;
+  /* pointer to the relocations needed for this section */
+  asection *rel_section;
+  /* pointer to the created symbol hash value */
+  struct elf_link_hash_entry *sym_hash;
+  /* offset of symbol from beginning of section */
+  bfd_vma sym_offset;
+} elf_linker_section_t;
+
+/* Linked list of allocated pointer entries.  This hangs off of the
+   symbol lists, and provides allows us to return different pointers,
+   based on different addend's.  */
+
+typedef struct elf_linker_section_pointers
+{
+  /* next allocated pointer for this symbol */
+  struct elf_linker_section_pointers *next;
+  /* offset of pointer from beginning of section */
+  bfd_vma offset;
+  /* addend used */
+  bfd_vma addend;
+  /* which linker section this is */
+  elf_linker_section_t *lsect;
+  /* whether address was written yet */
+  bfd_boolean written_address_p;
+} elf_linker_section_pointers_t;
+
+struct ppc_elf_obj_tdata
+{
+  struct elf_obj_tdata elf;
+
+  /* A mapping from local symbols to offsets into the various linker
+     sections added.  This is index by the symbol index.  */
+  elf_linker_section_pointers_t **linker_section_pointers;
+};
+
+#define ppc_elf_tdata(bfd) \
+  ((struct ppc_elf_obj_tdata *) (bfd)->tdata.any)
+
+#define elf_local_ptr_offsets(bfd) \
+  (ppc_elf_tdata (bfd)->linker_section_pointers)
+
+/* Override the generic function because we store some extras.  */
+
+static bfd_boolean
+ppc_elf_mkobject (bfd *abfd)
+{
+  bfd_size_type amt = sizeof (struct ppc_elf_obj_tdata);
+  abfd->tdata.any = bfd_zalloc (abfd, amt);
+  if (abfd->tdata.any == NULL)
+    return FALSE;
+  return TRUE;
+}
+
 /* The PPC linker needs to keep track of the number of relocs that it
    decides to copy as dynamic relocs in check_relocs for each symbol.
    This is so that it can later discard them if they are found to be
@@ -96,6 +162,11 @@ struct ppc_elf_link_hash_entry
 {
   struct elf_link_hash_entry elf;
 
+  /* If this symbol is used in the linker created sections, the processor
+     specific backend uses this field to map the field into the offset
+     from the beginning of the section.  */
+  elf_linker_section_pointers_t *linker_section_pointer;
+
   /* Track dynamic relocs copied for this symbol.  */
   struct ppc_elf_dyn_relocs *dyn_relocs;
 
@@ -132,6 +203,7 @@ struct ppc_elf_link_hash_table
   asection *relsbss;
   elf_linker_section_t *sdata;
   elf_linker_section_t *sdata2;
+  asection *sbss;
 
   /* Short-cut to first output tls section.  */
   asection *tls_sec;
@@ -175,6 +247,7 @@ ppc_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
   entry = _bfd_elf_link_hash_newfunc (entry, table, string);
   if (entry != NULL)
     {
+      ppc_elf_hash_entry (entry)->linker_section_pointer = NULL;
       ppc_elf_hash_entry (entry)->dyn_relocs = NULL;
       ppc_elf_hash_entry (entry)->tls_mask = 0;
     }
@@ -189,7 +262,7 @@ ppc_elf_link_hash_table_create (bfd *abfd)
 {
   struct ppc_elf_link_hash_table *ret;
 
-  ret = bfd_malloc (sizeof (struct ppc_elf_link_hash_table));
+  ret = bfd_zmalloc (sizeof (struct ppc_elf_link_hash_table));
   if (ret == NULL)
     return NULL;
 
@@ -200,21 +273,6 @@ ppc_elf_link_hash_table_create (bfd *abfd)
       return NULL;
     }
 
-  ret->got = NULL;
-  ret->relgot = NULL;
-  ret->plt = NULL;
-  ret->relplt = NULL;
-  ret->dynbss = NULL;
-  ret->relbss = NULL;
-  ret->dynsbss = NULL;
-  ret->relsbss = NULL;
-  ret->sdata = NULL;
-  ret->sdata2 = NULL;
-  ret->tls_sec = NULL;
-  ret->tls_get_addr = NULL;
-  ret->tlsld_got.refcount = 0;
-  ret->sym_sec.abfd = NULL;
-
   return &ret->elf.root;
 }
 
@@ -1476,6 +1534,21 @@ static reloc_howto_type ppc_elf_howto_raw[] = {
         0xffff,                /* dst_mask */
         FALSE),                /* pcrel_offset */
 
+  /* Phony reloc to handle branch stubs.  */
+  HOWTO (R_PPC_RELAX32,         /* type */
+        0,                     /* rightshift */
+        0,                     /* size */
+        0,                     /* bitsize */
+        FALSE,                 /* pc_relative */
+        0,                     /* bitpos */
+        complain_overflow_dont, /* complain_on_overflow */
+        bfd_elf_generic_reloc, /* special_function */
+        "R_PPC_RELAX32",       /* name */
+        FALSE,                 /* partial_inplace */
+        0,                     /* src_mask */
+        0,                     /* dst_mask */
+        FALSE),                /* pcrel_offset */
+
   /* GNU extension to record C++ vtable hierarchy.  */
   HOWTO (R_PPC_GNU_VTINHERIT,  /* type */
         0,                     /* rightshift */
@@ -1541,286 +1614,423 @@ ppc_elf_howto_init (void)
     }
 }
 \f
-/* This function handles relaxing for the PPC with option --mpc860c0[=<n>].
-
-   The MPC860, revision C0 or earlier contains a bug in the die.
-   If all of the following conditions are true, the next instruction
-   to be executed *may* be treated as a no-op.
-   1/ A forward branch is executed.
-   2/ The branch is predicted as not taken.
-   3/ The branch is taken.
-   4/ The branch is located in the last 5 words of a page.
-      (The EOP limit is 5 by default but may be specified as any value
-      from 1-10.)
-
-   Our software solution is to detect these problematic branches in a
-   linker pass and modify them as follows:
-   1/ Unconditional branches - Since these are always predicted taken,
-      there is no problem and no action is required.
-   2/ Conditional backward branches - No problem, no action required.
-   3/ Conditional forward branches - Ensure that the "inverse prediction
-      bit" is set (ensure it is predicted taken).
-   4/ Conditional register branches - Ensure that the "y bit" is set
-      (ensure it is predicted taken).  */
-
-/* Sort sections by address.  */
-
-static int
-ppc_elf_sort_rela (const void *arg1, const void *arg2)
+static bfd_reloc_status_type
+ppc_elf_install_value (bfd *abfd,
+                      bfd_byte *hit_addr,
+                      bfd_vma v,
+                      unsigned int r_type)
 {
-  const Elf_Internal_Rela * const *rela1 = arg1;
-  const Elf_Internal_Rela * const *rela2 = arg2;
+  bfd_vma t0, t1;
+#ifdef BFD_HOST_U_64_BIT
+  BFD_HOST_U_64_BIT val = (BFD_HOST_U_64_BIT) v;
+#else
+  bfd_vma val = v;
+#endif
+
+  switch (r_type)
+    {
+    case R_PPC_RELAX32:
+      /* Do stuff here.  */
+      t0 = bfd_get_32 (abfd, hit_addr);
+      t1 = bfd_get_32 (abfd, hit_addr + 4);
+
+      /* We're clearing the bits for R_PPC_ADDR16_HA
+        and R_PPC_ADDR16_LO here.  */
+      t0 &= ~0xffff;
+      t1 &= ~0xffff;
+
+      /* t0 is HA, t1 is lo */
+      t0 |= ((val + 0x8000) >> 16) & 0xffff;
+      t1 |= val & 0xffff;
+
+      bfd_put_32 (abfd, t0, hit_addr);
+      bfd_put_32 (abfd, t1, hit_addr + 4);
+      break;
+
+    case R_PPC_REL24:
+      t0 = bfd_get_32 (abfd, hit_addr);
+      t0 &= ~0x3fffffc;
+      t0 |= val & 0x3fffffc;
+      bfd_put_32 (abfd, t0, hit_addr);
+      break;
+
+    case R_PPC_REL14:
+    case R_PPC_REL14_BRTAKEN:
+    case R_PPC_REL14_BRNTAKEN:
+      t0 = bfd_get_32 (abfd, hit_addr);
+      t0 &= ~0xfffc;
+      t0 |= val & 0xfffc;
+      bfd_put_32 (abfd, t0, hit_addr);
+      break;
 
-  /* Sort by offset.  */
-  return ((*rela1)->r_offset - (*rela2)->r_offset);
+    case R_PPC_LOCAL24PC:
+    case R_PPC_PLTREL24:
+      t0 = bfd_get_32 (abfd, hit_addr);
+      t0 &= ~0x3fffffc;
+      t0 |= val & 0x3fffffc;
+      bfd_put_32 (abfd, t0, hit_addr);
+      break;
+
+    default:
+      return bfd_reloc_notsupported;
+    }
+
+  return bfd_reloc_ok;
 }
 
+static const bfd_byte shared_stub_entry[] =
+  {
+    0x48, 0x00, 0x00, 0x24, /* b .+36 */
+    0x7c, 0x08, 0x02, 0xa6, /* mflr 0 */
+    0x42, 0x9f, 0x00, 0x05, /* bcl 20, 31, .Lxxx */
+    0x7d, 0x68, 0x02, 0xa6, /* mflr 11 */
+    0x3d, 0x60, 0x00, 0x00, /* addis 11, 11, (xxx-.Lxxx)@ha */
+    0x39, 0x6b, 0x00, 0x18, /* addi 11, 11, (xxx-.Lxxx)@l */
+    0x7c, 0x08, 0x03, 0xa6, /* mtlr 0 */
+    0x7d, 0x69, 0x03, 0xa6, /* mtctr 11 */
+    0x4e, 0x80, 0x04, 0x20, /* bctr */
+  };
+
+static const bfd_byte stub_entry[] =
+  {
+    0x48, 0x00, 0x00, 0x14, /* b .+20 */
+    0x3d, 0x60, 0x00, 0x00, /* lis 11,xxx@ha */
+    0x39, 0x6b, 0x00, 0x00, /* addi 11,11,xxx@l */
+    0x7d, 0x69, 0x03, 0xa6, /* mtctr 11 */
+    0x4e, 0x80, 0x04, 0x20, /* bctr */
+  };
+
+
 static bfd_boolean
 ppc_elf_relax_section (bfd *abfd,
                       asection *isec,
                       struct bfd_link_info *link_info,
                       bfd_boolean *again)
 {
-#define PAGESIZE 0x1000
+  struct one_fixup
+  {
+    struct one_fixup *next;
+    asection *tsec;
+    bfd_vma toff;
+    bfd_vma trampoff;
+  };
 
+  Elf_Internal_Shdr *symtab_hdr;
   bfd_byte *contents = NULL;
-  bfd_byte *free_contents = NULL;
+  Elf_Internal_Sym *isymbuf = NULL;
   Elf_Internal_Rela *internal_relocs = NULL;
-  Elf_Internal_Rela *free_relocs = NULL;
-  Elf_Internal_Rela **rela_comb = NULL;
-  int comb_curr, comb_count;
+  Elf_Internal_Rela *irel, *irelend;
+  struct one_fixup *fixups = NULL;
+  bfd_boolean changed_contents = FALSE;
+  bfd_boolean changed_relocs = FALSE;
+  struct ppc_elf_link_hash_table *ppc_info;
 
-  /* We never have to do this more than once per input section.  */
   *again = FALSE;
 
+  /* Nothing to do if there are no relocations and no need for
+     the relax finalize pass.  */
+  if ((isec->flags & SEC_RELOC) == 0
+      || isec->reloc_count == 0
+      || link_info->relax_finalizing)
+    return TRUE;
+
   /* If needed, initialize this section's cooked size.  */
   if (isec->_cooked_size == 0)
     isec->_cooked_size = isec->_raw_size;
 
-  /* We're only interested in text sections which overlap the
-     troublesome area at the end of a page.  */
-  if (link_info->mpc860c0 && (isec->flags & SEC_CODE) && isec->_cooked_size)
+  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+
+  /* Get a copy of the native relocations.  */
+  internal_relocs = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL,
+                                              link_info->keep_memory);
+  if (internal_relocs == NULL)
+    goto error_return;
+
+  ppc_info = ppc_elf_hash_table (link_info);
+  irelend = internal_relocs + isec->reloc_count;
+
+  /* Get the section contents.  */
+  /* Get cached copy if it exists.  */
+  if (elf_section_data (isec)->this_hdr.contents != NULL)
+    contents = elf_section_data (isec)->this_hdr.contents;
+  else
     {
-      bfd_vma dot, end_page, end_section;
-      bfd_boolean section_modified;
+      /* Go get them off disk.  */
+      contents = bfd_malloc (isec->_raw_size);
+      if (contents == NULL)
+       goto error_return;
 
-      /* Get the section contents.  */
-      /* Get cached copy if it exists.  */
-      if (elf_section_data (isec)->this_hdr.contents != NULL)
-       contents = elf_section_data (isec)->this_hdr.contents;
-      else
+      if (!bfd_get_section_contents (abfd, isec, contents, 0, isec->_raw_size))
+       goto error_return;
+    }
+
+  for (irel = internal_relocs; irel < irelend; irel++)
+    {
+      unsigned long r_type = ELF32_R_TYPE (irel->r_info);
+      bfd_vma symaddr, reladdr, trampoff, toff, roff;
+      asection *tsec;
+      bfd_size_type amt;
+      struct one_fixup *f;
+      size_t insn_offset = 0;
+      bfd_vma max_branch_offset;
+
+      switch (r_type)
        {
-         /* Go get them off disk.  */
-         contents = bfd_malloc (isec->_raw_size);
-         if (contents == NULL)
-           goto error_return;
-         free_contents = contents;
+       case R_PPC_REL24:
+       case R_PPC_LOCAL24PC:
+       case R_PPC_REL14:
+       case R_PPC_REL14_BRTAKEN:
+       case R_PPC_REL14_BRNTAKEN:
+       case R_PPC_PLTREL24:
+         break;
 
-         if (! bfd_get_section_contents (abfd, isec, contents,
-                                         (file_ptr) 0, isec->_raw_size))
-           goto error_return;
+       default:
+         continue;
        }
 
-      comb_curr = 0;
-      comb_count = 0;
-      if (isec->reloc_count)
+      /* Get the value of the symbol referred to by the reloc.  */
+      if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
        {
-         unsigned n;
-         bfd_size_type amt;
-
-         /* Get a copy of the native relocations.  */
-         internal_relocs
-           = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL,
-                                        link_info->keep_memory);
-         if (internal_relocs == NULL)
-           goto error_return;
-         if (! link_info->keep_memory)
-           free_relocs = internal_relocs;
-
-         /* Setup a faster access method for the reloc info we need.  */
-         amt = isec->reloc_count;
-         amt *= sizeof (Elf_Internal_Rela*);
-         rela_comb = bfd_malloc (amt);
-         if (rela_comb == NULL)
-           goto error_return;
-         for (n = 0; n < isec->reloc_count; ++n)
-           {
-             enum elf_ppc_reloc_type r_type;
+         /* A local symbol.  */
+         Elf_Internal_Sym *isym;
 
-             r_type = ELF32_R_TYPE (internal_relocs[n].r_info);
-             if (r_type >= R_PPC_max)
+         /* Read this BFD's local symbols.  */
+         if (isymbuf == NULL)
+           {
+             isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+             if (isymbuf == NULL)
+               isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+                                               symtab_hdr->sh_info, 0,
+                                               NULL, NULL, NULL);
+             if (isymbuf == 0)
                goto error_return;
-
-             /* Prologue constants are sometimes present in the ".text"
-                sections and they can be identified by their associated
-                relocation.  We don't want to process those words and
-                some others which can also be identified by their
-                relocations.  However, not all conditional branches will
-                have a relocation so we will only ignore words that
-                1) have a reloc, and 2) the reloc is not applicable to a
-                conditional branch.  The array rela_comb is built here
-                for use in the EOP scan loop.  */
-             switch (r_type)
-               {
-               case R_PPC_ADDR14_BRNTAKEN:
-               case R_PPC_REL14:
-               case R_PPC_REL14_BRNTAKEN:
-                 /* We should check the instruction.  */
-                 break;
-               default:
-                 /* The word is not a conditional branch - ignore it.  */
-                 rela_comb[comb_count++] = &internal_relocs[n];
-                 break;
-               }
            }
-         if (comb_count > 1)
-           qsort (rela_comb, (size_t) comb_count, sizeof (int),
-                  ppc_elf_sort_rela);
-       }
+         isym = isymbuf + ELF32_R_SYM (irel->r_info);
+         if (isym->st_shndx == SHN_UNDEF)
+           continue;   /* We can't do anthing with undefined symbols.  */
+         else if (isym->st_shndx == SHN_ABS)
+           tsec = bfd_abs_section_ptr;
+         else if (isym->st_shndx == SHN_COMMON)
+           tsec = bfd_com_section_ptr;
+         else
+           tsec = bfd_section_from_elf_index (abfd, isym->st_shndx);
 
-      /* Enumerate each EOP region that overlaps this section.  */
-      end_section = isec->vma + isec->_cooked_size;
-      dot = end_page = (isec->vma | (PAGESIZE - 1)) + 1;
-      dot -= link_info->mpc860c0;
-      section_modified = FALSE;
-      /* Increment the start position if this section begins in the
-        middle of its first EOP region.  */
-      if (dot < isec->vma)
-       dot = isec->vma;
-      for (;
-          dot < end_section;
-          dot += PAGESIZE, end_page += PAGESIZE)
+         toff = isym->st_value;
+       }
+      else
        {
-         /* Check each word in this EOP region.  */
-         for (; dot < end_page; dot += 4)
+         /* Need dynamic symbol handling.  */
+         unsigned long indx;
+         struct elf_link_hash_entry *h;
+
+         indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+         h = elf_sym_hashes (abfd)[indx];
+
+         while (h->root.type == bfd_link_hash_indirect
+                || h->root.type == bfd_link_hash_warning)
+           h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+         if (r_type == R_PPC_PLTREL24)
            {
-             bfd_vma isec_offset;
-             unsigned long insn;
-             bfd_boolean skip, modified;
-
-             /* Don't process this word if there is a relocation for it
-                and the relocation indicates the word is not a
-                conditional branch.  */
-             skip = FALSE;
-             isec_offset = dot - isec->vma;
-             for (; comb_curr<comb_count; ++comb_curr)
-               {
-                 bfd_vma r_offset;
+             Elf_Internal_Sym *isym;
 
-                 r_offset = rela_comb[comb_curr]->r_offset;
-                 if (r_offset >= isec_offset)
-                   {
-                     if (r_offset == isec_offset) skip = TRUE;
-                     break;
-                   }
-               }
-             if (skip) continue;
-
-             /* Check the current word for a problematic conditional
-                branch.  */
-#define BO0(insn) ((insn) & 0x02000000)
-#define BO2(insn) ((insn) & 0x00800000)
-#define BO4(insn) ((insn) & 0x00200000)
-             insn = (unsigned long) bfd_get_32 (abfd, contents + isec_offset);
-             modified = FALSE;
-             if ((insn & 0xFc000000) == 0x40000000)
+             if (h->plt.offset == (bfd_vma) -1
+                 || ppc_info->plt == NULL)
                {
-                 /* Instruction is BCx */
-                 if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
-                   {
-                     bfd_vma target;
-
-                     /* This branch is predicted as "normal".
-                        If this is a forward branch, it is problematic.  */
-                     target = insn & 0x0000Fffc;
-                     target = (target ^ 0x8000) - 0x8000;
-                     if ((insn & 0x00000002) == 0)
-                       /* Convert to abs.  */
-                       target += dot;
-                     if (target > dot)
-                       {
-                         /* Set the prediction bit.  */
-                         insn |= 0x00200000;
-                         modified = TRUE;
-                       }
-                   }
-               }
-             else if ((insn & 0xFc00Fffe) == 0x4c000420)
-               {
-                 /* Instruction is BCCTRx.  */
-                 if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
-                   {
-                     /* This branch is predicted as not-taken.
-                        If this is a forward branch, it is problematic.
-                        Since we can't tell statically if it will branch
-                        forward, always set the prediction bit.  */
-                     insn |= 0x00200000;
-                     modified = TRUE;
-                   }
-               }
-             else if ((insn & 0xFc00Fffe) == 0x4c000020)
-               {
-                 /* Instruction is BCLRx */
-                 if ((!BO0(insn) || !BO2(insn)) && !BO4(insn))
+
+                 /* Read this BFD's local symbols.  */
+                 if (isymbuf == NULL)
                    {
-                     /* This branch is predicted as not-taken.
-                        If this is a forward branch, it is problematic.
-                        Since we can't tell statically if it will branch
-                        forward, always set the prediction bit.  */
-                     insn |= 0x00200000;
-                     modified = TRUE;
+                     isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+                     if (isymbuf == NULL)
+                       isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+                                                       symtab_hdr->sh_info, 0,
+                                                       NULL, NULL, NULL);
+                     if (isymbuf == 0)
+                       goto error_return;
                    }
+                 isym = isymbuf + ELF32_R_SYM (irel->r_info);
+
+                 if (isym->st_shndx == SHN_UNDEF)
+                   /* We can't do anthing with undefined symbols.  */
+                   continue;
+                 else if (isym->st_shndx == SHN_ABS)
+                   tsec = bfd_abs_section_ptr;
+                 else if (isym->st_shndx == SHN_COMMON)
+                   tsec = bfd_com_section_ptr;
+                 else
+                   tsec = h->root.u.def.section;
+
+                 toff = h->root.u.def.value;
                }
-#undef BO0
-#undef BO2
-#undef BO4
-             if (modified)
+             else
                {
-                 bfd_put_32 (abfd, insn, contents + isec_offset);
-                 section_modified = TRUE;
+                 tsec = ppc_info->plt;
+                 toff = h->plt.offset;
                }
            }
+         else if (h->root.type == bfd_link_hash_undefined
+                  || h->root.type == bfd_link_hash_undefweak)
+           continue;
+
+         else
+           {
+             tsec = h->root.u.def.section;
+             toff = h->root.u.def.value;
+           }
        }
-      if (section_modified)
+
+      if (tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
+       toff = _bfd_merged_section_offset (abfd, &tsec,
+                                          elf_section_data (tsec)->sec_info,
+                                          toff + irel->r_addend, 0);
+      else
+       toff += irel->r_addend;
+
+      symaddr = tsec->output_section->vma + tsec->output_offset + toff;
+
+      roff = irel->r_offset;
+
+      reladdr = (isec->output_section->vma
+                + isec->output_offset
+                + roff) & (bfd_vma) -4;
+
+      /* If the branch is in range, no need to do anything.  */
+      max_branch_offset = 1 << 25;
+      if (r_type != R_PPC_REL24
+         && r_type != R_PPC_LOCAL24PC
+         && r_type != R_PPC_PLTREL24)
+       max_branch_offset = 1 << 15;
+
+      if ((bfd_vma) (symaddr - reladdr) + max_branch_offset
+         <= 2 * max_branch_offset)
+       continue;
+
+      /* If the branch and target are in the same section, you have
+        no hope.  We'll error out later.  */
+      if (tsec == isec)
+       continue;
+
+      /* Look for an existing fixup to this address.  */
+      for (f = fixups; f ; f = f->next)
+       if (f->tsec == tsec && f->toff == toff)
+         break;
+
+      if (f == NULL)
        {
-         elf_section_data (isec)->this_hdr.contents = contents;
-         free_contents = NULL;
+         size_t size;
+
+         if (link_info->shared
+             || tsec == ppc_info->plt
+             || r_type == R_PPC_LOCAL24PC)
+           {
+             size = sizeof (shared_stub_entry);
+             insn_offset = 16;
+           }
+         else
+           {
+             size = sizeof (stub_entry);
+             insn_offset = 4;
+           }
+
+         /* Resize the current section to make room for the new branch.  */
+         trampoff = (isec->_cooked_size + 3) & (bfd_vma) - 4;
+         amt = trampoff + size;
+         contents = bfd_realloc (contents, amt);
+         if (contents == NULL)
+           abort ();
+
+         isec->_cooked_size = amt;
+
+         if (link_info->shared
+             || tsec == ppc_info->plt
+             || r_type == R_PPC_LOCAL24PC)
+           memcpy (contents + trampoff, shared_stub_entry, size);
+         else
+           memcpy (contents + trampoff, stub_entry, size);
+
+         /* Hijack the old relocation.  Since we need two
+            relocations for this use a "composite" reloc.  */
+         irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+                                      R_PPC_RELAX32);
+         irel->r_offset = trampoff + insn_offset;
+
+         /* Record the fixup so we don't do it again this section.  */
+         f = bfd_malloc (sizeof (*f));
+         f->next = fixups;
+         f->tsec = tsec;
+         f->toff = toff;
+         f->trampoff = trampoff;
+         fixups = f;
+       }
+      else
+       {
+         /* Nop out the reloc, since we're finalizing things here.  */
+         irel->r_info = ELF32_R_INFO (0, R_PPC_NONE);
        }
+
+      /* Fix up the existing branch to hit the trampoline.  Hope like
+        hell this doesn't overflow too.  */
+      if (ppc_elf_install_value (abfd, contents + roff,
+                                f->trampoff - (roff & (bfd_vma) -3) + 4,
+                                r_type) != bfd_reloc_ok)
+       abort ();
+
+      changed_contents = TRUE;
+      changed_relocs = TRUE;
     }
 
-  if (rela_comb != NULL)
+  /* Clean up.  */
+  while (fixups)
     {
-      free (rela_comb);
-      rela_comb = NULL;
+      struct one_fixup *f = fixups;
+      fixups = fixups->next;
+      free (f);
     }
-
-  if (free_relocs != NULL)
+  if (isymbuf != NULL
+      && symtab_hdr->contents != (unsigned char *) isymbuf)
     {
-      free (free_relocs);
-      free_relocs = NULL;
+      if (! link_info->keep_memory)
+       free (isymbuf);
+      else
+       {
+         /* Cache the symbols for elf_link_input_bfd.  */
+         symtab_hdr->contents = (unsigned char *) isymbuf;
+       }
     }
 
-  if (free_contents != NULL)
+  if (contents != NULL
+      && elf_section_data (isec)->this_hdr.contents != contents)
     {
-      if (! link_info->keep_memory)
-       free (free_contents);
+      if (!changed_contents && !link_info->keep_memory)
+       free (contents);
       else
        {
          /* Cache the section contents for elf_link_input_bfd.  */
          elf_section_data (isec)->this_hdr.contents = contents;
        }
-      free_contents = NULL;
     }
 
+  if (elf_section_data (isec)->relocs != internal_relocs)
+    {
+      if (!changed_relocs)
+       free (internal_relocs);
+      else
+       elf_section_data (isec)->relocs = internal_relocs;
+    }
+
+  *again = changed_contents || changed_relocs;
   return TRUE;
 
  error_return:
-  if (rela_comb != NULL)
-    free (rela_comb);
-  if (free_relocs != NULL)
-    free (free_relocs);
-  if (free_contents != NULL)
-    free (free_contents);
+  if (isymbuf != NULL && (unsigned char *) isymbuf != symtab_hdr->contents)
+    free (isymbuf);
+  if (contents != NULL
+      && elf_section_data (isec)->this_hdr.contents != contents)
+    free (contents);
+  if (internal_relocs != NULL
+      && elf_section_data (isec)->relocs != internal_relocs)
+    free (internal_relocs);
   return FALSE;
 }
 \f
@@ -2169,71 +2379,359 @@ ppc_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
   return TRUE;
 }
 \f
+/* Find a linker generated pointer with a given addend and type.  */
+
+static elf_linker_section_pointers_t *
+elf_find_pointer_linker_section
+  (elf_linker_section_pointers_t *linker_pointers,
+   bfd_vma addend,
+   elf_linker_section_t *lsect)
+{
+  for ( ; linker_pointers != NULL; linker_pointers = linker_pointers->next)
+    if (lsect == linker_pointers->lsect && addend == linker_pointers->addend)
+      return linker_pointers;
+
+  return NULL;
+}
+\f
+/* Allocate a pointer to live in a linker created section.  */
+
+static bfd_boolean
+elf_create_pointer_linker_section (bfd *abfd,
+                                  struct bfd_link_info *info,
+                                  elf_linker_section_t *lsect,
+                                  struct elf_link_hash_entry *h,
+                                  const Elf_Internal_Rela *rel)
+{
+  elf_linker_section_pointers_t **ptr_linker_section_ptr = NULL;
+  elf_linker_section_pointers_t *linker_section_ptr;
+  unsigned long r_symndx = ELF32_R_SYM (rel->r_info);
+  bfd_size_type amt;
+
+  BFD_ASSERT (lsect != NULL);
+
+  /* Is this a global symbol?  */
+  if (h != NULL)
+    {
+      struct ppc_elf_link_hash_entry *eh;
+
+      /* Has this symbol already been allocated?  If so, our work is done.  */
+      eh = (struct ppc_elf_link_hash_entry *) h;
+      if (elf_find_pointer_linker_section (eh->linker_section_pointer,
+                                          rel->r_addend,
+                                          lsect))
+       return TRUE;
+
+      ptr_linker_section_ptr = &eh->linker_section_pointer;
+      /* Make sure this symbol is output as a dynamic symbol.  */
+      if (h->dynindx == -1)
+       {
+         if (! _bfd_elf_link_record_dynamic_symbol (info, h))
+           return FALSE;
+       }
+
+      if (lsect->rel_section)
+       lsect->rel_section->_raw_size += sizeof (Elf32_External_Rela);
+    }
+  else
+    {
+      /* Allocation of a pointer to a local symbol.  */
+      elf_linker_section_pointers_t **ptr = elf_local_ptr_offsets (abfd);
+
+      /* Allocate a table to hold the local symbols if first time.  */
+      if (!ptr)
+       {
+         unsigned int num_symbols = elf_tdata (abfd)->symtab_hdr.sh_info;
+
+         amt = num_symbols;
+         amt *= sizeof (elf_linker_section_pointers_t *);
+         ptr = bfd_zalloc (abfd, amt);
+
+         if (!ptr)
+           return FALSE;
+
+         elf_local_ptr_offsets (abfd) = ptr;
+       }
+
+      /* Has this symbol already been allocated?  If so, our work is done.  */
+      if (elf_find_pointer_linker_section (ptr[r_symndx],
+                                          rel->r_addend,
+                                          lsect))
+       return TRUE;
+
+      ptr_linker_section_ptr = &ptr[r_symndx];
+
+      if (info->shared)
+       {
+         /* If we are generating a shared object, we need to
+            output a R_<xxx>_RELATIVE reloc so that the
+            dynamic linker can adjust this GOT entry.  */
+         BFD_ASSERT (lsect->rel_section != NULL);
+         lsect->rel_section->_raw_size += sizeof (Elf32_External_Rela);
+       }
+    }
+
+  /* Allocate space for a pointer in the linker section, and allocate
+     a new pointer record from internal memory.  */
+  BFD_ASSERT (ptr_linker_section_ptr != NULL);
+  amt = sizeof (elf_linker_section_pointers_t);
+  linker_section_ptr = bfd_alloc (abfd, amt);
+
+  if (!linker_section_ptr)
+    return FALSE;
+
+  linker_section_ptr->next = *ptr_linker_section_ptr;
+  linker_section_ptr->addend = rel->r_addend;
+  linker_section_ptr->lsect = lsect;
+  linker_section_ptr->written_address_p = FALSE;
+  *ptr_linker_section_ptr = linker_section_ptr;
+
+  linker_section_ptr->offset = lsect->section->_raw_size;
+  lsect->section->_raw_size += 4;
+
+#ifdef DEBUG
+  fprintf (stderr,
+          "Create pointer in linker section %s, offset = %ld, section size = %ld\n",
+          lsect->name, (long) linker_section_ptr->offset,
+          (long) lsect->section->_raw_size);
+#endif
+
+  return TRUE;
+}
+\f
+#define bfd_put_ptr(BFD, VAL, ADDR) bfd_put_32 (BFD, VAL, ADDR)
+
+/* Fill in the address for a pointer generated in a linker section.  */
+
+static bfd_vma
+elf_finish_pointer_linker_section (bfd *output_bfd,
+                                  bfd *input_bfd,
+                                  struct bfd_link_info *info,
+                                  elf_linker_section_t *lsect,
+                                  struct elf_link_hash_entry *h,
+                                  bfd_vma relocation,
+                                  const Elf_Internal_Rela *rel,
+                                  int relative_reloc)
+{
+  elf_linker_section_pointers_t *linker_section_ptr;
+
+  BFD_ASSERT (lsect != NULL);
+
+  if (h != NULL)
+    {
+      /* Handle global symbol.  */
+      struct ppc_elf_link_hash_entry *eh;
+
+      eh = (struct ppc_elf_link_hash_entry *) h;
+      linker_section_ptr
+       = elf_find_pointer_linker_section (eh->linker_section_pointer,
+                                          rel->r_addend,
+                                          lsect);
+
+      BFD_ASSERT (linker_section_ptr != NULL);
+
+      if (! elf_hash_table (info)->dynamic_sections_created
+         || (info->shared
+             && info->symbolic
+             && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+       {
+         /* This is actually a static link, or it is a
+            -Bsymbolic link and the symbol is defined
+            locally.  We must initialize this entry in the
+            global section.
+
+            When doing a dynamic link, we create a .rela.<xxx>
+            relocation entry to initialize the value.  This
+            is done in the finish_dynamic_symbol routine.  */
+         if (!linker_section_ptr->written_address_p)
+           {
+             linker_section_ptr->written_address_p = TRUE;
+             bfd_put_ptr (output_bfd,
+                          relocation + linker_section_ptr->addend,
+                          (lsect->section->contents
+                           + linker_section_ptr->offset));
+           }
+       }
+    }
+  else
+    {
+      /* Handle local symbol.  */
+      unsigned long r_symndx = ELF32_R_SYM (rel->r_info);
+      BFD_ASSERT (elf_local_ptr_offsets (input_bfd) != NULL);
+      BFD_ASSERT (elf_local_ptr_offsets (input_bfd)[r_symndx] != NULL);
+      linker_section_ptr = (elf_find_pointer_linker_section
+                           (elf_local_ptr_offsets (input_bfd)[r_symndx],
+                            rel->r_addend,
+                            lsect));
+
+      BFD_ASSERT (linker_section_ptr != NULL);
+
+      /* Write out pointer if it hasn't been rewritten out before.  */
+      if (!linker_section_ptr->written_address_p)
+       {
+         linker_section_ptr->written_address_p = TRUE;
+         bfd_put_ptr (output_bfd, relocation + linker_section_ptr->addend,
+                      lsect->section->contents + linker_section_ptr->offset);
+
+         if (info->shared)
+           {
+             /* We need to generate a relative reloc for the dynamic
+                linker.  */
+
+             asection *srel = lsect->rel_section;
+             Elf_Internal_Rela outrel[MAX_INT_RELS_PER_EXT_REL];
+             bfd_byte *erel;
+             struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+             unsigned int i;
+
+             BFD_ASSERT (srel != NULL);
+
+             for (i = 0; i < bed->s->int_rels_per_ext_rel; i++)
+               {
+                 outrel[i].r_offset = (lsect->section->output_section->vma
+                                       + lsect->section->output_offset
+                                       + linker_section_ptr->offset);
+                 outrel[i].r_info = 0;
+                 outrel[i].r_addend = 0;
+               }
+             outrel[0].r_info = ELF32_R_INFO (0, relative_reloc);
+             erel = lsect->section->contents;
+             erel += (elf_section_data (lsect->section)->rel_count++
+                      * sizeof (Elf32_External_Rela));
+             bfd_elf32_swap_reloca_out (output_bfd, outrel, erel);
+           }
+       }
+    }
+
+  relocation = (lsect->section->output_offset
+               + linker_section_ptr->offset
+               - lsect->sym_offset);
+
+#ifdef DEBUG
+  fprintf (stderr,
+          "Finish pointer in linker section %s, offset = %ld (0x%lx)\n",
+          lsect->name, (long) relocation, (long) relocation);
+#endif
+
+  /* Subtract out the addend, because it will get added back in by the normal
+     processing.  */
+  return relocation - linker_section_ptr->addend;
+}
+\f
 /* Create a special linker section */
 static elf_linker_section_t *
 ppc_elf_create_linker_section (bfd *abfd,
                               struct bfd_link_info *info,
                               enum elf_linker_section_enum which)
 {
-  bfd *dynobj = elf_hash_table (info)->dynobj;
   elf_linker_section_t *lsect;
+  struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
+  asection *s;
+  bfd_size_type amt;
+  flagword flags;
+  const char *name;
+  const char *rel_name;
+  const char *sym_name;
+  bfd_vma sym_offset;
+
+  /* Both of these sections are (technically) created by the user
+     putting data in them, so they shouldn't be marked
+     SEC_LINKER_CREATED.
+
+     The linker creates them so it has somewhere to attach their
+     respective symbols. In fact, if they were empty it would
+     be OK to leave the symbol set to 0 (or any random number), because
+     the appropriate register should never be used.  */
+  flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY;
+  sym_offset = 32768;
+
+  switch (which)
+    {
+    default:
+      abort ();
+      return NULL;
+
+    case LINKER_SECTION_SDATA: /* .sdata/.sbss section */
+      name     = ".sdata";
+      rel_name = ".rela.sdata";
+      sym_name = "_SDA_BASE_";
+      break;
+
+    case LINKER_SECTION_SDATA2:        /* .sdata2/.sbss2 section */
+      name     = ".sdata2";
+      rel_name = ".rela.sdata2";
+      sym_name = "_SDA2_BASE_";
+      flags    |= SEC_READONLY;
+      break;
+    }
+
+  /* Record the first bfd that needs the special sections.  */
+  if (!htab->elf.dynobj)
+    htab->elf.dynobj = abfd;
+
+  amt = sizeof (elf_linker_section_t);
+  lsect = bfd_zalloc (htab->elf.dynobj, amt);
 
-  /* Record the first bfd section that needs the special section.  */
-  if (!dynobj)
-    dynobj = elf_hash_table (info)->dynobj = abfd;
+  lsect->sym_offset = sym_offset;
 
-  /* If this is the first time, create the section.  */
-  lsect = elf_linker_section (dynobj, which);
-  if (!lsect)
+  /* See if the sections already exist.  */
+  s = bfd_get_section_by_name (htab->elf.dynobj, name);
+  if (s == NULL || (s->flags & flags) != flags)
     {
-      elf_linker_section_t defaults;
-      static elf_linker_section_t zero_section;
-
-      defaults = zero_section;
-      defaults.which = which;
-      defaults.hole_written_p = FALSE;
-      defaults.alignment = 2;
-
-      /* Both of these sections are (technically) created by the user
-        putting data in them, so they shouldn't be marked
-        SEC_LINKER_CREATED.
-
-        The linker creates them so it has somewhere to attach their
-        respective symbols. In fact, if they were empty it would
-        be OK to leave the symbol set to 0 (or any random number), because
-        the appropriate register should never be used.  */
-      defaults.flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-                       | SEC_IN_MEMORY);
-
-      switch (which)
-       {
-       default:
-         (*_bfd_error_handler) (_("%s: unknown special linker type %d"),
-                                bfd_get_filename (abfd),
-                                (int) which);
+      s = bfd_make_section_anyway (htab->elf.dynobj, name);
+      if (s == NULL
+         || !bfd_set_section_flags (htab->elf.dynobj, s, flags))
+       return NULL;
+    }
+  lsect->section = s;
 
-         bfd_set_error (bfd_error_bad_value);
-         return NULL;
-
-       case LINKER_SECTION_SDATA:      /* .sdata/.sbss section */
-         defaults.name           = ".sdata";
-         defaults.rel_name       = ".rela.sdata";
-         defaults.bss_name       = ".sbss";
-         defaults.sym_name       = "_SDA_BASE_";
-         defaults.sym_offset     = 32768;
-         break;
+  if (bfd_get_section_alignment (htab->elf.dynobj, s) < 2
+      && !bfd_set_section_alignment (htab->elf.dynobj, s, 2))
+    return NULL;
 
-       case LINKER_SECTION_SDATA2:     /* .sdata2/.sbss2 section */
-         defaults.name           = ".sdata2";
-         defaults.rel_name       = ".rela.sdata2";
-         defaults.bss_name       = ".sbss2";
-         defaults.sym_name       = "_SDA2_BASE_";
-         defaults.sym_offset     = 32768;
-         defaults.flags         |= SEC_READONLY;
-         break;
-       }
+  s->_raw_size = align_power (s->_raw_size, 2);
 
-      lsect = _bfd_elf_create_linker_section (abfd, info, which, &defaults);
+#ifdef DEBUG
+  fprintf (stderr, "Creating section %s, current size = %ld\n",
+          name, (long) s->_raw_size);
+#endif
+
+  if (sym_name)
+    {
+      struct elf_link_hash_entry *h;
+      struct bfd_link_hash_entry *bh;
+
+#ifdef DEBUG
+      fprintf (stderr, "Adding %s to section %s\n", sym_name, name);
+#endif
+      bh = bfd_link_hash_lookup (info->hash, sym_name,
+                                FALSE, FALSE, FALSE);
+
+      if ((bh == NULL || bh->type == bfd_link_hash_undefined)
+         && !(_bfd_generic_link_add_one_symbol
+              (info, abfd, sym_name, BSF_GLOBAL, s, sym_offset, NULL,
+               FALSE, get_elf_backend_data (abfd)->collect, &bh)))
+       return NULL;
+      h = (struct elf_link_hash_entry *) bh;
+
+      h->type = STT_OBJECT;
+      lsect->sym_hash = h;
+
+      if (info->shared
+         && ! _bfd_elf_link_record_dynamic_symbol (info, h))
+       return NULL;
+    }
+
+  if (info->shared)
+    {
+      s = bfd_make_section_anyway (htab->elf.dynobj, rel_name);
+      lsect->rel_section = s;
+      flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+              | SEC_LINKER_CREATED | SEC_READONLY);
+      if (s == NULL
+         || ! bfd_set_section_flags (htab->elf.dynobj, s, flags)
+         || ! bfd_set_section_alignment (htab->elf.dynobj, s, 2))
+       return NULL;
     }
 
   return lsect;
@@ -2318,7 +2816,10 @@ ppc_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
   asection *s;
   flagword flags;
 
-  if (!ppc_elf_create_got (abfd, info))
+  htab = ppc_elf_hash_table (info);
+
+  if (htab->got == NULL
+      && !ppc_elf_create_got (abfd, info))
     return FALSE;
 
   if (!_bfd_elf_create_dynamic_sections (abfd, info))
@@ -2327,7 +2828,6 @@ ppc_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
   flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
           | SEC_LINKER_CREATED);
 
-  htab = ppc_elf_hash_table (info);
   htab->dynbss = bfd_get_section_by_name (abfd, ".dynbss");
   htab->dynsbss = s = bfd_make_section (abfd, ".dynsbss");
   if (s == NULL
@@ -3103,20 +3603,16 @@ ppc_elf_check_relocs (bfd *abfd,
   htab = ppc_elf_hash_table (info);
   if (htab->sdata == NULL)
     {
-      htab->sdata = elf_linker_section (abfd, LINKER_SECTION_SDATA);
-      if (htab->sdata == NULL)
-       htab->sdata = ppc_elf_create_linker_section (abfd, info,
-                                                    LINKER_SECTION_SDATA);
+      htab->sdata = ppc_elf_create_linker_section (abfd, info,
+                                                  LINKER_SECTION_SDATA);
       if (htab->sdata == NULL)
        return FALSE;
     }
 
   if (htab->sdata2 == NULL)
     {
-      htab->sdata2 = elf_linker_section (abfd, LINKER_SECTION_SDATA2);
-      if (htab->sdata2 == NULL)
-       htab->sdata2 = ppc_elf_create_linker_section (abfd, info,
-                                                     LINKER_SECTION_SDATA2);
+      htab->sdata2 = ppc_elf_create_linker_section (abfd, info,
+                                                   LINKER_SECTION_SDATA2);
       if (htab->sdata2 == NULL)
        return FALSE;
     }
@@ -3220,8 +3716,8 @@ ppc_elf_check_relocs (bfd *abfd,
              bad_shared_reloc (abfd, r_type);
              return FALSE;
            }
-         if (!bfd_elf32_create_pointer_linker_section (abfd, info,
-                                                       htab->sdata, h, rel))
+         if (!elf_create_pointer_linker_section (abfd, info,
+                                                 htab->sdata, h, rel))
            return FALSE;
          break;
 
@@ -3232,8 +3728,8 @@ ppc_elf_check_relocs (bfd *abfd,
              bad_shared_reloc (abfd, r_type);
              return FALSE;
            }
-         if (!bfd_elf32_create_pointer_linker_section (abfd, info,
-                                                       htab->sdata2, h, rel))
+         if (!elf_create_pointer_linker_section (abfd, info,
+                                                 htab->sdata2, h, rel))
            return FALSE;
          break;
 
@@ -3916,42 +4412,25 @@ ppc_elf_add_symbol_hook (bfd *abfd,
   if (sym->st_shndx == SHN_COMMON
       && !info->relocatable
       && sym->st_size <= elf_gp_size (abfd)
-      && info->hash->creator->flavour == bfd_target_elf_flavour)
+      && (info->hash->creator == abfd->xvec
+         || info->hash->creator == abfd->xvec->alternative_target))
     {
       /* Common symbols less than or equal to -G nn bytes are automatically
-        put into .sdata.  */
-      elf_linker_section_t *sdata
-       = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA);
+        put into .sbss.  */
+      struct ppc_elf_link_hash_table *htab;
 
-      if (!sdata->bss_section)
+      htab = ppc_elf_hash_table (info);
+      if (htab->sbss == NULL)
        {
-         bfd_size_type amt;
-
-         /* We don't go through bfd_make_section, because we don't
-            want to attach this common section to DYNOBJ.  The linker
-            will move the symbols to the appropriate output section
-            when it defines common symbols.  */
-         amt = sizeof (asection);
-         sdata->bss_section = bfd_zalloc (abfd, amt);
-         if (sdata->bss_section == NULL)
-           return FALSE;
-         sdata->bss_section->name = sdata->bss_name;
-         sdata->bss_section->flags = SEC_IS_COMMON;
-         sdata->bss_section->output_section = sdata->bss_section;
-         amt = sizeof (asymbol);
-         sdata->bss_section->symbol = bfd_zalloc (abfd, amt);
-         amt = sizeof (asymbol *);
-         sdata->bss_section->symbol_ptr_ptr = bfd_zalloc (abfd, amt);
-         if (sdata->bss_section->symbol == NULL
-             || sdata->bss_section->symbol_ptr_ptr == NULL)
+         flagword flags = SEC_IS_COMMON;
+
+         htab->sbss = bfd_make_section_anyway (abfd, ".sbss");
+         if (htab->sbss == NULL
+             || ! bfd_set_section_flags (abfd, htab->sbss, flags))
            return FALSE;
-         sdata->bss_section->symbol->name = sdata->bss_name;
-         sdata->bss_section->symbol->flags = BSF_SECTION_SYM;
-         sdata->bss_section->symbol->section = sdata->bss_section;
-         *sdata->bss_section->symbol_ptr_ptr = sdata->bss_section->symbol;
        }
 
-      *secp = sdata->bss_section;
+      *secp = htab->sbss;
       *valp = sym->st_size;
     }
 
@@ -4272,7 +4751,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            ;
-         else if (info->shared
+         else if (!info->executable
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            ;
@@ -4848,9 +5327,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
        case R_PPC_REL14_BRNTAKEN:
          /* If these relocations are not to a named symbol, they can be
             handled right here, no need to bother the dynamic linker.  */
-         if (h == NULL
-             || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
-             || SYMBOL_REFERENCES_LOCAL (info, h))
+         if (SYMBOL_REFERENCES_LOCAL (info, h)
+             || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0)
            break;
          /* fall through */
 
@@ -4880,8 +5358,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
                   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
                   || h->root.type != bfd_link_hash_undefweak)
               && (MUST_BE_DYN_RELOC (r_type)
-                  || (h != NULL
-                      && !SYMBOL_CALLS_LOCAL (info, h))))
+                  || !SYMBOL_CALLS_LOCAL (info, h)))
              || (ELIMINATE_COPY_RELOCS
                  && !info->shared
                  && (input_section->flags & SEC_ALLOC) != 0
@@ -4936,8 +5413,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
 
              if (skip)
                memset (&outrel, 0, sizeof outrel);
-             else if (h != NULL
-                      && !SYMBOL_REFERENCES_LOCAL (info, h))
+             else if (!SYMBOL_REFERENCES_LOCAL (info, h))
                {
                  unresolved_reloc = FALSE;
                  outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
@@ -5004,24 +5480,95 @@ ppc_elf_relocate_section (bfd *output_bfd,
            }
          break;
 
+       case R_PPC_RELAX32:
+         {
+           unsigned long r_symndx;
+           Elf_Internal_Sym *sym;
+           asection *sym_sec;
+           bfd_byte *hit_addr = 0;
+           bfd_vma value = 0;
+
+           r_symndx = ELF32_R_SYM (rel->r_info);
+
+           if (r_symndx < symtab_hdr->sh_info)
+             {
+               sym = local_syms + r_symndx;
+               sym_sec = local_sections[r_symndx];
+
+               value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
+             }
+           else
+             {
+               long indx;
+
+               indx = r_symndx - symtab_hdr->sh_info;
+               h = elf_sym_hashes (input_bfd)[indx];
+               while (h->root.type == bfd_link_hash_indirect
+                || h->root.type == bfd_link_hash_warning)
+                 h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+               value = 0;
+               if (h->root.type == bfd_link_hash_defined
+                   || h->root.type == bfd_link_hash_defweak)
+                 {
+                   sym_sec = h->root.u.def.section;
+
+                   /* Detect the cases that sym_sec->output_section is
+                      expected to be NULL -- all cases in which the symbol
+                      is defined in another shared module.  This includes
+                      PLT relocs for which we've created a PLT entry and
+                      other relocs for which we're prepared to create
+                      dynamic relocations.  */
+                   /* ??? Just accept it NULL and continue.  */
+
+                   if (sym_sec->output_section != NULL)
+                     {
+                       value = (h->root.u.def.value
+                                + sym_sec->output_section->vma
+                                + sym_sec->output_offset);
+                     }
+                 }
+               else if (info->shared
+                        && !info->no_undefined
+                        && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+                 ;
+               else
+                 {
+                   if (! ((*info->callbacks->undefined_symbol)
+                          (info, h->root.root.string, input_bfd,
+                           input_section, rel->r_offset,
+                           (!info->shared || info->no_undefined
+                            || ELF_ST_VISIBILITY (h->other)))))
+                     return FALSE;
+                   continue;
+                 }
+             }
+           hit_addr = contents + rel->r_offset;
+           value += rel->r_addend;
+
+           r = ppc_elf_install_value (output_bfd, hit_addr, value, r_type);
+           if (r != bfd_reloc_ok)
+             break;
+           else
+             continue;
+         }
+
          /* Indirect .sdata relocation.  */
        case R_PPC_EMB_SDAI16:
          BFD_ASSERT (htab->sdata != NULL);
          relocation
-           = bfd_elf32_finish_pointer_linker_section (output_bfd, input_bfd,
-                                                      info, htab->sdata, h,
-                                                      relocation, rel,
-                                                      R_PPC_RELATIVE);
+           = elf_finish_pointer_linker_section (output_bfd, input_bfd, info,
+                                                htab->sdata, h, relocation,
+                                                rel, R_PPC_RELATIVE);
          break;
 
          /* Indirect .sdata2 relocation.  */
        case R_PPC_EMB_SDA2I16:
          BFD_ASSERT (htab->sdata2 != NULL);
          relocation
-           = bfd_elf32_finish_pointer_linker_section (output_bfd, input_bfd,
-                                                      info, htab->sdata2, h,
-                                                      relocation, rel,
-                                                      R_PPC_RELATIVE);
+           = elf_finish_pointer_linker_section (output_bfd, input_bfd, info,
+                                                htab->sdata2, h, relocation,
+                                                rel, R_PPC_RELATIVE);
          break;
 
          /* Handle the TOC16 reloc.  We want to use the offset within the .got
@@ -5694,6 +6241,35 @@ ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
 
   apuinfo_list_finish ();
 }
+
+/* Add extra PPC sections -- Note, for now, make .sbss2 and
+   .PPC.EMB.sbss0 a normal section, and not a bss section so
+   that the linker doesn't crater when trying to make more than
+   2 sections.  */
+
+static struct bfd_elf_special_section const ppc_elf_special_sections[]=
+{
+  { ".tags",           0,      NULL,   0,
+    SHT_ORDERED,       SHF_ALLOC },
+  { ".sdata",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".sbss",           0,      NULL,   0,
+    SHT_NOBITS,                SHF_ALLOC + SHF_WRITE },
+  { ".sdata2",         0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC },
+  { ".sbss2",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC },
+  { ".PPC.EMB.apuinfo",        0,      NULL,   0,
+    SHT_NOTE,          0 },
+  { ".PPC.EMB.sdata0", 0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC },
+  { ".PPC.EMB.sbss0",  0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC },
+  { ".plt",            0,      NULL,   0,
+    SHT_NOBITS,                0 },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
 \f
 #define TARGET_LITTLE_SYM      bfd_elf32_powerpcle_vec
 #define TARGET_LITTLE_NAME     "elf32-powerpcle"
@@ -5701,7 +6277,11 @@ ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
 #define TARGET_BIG_NAME                "elf32-powerpc"
 #define ELF_ARCH               bfd_arch_powerpc
 #define ELF_MACHINE_CODE       EM_PPC
+#ifdef __QNXTARGET__
+#define ELF_MAXPAGESIZE                0x1000
+#else
 #define ELF_MAXPAGESIZE                0x10000
+#endif
 #define elf_info_to_howto      ppc_elf_info_to_howto
 
 #ifdef  EM_CYGNUS_POWERPC
@@ -5720,6 +6300,7 @@ ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
 #define elf_backend_plt_header_size    PLT_INITIAL_ENTRY_SIZE
 #define elf_backend_rela_normal                1
 
+#define bfd_elf32_mkobject                     ppc_elf_mkobject
 #define bfd_elf32_bfd_merge_private_bfd_data   ppc_elf_merge_private_bfd_data
 #define bfd_elf32_bfd_relax_section            ppc_elf_relax_section
 #define bfd_elf32_bfd_reloc_type_lookup                ppc_elf_reloc_type_lookup
@@ -5748,5 +6329,6 @@ ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
 #define elf_backend_begin_write_processing     ppc_elf_begin_write_processing
 #define elf_backend_final_write_processing     ppc_elf_final_write_processing
 #define elf_backend_write_section              ppc_elf_write_section
+#define elf_backend_special_sections           ppc_elf_special_sections
 
 #include "elf32-target.h"
index 50d430dba99bceb6cf3e65b81d53ef98f7183794..1ce327f96d8168c6dd569d4d6933f3bf432675f7 100644 (file)
@@ -88,6 +88,8 @@ static bfd_vma tpoff
   PARAMS ((struct bfd_link_info *, bfd_vma));
 static void invalid_tls_insn
   PARAMS ((bfd *, asection *, Elf_Internal_Rela *));
+static bfd_reloc_status_type s390_elf_ldisp_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
 
 #include "elf/s390.h"
 
@@ -119,7 +121,7 @@ static reloc_howto_type elf_howto_table[] =
        bfd_elf_generic_reloc, "R_390_32",       FALSE, 0,0xffffffff, FALSE),
   HOWTO(R_390_PC32,     0, 2, 32,  TRUE, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_390_PC32",     FALSE, 0,0xffffffff, TRUE),
-  HOWTO(R_390_GOT12,    0, 1, 12, FALSE, 0, complain_overflow_dont,
+  HOWTO(R_390_GOT12,    0, 1, 12, FALSE, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_390_GOT12",    FALSE, 0,0x00000fff, FALSE),
   HOWTO(R_390_GOT32,    0, 2, 32, FALSE, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_390_GOT32",    FALSE, 0,0xffffffff, FALSE),
@@ -208,6 +210,14 @@ static reloc_howto_type elf_howto_table[] =
        bfd_elf_generic_reloc, "R_390_TLS_DTPOFF", FALSE, 0, 0xffffffff, FALSE),
   HOWTO(R_390_TLS_TPOFF, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_390_TLS_TPOFF", FALSE, 0, 0xffffffff, FALSE),
+  HOWTO(R_390_20,        0, 2, 20, FALSE, 8, complain_overflow_dont,
+       s390_elf_ldisp_reloc, "R_390_20",      FALSE, 0,0x0fffff00, FALSE),
+  HOWTO(R_390_GOT20,    0, 2, 20, FALSE, 8, complain_overflow_dont,
+       s390_elf_ldisp_reloc, "R_390_GOT20",   FALSE, 0,0x0fffff00, FALSE),
+  HOWTO(R_390_GOTPLT20,  0, 2, 20, FALSE, 8, complain_overflow_dont,
+       s390_elf_ldisp_reloc, "R_390_GOTPLT20", FALSE, 0,0x0fffff00, FALSE),
+  HOWTO(R_390_TLS_GOTIE20, 0, 2, 20, FALSE, 8, complain_overflow_dont,
+       s390_elf_ldisp_reloc, "R_390_TLS_GOTIE20", FALSE, 0,0x0fffff00, FALSE),
 };
 
 /* GNU extension to record C++ vtable hierarchy.  */
@@ -313,6 +323,14 @@ elf_s390_reloc_type_lookup (abfd, code)
       return &elf_howto_table[(int) R_390_TLS_DTPOFF];
     case BFD_RELOC_390_TLS_TPOFF:
       return &elf_howto_table[(int) R_390_TLS_TPOFF];
+    case BFD_RELOC_390_20:
+      return &elf_howto_table[(int) R_390_20];
+    case BFD_RELOC_390_GOT20:
+      return &elf_howto_table[(int) R_390_GOT20];
+    case BFD_RELOC_390_GOTPLT20:
+      return &elf_howto_table[(int) R_390_GOTPLT20];
+    case BFD_RELOC_390_TLS_GOTIE20:
+      return &elf_howto_table[(int) R_390_TLS_GOTIE20];
     case BFD_RELOC_VTABLE_INHERIT:
       return &elf32_s390_vtinherit_howto;
     case BFD_RELOC_VTABLE_ENTRY:
@@ -365,6 +383,59 @@ s390_tls_reloc (abfd, reloc_entry, symbol, data, input_section,
   return bfd_reloc_ok;
 }
 
+/* Handle the large displacement relocs.  */
+static bfd_reloc_status_type
+s390_elf_ldisp_reloc (abfd, reloc_entry, symbol, data, input_section,
+                      output_bfd, error_message)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     arelent *reloc_entry;
+     asymbol *symbol;
+     PTR data ATTRIBUTE_UNUSED;
+     asection *input_section;
+     bfd *output_bfd;
+     char **error_message ATTRIBUTE_UNUSED;
+{
+  reloc_howto_type *howto = reloc_entry->howto;
+  bfd_vma relocation;
+  bfd_vma insn;
+  
+  if (output_bfd != (bfd *) NULL
+      && (symbol->flags & BSF_SECTION_SYM) == 0
+      && (! howto->partial_inplace
+         || reloc_entry->addend == 0))
+    {
+      reloc_entry->address += input_section->output_offset;
+      return bfd_reloc_ok;
+    }
+  
+  if (output_bfd != NULL)
+    return bfd_reloc_continue;
+  
+  if (reloc_entry->address > input_section->_cooked_size)
+    return bfd_reloc_outofrange;
+  
+  relocation = (symbol->value
+               + symbol->section->output_section->vma
+               + symbol->section->output_offset);
+  relocation += reloc_entry->addend;
+  if (howto->pc_relative)
+    {
+      relocation -= (input_section->output_section->vma
+                    + input_section->output_offset);
+      relocation -= reloc_entry->address;
+    }
+  
+  insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+  insn |= (relocation & 0xfff) << 16 | (relocation & 0xff000) >> 4;
+  bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
+  
+  if ((bfd_signed_vma) relocation < - 0x80000
+      || (bfd_signed_vma) relocation > 0x7ffff)
+    return bfd_reloc_overflow;
+  else
+    return bfd_reloc_ok;
+}
+
 static bfd_boolean
 elf_s390_is_local_label_name (abfd, name)
      bfd *abfd;
@@ -936,14 +1007,17 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
        {
        case R_390_GOT12:
        case R_390_GOT16:
+       case R_390_GOT20:
        case R_390_GOT32:
        case R_390_GOTENT:
        case R_390_GOTPLT12:
        case R_390_GOTPLT16:
+       case R_390_GOTPLT20:
        case R_390_GOTPLT32:
        case R_390_GOTPLTENT:
        case R_390_TLS_GD32:
        case R_390_TLS_GOTIE12:
+       case R_390_TLS_GOTIE20:
        case R_390_TLS_GOTIE32:
        case R_390_TLS_IEENT:
        case R_390_TLS_IE32:
@@ -1009,6 +1083,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
 
        case R_390_GOTPLT12:
        case R_390_GOTPLT16:
+       case R_390_GOTPLT20:
        case R_390_GOTPLT32:
        case R_390_GOTPLTENT:
          /* This symbol requires either a procedure linkage table entry
@@ -1035,6 +1110,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
 
        case R_390_TLS_IE32:
        case R_390_TLS_GOTIE12:
+       case R_390_TLS_GOTIE20:
        case R_390_TLS_GOTIE32:
        case R_390_TLS_IEENT:
          if (info->shared)
@@ -1043,6 +1119,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
 
        case R_390_GOT12:
        case R_390_GOT16:
+       case R_390_GOT20:
        case R_390_GOT32:
        case R_390_GOTENT:
        case R_390_TLS_GD32:
@@ -1052,6 +1129,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
            default:
            case R_390_GOT12:
            case R_390_GOT16:
+           case R_390_GOT20:
            case R_390_GOT32:
            case R_390_GOTENT:
              tls_type = GOT_NORMAL;
@@ -1064,6 +1142,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
              tls_type = GOT_TLS_IE;
              break;
            case R_390_TLS_GOTIE12:
+           case R_390_TLS_GOTIE20:
            case R_390_TLS_IEENT:
              tls_type = GOT_TLS_IE_NLT;
              break;
@@ -1390,10 +1469,12 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
        case R_390_TLS_GD32:
        case R_390_TLS_IE32:
        case R_390_TLS_GOTIE12:
+       case R_390_TLS_GOTIE20:
        case R_390_TLS_GOTIE32:
        case R_390_TLS_IEENT:
        case R_390_GOT12:
        case R_390_GOT16:
+       case R_390_GOT20:
        case R_390_GOT32:
        case R_390_GOTOFF16:
        case R_390_GOTOFF32:
@@ -1415,6 +1496,7 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
        case R_390_8:
        case R_390_12:
        case R_390_16:
+       case R_390_20:
        case R_390_32:
        case R_390_PC16:
        case R_390_PC16DBL:
@@ -1438,6 +1520,7 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
 
        case R_390_GOTPLT12:
        case R_390_GOTPLT16:
+       case R_390_GOTPLT20:
        case R_390_GOTPLT32:
        case R_390_GOTPLTENT:
          if (h != NULL)
@@ -2273,7 +2356,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared
+         else if (!info->executable
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
@@ -2293,6 +2376,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
        {
        case R_390_GOTPLT12:
        case R_390_GOTPLT16:
+       case R_390_GOTPLT20:
        case R_390_GOTPLT32:
        case R_390_GOTPLTENT:
          /* There are three cases for a GOTPLT relocation. 1) The
@@ -2326,6 +2410,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
 
        case R_390_GOT12:
        case R_390_GOT16:
+       case R_390_GOT20:
        case R_390_GOT32:
        case R_390_GOTENT:
          /* Relocation is to the entry for this symbol in the global
@@ -2732,6 +2817,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
          break;
 
        case R_390_TLS_GOTIE12:
+       case R_390_TLS_GOTIE20:
        case R_390_TLS_IEENT:
          if (h == NULL)
            {
@@ -2939,9 +3025,21 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
           (long) rel->r_offset,
           h->root.root.string);
 
-      r = _bfd_final_link_relocate (howto, input_bfd, input_section,
-                                   contents, rel->r_offset,
-                                   relocation, rel->r_addend);
+      if (r_type == R_390_20
+         || r_type == R_390_GOT20
+         || r_type == R_390_GOTPLT20
+         || r_type == R_390_TLS_GOTIE20)
+       {
+         relocation += rel->r_addend;
+         relocation = (relocation&0xfff) << 8 | (relocation&0xff000) >> 12;
+         r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+                                       contents, rel->r_offset,
+                                       relocation, 0);
+       }
+      else
+       r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+                                     contents, rel->r_offset,
+                                     relocation, rel->r_addend);
 
       if (r != bfd_reloc_ok)
        {
index af8dd6718a65c70358b6c2546e928ac24055f89d..541786581d6ca1ff9cfc1f871d32407893eb1829 100644 (file)
 #include "elf/sh.h"
 
 static bfd_reloc_status_type sh_elf_reloc
-  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+  (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
 static bfd_reloc_status_type sh_elf_ignore_reloc
-  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+  (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
 static reloc_howto_type *sh_elf_reloc_type_lookup
-  PARAMS ((bfd *, bfd_reloc_code_real_type));
+  (bfd *, bfd_reloc_code_real_type);
 static void sh_elf_info_to_howto
-  PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+  (bfd *, arelent *, Elf_Internal_Rela *);
 static bfd_boolean sh_elf_set_private_flags
-  PARAMS ((bfd *, flagword));
+  (bfd *, flagword);
 static bfd_boolean sh_elf_copy_private_data
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 static bfd_boolean sh_elf_merge_private_data
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 static bfd_boolean sh_elf_set_mach_from_flags
-  PARAMS ((bfd *));
+  (bfd *);
 static bfd_boolean sh_elf_relax_section
-  PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+  (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
 static bfd_boolean sh_elf_relax_delete_bytes
-  PARAMS ((bfd *, asection *, bfd_vma, int));
+  (bfd *, asection *, bfd_vma, int);
 static bfd_boolean sh_elf_align_loads
-  PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_boolean *));
+  (bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_boolean *);
 static bfd_boolean sh_elf_swap_insns
-  PARAMS ((bfd *, asection *, PTR, bfd_byte *, bfd_vma));
+  (bfd *, asection *, void *, bfd_byte *, bfd_vma);
 static bfd_boolean sh_elf_relocate_section
-  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
-          Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+  (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+   Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
 static bfd_byte *sh_elf_get_relocated_section_contents
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
-          bfd_byte *, bfd_boolean, asymbol **));
+  (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
+   bfd_boolean, asymbol **);
 static void sh_elf_copy_indirect_symbol
-  PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
-          struct elf_link_hash_entry *));
+  (struct elf_backend_data *, struct elf_link_hash_entry *,
+   struct elf_link_hash_entry *);
 static int sh_elf_optimized_tls_reloc
-  PARAMS ((struct bfd_link_info *, int, int));
+  (struct bfd_link_info *, int, int);
 static bfd_boolean sh_elf_mkobject
-  PARAMS ((bfd *));
+  (bfd *);
 static bfd_boolean sh_elf_object_p
-  PARAMS ((bfd *));
+  (bfd *);
 static bfd_boolean sh_elf_check_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          const Elf_Internal_Rela *));
+  (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
 static struct bfd_hash_entry *sh_elf_link_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+  (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
 static struct bfd_link_hash_table *sh_elf_link_hash_table_create
-  PARAMS ((bfd *));
+  (bfd *);
 static bfd_boolean sh_elf_adjust_dynamic_symbol
-  PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+  (struct bfd_link_info *, struct elf_link_hash_entry *);
 static bfd_boolean sh_elf_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 static bfd_boolean sh_elf_finish_dynamic_symbol
-  PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
-          Elf_Internal_Sym *));
+  (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+   Elf_Internal_Sym *);
 static bfd_boolean sh_elf_finish_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 static bfd_reloc_status_type sh_elf_reloc_loop
-  PARAMS ((int, bfd *, asection *, bfd_byte *, bfd_vma, asection *,
-          bfd_vma, bfd_vma));
+  (int, bfd *, asection *, bfd_byte *, bfd_vma, asection *, bfd_vma,
+   bfd_vma);
 static bfd_boolean create_got_section
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 static bfd_boolean sh_elf_create_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 static bfd_vma dtpoff_base
-  PARAMS ((struct bfd_link_info *));
+  (struct bfd_link_info *);
 static bfd_vma tpoff
-  PARAMS ((struct bfd_link_info *, bfd_vma));
+  (struct bfd_link_info *, bfd_vma);
 static asection * sh_elf_gc_mark_hook
-  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
-          struct elf_link_hash_entry *, Elf_Internal_Sym *));
+  (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+   struct elf_link_hash_entry *, Elf_Internal_Sym *);
 static bfd_boolean sh_elf_gc_sweep_hook
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          const Elf_Internal_Rela *));
+  (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
 static bfd_boolean allocate_dynrelocs
-  PARAMS ((struct elf_link_hash_entry *, PTR));
+  (struct elf_link_hash_entry *, void *);
 static bfd_boolean readonly_dynrelocs
-  PARAMS ((struct elf_link_hash_entry *, PTR));
+  (struct elf_link_hash_entry *, void *);
 static enum elf_reloc_type_class sh_elf_reloc_type_class
-  PARAMS ((const Elf_Internal_Rela *));
+  (const Elf_Internal_Rela *);
 #ifdef INCLUDE_SHMEDIA
-inline static void movi_shori_putval PARAMS ((bfd *, unsigned long, char *));
+inline static void movi_shori_putval (bfd *, unsigned long, char *);
 #endif
 static bfd_boolean elf32_shlin_grok_prstatus
-  PARAMS ((bfd *abfd, Elf_Internal_Note *note));
+  (bfd *abfd, Elf_Internal_Note *note);
 static bfd_boolean elf32_shlin_grok_psinfo
-  PARAMS ((bfd *abfd, Elf_Internal_Note *note));
+  (bfd *abfd, Elf_Internal_Note *note);
 
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
@@ -1664,15 +1662,10 @@ static reloc_howto_type sh_elf_howto_table[] =
 };
 
 static bfd_reloc_status_type
-sh_elf_reloc_loop (r_type, input_bfd, input_section, contents, addr,
-                  symbol_section, start, end)
-     int r_type ATTRIBUTE_UNUSED;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     bfd_vma addr;
-     asection *symbol_section;
-     bfd_vma start, end;
+sh_elf_reloc_loop (int r_type ATTRIBUTE_UNUSED, bfd *input_bfd,
+                  asection *input_section, bfd_byte *contents,
+                  bfd_vma addr, asection *symbol_section,
+                  bfd_vma start, bfd_vma end)
 {
   static bfd_vma last_addr;
   static asection *last_symbol_section;
@@ -1774,15 +1767,9 @@ sh_elf_reloc_loop (r_type, input_bfd, input_section, contents, addr,
    function, and is almost certainly incorrect for other ELF targets.  */
 
 static bfd_reloc_status_type
-sh_elf_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
-             error_message)
-     bfd *abfd;
-     arelent *reloc_entry;
-     asymbol *symbol_in;
-     PTR data;
-     asection *input_section;
-     bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
+sh_elf_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol_in,
+             void *data, asection *input_section, bfd *output_bfd,
+             char **error_message ATTRIBUTE_UNUSED)
 {
   unsigned long insn;
   bfd_vma sym_value;
@@ -1849,15 +1836,11 @@ sh_elf_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
    which the linker should otherwise ignore.  */
 
 static bfd_reloc_status_type
-sh_elf_ignore_reloc (abfd, reloc_entry, symbol, data, input_section,
-                    output_bfd, error_message)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *reloc_entry;
-     asymbol *symbol ATTRIBUTE_UNUSED;
-     PTR data ATTRIBUTE_UNUSED;
-     asection *input_section;
-     bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
+sh_elf_ignore_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
+                    asymbol *symbol ATTRIBUTE_UNUSED,
+                    void *data ATTRIBUTE_UNUSED, asection *input_section,
+                    bfd *output_bfd,
+                    char **error_message ATTRIBUTE_UNUSED)
 {
   if (output_bfd != NULL)
     reloc_entry->address += input_section->output_offset;
@@ -1971,9 +1954,8 @@ static const struct elf_reloc_map sh_reloc_map[] =
    corresponding SH ELf reloc.  */
 
 static reloc_howto_type *
-sh_elf_reloc_type_lookup (abfd, code)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
+sh_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                         bfd_reloc_code_real_type code)
 {
   unsigned int i;
 
@@ -1989,10 +1971,8 @@ sh_elf_reloc_type_lookup (abfd, code)
 /* Given an ELF reloc, fill in the howto field of a relent.  */
 
 static void
-sh_elf_info_to_howto (abfd, cache_ptr, dst)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *cache_ptr;
-     Elf_Internal_Rela *dst;
+sh_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+                     Elf_Internal_Rela *dst)
 {
   unsigned int r;
 
@@ -2019,11 +1999,8 @@ sh_elf_info_to_howto (abfd, cache_ptr, dst)
    they come from enum elf_sh_reloc_type in include/elf/sh.h.  */
 
 static bfd_boolean
-sh_elf_relax_section (abfd, sec, link_info, again)
-     bfd *abfd;
-     asection *sec;
-     struct bfd_link_info *link_info;
-     bfd_boolean *again;
+sh_elf_relax_section (bfd *abfd, asection *sec,
+                     struct bfd_link_info *link_info, bfd_boolean *again)
 {
   Elf_Internal_Shdr *symtab_hdr;
   Elf_Internal_Rela *internal_relocs;
@@ -2055,7 +2032,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
   symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
 
   internal_relocs = (_bfd_elf_link_read_relocs
-                    (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
+                    (abfd, sec, NULL, (Elf_Internal_Rela *) NULL,
                      link_info->keep_memory));
   if (internal_relocs == NULL)
     goto error_return;
@@ -2411,11 +2388,8 @@ sh_elf_relax_section (abfd, sec, link_info, again)
    in coff-sh.c.  */
 
 static bfd_boolean
-sh_elf_relax_delete_bytes (abfd, sec, addr, count)
-     bfd *abfd;
-     asection *sec;
-     bfd_vma addr;
-     int count;
+sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
+                          int count)
 {
   Elf_Internal_Shdr *symtab_hdr;
   unsigned int sec_shndx;
@@ -2737,8 +2711,7 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
         FALSE, we should free them, if we are permitted to, when we
         leave sh_coff_relax_section.  */
       internal_relocs = (_bfd_elf_link_read_relocs
-                        (abfd, o, (PTR) NULL, (Elf_Internal_Rela *) NULL,
-                         TRUE));
+                        (abfd, o, NULL, (Elf_Internal_Rela *) NULL, TRUE));
       if (internal_relocs == NULL)
        return FALSE;
 
@@ -2892,12 +2865,10 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
    boundaries.  This is like sh_align_loads in coff-sh.c.  */
 
 static bfd_boolean
-sh_elf_align_loads (abfd, sec, internal_relocs, contents, pswapped)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *sec;
-     Elf_Internal_Rela *internal_relocs;
-     bfd_byte *contents ATTRIBUTE_UNUSED;
-     bfd_boolean *pswapped;
+sh_elf_align_loads (bfd *abfd ATTRIBUTE_UNUSED, asection *sec,
+                   Elf_Internal_Rela *internal_relocs,
+                   bfd_byte *contents ATTRIBUTE_UNUSED,
+                   bfd_boolean *pswapped)
 {
   Elf_Internal_Rela *irel, *irelend;
   bfd_vma *labels = NULL;
@@ -2948,7 +2919,7 @@ sh_elf_align_loads (abfd, sec, internal_relocs, contents, pswapped)
        stop = sec->_cooked_size;
 
       if (! _bfd_sh_align_load_span (abfd, sec, contents, sh_elf_swap_insns,
-                                    (PTR) internal_relocs, &label,
+                                    internal_relocs, &label,
                                     label_end, start, stop, pswapped))
        goto error_return;
     }
@@ -2966,12 +2937,8 @@ sh_elf_align_loads (abfd, sec, internal_relocs, contents, pswapped)
 /* Swap two SH instructions.  This is like sh_swap_insns in coff-sh.c.  */
 
 static bfd_boolean
-sh_elf_swap_insns (abfd, sec, relocs, contents, addr)
-     bfd *abfd;
-     asection *sec;
-     PTR relocs;
-     bfd_byte *contents;
-     bfd_vma addr;
+sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
+                  bfd_byte *contents, bfd_vma addr)
 {
   Elf_Internal_Rela *internal_relocs = (Elf_Internal_Rela *) relocs;
   unsigned short i1, i2;
@@ -3252,10 +3219,7 @@ static const bfd_byte *elf_sh_pic_plt_entry;
 #define elf_sh_plt_reloc_offset(info) (info->shared ? 52 : 44)
 
 inline static void
-movi_shori_putval (output_bfd, value, addr)
-     bfd *output_bfd;
-     unsigned long value;
-     char *addr;
+movi_shori_putval (bfd *output_bfd, unsigned long value, char *addr)
 {
   bfd_put_32 (output_bfd,
              bfd_get_32 (output_bfd, addr)
@@ -3573,8 +3537,7 @@ struct sh_elf_obj_tdata
    as the specific tdata.  */
 
 static bfd_boolean
-sh_elf_mkobject (abfd)
-     bfd *abfd;
+sh_elf_mkobject (bfd *abfd)
 {
   bfd_size_type amt = sizeof (struct sh_elf_obj_tdata);
   abfd->tdata.any = bfd_zalloc (abfd, amt);
@@ -3614,7 +3577,7 @@ struct elf_sh_link_hash_table
 #define sh_elf_link_hash_traverse(table, func, info)                   \
   (elf_link_hash_traverse                                              \
    (&(table)->root,                                                    \
-    (bfd_boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
+    (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \
     (info)))
 
 /* Get the sh ELF linker hash table from a link_info structure.  */
@@ -3625,10 +3588,9 @@ struct elf_sh_link_hash_table
 /* Create an entry in an sh ELF linker hash table.  */
 
 static struct bfd_hash_entry *
-sh_elf_link_hash_newfunc (entry, table, string)
-     struct bfd_hash_entry *entry;
-     struct bfd_hash_table *table;
-     const char *string;
+sh_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
+                         struct bfd_hash_table *table,
+                         const char *string)
 {
   struct elf_sh_link_hash_entry *ret =
     (struct elf_sh_link_hash_entry *) entry;
@@ -3662,8 +3624,7 @@ sh_elf_link_hash_newfunc (entry, table, string)
 /* Create an sh ELF linker hash table.  */
 
 static struct bfd_link_hash_table *
-sh_elf_link_hash_table_create (abfd)
-     bfd *abfd;
+sh_elf_link_hash_table_create (bfd *abfd)
 {
   struct elf_sh_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct elf_sh_link_hash_table);
@@ -3696,9 +3657,7 @@ sh_elf_link_hash_table_create (abfd)
    shortcuts to them in our hash table.  */
 
 static bfd_boolean
-create_got_section (dynobj, info)
-     bfd *dynobj;
-     struct bfd_link_info *info;
+create_got_section (bfd *dynobj, struct bfd_link_info *info)
 {
   struct elf_sh_link_hash_table *htab;
 
@@ -3728,9 +3687,7 @@ create_got_section (dynobj, info)
 /* Create dynamic sections when linking against a dynamic object.  */
 
 static bfd_boolean
-sh_elf_create_dynamic_sections (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
 {
   struct elf_sh_link_hash_table *htab;
   flagword flags, pltflags;
@@ -3754,6 +3711,8 @@ sh_elf_create_dynamic_sections (abfd, info)
     }
 
   htab = sh_elf_hash_table (info);
+  if (htab->root.dynamic_sections_created)
+    return TRUE;
 
   /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
      .rel[a].bss sections.  */
@@ -3805,7 +3764,8 @@ sh_elf_create_dynamic_sections (abfd, info)
       || ! bfd_set_section_alignment (abfd, s, ptralign))
     return FALSE;
 
-  if (! create_got_section (abfd, info))
+  if (htab->sgot == NULL
+      && !create_got_section (abfd, info))
     return FALSE;
 
   {
@@ -3824,6 +3784,8 @@ sh_elf_create_dynamic_sections (abfd, info)
        relname = (char *) bfd_malloc ((bfd_size_type) strlen (secname) + 6);
        strcpy (relname, ".rela");
        strcat (relname, secname);
+       if (bfd_get_section_by_name (abfd, secname))
+         continue;
        s = bfd_make_section (abfd, relname);
        if (s == NULL
            || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
@@ -3880,21 +3842,19 @@ sh_elf_create_dynamic_sections (abfd, info)
    understand.  */
 
 static bfd_boolean
-sh_elf_adjust_dynamic_symbol (info, h)
-     struct bfd_link_info *info;
-     struct elf_link_hash_entry *h;
+sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
+                             struct elf_link_hash_entry *h)
 {
   struct elf_sh_link_hash_table *htab;
   struct elf_sh_link_hash_entry *eh;
   struct elf_sh_dyn_relocs *p;
-  bfd *dynobj;
   asection *s;
   unsigned int power_of_two;
 
-  dynobj = elf_hash_table (info)->dynobj;
+  htab = sh_elf_hash_table (info);
 
   /* Make sure we know what is going on here.  */
-  BFD_ASSERT (dynobj != NULL
+  BFD_ASSERT (htab->root.dynobj != NULL
              && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
                  || h->weakdef != NULL
                  || ((h->elf_link_hash_flags
@@ -3911,11 +3871,9 @@ sh_elf_adjust_dynamic_symbol (info, h)
       || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
     {
       if (h->plt.refcount <= 0
-         || (! info->shared
-             && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
-             && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
-             && h->root.type != bfd_link_hash_undefweak
-             && h->root.type != bfd_link_hash_undefined))
+         || SYMBOL_CALLS_LOCAL (info, h)
+         || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+             && h->root.type == bfd_link_hash_undefweak))
        {
          /* This case can occur if we saw a PLT reloc in an input
             file, but the symbol was never referred to by a dynamic
@@ -3996,7 +3954,6 @@ sh_elf_adjust_dynamic_symbol (info, h)
      both the dynamic object and the regular object will refer to the
      same memory location for the variable.  */
 
-  htab = sh_elf_hash_table (info);
   s = htab->sdynbss;
   BFD_ASSERT (s != NULL);
 
@@ -4022,9 +3979,9 @@ sh_elf_adjust_dynamic_symbol (info, h)
 
   /* Apply the required alignment.  */
   s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
-  if (power_of_two > bfd_get_section_alignment (dynobj, s))
+  if (power_of_two > bfd_get_section_alignment (htab->root.dynobj, s))
     {
-      if (! bfd_set_section_alignment (dynobj, s, power_of_two))
+      if (! bfd_set_section_alignment (htab->root.dynobj, s, power_of_two))
        return FALSE;
     }
 
@@ -4053,9 +4010,7 @@ sh_elf_adjust_dynamic_symbol (info, h)
    dynamic relocs.  */
 
 static bfd_boolean
-allocate_dynrelocs (h, inf)
-     struct elf_link_hash_entry *h;
-     PTR inf;
+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
 {
   struct bfd_link_info *info;
   struct elf_sh_link_hash_table *htab;
@@ -4221,9 +4176,7 @@ allocate_dynrelocs (h, inf)
 
   if (info->shared)
     {
-      if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
-         && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
-             || info->symbolic))
+      if (SYMBOL_CALLS_LOCAL (info, h))
        {
          struct elf_sh_dyn_relocs **pp;
 
@@ -4290,9 +4243,7 @@ allocate_dynrelocs (h, inf)
 /* Find any dynamic relocs that apply to read-only sections.  */
 
 static bfd_boolean
-readonly_dynrelocs (h, inf)
-     struct elf_link_hash_entry *h;
-     PTR inf;
+readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
 {
   struct elf_sh_link_hash_entry *eh;
   struct elf_sh_dyn_relocs *p;
@@ -4321,9 +4272,8 @@ readonly_dynrelocs (h, inf)
 /* Set the sizes of the dynamic sections.  */
 
 static bfd_boolean
-sh_elf_size_dynamic_sections (output_bfd, info)
-     bfd *output_bfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info;
+sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+                             struct bfd_link_info *info)
 {
   struct elf_sh_link_hash_table *htab;
   bfd *dynobj;
@@ -4432,7 +4382,7 @@ sh_elf_size_dynamic_sections (output_bfd, info)
 
   /* Allocate global sym .plt and .got entries, and space for global
      sym dynamic relocs.  */
-  elf_link_hash_traverse (&htab->root, allocate_dynrelocs, (PTR) info);
+  elf_link_hash_traverse (&htab->root, allocate_dynrelocs, info);
 
   /* We now have determined the sizes of the various dynamic sections.
      Allocate memory for them.  */
@@ -4526,8 +4476,7 @@ sh_elf_size_dynamic_sections (output_bfd, info)
          /* If any dynamic relocs apply to a read-only section,
             then we need a DT_TEXTREL entry.  */
          if ((info->flags & DF_TEXTREL) == 0)
-           elf_link_hash_traverse (&htab->root, readonly_dynrelocs,
-                                   (PTR) info);
+           elf_link_hash_traverse (&htab->root, readonly_dynrelocs, info);
 
          if ((info->flags & DF_TEXTREL) != 0)
            {
@@ -4544,16 +4493,11 @@ sh_elf_size_dynamic_sections (output_bfd, info)
 /* Relocate an SH ELF section.  */
 
 static bfd_boolean
-sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
-                        contents, relocs, local_syms, local_sections)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     Elf_Internal_Rela *relocs;
-     Elf_Internal_Sym *local_syms;
-     asection **local_sections;
+sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
+                        bfd *input_bfd, asection *input_section,
+                        bfd_byte *contents, Elf_Internal_Rela *relocs,
+                        Elf_Internal_Sym *local_syms,
+                        asection **local_sections)
 {
   struct elf_sh_link_hash_table *htab;
   Elf_Internal_Shdr *symtab_hdr;
@@ -4905,11 +4849,7 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
              && r_symndx != 0
              && (input_section->flags & SEC_ALLOC) != 0
              && (r_type != R_SH_REL32
-                 || (h != NULL
-                     && h->dynindx != -1
-                     && (! info->symbolic
-                         || (h->elf_link_hash_flags
-                             & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+                 || !SYMBOL_CALLS_LOCAL (info, h)))
            {
              Elf_Internal_Rela outrel;
              bfd_byte *loc;
@@ -5068,9 +5008,7 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
              dyn = htab->root.dynamic_sections_created;
              if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
                  || (info->shared
-                     && (info->symbolic || h->dynindx == -1
-                         || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
-                     && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+                     && SYMBOL_REFERENCES_LOCAL (info, h))
                  || (ELF_ST_VISIBILITY (h->other)
                      && h->root.type == bfd_link_hash_undefweak))
                {
@@ -5717,14 +5655,12 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
    which uses sh_elf_relocate_section.  */
 
 static bfd_byte *
-sh_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
-                                      data, relocatable, symbols)
-     bfd *output_bfd;
-     struct bfd_link_info *link_info;
-     struct bfd_link_order *link_order;
-     bfd_byte *data;
-     bfd_boolean relocatable;
-     asymbol **symbols;
+sh_elf_get_relocated_section_contents (bfd *output_bfd,
+                                      struct bfd_link_info *link_info,
+                                      struct bfd_link_order *link_order,
+                                      bfd_byte *data,
+                                      bfd_boolean relocatable,
+                                      asymbol **symbols)
 {
   Elf_Internal_Shdr *symtab_hdr;
   asection *input_section = link_order->u.indirect.section;
@@ -5755,7 +5691,7 @@ sh_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
       bfd_size_type amt;
 
       internal_relocs = (_bfd_elf_link_read_relocs
-                        (input_bfd, input_section, (PTR) NULL,
+                        (input_bfd, input_section, NULL,
                          (Elf_Internal_Rela *) NULL, FALSE));
       if (internal_relocs == NULL)
        goto error_return;
@@ -5827,8 +5763,7 @@ sh_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
    This is PT_TLS segment p_vaddr.  */
 
 static bfd_vma
-dtpoff_base (info)
-     struct bfd_link_info *info;
+dtpoff_base (struct bfd_link_info *info)
 {
   /* If tls_segment is NULL, we should have signalled an error already.  */
   if (elf_hash_table (info)->tls_segment == NULL)
@@ -5839,9 +5774,7 @@ dtpoff_base (info)
 /* Return the relocation value for R_SH_TLS_TPOFF32..  */
 
 static bfd_vma
-tpoff (info, address)
-     struct bfd_link_info *info;
-     bfd_vma address;
+tpoff (struct bfd_link_info *info, bfd_vma address)
 {
   /* If tls_segment is NULL, we should have signalled an error already.  */
   if (elf_hash_table (info)->tls_segment == NULL)
@@ -5852,12 +5785,10 @@ tpoff (info, address)
 }
 
 static asection *
-sh_elf_gc_mark_hook (sec, info, rel, h, sym)
-     asection *sec;
-     struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     Elf_Internal_Rela *rel;
-     struct elf_link_hash_entry *h;
-     Elf_Internal_Sym *sym;
+sh_elf_gc_mark_hook (asection *sec,
+                    struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                    Elf_Internal_Rela *rel, struct elf_link_hash_entry *h,
+                    Elf_Internal_Sym *sym)
 {
   if (h != NULL)
     {
@@ -5896,11 +5827,8 @@ sh_elf_gc_mark_hook (sec, info, rel, h, sym)
 /* Update the got entry reference counts for the section being removed.  */
 
 static bfd_boolean
-sh_elf_gc_sweep_hook (abfd, info, sec, relocs)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *sec;
-     const Elf_Internal_Rela *relocs;
+sh_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
+                     asection *sec, const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
@@ -6083,9 +6011,9 @@ sh_elf_gc_sweep_hook (abfd, info, sec, relocs)
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
-sh_elf_copy_indirect_symbol (bed, dir, ind)
-     struct elf_backend_data *bed;
-     struct elf_link_hash_entry *dir, *ind;
+sh_elf_copy_indirect_symbol (struct elf_backend_data *bed,
+                            struct elf_link_hash_entry *dir,
+                            struct elf_link_hash_entry *ind)
 {
   struct elf_sh_link_hash_entry *edir, *eind;
 #ifdef INCLUDE_SHMEDIA
@@ -6161,10 +6089,8 @@ sh_elf_copy_indirect_symbol (bed, dir, ind)
 }
 
 static int
-sh_elf_optimized_tls_reloc (info, r_type, is_local)
-     struct bfd_link_info *info;
-     int r_type;
-     int is_local;
+sh_elf_optimized_tls_reloc (struct bfd_link_info *info, int r_type,
+                           int is_local)
 {
   if (info->shared)
     return r_type;
@@ -6188,18 +6114,14 @@ sh_elf_optimized_tls_reloc (info, r_type, is_local)
    virtual table relocs for gc.  */
 
 static bfd_boolean
-sh_elf_check_relocs (abfd, info, sec, relocs)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *sec;
-     const Elf_Internal_Rela *relocs;
+sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
+                    const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
   struct elf_sh_link_hash_table *htab;
   const Elf_Internal_Rela *rel;
   const Elf_Internal_Rela *rel_end;
-  bfd *dynobj;
   bfd_vma *local_got_offsets;
   asection *sgot;
   asection *srelgot;
@@ -6221,7 +6143,6 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
     sym_hashes_end -= symtab_hdr->sh_info;
 
   htab = sh_elf_hash_table (info);
-  dynobj = htab->root.dynobj;
   local_got_offsets = elf_local_got_offsets (abfd);
 
   rel_end = relocs + sec->reloc_count;
@@ -6295,10 +6216,13 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
            case R_SH_TLS_GD_32:
            case R_SH_TLS_LD_32:
            case R_SH_TLS_IE_32:
-             if (dynobj == NULL)
-               htab->root.dynobj = dynobj = abfd;
-             if (! create_got_section (dynobj, info))
-               return FALSE;
+             if (htab->sgot == NULL)
+               {
+                 if (htab->root.dynobj == NULL)
+                   htab->root.dynobj = abfd;
+                 if (!create_got_section (htab->root.dynobj, info))
+                   return FALSE;
+               }
              break;
 
            default:
@@ -6535,8 +6459,8 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
              struct elf_sh_dyn_relocs *p;
              struct elf_sh_dyn_relocs **head;
 
-             if (dynobj == NULL)
-               htab->root.dynobj = dynobj = abfd;
+             if (htab->root.dynobj == NULL)
+               htab->root.dynobj = abfd;
 
              /* When creating a shared object, we must copy these
                 reloc types into the output file.  We create a reloc
@@ -6556,23 +6480,23 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
                              && strcmp (bfd_get_section_name (abfd, sec),
                                         name + 5) == 0);
 
-                 sreloc = bfd_get_section_by_name (dynobj, name);
+                 sreloc = bfd_get_section_by_name (htab->root.dynobj, name);
                  if (sreloc == NULL)
                    {
                      flagword flags;
 
-                     sreloc = bfd_make_section (dynobj, name);
+                     sreloc = bfd_make_section (htab->root.dynobj, name);
                      flags = (SEC_HAS_CONTENTS | SEC_READONLY
                               | SEC_IN_MEMORY | SEC_LINKER_CREATED);
                      if ((sec->flags & SEC_ALLOC) != 0)
                        flags |= SEC_ALLOC | SEC_LOAD;
                      if (sreloc == NULL
-                         || ! bfd_set_section_flags (dynobj, sreloc, flags)
-                         || ! bfd_set_section_alignment (dynobj, sreloc, 2))
+                         || ! bfd_set_section_flags (htab->root.dynobj,
+                                                     sreloc, flags)
+                         || ! bfd_set_section_alignment (htab->root.dynobj,
+                                                         sreloc, 2))
                        return FALSE;
                    }
-                 if (sec->flags & SEC_READONLY)
-                   info->flags |= DF_TEXTREL;
                  elf_section_data (sec)->sreloc = sreloc;
                }
 
@@ -6598,7 +6522,7 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
              if (p == NULL || p->sec != sec)
                {
                  bfd_size_type amt = sizeof (*p);
-                 p = ((struct elf_sh_dyn_relocs *) bfd_alloc (dynobj, amt));
+                 p = bfd_alloc (htab->root.dynobj, amt);
                  if (p == NULL)
                    return FALSE;
                  p->next = *head;
@@ -6639,8 +6563,7 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
 
 #ifndef sh_elf_set_mach_from_flags
 static bfd_boolean
-sh_elf_set_mach_from_flags (abfd)
-     bfd *abfd;
+sh_elf_set_mach_from_flags (bfd *abfd)
 {
   flagword flags = elf_elfheader (abfd)->e_flags;
 
@@ -6682,9 +6605,7 @@ sh_elf_set_mach_from_flags (abfd)
 /* Function to keep SH specific file flags.  */
 
 static bfd_boolean
-sh_elf_set_private_flags (abfd, flags)
-     bfd *abfd;
-     flagword flags;
+sh_elf_set_private_flags (bfd *abfd, flagword flags)
 {
   BFD_ASSERT (! elf_flags_init (abfd)
              || elf_elfheader (abfd)->e_flags == flags);
@@ -6699,9 +6620,7 @@ sh_elf_set_private_flags (abfd, flags)
 /* Copy backend specific data from one object module to another */
 
 static bfd_boolean
-sh_elf_copy_private_data (ibfd, obfd)
-     bfd * ibfd;
-     bfd * obfd;
+sh_elf_copy_private_data (bfd * ibfd, bfd * obfd)
 {
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
       || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -6716,9 +6635,7 @@ sh_elf_copy_private_data (ibfd, obfd)
    together, and for linking sh-dsp with sh3e / sh4 objects.  */
 
 static bfd_boolean
-sh_elf_merge_private_data (ibfd, obfd)
-     bfd *ibfd;
-     bfd *obfd;
+sh_elf_merge_private_data (bfd *ibfd, bfd *obfd)
 {
   flagword old_flags, new_flags;
 
@@ -6759,8 +6676,7 @@ sh_elf_merge_private_data (ibfd, obfd)
    here.  */
 
 static bfd_boolean
-sh_elf_object_p (abfd)
-  bfd *abfd;
+sh_elf_object_p (bfd *abfd)
 {
   struct sh_elf_obj_tdata *new_tdata;
   bfd_size_type amt = sizeof (struct sh_elf_obj_tdata);
@@ -6781,17 +6697,13 @@ sh_elf_object_p (abfd)
    dynamic sections here.  */
 
 static bfd_boolean
-sh_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
-     struct elf_link_hash_entry *h;
-     Elf_Internal_Sym *sym;
+sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info,
+                             struct elf_link_hash_entry *h,
+                             Elf_Internal_Sym *sym)
 {
   struct elf_sh_link_hash_table *htab;
-  bfd *dynobj;
 
   htab = sh_elf_hash_table (info);
-  dynobj = htab->root.dynobj;
 
   if (h->plt.offset != (bfd_vma) -1)
     {
@@ -6959,10 +6871,7 @@ sh_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
         The entry in the global offset table will already have been
         initialized in the relocate_section function.  */
       if (info->shared
-         && (info->symbolic
-             || h->dynindx == -1
-             || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
-         && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+         && SYMBOL_REFERENCES_LOCAL (info, h))
        {
          rel.r_info = ELF32_R_INFO (0, R_SH_RELATIVE);
          rel.r_addend = (h->root.u.def.value
@@ -7010,10 +6919,7 @@ sh_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
           The entry in the global offset table will already have been
           initialized in the relocate_section function.  */
        if (info->shared
-           && (info->symbolic
-               || h->dynindx == -1
-               || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
-           && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+           && SYMBOL_REFERENCES_LOCAL (info, h))
          {
            rel.r_info = ELF32_R_INFO (0, R_SH_RELATIVE);
            rel.r_addend = (h->root.u.def.value
@@ -7071,20 +6977,15 @@ sh_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
 /* Finish up the dynamic sections.  */
 
 static bfd_boolean
-sh_elf_finish_dynamic_sections (output_bfd, info)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
+sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
 {
   struct elf_sh_link_hash_table *htab;
-  bfd *dynobj;
   asection *sgot;
   asection *sdyn;
 
   htab = sh_elf_hash_table (info);
-  dynobj = htab->root.dynobj;
-
   sgot = htab->sgotplt;
-  sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+  sdyn = bfd_get_section_by_name (htab->root.dynobj, ".dynamic");
 
   if (htab->root.dynamic_sections_created)
     {
@@ -7103,7 +7004,7 @@ sh_elf_finish_dynamic_sections (output_bfd, info)
          const char *name;
 #endif
 
-         bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+         bfd_elf32_swap_dyn_in (htab->root.dynobj, dyncon, &dyn);
 
          switch (dyn.d_tag)
            {
@@ -7243,8 +7144,7 @@ sh_elf_finish_dynamic_sections (output_bfd, info)
 }
 
 static enum elf_reloc_type_class
-sh_elf_reloc_type_class (rela)
-     const Elf_Internal_Rela *rela;
+sh_elf_reloc_type_class (const Elf_Internal_Rela *rela)
 {
   switch ((int) ELF32_R_TYPE (rela->r_info))
     {
@@ -7261,9 +7161,7 @@ sh_elf_reloc_type_class (rela)
 
 /* Support for Linux core dump NOTE sections.  */
 static bfd_boolean
-elf32_shlin_grok_prstatus (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elf32_shlin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
 {
   int offset;
   unsigned int raw_size;
@@ -7293,9 +7191,7 @@ elf32_shlin_grok_prstatus (abfd, note)
 }
 
 static bfd_boolean
-elf32_shlin_grok_psinfo (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
 {
   switch (note->descsz)
     {
@@ -7330,7 +7226,11 @@ elf32_shlin_grok_psinfo (abfd, note)
 #define TARGET_LITTLE_NAME     "elf32-shl"
 #define ELF_ARCH               bfd_arch_sh
 #define ELF_MACHINE_CODE       EM_SH
-#define ELF_MAXPAGESIZE                128
+#ifdef __QNXTARGET__
+#define ELF_MAXPAGESIZE                0x1000
+#else
+#define ELF_MAXPAGESIZE                0x80
+#endif
 
 #define elf_symbol_leading_char '_'
 
index b7ae36489fb45204122acf1cb58221e846d5c4c3..4c219e8a8d4651f9d6493222cfb2443679ee4558 100644 (file)
 #include "../opcodes/sh64-opc.h"
 
 static bfd_boolean sh64_address_in_cranges
-  PARAMS ((asection *cranges, bfd_vma, sh64_elf_crange *));
+  (asection *cranges, bfd_vma, sh64_elf_crange *);
 
 /* Ordering functions of a crange, for the qsort and bsearch calls and for
    different endianness.  */
 
 int
-_bfd_sh64_crange_qsort_cmpb (p1, p2)
-     const PTR p1;
-     const PTR p2;
+_bfd_sh64_crange_qsort_cmpb (const void *p1, const void *p2)
 {
   bfd_vma a1 = bfd_getb32 (p1);
   bfd_vma a2 = bfd_getb32 (p2);
@@ -49,9 +47,7 @@ _bfd_sh64_crange_qsort_cmpb (p1, p2)
 }
 
 int
-_bfd_sh64_crange_qsort_cmpl (p1, p2)
-     const PTR p1;
-     const PTR p2;
+_bfd_sh64_crange_qsort_cmpl (const void *p1, const void *p2)
 {
   bfd_vma a1 = (bfd_vma) bfd_getl32 (p1);
   bfd_vma a2 = (bfd_vma) bfd_getl32 (p2);
@@ -64,9 +60,7 @@ _bfd_sh64_crange_qsort_cmpl (p1, p2)
 }
 
 int
-_bfd_sh64_crange_bsearch_cmpb (p1, p2)
-     const PTR p1;
-     const PTR p2;
+_bfd_sh64_crange_bsearch_cmpb (const void *p1, const void *p2)
 {
   bfd_vma a1 = *(bfd_vma *) p1;
   bfd_vma a2 = (bfd_vma) bfd_getb32 (p2);
@@ -81,9 +75,7 @@ _bfd_sh64_crange_bsearch_cmpb (p1, p2)
 }
 
 int
-_bfd_sh64_crange_bsearch_cmpl (p1, p2)
-     const PTR p1;
-     const PTR p2;
+_bfd_sh64_crange_bsearch_cmpl (const void *p1, const void *p2)
 {
   bfd_vma a1 = *(bfd_vma *) p1;
   bfd_vma a2 = (bfd_vma) bfd_getl32 (p2);
@@ -102,10 +94,8 @@ _bfd_sh64_crange_bsearch_cmpl (p1, p2)
    filled into RANGEP if non-NULL.  */
 
 static bfd_boolean
-sh64_address_in_cranges (cranges, addr, rangep)
-     asection *cranges;
-     bfd_vma addr;
-     sh64_elf_crange *rangep;
+sh64_address_in_cranges (asection *cranges, bfd_vma addr,
+                        sh64_elf_crange *rangep)
 {
   bfd_byte *cranges_contents;
   bfd_byte *found_rangep;
@@ -200,10 +190,7 @@ error_return:
    *RANGEP if it's non-NULL.  */
 
 enum sh64_elf_cr_type
-sh64_get_contents_type (sec, addr, rangep)
-     asection *sec;
-     bfd_vma addr;
-     sh64_elf_crange *rangep;
+sh64_get_contents_type (asection *sec, bfd_vma addr, sh64_elf_crange *rangep)
 {
   asection *cranges;
 
@@ -256,9 +243,7 @@ sh64_get_contents_type (sec, addr, rangep)
 /* This is a simpler exported interface for the benefit of gdb et al.  */
 
 bfd_boolean
-sh64_address_is_shmedia (sec, addr)
-     asection *sec;
-     bfd_vma addr;
+sh64_address_is_shmedia (asection *sec, bfd_vma addr)
 {
   sh64_elf_crange dummy;
   return sh64_get_contents_type (sec, addr, &dummy) == CRT_SH5_ISA32;
index 4728842ac0d0add8e6e098ca89d889b2423c2142..267854867a9f93bd8544a20af00bca294b1c6885 100644 (file)
@@ -39,36 +39,36 @@ struct sh64_find_section_vma_data
  };
 
 static bfd_boolean sh64_elf_new_section_hook
-  PARAMS ((bfd *, asection *));
+  (bfd *, asection *);
 static bfd_boolean sh64_elf_copy_private_data
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 static bfd_boolean sh64_elf_merge_private_data
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 static bfd_boolean sh64_elf_fake_sections
-  PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
+  (bfd *, Elf_Internal_Shdr *, asection *);
 static bfd_boolean sh64_elf_set_private_flags
-  PARAMS ((bfd *, flagword));
+  (bfd *, flagword);
 static bfd_boolean sh64_elf_set_mach_from_flags
-  PARAMS ((bfd *));
+  (bfd *);
 static bfd_boolean shmedia_prepare_reloc
-  PARAMS ((struct bfd_link_info *, bfd *, asection *,
-          bfd_byte *, const Elf_Internal_Rela *, bfd_vma *));
+  (struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+   const Elf_Internal_Rela *, bfd_vma *);
 static int sh64_elf_get_symbol_type
-  PARAMS ((Elf_Internal_Sym *, int));
+  (Elf_Internal_Sym *, int);
 static bfd_boolean sh64_elf_add_symbol_hook
-  PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
-          const char **, flagword *, asection **, bfd_vma *));
+  (bfd *, struct bfd_link_info *, const Elf_Internal_Sym *, const char **,
+   flagword *, asection **, bfd_vma *);
 static bfd_boolean sh64_elf_link_output_symbol_hook
-  PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
-          asection *));
+  (bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
+   asection *);
 static bfd_boolean sh64_backend_section_from_shdr
-  PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
+  (bfd *, Elf_Internal_Shdr *, const char *);
 static void sh64_elf_final_write_processing
-  PARAMS ((bfd *, bfd_boolean));
+  (bfd *, bfd_boolean);
 static bfd_boolean sh64_bfd_elf_copy_private_section_data
-  PARAMS ((bfd *, asection *, bfd *, asection *));
+  (bfd *, asection *, bfd *, asection *);
 static void sh64_find_section_for_address
-  PARAMS ((bfd *, asection *, PTR));
+  (bfd *, asection *, void *);
 
 /* Let elf32-sh.c handle the "bfd_" definitions, so we only have to
    intrude with an #ifndef around the function definition.  */
@@ -87,6 +87,7 @@ static void sh64_find_section_for_address
        sh64_elf_link_output_symbol_hook
 #define elf_backend_final_write_processing     sh64_elf_final_write_processing
 #define elf_backend_section_from_shdr          sh64_backend_section_from_shdr
+#define elf_backend_special_sections           sh64_elf_special_sections
 
 #define bfd_elf32_new_section_hook             sh64_elf_new_section_hook
 
@@ -108,9 +109,7 @@ static void sh64_find_section_for_address
 /* Tack some extra info on struct bfd_elf_section_data.  */
 
 static bfd_boolean
-sh64_elf_new_section_hook (abfd, sec)
-     bfd *abfd;
-     asection *sec;
+sh64_elf_new_section_hook (bfd *abfd, asection *sec)
 {
   struct _sh64_elf_section_data *sdata;
   bfd_size_type amt = sizeof (*sdata);
@@ -118,7 +117,7 @@ sh64_elf_new_section_hook (abfd, sec)
   sdata = (struct _sh64_elf_section_data *) bfd_zalloc (abfd, amt);
   if (sdata == NULL)
     return FALSE;
-  sec->used_by_bfd = (PTR) sdata;
+  sec->used_by_bfd = sdata;
 
   return _bfd_elf_new_section_hook (abfd, sec);
 }
@@ -127,10 +126,9 @@ sh64_elf_new_section_hook (abfd, sec)
    through SHT_SH5_CR_SORTED on a sorted .cranges section.  */
 
 bfd_boolean
-sh64_elf_fake_sections (output_bfd, elf_section_hdr, asect)
-     bfd *output_bfd ATTRIBUTE_UNUSED;
-     Elf_Internal_Shdr *elf_section_hdr;
-     asection *asect;
+sh64_elf_fake_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+                       Elf_Internal_Shdr *elf_section_hdr,
+                       asection *asect)
 {
   if (sh64_elf_section_data (asect)->sh64_info != NULL)
     elf_section_hdr->sh_flags
@@ -147,8 +145,7 @@ sh64_elf_fake_sections (output_bfd, elf_section_hdr, asect)
 }
 
 static bfd_boolean
-sh64_elf_set_mach_from_flags (abfd)
-     bfd *abfd;
+sh64_elf_set_mach_from_flags (bfd *abfd)
 {
   flagword flags = elf_elfheader (abfd)->e_flags;
   asection *cranges;
@@ -182,9 +179,7 @@ sh64_elf_set_mach_from_flags (abfd)
 }
 
 static bfd_boolean
-sh64_elf_copy_private_data (ibfd, obfd)
-     bfd * ibfd;
-     bfd * obfd;
+sh64_elf_copy_private_data (bfd * ibfd, bfd * obfd)
 {
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
       || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -199,9 +194,7 @@ sh64_elf_copy_private_data (ibfd, obfd)
 }
 
 static bfd_boolean
-sh64_elf_merge_private_data (ibfd, obfd)
-     bfd *ibfd;
-     bfd *obfd;
+sh64_elf_merge_private_data (bfd *ibfd, bfd *obfd)
 {
   flagword old_flags, new_flags;
 
@@ -261,10 +254,8 @@ sh64_elf_merge_private_data (ibfd, obfd)
    We only recognize SHT_SH5_CR_SORTED, on the .cranges section.  */
 
 bfd_boolean
-sh64_backend_section_from_shdr (abfd, hdr, name)
-     bfd *abfd;
-     Elf_Internal_Shdr *hdr;
-     const char *name;
+sh64_backend_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr,
+                               const char *name)
 {
   flagword flags = 0;
 
@@ -308,11 +299,8 @@ sh64_backend_section_from_shdr (abfd, hdr, name)
    structure for the SH64 ELF section flags to be copied correctly.  */
 
 bfd_boolean
-sh64_bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
-     bfd *ibfd;
-     asection *isec;
-     bfd *obfd;
-     asection *osec;
+sh64_bfd_elf_copy_private_section_data (bfd *ibfd, asection *isec,
+                                       bfd *obfd, asection *osec)
 {
   struct sh64_section_data *sh64_sec_data;
 
@@ -344,9 +332,7 @@ sh64_bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
 /* Function to keep SH64 specific file flags.  */
 
 static bfd_boolean
-sh64_elf_set_private_flags (abfd, flags)
-     bfd *    abfd;
-     flagword flags;
+sh64_elf_set_private_flags (bfd *abfd, flagword flags)
 {
   BFD_ASSERT (! elf_flags_init (abfd)
              || elf_elfheader (abfd)->e_flags == flags);
@@ -359,9 +345,7 @@ sh64_elf_set_private_flags (abfd, flags)
 /* Called when writing out an object file to decide the type of a symbol.  */
 
 static int
-sh64_elf_get_symbol_type (elf_sym, type)
-     Elf_Internal_Sym * elf_sym;
-     int type;
+sh64_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
 {
   if (ELF_ST_TYPE (elf_sym->st_info) == STT_DATALABEL)
     return STT_DATALABEL;
@@ -388,14 +372,10 @@ sh64_elf_get_symbol_type (elf_sym, type)
    (not so good).  */
 
 static bfd_boolean
-sh64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     const Elf_Internal_Sym *sym;
-     const char **namep;
-     flagword *flagsp ATTRIBUTE_UNUSED;
-     asection **secp;
-     bfd_vma *valp;
+sh64_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
+                         const Elf_Internal_Sym *sym, const char **namep,
+                         flagword *flagsp ATTRIBUTE_UNUSED,
+                         asection **secp, bfd_vma *valp)
 {
   /* We want to do this for relocatable as well as final linking.  */
   if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL
@@ -489,12 +469,11 @@ sh64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
    DataLabel symbol.  */
 
 bfd_boolean
-sh64_elf_link_output_symbol_hook (abfd, info, cname, sym, input_sec)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info;
-     const char *cname;
-     Elf_Internal_Sym *sym;
-     asection *input_sec ATTRIBUTE_UNUSED;
+sh64_elf_link_output_symbol_hook (bfd *abfd ATTRIBUTE_UNUSED,
+                                 struct bfd_link_info *info,
+                                 const char *cname,
+                                 Elf_Internal_Sym *sym,
+                                 asection *input_sec ATTRIBUTE_UNUSED)
 {
   char *name = (char *) cname;
 
@@ -512,14 +491,9 @@ sh64_elf_link_output_symbol_hook (abfd, info, cname, sym, input_sec)
    bad value, TRUE if ok.  */
 
 static bfd_boolean
-shmedia_prepare_reloc (info, abfd, input_section,
-                      contents, rel, relocation)
-     struct bfd_link_info *info;
-     bfd *abfd;
-     asection *input_section;
-     bfd_byte *contents;
-     const Elf_Internal_Rela *rel;
-     bfd_vma *relocation;
+shmedia_prepare_reloc (struct bfd_link_info *info, bfd *abfd,
+                      asection *input_section, bfd_byte *contents,
+                      const Elf_Internal_Rela *rel, bfd_vma *relocation)
 {
   bfd_vma disp, dropped;
 
@@ -624,10 +598,8 @@ shmedia_prepare_reloc (info, abfd, input_section,
    is called via bfd_map_over_sections.  */
 
 static void
-sh64_find_section_for_address (abfd, section, data)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *section;
-     PTR data;
+sh64_find_section_for_address (bfd *abfd ATTRIBUTE_UNUSED,
+                              asection *section, void *data)
 {
   bfd_vma vma;
   bfd_size_type size;
@@ -663,9 +635,8 @@ sh64_find_section_for_address (abfd, section, data)
    executables (final linking and objcopy).  */
 
 static void
-sh64_elf_final_write_processing (abfd, linker)
-     bfd *abfd;
-     bfd_boolean linker ATTRIBUTE_UNUSED;
+sh64_elf_final_write_processing (bfd *abfd,
+                                bfd_boolean linker ATTRIBUTE_UNUSED)
 {
   bfd_vma ld_generated_cranges_size;
   asection *cranges
@@ -717,7 +688,7 @@ sh64_elf_final_write_processing (abfd, linker)
       fsec_data.section = NULL;
 
       bfd_map_over_sections (abfd, sh64_find_section_for_address,
-                            (PTR) &fsec_data);
+                            &fsec_data);
       if (fsec_data.section
          && (sh64_get_contents_type (fsec_data.section,
                                      elf_elfheader (abfd)->e_entry,
@@ -764,6 +735,14 @@ sh64_elf_final_write_processing (abfd, linker)
     }
 }
 
+static struct bfd_elf_special_section const sh64_elf_special_sections[]=
+{
+  { ".cranges",                0,      NULL,   0,
+    SHT_PROGBITS,      0 },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
+
 #undef TARGET_BIG_SYM
 #define        TARGET_BIG_SYM          bfd_elf32_sh64_vec
 #undef TARGET_BIG_NAME
index 87af05bc2c4a5a3745dea1c80dc38183537ebaf1..5916aecfb7d3905a917f4853c0fc92fe63b49702 100644 (file)
@@ -51,16 +51,21 @@ typedef struct {
 
 /* Get the contents type of an arbitrary address, or return CRT_NONE.  */
 extern enum sh64_elf_cr_type sh64_get_contents_type
-  PARAMS ((asection *, bfd_vma, sh64_elf_crange *));
+  (asection *, bfd_vma, sh64_elf_crange *);
 
 /* Simpler interface.
    FIXME: This seems redundant now that we export the interface above.  */
-extern bfd_boolean sh64_address_is_shmedia PARAMS ((asection *, bfd_vma));
-
-extern int _bfd_sh64_crange_qsort_cmpb PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_qsort_cmpl PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_bsearch_cmpb PARAMS ((const void *, const void *));
-extern int _bfd_sh64_crange_bsearch_cmpl PARAMS ((const void *, const void *));
+extern bfd_boolean sh64_address_is_shmedia
+  (asection *, bfd_vma);
+
+extern int _bfd_sh64_crange_qsort_cmpb
+  (const void *, const void *);
+extern int _bfd_sh64_crange_qsort_cmpl
+  (const void *, const void *);
+extern int _bfd_sh64_crange_bsearch_cmpb
+  (const void *, const void *);
+extern int _bfd_sh64_crange_bsearch_cmpl
+  (const void *, const void *);
 
 struct sh64_section_data
 {
index 83d4c47187f0b47f7b109b35ffbbd093b1aad70d..c18edda6633dd033e433a996bd52ff4c418cf2d3 100644 (file)
@@ -1024,10 +1024,13 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
              }
          }
 
-         if (htab->elf.dynobj == NULL)
-           htab->elf.dynobj = abfd;
-         if (!create_got_section (htab->elf.dynobj, info))
-           return FALSE;
+         if (htab->sgot == NULL)
+           {
+             if (htab->elf.dynobj == NULL)
+               htab->elf.dynobj = abfd;
+             if (!create_got_section (htab->elf.dynobj, info))
+               return FALSE;
+           }
          break;
 
        case R_SPARC_TLS_GD_CALL:
@@ -2206,7 +2209,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            ;
-         else if (info->shared
+         else if (!info->executable
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            ;
index e41d0c0d7c4288f31eb7c1e42ba1c5cf52339855..8437c3ddec92f1fca8743e5761ccf65a6525e3f5 100644 (file)
@@ -3139,6 +3139,38 @@ v850_elf_relax_section (abfd, sec, link_info, again)
   result = FALSE;
   goto finish;
 }
+
+static struct bfd_elf_special_section const v850_elf_special_sections[]=
+{
+  { ".sdata",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
+  { ".rosdata",                0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_V850_GPREL },
+  { ".sbss",           0,      NULL,   0,
+    SHT_NOBITS,                SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
+  { ".scommon",                0,      NULL,   0,
+    SHT_V850_SCOMMON,  SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
+  { ".tdata",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL },
+  { ".tbss",           0,      NULL,   0,
+    SHT_NOBITS,                SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL },
+  { ".tcommon",                0,      NULL,   0,
+    SHT_V850_TCOMMON,  SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
+  { ".zdata",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
+  { ".rozdata",                0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_V850_R0REL },
+  { ".zbss",           0,      NULL,   0,
+    SHT_NOBITS,                SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
+  { ".zcommon",                0,      NULL,   0,
+    SHT_V850_ZCOMMON,  SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
+  { ".call_table_data",        0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".call_table_text",        0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE + SHF_EXECINSTR },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
 \f
 #define TARGET_LITTLE_SYM                      bfd_elf32_v850_vec
 #define TARGET_LITTLE_NAME                     "elf32-v850"
@@ -3162,6 +3194,7 @@ v850_elf_relax_section (abfd, sec, link_info, again)
 #define elf_backend_fake_sections              v850_elf_fake_sections
 #define elf_backend_gc_mark_hook                v850_elf_gc_mark_hook
 #define elf_backend_gc_sweep_hook               v850_elf_gc_sweep_hook
+#define elf_backend_special_sections           v850_elf_special_sections
 
 #define elf_backend_can_gc_sections 1
 #define elf_backend_rela_normal 1
index 1f8d86de223b267441656e1da4c39e213cefc3ce..3322c9efd685178eb83d44e2f02adc71d49b2316 100644 (file)
@@ -102,6 +102,8 @@ static bfd_boolean elf_xtensa_new_section_hook
 
 /* Local helper functions.  */
 
+static bfd_boolean xtensa_elf_dynamic_symbol_p
+  PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *));
 static int property_table_compare
   PARAMS ((const PTR, const PTR));
 static bfd_boolean elf_xtensa_in_literal_pool
@@ -131,12 +133,10 @@ static void do_fix_for_relocatable_link
   PARAMS ((Elf_Internal_Rela *, bfd *, asection *));
 static void do_fix_for_final_link
   PARAMS ((Elf_Internal_Rela *, asection *, bfd_vma *));
-static bfd_boolean xtensa_elf_dynamic_symbol_p
-  PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
 static bfd_vma elf_xtensa_create_plt_entry
   PARAMS ((bfd *, bfd *, unsigned));
 static int elf_xtensa_combine_prop_entries
-  PARAMS ((bfd *, const char *));
+  PARAMS ((bfd *, asection *, asection *));
 static bfd_boolean elf_xtensa_discard_info_for_section
   PARAMS ((bfd *, struct elf_reloc_cookie *, struct bfd_link_info *,
           asection *));
@@ -206,6 +206,8 @@ static bfd_boolean pcrel_reloc_fits
   PARAMS ((xtensa_operand, bfd_vma, bfd_vma));
 static bfd_boolean xtensa_is_property_section
   PARAMS ((asection *));
+static bfd_boolean xtensa_is_littable_section
+  PARAMS ((asection *));
 static bfd_boolean is_literal_section
   PARAMS ((asection *));
 static int internal_reloc_compare
@@ -231,7 +233,7 @@ typedef struct xtensa_relax_info_struct xtensa_relax_info;
    The actual PLT code must be split into multiple sections and all
    the sections have to be created before size_dynamic_sections,
    where we figure out the exact number of PLT entries that will be
-   needed.  It is OK is this count is an overestimate, e.g., some
+   needed.  It is OK if this count is an overestimate, e.g., some
    relocations may be removed by GC.  */
 
 static int plt_reloc_count = 0;
@@ -447,6 +449,21 @@ static const bfd_byte elf_xtensa_le_plt_entry[PLT_ENTRY_SIZE] =
   0                    /* unused */
 };
 
+
+static inline bfd_boolean
+xtensa_elf_dynamic_symbol_p (h, info)
+     struct elf_link_hash_entry *h;
+     struct bfd_link_info *info;
+{
+  /* Check if we should do dynamic things to this symbol.  The
+     "ignore_protected" argument need not be set, because Xtensa code
+     does not require special handling of STV_PROTECTED to make function
+     pointer comparisons work properly.  The PLT addresses are never
+     used for function pointers.  */
+
+  return _bfd_elf_dynamic_symbol_p (h, info, 0);
+}
+
 \f
 static int
 property_table_compare (ap, bp)
@@ -904,7 +921,7 @@ elf_xtensa_create_dynamic_sections (dynobj, info)
      bfd *dynobj;
      struct bfd_link_info *info;
 {
-  flagword flags;
+  flagword flags, noalloc_flags;
   asection *s;
 
   /* First do all the standard stuff.  */
@@ -916,8 +933,9 @@ elf_xtensa_create_dynamic_sections (dynobj, info)
   if (!add_extra_plt_sections (dynobj, plt_reloc_count))
     return FALSE;
 
-  flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
-          | SEC_LINKER_CREATED | SEC_READONLY);
+  noalloc_flags = (SEC_HAS_CONTENTS | SEC_IN_MEMORY
+                  | SEC_LINKER_CREATED | SEC_READONLY);
+  flags = noalloc_flags | SEC_ALLOC | SEC_LOAD;
 
   /* Mark the ".got.plt" section READONLY.  */
   s = bfd_get_section_by_name (dynobj, ".got.plt");
@@ -932,10 +950,17 @@ elf_xtensa_create_dynamic_sections (dynobj, info)
       || ! bfd_set_section_alignment (dynobj, s, 2))
     return FALSE;
 
+  /* Create ".got.loc" (literal tables for use by dynamic linker).  */
+  s = bfd_make_section (dynobj, ".got.loc");
+  if (s == NULL
+      || ! bfd_set_section_flags (dynobj, s, flags)
+      || ! bfd_set_section_alignment (dynobj, s, 2))
+    return FALSE;
+
   /* Create ".xt.lit.plt" (literal table for ".got.plt*").  */
   s = bfd_make_section (dynobj, ".xt.lit.plt");
   if (s == NULL
-      || ! bfd_set_section_flags (dynobj, s, flags)
+      || ! bfd_set_section_flags (dynobj, s, noalloc_flags)
       || ! bfd_set_section_alignment (dynobj, s, 2))
     return FALSE;
 
@@ -1053,7 +1078,7 @@ elf_xtensa_fix_refcounts (h, arg)
   if (h->root.type == bfd_link_hash_warning)
     h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
-  if (! xtensa_elf_dynamic_symbol_p (info, h))
+  if (! xtensa_elf_dynamic_symbol_p (h, info))
     elf_xtensa_make_sym_local (info, h);
 
   /* If the symbol has a relocation outside the GOT, set the
@@ -1136,8 +1161,8 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
      bfd *output_bfd ATTRIBUTE_UNUSED;
      struct bfd_link_info *info;
 {
-  bfd *dynobj;
-  asection *s, *srelplt, *splt, *sgotplt, *srelgot, *spltlittbl;
+  bfd *dynobj, *abfd;
+  asection *s, *srelplt, *splt, *sgotplt, *srelgot, *spltlittbl, *sgotloc;
   bfd_boolean relplt, relgot;
   int plt_entries, plt_chunks, chunk;
 
@@ -1241,6 +1266,25 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
              splt->_raw_size = 0;
            }
        }
+
+      /* Allocate space in ".got.loc" to match the total size of all the
+        literal tables.  */
+      sgotloc = bfd_get_section_by_name (dynobj, ".got.loc");
+      if (sgotloc == NULL)
+       abort ();
+      sgotloc->_raw_size = spltlittbl->_raw_size;
+      for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
+       {
+         if (abfd->flags & DYNAMIC)
+           continue;
+         for (s = abfd->sections; s != NULL; s = s->next)
+           {
+             if (! elf_discarded_section (s)
+                 && xtensa_is_littable_section (s)
+                 && s != spltlittbl)
+               sgotloc->_raw_size += s->_raw_size;
+           }
+       }
     }
 
   /* Allocate memory for dynamic sections.  */
@@ -1291,7 +1335,8 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
       else if (strcmp (name, ".got") != 0
               && strcmp (name, ".plt") != 0
               && strcmp (name, ".got.plt") != 0
-              && strcmp (name, ".xt.lit.plt") != 0)
+              && strcmp (name, ".xt.lit.plt") != 0
+              && strcmp (name, ".got.loc") != 0)
        {
          /* It's not one of our sections, so don't allocate space.  */
          continue;
@@ -1800,46 +1845,6 @@ elf_xtensa_create_plt_entry (dynobj, output_bfd, reloc_index)
 }
 
 
-static bfd_boolean
-xtensa_elf_dynamic_symbol_p (info, h)
-     struct bfd_link_info *info;
-     struct elf_link_hash_entry *h;
-{
-  if (h == NULL)
-    return FALSE;
-
-  while (h->root.type == bfd_link_hash_indirect
-        || h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-  if (h->dynindx == -1)
-    return FALSE;
-
-  if (h->root.type == bfd_link_hash_undefweak
-      || h->root.type == bfd_link_hash_defweak)
-    return TRUE;
-
-  switch (ELF_ST_VISIBILITY (h->other))
-    {
-    case STV_DEFAULT:
-      break;
-    case STV_HIDDEN:
-    case STV_INTERNAL:
-      return FALSE;
-    case STV_PROTECTED:
-      if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
-        return FALSE;
-      break;
-    }
-
-  if ((info->shared && !info->symbolic)
-      || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
-    return TRUE;
-
-  return FALSE;
-}
-
-
 /* Relocate an Xtensa ELF section.  This is invoked by the linker for
    both relocatable and final links.  */
 
@@ -2066,7 +2071,7 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
       /* Generate dynamic relocations.  */
       if (elf_hash_table (info)->dynamic_sections_created)
        {
-         bfd_boolean dynamic_symbol = xtensa_elf_dynamic_symbol_p (info, h);
+         bfd_boolean dynamic_symbol = xtensa_elf_dynamic_symbol_p (h, info);
 
          if (dynamic_symbol && (r_type == R_XTENSA_OP0
                                 || r_type == R_XTENSA_OP1
@@ -2236,25 +2241,31 @@ elf_xtensa_finish_dynamic_symbol (output_bfd, info, h, sym)
    on error.  */
 
 static int
-elf_xtensa_combine_prop_entries (output_bfd, secname)
+elf_xtensa_combine_prop_entries (output_bfd, sxtlit, sgotloc)
      bfd *output_bfd;
-     const char *secname;
+     asection *sxtlit;
+     asection *sgotloc;
 {
-  asection *sec;
   bfd_byte *contents;
   property_table_entry *table;
-  bfd_size_type section_size;
+  bfd_size_type section_size, sgotloc_size;
   bfd_vma offset;
   int n, m, num;
 
-  sec = bfd_get_section_by_name (output_bfd, secname);
-  if (!sec)
-    return -1;
-
-  section_size = (sec->_cooked_size != 0 ? sec->_cooked_size : sec->_raw_size);
+  section_size = (sxtlit->_cooked_size != 0
+                 ? sxtlit->_cooked_size : sxtlit->_raw_size);
   BFD_ASSERT (section_size % 8 == 0);
   num = section_size / 8;
 
+  sgotloc_size = (sgotloc->_cooked_size != 0
+                 ? sgotloc->_cooked_size : sgotloc->_raw_size);
+  if (sgotloc_size != section_size)
+    {
+      (*_bfd_error_handler)
+       ("internal inconsistency in size of .got.loc section");
+      return -1;
+    }
+
   contents = (bfd_byte *) bfd_malloc (section_size);
   table = (property_table_entry *)
     bfd_malloc (num * sizeof (property_table_entry));
@@ -2264,9 +2275,10 @@ elf_xtensa_combine_prop_entries (output_bfd, secname)
   /* The ".xt.lit.plt" section has the SEC_IN_MEMORY flag set and this
      propagates to the output section, where it doesn't really apply and
      where it breaks the following call to bfd_get_section_contents.  */
-  sec->flags &= ~SEC_IN_MEMORY;
+  sxtlit->flags &= ~SEC_IN_MEMORY;
 
-  if (! bfd_get_section_contents (output_bfd, sec, contents, 0, section_size))
+  if (! bfd_get_section_contents (output_bfd, sxtlit, contents, 0,
+                                 section_size))
     return -1;
 
   /* There should never be any relocations left at this point, so this
@@ -2321,12 +2333,16 @@ elf_xtensa_combine_prop_entries (output_bfd, secname)
   if ((bfd_size_type) (num * 8) < section_size)
     {
       memset (&contents[num * 8], 0, section_size - num * 8);
-      sec->_cooked_size = num * 8;
+      sxtlit->_cooked_size = num * 8;
     }
 
-  if (! bfd_set_section_contents (output_bfd, sec, contents, 0, section_size))
+  if (! bfd_set_section_contents (output_bfd, sxtlit, contents, 0,
+                                 section_size))
     return -1;
 
+  /* Copy the contents to ".got.loc".  */
+  memcpy (sgotloc->contents, contents, section_size);
+
   free (contents);
   return num;
 }
@@ -2340,7 +2356,7 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
      struct bfd_link_info *info;
 {
   bfd *dynobj;
-  asection *sdyn, *srelplt, *sgot;
+  asection *sdyn, *srelplt, *sgot, *sxtlit, *sgotloc;
   Elf32_External_Dyn *dyncon, *dynconend;
   int num_xtlit_entries;
 
@@ -2466,7 +2482,11 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
 
   /* Combine adjacent literal table entries.  */
   BFD_ASSERT (! info->relocatable);
-  num_xtlit_entries = elf_xtensa_combine_prop_entries (output_bfd, ".xt.lit");
+  sxtlit = bfd_get_section_by_name (output_bfd, ".xt.lit");
+  sgotloc = bfd_get_section_by_name (dynobj, ".got.loc");
+  BFD_ASSERT (sxtlit && sgotloc);
+  num_xtlit_entries =
+    elf_xtensa_combine_prop_entries (output_bfd, sxtlit, sgotloc);
   if (num_xtlit_entries < 0)
     return FALSE;
 
@@ -2486,13 +2506,11 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
          break;
 
        case DT_XTENSA_GOT_LOC_SZ:
-         s = bfd_get_section_by_name (output_bfd, ".xt.lit");
-         BFD_ASSERT (s);
          dyn.d_un.d_val = num_xtlit_entries;
          break;
 
        case DT_XTENSA_GOT_LOC_OFF:
-         name = ".xt.lit";
+         name = ".got.loc";
          goto get_vma;
        case DT_PLTGOT:
          name = ".got";
@@ -2564,7 +2582,7 @@ elf_xtensa_merge_private_bfd_data (ibfd, obfd)
   if (out_mach != in_mach) 
     {
       (*_bfd_error_handler)
-       ("%s: incompatible machine type. Output is 0x%x. Input is 0x%x\n",
+       ("%s: incompatible machine type. Output is 0x%x. Input is 0x%x",
         bfd_archive_filename (ibfd), out_mach, in_mach);
       bfd_set_error (bfd_error_wrong_format);
       return FALSE;
@@ -2810,6 +2828,24 @@ elf_xtensa_discard_info_for_section (abfd, cookie, info, sec)
       sec->_cooked_size = section_size - removed_bytes;
       /* Also shrink _raw_size.  See comments in relax_property_section.  */
       sec->_raw_size = sec->_cooked_size;
+
+      if (xtensa_is_littable_section (sec))
+       {
+         bfd *dynobj = elf_hash_table (info)->dynobj;
+         if (dynobj)
+           {
+             asection *sgotloc =
+               bfd_get_section_by_name (dynobj, ".got.loc");
+             if (sgotloc)
+               {
+                 bfd_size_type sgotloc_size =
+                   (sgotloc->_cooked_size ? sgotloc->_cooked_size
+                    : sgotloc->_raw_size);
+                 sgotloc->_cooked_size = sgotloc_size - removed_bytes;
+                 sgotloc->_raw_size = sgotloc_size - removed_bytes;
+               }
+           }
+       }
     }
   else
     {
@@ -3088,7 +3124,7 @@ elf_xtensa_do_asm_simplify (contents, address, content_length)
   if (content_length < address)
     {
       (*_bfd_error_handler)
-       ("Attempt to convert L32R/CALLX to CALL failed\n");
+       ("Attempt to convert L32R/CALLX to CALL failed");
       return bfd_reloc_other;
     }
 
@@ -3097,7 +3133,7 @@ elf_xtensa_do_asm_simplify (contents, address, content_length)
   if (direct_call_opcode == XTENSA_UNDEFINED)
     {
       (*_bfd_error_handler)
-       ("Attempt to convert L32R/CALLX to CALL failed\n");
+       ("Attempt to convert L32R/CALLX to CALL failed");
       return bfd_reloc_other;
     }
   
@@ -4931,7 +4967,7 @@ shrink_dynamic_reloc_sections (info, abfd, input_section, rel)
   else
     h = sym_hashes[r_symndx - symtab_hdr->sh_info];
 
-  dynamic_symbol = xtensa_elf_dynamic_symbol_p (info, h);
+  dynamic_symbol = xtensa_elf_dynamic_symbol_p (h, info);
 
   if ((r_type == R_XTENSA_32 || r_type == R_XTENSA_PLT)
       && (input_section->flags & SEC_ALLOC) != 0
@@ -5264,9 +5300,27 @@ relax_property_section (abfd, sec, link_info)
             relaxed; shrinking _raw_size means that these checks will
             not be unnecessarily lax.)  */
          sec->_raw_size = sec->_cooked_size;
+
+         if (xtensa_is_littable_section (sec))
+           {
+             bfd *dynobj = elf_hash_table (link_info)->dynobj;
+             if (dynobj)
+               {
+                 asection *sgotloc =
+                   bfd_get_section_by_name (dynobj, ".got.loc");
+                 if (sgotloc)
+                   {
+                     bfd_size_type sgotloc_size =
+                       (sgotloc->_cooked_size ? sgotloc->_cooked_size
+                        : sgotloc->_raw_size);
+                     sgotloc->_cooked_size = sgotloc_size - removed_bytes;
+                     sgotloc->_raw_size = sgotloc_size - removed_bytes;
+                   }
+               }
+           }
        }
     }
-         
+
  error_return:
   release_internal_relocs (sec, internal_relocs);
   release_contents (sec, contents);
@@ -5584,12 +5638,42 @@ static bfd_boolean
 xtensa_is_property_section (sec)
      asection *sec;
 {
-  static int len = sizeof (".gnu.linkonce.t.") - 1;
+  static int linkonce_len = sizeof (".gnu.linkonce.") - 1;
+
+  if (strncmp (".xt.insn", sec->name, 8) == 0
+      || strncmp (".xt.lit", sec->name, 7) == 0)
+    return TRUE;
+
+  if (strncmp (".gnu.linkonce.", sec->name, linkonce_len) == 0)
+    {
+      if (strncmp ("x.", sec->name + linkonce_len, 2) == 0
+         || strncmp ("p.", sec->name + linkonce_len, 2) == 0)
+       return TRUE;
+      if (strstr (sec->name + linkonce_len, ".xt.insn") != NULL
+         || strstr (sec->name + linkonce_len, ".xt.lit") != NULL)
+       return TRUE;
+    }
+  return FALSE;
+}
+
+
+static bfd_boolean 
+xtensa_is_littable_section (sec)
+     asection *sec;
+{
+  static int linkonce_len = sizeof (".gnu.linkonce.") - 1;
+
+  if (strncmp (".xt.lit", sec->name, 7) == 0)
+    return TRUE;
 
-  return (strcmp (".xt.insn", sec->name) == 0
-         || strcmp (".xt.lit", sec->name) == 0
-         || strncmp (".gnu.linkonce.x.", sec->name, len) == 0
-         || strncmp (".gnu.linkonce.p.", sec->name, len) == 0);
+  if (strncmp (".gnu.linkonce.", sec->name, linkonce_len) == 0)
+    {
+      if (strncmp ("p.", sec->name + linkonce_len, 2) == 0)
+       return TRUE;
+      if (strstr (sec->name + linkonce_len, ".xt.lit") != NULL)
+       return TRUE;
+    }
+  return FALSE;
 }
 
 
@@ -5781,6 +5865,21 @@ xtensa_callback_required_dependence (abfd, sec, link_info, callback, closure)
   return ok;
 }
 
+/* The default literal sections should always be marked as "code" (i.e.,
+   SHF_EXECINSTR).  This is particularly important for the Linux kernel
+   module loader so that the literals are not placed after the text.  */
+static struct bfd_elf_special_section const elf_xtensa_special_sections[]=
+{
+  { ".literal",                0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_EXECINSTR },
+  { ".init.literal",   0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_EXECINSTR },
+  { ".fini.literal",   0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_EXECINSTR },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
+
 \f
 #ifndef ELF_ARCH
 #define TARGET_LITTLE_SYM              bfd_elf32_xtensa_le_vec
@@ -5841,5 +5940,6 @@ xtensa_callback_required_dependence (abfd, sec, link_info, callback, closure)
 #define elf_backend_reloc_type_class        elf_xtensa_reloc_type_class
 #define elf_backend_relocate_section        elf_xtensa_relocate_section
 #define elf_backend_size_dynamic_sections    elf_xtensa_size_dynamic_sections
+#define elf_backend_special_sections        elf_xtensa_special_sections
 
 #include "elf32-target.h"
index 767d89c4072e3bf797954c9cc300c1f49fa32e40..1d35a6d5d014dcbf60637b21c49e2c2fc6df23f3 100644 (file)
@@ -47,7 +47,7 @@
 #define ECOFF_64
 #include "ecoffswap.h"
 
-static int alpha_elf_dynamic_symbol_p
+static bfd_boolean alpha_elf_dynamic_symbol_p
   PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *));
 static struct bfd_hash_entry * elf64_alpha_link_hash_newfunc
   PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
@@ -269,49 +269,17 @@ struct alpha_elf_link_hash_table
 #define alpha_elf_sym_hashes(abfd) \
   ((struct alpha_elf_link_hash_entry **)elf_sym_hashes(abfd))
 
-/* Should we do dynamic things to this symbol?  */
+/* Should we do dynamic things to this symbol?  This differs from the 
+   generic version in that we never need to consider function pointer
+   equality wrt PLT entries -- we don't create a PLT entry if a symbol's
+   address is ever taken.  */
 
-static int
+static inline bfd_boolean
 alpha_elf_dynamic_symbol_p (h, info)
      struct elf_link_hash_entry *h;
      struct bfd_link_info *info;
 {
-  if (h == NULL)
-    return FALSE;
-
-  while (h->root.type == bfd_link_hash_indirect
-        || h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-  if (h->dynindx == -1)
-    return FALSE;
-
-  if (h->root.type == bfd_link_hash_undefweak
-      || h->root.type == bfd_link_hash_defweak)
-    return TRUE;
-
-  switch (ELF_ST_VISIBILITY (h->other))
-    {
-    case STV_DEFAULT:
-      break;
-    case STV_HIDDEN:
-    case STV_INTERNAL:
-      return FALSE;
-    case STV_PROTECTED:
-      if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
-        return FALSE;
-      break;
-    }
-
-  if ((info->shared && !info->symbolic)
-      || ((h->elf_link_hash_flags
-          & (ELF_LINK_HASH_DEF_DYNAMIC
-             | ELF_LINK_HASH_DEF_REGULAR
-             | ELF_LINK_HASH_REF_REGULAR))
-         == (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)))
-    return TRUE;
-
-  return FALSE;
+  return _bfd_elf_dynamic_symbol_p (h, info, 0);
 }
 
 /* Create an entry in a Alpha ELF linker hash table.  */
@@ -4504,7 +4472,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.root.type == bfd_link_hash_undefweak)
            undef_weak_ref = TRUE;
-         else if (info->shared
+         else if (!info->executable
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
            ;
@@ -5497,6 +5465,16 @@ elf64_alpha_reloc_type_class (rela)
     }
 }
 \f
+static struct bfd_elf_special_section const elf64_alpha_special_sections[]=
+{
+  { ".sdata",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+  { ".sbss",           0,      NULL,   0,
+    SHT_NOBITS,                SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
+
 /* ECOFF swapping routines.  These are used when dealing with the
    .mdebug section, which is in the ECOFF debugging format.  Copied
    from elf32-mips.c.  */
@@ -5635,6 +5613,9 @@ static const struct elf_size_info alpha_elf_size_info =
 #define elf_backend_size_info \
   alpha_elf_size_info
 
+#define elf_backend_special_sections \
+  elf64_alpha_special_sections
+
 /* A few constants that determine how the .plt section is set up.  */
 #define elf_backend_want_got_plt 0
 #define elf_backend_plt_readonly 0
index 4c88a543a37560a41fa3da8d545d7724e1210e1f..f3398c15030a513121a785df8f584a35e9ec6461 100644 (file)
@@ -956,30 +956,19 @@ elf64_hppa_dynamic_symbol_p (h, info)
      struct elf_link_hash_entry *h;
      struct bfd_link_info *info;
 {
-  if (h == NULL)
-    return FALSE;
-
-  while (h->root.type == bfd_link_hash_indirect
-        || h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-  if (h->dynindx == -1)
-    return FALSE;
-
-  if (h->root.type == bfd_link_hash_undefweak
-      || h->root.type == bfd_link_hash_defweak)
-    return TRUE;
+  /* ??? What, if anything, needs to happen wrt STV_PROTECTED symbols
+     and relocations that retrieve a function descriptor?  Assume the
+     worst for now.  */
+  if (_bfd_elf_dynamic_symbol_p (h, info, 1))
+    {
+      /* ??? Why is this here and not elsewhere is_local_label_name.  */
+      if (h->root.root.string[0] == '$' && h->root.root.string[1] == '$')
+       return FALSE;
 
-  if (h->root.root.string[0] == '$' && h->root.root.string[1] == '$')
+      return TRUE;
+    }
+  else
     return FALSE;
-
-  if ((info->shared && (!info->symbolic || info->allow_shlib_undefined))
-      || ((h->elf_link_hash_flags
-          & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR))
-         == (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)))
-    return TRUE;
-
-  return FALSE;
 }
 
 /* Mark all funtions exported by this file so that we can later allocate
@@ -2269,7 +2258,9 @@ elf64_hppa_finalize_dlt (dyn_h, data)
                   + hppa_info->opd_sec->output_offset
                   + hppa_info->opd_sec->output_section->vma);
        }
-      else if (h->root.u.def.section)
+      else if ((h->root.type == bfd_link_hash_defined
+               || h->root.type == bfd_link_hash_defweak)
+              && h->root.u.def.section)
        {
          value = h->root.u.def.value + h->root.u.def.section->output_offset;
          if (h->root.u.def.section->output_section)
@@ -2678,6 +2669,16 @@ elf64_hppa_elf_get_symbol_type (elf_sym, type)
     return type;
 }
 
+static struct bfd_elf_special_section const elf64_hppa_special_sections[]=
+{
+  { ".fini",           0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".init",           0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
+
 /* The hash bucket size is the standard one, namely 4.  */
 
 const struct elf_size_info hppa64_elf_size_info =
@@ -2775,6 +2776,7 @@ const struct elf_size_info hppa64_elf_size_info =
 #define elf_backend_get_symbol_type    elf64_hppa_elf_get_symbol_type
 #define elf_backend_reloc_type_class   elf64_hppa_reloc_type_class
 #define elf_backend_rela_normal                1
+#define elf_backend_special_sections   elf64_hppa_special_sections
 
 #include "elf64-target.h"
 
@@ -2783,5 +2785,7 @@ const struct elf_size_info hppa64_elf_size_info =
 #undef TARGET_BIG_NAME
 #define TARGET_BIG_NAME                        "elf64-hppa-linux"
 
+#undef elf_backend_special_sections
+
 #define INCLUDED_TARGET_FILE 1
 #include "elf64-target.h"
index bc331c8be66dbcdfdea2ed438fcb797c7270b456..50cb5d878a9df02aba3c6b1c1766ebc9ce5147b5 100644 (file)
@@ -28,6 +28,7 @@
 #include "bfdlink.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
+#include "elf/ppc.h"
 #include "elf/ppc64.h"
 #include "elf64-ppc.h"
 
@@ -69,6 +70,7 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
 #define elf_backend_can_refcount 1
 #define elf_backend_rela_normal 1
 
+#define bfd_elf64_mkobject                   ppc64_elf_mkobject
 #define bfd_elf64_bfd_reloc_type_lookup              ppc64_elf_reloc_type_lookup
 #define bfd_elf64_bfd_merge_private_bfd_data  ppc64_elf_merge_private_bfd_data
 #define bfd_elf64_new_section_hook           ppc64_elf_new_section_hook
@@ -89,6 +91,7 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
 #define elf_backend_finish_dynamic_symbol     ppc64_elf_finish_dynamic_symbol
 #define elf_backend_reloc_type_class         ppc64_elf_reloc_type_class
 #define elf_backend_finish_dynamic_sections   ppc64_elf_finish_dynamic_sections
+#define elf_backend_special_sections         ppc64_elf_special_sections
 
 /* The name of the dynamic interpreter.  This is put in the .interp
    section.  */
@@ -2316,6 +2319,40 @@ ppc64_elf_unhandled_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
   return bfd_reloc_dangerous;
 }
 
+struct ppc64_elf_obj_tdata
+{
+  struct elf_obj_tdata elf;
+
+  /* Shortcuts to dynamic linker sections.  */
+  asection *got;
+  asection *relgot;
+
+  /* TLS local dynamic got entry handling.  Suppose for multiple GOT
+     sections means we potentially need one of these for each input bfd.  */
+  union {
+    bfd_signed_vma refcount;
+    bfd_vma offset;
+  } tlsld_got;
+};
+
+#define ppc64_elf_tdata(bfd) \
+  ((struct ppc64_elf_obj_tdata *) (bfd)->tdata.any)
+
+#define ppc64_tlsld_got(bfd) \
+  (&ppc64_elf_tdata (bfd)->tlsld_got)
+
+/* Override the generic function because we store some extras.  */
+
+static bfd_boolean
+ppc64_elf_mkobject (bfd *abfd)
+{
+  bfd_size_type amt = sizeof (struct ppc64_elf_obj_tdata);
+  abfd->tdata.any = bfd_zalloc (abfd, amt);
+  if (abfd->tdata.any == NULL)
+    return FALSE;
+  return TRUE;
+}
+
 /* Fix bad default arch selected for a 64 bit input bfd when the
    default is 32 bit.  */
 
@@ -2365,6 +2402,26 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
   return TRUE;
 }
 
+/* Add extra PPC sections.  */
+
+static struct bfd_elf_special_section const ppc64_elf_special_sections[]=
+{
+  { ".sdata",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".sbss",           0,      NULL,   0,
+    SHT_NOBITS,                SHF_ALLOC + SHF_WRITE },
+  { ".plt",            0,      NULL,   0,
+    SHT_NOBITS,                0 },
+  { ".toc",            0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".toc1",           0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE },
+  { ".tocbss",         0,      NULL,   0,
+    SHT_NOBITS,                SHF_ALLOC + SHF_WRITE },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
+
 struct _ppc64_elf_section_data
 {
   struct bfd_elf_section_data elf;
@@ -2497,16 +2554,24 @@ struct got_entry
   /* The symbol addend that we'll be placing in the GOT.  */
   bfd_vma addend;
 
+  /* Unlike other ELF targets, we use separate GOT entries for the same
+     symbol referenced from different input files.  This is to support
+     automatic multiple TOC/GOT sections, where the TOC base can vary
+     from one input file to another.
+
+     Point to the BFD owning this GOT entry.  */
+  bfd *owner;
+
+  /* Zero for non-tls entries, or TLS_TLS and one of TLS_GD, TLS_LD,
+     TLS_TPREL or TLS_DTPREL for tls entries.  */
+  char tls_type;
+
   /* Reference count until size_dynamic_sections, GOT offset thereafter.  */
   union
     {
       bfd_signed_vma refcount;
       bfd_vma offset;
     } got;
-
-  /* Zero for non-tls entries, or TLS_TLS and one of TLS_GD, TLS_LD,
-     TLS_TPREL or TLS_DTPREL for tls entries.  */
-  char tls_type;
 };
 
 /* The same for PLT.  */
@@ -2535,7 +2600,18 @@ struct plt_entry
 /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
    copying dynamic variables from a shared lib into an app's dynbss
    section, and instead use a dynamic relocation to point into the
-   shared lib.  */
+   shared lib.  With code that gcc generates, it's vital that this be
+   enabled;  In the PowerPC64 ABI, the address of a function is actually
+   the address of a function descriptor, which resides in the .opd
+   section.  gcc uses the descriptor directly rather than going via the
+   GOT as some other ABI's do, which means that initialized function
+   pointers must reference the descriptor.  Thus, a function pointer
+   initialized to the address of a function in a shared library will
+   either require a copy reloc, or a dynamic reloc.  Using a copy reloc
+   redefines the function desctriptor symbol to point to the copy.  This
+   presents a problem as a plt entry for that function is also
+   initialized from the function descriptor symbol and the copy reloc
+   may not be initialized first.  */
 #define ELIMINATE_COPY_RELOCS 1
 
 /* Section name for stubs is the associated section name plus this
@@ -2719,7 +2795,6 @@ struct ppc_link_hash_table
 
   /* Short-cuts to get to dynamic linker sections.  */
   asection *got;
-  asection *relgot;
   asection *plt;
   asection *relplt;
   asection *dynbss;
@@ -2735,12 +2810,6 @@ struct ppc_link_hash_table
   /* Shortcut to .__tls_get_addr.  */
   struct elf_link_hash_entry *tls_get_addr;
 
-  /* TLS local dynamic got entry handling.  */
-  union {
-    bfd_signed_vma refcount;
-    bfd_vma offset;
-  } tlsld_got;
-
   /* Statistics.  */
   unsigned long stub_count[ppc_stub_plt_call];
 
@@ -2928,6 +2997,23 @@ ppc64_elf_link_hash_table_free (struct bfd_link_hash_table *hash)
   _bfd_generic_link_hash_table_free (hash);
 }
 
+/* Satisfy the ELF linker by filling in some fields in our fake bfd.  */
+
+void
+ppc64_elf_init_stub_bfd (bfd *abfd, struct bfd_link_info *info)
+{
+  struct ppc_link_hash_table *htab;
+
+  elf_elfheader (abfd)->e_ident[EI_CLASS] = ELFCLASS64;
+
+/* Always hook our dynamic sections into the first bfd, which is the
+   linker created stub bfd.  This ensures that the GOT header is at
+   the start of the output TOC section.  */
+  htab = ppc_hash_table (info);
+  htab->stub_bfd = abfd;
+  htab->elf.dynobj = abfd;
+}
+
 /* Build a name for an entry in the stub hash table.  */
 
 static char *
@@ -3122,30 +3208,43 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info)
   return TRUE;
 }
 
-/* Create .got and .rela.got sections in DYNOBJ, and set up
-   shortcuts to them in our hash table.  */
+/* Create .got and .rela.got sections in ABFD, and .got in dynobj if
+   not already done.  */
 
 static bfd_boolean
-create_got_section (bfd *dynobj, struct bfd_link_info *info)
+create_got_section (bfd *abfd, struct bfd_link_info *info)
 {
-  struct ppc_link_hash_table *htab;
-
-  if (! _bfd_elf_create_got_section (dynobj, info))
-    return FALSE;
+  asection *got, *relgot;
+  flagword flags;
+  struct ppc_link_hash_table *htab = ppc_hash_table (info);
 
-  htab = ppc_hash_table (info);
-  htab->got = bfd_get_section_by_name (dynobj, ".got");
   if (!htab->got)
-    abort ();
+    {
+      if (! _bfd_elf_create_got_section (htab->elf.dynobj, info))
+       return FALSE;
+
+      htab->got = bfd_get_section_by_name (htab->elf.dynobj, ".got");
+      if (!htab->got)
+       abort ();
+    }
+
+  flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+          | SEC_LINKER_CREATED);
+
+  got = bfd_make_section (abfd, ".got");
+  if (!got
+      || !bfd_set_section_flags (abfd, got, flags)
+      || !bfd_set_section_alignment (abfd, got, 3))
+    return FALSE;
 
-  htab->relgot = bfd_make_section (dynobj, ".rela.got");
-  if (!htab->relgot
-      || ! bfd_set_section_flags (dynobj, htab->relgot,
-                                 (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
-                                  | SEC_IN_MEMORY | SEC_LINKER_CREATED
-                                  | SEC_READONLY))
-      || ! bfd_set_section_alignment (dynobj, htab->relgot, 3))
+  relgot = bfd_make_section (abfd, ".rela.got");
+  if (!relgot
+      || ! bfd_set_section_flags (abfd, relgot, flags | SEC_READONLY)
+      || ! bfd_set_section_alignment (abfd, relgot, 3))
     return FALSE;
+
+  ppc64_elf_tdata (abfd)->got = got;
+  ppc64_elf_tdata (abfd)->relgot = relgot;
   return TRUE;
 }
 
@@ -3156,20 +3255,19 @@ ppc64_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
 {
   struct ppc_link_hash_table *htab;
 
-  htab = ppc_hash_table (info);
-  if (!htab->got && !create_got_section (dynobj, info))
-    return FALSE;
-
   if (!_bfd_elf_create_dynamic_sections (dynobj, info))
     return FALSE;
 
+  htab = ppc_hash_table (info);
+  if (!htab->got)
+    htab->got = bfd_get_section_by_name (dynobj, ".got");
   htab->plt = bfd_get_section_by_name (dynobj, ".plt");
   htab->relplt = bfd_get_section_by_name (dynobj, ".rela.plt");
   htab->dynbss = bfd_get_section_by_name (dynobj, ".dynbss");
   if (!info->shared)
     htab->relbss = bfd_get_section_by_name (dynobj, ".rela.bss");
 
-  if (!htab->plt || !htab->relplt || !htab->dynbss
+  if (!htab->got || !htab->plt || !htab->relplt || !htab->dynbss
       || (!info->shared && !htab->relbss))
     abort ();
 
@@ -3260,6 +3358,7 @@ ppc64_elf_copy_indirect_symbol (struct elf_backend_data *bed ATTRIBUTE_UNUSED,
 
              for (dent = edir->elf.got.glist; dent != NULL; dent = dent->next)
                if (dent->addend == ent->addend
+                   && dent->owner == ent->owner
                    && dent->tls_type == ent->tls_type)
                  {
                    dent->got.refcount += ent->got.refcount;
@@ -3360,7 +3459,9 @@ update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
       struct got_entry *ent;
 
       for (ent = local_got_ents[r_symndx]; ent != NULL; ent = ent->next)
-       if (ent->addend == r_addend && ent->tls_type == tls_type)
+       if (ent->addend == r_addend
+           && ent->owner == abfd
+           && ent->tls_type == tls_type)
          break;
       if (ent == NULL)
        {
@@ -3370,6 +3471,7 @@ update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
            return FALSE;
          ent->next = local_got_ents[r_symndx];
          ent->addend = r_addend;
+         ent->owner = abfd;
          ent->tls_type = tls_type;
          ent->got.refcount = 0;
          local_got_ents[r_symndx] = ent;
@@ -3407,6 +3509,31 @@ update_plt_info (bfd *abfd, struct ppc_link_hash_entry *eh, bfd_vma addend)
   return TRUE;
 }
 
+/* Find the function descriptor hash entry from the given function code
+   hash entry FH.  Link the entries via their OH fields.  */
+static struct ppc_link_hash_entry *
+get_fdh (struct ppc_link_hash_entry *fh, struct ppc_link_hash_table *htab)
+{
+  struct ppc_link_hash_entry *fdh = (struct ppc_link_hash_entry *) fh->oh;
+
+  if (fdh == NULL)
+    {
+      const char *fd_name = fh->elf.root.root.string + 1;
+
+      fdh = (struct ppc_link_hash_entry *)
+       elf_link_hash_lookup (&htab->elf, fd_name, FALSE, FALSE, FALSE);
+      if (fdh != NULL)
+       {
+         fdh->is_func_descriptor = 1;
+         fdh->oh = &fh->elf;
+         fh->is_func = 1;
+         fh->oh = &fdh->elf;
+       }
+    }
+
+  return fdh;
+}
+
 /* Look through the relocs for a section during the first phase, and
    calculate needed space in the global offset table, procedure
    linkage table, and dynamic reloc sections.  */
@@ -3460,8 +3587,6 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
       ppc64_elf_section_data (sec)->opd.func_sec = opd_sym_map;
     }
 
-  if (htab->elf.dynobj == NULL)
-    htab->elf.dynobj = abfd;
   if (htab->sfpr == NULL
       && !create_linkage_sections (htab->elf.dynobj, info))
     return FALSE;
@@ -3487,7 +3612,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
        case R_PPC64_GOT_TLSLD16_LO:
        case R_PPC64_GOT_TLSLD16_HI:
        case R_PPC64_GOT_TLSLD16_HA:
-         htab->tlsld_got.refcount += 1;
+         ppc64_tlsld_got (abfd)->refcount += 1;
          tls_type = TLS_TLS | TLS_LD;
          goto dogottls;
 
@@ -3524,8 +3649,8 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
        case R_PPC64_GOT16_LO_DS:
          /* This symbol requires a global offset table entry.  */
          sec->has_gp_reloc = 1;
-         if (htab->got == NULL
-             && !create_got_section (htab->elf.dynobj, info))
+         if (ppc64_elf_tdata (abfd)->got == NULL
+             && !create_got_section (abfd, info))
            return FALSE;
 
          if (h != NULL)
@@ -3536,6 +3661,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
              eh = (struct ppc_link_hash_entry *) h;
              for (ent = eh->elf.got.glist; ent != NULL; ent = ent->next)
                if (ent->addend == rel->r_addend
+                   && ent->owner == abfd
                    && ent->tls_type == tls_type)
                  break;
              if (ent == NULL)
@@ -3546,6 +3672,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
                    return FALSE;
                  ent->next = eh->elf.got.glist;
                  ent->addend = rel->r_addend;
+                 ent->owner = abfd;
                  ent->tls_type = tls_type;
                  ent->got.refcount = 0;
                  eh->elf.got.glist = ent;
@@ -3735,19 +3862,8 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
              && h != NULL
              && h->root.root.string[0] == '.'
              && h->root.root.string[1] != 0)
-           {
-             struct elf_link_hash_entry *fdh;
+           get_fdh ((struct ppc_link_hash_entry *) h, htab);
 
-             fdh = elf_link_hash_lookup (&htab->elf, h->root.root.string + 1,
-                                         FALSE, FALSE, FALSE);
-             if (fdh != NULL)
-               {
-                 ((struct ppc_link_hash_entry *) fdh)->is_func_descriptor = 1;
-                 ((struct ppc_link_hash_entry *) fdh)->oh = h;
-                 ((struct ppc_link_hash_entry *) h)->is_func = 1;
-                 ((struct ppc_link_hash_entry *) h)->oh = fdh;
-               }
-           }
          if (opd_sym_map != NULL
              && h == NULL
              && rel + 1 < rel_end
@@ -4054,7 +4170,7 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
        case R_PPC64_GOT_TLSLD16_LO:
        case R_PPC64_GOT_TLSLD16_HI:
        case R_PPC64_GOT_TLSLD16_HA:
-         htab->tlsld_got.refcount -= 1;
+         ppc64_tlsld_got (abfd)->refcount -= 1;
          tls_type = TLS_TLS | TLS_LD;
          goto dogot;
 
@@ -4096,6 +4212,7 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
 
            for (; ent != NULL; ent = ent->next)
              if (ent->addend == rel->r_addend
+                 && ent->owner == abfd
                  && ent->tls_type == tls_type)
                break;
            if (ent == NULL)
@@ -4144,113 +4261,118 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
   struct bfd_link_info *info;
   struct ppc_link_hash_table *htab;
   struct plt_entry *ent;
+  struct ppc_link_hash_entry *fh;
+  struct ppc_link_hash_entry *fdh;
+  bfd_boolean force_local;
 
-  if (h->root.type == bfd_link_hash_indirect)
+  fh = (struct ppc_link_hash_entry *) h;
+  if (fh->elf.root.type == bfd_link_hash_indirect)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+  if (fh->elf.root.type == bfd_link_hash_warning)
+    fh = (struct ppc_link_hash_entry *) fh->elf.root.u.i.link;
 
   info = inf;
   htab = ppc_hash_table (info);
 
   /* If this is a function code symbol, transfer dynamic linking
      information to the function descriptor symbol.  */
-  if (!((struct ppc_link_hash_entry *) h)->is_func)
+  if (!fh->is_func)
     return TRUE;
 
-  if (h->root.type == bfd_link_hash_undefweak
-      && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR))
+  if (fh->elf.root.type == bfd_link_hash_undefweak
+      && (fh->elf.elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR))
     htab->have_undefweak = TRUE;
 
-  for (ent = h->plt.plist; ent != NULL; ent = ent->next)
+  for (ent = fh->elf.plt.plist; ent != NULL; ent = ent->next)
     if (ent->plt.refcount > 0)
       break;
-  if (ent != NULL
-      && h->root.root.string[0] == '.'
-      && h->root.root.string[1] != '\0')
-    {
-      struct elf_link_hash_entry *fdh = ((struct ppc_link_hash_entry *) h)->oh;
-      bfd_boolean force_local;
+  if (ent == NULL
+      || fh->elf.root.root.string[0] != '.'
+      || fh->elf.root.root.string[1] == '\0')
+    return TRUE;
 
-      /* Find the corresponding function descriptor symbol.  Create it
-        as undefined if necessary.  */
+  /* Find the corresponding function descriptor symbol.  Create it
+     as undefined if necessary.  */
 
-      if (fdh == NULL)
-       fdh = elf_link_hash_lookup (&htab->elf, h->root.root.string + 1,
-                                   FALSE, FALSE, TRUE);
+  fdh = get_fdh (fh, htab);
+  if (fdh != NULL)
+    while (fdh->elf.root.type == bfd_link_hash_indirect
+          || fdh->elf.root.type == bfd_link_hash_warning)
+      fdh = (struct ppc_link_hash_entry *) fdh->elf.root.u.i.link;
 
-      if (fdh == NULL
-         && info->shared
-         && (h->root.type == bfd_link_hash_undefined
-             || h->root.type == bfd_link_hash_undefweak))
+  if (fdh == NULL
+      && info->shared
+      && (fh->elf.root.type == bfd_link_hash_undefined
+         || fh->elf.root.type == bfd_link_hash_undefweak))
+    {
+      bfd *abfd;
+      asymbol *newsym;
+      struct bfd_link_hash_entry *bh;
+
+      abfd = fh->elf.root.u.undef.abfd;
+      newsym = bfd_make_empty_symbol (abfd);
+      newsym->name = fh->elf.root.root.string + 1;
+      newsym->section = bfd_und_section_ptr;
+      newsym->value = 0;
+      newsym->flags = BSF_OBJECT;
+      if (fh->elf.root.type == bfd_link_hash_undefweak)
+       newsym->flags |= BSF_WEAK;
+
+      bh = &fdh->elf.root;
+      if ( !(_bfd_generic_link_add_one_symbol
+            (info, abfd, newsym->name, newsym->flags,
+             newsym->section, newsym->value, NULL, FALSE, FALSE, &bh)))
        {
-         bfd *abfd;
-         asymbol *newsym;
-         struct bfd_link_hash_entry *bh;
-
-         abfd = h->root.u.undef.abfd;
-         newsym = bfd_make_empty_symbol (abfd);
-         newsym->name = h->root.root.string + 1;
-         newsym->section = bfd_und_section_ptr;
-         newsym->value = 0;
-         newsym->flags = BSF_OBJECT;
-         if (h->root.type == bfd_link_hash_undefweak)
-           newsym->flags |= BSF_WEAK;
-
-         bh = &fdh->root;
-         if ( !(_bfd_generic_link_add_one_symbol
-                (info, abfd, newsym->name, newsym->flags,
-                 newsym->section, newsym->value, NULL, FALSE, FALSE, &bh)))
-           {
-             return FALSE;
-           }
-         fdh = (struct elf_link_hash_entry *) bh;
-         fdh->elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
+         return FALSE;
        }
+      fdh = (struct ppc_link_hash_entry *) bh;
+      fdh->elf.elf_link_hash_flags &= ~ELF_LINK_NON_ELF;
+      fdh->elf.size = 24;
+      fdh->elf.type = STT_OBJECT;
+    }
 
-      if (fdh != NULL
-         && (fdh->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0
-         && (info->shared
-             || (fdh->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
-             || (fdh->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0))
+  if (fdh != NULL
+      && (fdh->elf.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0
+      && (info->shared
+         || (fdh->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+         || (fdh->elf.elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
+         || (fdh->elf.root.type == bfd_link_hash_undefweak
+             && ELF_ST_VISIBILITY (fdh->elf.other) == STV_DEFAULT)))
+    {
+      if (fdh->elf.dynindx == -1)
+       if (! bfd_elf64_link_record_dynamic_symbol (info, &fdh->elf))
+         return FALSE;
+      fdh->elf.elf_link_hash_flags
+       |= (fh->elf.elf_link_hash_flags & (ELF_LINK_HASH_REF_REGULAR
+                                     | ELF_LINK_HASH_REF_DYNAMIC
+                                     | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+                                     | ELF_LINK_NON_GOT_REF));
+      if (ELF_ST_VISIBILITY (fh->elf.other) == STV_DEFAULT)
        {
-         if (fdh->dynindx == -1)
-           if (! bfd_elf64_link_record_dynamic_symbol (info, fdh))
-             return FALSE;
-         fdh->elf_link_hash_flags |= (h->elf_link_hash_flags
-                                      & (ELF_LINK_HASH_REF_REGULAR
-                                         | ELF_LINK_HASH_REF_DYNAMIC
-                                         | ELF_LINK_HASH_REF_REGULAR_NONWEAK
-                                         | ELF_LINK_NON_GOT_REF));
-         if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
-           {
-             fdh->plt.plist = h->plt.plist;
-             fdh->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
-           }
-         ((struct ppc_link_hash_entry *) fdh)->is_func_descriptor = 1;
-         ((struct ppc_link_hash_entry *) fdh)->oh = h;
-         ((struct ppc_link_hash_entry *) h)->oh = fdh;
+         fdh->elf.plt.plist = fh->elf.plt.plist;
+         fdh->elf.elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
        }
-
-      /* Now that the info is on the function descriptor, clear the
-        function code sym info.  Any function code syms for which we
-        don't have a definition in a regular file, we force local.
-        This prevents a shared library from exporting syms that have
-        been imported from another library.  Function code syms that
-        are really in the library we must leave global to prevent the
-        linker dragging in a definition from a static library.  */
-      force_local = (info->shared
-                    && ((h->elf_link_hash_flags
-                         & ELF_LINK_HASH_DEF_REGULAR) == 0
-                        || fdh == NULL
-                        || (fdh->elf_link_hash_flags
-                            & ELF_LINK_HASH_DEF_REGULAR) == 0
-                        || (fdh->elf_link_hash_flags
-                            & ELF_LINK_FORCED_LOCAL) != 0));
-      _bfd_elf_link_hash_hide_symbol (info, h, force_local);
+      fdh->is_func_descriptor = 1;
+      fdh->oh = &fh->elf;
+      fh->oh = &fdh->elf;
     }
 
+  /* Now that the info is on the function descriptor, clear the
+     function code sym info.  Any function code syms for which we
+     don't have a definition in a regular file, we force local.
+     This prevents a shared library from exporting syms that have
+     been imported from another library.  Function code syms that
+     are really in the library we must leave global to prevent the
+     linker dragging in a definition from a static library.  */
+  force_local
+    = (info->shared
+       && ((fh->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
+          || fdh == NULL
+          || (fdh->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
+          || (fdh->elf.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0));
+  _bfd_elf_link_hash_hide_symbol (info, &fh->elf, force_local);
+
   return TRUE;
 }
 
@@ -4287,7 +4409,7 @@ ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED,
       sym[8] = i % 10 + '0';
       h = elf_link_hash_lookup (&htab->elf, sym, FALSE, FALSE, TRUE);
       if (h != NULL
-         && h->root.type == bfd_link_hash_undefined)
+         && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
        {
          if (lowest_savef > i)
            lowest_savef = i;
@@ -4296,7 +4418,7 @@ ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED,
          h->root.u.def.value = (i - lowest_savef) * 4;
          h->type = STT_FUNC;
          h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
-         _bfd_elf_link_hash_hide_symbol (info, h, info->shared);
+         _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
        }
     }
 
@@ -4307,7 +4429,7 @@ ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED,
       sym[8] = i % 10 + '0';
       h = elf_link_hash_lookup (&htab->elf, sym, FALSE, FALSE, TRUE);
       if (h != NULL
-         && h->root.type == bfd_link_hash_undefined)
+         && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
        {
          if (lowest_restf > i)
            lowest_restf = i;
@@ -4317,7 +4439,7 @@ ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED,
                                 + (i - lowest_restf) * 4);
          h->type = STT_FUNC;
          h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
-         _bfd_elf_link_hash_hide_symbol (info, h, info->shared);
+         _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
        }
     }
 
@@ -4426,9 +4548,6 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
       return TRUE;
     }
 
-  /* This is a reference to a symbol defined by a dynamic object which
-     is not a function.  */
-
   /* If we are creating a shared library, we must presume that the
      only references to the symbol are via the global offset table.
      For such cases we need not do anything here; the relocations will
@@ -4463,6 +4582,12 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
        }
     }
 
+  if (h->plt.plist != NULL)
+    return TRUE;
+
+  /* This is a reference to a symbol defined by a dynamic object which
+     is not a function.  */
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
@@ -4764,7 +4889,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
       need_edit = FALSE;
       offset = 0;
       relend = relstart + sec->reloc_count;
-      for (rel = relstart; rel < relend; rel++)
+      for (rel = relstart; rel < relend; )
        {
          enum elf_ppc64_reloc_type r_type;
          unsigned long r_symndx;
@@ -4775,26 +4900,9 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
          /* .opd contains a regular array of 24 byte entries.  We're
             only interested in the reloc pointing to a function entry
             point.  */
-         r_type = ELF64_R_TYPE (rel->r_info);
-         if (r_type == R_PPC64_TOC)
-           continue;
-
-         if (r_type != R_PPC64_ADDR64)
-           {
-             (*_bfd_error_handler)
-               (_("%s: unexpected reloc type %u in .opd section"),
-                bfd_archive_filename (ibfd), r_type);
-             need_edit = FALSE;
-             break;
-           }
-
-         if (rel + 1 >= relend)
-           continue;
-         r_type = ELF64_R_TYPE ((rel + 1)->r_info);
-         if (r_type != R_PPC64_TOC)
-           continue;
-
-         if (rel->r_offset != offset)
+         if (rel->r_offset != offset
+             || rel + 1 >= relend
+             || (rel + 1)->r_offset != offset + 8)
            {
              /* If someone messes with .opd alignment then after a
                 "ld -r" we might have padding in the middle of .opd.
@@ -4808,10 +4916,20 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
              break;
            }
 
+         if ((r_type = ELF64_R_TYPE (rel->r_info)) != R_PPC64_ADDR64
+             || (r_type = ELF64_R_TYPE ((rel + 1)->r_info)) != R_PPC64_TOC)
+           {
+             (*_bfd_error_handler)
+               (_("%s: unexpected reloc type %u in .opd section"),
+                bfd_archive_filename (ibfd), r_type);
+             need_edit = FALSE;
+             break;
+           }
+
          r_symndx = ELF64_R_SYM (rel->r_info);
          if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
                          r_symndx, ibfd))
-           goto error_free_rel;
+           goto error_ret;
 
          if (sym_sec == NULL || sym_sec->owner == NULL)
            {
@@ -4841,6 +4959,11 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
            need_edit = TRUE;
 
          offset += 24;
+         rel += 2;
+         /* Allow for the possibility of a reloc on the third word.  */
+         if (rel < relend
+             && rel->r_offset == offset - 8)
+           rel += 1;
        }
 
       if (need_edit)
@@ -4860,10 +4983,10 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
                  || !bfd_get_section_contents (ibfd, sec, loc, 0,
                                                sec->_raw_size))
                {
+               error_ret:
                  if (local_syms != NULL
                      && symtab_hdr->contents != (unsigned char *) local_syms)
                    free (local_syms);
-               error_free_rel:
                  if (elf_section_data (sec)->relocs != relstart)
                    free (relstart);
                  return FALSE;
@@ -4881,16 +5004,22 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
          offset = 0;
          for (rel = relstart; rel < relend; rel++)
            {
+             unsigned long r_symndx;
+             asection *sym_sec;
+             struct elf_link_hash_entry *h;
+             Elf_Internal_Sym *sym;
+
+             r_symndx = ELF64_R_SYM (rel->r_info);
+             if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
+                             r_symndx, ibfd))  
+               goto error_ret;
+
              if (rel->r_offset == offset)
                {
-                 unsigned long r_symndx;
-                 asection *sym_sec;
-                 struct elf_link_hash_entry *h;
-                 Elf_Internal_Sym *sym;
-
-                 r_symndx = ELF64_R_SYM (rel->r_info);
-                 get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
-                            r_symndx, ibfd);
+                 struct ppc_link_hash_entry *fdh = NULL;
+                 if (h != NULL)
+                   fdh = get_fdh ((struct ppc_link_hash_entry *) h,
+                                  ppc_hash_table (info));
 
                  skip = (sym_sec->owner != ibfd
                          || sym_sec->output_section == bfd_abs_section_ptr);
@@ -4900,27 +5029,6 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
                        {
                          /* Arrange for the function descriptor sym
                             to be dropped.  */
-                         struct ppc_link_hash_entry *fdh;
-                         struct ppc_link_hash_entry *fh;
-
-                         fh = (struct ppc_link_hash_entry *) h;
-                         fdh = (struct ppc_link_hash_entry *) fh->oh;
-                         if (fdh == NULL)
-                           {
-                             const char *fd_name;
-                             struct ppc_link_hash_table *htab;
-
-                             fd_name = h->root.root.string + 1;
-                             htab = ppc_hash_table (info);
-                             fdh = (struct ppc_link_hash_entry *)
-                               elf_link_hash_lookup (&htab->elf, fd_name,
-                                                     FALSE, FALSE, FALSE);
-                             fdh->is_func_descriptor = 1;
-                             fdh->oh = &fh->elf;
-                             fh->is_func = 1;
-                             fh->oh = &fdh->elf;
-                           }
-
                          fdh->elf.root.u.def.value = 0;
                          fdh->elf.root.u.def.section = sym_sec;
                        }
@@ -4935,27 +5043,6 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
                             to this location in the opd section.
                             We've checked above that opd relocs are
                             ordered.  */
-                         struct ppc_link_hash_entry *fdh;
-                         struct ppc_link_hash_entry *fh;
-
-                         fh = (struct ppc_link_hash_entry *) h;
-                         fdh = (struct ppc_link_hash_entry *) fh->oh;
-                         if (fdh == NULL)
-                           {
-                             const char *fd_name;
-                             struct ppc_link_hash_table *htab;
-
-                             fd_name = h->root.root.string + 1;
-                             htab = ppc_hash_table (info);
-                             fdh = (struct ppc_link_hash_entry *)
-                               elf_link_hash_lookup (&htab->elf, fd_name,
-                                                     FALSE, FALSE, FALSE);
-                             fdh->is_func_descriptor = 1;
-                             fdh->oh = &fh->elf;
-                             fh->is_func = 1;
-                             fh->oh = &fdh->elf;
-                           }
-
                          fdh->elf.root.u.def.value = wptr - sec->contents;
                        }
                      else
@@ -4977,11 +5064,41 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
                  offset += 24;
                }
 
-             /* We need to adjust any reloc offsets to point to the
-                new opd entries.  While we're at it, we may as well
-                remove redundant relocs.  */
-             if (!skip)
+             if (skip)
+               {
+                 BFD_ASSERT (MUST_BE_DYN_RELOC (ELF64_R_TYPE (rel->r_info)));
+                 if (info->shared)
+                   {
+                     /* We won't be needing dynamic relocs here.  */
+                     struct ppc_dyn_relocs **pp;
+                     struct ppc_dyn_relocs *p;
+
+                     if (h != NULL)
+                       pp = &((struct ppc_link_hash_entry *) h)->dyn_relocs;
+                     else if (sym_sec != NULL)
+                       pp = ((struct ppc_dyn_relocs **)
+                             &elf_section_data (sym_sec)->local_dynrel);
+                     else
+                       pp = ((struct ppc_dyn_relocs **)
+                             &elf_section_data (sec)->local_dynrel);
+                     while ((p = *pp) != NULL)
+                       {
+                         if (p->sec == sec)
+                           {
+                             p->count -= 1;
+                             if (p->count == 0)
+                               *pp = p->next;  
+                             break;
+                           }
+                         pp = &p->next;
+                       }
+                   }
+               }
+             else
                {
+                 /* We need to adjust any reloc offsets to point to the
+                    new opd entries.  While we're at it, we may as well
+                    remove redundant relocs.  */
                  rel->r_offset += wptr - rptr;
                  if (write_rel != rel)
                    memcpy (write_rel, rel, sizeof (*rel));
@@ -5138,7 +5255,7 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
                    /* These relocs should never be against a symbol
                       defined in a shared lib.  Leave them alone if
                       that turns out to be the case.  */
-                   htab->tlsld_got.refcount -= 1;
+                   ppc64_tlsld_got (ibfd)->refcount -= 1;
                    if (!is_local)
                      continue;
 
@@ -5276,6 +5393,7 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
 
                    for (; ent != NULL; ent = ent->next)
                      if (ent->addend == rel->r_addend
+                         && ent->owner == ibfd
                          && ent->tls_type == tls_type)
                        break;
                    if (ent == NULL)
@@ -5431,7 +5549,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
          for (ent = h->got.glist; ent != NULL; ent = ent->next)
            if (ent->got.refcount > 0
                && (ent->tls_type & TLS_TPREL) != 0
-               && ent->addend == gent->addend)
+               && ent->addend == gent->addend
+               && ent->owner == gent->owner)
              {
                gent->got.refcount = 0;
                break;
@@ -5460,11 +5579,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
        if ((gent->tls_type & TLS_LD) != 0
            && !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC))
          {
-           gent->got.offset = htab->tlsld_got.offset;
+           gent->got.offset = ppc64_tlsld_got (gent->owner)->offset;
            continue;
          }
 
-       s = htab->got;
+       s = ppc64_elf_tdata (gent->owner)->got;
        gent->got.offset = s->_raw_size;
        s->_raw_size
          += (gent->tls_type & eh->tls_mask & (TLS_GD | TLS_LD)) ? 16 : 8;
@@ -5473,7 +5592,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
             || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))
            && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
                || h->root.type != bfd_link_hash_undefweak))
-         htab->relgot->_raw_size
+         ppc64_elf_tdata (gent->owner)->relgot->_raw_size
            += (gent->tls_type & eh->tls_mask & TLS_GD
                ? 2 * sizeof (Elf64_External_Rela)
                : sizeof (Elf64_External_Rela));
@@ -5618,16 +5737,6 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
        }
     }
 
-  if (htab->tlsld_got.refcount > 0)
-    {
-      htab->tlsld_got.offset = htab->got->_raw_size;
-      htab->got->_raw_size += 16;
-      if (info->shared)
-       htab->relgot->_raw_size += sizeof (Elf64_External_Rela);
-    }
-  else
-    htab->tlsld_got.offset = (bfd_vma) -1;
-
   /* Set up .got offsets for local syms, and space for local dynamic
      relocs.  */
   for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
@@ -5642,6 +5751,20 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
       if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
        continue;
 
+      if (ppc64_tlsld_got (ibfd)->refcount > 0)
+       {
+         s = ppc64_elf_tdata (ibfd)->got;
+         ppc64_tlsld_got (ibfd)->offset = s->_raw_size;
+         s->_raw_size += 16;
+         if (info->shared)
+           {
+             srel = ppc64_elf_tdata (ibfd)->relgot;
+             srel->_raw_size += sizeof (Elf64_External_Rela);
+           }
+       }
+      else
+       ppc64_tlsld_got (ibfd)->offset = (bfd_vma) -1;
+
       for (s = ibfd->sections; s != NULL; s = s->next)
        {
          struct ppc_dyn_relocs *p;
@@ -5677,8 +5800,8 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
       locsymcount = symtab_hdr->sh_info;
       end_lgot_ents = lgot_ents + locsymcount;
       lgot_masks = (char *) end_lgot_ents;
-      s = htab->got;
-      srel = htab->relgot;
+      s = ppc64_elf_tdata (ibfd)->got;
+      srel = ppc64_elf_tdata (ibfd)->relgot;
       for (; lgot_ents < end_lgot_ents; ++lgot_ents, ++lgot_masks)
        {
          struct got_entry *ent;
@@ -5688,14 +5811,14 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
              {
                if ((ent->tls_type & *lgot_masks & TLS_LD) != 0)
                  {
-                   if (htab->tlsld_got.offset == (bfd_vma) -1)
+                   if (ppc64_tlsld_got (ibfd)->offset == (bfd_vma) -1)
                      {
-                       htab->tlsld_got.offset = s->_raw_size;
+                       ppc64_tlsld_got (ibfd)->offset = s->_raw_size;
                        s->_raw_size += 16;
                        if (info->shared)
                          srel->_raw_size += sizeof (Elf64_External_Rela);
                      }
-                   ent->got.offset = htab->tlsld_got.offset;
+                   ent->got.offset = ppc64_tlsld_got (ibfd)->offset;
                  }
                else
                  {
@@ -5738,16 +5861,8 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
       if (s == htab->brlt || s == htab->relbrlt)
        /* These haven't been allocated yet;  don't strip.  */
        continue;
-      else if (s == htab->got)
-       {
-         /* Automatic multiple tocs aren't possible if we are using the
-            GOT.  The GOT is accessed via r2, so we can't adjust r2.
-            FIXME: There's no reason why we couldn't lay out multiple
-            GOTs too.  */
-         if (s->_raw_size > elf_backend_got_header_size)
-           htab->no_multi_toc = 1;
-       }
-      else if (s == htab->plt
+      else if (s == htab->got
+              || s == htab->plt
               || s == htab->glink)
        {
          /* Strip this section if we don't need it; see the
@@ -5805,6 +5920,38 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
        return FALSE;
     }
 
+  for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+    {
+      s = ppc64_elf_tdata (ibfd)->got;
+      if (s != NULL && s != htab->got)
+       {
+         s->_cooked_size = 0;
+         if (s->_raw_size == 0)
+           _bfd_strip_section_from_output (info, s);
+         else
+           {
+             s->contents = bfd_zalloc (ibfd, s->_raw_size);
+             if (s->contents == NULL)
+               return FALSE;
+           }
+       }
+      s = ppc64_elf_tdata (ibfd)->relgot;
+      if (s != NULL)
+       {
+         s->_cooked_size = 0;
+         if (s->_raw_size == 0)
+           _bfd_strip_section_from_output (info, s);
+         else
+           {
+             s->contents = bfd_zalloc (ibfd, s->_raw_size);
+             if (s->contents == NULL)
+               return FALSE;
+             relocs = TRUE;
+             s->reloc_count = 0;
+           }
+       }
+    }
+
   if (htab->elf.dynamic_sections_created)
     {
       /* Add some entries to the .dynamic section.  We fill in the
@@ -6323,10 +6470,10 @@ ppc64_elf_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
   return 1;
 }
 
-/* The linker repeatedly calls this function for each toc input
-   section.  Group input bfds such that the toc within a group
-   is less than 64k in size.  Will break with cute linker scripts
-   that play games with dot in the output toc section.  */
+/* The linker repeatedly calls this function for each TOC input section
+   and linker generated GOT section.  Group input bfds such that the toc
+   within a group is less than 64k in size.  Will break with cute linker
+   scripts that play games with dot in the output toc section.  */
 
 void
 ppc64_elf_next_toc_section (struct bfd_link_info *info, asection *isec)
@@ -6374,6 +6521,10 @@ toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec)
   int ret;
   int branch_ok;
 
+  /* We know none of our code bearing sections will need toc stubs.  */
+  if ((isec->flags & SEC_LINKER_CREATED) != 0)
+    return 0;
+
   /* Hack for linux kernel.  .fixup contains branches, but only back to
      the function that hit an exception.  */
   branch_ok = strcmp (isec->name, ".fixup") == 0;
@@ -6385,7 +6536,7 @@ toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec)
       if (contents == NULL)
        return -1;
       if (! bfd_get_section_contents (isec->owner, isec, contents,
-                                     (file_ptr) 0, isec->_raw_size))
+                                     0, isec->_raw_size))
        {
          free (contents);
          return -1;
@@ -6401,7 +6552,7 @@ toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec)
     {
       unsigned long insn = bfd_get_32 (isec->owner, contents + i);
       /* Is this a branch?  */
-      if ((insn & (0x1f << 26)) == (18 << 26)
+      if ((insn & (0x3f << 26)) == (18 << 26)
          /* If branch and link, it's a function call.  */
          && ((insn & 1) != 0
              /* Sibling calls use a plain branch.  I don't know a way
@@ -6551,7 +6702,6 @@ group_sections (struct ppc_link_hash_table *htab,
 
 bfd_boolean
 ppc64_elf_size_stubs (bfd *output_bfd,
-                     bfd *stub_bfd,
                      struct bfd_link_info *info,
                      bfd_signed_vma group_size,
                      asection *(*add_stub_section) (const char *, asection *),
@@ -6562,7 +6712,6 @@ ppc64_elf_size_stubs (bfd *output_bfd,
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
 
   /* Stash our params away.  */
-  htab->stub_bfd = stub_bfd;
   htab->add_stub_section = add_stub_section;
   htab->layout_sections_again = layout_sections_again;
   stubs_always_before_branch = group_size < 0;
@@ -6816,10 +6965,11 @@ ppc64_elf_size_stubs (bfd *output_bfd,
       for (stub_sec = htab->stub_bfd->sections;
           stub_sec != NULL;
           stub_sec = stub_sec->next)
-       {
-         stub_sec->_raw_size = 0;
-         stub_sec->_cooked_size = 0;
-       }
+       if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+         {
+           stub_sec->_raw_size = 0;
+           stub_sec->_cooked_size = 0;
+         }
       htab->brlt->_raw_size = 0;
       htab->brlt->_cooked_size = 0;
 
@@ -6905,24 +7055,26 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
   asection *stub_sec;
   bfd_byte *p;
+  int stub_sec_count = 0;
 
   htab->emit_stub_syms = emit_stub_syms;
   for (stub_sec = htab->stub_bfd->sections;
        stub_sec != NULL;
        stub_sec = stub_sec->next)
-    {
-      bfd_size_type size;
+    if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+      {
+       bfd_size_type size;
 
-      /* Allocate memory to hold the linker stubs.  */
-      size = stub_sec->_raw_size;
-      if (size != 0)
-       {
-         stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
-         if (stub_sec->contents == NULL)
-           return FALSE;
-       }
-      stub_sec->_cooked_size = 0;
-    }
+       /* Allocate memory to hold the linker stubs.  */
+       size = stub_sec->_raw_size;
+       if (size != 0)
+         {
+           stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
+           if (stub_sec->contents == NULL)
+             return FALSE;
+         }
+       stub_sec->_cooked_size = 0;
+      }
 
   if (htab->plt != NULL)
     {
@@ -7014,10 +7166,12 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
   for (stub_sec = htab->stub_bfd->sections;
        stub_sec != NULL;
        stub_sec = stub_sec->next)
-    {
-      if (stub_sec->_raw_size != stub_sec->_cooked_size)
-       break;
-    }
+    if ((stub_sec->flags & SEC_LINKER_CREATED) == 0)
+      {
+       stub_sec_count += 1;
+       if (stub_sec->_raw_size != stub_sec->_cooked_size)
+         break;
+      }
 
   if (stub_sec != NULL
       || htab->glink->_raw_size != htab->glink->_cooked_size)
@@ -7041,7 +7195,7 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
                         "  long branch  %lu\n"
                         "  long toc adj %lu\n"
                         "  plt call     %lu"),
-              htab->stub_bfd->section_count,
+              stub_sec_count,
               htab->stub_count[ppc_stub_long_branch - 1],
               htab->stub_count[ppc_stub_long_branch_r2off - 1],
               htab->stub_count[ppc_stub_plt_branch - 1],
@@ -7135,7 +7289,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
       bfd_vma relocation;
       bfd_boolean unresolved_reloc;
       bfd_boolean warned;
-      long insn, mask;
+      unsigned long insn, mask;
       struct ppc_stub_hash_entry *stub_entry;
       bfd_vma max_br_offset;
       bfd_vma from;
@@ -7191,7 +7345,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            ;
-         else if (info->shared
+         else if (!info->executable
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            ;
@@ -7290,7 +7444,6 @@ ppc64_elf_relocate_section (bfd *output_bfd,
          if (tls_mask != 0
              && (tls_mask & TLS_TPREL) == 0)
            {
-             bfd_vma insn;
            toctprel:
              insn = bfd_get_32 (output_bfd, contents + rel->r_offset - 2);
              insn &= 31 << 21;
@@ -7316,12 +7469,12 @@ ppc64_elf_relocate_section (bfd *output_bfd,
          if (tls_mask != 0
              && (tls_mask & TLS_TPREL) == 0)
            {
-             bfd_vma insn, rtra;
+             bfd_vma rtra;
              insn = bfd_get_32 (output_bfd, contents + rel->r_offset);
-             if ((insn & ((31 << 26) | (31 << 11)))
+             if ((insn & ((0x3f << 26) | (31 << 11)))
                  == ((31 << 26) | (13 << 11)))
                rtra = insn & ((1 << 26) - (1 << 16));
-             else if ((insn & ((31 << 26) | (31 << 16)))
+             else if ((insn & ((0x3f << 26) | (31 << 16)))
                       == ((31 << 26) | (13 << 16)))
                rtra = (insn & (31 << 21)) | ((insn & (31 << 11)) << 5);
              else
@@ -7732,17 +7885,15 @@ ppc64_elf_relocate_section (bfd *output_bfd,
          {
            /* Relocation is to the entry for this symbol in the global
               offset table.  */
+           asection *got;
            bfd_vma *offp;
            bfd_vma off;
            unsigned long indx = 0;
 
-           if (htab->got == NULL)
-             abort ();
-
            if (tls_type == (TLS_TLS | TLS_LD)
                && (h == NULL
                    || !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)))
-             offp = &htab->tlsld_got.offset;
+             offp = &ppc64_tlsld_got (input_bfd)->offset;
            else
              {
                struct got_entry *ent;
@@ -7774,6 +7925,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
 
                for (; ent != NULL; ent = ent->next)
                  if (ent->addend == rel->r_addend
+                     && ent->owner == input_bfd
                      && ent->tls_type == tls_type)
                    break;
                if (ent == NULL)
@@ -7781,6 +7933,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
                offp = &ent->got.offset;
              }
 
+           got = ppc64_elf_tdata (input_bfd)->got;
+           if (got == NULL)
+             abort ();
+
            /* The offset must always be a multiple of 8.  We use the
               least significant bit to record whether we have already
               processed this entry.  */
@@ -7792,14 +7948,16 @@ ppc64_elf_relocate_section (bfd *output_bfd,
                /* Generate relocs for the dynamic linker, except in
                   the case of TLSLD where we'll use one entry per
                   module.  */
+               asection *relgot = ppc64_elf_tdata (input_bfd)->relgot;
+
                *offp = off | 1;
                if ((info->shared || indx != 0)
                    && (h == NULL
                        || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
                        || h->root.type != bfd_link_hash_undefweak))
                  {
-                   outrel.r_offset = (htab->got->output_section->vma
-                                      + htab->got->output_offset
+                   outrel.r_offset = (got->output_section->vma
+                                      + got->output_offset
                                       + off);
                    outrel.r_addend = rel->r_addend;
                    if (tls_type & (TLS_LD | TLS_GD))
@@ -7808,8 +7966,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
                        outrel.r_info = ELF64_R_INFO (indx, R_PPC64_DTPMOD64);
                        if (tls_type == (TLS_TLS | TLS_GD))
                          {
-                           loc = htab->relgot->contents;
-                           loc += (htab->relgot->reloc_count++
+                           loc = relgot->contents;
+                           loc += (relgot->reloc_count++
                                    * sizeof (Elf64_External_Rela));
                            bfd_elf64_swap_reloca_out (output_bfd,
                                                       &outrel, loc);
@@ -7829,7 +7987,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
 
                        /* Write the .got section contents for the sake
                           of prelink.  */
-                       loc = htab->got->contents + off;
+                       loc = got->contents + off;
                        bfd_put_64 (output_bfd, outrel.r_addend + relocation,
                                    loc);
                      }
@@ -7842,8 +8000,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
                        if (tls_type & (TLS_GD | TLS_DTPREL | TLS_TPREL))
                          outrel.r_addend -= htab->tls_sec->vma;
                      }
-                   loc = htab->relgot->contents;
-                   loc += (htab->relgot->reloc_count++
+                   loc = relgot->contents;
+                   loc += (relgot->reloc_count++
                            * sizeof (Elf64_External_Rela));
                    bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
                  }
@@ -7864,23 +8022,23 @@ ppc64_elf_relocate_section (bfd *output_bfd,
                        if (tls_type == (TLS_TLS | TLS_GD))
                          {
                            bfd_put_64 (output_bfd, relocation,
-                                       htab->got->contents + off + 8);
+                                       got->contents + off + 8);
                            relocation = 1;
                          }
                      }
 
                    bfd_put_64 (output_bfd, relocation,
-                               htab->got->contents + off);
+                               got->contents + off);
                  }
              }
 
            if (off >= (bfd_vma) -2)
              abort ();
 
-           relocation = htab->got->output_offset + off;
+           relocation = got->output_offset + off;
 
            /* TOC base (r2) is TOC start plus 0x8000.  */
-           addend = - TOC_BASE_OFF;
+           addend = -TOC_BASE_OFF;
          }
          break;
 
@@ -8045,8 +8203,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
                   || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
                   || h->root.type != bfd_link_hash_undefweak)
               && (MUST_BE_DYN_RELOC (r_type)
-                  || (h != NULL
-                      && !SYMBOL_CALLS_LOCAL (info, h))))
+                  || !SYMBOL_CALLS_LOCAL (info, h)))
              || (ELIMINATE_COPY_RELOCS
                  && !info->shared
                  && h != NULL
@@ -8092,8 +8249,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
 
              if (skip)
                memset (&outrel, 0, sizeof outrel);
-             else if (h != NULL
-                      && !SYMBOL_REFERENCES_LOCAL (info, h)
+             else if (!SYMBOL_REFERENCES_LOCAL (info, h)
                       && !is_opd
                       && r_type != R_PPC64_TOC)
                outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
@@ -8286,7 +8442,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
             _DS relocs bloats all reloc switches in this file.  It
             doesn't seem to make much sense to use any of these relocs
             in data, so testing the insn should be safe.  */
-         if ((insn & (0x3f << 26)) == (56 << 26))
+         if ((insn & (0x3f << 26)) == (56u << 26))
            mask = 15;
          if (((relocation + addend) & mask) != 0)
            {
@@ -8622,6 +8778,29 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
        = PLT_ENTRY_SIZE;
     }
 
+  /* We need to handle writing out multiple GOT sections ourselves,
+     since we didn't add them to DYNOBJ.  */
+  while ((dynobj = dynobj->link_next) != NULL)
+    {
+      asection *s;
+      s = ppc64_elf_tdata (dynobj)->got;
+      if (s != NULL
+         && s->_raw_size != 0
+         && s->output_section != bfd_abs_section_ptr
+         && !bfd_set_section_contents (output_bfd, s->output_section,
+                                       s->contents, s->output_offset,
+                                       s->_raw_size))
+       return FALSE;
+      s = ppc64_elf_tdata (dynobj)->relgot;
+      if (s != NULL
+         && s->_raw_size != 0
+         && s->output_section != bfd_abs_section_ptr
+         && !bfd_set_section_contents (output_bfd, s->output_section,
+                                       s->contents, s->output_offset,
+                                       s->_raw_size))
+       return FALSE;
+    }
+
   return TRUE;
 }
 
index 0572d52801609e66c00e18d5387ed814a2db13d3..c26df82da8e71489d0d2a4bfd55c849154c7ab26 100644 (file)
@@ -17,6 +17,8 @@ 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.  */
 
+void ppc64_elf_init_stub_bfd
+  (bfd *, struct bfd_link_info *);
 bfd_boolean ppc64_elf_mark_entry_syms
   (struct bfd_link_info *);
 bfd_boolean ppc64_elf_edit_opd
@@ -36,7 +38,7 @@ void ppc64_elf_reinit_toc
 bfd_boolean ppc64_elf_next_input_section
   (struct bfd_link_info *, asection *);
 bfd_boolean ppc64_elf_size_stubs
-  (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
+  (bfd *, struct bfd_link_info *, bfd_signed_vma,
    asection *(*) (const char *, asection *), void (*) (void));
 bfd_boolean ppc64_elf_build_stubs
   (bfd_boolean, struct bfd_link_info *, char **);
index 21501de8d2adae98ba686132b502afd802c22cad..62ef221392c4a476b370f3038054ec1cebd20f05 100644 (file)
@@ -86,6 +86,8 @@ static bfd_vma tpoff
   PARAMS ((struct bfd_link_info *, bfd_vma));
 static void invalid_tls_insn
   PARAMS ((bfd *, asection *, Elf_Internal_Rela *));
+static bfd_reloc_status_type s390_elf_ldisp_reloc
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
 
 #include "elf/s390.h"
 
@@ -120,7 +122,7 @@ static reloc_howto_type elf_howto_table[] =
        bfd_elf_generic_reloc, "R_390_32",       FALSE, 0,0xffffffff, FALSE),
   HOWTO(R_390_PC32,     0, 2, 32,  TRUE, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_390_PC32",     FALSE, 0,0xffffffff, TRUE),
-  HOWTO(R_390_GOT12,    0, 1, 12, FALSE, 0, complain_overflow_dont,
+  HOWTO(R_390_GOT12,    0, 1, 12, FALSE, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_390_GOT12",    FALSE, 0,0x00000fff, FALSE),
   HOWTO(R_390_GOT32,    0, 2, 32, FALSE, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_390_GOT32",    FALSE, 0,0xffffffff, FALSE),
@@ -216,6 +218,14 @@ static reloc_howto_type elf_howto_table[] =
        bfd_elf_generic_reloc, "R_390_TLS_DTPOFF", FALSE, 0, MINUS_ONE, FALSE),
   HOWTO(R_390_TLS_TPOFF, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,
        bfd_elf_generic_reloc, "R_390_TLS_TPOFF", FALSE, 0, MINUS_ONE, FALSE),
+  HOWTO(R_390_20,        0, 2, 20, FALSE, 8, complain_overflow_dont,
+       s390_elf_ldisp_reloc, "R_390_20",      FALSE, 0,0x0fffff00, FALSE),
+  HOWTO(R_390_GOT20,    0, 2, 20, FALSE, 8, complain_overflow_dont,
+       s390_elf_ldisp_reloc, "R_390_GOT20",   FALSE, 0,0x0fffff00, FALSE),
+  HOWTO(R_390_GOTPLT20,  0, 2, 20, FALSE, 8, complain_overflow_dont,
+       s390_elf_ldisp_reloc, "R_390_GOTPLT20", FALSE, 0,0x0fffff00, FALSE),
+  HOWTO(R_390_TLS_GOTIE20, 0, 2, 20, FALSE, 8, complain_overflow_dont,
+       s390_elf_ldisp_reloc, "R_390_TLS_GOTIE20", FALSE, 0,0x0fffff00, FALSE),
 };
 
 /* GNU extension to record C++ vtable hierarchy.  */
@@ -335,6 +345,14 @@ elf_s390_reloc_type_lookup (abfd, code)
       return &elf_howto_table[(int) R_390_TLS_DTPOFF];
     case BFD_RELOC_390_TLS_TPOFF:
       return &elf_howto_table[(int) R_390_TLS_TPOFF];
+    case BFD_RELOC_390_20:
+      return &elf_howto_table[(int) R_390_20];
+    case BFD_RELOC_390_GOT20:
+      return &elf_howto_table[(int) R_390_GOT20];
+    case BFD_RELOC_390_GOTPLT20:
+      return &elf_howto_table[(int) R_390_GOTPLT20];
+    case BFD_RELOC_390_TLS_GOTIE20:
+      return &elf_howto_table[(int) R_390_TLS_GOTIE20];
     case BFD_RELOC_VTABLE_INHERIT:
       return &elf64_s390_vtinherit_howto;
     case BFD_RELOC_VTABLE_ENTRY:
@@ -387,6 +405,58 @@ s390_tls_reloc (abfd, reloc_entry, symbol, data, input_section,
   return bfd_reloc_ok;
 }
 
+/* Handle the large displacement relocs.  */
+static bfd_reloc_status_type
+s390_elf_ldisp_reloc (abfd, reloc_entry, symbol, data, input_section,
+                      output_bfd, error_message)
+     bfd *abfd;
+     arelent *reloc_entry;
+     asymbol *symbol;
+     PTR data;
+     asection *input_section;
+     bfd *output_bfd;
+     char **error_message ATTRIBUTE_UNUSED;
+{
+  reloc_howto_type *howto = reloc_entry->howto;
+  bfd_vma relocation;
+  bfd_vma insn;
+
+  if (output_bfd != (bfd *) NULL
+      && (symbol->flags & BSF_SECTION_SYM) == 0
+      && (! howto->partial_inplace
+         || reloc_entry->addend == 0))
+    {
+      reloc_entry->address += input_section->output_offset;
+      return bfd_reloc_ok;
+    }
+  if (output_bfd != NULL)
+    return bfd_reloc_continue;
+
+  if (reloc_entry->address > input_section->_cooked_size)
+    return bfd_reloc_outofrange;
+
+  relocation = (symbol->value
+               + symbol->section->output_section->vma
+               + symbol->section->output_offset);
+  relocation += reloc_entry->addend;
+  if (howto->pc_relative)
+    {
+      relocation -= (input_section->output_section->vma
+                    + input_section->output_offset);
+      relocation -= reloc_entry->address;
+    }
+
+  insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); 
+  insn |= (relocation & 0xfff) << 16 | (relocation & 0xff000) >> 4;
+  bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
+
+  if ((bfd_signed_vma) relocation < - 0x80000
+      || (bfd_signed_vma) relocation > 0x7ffff)
+    return bfd_reloc_overflow;
+  else
+    return bfd_reloc_ok;
+}
+
 static bfd_boolean
 elf_s390_is_local_label_name (abfd, name)
      bfd *abfd;
@@ -890,16 +960,19 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
        {
        case R_390_GOT12:
        case R_390_GOT16:
+       case R_390_GOT20:
        case R_390_GOT32:
        case R_390_GOT64:
        case R_390_GOTENT:
        case R_390_GOTPLT12:
        case R_390_GOTPLT16:
+       case R_390_GOTPLT20:
        case R_390_GOTPLT32:
        case R_390_GOTPLT64:
        case R_390_GOTPLTENT:
        case R_390_TLS_GD64:
        case R_390_TLS_GOTIE12:
+       case R_390_TLS_GOTIE20:
        case R_390_TLS_GOTIE64:
        case R_390_TLS_IEENT:
        case R_390_TLS_IE64:
@@ -969,6 +1042,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
 
        case R_390_GOTPLT12:
        case R_390_GOTPLT16:
+       case R_390_GOTPLT20:
        case R_390_GOTPLT32:
        case R_390_GOTPLT64:
        case R_390_GOTPLTENT:
@@ -996,6 +1070,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
 
        case R_390_TLS_IE64:
        case R_390_TLS_GOTIE12:
+       case R_390_TLS_GOTIE20:
        case R_390_TLS_GOTIE64:
        case R_390_TLS_IEENT:
          if (info->shared)
@@ -1004,6 +1079,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
 
        case R_390_GOT12:
        case R_390_GOT16:
+       case R_390_GOT20:
        case R_390_GOT32:
        case R_390_GOT64:
        case R_390_GOTENT:
@@ -1014,6 +1090,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
            default:
            case R_390_GOT12:
            case R_390_GOT16:
+           case R_390_GOT20:
            case R_390_GOT32:
            case R_390_GOTENT:
              tls_type = GOT_NORMAL;
@@ -1026,6 +1103,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
              tls_type = GOT_TLS_IE;
              break;
            case R_390_TLS_GOTIE12:
+           case R_390_TLS_GOTIE20:
            case R_390_TLS_IEENT:
              tls_type = GOT_TLS_IE_NLT;
              break;
@@ -1355,10 +1433,12 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
        case R_390_TLS_GD64:
        case R_390_TLS_IE64:
        case R_390_TLS_GOTIE12:
+       case R_390_TLS_GOTIE20:
        case R_390_TLS_GOTIE64:
        case R_390_TLS_IEENT:
        case R_390_GOT12:
        case R_390_GOT16:
+       case R_390_GOT20:
        case R_390_GOT32:
        case R_390_GOT64:
        case R_390_GOTOFF16:
@@ -1382,6 +1462,7 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
        case R_390_8:
        case R_390_12:
        case R_390_16:
+       case R_390_20:
        case R_390_32:
        case R_390_64:
        case R_390_PC16:
@@ -1409,6 +1490,7 @@ elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
 
        case R_390_GOTPLT12:
        case R_390_GOTPLT16:
+       case R_390_GOTPLT20:
        case R_390_GOTPLT32:
        case R_390_GOTPLT64:
        case R_390_GOTPLTENT:
@@ -2244,7 +2326,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared
+         else if (!info->executable
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
@@ -2264,6 +2346,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
        {
        case R_390_GOTPLT12:
        case R_390_GOTPLT16:
+       case R_390_GOTPLT20:
        case R_390_GOTPLT32:
        case R_390_GOTPLT64:
        case R_390_GOTPLTENT:
@@ -2298,6 +2381,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
 
        case R_390_GOT12:
        case R_390_GOT16:
+       case R_390_GOT20:
        case R_390_GOT32:
        case R_390_GOT64:
        case R_390_GOTENT:
@@ -2713,6 +2797,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
          break;
 
        case R_390_TLS_GOTIE12:
+       case R_390_TLS_GOTIE20:
        case R_390_TLS_IEENT:
          if (h == NULL)
            {
@@ -2936,7 +3021,19 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
           (long) rel->r_offset,
           h->root.root.string);
 
-      r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+      if (r_type == R_390_20
+         || r_type == R_390_GOT20
+         || r_type == R_390_GOTPLT20
+         || r_type == R_390_TLS_GOTIE20)
+       {
+         relocation += rel->r_addend;
+         relocation = (relocation&0xfff) << 8 | (relocation&0xff000) >> 12;
+         r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+                                       contents, rel->r_offset,
+                                       relocation, 0);
+       }
+      else
+       r = _bfd_final_link_relocate (howto, input_bfd, input_section,
                                      contents, rel->r_offset,
                                      relocation, rel->r_addend);
 
index 95bbbd2af1f0749eca016566d518327be13c435f..905caddb290cc50e8594fc78b22d12319d0679c1 100644 (file)
@@ -99,7 +99,7 @@ struct elf_sh64_link_hash_table
 #define sh64_elf64_link_hash_traverse(table, func, info)               \
   (elf_link_hash_traverse                                              \
    (&(table)->root,                                                    \
-    (bfd_boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
+    (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \
     (info)))
 
 /* Get the sh ELF linker hash table from a link_info structure.  */
@@ -108,71 +108,69 @@ struct elf_sh64_link_hash_table
   ((struct elf_sh64_link_hash_table *) ((p)->hash))
 
 static bfd_boolean sh_elf64_copy_private_data
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 static bfd_boolean sh_elf64_copy_private_data_internal
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 static bfd_boolean sh_elf64_merge_private_data
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 static bfd_reloc_status_type sh_elf64_ignore_reloc
-  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+  (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
 static bfd_reloc_status_type sh_elf64_reloc
-  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+  (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
 static reloc_howto_type *sh_elf64_reloc_type_lookup
-  PARAMS ((bfd *, bfd_reloc_code_real_type));
+  (bfd *, bfd_reloc_code_real_type);
 static void sh_elf64_info_to_howto
-  PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+  (bfd *, arelent *, Elf_Internal_Rela *);
 static bfd_boolean sh_elf64_relocate_section
-  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
-          Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+  (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+   Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
 static bfd_byte *sh_elf64_get_relocated_section_contents
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
-          bfd_byte *, bfd_boolean, asymbol **));
+  (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
+   bfd_boolean, asymbol **);
 static bfd_boolean sh_elf64_set_mach_from_flags
-  PARAMS ((bfd *));
+  (bfd *);
 static bfd_boolean sh_elf64_set_private_flags
-  PARAMS ((bfd *, flagword));
+  (bfd *, flagword);
 static asection *sh_elf64_gc_mark_hook
-  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
-          struct elf_link_hash_entry *, Elf_Internal_Sym *));
+  (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+   struct elf_link_hash_entry *, Elf_Internal_Sym *);
 static bfd_boolean sh_elf64_gc_sweep_hook
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          const Elf_Internal_Rela *));
+  (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
 static bfd_boolean sh_elf64_check_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          const Elf_Internal_Rela *));
+  (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
 static int sh64_elf64_get_symbol_type
-  PARAMS ((Elf_Internal_Sym *, int));
+  (Elf_Internal_Sym *, int);
 static bfd_boolean sh64_elf64_add_symbol_hook
-  PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
-          const char **, flagword *, asection **, bfd_vma *));
+  (bfd *, struct bfd_link_info *, const Elf_Internal_Sym *, const char **,
+   flagword *, asection **, bfd_vma *);
 static bfd_boolean sh64_elf64_link_output_symbol_hook
-  PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
-          asection *));
+  (bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
+   asection *);
 static bfd_boolean sh64_elf64_fake_sections
-  PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
+  (bfd *, Elf_Internal_Shdr *, asection *);
 static void sh64_elf64_final_write_processing
-  PARAMS ((bfd *, bfd_boolean));
+  (bfd *, bfd_boolean);
 static struct bfd_hash_entry *sh64_elf64_link_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+  (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
 static struct bfd_link_hash_table *sh64_elf64_link_hash_table_create
-  PARAMS ((bfd *));
+  (bfd *);
 inline static void movi_shori_putval
-  PARAMS ((bfd *, unsigned long, char *));
+  (bfd *, unsigned long, char *);
 inline static void movi_3shori_putval
-  PARAMS ((bfd *, bfd_vma, char *));
+  (bfd *, bfd_vma, char *);
 static bfd_boolean sh64_elf64_create_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 static bfd_boolean sh64_elf64_adjust_dynamic_symbol
-  PARAMS ((struct bfd_link_info *info, struct elf_link_hash_entry *));
+  (struct bfd_link_info *info, struct elf_link_hash_entry *);
 static bfd_boolean sh64_elf64_discard_copies
-  PARAMS ((struct elf_sh64_link_hash_entry *, PTR));
+  (struct elf_sh64_link_hash_entry *, void *);
 static bfd_boolean sh64_elf64_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 static bfd_boolean sh64_elf64_finish_dynamic_symbol
-  PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
-          Elf_Internal_Sym *));
+  (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+   Elf_Internal_Sym *);
 static bfd_boolean sh64_elf64_finish_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 static reloc_howto_type sh_elf64_howto_table[] = {
   /* No relocation.  */
@@ -1300,15 +1298,11 @@ static reloc_howto_type sh_elf64_howto_table[] = {
    which the linker should otherwise ignore.  */
 
 static bfd_reloc_status_type
-sh_elf64_ignore_reloc (abfd, reloc_entry, symbol, data, input_section,
-                    output_bfd, error_message)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *reloc_entry;
-     asymbol *symbol ATTRIBUTE_UNUSED;
-     PTR data ATTRIBUTE_UNUSED;
-     asection *input_section;
-     bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
+sh_elf64_ignore_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
+                      asymbol *symbol ATTRIBUTE_UNUSED,
+                      void *data ATTRIBUTE_UNUSED, asection *input_section,
+                      bfd *output_bfd,
+                      char **error_message ATTRIBUTE_UNUSED)
 {
   if (output_bfd != NULL)
     reloc_entry->address += input_section->output_offset;
@@ -1321,15 +1315,9 @@ sh_elf64_ignore_reloc (abfd, reloc_entry, symbol, data, input_section,
    See sh_elf_reloc in elf32-sh.c for the original.  */
 
 static bfd_reloc_status_type
-sh_elf64_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
-         error_message)
-     bfd *abfd;
-     arelent *reloc_entry;
-     asymbol *symbol_in;
-     PTR data;
-     asection *input_section;
-     bfd *output_bfd;
-     char **error_message ATTRIBUTE_UNUSED;
+sh_elf64_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol_in,
+               void *data, asection *input_section, bfd *output_bfd,
+               char **error_message ATTRIBUTE_UNUSED)
 {
   unsigned long insn;
   bfd_vma sym_value;
@@ -1449,9 +1437,8 @@ static const struct elf_reloc_map sh64_reloc_map[] =
    corresponding SH ELf reloc.  */
 
 static reloc_howto_type *
-sh_elf64_reloc_type_lookup (abfd, code)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
+sh_elf64_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                           bfd_reloc_code_real_type code)
 {
   unsigned int i;
 
@@ -1469,10 +1456,8 @@ sh_elf64_reloc_type_lookup (abfd, code)
    See sh_elf_info_to_howto in elf32-sh.c for the original.  */
 
 static void
-sh_elf64_info_to_howto (abfd, cache_ptr, dst)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *cache_ptr;
-     Elf_Internal_Rela *dst;
+sh_elf64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+                       Elf_Internal_Rela *dst)
 {
   unsigned int r;
 
@@ -1492,16 +1477,12 @@ sh_elf64_info_to_howto (abfd, cache_ptr, dst)
    See sh_elf_info_to_howto in elf32-sh.c for the original.  */
 
 static bfd_boolean
-sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section,
-                          contents, relocs, local_syms, local_sections)
-     bfd *output_bfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     Elf_Internal_Rela *relocs;
-     Elf_Internal_Sym *local_syms;
-     asection **local_sections;
+sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
+                          struct bfd_link_info *info, bfd *input_bfd,
+                          asection *input_section, bfd_byte *contents,
+                          Elf_Internal_Rela *relocs,
+                          Elf_Internal_Sym *local_syms,
+                          asection **local_sections)
 {
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
@@ -2177,14 +2158,12 @@ sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section,
    See sh_elf_relocate_section in elf32-sh.c for the original.  */
 
 static bfd_byte *
-sh_elf64_get_relocated_section_contents (output_bfd, link_info, link_order,
-                                        data, relocatable, symbols)
-     bfd *output_bfd;
-     struct bfd_link_info *link_info;
-     struct bfd_link_order *link_order;
-     bfd_byte *data;
-     bfd_boolean relocatable;
-     asymbol **symbols;
+sh_elf64_get_relocated_section_contents (bfd *output_bfd,
+                                        struct bfd_link_info *link_info,
+                                        struct bfd_link_order *link_order,
+                                        bfd_byte *data,
+                                        bfd_boolean relocatable,
+                                        asymbol **symbols)
 {
   Elf_Internal_Shdr *symtab_hdr;
   asection *input_section = link_order->u.indirect.section;
@@ -2227,7 +2206,7 @@ sh_elf64_get_relocated_section_contents (output_bfd, link_info, link_order,
        }
 
       internal_relocs = (_bfd_elf_link_read_relocs
-                        (input_bfd, input_section, (PTR) NULL,
+                        (input_bfd, input_section, NULL,
                          (Elf_Internal_Rela *) NULL, FALSE));
       if (internal_relocs == NULL)
        goto error_return;
@@ -2291,10 +2270,9 @@ sh_elf64_get_relocated_section_contents (output_bfd, link_info, link_order,
 /* Set the SHF_SH5_ISA32 flag for ISA SHmedia code sections.  */
 
 bfd_boolean
-sh64_elf64_fake_sections (output_bfd, elf_section_hdr, asect)
-     bfd *output_bfd ATTRIBUTE_UNUSED;
-     Elf_Internal_Shdr *elf_section_hdr;
-     asection *asect;
+sh64_elf64_fake_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+                         Elf_Internal_Shdr *elf_section_hdr,
+                         asection *asect)
 {
   /* Code sections can only contain SH64 code, so mark them as such.  */
   if (bfd_get_section_flags (output_bfd, asect) & SEC_CODE)
@@ -2304,8 +2282,7 @@ sh64_elf64_fake_sections (output_bfd, elf_section_hdr, asect)
 }
 
 static bfd_boolean
-sh_elf64_set_mach_from_flags (abfd)
-     bfd *abfd;
+sh_elf64_set_mach_from_flags (bfd *abfd)
 {
   flagword flags = elf_elfheader (abfd)->e_flags;
 
@@ -2328,9 +2305,7 @@ sh_elf64_set_mach_from_flags (abfd)
    See sh64_elf_set_private_flags in elf32-sh64.c for the original.  */
 
 static bfd_boolean
-sh_elf64_set_private_flags (abfd, flags)
-     bfd *    abfd;
-     flagword flags;
+sh_elf64_set_private_flags (bfd *abfd, flagword flags)
 {
   BFD_ASSERT (! elf_flags_init (abfd)
              || elf_elfheader (abfd)->e_flags == flags);
@@ -2344,9 +2319,7 @@ sh_elf64_set_private_flags (abfd, flags)
    code, to keep attributes the same as for SHmedia in 32-bit ELF.  */
 
 static bfd_boolean
-sh_elf64_copy_private_data_internal (ibfd, obfd)
-     bfd * ibfd;
-     bfd * obfd;
+sh_elf64_copy_private_data_internal (bfd *ibfd, bfd *obfd)
 {
   Elf_Internal_Shdr **o_shdrp;
   asection *isec;
@@ -2377,17 +2350,13 @@ sh_elf64_copy_private_data_internal (ibfd, obfd)
 }
 
 static bfd_boolean
-sh_elf64_copy_private_data (ibfd, obfd)
-     bfd * ibfd;
-     bfd * obfd;
+sh_elf64_copy_private_data (bfd *ibfd, bfd *obfd)
 {
   return sh_elf64_copy_private_data_internal (ibfd, obfd);
 }
 
 static bfd_boolean
-sh_elf64_merge_private_data (ibfd, obfd)
-     bfd *ibfd;
-     bfd *obfd;
+sh_elf64_merge_private_data (bfd *ibfd, bfd *obfd)
 {
   flagword old_flags, new_flags;
 
@@ -2450,12 +2419,11 @@ sh_elf64_merge_private_data (ibfd, obfd)
    relocation.  */
 
 static asection *
-sh_elf64_gc_mark_hook (sec, info, rel, h, sym)
-     asection *sec;
-     struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     Elf_Internal_Rela *rel;
-     struct elf_link_hash_entry *h;
-     Elf_Internal_Sym *sym;
+sh_elf64_gc_mark_hook (asection *sec,
+                      struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                      Elf_Internal_Rela *rel,
+                      struct elf_link_hash_entry *h,
+                      Elf_Internal_Sym *sym)
 {
   if (h != NULL)
     {
@@ -2492,11 +2460,10 @@ sh_elf64_gc_mark_hook (sec, info, rel, h, sym)
 /* Update the got entry reference counts for the section being removed.  */
 
 static bfd_boolean
-sh_elf64_gc_sweep_hook (abfd, info, sec, relocs)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     asection *sec ATTRIBUTE_UNUSED;
-     const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+sh_elf64_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+                       struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                       asection *sec ATTRIBUTE_UNUSED,
+                       const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
 {
   /* No got and plt entries for 64-bit SH at present.  */
   return TRUE;
@@ -2507,11 +2474,8 @@ sh_elf64_gc_sweep_hook (abfd, info, sec, relocs)
    virtual table relocs for gc.  */
 
 static bfd_boolean
-sh_elf64_check_relocs (abfd, info, sec, relocs)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *sec;
-     const Elf_Internal_Rela *relocs;
+sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *info,
+                      asection *sec, const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
@@ -2884,9 +2848,7 @@ sh_elf64_check_relocs (abfd, info, sec, relocs)
 }
 
 static int
-sh64_elf64_get_symbol_type (elf_sym, type)
-     Elf_Internal_Sym * elf_sym;
-     int type;
+sh64_elf64_get_symbol_type (Elf_Internal_Sym * elf_sym, int type)
 {
   if (ELF_ST_TYPE (elf_sym->st_info) == STT_DATALABEL)
     return STT_DATALABEL;
@@ -2917,14 +2879,10 @@ sh64_elf64_get_symbol_type (elf_sym, type)
    (not so good).  */
 
 static bfd_boolean
-sh64_elf64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     const Elf_Internal_Sym *sym;
-     const char **namep;
-     flagword *flagsp ATTRIBUTE_UNUSED;
-     asection **secp;
-     bfd_vma *valp;
+sh64_elf64_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
+                           const Elf_Internal_Sym *sym, const char **namep,
+                           flagword *flagsp ATTRIBUTE_UNUSED,
+                           asection **secp, bfd_vma *valp)
 {
   /* We want to do this for relocatable as well as final linking.  */
   if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL
@@ -3018,12 +2976,11 @@ sh64_elf64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
    DataLabel symbol.  */
 
 static bfd_boolean
-sh64_elf64_link_output_symbol_hook (abfd, info, cname, sym, input_sec)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info;
-     const char *cname;
-     Elf_Internal_Sym *sym;
-     asection *input_sec ATTRIBUTE_UNUSED;
+sh64_elf64_link_output_symbol_hook (bfd *abfd ATTRIBUTE_UNUSED,
+                                   struct bfd_link_info *info,
+                                   const char *cname,
+                                   Elf_Internal_Sym *sym,
+                                   asection *input_sec ATTRIBUTE_UNUSED)
 {
   char *name = (char *) cname;
 
@@ -3044,9 +3001,8 @@ sh64_elf64_link_output_symbol_hook (abfd, info, cname, sym, input_sec)
    before jumping to the program entry.  */
 
 static void
-sh64_elf64_final_write_processing (abfd, linker)
-     bfd *abfd;
-     bfd_boolean linker ATTRIBUTE_UNUSED;
+sh64_elf64_final_write_processing (bfd *abfd,
+                                  bfd_boolean linker ATTRIBUTE_UNUSED)
 {
   /* FIXME: Perhaps we shouldn't do this if the entry address was supplied
      numerically, but we currently lack the infrastructure to recognize
@@ -3190,10 +3146,9 @@ static const bfd_byte *elf_sh64_pic_plt_entry;
 /* Create an entry in an sh ELF linker hash table.  */
 
 static struct bfd_hash_entry *
-sh64_elf64_link_hash_newfunc (entry, table, string)
-     struct bfd_hash_entry *entry;
-     struct bfd_hash_table *table;
-     const char *string;
+sh64_elf64_link_hash_newfunc (struct bfd_hash_entry *entry,
+                             struct bfd_hash_table *table,
+                             const char *string)
 {
   struct elf_sh64_link_hash_entry *ret =
     (struct elf_sh64_link_hash_entry *) entry;
@@ -3223,8 +3178,7 @@ sh64_elf64_link_hash_newfunc (entry, table, string)
 /* Create an sh64 ELF linker hash table.  */
 
 static struct bfd_link_hash_table *
-sh64_elf64_link_hash_table_create (abfd)
-     bfd *abfd;
+sh64_elf64_link_hash_table_create (bfd *abfd)
 {
   struct elf_sh64_link_hash_table *ret;
 
@@ -3244,10 +3198,7 @@ sh64_elf64_link_hash_table_create (abfd)
 }
 
 inline static void
-movi_shori_putval (output_bfd, value, addr)
-     bfd *output_bfd;
-     unsigned long value;
-     char *addr;
+movi_shori_putval (bfd *output_bfd, unsigned long value, char *addr)
 {
   bfd_put_32 (output_bfd,
              bfd_get_32 (output_bfd, addr)
@@ -3260,10 +3211,7 @@ movi_shori_putval (output_bfd, value, addr)
 }
 
 inline static void
-movi_3shori_putval (output_bfd, value, addr)
-     bfd *output_bfd;
-     bfd_vma value;
-     char *addr;
+movi_3shori_putval (bfd *output_bfd, bfd_vma value, char *addr)
 {
   bfd_put_32 (output_bfd,
              bfd_get_32 (output_bfd, addr)
@@ -3286,9 +3234,7 @@ movi_3shori_putval (output_bfd, value, addr)
 /* Create dynamic sections when linking against a dynamic object.  */
 
 static bfd_boolean
-sh64_elf64_create_dynamic_sections (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+sh64_elf64_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
 {
   flagword flags, pltflags;
   register asection *s;
@@ -3430,9 +3376,8 @@ sh64_elf64_create_dynamic_sections (abfd, info)
    understand.  */
 
 static bfd_boolean
-sh64_elf64_adjust_dynamic_symbol (info, h)
-     struct bfd_link_info *info;
-     struct elf_link_hash_entry *h;
+sh64_elf64_adjust_dynamic_symbol (struct bfd_link_info *info,
+                                 struct elf_link_hash_entry *h)
 {
   bfd *dynobj;
   asection *s;
@@ -3605,9 +3550,8 @@ sh64_elf64_adjust_dynamic_symbol (info, h)
    relocate_section routine.  */
 
 static bfd_boolean
-sh64_elf64_discard_copies (h, ignore)
-     struct elf_sh64_link_hash_entry *h;
-     PTR ignore ATTRIBUTE_UNUSED;
+sh64_elf64_discard_copies (struct elf_sh64_link_hash_entry *h,
+                          void *ignore ATTRIBUTE_UNUSED)
 {
   struct elf_sh64_pcrel_relocs_copied *s;
 
@@ -3627,9 +3571,8 @@ sh64_elf64_discard_copies (h, ignore)
 /* Set the sizes of the dynamic sections.  */
 
 static bfd_boolean
-sh64_elf64_size_dynamic_sections (output_bfd, info)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
+sh64_elf64_size_dynamic_sections (bfd *output_bfd,
+                                 struct bfd_link_info *info)
 {
   bfd *dynobj;
   asection *s;
@@ -3669,8 +3612,7 @@ sh64_elf64_size_dynamic_sections (output_bfd, info)
      will not fill them in in the relocate_section routine.  */
   if (info->shared && info->symbolic)
     sh64_elf64_link_hash_traverse (sh64_elf64_hash_table (info),
-                                  sh64_elf64_discard_copies,
-                                  (PTR) NULL);
+                                  sh64_elf64_discard_copies, NULL);
 
   /* The check_relocs and adjust_dynamic_symbol entry points have
      determined the sizes of the various dynamic sections.  Allocate
@@ -3815,11 +3757,10 @@ sh64_elf64_size_dynamic_sections (output_bfd, info)
    dynamic sections here.  */
 
 static bfd_boolean
-sh64_elf64_finish_dynamic_symbol (output_bfd, info, h, sym)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
-     struct elf_link_hash_entry *h;
-     Elf_Internal_Sym *sym;
+sh64_elf64_finish_dynamic_symbol (bfd *output_bfd,
+                                 struct bfd_link_info *info,
+                                 struct elf_link_hash_entry *h,
+                                 Elf_Internal_Sym *sym)
 {
   bfd *dynobj;
 
@@ -4015,9 +3956,8 @@ sh64_elf64_finish_dynamic_symbol (output_bfd, info, h, sym)
 /* Finish up the dynamic sections.  */
 
 static bfd_boolean
-sh64_elf64_finish_dynamic_sections (output_bfd, info)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
+sh64_elf64_finish_dynamic_sections (bfd *output_bfd,
+                                   struct bfd_link_info *info)
 {
   bfd *dynobj;
   asection *sgot;
@@ -4172,6 +4112,14 @@ sh64_elf64_finish_dynamic_sections (output_bfd, info)
   return TRUE;
 }
 
+static struct bfd_elf_special_section const sh64_elf64_special_sections[]=
+{
+  { ".cranges",                0,      NULL,   0,
+    SHT_PROGBITS,      0 },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
+
 #define TARGET_BIG_SYM         bfd_elf64_sh64_vec
 #define TARGET_BIG_NAME                "elf64-sh64"
 #define TARGET_LITTLE_SYM      bfd_elf64_sh64l_vec
@@ -4227,6 +4175,7 @@ sh64_elf64_finish_dynamic_sections (output_bfd, info)
                                        sh64_elf64_finish_dynamic_symbol
 #define elf_backend_finish_dynamic_sections \
                                        sh64_elf64_finish_dynamic_sections
+#define elf_backend_special_sections   sh64_elf64_special_sections
 
 #define elf_backend_want_got_plt       1
 #define elf_backend_plt_readonly       1
index dbaa954b413d0c1137049727d5dda09409630565..13f6a5501a4125b9232331dc052114c8dee3233a 100644 (file)
@@ -2097,7 +2097,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            ;
-         else if (info->shared
+         else if (!info->executable
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            ;
index 76af7df9e6856a9479c35c76b7281af2f6afd713..09a072b5b8eaf9aba974839d12464e0375b69466 100644 (file)
@@ -150,72 +150,14 @@ static const struct elf_reloc_map x86_64_reloc_map[] =
   { BFD_RELOC_VTABLE_ENTRY,    R_X86_64_GNU_VTENTRY, },
 };
 
-static reloc_howto_type *elf64_x86_64_reloc_type_lookup
-  PARAMS ((bfd *, bfd_reloc_code_real_type));
-static void elf64_x86_64_info_to_howto
-  PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static bfd_boolean elf64_x86_64_grok_prstatus
-  PARAMS ((bfd *, Elf_Internal_Note *));
-static bfd_boolean elf64_x86_64_grok_psinfo
-  PARAMS ((bfd *, Elf_Internal_Note *));
-static struct bfd_link_hash_table *elf64_x86_64_link_hash_table_create
-  PARAMS ((bfd *));
-static int elf64_x86_64_tls_transition
-  PARAMS ((struct bfd_link_info *, int, int));
-static bfd_boolean elf64_x86_64_mkobject
-  PARAMS((bfd *));
-static bfd_boolean elf64_x86_64_elf_object_p PARAMS ((bfd *abfd));
-static bfd_boolean create_got_section
-  PARAMS((bfd *, struct bfd_link_info *));
-static bfd_boolean elf64_x86_64_create_dynamic_sections
-  PARAMS((bfd *, struct bfd_link_info *));
-static void elf64_x86_64_copy_indirect_symbol
-  PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
-          struct elf_link_hash_entry *));
-static bfd_boolean elf64_x86_64_check_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, asection *sec,
-          const Elf_Internal_Rela *));
-static asection *elf64_x86_64_gc_mark_hook
-  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
-          struct elf_link_hash_entry *, Elf_Internal_Sym *));
-
-static bfd_boolean elf64_x86_64_gc_sweep_hook
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          const Elf_Internal_Rela *));
-
-static struct bfd_hash_entry *link_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static bfd_boolean elf64_x86_64_adjust_dynamic_symbol
-  PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-
-static bfd_boolean allocate_dynrelocs
-  PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean readonly_dynrelocs
-  PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean elf64_x86_64_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_vma dtpoff_base
-  PARAMS ((struct bfd_link_info *));
-static bfd_vma tpoff
-  PARAMS ((struct bfd_link_info *, bfd_vma));
-static bfd_boolean elf64_x86_64_relocate_section
-  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
-        Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static bfd_boolean elf64_x86_64_finish_dynamic_symbol
-  PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
-          Elf_Internal_Sym *sym));
-static bfd_boolean elf64_x86_64_finish_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
-static enum elf_reloc_type_class elf64_x86_64_reloc_type_class
-  PARAMS ((const Elf_Internal_Rela *));
 
 /* Given a BFD reloc type, return a HOWTO structure.  */
 static reloc_howto_type *
-elf64_x86_64_reloc_type_lookup (abfd, code)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
+elf64_x86_64_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                               bfd_reloc_code_real_type code)
 {
   unsigned int i;
+
   for (i = 0; i < sizeof (x86_64_reloc_map) / sizeof (struct elf_reloc_map);
        i++)
     {
@@ -228,10 +170,8 @@ elf64_x86_64_reloc_type_lookup (abfd, code)
 /* Given an x86_64 ELF reloc type, fill in an arelent structure.  */
 
 static void
-elf64_x86_64_info_to_howto (abfd, cache_ptr, dst)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     arelent *cache_ptr;
-     Elf_Internal_Rela *dst;
+elf64_x86_64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+                           Elf_Internal_Rela *dst)
 {
   unsigned r_type, i;
 
@@ -252,9 +192,7 @@ elf64_x86_64_info_to_howto (abfd, cache_ptr, dst)
 \f
 /* Support for core dump NOTE sections.  */
 static bfd_boolean
-elf64_x86_64_grok_prstatus (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elf64_x86_64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
 {
   int offset;
   size_t raw_size;
@@ -286,9 +224,7 @@ elf64_x86_64_grok_prstatus (abfd, note)
 }
 
 static bfd_boolean
-elf64_x86_64_grok_psinfo (abfd, note)
-     bfd *abfd;
-     Elf_Internal_Note *note;
+elf64_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
 {
   switch (note->descsz)
     {
@@ -447,10 +383,8 @@ struct elf64_x86_64_link_hash_table
 /* Create an entry in an x86-64 ELF linker hash table. */
 
 static struct bfd_hash_entry *
-link_hash_newfunc (entry, table, string)
-     struct bfd_hash_entry *entry;
-     struct bfd_hash_table *table;
-     const char *string;
+link_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_hash_table *table,
+                  const char *string)
 {
   /* Allocate the structure if it has not already been allocated by a
      subclass.  */
@@ -479,8 +413,7 @@ link_hash_newfunc (entry, table, string)
 /* Create an X86-64 ELF linker hash table.  */
 
 static struct bfd_link_hash_table *
-elf64_x86_64_link_hash_table_create (abfd)
-     bfd *abfd;
+elf64_x86_64_link_hash_table_create (bfd *abfd)
 {
   struct elf64_x86_64_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct elf64_x86_64_link_hash_table);
@@ -512,9 +445,7 @@ elf64_x86_64_link_hash_table_create (abfd)
    shortcuts to them in our hash table.  */
 
 static bfd_boolean
-create_got_section (dynobj, info)
-     bfd *dynobj;
-     struct bfd_link_info *info;
+create_got_section (bfd *dynobj, struct bfd_link_info *info)
 {
   struct elf64_x86_64_link_hash_table *htab;
 
@@ -543,9 +474,7 @@ create_got_section (dynobj, info)
    hash table.  */
 
 static bfd_boolean
-elf64_x86_64_create_dynamic_sections (dynobj, info)
-     bfd *dynobj;
-     struct bfd_link_info *info;
+elf64_x86_64_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
 {
   struct elf64_x86_64_link_hash_table *htab;
 
@@ -572,9 +501,9 @@ elf64_x86_64_create_dynamic_sections (dynobj, info)
 /* Copy the extra info we tack onto an elf_link_hash_entry.  */
 
 static void
-elf64_x86_64_copy_indirect_symbol (bed, dir, ind)
-     struct elf_backend_data *bed;
-     struct elf_link_hash_entry *dir, *ind;
+elf64_x86_64_copy_indirect_symbol (struct elf_backend_data *bed,
+                                  struct elf_link_hash_entry *dir,
+                                  struct elf_link_hash_entry *ind)
 {
   struct elf64_x86_64_link_hash_entry *edir, *eind;
 
@@ -637,8 +566,7 @@ elf64_x86_64_copy_indirect_symbol (bed, dir, ind)
 }
 
 static bfd_boolean
-elf64_x86_64_mkobject (abfd)
-     bfd *abfd;
+elf64_x86_64_mkobject (bfd *abfd)
 {
   bfd_size_type amt = sizeof (struct elf64_x86_64_obj_tdata);
   abfd->tdata.any = bfd_zalloc (abfd, amt);
@@ -648,8 +576,7 @@ elf64_x86_64_mkobject (abfd)
 }
 
 static bfd_boolean
-elf64_x86_64_elf_object_p (abfd)
-  bfd *abfd;
+elf64_x86_64_elf_object_p (bfd *abfd)
 {
   /* Allocate our special target data.  */
   struct elf64_x86_64_obj_tdata *new_tdata;
@@ -665,10 +592,7 @@ elf64_x86_64_elf_object_p (abfd)
 }
 
 static int
-elf64_x86_64_tls_transition (info, r_type, is_local)
-     struct bfd_link_info *info;
-     int r_type;
-     int is_local;
+elf64_x86_64_tls_transition (struct bfd_link_info *info, int r_type, int is_local)
 {
   if (info->shared)
     return r_type;
@@ -692,11 +616,8 @@ elf64_x86_64_tls_transition (info, r_type, is_local)
    linkage table, and dynamic reloc sections.  */
 
 static bfd_boolean
-elf64_x86_64_check_relocs (abfd, info, sec, relocs)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *sec;
-     const Elf_Internal_Rela *relocs;
+elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
+                          const Elf_Internal_Rela *relocs)
 {
   struct elf64_x86_64_link_hash_table *htab;
   Elf_Internal_Shdr *symtab_hdr;
@@ -1060,12 +981,11 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
    relocation. */
 
 static asection *
-elf64_x86_64_gc_mark_hook (sec, info, rel, h, sym)
-     asection *sec;
-     struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     Elf_Internal_Rela *rel;
-     struct elf_link_hash_entry *h;
-     Elf_Internal_Sym *sym;
+elf64_x86_64_gc_mark_hook (asection *sec,
+                          struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                          Elf_Internal_Rela *rel,
+                          struct elf_link_hash_entry *h,
+                          Elf_Internal_Sym *sym)
 {
   if (h != NULL)
     {
@@ -1099,11 +1019,8 @@ elf64_x86_64_gc_mark_hook (sec, info, rel, h, sym)
 /* Update the got entry reference counts for the section being removed.         */
 
 static bfd_boolean
-elf64_x86_64_gc_sweep_hook (abfd, info, sec, relocs)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *sec;
-     const Elf_Internal_Rela *relocs;
+elf64_x86_64_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
+                           asection *sec, const Elf_Internal_Rela *relocs)
 {
   Elf_Internal_Shdr *symtab_hdr;
   struct elf_link_hash_entry **sym_hashes;
@@ -1202,9 +1119,8 @@ elf64_x86_64_gc_sweep_hook (abfd, info, sec, relocs)
    understand. */
 
 static bfd_boolean
-elf64_x86_64_adjust_dynamic_symbol (info, h)
-     struct bfd_link_info *info;
-     struct elf_link_hash_entry *h;
+elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
+                                   struct elf_link_hash_entry *h)
 {
   struct elf64_x86_64_link_hash_table *htab;
   asection *s;
@@ -1217,11 +1133,9 @@ elf64_x86_64_adjust_dynamic_symbol (info, h)
       || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
     {
       if (h->plt.refcount <= 0
-         || (! info->shared
-             && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
-             && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
-             && h->root.type != bfd_link_hash_undefweak
-             && h->root.type != bfd_link_hash_undefined))
+         || SYMBOL_CALLS_LOCAL (info, h)
+         || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+             && h->root.type == bfd_link_hash_undefweak))
        {
          /* This case can occur if we saw a PLT32 reloc in an input
             file, but the symbol was never referred to by a dynamic
@@ -1355,9 +1269,9 @@ elf64_x86_64_adjust_dynamic_symbol (info, h)
    will be called from elflink.h.  If elflink.h doesn't call our
    finish_dynamic_symbol routine, we'll need to do something about
    initializing any .plt and .got entries in elf64_x86_64_relocate_section.  */
-#define WILL_CALL_FINISH_DYNAMIC_SYMBOL(DYN, INFO, H) \
+#define WILL_CALL_FINISH_DYNAMIC_SYMBOL(DYN, SHARED, H) \
   ((DYN)                                                               \
-   && ((INFO)->shared                                                  \
+   && ((SHARED)                                                                \
        || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)     \
    && ((H)->dynindx != -1                                              \
        || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0))
@@ -1366,9 +1280,7 @@ elf64_x86_64_adjust_dynamic_symbol (info, h)
    dynamic relocs.  */
 
 static bfd_boolean
-allocate_dynrelocs (h, inf)
-     struct elf_link_hash_entry *h;
-     PTR inf;
+allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
 {
   struct bfd_link_info *info;
   struct elf64_x86_64_link_hash_table *htab;
@@ -1385,9 +1297,7 @@ allocate_dynrelocs (h, inf)
   htab = elf64_x86_64_hash_table (info);
 
   if (htab->elf.dynamic_sections_created
-      && h->plt.refcount > 0
-      && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-         || h->root.type != bfd_link_hash_undefweak))
+      && h->plt.refcount > 0)
     {
       /* Make sure this symbol is output as a dynamic symbol.
         Undefined weak syms won't yet be marked as dynamic.  */
@@ -1398,7 +1308,8 @@ allocate_dynrelocs (h, inf)
            return FALSE;
        }
 
-      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h))
+      if (info->shared
+         || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
        {
          asection *s = htab->splt;
 
@@ -1482,7 +1393,8 @@ allocate_dynrelocs (h, inf)
        htab->srelgot->_raw_size += 2 * sizeof (Elf64_External_Rela);
       else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
                || h->root.type != bfd_link_hash_undefweak)
-              && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
+              && (info->shared
+                  || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
        htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
     }
   else
@@ -1500,9 +1412,13 @@ allocate_dynrelocs (h, inf)
 
   if (info->shared)
     {
-      if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
-         && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
-             || info->symbolic))
+      /* Relocs that use pc_count are those that appear on a call
+        insn, or certain REL relocs that can generated via assembly.
+        We want calls to protected symbols to resolve directly to the
+        function rather than going via the plt.  If people want
+        function pointer comparisons to work as expected then they
+        should avoid writing weird assembly.  */
+      if (SYMBOL_CALLS_LOCAL (info, h))
        {
          struct elf64_x86_64_dyn_relocs **pp;
 
@@ -1569,9 +1485,7 @@ allocate_dynrelocs (h, inf)
 /* Find any dynamic relocs that apply to read-only sections.  */
 
 static bfd_boolean
-readonly_dynrelocs (h, inf)
-     struct elf_link_hash_entry *h;
-     PTR inf;
+readonly_dynrelocs (struct elf_link_hash_entry *h, void * inf)
 {
   struct elf64_x86_64_link_hash_entry *eh;
   struct elf64_x86_64_dyn_relocs *p;
@@ -1600,9 +1514,8 @@ readonly_dynrelocs (h, inf)
 /* Set the sizes of the dynamic sections.  */
 
 static bfd_boolean
-elf64_x86_64_size_dynamic_sections (output_bfd, info)
-     bfd *output_bfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info;
+elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+                                   struct bfd_link_info *info)
 {
   struct elf64_x86_64_link_hash_table *htab;
   bfd *dynobj;
@@ -1824,8 +1737,7 @@ elf64_x86_64_size_dynamic_sections (output_bfd, info)
    This is PT_TLS segment p_vaddr.  */
 
 static bfd_vma
-dtpoff_base (info)
-     struct bfd_link_info *info;
+dtpoff_base (struct bfd_link_info *info)
 {
   /* If tls_segment is NULL, we should have signalled an error already.  */
   if (elf_hash_table (info)->tls_segment == NULL)
@@ -1837,9 +1749,7 @@ dtpoff_base (info)
    if STT_TLS virtual address is ADDRESS.  */
 
 static bfd_vma
-tpoff (info, address)
-     struct bfd_link_info *info;
-     bfd_vma address;
+tpoff (struct bfd_link_info *info, bfd_vma address)
 {
   struct elf_link_tls_segment *tls_segment
     = elf_hash_table (info)->tls_segment;
@@ -1854,16 +1764,11 @@ tpoff (info, address)
 /* Relocate an x86_64 ELF section.  */
 
 static bfd_boolean
-elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
-                              contents, relocs, local_syms, local_sections)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     Elf_Internal_Rela *relocs;
-     Elf_Internal_Sym *local_syms;
-     asection **local_sections;
+elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
+                              bfd *input_bfd, asection *input_section,
+                              bfd_byte *contents, Elf_Internal_Rela *relocs,
+                              Elf_Internal_Sym *local_syms,
+                              asection **local_sections)
 {
   struct elf64_x86_64_link_hash_table *htab;
   Elf_Internal_Shdr *symtab_hdr;
@@ -1947,7 +1852,7 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared
+         else if (!info->executable
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
@@ -1981,12 +1886,9 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
              off = h->got.offset;
              dyn = htab->elf.dynamic_sections_created;
 
-             if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h)
+             if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
                  || (info->shared
-                     && (info->symbolic
-                         || h->dynindx == -1
-                         || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
-                     && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+                     && SYMBOL_REFERENCES_LOCAL (info, h))
                  || (ELF_ST_VISIBILITY (h->other)
                      && h->root.type == bfd_link_hash_undefweak))
                {
@@ -2113,11 +2015,7 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
               && ((r_type != R_X86_64_PC8
                    && r_type != R_X86_64_PC16
                    && r_type != R_X86_64_PC32)
-                  || (h != NULL
-                      && h->dynindx != -1
-                      && (! info->symbolic
-                          || (h->elf_link_hash_flags
-                              & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+                  || !SYMBOL_CALLS_LOCAL (info, h)))
              || (ELIMINATE_COPY_RELOCS
                  && !info->shared
                  && h != NULL
@@ -2604,11 +2502,10 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
    dynamic sections here.  */
 
 static bfd_boolean
-elf64_x86_64_finish_dynamic_symbol (output_bfd, info, h, sym)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
-     struct elf_link_hash_entry *h;
-     Elf_Internal_Sym *sym;
+elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd,
+                                   struct bfd_link_info *info,
+                                   struct elf_link_hash_entry *h,
+                                   Elf_Internal_Sym *sym)
 {
   struct elf64_x86_64_link_hash_table *htab;
 
@@ -2714,10 +2611,7 @@ elf64_x86_64_finish_dynamic_symbol (output_bfd, info, h, sym)
         The entry in the global offset table will already have been
         initialized in the relocate_section function.  */
       if (info->shared
-         && (info->symbolic
-             || h->dynindx == -1
-             || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
-         && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+         && SYMBOL_REFERENCES_LOCAL (info, h))
        {
          BFD_ASSERT((h->got.offset & 1) != 0);
          rela.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE);
@@ -2774,8 +2668,7 @@ elf64_x86_64_finish_dynamic_symbol (output_bfd, info, h, sym)
    dynamic linker, before writing them out.  */
 
 static enum elf_reloc_type_class
-elf64_x86_64_reloc_type_class (rela)
-     const Elf_Internal_Rela *rela;
+elf64_x86_64_reloc_type_class (const Elf_Internal_Rela *rela)
 {
   switch ((int) ELF64_R_TYPE (rela->r_info))
     {
@@ -2793,9 +2686,7 @@ elf64_x86_64_reloc_type_class (rela)
 /* Finish up the dynamic sections.  */
 
 static bfd_boolean
-elf64_x86_64_finish_dynamic_sections (output_bfd, info)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
+elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
 {
   struct elf64_x86_64_link_hash_table *htab;
   bfd *dynobj;
index 6686ab97cedc91870dea70748bebd334a16d15cf..601d208d9c7d7175cf4982f94d32d22feb266425 100644 (file)
@@ -125,8 +125,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define elf_reloc_symbol_deleted_p     NAME(_bfd_elf,reloc_symbol_deleted_p)
 #define elf_link_record_dynamic_symbol  _bfd_elf_link_record_dynamic_symbol
 #define elf_bfd_final_link             NAME(bfd_elf,bfd_final_link)
-#define elf_create_pointer_linker_section NAME(bfd_elf,create_pointer_linker_section)
-#define elf_finish_pointer_linker_section NAME(bfd_elf,finish_pointer_linker_section)
 #define elf_gc_sections                        NAME(_bfd_elf,gc_sections)
 #define elf_gc_common_finalize_got_offsets \
   NAME(_bfd_elf,gc_common_finalize_got_offsets)
@@ -153,31 +151,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define LOG_FILE_ALIGN 2
 #endif
 
-/* Static functions */
-
-static void elf_swap_ehdr_in
-  PARAMS ((bfd *, const Elf_External_Ehdr *, Elf_Internal_Ehdr *));
-static void elf_swap_ehdr_out
-  PARAMS ((bfd *, const Elf_Internal_Ehdr *, Elf_External_Ehdr *));
-static void elf_swap_shdr_in
-  PARAMS ((bfd *, const Elf_External_Shdr *, Elf_Internal_Shdr *));
-static void elf_swap_shdr_out
-  PARAMS ((bfd *, const Elf_Internal_Shdr *, Elf_External_Shdr *));
-
 #define elf_stringtab_init _bfd_elf_stringtab_init
 
 #define section_from_elf_index bfd_section_from_elf_index
 
-static bfd_boolean elf_slurp_reloc_table_from_section
-  PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, bfd_size_type,
-          arelent *, asymbol **, bfd_boolean));
-
-static bfd_boolean elf_file_p PARAMS ((Elf_External_Ehdr *));
-
 #ifdef DEBUG
-static void elf_debug_section PARAMS ((int, Elf_Internal_Shdr *));
-static void elf_debug_file PARAMS ((Elf_Internal_Ehdr *));
-static char *elf_symbol_flags PARAMS ((flagword));
+static void elf_debug_section (int, Elf_Internal_Shdr *);
+static void elf_debug_file (Elf_Internal_Ehdr *);
+static char *elf_symbol_flags (flagword);
 #endif
 \f
 /* Structure swapping routines */
@@ -201,14 +182,13 @@ static char *elf_symbol_flags PARAMS ((flagword));
    format.  */
 
 void
-elf_swap_symbol_in (abfd, psrc, pshn, dst)
-     bfd *abfd;
-     const PTR psrc;
-     const PTR pshn;
-     Elf_Internal_Sym *dst;
+elf_swap_symbol_in (bfd *abfd,
+                   const void *psrc,
+                   const void *pshn,
+                   Elf_Internal_Sym *dst)
 {
-  const Elf_External_Sym *src = (const Elf_External_Sym *) psrc;
-  const Elf_External_Sym_Shndx *shndx = (const Elf_External_Sym_Shndx *) pshn;
+  const Elf_External_Sym *src = psrc;
+  const Elf_External_Sym_Shndx *shndx = pshn;
   int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
 
   dst->st_name = H_GET_32 (abfd, src->st_name);
@@ -232,14 +212,13 @@ elf_swap_symbol_in (abfd, psrc, pshn, dst)
    format.  */
 
 void
-elf_swap_symbol_out (abfd, src, cdst, shndx)
-     bfd *abfd;
-     const Elf_Internal_Sym *src;
-     PTR cdst;
-     PTR shndx;
+elf_swap_symbol_out (bfd *abfd,
+                    const Elf_Internal_Sym *src,
+                    void *cdst,
+                    void *shndx)
 {
   unsigned int tmp;
-  Elf_External_Sym *dst = (Elf_External_Sym *) cdst;
+  Elf_External_Sym *dst = cdst;
   H_PUT_32 (abfd, src->st_name, dst->st_name);
   H_PUT_WORD (abfd, src->st_value, dst->st_value);
   H_PUT_WORD (abfd, src->st_size, dst->st_size);
@@ -260,10 +239,9 @@ elf_swap_symbol_out (abfd, src, cdst, shndx)
    internal format.  */
 
 static void
-elf_swap_ehdr_in (abfd, src, dst)
-     bfd *abfd;
-     const Elf_External_Ehdr *src;
-     Elf_Internal_Ehdr *dst;
+elf_swap_ehdr_in (bfd *abfd,
+                 const Elf_External_Ehdr *src,
+                 Elf_Internal_Ehdr *dst)
 {
   int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
   memcpy (dst->e_ident, src->e_ident, EI_NIDENT);
@@ -289,10 +267,9 @@ elf_swap_ehdr_in (abfd, src, dst)
    external format.  */
 
 static void
-elf_swap_ehdr_out (abfd, src, dst)
-     bfd *abfd;
-     const Elf_Internal_Ehdr *src;
-     Elf_External_Ehdr *dst;
+elf_swap_ehdr_out (bfd *abfd,
+                  const Elf_Internal_Ehdr *src,
+                  Elf_External_Ehdr *dst)
 {
   unsigned int tmp;
   int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
@@ -326,10 +303,9 @@ elf_swap_ehdr_out (abfd, src, dst)
    ELF section header table entry in internal format.  */
 
 static void
-elf_swap_shdr_in (abfd, src, dst)
-     bfd *abfd;
-     const Elf_External_Shdr *src;
-     Elf_Internal_Shdr *dst;
+elf_swap_shdr_in (bfd *abfd,
+                 const Elf_External_Shdr *src,
+                 Elf_Internal_Shdr *dst)
 {
   int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
 
@@ -354,10 +330,9 @@ elf_swap_shdr_in (abfd, src, dst)
    ELF section header table entry in external format.  */
 
 static void
-elf_swap_shdr_out (abfd, src, dst)
-     bfd *abfd;
-     const Elf_Internal_Shdr *src;
-     Elf_External_Shdr *dst;
+elf_swap_shdr_out (bfd *abfd,
+                  const Elf_Internal_Shdr *src,
+                  Elf_External_Shdr *dst)
 {
   /* note that all elements of dst are *arrays of unsigned char* already...  */
   H_PUT_32 (abfd, src->sh_name, dst->sh_name);
@@ -376,10 +351,9 @@ elf_swap_shdr_out (abfd, src, dst)
    ELF program header table entry in internal format.  */
 
 void
-elf_swap_phdr_in (abfd, src, dst)
-     bfd *abfd;
-     const Elf_External_Phdr *src;
-     Elf_Internal_Phdr *dst;
+elf_swap_phdr_in (bfd *abfd,
+                 const Elf_External_Phdr *src,
+                 Elf_Internal_Phdr *dst)
 {
   int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
 
@@ -402,10 +376,9 @@ elf_swap_phdr_in (abfd, src, dst)
 }
 
 void
-elf_swap_phdr_out (abfd, src, dst)
-     bfd *abfd;
-     const Elf_Internal_Phdr *src;
-     Elf_External_Phdr *dst;
+elf_swap_phdr_out (bfd *abfd,
+                  const Elf_Internal_Phdr *src,
+                  Elf_External_Phdr *dst)
 {
   /* note that all elements of dst are *arrays of unsigned char* already...  */
   H_PUT_32 (abfd, src->p_type, dst->p_type);
@@ -420,10 +393,9 @@ elf_swap_phdr_out (abfd, src, dst)
 
 /* Translate an ELF reloc from external format to internal format.  */
 void
-elf_swap_reloc_in (abfd, s, dst)
-     bfd *abfd;
-     const bfd_byte *s;
-     Elf_Internal_Rela *dst;
+elf_swap_reloc_in (bfd *abfd,
+                  const bfd_byte *s,
+                  Elf_Internal_Rela *dst)
 {
   const Elf_External_Rel *src = (const Elf_External_Rel *) s;
   dst->r_offset = H_GET_WORD (abfd, src->r_offset);
@@ -432,10 +404,9 @@ elf_swap_reloc_in (abfd, s, dst)
 }
 
 void
-elf_swap_reloca_in (abfd, s, dst)
-     bfd *abfd;
-     const bfd_byte *s;
-     Elf_Internal_Rela *dst;
+elf_swap_reloca_in (bfd *abfd,
+                   const bfd_byte *s,
+                   Elf_Internal_Rela *dst)
 {
   const Elf_External_Rela *src = (const Elf_External_Rela *) s;
   dst->r_offset = H_GET_WORD (abfd, src->r_offset);
@@ -445,10 +416,9 @@ elf_swap_reloca_in (abfd, s, dst)
 
 /* Translate an ELF reloc from internal format to external format.  */
 void
-elf_swap_reloc_out (abfd, src, d)
-     bfd *abfd;
-     const Elf_Internal_Rela *src;
-     bfd_byte *d;
+elf_swap_reloc_out (bfd *abfd,
+                   const Elf_Internal_Rela *src,
+                   bfd_byte *d)
 {
   Elf_External_Rel *dst = (Elf_External_Rel *) d;
   H_PUT_WORD (abfd, src->r_offset, dst->r_offset);
@@ -456,10 +426,9 @@ elf_swap_reloc_out (abfd, src, d)
 }
 
 void
-elf_swap_reloca_out (abfd, src, d)
-     bfd *abfd;
-     const Elf_Internal_Rela *src;
-     bfd_byte *d;
+elf_swap_reloca_out (bfd *abfd,
+                    const Elf_Internal_Rela *src,
+                    bfd_byte *d)
 {
   Elf_External_Rela *dst = (Elf_External_Rela *) d;
   H_PUT_WORD (abfd, src->r_offset, dst->r_offset);
@@ -467,25 +436,23 @@ elf_swap_reloca_out (abfd, src, d)
   H_PUT_SIGNED_WORD (abfd, src->r_addend, dst->r_addend);
 }
 
-INLINE void
-elf_swap_dyn_in (abfd, p, dst)
-     bfd *abfd;
-     const PTR p;
-     Elf_Internal_Dyn *dst;
+void
+elf_swap_dyn_in (bfd *abfd,
+                const void *p,
+                Elf_Internal_Dyn *dst)
 {
-  const Elf_External_Dyn *src = (const Elf_External_Dyn *) p;
+  const Elf_External_Dyn *src = p;
 
   dst->d_tag = H_GET_WORD (abfd, src->d_tag);
   dst->d_un.d_val = H_GET_WORD (abfd, src->d_un.d_val);
 }
 
-INLINE void
-elf_swap_dyn_out (abfd, src, p)
-     bfd *abfd;
-     const Elf_Internal_Dyn *src;
-     PTR p;
+void
+elf_swap_dyn_out (bfd *abfd,
+                 const Elf_Internal_Dyn *src,
+                 void *p)
 {
-  Elf_External_Dyn *dst = (Elf_External_Dyn *) p;
+  Elf_External_Dyn *dst = p;
 
   H_PUT_WORD (abfd, src->d_tag, dst->d_tag);
   H_PUT_WORD (abfd, src->d_un.d_val, dst->d_un.d_val);
@@ -498,9 +465,8 @@ elf_swap_dyn_out (abfd, src, p)
    First we validate the file by reading in the ELF header and checking
    the magic number.  */
 
-static INLINE bfd_boolean
-elf_file_p (x_ehdrp)
-     Elf_External_Ehdr *x_ehdrp;
+static inline bfd_boolean
+elf_file_p (Elf_External_Ehdr *x_ehdrp)
 {
   return ((x_ehdrp->e_ident[EI_MAG0] == ELFMAG0)
          && (x_ehdrp->e_ident[EI_MAG1] == ELFMAG1)
@@ -517,8 +483,7 @@ elf_file_p (x_ehdrp)
    file does not match the target vector.  */
 
 const bfd_target *
-elf_object_p (abfd)
-     bfd *abfd;
+elf_object_p (bfd *abfd)
 {
   Elf_External_Ehdr x_ehdr;    /* Elf file header, external form */
   Elf_Internal_Ehdr *i_ehdrp;  /* Elf file header, internal form */
@@ -536,8 +501,7 @@ elf_object_p (abfd)
 
   /* Read in the ELF header in external format.  */
 
-  if (bfd_bread ((PTR) & x_ehdr, (bfd_size_type) sizeof (x_ehdr), abfd)
-      != sizeof (x_ehdr))
+  if (bfd_bread (&x_ehdr, sizeof (x_ehdr), abfd) != sizeof (x_ehdr))
     {
       if (bfd_get_error () != bfd_error_system_call)
        goto got_wrong_format_error;
@@ -572,17 +536,15 @@ elf_object_p (abfd)
       goto got_wrong_format_error;
     }
 
+  if (!bfd_preserve_save (abfd, &preserve))
+    goto got_no_match;
+
   /* Allocate an instance of the elf_obj_tdata structure and hook it up to
      the tdata pointer in the bfd.  */
 
-  amt = sizeof (struct elf_obj_tdata);
-  preserve.marker = bfd_zalloc (abfd, amt);
-  if (preserve.marker == NULL)
+  if (! (*abfd->xvec->_bfd_set_format[bfd_object]) (abfd))
     goto got_no_match;
-  if (!bfd_preserve_save (abfd, &preserve))
-    goto got_no_match;
-
-  elf_tdata (abfd) = preserve.marker;
+  preserve.marker = elf_tdata (abfd);
 
   /* Now that we know the byte order, swap in the rest of the header */
   i_ehdrp = elf_elfheader (abfd);
@@ -673,8 +635,7 @@ elf_object_p (abfd)
 
       /* Read the first section header at index 0, and convert to internal
         form.  */
-      if (bfd_bread ((PTR) & x_shdr, (bfd_size_type) sizeof x_shdr, abfd)
-         != sizeof (x_shdr))
+      if (bfd_bread (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr))
        goto got_no_match;
       elf_swap_shdr_in (abfd, &x_shdr, &i_shdr);
 
@@ -696,7 +657,7 @@ elf_object_p (abfd)
       unsigned int num_sec;
 
       amt = sizeof (*i_shdrp) * i_ehdrp->e_shnum;
-      i_shdrp = (Elf_Internal_Shdr *) bfd_alloc (abfd, amt);
+      i_shdrp = bfd_alloc (abfd, amt);
       if (!i_shdrp)
        goto got_no_match;
       num_sec = i_ehdrp->e_shnum;
@@ -704,7 +665,7 @@ elf_object_p (abfd)
        num_sec += SHN_HIRESERVE + 1 - SHN_LORESERVE;
       elf_numsections (abfd) = num_sec;
       amt = sizeof (i_shdrp) * num_sec;
-      elf_elfsections (abfd) = (Elf_Internal_Shdr **) bfd_alloc (abfd, amt);
+      elf_elfsections (abfd) = bfd_alloc (abfd, amt);
       if (!elf_elfsections (abfd))
        goto got_no_match;
 
@@ -725,8 +686,7 @@ elf_object_p (abfd)
         to internal form.  */
       for (shindex = 1; shindex < i_ehdrp->e_shnum; shindex++)
        {
-         if (bfd_bread ((PTR) & x_shdr, (bfd_size_type) sizeof x_shdr, abfd)
-             != sizeof (x_shdr))
+         if (bfd_bread (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr))
            goto got_no_match;
          elf_swap_shdr_in (abfd, &x_shdr, i_shdrp + shindex);
 
@@ -757,7 +717,7 @@ elf_object_p (abfd)
       unsigned int i;
 
       amt = i_ehdrp->e_phnum * sizeof (Elf_Internal_Phdr);
-      elf_tdata (abfd)->phdr = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt);
+      elf_tdata (abfd)->phdr = bfd_alloc (abfd, amt);
       if (elf_tdata (abfd)->phdr == NULL)
        goto got_no_match;
       if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_phoff, SEEK_SET) != 0)
@@ -767,8 +727,7 @@ elf_object_p (abfd)
        {
          Elf_External_Phdr x_phdr;
 
-         if (bfd_bread ((PTR) &x_phdr, (bfd_size_type) sizeof x_phdr, abfd)
-             != sizeof x_phdr)
+         if (bfd_bread (&x_phdr, sizeof x_phdr, abfd) != sizeof x_phdr)
            goto got_no_match;
          elf_swap_phdr_in (abfd, &x_phdr, i_phdr);
        }
@@ -854,12 +813,9 @@ elf_object_p (abfd)
 /* Write out the relocs.  */
 
 void
-elf_write_relocs (abfd, sec, data)
-     bfd *abfd;
-     asection *sec;
-     PTR data;
+elf_write_relocs (bfd *abfd, asection *sec, void *data)
 {
-  bfd_boolean *failedp = (bfd_boolean *) data;
+  bfd_boolean *failedp = data;
   Elf_Internal_Shdr *rela_hdr;
   bfd_vma addr_offset;
   void (*swap_out) PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
@@ -886,7 +842,7 @@ elf_write_relocs (abfd, sec, data)
   rela_hdr = &elf_section_data (sec)->rel_hdr;
 
   rela_hdr->sh_size = rela_hdr->sh_entsize * sec->reloc_count;
-  rela_hdr->contents = (PTR) bfd_alloc (abfd, rela_hdr->sh_size);
+  rela_hdr->contents = bfd_alloc (abfd, rela_hdr->sh_size);
   if (rela_hdr->contents == NULL)
     {
       *failedp = TRUE;
@@ -964,17 +920,16 @@ elf_write_relocs (abfd, sec, data)
 /* Write out the program headers.  */
 
 int
-elf_write_out_phdrs (abfd, phdr, count)
-     bfd *abfd;
-     const Elf_Internal_Phdr *phdr;
-     unsigned int count;
+elf_write_out_phdrs (bfd *abfd,
+                    const Elf_Internal_Phdr *phdr,
+                    unsigned int count)
 {
   while (count--)
     {
       Elf_External_Phdr extphdr;
       elf_swap_phdr_out (abfd, phdr, &extphdr);
-      if (bfd_bwrite (&extphdr, (bfd_size_type) sizeof (Elf_External_Phdr),
-                    abfd) != sizeof (Elf_External_Phdr))
+      if (bfd_bwrite (&extphdr, sizeof (Elf_External_Phdr), abfd)
+         != sizeof (Elf_External_Phdr))
        return -1;
       phdr++;
     }
@@ -984,8 +939,7 @@ elf_write_out_phdrs (abfd, phdr, count)
 /* Write out the section headers and the ELF file header.  */
 
 bfd_boolean
-elf_write_shdrs_and_ehdr (abfd)
-     bfd *abfd;
+elf_write_shdrs_and_ehdr (bfd *abfd)
 {
   Elf_External_Ehdr x_ehdr;    /* Elf file header, external form */
   Elf_Internal_Ehdr *i_ehdrp;  /* Elf file header, internal form */
@@ -1005,7 +959,7 @@ elf_write_shdrs_and_ehdr (abfd)
   elf_swap_ehdr_out (abfd, i_ehdrp, &x_ehdr);
   amt = sizeof (x_ehdr);
   if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
-      || bfd_bwrite ((PTR) & x_ehdr, amt, abfd) != amt)
+      || bfd_bwrite (&x_ehdr, amt, abfd) != amt)
     return FALSE;
 
   /* Some fields in the first section header handle overflow of ehdr
@@ -1018,7 +972,7 @@ elf_write_shdrs_and_ehdr (abfd)
   /* at this point we've concocted all the ELF sections...  */
   amt = i_ehdrp->e_shnum;
   amt *= sizeof (*x_shdrp);
-  x_shdrp = (Elf_External_Shdr *) bfd_alloc (abfd, amt);
+  x_shdrp = bfd_alloc (abfd, amt);
   if (!x_shdrp)
     return FALSE;
 
@@ -1033,7 +987,7 @@ elf_write_shdrs_and_ehdr (abfd)
        i_shdrp += SHN_HIRESERVE + 1 - SHN_LORESERVE;
     }
   if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0
-      || bfd_bwrite ((PTR) x_shdrp, amt, abfd) != amt)
+      || bfd_bwrite (x_shdrp, amt, abfd) != amt)
     return FALSE;
 
   /* need to dump the string table too...  */
@@ -1042,10 +996,7 @@ elf_write_shdrs_and_ehdr (abfd)
 }
 
 long
-elf_slurp_symbol_table (abfd, symptrs, dynamic)
-     bfd *abfd;
-     asymbol **symptrs;                /* Buffer for generated bfd symbols */
-     bfd_boolean dynamic;
+elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
 {
   Elf_Internal_Shdr *hdr;
   Elf_Internal_Shdr *verhdr;
@@ -1105,7 +1056,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
 
       amt = symcount;
       amt *= sizeof (elf_symbol_type);
-      symbase = (elf_symbol_type *) bfd_zalloc (abfd, amt);
+      symbase = bfd_zalloc (abfd, amt);
       if (symbase == (elf_symbol_type *) NULL)
        goto error_return;
 
@@ -1129,12 +1080,11 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
          if (bfd_seek (abfd, verhdr->sh_offset, SEEK_SET) != 0)
            goto error_return;
 
-         xverbuf = (Elf_External_Versym *) bfd_malloc (verhdr->sh_size);
+         xverbuf = bfd_malloc (verhdr->sh_size);
          if (xverbuf == NULL && verhdr->sh_size != 0)
            goto error_return;
 
-         if (bfd_bread ((PTR) xverbuf, verhdr->sh_size, abfd)
-             != verhdr->sh_size)
+         if (bfd_bread (xverbuf, verhdr->sh_size, abfd) != verhdr->sh_size)
            goto error_return;
        }
 
@@ -1280,25 +1230,23 @@ error_return:
    them.  */
 
 static bfd_boolean
-elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
-                                   relents, symbols, dynamic)
-     bfd *abfd;
-     asection *asect;
-     Elf_Internal_Shdr *rel_hdr;
-     bfd_size_type reloc_count;
-     arelent *relents;
-     asymbol **symbols;
-     bfd_boolean dynamic;
+elf_slurp_reloc_table_from_section (bfd *abfd,
+                                   asection *asect,
+                                   Elf_Internal_Shdr *rel_hdr,
+                                   bfd_size_type reloc_count,
+                                   arelent *relents,
+                                   asymbol **symbols,
+                                   bfd_boolean dynamic)
 {
   struct elf_backend_data * const ebd = get_elf_backend_data (abfd);
-  PTR allocated = NULL;
+  void *allocated = NULL;
   bfd_byte *native_relocs;
   arelent *relent;
   unsigned int i;
   int entsize;
   unsigned int symcount;
 
-  allocated = (PTR) bfd_malloc (rel_hdr->sh_size);
+  allocated = bfd_malloc (rel_hdr->sh_size);
   if (allocated == NULL)
     goto error_return;
 
@@ -1307,7 +1255,7 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
          != rel_hdr->sh_size))
     goto error_return;
 
-  native_relocs = (bfd_byte *) allocated;
+  native_relocs = allocated;
 
   entsize = rel_hdr->sh_entsize;
   BFD_ASSERT (entsize == sizeof (Elf_External_Rel)
@@ -1385,11 +1333,10 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
 /* Read in and swap the external relocs.  */
 
 bfd_boolean
-elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
-     bfd *abfd;
-     asection *asect;
-     asymbol **symbols;
-     bfd_boolean dynamic;
+elf_slurp_reloc_table (bfd *abfd,
+                      asection *asect,
+                      asymbol **symbols,
+                      bfd_boolean dynamic)
 {
   struct bfd_elf_section_data * const d = elf_section_data (asect);
   Elf_Internal_Shdr *rel_hdr;
@@ -1434,7 +1381,7 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
     }
 
   amt = (reloc_count + reloc_count2) * sizeof (arelent);
-  relents = (arelent *) bfd_alloc (abfd, amt);
+  relents = bfd_alloc (abfd, amt);
   if (relents == NULL)
     return FALSE;
 
@@ -1457,9 +1404,7 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
 
 #ifdef DEBUG
 static void
-elf_debug_section (num, hdr)
-     int num;
-     Elf_Internal_Shdr *hdr;
+elf_debug_section (int num, Elf_Internal_Shdr *hdr)
 {
   fprintf (stderr, "\nSection#%d '%s' 0x%.8lx\n", num,
           hdr->bfd_section != NULL ? hdr->bfd_section->name : "",
@@ -1485,8 +1430,7 @@ elf_debug_section (num, hdr)
 }
 
 static void
-elf_debug_file (ehdrp)
-     Elf_Internal_Ehdr *ehdrp;
+elf_debug_file (Elf_Internal_Ehdr *ehdrp)
 {
   fprintf (stderr, "e_entry      = 0x%.8lx\n", (long) ehdrp->e_entry);
   fprintf (stderr, "e_phoff      = %ld\n", (long) ehdrp->e_phoff);
@@ -1498,8 +1442,7 @@ elf_debug_file (ehdrp)
 }
 
 static char *
-elf_symbol_flags (flags)
-     flagword flags;
+elf_symbol_flags (flagword flags)
 {
   static char buffer[1024];
 
@@ -1584,12 +1527,11 @@ elf_symbol_flags (flags)
    remote memory.  */
 
 bfd *
-NAME(_bfd_elf,bfd_from_remote_memory) (templ, ehdr_vma, loadbasep,
-                                      target_read_memory)
-     bfd *templ;
-     bfd_vma ehdr_vma;
-     bfd_vma *loadbasep;
-     int (*target_read_memory) PARAMS ((bfd_vma vma, char *myaddr, int len));
+NAME(_bfd_elf,bfd_from_remote_memory)
+  (bfd *templ,
+   bfd_vma ehdr_vma,
+   bfd_vma *loadbasep,
+   int (*target_read_memory) (bfd_vma, char *, int))
 {
   Elf_External_Ehdr x_ehdr;    /* Elf file header, external form */
   Elf_Internal_Ehdr i_ehdr;    /* Elf file header, internal form */
@@ -1658,8 +1600,7 @@ NAME(_bfd_elf,bfd_from_remote_memory) (templ, ehdr_vma, loadbasep,
       return NULL;
     }
 
-  x_phdrs = (Elf_External_Phdr *)
-    bfd_malloc (i_ehdr.e_phnum * (sizeof *x_phdrs + sizeof *i_phdrs));
+  x_phdrs = bfd_malloc (i_ehdr.e_phnum * (sizeof *x_phdrs + sizeof *i_phdrs));
   if (x_phdrs == NULL)
     {
       bfd_set_error (bfd_error_no_memory);
@@ -1720,7 +1661,7 @@ NAME(_bfd_elf,bfd_from_remote_memory) (templ, ehdr_vma, loadbasep,
     contents_size = last_phdr->p_offset + last_phdr->p_filesz;
 
   /* Now we know the size of the whole image we want read in.  */
-  contents = (char *) bfd_zmalloc ((bfd_size_type) contents_size);
+  contents = bfd_zmalloc (contents_size);
   if (contents == NULL)
     {
       free (x_phdrs);
@@ -1765,8 +1706,7 @@ NAME(_bfd_elf,bfd_from_remote_memory) (templ, ehdr_vma, loadbasep,
   memcpy (contents, &x_ehdr, sizeof x_ehdr);
 
   /* Now we have a memory image of the ELF file contents.  Make a BFD.  */
-  bim = ((struct bfd_in_memory *)
-        bfd_malloc ((bfd_size_type) sizeof (struct bfd_in_memory)));
+  bim = bfd_malloc (sizeof (struct bfd_in_memory));
   if (bim == NULL)
     {
       free (contents);
@@ -1785,7 +1725,7 @@ NAME(_bfd_elf,bfd_from_remote_memory) (templ, ehdr_vma, loadbasep,
   nbfd->xvec = templ->xvec;
   bim->size = contents_size;
   bim->buffer = contents;
-  nbfd->iostream = (PTR) bim;
+  nbfd->iostream = bim;
   nbfd->flags = BFD_IN_MEMORY;
   nbfd->direction = read_direction;
   nbfd->mtime = time (NULL);
index 724d607d3a6773bd5d95e992e597617e439e0599..865edcd0650de7bc06baa979706cc0b71f13d4f5 100644 (file)
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 char*
-elf_core_file_failing_command (abfd)
-     bfd *abfd;
+elf_core_file_failing_command (bfd *abfd)
 {
   return elf_tdata (abfd)->core_command;
 }
 
 int
-elf_core_file_failing_signal (abfd)
-     bfd *abfd;
+elf_core_file_failing_signal (bfd *abfd)
 {
   return elf_tdata (abfd)->core_signal;
 }
 
 bfd_boolean
-elf_core_file_matches_executable_p (core_bfd, exec_bfd)
-     bfd *core_bfd;
-     bfd *exec_bfd;
+elf_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
 {
   char* corename;
 
@@ -55,7 +51,7 @@ elf_core_file_matches_executable_p (core_bfd, exec_bfd)
 
       execname = execname ? execname + 1 : exec_bfd->filename;
 
-      if (strcmp(execname, corename) != 0)
+      if (strcmp (execname, corename) != 0)
        return FALSE;
     }
 
@@ -74,8 +70,7 @@ elf_core_file_matches_executable_p (core_bfd, exec_bfd)
     floating point registers (.reg2).  */
 
 const bfd_target *
-elf_core_file_p (abfd)
-     bfd *abfd;
+elf_core_file_p (bfd *abfd)
 {
   Elf_External_Ehdr x_ehdr;    /* Elf file header, external form.  */
   Elf_Internal_Ehdr *i_ehdrp;  /* Elf file header, internal form.  */
@@ -88,8 +83,7 @@ elf_core_file_p (abfd)
   preserve.marker = NULL;
 
   /* Read in the ELF header in external format.  */
-  if (bfd_bread ((PTR) &x_ehdr, (bfd_size_type) sizeof (x_ehdr), abfd)
-      != sizeof (x_ehdr))
+  if (bfd_bread (&x_ehdr, sizeof (x_ehdr), abfd) != sizeof (x_ehdr))
     {
       if (bfd_get_error () != bfd_error_system_call)
        goto wrong;
@@ -122,15 +116,13 @@ elf_core_file_p (abfd)
       goto wrong;
     }
 
-  /* Give abfd an elf_obj_tdata.  */
-  amt = sizeof (struct elf_obj_tdata);
-  preserve.marker = bfd_zalloc (abfd, amt);
-  if (preserve.marker == NULL)
-    goto fail;
   if (!bfd_preserve_save (abfd, &preserve))
     goto fail;
 
-  elf_tdata (abfd) = preserve.marker;
+  /* Give abfd an elf_obj_tdata.  */
+  if (! (*abfd->xvec->_bfd_set_format[bfd_core]) (abfd))
+    goto fail;
+  preserve.marker = elf_tdata (abfd);
 
   /* Swap in the rest of the header, now that we have the byte order.  */
   i_ehdrp = elf_elfheader (abfd);
@@ -195,7 +187,7 @@ elf_core_file_p (abfd)
 
   /* Allocate space for the program headers.  */
   amt = sizeof (*i_phdrp) * i_ehdrp->e_phnum;
-  i_phdrp = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt);
+  i_phdrp = bfd_alloc (abfd, amt);
   if (!i_phdrp)
     goto fail;
 
@@ -206,8 +198,7 @@ elf_core_file_p (abfd)
     {
       Elf_External_Phdr x_phdr;
 
-      if (bfd_bread ((PTR) &x_phdr, (bfd_size_type) sizeof (x_phdr), abfd)
-         != sizeof (x_phdr))
+      if (bfd_bread (&x_phdr, sizeof (x_phdr), abfd) != sizeof (x_phdr))
        goto fail;
 
       elf_swap_phdr_in (abfd, &x_phdr, i_phdrp + phindex);
index d6f6d705eadf3c5305be5889bf4334ed1d534561..cb6b0b2ba1f9aa170cd095a5125e8f35f278286b 100644 (file)
@@ -25,13 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define ARCH_SIZE 0
 #include "elf-bfd.h"
 
-static bfd_boolean elf_link_read_relocs_from_section
-  PARAMS ((bfd *, Elf_Internal_Shdr *, PTR, Elf_Internal_Rela *));
-
 bfd_boolean
-_bfd_elf_create_got_section (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+_bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
 {
   flagword flags;
   asection *s;
@@ -87,8 +82,7 @@ _bfd_elf_create_got_section (abfd, info)
       bh = NULL;
       if (!(_bfd_generic_link_add_one_symbol
            (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
-            bed->got_symbol_offset, (const char *) NULL, FALSE,
-            bed->collect, &bh)))
+            bed->got_symbol_offset, NULL, FALSE, bed->collect, &bh)))
        return FALSE;
       h = (struct elf_link_hash_entry *) bh;
       h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
@@ -115,9 +109,7 @@ _bfd_elf_create_got_section (abfd, info)
    actual contents and size of these sections later.  */
 
 bfd_boolean
-_bfd_elf_link_create_dynamic_sections (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+_bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
 {
   flagword flags;
   register asection *s;
@@ -220,8 +212,8 @@ _bfd_elf_link_create_dynamic_sections (abfd, info)
      code examines it to decide how to initialize the process.  */
   bh = NULL;
   if (! (_bfd_generic_link_add_one_symbol
-        (info, abfd, "_DYNAMIC", BSF_GLOBAL, s, (bfd_vma) 0,
-         (const char *) 0, FALSE, get_elf_backend_data (abfd)->collect, &bh)))
+        (info, abfd, "_DYNAMIC", BSF_GLOBAL, s, 0, NULL, FALSE,
+         get_elf_backend_data (abfd)->collect, &bh)))
     return FALSE;
   h = (struct elf_link_hash_entry *) bh;
   h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
@@ -252,9 +244,7 @@ _bfd_elf_link_create_dynamic_sections (abfd, info)
 /* Create dynamic sections when linking against a dynamic object.  */
 
 bfd_boolean
-_bfd_elf_create_dynamic_sections (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+_bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
 {
   flagword flags, pltflags;
   asection *s;
@@ -287,9 +277,8 @@ _bfd_elf_create_dynamic_sections (abfd, info)
       struct bfd_link_hash_entry *bh = NULL;
 
       if (! (_bfd_generic_link_add_one_symbol
-            (info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
-             (bfd_vma) 0, (const char *) NULL, FALSE,
-             get_elf_backend_data (abfd)->collect, &bh)))
+            (info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s, 0, NULL,
+             FALSE, get_elf_backend_data (abfd)->collect, &bh)))
        return FALSE;
       h = (struct elf_link_hash_entry *) bh;
       h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
@@ -358,9 +347,8 @@ _bfd_elf_create_dynamic_sections (abfd, info)
    one.  */
 
 bfd_boolean
-_bfd_elf_link_record_dynamic_symbol (info, h)
-     struct bfd_link_info *info;
-     struct elf_link_hash_entry *h;
+_bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info,
+                                    struct elf_link_hash_entry *h)
 {
   if (h->dynindx == -1)
     {
@@ -414,7 +402,7 @@ _bfd_elf_link_record_dynamic_symbol (info, h)
        {
          size_t len = p - name + 1;
 
-         alc = bfd_malloc ((bfd_size_type) len);
+         alc = bfd_malloc (len);
          if (alc == NULL)
            return FALSE;
          memcpy (alc, name, len - 1);
@@ -440,11 +428,10 @@ _bfd_elf_link_record_dynamic_symbol (info, h)
    this in case some dynamic object refers to this symbol.  */
 
 bfd_boolean
-bfd_elf_record_link_assignment (output_bfd, info, name, provide)
-     bfd *output_bfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *info;
-     const char *name;
-     bfd_boolean provide;
+bfd_elf_record_link_assignment (bfd *output_bfd ATTRIBUTE_UNUSED,
+                               struct bfd_link_info *info,
+                               const char *name,
+                               bfd_boolean provide)
 {
   struct elf_link_hash_entry *h;
 
@@ -505,10 +492,9 @@ bfd_elf_record_link_assignment (output_bfd, info, name, provide)
    in a discarded section, eg. a discarded link-once section symbol.  */
 
 int
-elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     long input_indx;
+elf_link_record_local_dynamic_symbol (struct bfd_link_info *info,
+                                     bfd *input_bfd,
+                                     long input_indx)
 {
   bfd_size_type amt;
   struct elf_link_local_dynamic_entry *entry;
@@ -528,14 +514,13 @@ elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
       return 1;
 
   amt = sizeof (*entry);
-  entry = (struct elf_link_local_dynamic_entry *) bfd_alloc (input_bfd, amt);
+  entry = bfd_alloc (input_bfd, amt);
   if (entry == NULL)
     return 0;
 
   /* Go find the symbol, so that we can find it's name.  */
   if (!bfd_elf_get_elf_syms (input_bfd, &elf_tdata (input_bfd)->symtab_hdr,
-                            (size_t) 1, (size_t) input_indx,
-                            &entry->isym, esym, &eshndx))
+                            1, input_indx, &entry->isym, esym, &eshndx))
     {
       bfd_release (input_bfd, entry);
       return 0;
@@ -595,10 +580,9 @@ elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
 /* Return the dynindex of a local dynamic symbol.  */
 
 long
-_bfd_elf_link_lookup_local_dynindx (info, input_bfd, input_indx)
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     long input_indx;
+_bfd_elf_link_lookup_local_dynindx (struct bfd_link_info *info,
+                                   bfd *input_bfd,
+                                   long input_indx)
 {
   struct elf_link_local_dynamic_entry *e;
 
@@ -612,15 +596,11 @@ _bfd_elf_link_lookup_local_dynindx (info, input_bfd, input_indx)
    them are removed because they are marked as local.  This is called
    via elf_link_hash_traverse.  */
 
-static bfd_boolean elf_link_renumber_hash_table_dynsyms
-  PARAMS ((struct elf_link_hash_entry *, PTR));
-
 static bfd_boolean
-elf_link_renumber_hash_table_dynsyms (h, data)
-     struct elf_link_hash_entry *h;
-     PTR data;
+elf_link_renumber_hash_table_dynsyms (struct elf_link_hash_entry *h,
+                                     void *data)
 {
-  size_t *count = (size_t *) data;
+  size_t *count = data;
 
   if (h->root.type == bfd_link_hash_warning)
     h = (struct elf_link_hash_entry *) h->root.u.i.link;
@@ -637,9 +617,7 @@ elf_link_renumber_hash_table_dynsyms (h, data)
    the global symbols.  */
 
 unsigned long
-_bfd_elf_link_renumber_dynsyms (output_bfd, info)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
+_bfd_elf_link_renumber_dynsyms (bfd *output_bfd, struct bfd_link_info *info)
 {
   unsigned long dynsymcount = 0;
 
@@ -684,20 +662,18 @@ _bfd_elf_link_renumber_dynsyms (output_bfd, info)
    a shared object.  */
 
 bfd_boolean
-_bfd_elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, skip,
-                      override, type_change_ok, size_change_ok, dt_needed)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     const char *name;
-     Elf_Internal_Sym *sym;
-     asection **psec;
-     bfd_vma *pvalue;
-     struct elf_link_hash_entry **sym_hash;
-     bfd_boolean *skip;
-     bfd_boolean *override;
-     bfd_boolean *type_change_ok;
-     bfd_boolean *size_change_ok;
-     bfd_boolean dt_needed;
+_bfd_elf_merge_symbol (bfd *abfd,
+                      struct bfd_link_info *info,
+                      const char *name,
+                      Elf_Internal_Sym *sym,
+                      asection **psec,
+                      bfd_vma *pvalue,
+                      struct elf_link_hash_entry **sym_hash,
+                      bfd_boolean *skip,
+                      bfd_boolean *override,
+                      bfd_boolean *type_change_ok,
+                      bfd_boolean *size_change_ok,
+                      bfd_boolean dt_needed)
 {
   asection *sec;
   struct elf_link_hash_entry *h;
@@ -1254,18 +1230,16 @@ _bfd_elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, skip,
    indicates if it comes from a DT_NEEDED entry of a shared object.  */
 
 bfd_boolean
-_bfd_elf_add_default_symbol (abfd, info, h, name, sym, psec, value,
-                            dynsym, override, dt_needed)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     struct elf_link_hash_entry *h;
-     const char *name;
-     Elf_Internal_Sym *sym;
-     asection **psec;
-     bfd_vma *value;
-     bfd_boolean *dynsym;
-     bfd_boolean override;
-     bfd_boolean dt_needed;
+_bfd_elf_add_default_symbol (bfd *abfd,
+                            struct bfd_link_info *info,
+                            struct elf_link_hash_entry *h,
+                            const char *name,
+                            Elf_Internal_Sym *sym,
+                            asection **psec,
+                            bfd_vma *value,
+                            bfd_boolean *dynsym,
+                            bfd_boolean override,
+                            bfd_boolean dt_needed)
 {
   bfd_boolean type_change_ok;
   bfd_boolean size_change_ok;
@@ -1337,7 +1311,7 @@ _bfd_elf_add_default_symbol (abfd, info, h, name, sym, psec, value,
       bh = &hi->root;
       if (! (_bfd_generic_link_add_one_symbol
             (info, abfd, shortname, BSF_INDIRECT, bfd_ind_section_ptr,
-             (bfd_vma) 0, name, FALSE, collect, &bh)))
+             0, name, FALSE, collect, &bh)))
        return FALSE;
       hi = (struct elf_link_hash_entry *) bh;
     }
@@ -1461,7 +1435,7 @@ nondefault:
       bh = &hi->root;
       if (! (_bfd_generic_link_add_one_symbol
             (info, abfd, shortname, BSF_INDIRECT,
-             bfd_ind_section_ptr, (bfd_vma) 0, name, FALSE, collect, &bh)))
+             bfd_ind_section_ptr, 0, name, FALSE, collect, &bh)))
        return FALSE;
       hi = (struct elf_link_hash_entry *) bh;
 
@@ -1507,11 +1481,9 @@ nondefault:
    symbol table.  It is called via elf_link_hash_traverse.  */
 
 bfd_boolean
-_bfd_elf_export_symbol (h, data)
-     struct elf_link_hash_entry *h;
-     PTR data;
+_bfd_elf_export_symbol (struct elf_link_hash_entry *h, void *data)
 {
-  struct elf_info_failed *eif = (struct elf_info_failed *) data;
+  struct elf_info_failed *eif = data;
 
   /* Ignore indirect symbols.  These are added by the versioning code.  */
   if (h->root.type == bfd_link_hash_indirect)
@@ -1568,11 +1540,10 @@ _bfd_elf_export_symbol (h, data)
    This function is called via elf_link_hash_traverse.  */
 
 bfd_boolean
-_bfd_elf_link_find_version_dependencies (h, data)
-     struct elf_link_hash_entry *h;
-     PTR data;
+_bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h,
+                                        void *data)
 {
-  struct elf_find_verdep_info *rinfo = (struct elf_find_verdep_info *) data;
+  struct elf_find_verdep_info *rinfo = data;
   Elf_Internal_Verneed *t;
   Elf_Internal_Vernaux *a;
   bfd_size_type amt;
@@ -1606,7 +1577,7 @@ _bfd_elf_link_find_version_dependencies (h, data)
   if (t == NULL)
     {
       amt = sizeof *t;
-      t = (Elf_Internal_Verneed *) bfd_zalloc (rinfo->output_bfd, amt);
+      t = bfd_zalloc (rinfo->output_bfd, amt);
       if (t == NULL)
        {
          rinfo->failed = TRUE;
@@ -1619,7 +1590,7 @@ _bfd_elf_link_find_version_dependencies (h, data)
     }
 
   amt = sizeof *a;
-  a = (Elf_Internal_Vernaux *) bfd_zalloc (rinfo->output_bfd, amt);
+  a = bfd_zalloc (rinfo->output_bfd, amt);
 
   /* Note that we are copying a string pointer here, and testing it
      above.  If bfd_elf_string_from_elf_section is ever changed to
@@ -1646,9 +1617,7 @@ _bfd_elf_link_find_version_dependencies (h, data)
    local.  This function is called via elf_link_hash_traverse.  */
 
 bfd_boolean
-_bfd_elf_link_assign_sym_version (h, data)
-     struct elf_link_hash_entry *h;
-     PTR data;
+_bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
 {
   struct elf_assign_sym_version_info *sinfo;
   struct bfd_link_info *info;
@@ -1657,7 +1626,7 @@ _bfd_elf_link_assign_sym_version (h, data)
   char *p;
   bfd_size_type amt;
 
-  sinfo = (struct elf_assign_sym_version_info *) data;
+  sinfo = data;
   info = sinfo->info;
 
   if (h->root.type == bfd_link_hash_warning)
@@ -1714,7 +1683,7 @@ _bfd_elf_link_assign_sym_version (h, data)
              struct bfd_elf_version_expr *d;
 
              len = p - h->root.root.string;
-             alc = bfd_malloc ((bfd_size_type) len);
+             alc = bfd_malloc (len);
              if (alc == NULL)
                return FALSE;
              memcpy (alc, h->root.root.string, len - 1);
@@ -1771,8 +1740,7 @@ _bfd_elf_link_assign_sym_version (h, data)
            return TRUE;
 
          amt = sizeof *t;
-         t = ((struct bfd_elf_version_tree *)
-              bfd_alloc (sinfo->output_bfd, amt));
+         t = bfd_alloc (sinfo->output_bfd, amt);
          if (t == NULL)
            {
              sinfo->failed = TRUE;
@@ -1896,179 +1864,6 @@ _bfd_elf_link_assign_sym_version (h, data)
   return TRUE;
 }
 \f
-/* Create a special linker section, or return a pointer to a linker
-   section already created */
-
-elf_linker_section_t *
-_bfd_elf_create_linker_section (abfd, info, which, defaults)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     enum elf_linker_section_enum which;
-     elf_linker_section_t *defaults;
-{
-  bfd *dynobj = elf_hash_table (info)->dynobj;
-  elf_linker_section_t *lsect;
-
-  /* Record the first bfd section that needs the special section */
-  if (!dynobj)
-    dynobj = elf_hash_table (info)->dynobj = abfd;
-
-  /* If this is the first time, create the section */
-  lsect = elf_linker_section (dynobj, which);
-  if (!lsect)
-    {
-      asection *s;
-      bfd_size_type amt = sizeof (elf_linker_section_t);
-
-      lsect = (elf_linker_section_t *) bfd_alloc (dynobj, amt);
-
-      *lsect = *defaults;
-      elf_linker_section (dynobj, which) = lsect;
-      lsect->which = which;
-      lsect->hole_written_p = FALSE;
-
-      /* See if the sections already exist */
-      lsect->section = s = bfd_get_section_by_name (dynobj, lsect->name);
-      if (!s || (s->flags & defaults->flags) != defaults->flags)
-       {
-         lsect->section = s = bfd_make_section_anyway (dynobj, lsect->name);
-
-         if (s == NULL)
-           return (elf_linker_section_t *)0;
-
-         bfd_set_section_flags (dynobj, s, defaults->flags);
-         bfd_set_section_alignment (dynobj, s, lsect->alignment);
-       }
-      else if (bfd_get_section_alignment (dynobj, s) < lsect->alignment)
-       bfd_set_section_alignment (dynobj, s, lsect->alignment);
-
-      s->_raw_size = align_power (s->_raw_size, lsect->alignment);
-
-      /* Is there a hole we have to provide?  If so check whether the
-        segment is too big already */
-      if (lsect->hole_size)
-       {
-         lsect->hole_offset = s->_raw_size;
-         s->_raw_size += lsect->hole_size;
-         if (lsect->hole_offset > lsect->max_hole_offset)
-           {
-             (*_bfd_error_handler)
-               (_("%s: Section %s is too large to add hole of %ld bytes"),
-                bfd_get_filename (abfd),
-                lsect->name,
-                (long) lsect->hole_size);
-
-             bfd_set_error (bfd_error_bad_value);
-             return (elf_linker_section_t *)0;
-           }
-       }
-
-#ifdef DEBUG
-      fprintf (stderr, "Creating section %s, current size = %ld\n",
-              lsect->name, (long)s->_raw_size);
-#endif
-
-      if (lsect->sym_name)
-       {
-         struct elf_link_hash_entry *h;
-         struct bfd_link_hash_entry *bh;
-
-#ifdef DEBUG
-         fprintf (stderr, "Adding %s to section %s\n",
-                  lsect->sym_name,
-                  lsect->name);
-#endif
-         bh = bfd_link_hash_lookup (info->hash, lsect->sym_name,
-                                    FALSE, FALSE, FALSE);
-
-         if ((bh == NULL || bh->type == bfd_link_hash_undefined)
-             && !(_bfd_generic_link_add_one_symbol
-                  (info, abfd, lsect->sym_name, BSF_GLOBAL, s,
-                   (lsect->hole_size
-                    ? s->_raw_size - lsect->hole_size + lsect->sym_offset
-                    : lsect->sym_offset),
-                   (const char *) NULL, FALSE,
-                   get_elf_backend_data (abfd)->collect, &bh)))
-           return (elf_linker_section_t *) 0;
-         h = (struct elf_link_hash_entry *) bh;
-
-         if ((defaults->which != LINKER_SECTION_SDATA)
-             && (defaults->which != LINKER_SECTION_SDATA2))
-           h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_DYNAMIC;
-
-         h->type = STT_OBJECT;
-         lsect->sym_hash = h;
-
-         if (info->shared
-             && ! _bfd_elf_link_record_dynamic_symbol (info, h))
-           return (elf_linker_section_t *) 0;
-       }
-    }
-
-#if 0
-  /* This does not make sense.  The sections which may exist in the
-     object file have nothing to do with the sections we want to
-     create.  */
-
-  /* Find the related sections if they have been created */
-  if (lsect->bss_name && !lsect->bss_section)
-    lsect->bss_section = bfd_get_section_by_name (dynobj, lsect->bss_name);
-
-  if (lsect->rel_name && !lsect->rel_section)
-    lsect->rel_section = bfd_get_section_by_name (dynobj, lsect->rel_name);
-#endif
-
-  return lsect;
-}
-\f
-/* Find a linker generated pointer with a given addend and type.  */
-
-elf_linker_section_pointers_t *
-_bfd_elf_find_pointer_linker_section (linker_pointers, addend, which)
-     elf_linker_section_pointers_t *linker_pointers;
-     bfd_vma addend;
-     elf_linker_section_enum_t which;
-{
-  for ( ; linker_pointers != NULL; linker_pointers = linker_pointers->next)
-    {
-      if (which == linker_pointers->which && addend == linker_pointers->addend)
-       return linker_pointers;
-    }
-
-  return (elf_linker_section_pointers_t *)0;
-}
-\f
-/* Make the .rela section corresponding to the generated linker section.  */
-
-bfd_boolean
-_bfd_elf_make_linker_section_rela (dynobj, lsect, alignment)
-     bfd *dynobj;
-     elf_linker_section_t *lsect;
-     int alignment;
-{
-  if (lsect->rel_section)
-    return TRUE;
-
-  lsect->rel_section = bfd_get_section_by_name (dynobj, lsect->rel_name);
-  if (lsect->rel_section == NULL)
-    {
-      lsect->rel_section = bfd_make_section (dynobj, lsect->rel_name);
-      if (lsect->rel_section == NULL
-         || ! bfd_set_section_flags (dynobj,
-                                     lsect->rel_section,
-                                     (SEC_ALLOC
-                                      | SEC_LOAD
-                                      | SEC_HAS_CONTENTS
-                                      | SEC_IN_MEMORY
-                                      | SEC_LINKER_CREATED
-                                      | SEC_READONLY))
-         || ! bfd_set_section_alignment (dynobj, lsect->rel_section, alignment))
-       return FALSE;
-    }
-
-  return TRUE;
-}
-\f
 /* Read and swap the relocs from the section indicated by SHDR.  This
    may be either a REL or a RELA section.  The relocations are
    translated into RELA relocations and stored in INTERNAL_RELOCS,
@@ -2079,15 +1874,13 @@ _bfd_elf_make_linker_section_rela (dynobj, lsect, alignment)
    Returns FALSE if something goes wrong.  */
 
 static bfd_boolean
-elf_link_read_relocs_from_section (abfd, shdr, external_relocs,
-                                  internal_relocs)
-     bfd *abfd;
-     Elf_Internal_Shdr *shdr;
-     PTR external_relocs;
-     Elf_Internal_Rela *internal_relocs;
+elf_link_read_relocs_from_section (bfd *abfd,
+                                  Elf_Internal_Shdr *shdr,
+                                  void *external_relocs,
+                                  Elf_Internal_Rela *internal_relocs)
 {
   struct elf_backend_data *bed;
-  void (*swap_in) PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
+  void (*swap_in) (bfd *, const bfd_byte *, Elf_Internal_Rela *);
   const bfd_byte *erela;
   const bfd_byte *erelaend;
   Elf_Internal_Rela *irela;
@@ -2141,16 +1934,14 @@ elf_link_read_relocs_from_section (abfd, shdr, external_relocs,
    REL_HDR2 relocations.  */
 
 Elf_Internal_Rela *
-_bfd_elf_link_read_relocs (abfd, o, external_relocs, internal_relocs,
-                          keep_memory)
-     bfd *abfd;
-     asection *o;
-     PTR external_relocs;
-     Elf_Internal_Rela *internal_relocs;
-     bfd_boolean keep_memory;
+_bfd_elf_link_read_relocs (bfd *abfd,
+                          asection *o,
+                          void *external_relocs,
+                          Elf_Internal_Rela *internal_relocs,
+                          bfd_boolean keep_memory)
 {
   Elf_Internal_Shdr *rel_hdr;
-  PTR alloc1 = NULL;
+  void *alloc1 = NULL;
   Elf_Internal_Rela *alloc2 = NULL;
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
 
@@ -2169,9 +1960,9 @@ _bfd_elf_link_read_relocs (abfd, o, external_relocs, internal_relocs,
       size = o->reloc_count;
       size *= bed->s->int_rels_per_ext_rel * sizeof (Elf_Internal_Rela);
       if (keep_memory)
-       internal_relocs = (Elf_Internal_Rela *) bfd_alloc (abfd, size);
+       internal_relocs = bfd_alloc (abfd, size);
       else
-       internal_relocs = alloc2 = (Elf_Internal_Rela *) bfd_malloc (size);
+       internal_relocs = alloc2 = bfd_malloc (size);
       if (internal_relocs == NULL)
        goto error_return;
     }
@@ -2182,7 +1973,7 @@ _bfd_elf_link_read_relocs (abfd, o, external_relocs, internal_relocs,
 
       if (elf_section_data (o)->rel_hdr2)
        size += elf_section_data (o)->rel_hdr2->sh_size;
-      alloc1 = (PTR) bfd_malloc (size);
+      alloc1 = bfd_malloc (size);
       if (alloc1 == NULL)
        goto error_return;
       external_relocs = alloc1;
@@ -2224,10 +2015,9 @@ _bfd_elf_link_read_relocs (abfd, o, external_relocs, internal_relocs,
    section header for a section containing relocations for O.  */
 
 bfd_boolean
-_bfd_elf_link_size_reloc_section (abfd, rel_hdr, o)
-     bfd *abfd;
-     Elf_Internal_Shdr *rel_hdr;
-     asection *o;
+_bfd_elf_link_size_reloc_section (bfd *abfd,
+                                 Elf_Internal_Shdr *rel_hdr,
+                                 asection *o)
 {
   bfd_size_type reloc_count;
   bfd_size_type num_rel_hashes;
@@ -2249,7 +2039,7 @@ _bfd_elf_link_size_reloc_section (abfd, rel_hdr, o)
      allocate it with bfd_alloc rather than malloc.  Also since we
      cannot be sure that the contents will actually be filled in,
      we zero the allocated space.  */
-  rel_hdr->contents = (PTR) bfd_zalloc (abfd, rel_hdr->sh_size);
+  rel_hdr->contents = bfd_zalloc (abfd, rel_hdr->sh_size);
   if (rel_hdr->contents == NULL && rel_hdr->sh_size != 0)
     return FALSE;
 
@@ -2260,9 +2050,7 @@ _bfd_elf_link_size_reloc_section (abfd, rel_hdr, o)
     {
       struct elf_link_hash_entry **p;
 
-      p = ((struct elf_link_hash_entry **)
-          bfd_zmalloc (num_rel_hashes
-                       * sizeof (struct elf_link_hash_entry *)));
+      p = bfd_zmalloc (num_rel_hashes * sizeof (struct elf_link_hash_entry *));
       if (p == NULL)
        return FALSE;
 
@@ -2277,12 +2065,10 @@ _bfd_elf_link_size_reloc_section (abfd, rel_hdr, o)
    OUTPUT_BFD.  */
 
 bfd_boolean
-_bfd_elf_link_output_relocs (output_bfd, input_section, input_rel_hdr,
-                            internal_relocs)
-     bfd *output_bfd;
-     asection *input_section;
-     Elf_Internal_Shdr *input_rel_hdr;
-     Elf_Internal_Rela *internal_relocs;
+_bfd_elf_link_output_relocs (bfd *output_bfd,
+                            asection *input_section,
+                            Elf_Internal_Shdr *input_rel_hdr,
+                            Elf_Internal_Rela *internal_relocs)
 {
   Elf_Internal_Rela *irela;
   Elf_Internal_Rela *irelaend;
@@ -2291,7 +2077,7 @@ _bfd_elf_link_output_relocs (output_bfd, input_section, input_rel_hdr,
   asection *output_section;
   unsigned int *rel_countp = NULL;
   struct elf_backend_data *bed;
-  void (*swap_out) PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+  void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
 
   output_section = input_section->output_section;
   output_rel_hdr = NULL;
@@ -2354,9 +2140,8 @@ _bfd_elf_link_output_relocs (output_bfd, input_section, input_rel_hdr,
    the face of future changes.  */
 
 bfd_boolean
-_bfd_elf_fix_symbol_flags (h, eif)
-     struct elf_link_hash_entry *h;
-     struct elf_info_failed *eif;
+_bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
+                          struct elf_info_failed *eif)
 {
   /* If this symbol was mentioned in a non-ELF file, try to set
      DEF_REGULAR and REF_REGULAR correctly.  This is the only way to
@@ -2497,11 +2282,9 @@ _bfd_elf_fix_symbol_flags (h, eif)
    recursively.  */
 
 bfd_boolean
-_bfd_elf_adjust_dynamic_symbol (h, data)
-     struct elf_link_hash_entry *h;
-     PTR data;
+_bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
 {
-  struct elf_info_failed *eif = (struct elf_info_failed *) data;
+  struct elf_info_failed *eif = data;
   bfd *dynobj;
   struct elf_backend_data *bed;
 
@@ -2591,7 +2374,7 @@ _bfd_elf_adjust_dynamic_symbol (h, data)
         H->WEAKDEF before it finds H?  */
       h->weakdef->elf_link_hash_flags |= ELF_LINK_HASH_REF_REGULAR;
 
-      if (! _bfd_elf_adjust_dynamic_symbol (h->weakdef, (PTR) eif))
+      if (! _bfd_elf_adjust_dynamic_symbol (h->weakdef, eif))
        return FALSE;
     }
 
@@ -2622,9 +2405,7 @@ _bfd_elf_adjust_dynamic_symbol (h, data)
    to reflect the object merging within the sections.  */
 
 bfd_boolean
-_bfd_elf_link_sec_merge_syms (h, data)
-     struct elf_link_hash_entry *h;
-     PTR data;
+_bfd_elf_link_sec_merge_syms (struct elf_link_hash_entry *h, void *data)
 {
   asection *sec;
 
@@ -2636,14 +2417,117 @@ _bfd_elf_link_sec_merge_syms (h, data)
       && ((sec = h->root.u.def.section)->flags & SEC_MERGE)
       && sec->sec_info_type == ELF_INFO_TYPE_MERGE)
     {
-      bfd *output_bfd = (bfd *) data;
+      bfd *output_bfd = data;
 
       h->root.u.def.value =
        _bfd_merged_section_offset (output_bfd,
                                    &h->root.u.def.section,
                                    elf_section_data (sec)->sec_info,
-                                   h->root.u.def.value, (bfd_vma) 0);
+                                   h->root.u.def.value, 0);
     }
 
   return TRUE;
 }
+
+/* Returns false if the symbol referred to by H should be considered
+   to resolve local to the current module, and true if it should be
+   considered to bind dynamically.  */
+
+bfd_boolean
+_bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h,
+                          struct bfd_link_info *info,
+                          bfd_boolean ignore_protected)
+{
+  bfd_boolean binding_stays_local_p;
+
+  if (h == NULL)
+    return FALSE;
+
+  while (h->root.type == bfd_link_hash_indirect
+        || h->root.type == bfd_link_hash_warning)
+    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+  /* If it was forced local, then clearly it's not dynamic.  */
+  if (h->dynindx == -1)
+    return FALSE;
+  if (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)
+    return FALSE;
+
+  /* Identify the cases where name binding rules say that a
+     visible symbol resolves locally.  */
+  binding_stays_local_p = info->executable || info->symbolic;
+
+  switch (ELF_ST_VISIBILITY (h->other))
+    {
+    case STV_INTERNAL:
+    case STV_HIDDEN:
+      return FALSE;
+
+    case STV_PROTECTED:
+      /* Proper resolution for function pointer equality may require
+        that these symbols perhaps be resolved dynamically, even though
+        we should be resolving them to the current module.  */
+      if (!ignore_protected)
+       binding_stays_local_p = TRUE;
+      break;
+
+    default:
+      break;
+    }
+
+  /* If it isn't defined locally, then clearly it's dynamic.  */
+  if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+    return TRUE;
+
+  /* Otherwise, the symbol is dynamic if binding rules don't tell
+     us that it remains local.  */
+  return !binding_stays_local_p;
+}
+
+/* Return true if the symbol referred to by H should be considered
+   to resolve local to the current module, and false otherwise.  Differs
+   from (the inverse of) _bfd_elf_dynamic_symbol_p in the treatment of
+   undefined symbols and weak symbols.  */
+
+bfd_boolean
+_bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
+                             struct bfd_link_info *info,
+                             bfd_boolean local_protected)
+{
+  /* If it's a local sym, of course we resolve locally.  */
+  if (h == NULL)
+    return TRUE;
+
+  /* If we don't have a definition in a regular file, then we can't
+     resolve locally.  The sym is either undefined or dynamic.  */
+  if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+    return FALSE;
+
+  /* Forced local symbols resolve locally.  */
+  if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
+    return TRUE;
+
+  /* As do non-dynamic symbols.  */
+  if (h->dynindx == -1)
+    return TRUE;
+
+  /* At this point, we know the symbol is defined and dynamic.  In an
+     executable it must resolve locally, likewise when building symbolic
+     shared libraries.  */
+  if (info->executable || info->symbolic)
+    return TRUE;
+
+  /* Now deal with defined dynamic symbols in shared libraries.  Ones
+     with default visibility might not resolve locally.  */
+  if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+    return FALSE;
+
+  /* However, STV_HIDDEN or STV_INTERNAL ones must be local.  */
+  if (ELF_ST_VISIBILITY (h->other) != STV_PROTECTED)
+    return TRUE;
+
+  /* Function pointer equality tests may require that STV_PROTECTED
+     symbols be treated as dynamic symbols, even when we know that the
+     dynamic linker will resolve them locally.  */
+  return local_protected;
+}
index f4a65bf273b386a3b773909c5f2ac1853cf7aff6..c0b2468b7d895139acb8906b76d0d96ad94726b6 100644 (file)
 
 /* ELF linker code.  */
 
-static bfd_boolean is_global_data_symbol_definition
-  PARAMS ((bfd *, Elf_Internal_Sym *));
-static bfd_boolean elf_link_is_defined_archive_symbol
-  PARAMS ((bfd *, carsym *));
-static bfd_boolean elf_link_add_object_symbols
-  PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf_link_add_archive_symbols
-  PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf_finalize_dynstr
-  PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf_collect_hash_codes
-  PARAMS ((struct elf_link_hash_entry *, PTR));
-static size_t compute_bucket_count
-  PARAMS ((struct bfd_link_info *));
-static void elf_link_adjust_relocs
-  PARAMS ((bfd *, Elf_Internal_Shdr *, unsigned int,
-          struct elf_link_hash_entry **));
-static int elf_link_sort_cmp1
-  PARAMS ((const void *, const void *));
-static int elf_link_sort_cmp2
-  PARAMS ((const void *, const void *));
-static size_t elf_link_sort_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, asection **));
-static bfd_boolean elf_section_ignore_discarded_relocs
-  PARAMS ((asection *));
+static bfd_boolean elf_link_add_object_symbols (bfd *, struct bfd_link_info *);
+static bfd_boolean elf_link_add_archive_symbols (bfd *,
+                                                struct bfd_link_info *);
+static bfd_boolean elf_finalize_dynstr (bfd *, struct bfd_link_info *);
+static bfd_boolean elf_collect_hash_codes (struct elf_link_hash_entry *,
+                                          void *);
+static bfd_boolean elf_section_ignore_discarded_relocs (asection *);
 
 /* Given an ELF BFD, add symbols to the global hash table as
    appropriate.  */
 
 bfd_boolean
-elf_bfd_link_add_symbols (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+elf_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
 {
   switch (bfd_get_format (abfd))
     {
@@ -68,9 +48,8 @@ elf_bfd_link_add_symbols (abfd, info)
 \f
 /* Return TRUE iff this is a non-common, definition of a non-function symbol.  */
 static bfd_boolean
-is_global_data_symbol_definition (abfd, sym)
-     bfd * abfd ATTRIBUTE_UNUSED;
-     Elf_Internal_Sym * sym;
+is_global_data_symbol_definition (bfd *abfd ATTRIBUTE_UNUSED,
+                                 Elf_Internal_Sym *sym)
 {
   /* Local symbols do not count, but target specific ones might.  */
   if (ELF_ST_BIND (sym->st_info) != STB_GLOBAL
@@ -109,9 +88,7 @@ is_global_data_symbol_definition (abfd, sym)
    whose archive map contains a mention of SYMDEF, and determine if
    the symbol is defined in this element.  */
 static bfd_boolean
-elf_link_is_defined_archive_symbol (abfd, symdef)
-     bfd * abfd;
-     carsym * symdef;
+elf_link_is_defined_archive_symbol (bfd * abfd, carsym * symdef)
 {
   Elf_Internal_Shdr * hdr;
   bfd_size_type symcount;
@@ -123,7 +100,7 @@ elf_link_is_defined_archive_symbol (abfd, symdef)
   bfd_boolean result;
 
   abfd = _bfd_get_elt_at_filepos (abfd, symdef->file_offset);
-  if (abfd == (bfd *) NULL)
+  if (abfd == NULL)
     return FALSE;
 
   if (! bfd_check_format (abfd, bfd_object))
@@ -174,7 +151,7 @@ elf_link_is_defined_archive_symbol (abfd, symdef)
 
       name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
                                              isym->st_name);
-      if (name == (const char *) NULL)
+      if (name == NULL)
        break;
 
       if (strcmp (name, symdef->name) == 0)
@@ -215,9 +192,7 @@ elf_link_is_defined_archive_symbol (abfd, symdef)
    table until nothing further is resolved.  */
 
 static bfd_boolean
-elf_link_add_archive_symbols (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
 {
   symindex c;
   bfd_boolean *defined = NULL;
@@ -229,7 +204,7 @@ elf_link_add_archive_symbols (abfd, info)
   if (! bfd_has_map (abfd))
     {
       /* An empty archive is a special case.  */
-      if (bfd_openr_next_archived_file (abfd, (bfd *) NULL) == NULL)
+      if (bfd_openr_next_archived_file (abfd, NULL) == NULL)
        return TRUE;
       bfd_set_error (bfd_error_no_armap);
       return FALSE;
@@ -243,9 +218,9 @@ elf_link_add_archive_symbols (abfd, info)
     return TRUE;
   amt = c;
   amt *= sizeof (bfd_boolean);
-  defined = (bfd_boolean *) bfd_zmalloc (amt);
-  included = (bfd_boolean *) bfd_zmalloc (amt);
-  if (defined == (bfd_boolean *) NULL || included == (bfd_boolean *) NULL)
+  defined = bfd_zmalloc (amt);
+  included = bfd_zmalloc (amt);
+  if (defined == NULL || included == NULL)
     goto error_return;
 
   symdefs = bfd_ardata (abfd)->symdefs;
@@ -297,7 +272,7 @@ elf_link_add_archive_symbols (abfd, info)
 
              /* First check with only one `@'.  */
              len = strlen (symdef->name);
-             copy = bfd_alloc (abfd, (bfd_size_type) len);
+             copy = bfd_alloc (abfd, len);
              if (copy == NULL)
                goto error_return;
              first = p - symdef->name + 1;
@@ -349,7 +324,7 @@ elf_link_add_archive_symbols (abfd, info)
 
          /* We need to include this archive member.  */
          element = _bfd_get_elt_at_filepos (abfd, symdef->file_offset);
-         if (element == (bfd *) NULL)
+         if (element == NULL)
            goto error_return;
 
          if (! bfd_check_format (element, bfd_object))
@@ -408,9 +383,9 @@ elf_link_add_archive_symbols (abfd, info)
   return TRUE;
 
  error_return:
-  if (defined != (bfd_boolean *) NULL)
+  if (defined != NULL)
     free (defined);
-  if (included != (bfd_boolean *) NULL)
+  if (included != NULL)
     free (included);
   return FALSE;
 }
@@ -418,16 +393,13 @@ elf_link_add_archive_symbols (abfd, info)
 /* Add symbols from an ELF object file to the linker hash table.  */
 
 static bfd_boolean
-elf_link_add_object_symbols (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
 {
   bfd_boolean (*add_symbol_hook)
-    PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
-            const char **, flagword *, asection **, bfd_vma *));
+    (bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
+     const char **, flagword *, asection **, bfd_vma *);
   bfd_boolean (*check_relocs)
-    PARAMS ((bfd *, struct bfd_link_info *, asection *,
-            const Elf_Internal_Rela *));
+    (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
   bfd_boolean collect;
   Elf_Internal_Shdr *hdr;
   bfd_size_type symcount;
@@ -487,6 +459,8 @@ elf_link_add_object_symbols (abfd, info)
            {
              char *msg;
              bfd_size_type sz;
+             bfd_size_type prefix_len;
+             const char * gnu_warning_prefix = _("warning: ");
 
              name += sizeof ".gnu.warning." - 1;
 
@@ -520,18 +494,20 @@ elf_link_add_object_symbols (abfd, info)
                }
 
              sz = bfd_section_size (abfd, s);
-             msg = (char *) bfd_alloc (abfd, sz + 1);
+             prefix_len = strlen (gnu_warning_prefix);
+             msg = bfd_alloc (abfd, prefix_len + sz + 1);
              if (msg == NULL)
                goto error_return;
 
-             if (! bfd_get_section_contents (abfd, s, msg, (file_ptr) 0, sz))
+             strcpy (msg, gnu_warning_prefix);
+             if (! bfd_get_section_contents (abfd, s, msg + prefix_len, 0, sz))
                goto error_return;
 
-             msg[sz] = '\0';
+             msg[prefix_len + sz] = '\0';
 
              if (! (_bfd_generic_link_add_one_symbol
-                    (info, abfd, name, BSF_WARNING, s, (bfd_vma) 0, msg,
-                     FALSE, collect, (struct bfd_link_hash_entry **) NULL)))
+                    (info, abfd, name, BSF_WARNING, s, 0, msg,
+                     FALSE, collect, NULL)))
                goto error_return;
 
              if (! info->relocatable)
@@ -608,12 +584,11 @@ elf_link_add_object_symbols (abfd, info)
          int elfsec;
          unsigned long shlink;
 
-         dynbuf = (Elf_External_Dyn *) bfd_malloc (s->_raw_size);
+         dynbuf = bfd_malloc (s->_raw_size);
          if (dynbuf == NULL)
            goto error_return;
 
-         if (! bfd_get_section_contents (abfd, s, (PTR) dynbuf,
-                                         (file_ptr) 0, s->_raw_size))
+         if (! bfd_get_section_contents (abfd, s, dynbuf, 0, s->_raw_size))
            goto error_free_dyn;
 
          elfsec = _bfd_elf_section_from_bfd_section (abfd, s);
@@ -642,7 +617,7 @@ elf_link_add_object_symbols (abfd, info)
                  unsigned int tagv = dyn.d_un.d_val;
 
                  amt = sizeof (struct bfd_link_needed_list);
-                 n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
+                 n = bfd_alloc (abfd, amt);
                  fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
                  if (n == NULL || fnm == NULL)
                    goto error_free_dyn;
@@ -650,7 +625,7 @@ elf_link_add_object_symbols (abfd, info)
                  anm = bfd_alloc (abfd, amt);
                  if (anm == NULL)
                    goto error_free_dyn;
-                 memcpy (anm, fnm, (size_t) amt);
+                 memcpy (anm, fnm, amt);
                  n->name = anm;
                  n->by = abfd;
                  n->next = NULL;
@@ -667,7 +642,7 @@ elf_link_add_object_symbols (abfd, info)
                  unsigned int tagv = dyn.d_un.d_val;
 
                  amt = sizeof (struct bfd_link_needed_list);
-                 n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
+                 n = bfd_alloc (abfd, amt);
                  fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
                  if (n == NULL || fnm == NULL)
                    goto error_free_dyn;
@@ -675,7 +650,7 @@ elf_link_add_object_symbols (abfd, info)
                  anm = bfd_alloc (abfd, amt);
                  if (anm == NULL)
                    goto error_free_dyn;
-                 memcpy (anm, fnm, (size_t) amt);
+                 memcpy (anm, fnm, amt);
                  n->name = anm;
                  n->by = abfd;
                  n->next = NULL;
@@ -693,7 +668,7 @@ elf_link_add_object_symbols (abfd, info)
                  unsigned int tagv = dyn.d_un.d_val;
 
                  amt = sizeof (struct bfd_link_needed_list);
-                 n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
+                 n = bfd_alloc (abfd, amt);
                  fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
                  if (n == NULL || fnm == NULL)
                    goto error_free_dyn;
@@ -705,7 +680,7 @@ elf_link_add_object_symbols (abfd, info)
                      free (dynbuf);
                      goto error_return;
                    }
-                 memcpy (anm, fnm, (size_t) amt);
+                 memcpy (anm, fnm, amt);
                  n->name = anm;
                  n->by = abfd;
                  n->next = NULL;
@@ -788,7 +763,7 @@ elf_link_add_object_symbols (abfd, info)
                }
            }
 
-         if (! elf_add_dynamic_entry (info, (bfd_vma) DT_NEEDED, strindex))
+         if (! elf_add_dynamic_entry (info, DT_NEEDED, strindex))
            goto error_return;
        }
 
@@ -836,7 +811,7 @@ elf_link_add_object_symbols (abfd, info)
       /* We store a pointer to the hash table entry for each external
         symbol.  */
       amt = extsymcount * sizeof (struct elf_link_hash_entry *);
-      sym_hash = (struct elf_link_hash_entry **) bfd_alloc (abfd, amt);
+      sym_hash = bfd_alloc (abfd, amt);
       if (sym_hash == NULL)
        goto error_free_sym;
       elf_sym_hashes (abfd) = sym_hash;
@@ -855,12 +830,12 @@ elf_link_add_object_symbols (abfd, info)
          Elf_Internal_Shdr *versymhdr;
 
          versymhdr = &elf_tdata (abfd)->dynversym_hdr;
-         extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size);
+         extversym = bfd_malloc (versymhdr->sh_size);
          if (extversym == NULL)
            goto error_free_sym;
          amt = versymhdr->sh_size;
          if (bfd_seek (abfd, versymhdr->sh_offset, SEEK_SET) != 0
-             || bfd_bread ((PTR) extversym, amt, abfd) != amt)
+             || bfd_bread (extversym, amt, abfd) != amt)
            goto error_free_vers;
        }
     }
@@ -941,7 +916,7 @@ elf_link_add_object_symbols (abfd, info)
 
       name = bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
                                              isym->st_name);
-      if (name == (const char *) NULL)
+      if (name == NULL)
        goto error_free_vers;
 
       if (isym->st_shndx == SHN_COMMON
@@ -969,12 +944,12 @@ elf_link_add_object_symbols (abfd, info)
 
          /* The hook function sets the name to NULL if this symbol
             should be skipped for some reason.  */
-         if (name == (const char *) NULL)
+         if (name == NULL)
            continue;
        }
 
       /* Sanity check that all possibilities were handled.  */
-      if (sec == (asection *) NULL)
+      if (sec == NULL)
        {
          bfd_set_error (bfd_error_bad_value);
          goto error_free_vers;
@@ -1074,7 +1049,7 @@ elf_link_add_object_symbols (abfd, info)
                      && isym->st_shndx != SHN_UNDEF)
                    ++newlen;
 
-                 newname = (char *) bfd_alloc (abfd, (bfd_size_type) newlen);
+                 newname = bfd_alloc (abfd, newlen);
                  if (newname == NULL)
                    goto error_free_vers;
                  memcpy (newname, name, namelen);
@@ -1139,8 +1114,8 @@ elf_link_add_object_symbols (abfd, info)
        }
 
       if (! (_bfd_generic_link_add_one_symbol
-            (info, abfd, name, flags, sec, value, (const char *) NULL,
-             FALSE, collect, (struct bfd_link_hash_entry **) sym_hash)))
+            (info, abfd, name, flags, sec, value, NULL, FALSE, collect,
+             (struct bfd_link_hash_entry **) sym_hash)))
        goto error_free_vers;
 
       h = *sym_hash;
@@ -1435,7 +1410,7 @@ elf_link_add_object_symbols (abfd, info)
                    }
                }
 
-             if (! elf_add_dynamic_entry (info, (bfd_vma) DT_NEEDED, strindex))
+             if (! elf_add_dynamic_entry (info, DT_NEEDED, strindex))
                goto error_free_vers;
            }
        }
@@ -1608,10 +1583,8 @@ elf_link_add_object_symbols (abfd, info)
              || bfd_is_abs_section (o->output_section))
            continue;
 
-         internal_relocs
-           = _bfd_elf_link_read_relocs (abfd, o, (PTR) NULL,
-                                        (Elf_Internal_Rela *) NULL,
-                                        info->keep_memory);
+         internal_relocs = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL,
+                                                      info->keep_memory);
          if (internal_relocs == NULL)
            goto error_return;
 
@@ -1684,8 +1657,7 @@ elf_link_add_object_symbols (abfd, info)
       /* Add this bfd to the loaded list.  */
       struct elf_link_loaded_list *n;
 
-      n = ((struct elf_link_loaded_list *)
-          bfd_alloc (abfd, sizeof (struct elf_link_loaded_list)));
+      n = bfd_alloc (abfd, sizeof (struct elf_link_loaded_list));
       if (n == NULL)
        goto error_return;
       n->abfd = abfd;
@@ -1710,10 +1682,7 @@ elf_link_add_object_symbols (abfd, info)
 /* Add an entry to the .dynamic table.  */
 
 bfd_boolean
-elf_add_dynamic_entry (info, tag, val)
-     struct bfd_link_info *info;
-     bfd_vma tag;
-     bfd_vma val;
+elf_add_dynamic_entry (struct bfd_link_info *info, bfd_vma tag, bfd_vma val)
 {
   Elf_Internal_Dyn dyn;
   bfd *dynobj;
@@ -1730,7 +1699,7 @@ elf_add_dynamic_entry (info, tag, val)
   BFD_ASSERT (s != NULL);
 
   newsize = s->_raw_size + sizeof (Elf_External_Dyn);
-  newcontents = (bfd_byte *) bfd_realloc (s->contents, newsize);
+  newcontents = bfd_realloc (s->contents, newsize);
   if (newcontents == NULL)
     return FALSE;
 
@@ -1766,8 +1735,7 @@ static const size_t elf_buckets[] =
    Therefore the result is always a good payoff between few collisions
    (= short chain lengths) and table size.  */
 static size_t
-compute_bucket_count (info)
-     struct bfd_link_info *info;
+compute_bucket_count (struct bfd_link_info *info)
 {
   size_t dynsymcount = elf_hash_table (info)->dynsymcount;
   size_t best_size = 0;
@@ -1781,7 +1749,7 @@ compute_bucket_count (info)
      optimizations.  */
   amt = dynsymcount;
   amt *= sizeof (unsigned long int);
-  hashcodes = (unsigned long int *) bfd_malloc (amt);
+  hashcodes = bfd_malloc (amt);
   if (hashcodes == NULL)
     return 0;
   hashcodesp = hashcodes;
@@ -1814,7 +1782,7 @@ compute_bucket_count (info)
         since the size could be large.  */
       amt = maxsize;
       amt *= sizeof (unsigned long int);
-      counts = (unsigned long int *) bfd_malloc (amt);
+      counts = bfd_malloc (amt);
       if (counts == NULL)
        {
          free (hashcodes);
@@ -1909,18 +1877,14 @@ compute_bucket_count (info)
    addresses of the various sections.  */
 
 bfd_boolean
-NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
-                                    filter_shlib,
-                                    auxiliary_filters, info, sinterpptr,
-                                    verdefs)
-     bfd *output_bfd;
-     const char *soname;
-     const char *rpath;
-     const char *filter_shlib;
-     const char * const *auxiliary_filters;
-     struct bfd_link_info *info;
-     asection **sinterpptr;
-     struct bfd_elf_version_tree *verdefs;
+NAME(bfd_elf,size_dynamic_sections) (bfd *output_bfd,
+                                    const char *soname,
+                                    const char *rpath,
+                                    const char *filter_shlib,
+                                    const char * const *auxiliary_filters,
+                                    struct bfd_link_info *info,
+                                    asection **sinterpptr,
+                                    struct bfd_elf_version_tree *verdefs)
 {
   bfd_size_type soname_indx;
   bfd *dynobj;
@@ -2012,15 +1976,13 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
          soname_indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
                                             soname, TRUE);
          if (soname_indx == (bfd_size_type) -1
-             || ! elf_add_dynamic_entry (info, (bfd_vma) DT_SONAME,
-                                         soname_indx))
+             || ! elf_add_dynamic_entry (info, DT_SONAME, soname_indx))
            return FALSE;
        }
 
       if (info->symbolic)
        {
-         if (! elf_add_dynamic_entry (info, (bfd_vma) DT_SYMBOLIC,
-                                      (bfd_vma) 0))
+         if (! elf_add_dynamic_entry (info, DT_SYMBOLIC, 0))
            return FALSE;
          info->flags |= DF_SYMBOLIC;
        }
@@ -2034,10 +1996,9 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
          if (info->new_dtags)
            _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, indx);
          if (indx == (bfd_size_type) -1
-             || ! elf_add_dynamic_entry (info, (bfd_vma) DT_RPATH, indx)
+             || ! elf_add_dynamic_entry (info, DT_RPATH, indx)
              || (info->new_dtags
-                 && ! elf_add_dynamic_entry (info, (bfd_vma) DT_RUNPATH,
-                                             indx)))
+                 && ! elf_add_dynamic_entry (info, DT_RUNPATH, indx)))
            return FALSE;
        }
 
@@ -2048,7 +2009,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
          indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
                                      filter_shlib, TRUE);
          if (indx == (bfd_size_type) -1
-             || ! elf_add_dynamic_entry (info, (bfd_vma) DT_FILTER, indx))
+             || ! elf_add_dynamic_entry (info, DT_FILTER, indx))
            return FALSE;
        }
 
@@ -2063,8 +2024,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
              indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr,
                                          *p, TRUE);
              if (indx == (bfd_size_type) -1
-                 || ! elf_add_dynamic_entry (info, (bfd_vma) DT_AUXILIARY,
-                                             indx))
+                 || ! elf_add_dynamic_entry (info, DT_AUXILIARY, indx))
                return FALSE;
            }
        }
@@ -2079,7 +2039,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
        {
          elf_link_hash_traverse (elf_hash_table (info),
                                  _bfd_elf_export_symbol,
-                                 (PTR) &eif);
+                                 &eif);
          if (eif.failed)
            return FALSE;
        }
@@ -2100,7 +2060,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
              verlen = strlen (verstr);
              newlen = namelen + verlen + 3;
 
-             newname = (char *) bfd_malloc ((bfd_size_type) newlen);
+             newname = bfd_malloc (newlen);
              if (newname == NULL)
                return FALSE;
              memcpy (newname, name, namelen);
@@ -2143,7 +2103,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
 
       elf_link_hash_traverse (elf_hash_table (info),
                              _bfd_elf_link_assign_sym_version,
-                             (PTR) &asvinfo);
+                             &asvinfo);
       if (asvinfo.failed)
        return FALSE;
 
@@ -2173,7 +2133,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
         the backend pick a reasonable value for them.  */
       elf_link_hash_traverse (elf_hash_table (info),
                              _bfd_elf_adjust_dynamic_symbol,
-                             (PTR) &eif);
+                             &eif);
       if (eif.failed)
        return FALSE;
 
@@ -2192,7 +2152,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
          && (h->elf_link_hash_flags & (ELF_LINK_HASH_REF_REGULAR
                                        | ELF_LINK_HASH_DEF_REGULAR)) != 0)
        {
-         if (! elf_add_dynamic_entry (info, (bfd_vma) DT_INIT, (bfd_vma) 0))
+         if (! elf_add_dynamic_entry (info, DT_INIT, 0))
            return FALSE;
        }
       h = (info->fini_function
@@ -2204,7 +2164,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
          && (h->elf_link_hash_flags & (ELF_LINK_HASH_REF_REGULAR
                                        | ELF_LINK_HASH_DEF_REGULAR)) != 0)
        {
-         if (! elf_add_dynamic_entry (info, (bfd_vma) DT_FINI, (bfd_vma) 0))
+         if (! elf_add_dynamic_entry (info, DT_FINI, 0))
            return FALSE;
        }
 
@@ -2232,26 +2192,20 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
              return FALSE;
            }
 
-         if (!elf_add_dynamic_entry (info, (bfd_vma) DT_PREINIT_ARRAY,
-                                     (bfd_vma) 0)
-             || !elf_add_dynamic_entry (info, (bfd_vma) DT_PREINIT_ARRAYSZ,
-                                        (bfd_vma) 0))
+         if (!elf_add_dynamic_entry (info, DT_PREINIT_ARRAY, 0)
+             || !elf_add_dynamic_entry (info, DT_PREINIT_ARRAYSZ, 0))
            return FALSE;
        }
       if (bfd_get_section_by_name (output_bfd, ".init_array") != NULL)
        {
-         if (!elf_add_dynamic_entry (info, (bfd_vma) DT_INIT_ARRAY,
-                                     (bfd_vma) 0)
-             || !elf_add_dynamic_entry (info, (bfd_vma) DT_INIT_ARRAYSZ,
-                                        (bfd_vma) 0))
+         if (!elf_add_dynamic_entry (info, DT_INIT_ARRAY, 0)
+             || !elf_add_dynamic_entry (info, DT_INIT_ARRAYSZ, 0))
            return FALSE;
        }
       if (bfd_get_section_by_name (output_bfd, ".fini_array") != NULL)
        {
-         if (!elf_add_dynamic_entry (info, (bfd_vma) DT_FINI_ARRAY,
-                                     (bfd_vma) 0)
-             || !elf_add_dynamic_entry (info, (bfd_vma) DT_FINI_ARRAYSZ,
-                                        (bfd_vma) 0))
+         if (!elf_add_dynamic_entry (info, DT_FINI_ARRAY, 0)
+             || !elf_add_dynamic_entry (info, DT_FINI_ARRAYSZ, 0))
            return FALSE;
        }
 
@@ -2265,12 +2219,12 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
          bfd_size_type strsize;
 
          strsize = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
-         if (! elf_add_dynamic_entry (info, (bfd_vma) DT_HASH, (bfd_vma) 0)
-             || ! elf_add_dynamic_entry (info, (bfd_vma) DT_STRTAB, (bfd_vma) 0)
-             || ! elf_add_dynamic_entry (info, (bfd_vma) DT_SYMTAB, (bfd_vma) 0)
-             || ! elf_add_dynamic_entry (info, (bfd_vma) DT_STRSZ, strsize)
-             || ! elf_add_dynamic_entry (info, (bfd_vma) DT_SYMENT,
-                                         (bfd_vma) sizeof (Elf_External_Sym)))
+         if (! elf_add_dynamic_entry (info, DT_HASH, 0)
+             || ! elf_add_dynamic_entry (info, DT_STRTAB, 0)
+             || ! elf_add_dynamic_entry (info, DT_SYMTAB, 0)
+             || ! elf_add_dynamic_entry (info, DT_STRSZ, strsize)
+             || ! elf_add_dynamic_entry (info, DT_SYMENT,
+                                         sizeof (Elf_External_Sym)))
            return FALSE;
        }
     }
@@ -2333,7 +2287,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
            }
 
          s->_raw_size = size;
-         s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+         s->contents = bfd_alloc (output_bfd, s->_raw_size);
          if (s->contents == NULL && s->_raw_size != 0)
            return FALSE;
 
@@ -2393,7 +2347,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
              bh = NULL;
              if (! (_bfd_generic_link_add_one_symbol
                     (info, dynobj, t->name, BSF_GLOBAL, bfd_abs_section_ptr,
-                     (bfd_vma) 0, (const char *) NULL, FALSE,
+                     0, NULL, FALSE,
                      get_elf_backend_data (dynobj)->collect, &bh)))
                return FALSE;
              h = (struct elf_link_hash_entry *) bh;
@@ -2461,9 +2415,8 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
                }
            }
 
-         if (! elf_add_dynamic_entry (info, (bfd_vma) DT_VERDEF, (bfd_vma) 0)
-             || ! elf_add_dynamic_entry (info, (bfd_vma) DT_VERDEFNUM,
-                                         (bfd_vma) cdefs))
+         if (! elf_add_dynamic_entry (info, DT_VERDEF, 0)
+             || ! elf_add_dynamic_entry (info, DT_VERDEFNUM, cdefs))
            return FALSE;
 
          elf_tdata (output_bfd)->cverdefs = cdefs;
@@ -2471,7 +2424,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
 
       if ((info->new_dtags && info->flags) || (info->flags & DF_STATIC_TLS))
        {
-         if (! elf_add_dynamic_entry (info, (bfd_vma) DT_FLAGS, info->flags))
+         if (! elf_add_dynamic_entry (info, DT_FLAGS, info->flags))
            return FALSE;
        }
 
@@ -2481,8 +2434,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
            info->flags_1 &= ~ (DF_1_INITFIRST
                                | DF_1_NODELETE
                                | DF_1_NOOPEN);
-         if (! elf_add_dynamic_entry (info, (bfd_vma) DT_FLAGS_1,
-                                      info->flags_1))
+         if (! elf_add_dynamic_entry (info, DT_FLAGS_1, info->flags_1))
            return FALSE;
        }
 
@@ -2502,7 +2454,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
 
        elf_link_hash_traverse (elf_hash_table (info),
                                _bfd_elf_link_find_version_dependencies,
-                               (PTR) &sinfo);
+                               &sinfo);
 
        if (elf_tdata (output_bfd)->verref == NULL)
          _bfd_strip_section_from_output (info, s);
@@ -2529,7 +2481,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
              }
 
            s->_raw_size = size;
-           s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+           s->contents = bfd_alloc (output_bfd, s->_raw_size);
            if (s->contents == NULL)
              return FALSE;
 
@@ -2586,10 +2538,8 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
                  }
              }
 
-           if (! elf_add_dynamic_entry (info, (bfd_vma) DT_VERNEED,
-                                        (bfd_vma) 0)
-               || ! elf_add_dynamic_entry (info, (bfd_vma) DT_VERNEEDNUM,
-                                           (bfd_vma) crefs))
+           if (! elf_add_dynamic_entry (info, DT_VERNEED, 0)
+               || ! elf_add_dynamic_entry (info, DT_VERNEEDNUM, crefs))
              return FALSE;
 
            elf_tdata (output_bfd)->cverrefs = crefs;
@@ -2617,11 +2567,11 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
       else
        {
          s->_raw_size = dynsymcount * sizeof (Elf_External_Versym);
-         s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
+         s->contents = bfd_zalloc (output_bfd, s->_raw_size);
          if (s->contents == NULL)
            return FALSE;
 
-         if (! elf_add_dynamic_entry (info, (bfd_vma) DT_VERSYM, (bfd_vma) 0))
+         if (! elf_add_dynamic_entry (info, DT_VERSYM, 0))
            return FALSE;
        }
 
@@ -2634,7 +2584,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
       s = bfd_get_section_by_name (dynobj, ".dynsym");
       BFD_ASSERT (s != NULL);
       s->_raw_size = dynsymcount * sizeof (Elf_External_Sym);
-      s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+      s->contents = bfd_alloc (output_bfd, s->_raw_size);
       if (s->contents == NULL && s->_raw_size != 0)
        return FALSE;
 
@@ -2649,7 +2599,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
          isym.st_info = 0;
          isym.st_other = 0;
          isym.st_shndx = 0;
-         elf_swap_symbol_out (output_bfd, &isym, (PTR) s->contents, (PTR) 0);
+         elf_swap_symbol_out (output_bfd, &isym, s->contents, 0);
        }
 
       /* Compute the size of the hashing table.  As a side effect this
@@ -2660,13 +2610,12 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
       BFD_ASSERT (s != NULL);
       hash_entry_size = elf_section_data (s)->this_hdr.sh_entsize;
       s->_raw_size = ((2 + bucketcount + dynsymcount) * hash_entry_size);
-      s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
+      s->contents = bfd_zalloc (output_bfd, s->_raw_size);
       if (s->contents == NULL)
        return FALSE;
 
-      bfd_put (8 * hash_entry_size, output_bfd, (bfd_vma) bucketcount,
-              s->contents);
-      bfd_put (8 * hash_entry_size, output_bfd, (bfd_vma) dynsymcount,
+      bfd_put (8 * hash_entry_size, output_bfd, bucketcount, s->contents);
+      bfd_put (8 * hash_entry_size, output_bfd, dynsymcount,
               s->contents + hash_entry_size);
 
       elf_hash_table (info)->bucketcount = bucketcount;
@@ -2679,7 +2628,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
       s->_raw_size = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
 
       for (dtagcount = 0; dtagcount <= info->spare_dynamic_tags; ++dtagcount)
-       if (! elf_add_dynamic_entry (info, (bfd_vma) DT_NULL, (bfd_vma) 0))
+       if (! elf_add_dynamic_entry (info, DT_NULL, 0))
          return FALSE;
     }
 
@@ -2689,15 +2638,10 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
 /* This function is used to adjust offsets into .dynstr for
    dynamic symbols.  This is called via elf_link_hash_traverse.  */
 
-static bfd_boolean elf_adjust_dynstr_offsets
-  PARAMS ((struct elf_link_hash_entry *, PTR));
-
 static bfd_boolean
-elf_adjust_dynstr_offsets (h, data)
-     struct elf_link_hash_entry *h;
-     PTR data;
+elf_adjust_dynstr_offsets (struct elf_link_hash_entry *h, void *data)
 {
-  struct elf_strtab_hash *dynstr = (struct elf_strtab_hash *) data;
+  struct elf_strtab_hash *dynstr = data;
 
   if (h->root.type == bfd_link_hash_warning)
     h = (struct elf_link_hash_entry *) h->root.u.i.link;
@@ -2711,9 +2655,7 @@ elf_adjust_dynstr_offsets (h, data)
    them.  */
 
 static bfd_boolean
-elf_finalize_dynstr (output_bfd, info)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
+elf_finalize_dynstr (bfd *output_bfd, struct bfd_link_info *info)
 {
   struct elf_link_local_dynamic_entry *entry;
   struct elf_strtab_hash *dynstr = elf_hash_table (info)->dynstr;
@@ -2856,7 +2798,7 @@ struct elf_final_link_info
   /* Buffer large enough to hold contents of any section.  */
   bfd_byte *contents;
   /* Buffer large enough to hold external relocs of any section.  */
-  PTR external_relocs;
+  void *external_relocs;
   /* Buffer large enough to hold internal relocs of any section.  */
   Elf_Internal_Rela *internal_relocs;
   /* Buffer large enough to hold external local symbols of any input
@@ -2886,19 +2828,15 @@ struct elf_final_link_info
 };
 
 static bfd_boolean elf_link_output_sym
-  PARAMS ((struct elf_final_link_info *, const char *,
-          Elf_Internal_Sym *, asection *));
+  (struct elf_final_link_info *, const char *, Elf_Internal_Sym *, asection *);
 static bfd_boolean elf_link_flush_output_syms
-  PARAMS ((struct elf_final_link_info *));
+  (struct elf_final_link_info *);
 static bfd_boolean elf_link_output_extsym
-  PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean elf_link_check_versioned_symbol
-  PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+  (struct elf_link_hash_entry *, void *);
 static bfd_boolean elf_link_input_bfd
-  PARAMS ((struct elf_final_link_info *, bfd *));
+  (struct elf_final_link_info *, bfd *);
 static bfd_boolean elf_reloc_link_order
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          struct bfd_link_order *));
+  (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
 
 /* This struct is used to pass information to elf_link_output_extsym.  */
 
@@ -2915,17 +2853,16 @@ struct elf_outext_info
    REL_HDR (there are COUNT of them), using the data in REL_HASH.  */
 
 static void
-elf_link_adjust_relocs (abfd, rel_hdr, count, rel_hash)
-     bfd *abfd;
-     Elf_Internal_Shdr *rel_hdr;
-     unsigned int count;
-     struct elf_link_hash_entry **rel_hash;
+elf_link_adjust_relocs (bfd *abfd,
+                       Elf_Internal_Shdr *rel_hdr,
+                       unsigned int count,
+                       struct elf_link_hash_entry **rel_hash)
 {
   unsigned int i;
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
   bfd_byte *erela;
-  void (*swap_in) PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
-  void (*swap_out) PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+  void (*swap_in) (bfd *, const bfd_byte *, Elf_Internal_Rela *);
+  void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
 
   if (rel_hdr->sh_entsize == sizeof (Elf_External_Rel))
     {
@@ -2971,12 +2908,10 @@ struct elf_link_sort_rela
 };
 
 static int
-elf_link_sort_cmp1 (A, B)
-     const PTR A;
-     const PTR B;
+elf_link_sort_cmp1 (const void *A, const void *B)
 {
-  struct elf_link_sort_rela *a = (struct elf_link_sort_rela *) A;
-  struct elf_link_sort_rela *b = (struct elf_link_sort_rela *) B;
+  const struct elf_link_sort_rela *a = A;
+  const struct elf_link_sort_rela *b = B;
   int relativea, relativeb;
 
   relativea = a->type == reloc_class_relative;
@@ -2998,12 +2933,10 @@ elf_link_sort_cmp1 (A, B)
 }
 
 static int
-elf_link_sort_cmp2 (A, B)
-     const PTR A;
-     const PTR B;
+elf_link_sort_cmp2 (const void *A, const void *B)
 {
-  struct elf_link_sort_rela *a = (struct elf_link_sort_rela *) A;
-  struct elf_link_sort_rela *b = (struct elf_link_sort_rela *) B;
+  const struct elf_link_sort_rela *a = A;
+  const struct elf_link_sort_rela *b = B;
   int copya, copyb;
 
   if (a->offset < b->offset)
@@ -3024,21 +2957,18 @@ elf_link_sort_cmp2 (A, B)
 }
 
 static size_t
-elf_link_sort_relocs (abfd, info, psec)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection **psec;
+elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
 {
-  bfd *dynobj = elf_hash_table (info)->dynobj;
-  asection *reldyn, *o;
+  asection *reldyn;
   bfd_size_type count, size;
   size_t i, ret, sort_elt, ext_size;
   bfd_byte *sort, *s_non_relative, *p;
   struct elf_link_sort_rela *sq;
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
   int i2e = bed->s->int_rels_per_ext_rel;
-  void (*swap_in) PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
-  void (*swap_out) PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+  void (*swap_in) (bfd *, const bfd_byte *, Elf_Internal_Rela *);
+  void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
+  struct bfd_link_order *lo;
 
   reldyn = bfd_get_section_by_name (abfd, ".rela.dyn");
   if (reldyn == NULL || reldyn->_raw_size == 0)
@@ -3059,11 +2989,12 @@ elf_link_sort_relocs (abfd, info, psec)
   count = reldyn->_raw_size / ext_size;
 
   size = 0;
-  for (o = dynobj->sections; o != NULL; o = o->next)
-    if ((o->flags & (SEC_HAS_CONTENTS|SEC_LINKER_CREATED))
-       == (SEC_HAS_CONTENTS|SEC_LINKER_CREATED)
-       && o->output_section == reldyn)
-      size += o->_raw_size;
+  for (lo = reldyn->link_order_head; lo != NULL; lo = lo->next)
+    if (lo->type == bfd_indirect_link_order)
+      {
+       asection *o = lo->u.indirect.section;
+       size += o->_raw_size;
+      }
 
   if (size != reldyn->_raw_size)
     return 0;
@@ -3074,17 +3005,15 @@ elf_link_sort_relocs (abfd, info, psec)
   if (sort == NULL)
     {
       (*info->callbacks->warning)
-       (info, _("Not enough memory to sort relocations"), 0, abfd, 0,
-        (bfd_vma) 0);
+       (info, _("Not enough memory to sort relocations"), 0, abfd, 0, 0);
       return 0;
     }
 
-  for (o = dynobj->sections; o != NULL; o = o->next)
-    if ((o->flags & (SEC_HAS_CONTENTS|SEC_LINKER_CREATED))
-       == (SEC_HAS_CONTENTS|SEC_LINKER_CREATED)
-       && o->output_section == reldyn)
+  for (lo = reldyn->link_order_head; lo != NULL; lo = lo->next)
+    if (lo->type == bfd_indirect_link_order)
       {
        bfd_byte *erel, *erelend;
+       asection *o = lo->u.indirect.section;
 
        erel = o->contents;
        erelend = o->contents + o->_raw_size;
@@ -3099,7 +3028,7 @@ elf_link_sort_relocs (abfd, info, psec)
          }
       }
 
-  qsort (sort, (size_t) count, sort_elt, elf_link_sort_cmp1);
+  qsort (sort, count, sort_elt, elf_link_sort_cmp1);
 
   for (i = 0, p = sort; i < count; i++, p += sort_elt)
     {
@@ -3119,14 +3048,13 @@ elf_link_sort_relocs (abfd, info, psec)
       sp->offset = sq->rela->r_offset;
     }
 
-  qsort (s_non_relative, (size_t) count - ret, sort_elt, elf_link_sort_cmp2);
+  qsort (s_non_relative, count - ret, sort_elt, elf_link_sort_cmp2);
 
-  for (o = dynobj->sections; o != NULL; o = o->next)
-    if ((o->flags & (SEC_HAS_CONTENTS|SEC_LINKER_CREATED))
-       == (SEC_HAS_CONTENTS|SEC_LINKER_CREATED)
-       && o->output_section == reldyn)
+  for (lo = reldyn->link_order_head; lo != NULL; lo = lo->next)
+    if (lo->type == bfd_indirect_link_order)
       {
        bfd_byte *erel, *erelend;
+       asection *o = lo->u.indirect.section;
 
        erel = o->contents;
        erelend = o->contents + o->_raw_size;
@@ -3148,9 +3076,7 @@ elf_link_sort_relocs (abfd, info, psec)
 /* Do the final step of an ELF link.  */
 
 bfd_boolean
-elf_bfd_final_link (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+elf_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
 {
   bfd_boolean dynamic;
   bfd_boolean emit_relocs;
@@ -3224,7 +3150,7 @@ elf_bfd_final_link (abfd, info)
   finfo.symbuf_count = 0;
   finfo.shndxbuf_size = 0;
   finfo.first_tls_sec = NULL;
-  for (o = abfd->sections; o != (asection *) NULL; o = o->next)
+  for (o = abfd->sections; o != NULL; o = o->next)
     if ((o->flags & SEC_THREAD_LOCAL) != 0
        && (o->flags & SEC_LOAD) != 0)
       {
@@ -3241,7 +3167,7 @@ elf_bfd_final_link (abfd, info)
   max_sym_count = 0;
   max_sym_shndx_count = 0;
   merged = FALSE;
-  for (o = abfd->sections; o != (asection *) NULL; o = o->next)
+  for (o = abfd->sections; o != NULL; o = o->next)
     {
       struct bfd_elf_section_data *esdo = elf_section_data (o);
       o->reloc_count = 0;
@@ -3277,10 +3203,8 @@ elf_bfd_final_link (abfd, info)
                {
                  Elf_Internal_Rela * relocs;
 
-                 relocs
-                   = _bfd_elf_link_read_relocs (abfd, sec, (PTR) NULL,
-                                                (Elf_Internal_Rela *) NULL,
-                                                info->keep_memory);
+                 relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL,
+                                                     info->keep_memory);
 
                  reloc_count = (*bed->elf_backend_count_relocs) (sec, relocs);
 
@@ -3398,7 +3322,7 @@ elf_bfd_final_link (abfd, info)
 
   if (! info->relocatable && merged)
     elf_link_hash_traverse (elf_hash_table (info),
-                           _bfd_elf_link_sec_merge_syms, (PTR) abfd);
+                           _bfd_elf_link_sec_merge_syms, abfd);
 
   /* Figure out the file positions for everything but the symbol table
      and the relocs.  We set symcount to force assign_section_numbers
@@ -3462,7 +3386,7 @@ elf_bfd_final_link (abfd, info)
     finfo.symbuf_size = max_sym_count;
   amt = finfo.symbuf_size;
   amt *= sizeof (Elf_External_Sym);
-  finfo.symbuf = (Elf_External_Sym *) bfd_malloc (amt);
+  finfo.symbuf = bfd_malloc (amt);
   if (finfo.symbuf == NULL)
     goto error_return;
   if (elf_numsections (abfd) > SHN_LORESERVE)
@@ -3471,7 +3395,7 @@ elf_bfd_final_link (abfd, info)
       amt = 2 * max_sym_count + elf_numsections (abfd) + 1000;
       finfo.shndxbuf_size = amt;
       amt *= sizeof (Elf_External_Sym_Shndx);
-      finfo.symshndxbuf = (Elf_External_Sym_Shndx *) bfd_zmalloc (amt);
+      finfo.symshndxbuf = bfd_zmalloc (amt);
       if (finfo.symshndxbuf == NULL)
        goto error_return;
     }
@@ -3486,8 +3410,7 @@ elf_bfd_final_link (abfd, info)
       elfsym.st_info = 0;
       elfsym.st_other = 0;
       elfsym.st_shndx = SHN_UNDEF;
-      if (! elf_link_output_sym (&finfo, (const char *) NULL,
-                                &elfsym, bfd_und_section_ptr))
+      if (! elf_link_output_sym (&finfo, NULL, &elfsym, bfd_und_section_ptr))
        goto error_return;
     }
 
@@ -3528,8 +3451,7 @@ elf_bfd_final_link (abfd, info)
            elfsym.st_value = 0;
          else
            elfsym.st_value = o->vma;
-         if (! elf_link_output_sym (&finfo, (const char *) NULL,
-                                    &elfsym, o))
+         if (! elf_link_output_sym (&finfo, NULL, &elfsym, o))
            goto error_return;
          if (i == SHN_LORESERVE - 1)
            i += SHN_HIRESERVE + 1 - SHN_LORESERVE;
@@ -3540,14 +3462,14 @@ elf_bfd_final_link (abfd, info)
      files.  */
   if (max_contents_size != 0)
     {
-      finfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
+      finfo.contents = bfd_malloc (max_contents_size);
       if (finfo.contents == NULL)
        goto error_return;
     }
 
   if (max_external_reloc_size != 0)
     {
-      finfo.external_relocs = (PTR) bfd_malloc (max_external_reloc_size);
+      finfo.external_relocs = bfd_malloc (max_external_reloc_size);
       if (finfo.external_relocs == NULL)
        goto error_return;
     }
@@ -3556,7 +3478,7 @@ elf_bfd_final_link (abfd, info)
     {
       amt = max_internal_reloc_count * bed->s->int_rels_per_ext_rel;
       amt *= sizeof (Elf_Internal_Rela);
-      finfo.internal_relocs = (Elf_Internal_Rela *) bfd_malloc (amt);
+      finfo.internal_relocs = bfd_malloc (amt);
       if (finfo.internal_relocs == NULL)
        goto error_return;
     }
@@ -3564,22 +3486,22 @@ elf_bfd_final_link (abfd, info)
   if (max_sym_count != 0)
     {
       amt = max_sym_count * sizeof (Elf_External_Sym);
-      finfo.external_syms = (Elf_External_Sym *) bfd_malloc (amt);
+      finfo.external_syms = bfd_malloc (amt);
       if (finfo.external_syms == NULL)
        goto error_return;
 
       amt = max_sym_count * sizeof (Elf_Internal_Sym);
-      finfo.internal_syms = (Elf_Internal_Sym *) bfd_malloc (amt);
+      finfo.internal_syms = bfd_malloc (amt);
       if (finfo.internal_syms == NULL)
        goto error_return;
 
       amt = max_sym_count * sizeof (long);
-      finfo.indices = (long *) bfd_malloc (amt);
+      finfo.indices = bfd_malloc (amt);
       if (finfo.indices == NULL)
        goto error_return;
 
       amt = max_sym_count * sizeof (asection *);
-      finfo.sections = (asection **) bfd_malloc (amt);
+      finfo.sections = bfd_malloc (amt);
       if (finfo.sections == NULL)
        goto error_return;
     }
@@ -3587,7 +3509,7 @@ elf_bfd_final_link (abfd, info)
   if (max_sym_shndx_count != 0)
     {
       amt = max_sym_shndx_count * sizeof (Elf_External_Sym_Shndx);
-      finfo.locsym_shndx = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
+      finfo.locsym_shndx = bfd_malloc (amt);
       if (finfo.locsym_shndx == NULL)
        goto error_return;
     }
@@ -3688,7 +3610,7 @@ elf_bfd_final_link (abfd, info)
   eoinfo.finfo = &finfo;
   eoinfo.localsyms = TRUE;
   elf_link_hash_traverse (elf_hash_table (info), elf_link_output_extsym,
-                         (PTR) &eoinfo);
+                         &eoinfo);
   if (eoinfo.failed)
     return FALSE;
 
@@ -3728,7 +3650,7 @@ elf_bfd_final_link (abfd, info)
              sym.st_shndx = indx;
              sym.st_value = s->vma;
              dest = dynsym + elf_section_data (s)->dynindx;
-             elf_swap_symbol_out (abfd, &sym, (PTR) dest, (PTR) 0);
+             elf_swap_symbol_out (abfd, &sym, dest, 0);
            }
 
          last_local = bfd_count_sections (abfd);
@@ -3769,7 +3691,7 @@ elf_bfd_final_link (abfd, info)
                last_local = e->dynindx;
 
              dest = dynsym + e->dynindx;
-             elf_swap_symbol_out (abfd, &sym, (PTR) dest, (PTR) 0);
+             elf_swap_symbol_out (abfd, &sym, dest, 0);
            }
        }
 
@@ -3782,7 +3704,7 @@ elf_bfd_final_link (abfd, info)
   eoinfo.localsyms = FALSE;
   eoinfo.finfo = &finfo;
   elf_link_hash_traverse (elf_hash_table (info), elf_link_output_extsym,
-                         (PTR) &eoinfo);
+                         &eoinfo);
   if (eoinfo.failed)
     return FALSE;
 
@@ -3791,10 +3713,10 @@ elf_bfd_final_link (abfd, info)
   if (bed->elf_backend_output_arch_syms)
     {
       typedef bfd_boolean (*out_sym_func)
-       PARAMS ((PTR, const char *, Elf_Internal_Sym *, asection *));
+       (void *, const char *, Elf_Internal_Sym *, asection *);
 
       if (! ((*bed->elf_backend_output_arch_syms)
-            (abfd, info, (PTR) &finfo, (out_sym_func) elf_link_output_sym)))
+            (abfd, info, &finfo, (out_sym_func) elf_link_output_sym)))
        return FALSE;
     }
 
@@ -3818,7 +3740,7 @@ elf_bfd_final_link (abfd, info)
                                                       off, TRUE);
 
       if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0
-         || (bfd_bwrite ((PTR) finfo.symshndxbuf, amt, abfd) != amt))
+         || (bfd_bwrite (finfo.symshndxbuf, amt, abfd) != amt))
        return FALSE;
     }
 
@@ -4172,17 +4094,16 @@ elf_bfd_final_link (abfd, info)
 /* Add a symbol to the output symbol table.  */
 
 static bfd_boolean
-elf_link_output_sym (finfo, name, elfsym, input_sec)
-     struct elf_final_link_info *finfo;
-     const char *name;
-     Elf_Internal_Sym *elfsym;
-     asection *input_sec;
+elf_link_output_sym (struct elf_final_link_info *finfo,
+                    const char *name,
+                    Elf_Internal_Sym *elfsym,
+                    asection *input_sec)
 {
   Elf_External_Sym *dest;
   Elf_External_Sym_Shndx *destshndx;
   bfd_boolean (*output_symbol_hook)
-    PARAMS ((bfd *, struct bfd_link_info *info, const char *,
-            Elf_Internal_Sym *, asection *));
+    (bfd *, struct bfd_link_info *info, const char *,
+     Elf_Internal_Sym *, asection *);
 
   output_symbol_hook = get_elf_backend_data (finfo->output_bfd)->
     elf_backend_link_output_symbol_hook;
@@ -4193,7 +4114,7 @@ elf_link_output_sym (finfo, name, elfsym, input_sec)
        return FALSE;
     }
 
-  if (name == (const char *) NULL || *name == '\0')
+  if (name == NULL || *name == '\0')
     elfsym->st_name = 0;
   else if (input_sec->flags & SEC_EXCLUDE)
     elfsym->st_name = 0;
@@ -4229,7 +4150,7 @@ elf_link_output_sym (finfo, name, elfsym, input_sec)
       destshndx += bfd_get_symcount (finfo->output_bfd);
     }
 
-  elf_swap_symbol_out (finfo->output_bfd, elfsym, (PTR) dest, (PTR) destshndx);
+  elf_swap_symbol_out (finfo->output_bfd, elfsym, dest, destshndx);
   finfo->symbuf_count += 1;
   bfd_get_symcount (finfo->output_bfd) += 1;
 
@@ -4239,8 +4160,7 @@ elf_link_output_sym (finfo, name, elfsym, input_sec)
 /* Flush the output symbols to the file.  */
 
 static bfd_boolean
-elf_link_flush_output_syms (finfo)
-     struct elf_final_link_info *finfo;
+elf_link_flush_output_syms (struct elf_final_link_info *finfo)
 {
   if (finfo->symbuf_count > 0)
     {
@@ -4252,7 +4172,7 @@ elf_link_flush_output_syms (finfo)
       pos = hdr->sh_offset + hdr->sh_size;
       amt = finfo->symbuf_count * sizeof (Elf_External_Sym);
       if (bfd_seek (finfo->output_bfd, pos, SEEK_SET) != 0
-         || bfd_bwrite ((PTR) finfo->symbuf, amt, finfo->output_bfd) != amt)
+         || bfd_bwrite (finfo->symbuf, amt, finfo->output_bfd) != amt)
        return FALSE;
 
       hdr->sh_size += amt;
@@ -4269,9 +4189,8 @@ elf_link_flush_output_syms (finfo)
    which may be satisfied by a versioned symbol in another DSO.  */
 
 static bfd_boolean
-elf_link_check_versioned_symbol (info, h)
-     struct bfd_link_info *info;
-     struct elf_link_hash_entry *h;
+elf_link_check_versioned_symbol (struct bfd_link_info *info,
+                                struct elf_link_hash_entry *h)
 {
   bfd *abfd;
   struct elf_link_loaded_list *loaded;
@@ -4351,12 +4270,12 @@ elf_link_check_versioned_symbol (info, h)
 
       /* Read in any version definitions.  */
       versymhdr = &elf_tdata (input)->dynversym_hdr;
-      extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size);
+      extversym = bfd_malloc (versymhdr->sh_size);
       if (extversym == NULL)
        goto error_ret;
 
       if (bfd_seek (input, versymhdr->sh_offset, SEEK_SET) != 0
-         || (bfd_bread ((PTR) extversym, versymhdr->sh_size, input)
+         || (bfd_bread (extversym, versymhdr->sh_size, input)
              != versymhdr->sh_size))
        {
          free (extversym);
@@ -4417,11 +4336,9 @@ elf_link_check_versioned_symbol (info, h)
    global symbols.  */
 
 static bfd_boolean
-elf_link_output_extsym (h, data)
-     struct elf_link_hash_entry *h;
-     PTR data;
+elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
 {
-  struct elf_outext_info *eoinfo = (struct elf_outext_info *) data;
+  struct elf_outext_info *eoinfo = data;
   struct elf_final_link_info *finfo = eoinfo->finfo;
   bfd_boolean strip;
   Elf_Internal_Sym sym;
@@ -4463,7 +4380,7 @@ elf_link_output_extsym (h, data)
     {
       if (! ((*finfo->info->callbacks->undefined_symbol)
             (finfo->info, h->root.root.string, h->root.u.undef.abfd,
-             (asection *) NULL, (bfd_vma) 0, TRUE)))
+             NULL, 0, TRUE)))
        {
          eoinfo->failed = TRUE;
          return FALSE;
@@ -4690,7 +4607,7 @@ elf_link_output_extsym (h, data)
 
       sym.st_name = h->dynstr_index;
       esym = (Elf_External_Sym *) finfo->dynsym_sec->contents + h->dynindx;
-      elf_swap_symbol_out (finfo->output_bfd, &sym, (PTR) esym, (PTR) 0);
+      elf_swap_symbol_out (finfo->output_bfd, &sym, esym, 0);
 
       bucketcount = elf_hash_table (finfo->info)->bucketcount;
       bucket = h->elf_hash_value % bucketcount;
@@ -4699,8 +4616,7 @@ elf_link_output_extsym (h, data)
       bucketpos = ((bfd_byte *) finfo->hash_sec->contents
                   + (bucket + 2) * hash_entry_size);
       chain = bfd_get (8 * hash_entry_size, finfo->output_bfd, bucketpos);
-      bfd_put (8 * hash_entry_size, finfo->output_bfd, (bfd_vma) h->dynindx,
-              bucketpos);
+      bfd_put (8 * hash_entry_size, finfo->output_bfd, h->dynindx, bucketpos);
       bfd_put (8 * hash_entry_size, finfo->output_bfd, chain,
               ((bfd_byte *) finfo->hash_sec->contents
                + (bucketcount + 2 + h->dynindx) * hash_entry_size));
@@ -4756,13 +4672,11 @@ elf_link_output_extsym (h, data)
    don't have to keep them in memory.  */
 
 static bfd_boolean
-elf_link_input_bfd (finfo, input_bfd)
-     struct elf_final_link_info *finfo;
-     bfd *input_bfd;
+elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
 {
   bfd_boolean (*relocate_section)
-    PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
-            Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+    (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+     Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
   bfd *output_bfd;
   Elf_Internal_Shdr *symtab_hdr;
   size_t locsymcount;
@@ -4850,7 +4764,7 @@ elf_link_input_bfd (finfo, input_bfd)
            isym->st_value =
              _bfd_merged_section_offset (output_bfd, &isec,
                                          elf_section_data (isec)->sec_info,
-                                         isym->st_value, (bfd_vma) 0);
+                                         isym->st_value, 0);
        }
       else if (isym->st_shndx == SHN_ABS)
        isec = bfd_abs_section_ptr;
@@ -4984,8 +4898,8 @@ elf_link_input_bfd (finfo, input_bfd)
       else
        {
          contents = finfo->contents;
-         if (! bfd_get_section_contents (input_bfd, o, contents,
-                                         (file_ptr) 0, o->_raw_size))
+         if (! bfd_get_section_contents (input_bfd, o, contents, 0,
+                                         o->_raw_size))
            return FALSE;
        }
 
@@ -5140,8 +5054,7 @@ elf_link_input_bfd (finfo, input_bfd)
              Elf_Internal_Shdr *input_rel_hdr, *input_rel_hdr2;
              unsigned int next_erel;
              bfd_boolean (*reloc_emitter)
-               PARAMS ((bfd *, asection *, Elf_Internal_Shdr *,
-                        Elf_Internal_Rela *));
+               (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *);
              bfd_boolean rela_normal;
 
              input_rel_hdr = &elf_section_data (o)->rel_hdr;
@@ -5397,11 +5310,10 @@ elf_link_input_bfd (finfo, input_bfd)
    with -Ur.  */
 
 static bfd_boolean
-elf_reloc_link_order (output_bfd, info, output_section, link_order)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
-     asection *output_section;
-     struct bfd_link_order *link_order;
+elf_reloc_link_order (bfd *output_bfd,
+                     struct bfd_link_info *info,
+                     asection *output_section,
+                     struct bfd_link_order *link_order)
 {
   reloc_howto_type *howto;
   long indx;
@@ -5468,8 +5380,7 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order)
       else
        {
          if (! ((*info->callbacks->unattached_reloc)
-                (info, link_order->u.reloc.p->u.name, (bfd *) NULL,
-                 (asection *) NULL, (bfd_vma) 0)))
+                (info, link_order->u.reloc.p->u.name, NULL, NULL, 0)))
            return FALSE;
          indx = 0;
        }
@@ -5486,10 +5397,10 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order)
       const char *sym_name;
 
       size = bfd_get_reloc_size (howto);
-      buf = (bfd_byte *) bfd_zmalloc (size);
-      if (buf == (bfd_byte *) NULL)
+      buf = bfd_zmalloc (size);
+      if (buf == NULL)
        return FALSE;
-      rstat = _bfd_relocate_contents (howto, output_bfd, (bfd_vma) addend, buf);
+      rstat = _bfd_relocate_contents (howto, output_bfd, addend, buf);
       switch (rstat)
        {
        case bfd_reloc_ok:
@@ -5506,16 +5417,15 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order)
          else
            sym_name = link_order->u.reloc.p->u.name;
          if (! ((*info->callbacks->reloc_overflow)
-                (info, sym_name, howto->name, addend,
-                 (bfd *) NULL, (asection *) NULL, (bfd_vma) 0)))
+                (info, sym_name, howto->name, addend, NULL, NULL, 0)))
            {
              free (buf);
              return FALSE;
            }
          break;
        }
-      ok = bfd_set_section_contents (output_bfd, output_section, (PTR) buf,
-                                    (file_ptr) link_order->offset, size);
+      ok = bfd_set_section_contents (output_bfd, output_section, buf,
+                                    link_order->offset, size);
       free (buf);
       if (! ok)
        return FALSE;
@@ -5557,302 +5467,26 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order)
   return TRUE;
 }
 \f
-/* Allocate a pointer to live in a linker created section.  */
-
-bfd_boolean
-elf_create_pointer_linker_section (abfd, info, lsect, h, rel)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     elf_linker_section_t *lsect;
-     struct elf_link_hash_entry *h;
-     const Elf_Internal_Rela *rel;
-{
-  elf_linker_section_pointers_t **ptr_linker_section_ptr = NULL;
-  elf_linker_section_pointers_t *linker_section_ptr;
-  unsigned long r_symndx = ELF_R_SYM (rel->r_info);
-  bfd_size_type amt;
-
-  BFD_ASSERT (lsect != NULL);
-
-  /* Is this a global symbol?  */
-  if (h != NULL)
-    {
-      /* Has this symbol already been allocated?  If so, our work is done.  */
-      if (_bfd_elf_find_pointer_linker_section (h->linker_section_pointer,
-                                               rel->r_addend,
-                                               lsect->which))
-       return TRUE;
-
-      ptr_linker_section_ptr = &h->linker_section_pointer;
-      /* Make sure this symbol is output as a dynamic symbol.  */
-      if (h->dynindx == -1)
-       {
-         if (! elf_link_record_dynamic_symbol (info, h))
-           return FALSE;
-       }
-
-      if (lsect->rel_section)
-       lsect->rel_section->_raw_size += sizeof (Elf_External_Rela);
-    }
-  else
-    {
-      /* Allocation of a pointer to a local symbol.  */
-      elf_linker_section_pointers_t **ptr = elf_local_ptr_offsets (abfd);
-
-      /* Allocate a table to hold the local symbols if first time.  */
-      if (!ptr)
-       {
-         unsigned int num_symbols = elf_tdata (abfd)->symtab_hdr.sh_info;
-         register unsigned int i;
-
-         amt = num_symbols;
-         amt *= sizeof (elf_linker_section_pointers_t *);
-         ptr = (elf_linker_section_pointers_t **) bfd_alloc (abfd, amt);
-
-         if (!ptr)
-           return FALSE;
-
-         elf_local_ptr_offsets (abfd) = ptr;
-         for (i = 0; i < num_symbols; i++)
-           ptr[i] = (elf_linker_section_pointers_t *) 0;
-       }
-
-      /* Has this symbol already been allocated?  If so, our work is done.  */
-      if (_bfd_elf_find_pointer_linker_section (ptr[r_symndx],
-                                               rel->r_addend,
-                                               lsect->which))
-       return TRUE;
-
-      ptr_linker_section_ptr = &ptr[r_symndx];
-
-      if (info->shared)
-       {
-         /* If we are generating a shared object, we need to
-            output a R_<xxx>_RELATIVE reloc so that the
-            dynamic linker can adjust this GOT entry.  */
-         BFD_ASSERT (lsect->rel_section != NULL);
-         lsect->rel_section->_raw_size += sizeof (Elf_External_Rela);
-       }
-    }
-
-  /* Allocate space for a pointer in the linker section, and allocate
-     a new pointer record from internal memory.  */
-  BFD_ASSERT (ptr_linker_section_ptr != NULL);
-  amt = sizeof (elf_linker_section_pointers_t);
-  linker_section_ptr = (elf_linker_section_pointers_t *) bfd_alloc (abfd, amt);
-
-  if (!linker_section_ptr)
-    return FALSE;
-
-  linker_section_ptr->next = *ptr_linker_section_ptr;
-  linker_section_ptr->addend = rel->r_addend;
-  linker_section_ptr->which = lsect->which;
-  linker_section_ptr->written_address_p = FALSE;
-  *ptr_linker_section_ptr = linker_section_ptr;
-
-#if 0
-  if (lsect->hole_size && lsect->hole_offset < lsect->max_hole_offset)
-    {
-      linker_section_ptr->offset = (lsect->section->_raw_size
-                                   - lsect->hole_size + (ARCH_SIZE / 8));
-      lsect->hole_offset += ARCH_SIZE / 8;
-      lsect->sym_offset  += ARCH_SIZE / 8;
-      if (lsect->sym_hash)
-       {
-         /* Bump up symbol value if needed.  */
-         lsect->sym_hash->root.u.def.value += ARCH_SIZE / 8;
-#ifdef DEBUG
-         fprintf (stderr, "Bump up %s by %ld, current value = %ld\n",
-                  lsect->sym_hash->root.root.string,
-                  (long) ARCH_SIZE / 8,
-                  (long) lsect->sym_hash->root.u.def.value);
-#endif
-       }
-    }
-  else
-#endif
-    linker_section_ptr->offset = lsect->section->_raw_size;
-
-  lsect->section->_raw_size += ARCH_SIZE / 8;
-
-#ifdef DEBUG
-  fprintf (stderr,
-          "Create pointer in linker section %s, offset = %ld, section size = %ld\n",
-          lsect->name, (long) linker_section_ptr->offset,
-          (long) lsect->section->_raw_size);
-#endif
-
-  return TRUE;
-}
-\f
-#if ARCH_SIZE==64
-#define bfd_put_ptr(BFD,VAL,ADDR) bfd_put_64 (BFD, VAL, ADDR)
-#endif
-#if ARCH_SIZE==32
-#define bfd_put_ptr(BFD,VAL,ADDR) bfd_put_32 (BFD, VAL, ADDR)
-#endif
-
-/* Fill in the address for a pointer generated in a linker section.  */
-
-bfd_vma
-elf_finish_pointer_linker_section (output_bfd, input_bfd, info, lsect, h,
-                                  relocation, rel, relative_reloc)
-     bfd *output_bfd;
-     bfd *input_bfd;
-     struct bfd_link_info *info;
-     elf_linker_section_t *lsect;
-     struct elf_link_hash_entry *h;
-     bfd_vma relocation;
-     const Elf_Internal_Rela *rel;
-     int relative_reloc;
-{
-  elf_linker_section_pointers_t *linker_section_ptr;
-
-  BFD_ASSERT (lsect != NULL);
-
-  if (h != NULL)
-    {
-      /* Handle global symbol.  */
-      linker_section_ptr = (_bfd_elf_find_pointer_linker_section
-                           (h->linker_section_pointer,
-                            rel->r_addend,
-                            lsect->which));
-
-      BFD_ASSERT (linker_section_ptr != NULL);
-
-      if (! elf_hash_table (info)->dynamic_sections_created
-         || (info->shared
-             && info->symbolic
-             && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
-       {
-         /* This is actually a static link, or it is a
-            -Bsymbolic link and the symbol is defined
-            locally.  We must initialize this entry in the
-            global section.
-
-            When doing a dynamic link, we create a .rela.<xxx>
-            relocation entry to initialize the value.  This
-            is done in the finish_dynamic_symbol routine.  */
-         if (!linker_section_ptr->written_address_p)
-           {
-             linker_section_ptr->written_address_p = TRUE;
-             bfd_put_ptr (output_bfd,
-                          relocation + linker_section_ptr->addend,
-                          (lsect->section->contents
-                           + linker_section_ptr->offset));
-           }
-       }
-    }
-  else
-    {
-      /* Handle local symbol.  */
-      unsigned long r_symndx = ELF_R_SYM (rel->r_info);
-      BFD_ASSERT (elf_local_ptr_offsets (input_bfd) != NULL);
-      BFD_ASSERT (elf_local_ptr_offsets (input_bfd)[r_symndx] != NULL);
-      linker_section_ptr = (_bfd_elf_find_pointer_linker_section
-                           (elf_local_ptr_offsets (input_bfd)[r_symndx],
-                            rel->r_addend,
-                            lsect->which));
-
-      BFD_ASSERT (linker_section_ptr != NULL);
-
-      /* Write out pointer if it hasn't been rewritten out before.  */
-      if (!linker_section_ptr->written_address_p)
-       {
-         linker_section_ptr->written_address_p = TRUE;
-         bfd_put_ptr (output_bfd, relocation + linker_section_ptr->addend,
-                      lsect->section->contents + linker_section_ptr->offset);
-
-         if (info->shared)
-           {
-             asection *srel = lsect->rel_section;
-             Elf_Internal_Rela outrel[MAX_INT_RELS_PER_EXT_REL];
-             bfd_byte *erel;
-             struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
-             unsigned int i;
-
-             /* We need to generate a relative reloc for the dynamic
-                linker.  */
-             if (!srel)
-               {
-                 srel = bfd_get_section_by_name (elf_hash_table (info)->dynobj,
-                                                 lsect->rel_name);
-                 lsect->rel_section = srel;
-               }
-
-             BFD_ASSERT (srel != NULL);
-
-             for (i = 0; i < bed->s->int_rels_per_ext_rel; i++)
-               {
-                 outrel[i].r_offset = (lsect->section->output_section->vma
-                                       + lsect->section->output_offset
-                                       + linker_section_ptr->offset);
-                 outrel[i].r_info = 0;
-                 outrel[i].r_addend = 0;
-               }
-             outrel[0].r_info = ELF_R_INFO (0, relative_reloc);
-             erel = lsect->section->contents;
-             erel += (elf_section_data (lsect->section)->rel_count++
-                      * sizeof (Elf_External_Rela));
-             elf_swap_reloca_out (output_bfd, outrel, erel);
-           }
-       }
-    }
-
-  relocation = (lsect->section->output_offset
-               + linker_section_ptr->offset
-               - lsect->hole_offset
-               - lsect->sym_offset);
-
-#ifdef DEBUG
-  fprintf (stderr,
-          "Finish pointer in linker section %s, offset = %ld (0x%lx)\n",
-          lsect->name, (long) relocation, (long) relocation);
-#endif
-
-  /* Subtract out the addend, because it will get added back in by the normal
-     processing.  */
-  return relocation - linker_section_ptr->addend;
-}
-\f
 /* Garbage collect unused sections.  */
 
-static bfd_boolean elf_gc_mark
-  PARAMS ((struct bfd_link_info *, asection *,
-          asection * (*) (asection *, struct bfd_link_info *,
-                          Elf_Internal_Rela *, struct elf_link_hash_entry *,
-                          Elf_Internal_Sym *)));
-
-static bfd_boolean elf_gc_sweep
-  PARAMS ((struct bfd_link_info *,
-          bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *,
-                           const Elf_Internal_Rela *)));
-
 static bfd_boolean elf_gc_sweep_symbol
-  PARAMS ((struct elf_link_hash_entry *, PTR));
+  (struct elf_link_hash_entry *, void *);
 
 static bfd_boolean elf_gc_allocate_got_offsets
-  PARAMS ((struct elf_link_hash_entry *, PTR));
-
-static bfd_boolean elf_gc_propagate_vtable_entries_used
-  PARAMS ((struct elf_link_hash_entry *, PTR));
-
-static bfd_boolean elf_gc_smash_unused_vtentry_relocs
-  PARAMS ((struct elf_link_hash_entry *, PTR));
+  (struct elf_link_hash_entry *, void *);
 
 /* The mark phase of garbage collection.  For a given section, mark
    it and any sections in this section's group, and all the sections
    which define symbols to which it refers.  */
 
 typedef asection * (*gc_mark_hook_fn)
-  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
-          struct elf_link_hash_entry *, Elf_Internal_Sym *));
+  (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+   struct elf_link_hash_entry *, Elf_Internal_Sym *);
 
 static bfd_boolean
-elf_gc_mark (info, sec, gc_mark_hook)
-     struct bfd_link_info *info;
-     asection *sec;
-     gc_mark_hook_fn gc_mark_hook;
+elf_gc_mark (struct bfd_link_info *info,
+            asection *sec,
+            gc_mark_hook_fn gc_mark_hook)
 {
   bfd_boolean ret;
   asection *group_sec;
@@ -5900,8 +5534,7 @@ elf_gc_mark (info, sec, gc_mark_hook)
        }
 
       /* Read the relocations.  */
-      relstart = _bfd_elf_link_read_relocs (input_bfd, sec, NULL,
-                                           (Elf_Internal_Rela *) NULL,
+      relstart = _bfd_elf_link_read_relocs (input_bfd, sec, NULL, NULL,
                                            info->keep_memory);
       if (relstart == NULL)
        {
@@ -5962,13 +5595,10 @@ elf_gc_mark (info, sec, gc_mark_hook)
 /* The sweep phase of garbage collection.  Remove all garbage sections.  */
 
 typedef bfd_boolean (*gc_sweep_hook_fn)
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          const Elf_Internal_Rela *));
+  (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
 
 static bfd_boolean
-elf_gc_sweep (info, gc_sweep_hook)
-     struct bfd_link_info *info;
-     gc_sweep_hook_fn gc_sweep_hook;
+elf_gc_sweep (struct bfd_link_info *info, gc_sweep_hook_fn gc_sweep_hook)
 {
   bfd *sub;
 
@@ -6006,8 +5636,7 @@ elf_gc_sweep (info, gc_sweep_hook)
              bfd_boolean r;
 
              internal_relocs
-               = _bfd_elf_link_read_relocs (o->owner, o, NULL,
-                                            (Elf_Internal_Rela *) NULL,
+               = _bfd_elf_link_read_relocs (o->owner, o, NULL, NULL,
                                             info->keep_memory);
              if (internal_relocs == NULL)
                return FALSE;
@@ -6029,9 +5658,7 @@ elf_gc_sweep (info, gc_sweep_hook)
   {
     int i = 0;
 
-    elf_link_hash_traverse (elf_hash_table (info),
-                           elf_gc_sweep_symbol,
-                           (PTR) &i);
+    elf_link_hash_traverse (elf_hash_table (info), elf_gc_sweep_symbol, &i);
 
     elf_hash_table (info)->dynsymcount = i;
   }
@@ -6042,11 +5669,9 @@ elf_gc_sweep (info, gc_sweep_hook)
 /* Sweep symbols in swept sections.  Called via elf_link_hash_traverse.  */
 
 static bfd_boolean
-elf_gc_sweep_symbol (h, idxptr)
-     struct elf_link_hash_entry *h;
-     PTR idxptr;
+elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *idxptr)
 {
-  int *idx = (int *) idxptr;
+  int *idx = idxptr;
 
   if (h->root.type == bfd_link_hash_warning)
     h = (struct elf_link_hash_entry *) h->root.u.i.link;
@@ -6064,9 +5689,7 @@ elf_gc_sweep_symbol (h, idxptr)
    elf_link_hash_traverse.  */
 
 static bfd_boolean
-elf_gc_propagate_vtable_entries_used (h, okp)
-     struct elf_link_hash_entry *h;
-     PTR okp;
+elf_gc_propagate_vtable_entries_used (struct elf_link_hash_entry *h, void *okp)
 {
   if (h->root.type == bfd_link_hash_warning)
     h = (struct elf_link_hash_entry *) h->root.u.i.link;
@@ -6123,9 +5746,7 @@ elf_gc_propagate_vtable_entries_used (h, okp)
 }
 
 static bfd_boolean
-elf_gc_smash_unused_vtentry_relocs (h, okp)
-     struct elf_link_hash_entry *h;
-     PTR okp;
+elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp)
 {
   asection *sec;
   bfd_vma hstart, hend;
@@ -6148,8 +5769,7 @@ elf_gc_smash_unused_vtentry_relocs (h, okp)
   hstart = h->root.u.def.value;
   hend = hstart + h->size;
 
-  relstart = _bfd_elf_link_read_relocs (sec->owner, sec, NULL,
-                                       (Elf_Internal_Rela *) NULL, TRUE);
+  relstart = _bfd_elf_link_read_relocs (sec->owner, sec, NULL, NULL, TRUE);
   if (!relstart)
     return *(bfd_boolean *) okp = FALSE;
   bed = get_elf_backend_data (sec->owner);
@@ -6178,15 +5798,13 @@ elf_gc_smash_unused_vtentry_relocs (h, okp)
 /* Do mark and sweep of unused sections.  */
 
 bfd_boolean
-elf_gc_sections (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
 {
   bfd_boolean ok = TRUE;
   bfd *sub;
   asection * (*gc_mark_hook)
-    PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
-            struct elf_link_hash_entry *h, Elf_Internal_Sym *));
+    (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+     struct elf_link_hash_entry *h, Elf_Internal_Sym *);
 
   if (!get_elf_backend_data (abfd)->can_gc_sections
       || info->relocatable || info->emitrelocations
@@ -6196,14 +5814,14 @@ elf_gc_sections (abfd, info)
   /* Apply transitive closure to the vtable entry usage info.  */
   elf_link_hash_traverse (elf_hash_table (info),
                          elf_gc_propagate_vtable_entries_used,
-                         (PTR) &ok);
+                         &ok);
   if (!ok)
     return FALSE;
 
   /* Kill the vtable relocations that were not used.  */
   elf_link_hash_traverse (elf_hash_table (info),
                          elf_gc_smash_unused_vtentry_relocs,
-                         (PTR) &ok);
+                         &ok);
   if (!ok)
     return FALSE;
 
@@ -6235,11 +5853,10 @@ elf_gc_sections (abfd, info)
 /* Called from check_relocs to record the existance of a VTINHERIT reloc.  */
 
 bfd_boolean
-elf_gc_record_vtinherit (abfd, sec, h, offset)
-     bfd *abfd;
-     asection *sec;
-     struct elf_link_hash_entry *h;
-     bfd_vma offset;
+elf_gc_record_vtinherit (bfd *abfd,
+                        asection *sec,
+                        struct elf_link_hash_entry *h,
+                        bfd_vma offset)
 {
   struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
   struct elf_link_hash_entry **search, *child;
@@ -6292,11 +5909,10 @@ elf_gc_record_vtinherit (abfd, sec, h, offset)
 /* Called from check_relocs to record the existance of a VTENTRY reloc.  */
 
 bfd_boolean
-elf_gc_record_vtentry (abfd, sec, h, addend)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *sec ATTRIBUTE_UNUSED;
-     struct elf_link_hash_entry *h;
-     bfd_vma addend;
+elf_gc_record_vtentry (bfd *abfd ATTRIBUTE_UNUSED,
+                      asection *sec ATTRIBUTE_UNUSED,
+                      struct elf_link_hash_entry *h,
+                      bfd_vma addend)
 {
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
   unsigned int log_file_align = bed->s->log_file_align;
@@ -6329,7 +5945,7 @@ elf_gc_record_vtentry (abfd, sec, h, addend)
 
       if (ptr)
        {
-         ptr = bfd_realloc (ptr - 1, (bfd_size_type) bytes);
+         ptr = bfd_realloc (ptr - 1, bytes);
 
          if (ptr != NULL)
            {
@@ -6341,7 +5957,7 @@ elf_gc_record_vtentry (abfd, sec, h, addend)
            }
        }
       else
-       ptr = bfd_zmalloc ((bfd_size_type) bytes);
+       ptr = bfd_zmalloc (bytes);
 
       if (ptr == NULL)
        return FALSE;
@@ -6360,9 +5976,8 @@ elf_gc_record_vtentry (abfd, sec, h, addend)
    we're done.  Should be called from final_link.  */
 
 bfd_boolean
-elf_gc_common_finalize_got_offsets (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+elf_gc_common_finalize_got_offsets (bfd *abfd,
+                                   struct bfd_link_info *info)
 {
   bfd *i;
   struct elf_backend_data *bed = get_elf_backend_data (abfd);
@@ -6411,7 +6026,7 @@ elf_gc_common_finalize_got_offsets (abfd, info)
      adjust_dynamic_symbol  */
   elf_link_hash_traverse (elf_hash_table (info),
                          elf_gc_allocate_got_offsets,
-                         (PTR) &gotoff);
+                         &gotoff);
   return TRUE;
 }
 
@@ -6419,11 +6034,9 @@ elf_gc_common_finalize_got_offsets (abfd, info)
    to real got offsets.  */
 
 static bfd_boolean
-elf_gc_allocate_got_offsets (h, offarg)
-     struct elf_link_hash_entry *h;
-     PTR offarg;
+elf_gc_allocate_got_offsets (struct elf_link_hash_entry *h, void *offarg)
 {
-  bfd_vma *off = (bfd_vma *) offarg;
+  bfd_vma *off = offarg;
 
   if (h->root.type == bfd_link_hash_warning)
     h = (struct elf_link_hash_entry *) h->root.u.i.link;
@@ -6443,9 +6056,7 @@ elf_gc_allocate_got_offsets (h, offarg)
    got entry reference counting is enabled.  */
 
 bfd_boolean
-elf_gc_common_final_link (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+elf_gc_common_final_link (bfd *abfd, struct bfd_link_info *info)
 {
   if (!elf_gc_common_finalize_got_offsets (abfd, info))
     return FALSE;
@@ -6458,11 +6069,9 @@ elf_gc_common_final_link (abfd, info)
    all hash value of the exported symbols in an array.  */
 
 static bfd_boolean
-elf_collect_hash_codes (h, data)
-     struct elf_link_hash_entry *h;
-     PTR data;
+elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data)
 {
-  unsigned long **valuep = (unsigned long **) data;
+  unsigned long **valuep = data;
   const char *name;
   char *p;
   unsigned long ha;
@@ -6479,8 +6088,8 @@ elf_collect_hash_codes (h, data)
   p = strchr (name, ELF_VER_CHR);
   if (p != NULL)
     {
-      alc = bfd_malloc ((bfd_size_type) (p - name + 1));
-      memcpy (alc, name, (size_t) (p - name));
+      alc = bfd_malloc (p - name + 1);
+      memcpy (alc, name, p - name);
       alc[p - name] = '\0';
       name = alc;
     }
@@ -6502,11 +6111,9 @@ elf_collect_hash_codes (h, data)
 }
 
 bfd_boolean
-elf_reloc_symbol_deleted_p (offset, cookie)
-     bfd_vma offset;
-     PTR cookie;
+elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie)
 {
-  struct elf_reloc_cookie *rcookie = (struct elf_reloc_cookie *) cookie;
+  struct elf_reloc_cookie *rcookie = cookie;
 
   if (rcookie->bad_symtab)
     rcookie->rel = rcookie->rels;
@@ -6571,9 +6178,7 @@ elf_reloc_symbol_deleted_p (offset, cookie)
    which is true for all known assemblers.  */
 
 bfd_boolean
-elf_bfd_discard_info (output_bfd, info)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
+elf_bfd_discard_info (bfd *output_bfd, struct bfd_link_info *info)
 {
   struct elf_reloc_cookie cookie;
   asection *stab, *eh;
@@ -6647,10 +6252,8 @@ elf_bfd_discard_info (output_bfd, info)
          cookie.rels = NULL;
          count = stab->reloc_count;
          if (count != 0)
-           cookie.rels
-             = _bfd_elf_link_read_relocs (abfd, stab, (PTR) NULL,
-                                          (Elf_Internal_Rela *) NULL,
-                                          info->keep_memory);
+           cookie.rels = _bfd_elf_link_read_relocs (abfd, stab, NULL, NULL,
+                                                    info->keep_memory);
          if (cookie.rels != NULL)
            {
              cookie.rel = cookie.rels;
@@ -6671,10 +6274,8 @@ elf_bfd_discard_info (output_bfd, info)
          cookie.rels = NULL;
          count = eh->reloc_count;
          if (count != 0)
-           cookie.rels
-             = _bfd_elf_link_read_relocs (abfd, eh, (PTR) NULL,
-                                          (Elf_Internal_Rela *) NULL,
-                                          info->keep_memory);
+           cookie.rels = _bfd_elf_link_read_relocs (abfd, eh, NULL, NULL,
+                                                    info->keep_memory);
          cookie.rel = cookie.rels;
          cookie.relend = cookie.rels;
          if (cookie.rels != NULL)
@@ -6713,8 +6314,7 @@ elf_bfd_discard_info (output_bfd, info)
 }
 
 static bfd_boolean
-elf_section_ignore_discarded_relocs (sec)
-     asection *sec;
+elf_section_ignore_discarded_relocs (asection *sec)
 {
   struct elf_backend_data *bed;
 
index 2098f6fa9fa341eef68afb900f6005f8189bc4e1..27ffdddeaece2eb2ce4f80fefbade2a1538d1d1f 100644 (file)
@@ -143,6 +143,7 @@ struct elfNN_ia64_link_hash_table
   asection *got_sec;           /* the linkage table section (or NULL) */
   asection *rel_got_sec;       /* dynamic relocation section for same */
   asection *fptr_sec;          /* function descriptor table (or NULL) */
+  asection *rel_fptr_sec;      /* dynamic relocation section for same */
   asection *plt_sec;           /* the primary plt section (or NULL) */
   asection *pltoff_sec;                /* private descriptors for plt (or NULL) */
   asection *rel_pltoff_sec;    /* dynamic relocation section for same */
@@ -192,14 +193,6 @@ static bfd_boolean elfNN_ia64_add_symbol_hook
   PARAMS ((bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Sym *sym,
           const char **namep, flagword *flagsp, asection **secp,
           bfd_vma *valp));
-static bfd_boolean elfNN_ia64_aix_vec
-  PARAMS ((const bfd_target *vec));
-static bfd_boolean elfNN_ia64_aix_add_symbol_hook
-  PARAMS ((bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Sym *sym,
-          const char **namep, flagword *flagsp, asection **secp,
-          bfd_vma *valp));
-static bfd_boolean elfNN_ia64_aix_link_add_symbols
-  PARAMS ((bfd *abfd, struct bfd_link_info *info));
 static int elfNN_ia64_additional_program_headers
   PARAMS ((bfd *abfd));
 static bfd_boolean elfNN_ia64_modify_segment_map
@@ -207,7 +200,7 @@ static bfd_boolean elfNN_ia64_modify_segment_map
 static bfd_boolean elfNN_ia64_is_local_label_name
   PARAMS ((bfd *abfd, const char *name));
 static bfd_boolean elfNN_ia64_dynamic_symbol_p
-  PARAMS ((struct elf_link_hash_entry *h, struct bfd_link_info *info));
+  PARAMS ((struct elf_link_hash_entry *h, struct bfd_link_info *info, int));
 static bfd_boolean elfNN_ia64_local_hash_table_init
   PARAMS ((struct elfNN_ia64_local_hash_table *ht, bfd *abfd,
           new_hash_entry_func new));
@@ -367,7 +360,7 @@ elfNN_ia64_reloc (abfd, reloc, sym, data, input_section,
 
 #define IA64_HOWTO(TYPE, NAME, SIZE, PCREL, IN)                        \
   HOWTO (TYPE, 0, SIZE, 0, PCREL, 0, complain_overflow_signed, \
-        elfNN_ia64_reloc, NAME, FALSE, 0, 0, IN)
+        elfNN_ia64_reloc, NAME, FALSE, 0, -1, IN)
 
 /* This table has to be sorted according to increasing number of the
    TYPE field.  */
@@ -656,9 +649,6 @@ static const bfd_byte plt_full_entry[PLT_FULL_ENTRY_SIZE] =
 };
 
 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
-#define AIX_DYNAMIC_INTERPRETER "/usr/lib/ia64l64/libc.so.1"
-#define DYNAMIC_INTERPRETER(abfd) \
-  (elfNN_ia64_aix_vec (abfd->xvec) ? AIX_DYNAMIC_INTERPRETER : ELF_DYNAMIC_INTERPRETER)
 
 static const bfd_byte oor_brl[16] =
 {
@@ -841,7 +831,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
            }
 
          /* Can't do anything else with dynamic symbols.  */
-         else if (elfNN_ia64_dynamic_symbol_p (h, link_info))
+         else if (elfNN_ia64_dynamic_symbol_p (h, link_info, r_type))
            continue;
 
          else
@@ -1366,114 +1356,6 @@ elfNN_ia64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
   return TRUE;
 }
 
-static bfd_boolean
-elfNN_ia64_aix_vec (const bfd_target *vec)
-{
-  extern const bfd_target bfd_elfNN_ia64_aix_little_vec;
-  extern const bfd_target bfd_elfNN_ia64_aix_big_vec;
-
-  return (/**/vec == & bfd_elfNN_ia64_aix_little_vec
-         ||  vec == & bfd_elfNN_ia64_aix_big_vec);
-}
-
-/* Hook called by the linker routine which adds symbols from an object
-   file.  We use it to handle OS-specific symbols.  */
-
-static bfd_boolean
-elfNN_ia64_aix_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     const Elf_Internal_Sym *sym;
-     const char **namep;
-     flagword *flagsp;
-     asection **secp;
-     bfd_vma *valp;
-{
-  if (strcmp (*namep, "__GLOB_DATA_PTR") == 0)
-    {
-      /* Define __GLOB_DATA_PTR when it is encountered.  This is expected to
-        be a linker-defined symbol by the Aix C runtime startup code. IBM sez
-        no one else should use it b/c it is undocumented.  */
-      struct elf_link_hash_entry *h;
-
-      h = elf_link_hash_lookup (elf_hash_table (info), *namep,
-                               FALSE, FALSE, FALSE);
-      if (h == NULL)
-       {
-         struct elf_backend_data *bed;
-         struct elfNN_ia64_link_hash_table *ia64_info;
-         struct bfd_link_hash_entry *bh = NULL;
-
-         bed = get_elf_backend_data (abfd);
-         ia64_info = elfNN_ia64_hash_table (info);
-
-         if (!(_bfd_generic_link_add_one_symbol
-               (info, abfd, *namep, BSF_GLOBAL,
-                bfd_get_section_by_name (abfd, ".bss"),
-                bed->got_symbol_offset, (const char *) NULL, FALSE,
-                bed->collect, &bh)))
-           return FALSE;
-
-         h = (struct elf_link_hash_entry *) bh;
-         h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
-         h->type = STT_OBJECT;
-
-         if (! _bfd_elf_link_record_dynamic_symbol (info, h))
-           return FALSE;
-       }
-
-      return TRUE;
-    }
-  else if (sym->st_shndx == SHN_LOOS)
-    {
-      unsigned int i;
-
-      /* SHN_AIX_SYSCALL: Treat this as any other symbol.  The special symbol
-        is only relevant when compiling code for extended system calls.
-        Replace the "special" section with .text, if possible.
-        Note that these symbols are always assumed to be in .text. */
-      for (i = 1; i < elf_numsections (abfd); i++)
-       {
-         asection * sec = bfd_section_from_elf_index (abfd, i);
-
-         if (sec && strcmp (sec->name, ".text") == 0)
-           {
-             *secp = sec;
-             break;
-           }
-       }
-
-      if (*secp == NULL)
-       *secp = bfd_abs_section_ptr;
-
-      *valp = sym->st_size;
-
-      return TRUE;
-    }
-  else
-    {
-      return elfNN_ia64_add_symbol_hook (abfd, info, sym,
-                                        namep, flagsp, secp, valp);
-    }
-}
-
-bfd_boolean
-elfNN_ia64_aix_link_add_symbols (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
-{
-  /* Make sure dynamic sections are always created.  */
-  if (! elf_hash_table (info)->dynamic_sections_created
-      && abfd->xvec == info->hash->creator)
-    {
-      if (! _bfd_elf_link_create_dynamic_sections (abfd, info))
-       return FALSE;
-    }
-
-  /* Now do the standard call.  */
-  return bfd_elfNN_bfd_link_add_symbols (abfd, info);
-}
-
 /* Return the number of additional phdrs we will need.  */
 
 static int
@@ -1626,39 +1508,16 @@ elfNN_ia64_is_local_label_name (abfd, name)
 /* Should we do dynamic things to this symbol?  */
 
 static bfd_boolean
-elfNN_ia64_dynamic_symbol_p (h, info)
+elfNN_ia64_dynamic_symbol_p (h, info, r_type)
      struct elf_link_hash_entry *h;
      struct bfd_link_info *info;
+     int r_type;
 {
-  if (h == NULL)
-    return FALSE;
-
-  while (h->root.type == bfd_link_hash_indirect
-        || h->root.type == bfd_link_hash_warning)
-    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
-  if (h->dynindx == -1)
-    return FALSE;
-  switch (ELF_ST_VISIBILITY (h->other))
-    {
-    case STV_INTERNAL:
-    case STV_HIDDEN:
-      return FALSE;
-    default:
-      break;
-    }
+  bfd_boolean ignore_protected
+    = ((r_type & 0xf8) == 0x40         /* FPTR relocs */
+       || (r_type & 0xf8) == 0x50);    /* LTOFF_FPTR relocs */
 
-  if (h->root.type == bfd_link_hash_undefweak
-      || h->root.type == bfd_link_hash_defweak)
-    return TRUE;
-
-  if ((info->shared && (!info->symbolic || info->allow_shlib_undefined))
-      || ((h->elf_link_hash_flags
-          & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR))
-         == (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)))
-    return TRUE;
-
-  return FALSE;
+  return _bfd_elf_dynamic_symbol_p (h, info, ignore_protected);
 }
 \f
 static bfd_boolean
@@ -2048,6 +1907,10 @@ get_got (abfd, info, ia64_info)
       BFD_ASSERT (got);
       ia64_info->got_sec = got;
 
+      /* The .got section is always aligned at 8 bytes.  */
+      if (!bfd_set_section_alignment (abfd, got, 3))
+       return 0;
+
       flags = bfd_get_section_flags (abfd, got);
       bfd_set_section_flags (abfd, got, SEC_SMALL_DATA | flags);
     }
@@ -2063,7 +1926,7 @@ get_got (abfd, info, ia64_info)
 static asection *
 get_fptr (abfd, info, ia64_info)
      bfd *abfd;
-     struct bfd_link_info *info ATTRIBUTE_UNUSED;
+     struct bfd_link_info *info;
      struct elfNN_ia64_link_hash_table *ia64_info;
 {
   asection *fptr;
@@ -2083,7 +1946,7 @@ get_fptr (abfd, info, ia64_info)
                                      | SEC_LOAD
                                      | SEC_HAS_CONTENTS
                                      | SEC_IN_MEMORY
-                                     | SEC_READONLY
+                                     | (info->pie ? 0 : SEC_READONLY)
                                      | SEC_LINKER_CREATED))
          || !bfd_set_section_alignment (abfd, fptr, 4))
        {
@@ -2092,6 +1955,26 @@ get_fptr (abfd, info, ia64_info)
        }
 
       ia64_info->fptr_sec = fptr;
+
+      if (info->pie)
+       {
+         asection *fptr_rel;
+         fptr_rel = bfd_make_section(abfd, ".rela.opd");
+         if (fptr_rel == NULL
+             || !bfd_set_section_flags (abfd, fptr_rel,
+                                        (SEC_ALLOC | SEC_LOAD
+                                         | SEC_HAS_CONTENTS
+                                         | SEC_IN_MEMORY
+                                         | SEC_LINKER_CREATED
+                                         | SEC_READONLY))
+             || !bfd_set_section_alignment (abfd, fptr_rel, 3))
+           {
+             BFD_ASSERT (0);
+             return NULL;
+           }
+
+         ia64_info->rel_fptr_sec = fptr_rel;
+       }
     }
 
   return fptr;
@@ -2278,11 +2161,10 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
         have yet been processed.  Do something with what we know, as
         this may help reduce memory usage and processing time later.  */
       maybe_dynamic = FALSE;
-      if (h && ((info->shared
+      if (h && ((!info->executable
                      && (!info->symbolic || info->allow_shlib_undefined))
                || ! (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
-               || h->root.type == bfd_link_hash_defweak
-               || elfNN_ia64_aix_vec (abfd->xvec)))
+               || h->root.type == bfd_link_hash_defweak))
        maybe_dynamic = TRUE;
 
       need_entry = 0;
@@ -2339,7 +2221,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
        case R_IA64_FPTR32LSB:
        case R_IA64_FPTR64MSB:
        case R_IA64_FPTR64LSB:
-         if (info->shared || h || elfNN_ia64_aix_vec (abfd->xvec))
+         if (info->shared || h)
            need_entry = NEED_FPTR | NEED_DYNREL;
          else
            need_entry = NEED_FPTR;
@@ -2391,10 +2273,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
        case R_IA64_DIR64MSB:
        case R_IA64_DIR64LSB:
          /* Shared objects will always need at least a REL relocation.  */
-         if (info->shared || maybe_dynamic
-             || (elfNN_ia64_aix_vec (abfd->xvec)
-                 && (!h || strcmp (h->root.root.string,
-                                   "__GLOB_DATA_PTR") != 0)))
+         if (info->shared || maybe_dynamic)
            need_entry = NEED_DYNREL;
          dynrel_type = R_IA64_DIR64LSB;
          break;
@@ -2468,9 +2347,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
          /* FPTRs for shared libraries are allocated by the dynamic
             linker.  Make sure this local symbol will appear in the
             dynamic symbol table.  */
-         if (!h && (info->shared
-                    /* AIX also needs one */
-                    || elfNN_ia64_aix_vec (abfd->xvec)))
+         if (!h && info->shared)
            {
              if (! (_bfd_elfNN_link_record_local_dynamic_symbol
                     (info, abfd, (long) r_symndx)))
@@ -2520,10 +2397,7 @@ allocate_global_data_got (dyn_i, data)
 
   if ((dyn_i->want_got || dyn_i->want_gotx)
       && ! dyn_i->want_fptr
-      && (elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info)
-         || (elfNN_ia64_aix_vec (x->info->hash->creator)
-             && (!dyn_i->h || strcmp (dyn_i->h->root.root.string,
-                                      "__GLOB_DATA_PTR") != 0))))
+      && elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info, 0))
      {
        dyn_i->got_offset = x->ofs;
        x->ofs += 8;
@@ -2535,7 +2409,7 @@ allocate_global_data_got (dyn_i, data)
     }
   if (dyn_i->want_dtpmod)
     {
-      if (elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info))
+      if (elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info, 0))
        {
          dyn_i->dtpmod_offset = x->ofs;
          x->ofs += 8;
@@ -2572,8 +2446,7 @@ allocate_global_fptr_got (dyn_i, data)
 
   if (dyn_i->want_got
       && dyn_i->want_fptr
-      && (elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info)
-         || elfNN_ia64_aix_vec (x->info->hash->creator)))
+      && elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info, R_IA64_FPTR64LSB))
     {
       dyn_i->got_offset = x->ofs;
       x->ofs += 8;
@@ -2591,8 +2464,7 @@ allocate_local_got (dyn_i, data)
   struct elfNN_ia64_allocate_data *x = (struct elfNN_ia64_allocate_data *)data;
 
   if ((dyn_i->want_got || dyn_i->want_gotx)
-      && ! (elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info)
-           || elfNN_ia64_aix_vec (x->info->hash->creator)))
+      && !elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info, 0))
     {
       dyn_i->got_offset = x->ofs;
       x->ofs += 8;
@@ -2638,15 +2510,10 @@ allocate_fptr (dyn_i, data)
               || h->root.type == bfd_link_hash_warning)
          h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
-      if ((x->info->shared
-          && (!h
-              || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-              || h->root.type != bfd_link_hash_undefweak))
-         /* AIX needs an FPTR in this case. */
-         || (elfNN_ia64_aix_vec (x->info->hash->creator)
-             && (!h
-                 || h->root.type == bfd_link_hash_defined
-                 || h->root.type == bfd_link_hash_defweak)))
+      if (!x->info->executable
+         && (!h
+             || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+             || h->root.type != bfd_link_hash_undefweak))
        {
          if (h && h->dynindx == -1)
            {
@@ -2691,7 +2558,7 @@ allocate_plt_entries (dyn_i, data)
          h = (struct elf_link_hash_entry *) h->root.u.i.link;
 
       /* ??? Versioned symbols seem to lose ELF_LINK_HASH_NEEDS_PLT.  */
-      if (elfNN_ia64_dynamic_symbol_p (h, x->info))
+      if (elfNN_ia64_dynamic_symbol_p (h, x->info, 0))
        {
          bfd_size_type offset = x->ofs;
          if (offset == 0)
@@ -2769,11 +2636,10 @@ allocate_dynrel_entries (dyn_i, data)
   bfd_boolean dynamic_symbol, shared, resolved_zero;
 
   ia64_info = elfNN_ia64_hash_table (x->info);
-  dynamic_symbol = elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info)
-    || (elfNN_ia64_aix_vec (x->info->hash->creator)
-       /* Don't allocate an entry for __GLOB_DATA_PTR */
-       && (!dyn_i->h || strcmp (dyn_i->h->root.root.string,
-                                "__GLOB_DATA_PTR") != 0));
+
+  /* Note that this can't be used in relation to FPTR relocs below.  */
+  dynamic_symbol = elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info, 0);
+
   shared = x->info->shared;
   resolved_zero = (dyn_i->h
                   && ELF_ST_VISIBILITY (dyn_i->h->other)
@@ -2788,10 +2654,11 @@ allocate_dynrel_entries (dyn_i, data)
       switch (rent->type)
        {
        case R_IA64_FPTR64LSB:
-         /* Allocate one iff !want_fptr, which by this point will
-            be true only if we're actually allocating one statically
-            in the main executable.  */
-         if (dyn_i->want_fptr)
+         /* Allocate one iff !want_fptr and not PIE, which by this point
+            will be true only if we're actually allocating one statically
+            in the main executable.  Position independent executables
+            need a relative reloc.  */
+         if (dyn_i->want_fptr && !x->info->pie)
            continue;
          break;
        case R_IA64_PCREL64LSB:
@@ -2828,13 +2695,24 @@ allocate_dynrel_entries (dyn_i, data)
       || (dyn_i->want_ltoff_fptr
          && dyn_i->h
          && dyn_i->h->dynindx != -1))
-    ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
+    {
+      if (!dyn_i->want_ltoff_fptr
+         || !x->info->pie
+         || dyn_i->h == NULL
+         || dyn_i->h->root.type != bfd_link_hash_undefweak)
+       ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
+    }
   if ((dynamic_symbol || shared) && dyn_i->want_tprel)
     ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
   if (dynamic_symbol && dyn_i->want_dtpmod)
     ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
   if (dynamic_symbol && dyn_i->want_dtprel)
     ia64_info->rel_got_sec->_raw_size += sizeof (ElfNN_External_Rela);
+  if (ia64_info->rel_fptr_sec && dyn_i->want_fptr)
+    {
+      if (dyn_i->h == NULL || dyn_i->h->root.type != bfd_link_hash_undefweak)
+       ia64_info->rel_fptr_sec->_raw_size += sizeof (ElfNN_External_Rela);
+    }
 
   if (!resolved_zero && dyn_i->want_pltoff)
     {
@@ -2886,7 +2764,7 @@ elfNN_ia64_adjust_dynamic_symbol (info, h)
 
 static bfd_boolean
 elfNN_ia64_size_dynamic_sections (output_bfd, info)
-     bfd *output_bfd;
+     bfd *output_bfd ATTRIBUTE_UNUSED;
      struct bfd_link_info *info;
 {
   struct elfNN_ia64_allocate_data data;
@@ -2907,8 +2785,8 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
     {
       sec = bfd_get_section_by_name (dynobj, ".interp");
       BFD_ASSERT (sec != NULL);
-      sec->contents = (bfd_byte *) DYNAMIC_INTERPRETER (output_bfd);
-      sec->_raw_size = strlen (DYNAMIC_INTERPRETER (output_bfd)) + 1;
+      sec->contents = (bfd_byte *) ELF_DYNAMIC_INTERPRETER;
+      sec->_raw_size = strlen (ELF_DYNAMIC_INTERPRETER) + 1;
     }
 
   /* Allocate the GOT entries.  */
@@ -3444,14 +3322,17 @@ set_got_entry (abfd, info, dyn_i, dynindx, addend, value, dyn_r_type)
       bfd_put_64 (abfd, value, got_sec->contents + got_offset);
 
       /* Install a dynamic relocation if needed.  */
-      if ((info->shared
-          && (!dyn_i->h
-              || ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
-              || dyn_i->h->root.type != bfd_link_hash_undefweak)
-          && dyn_r_type != R_IA64_DTPREL64LSB)
-          || elfNN_ia64_dynamic_symbol_p (dyn_i->h, info)
-         || elfNN_ia64_aix_vec (abfd->xvec)
-         || (dynindx != -1 && dyn_r_type == R_IA64_FPTR64LSB))
+      if (((info->shared
+           && (!dyn_i->h
+               || ELF_ST_VISIBILITY (dyn_i->h->other) == STV_DEFAULT
+               || dyn_i->h->root.type != bfd_link_hash_undefweak)
+           && dyn_r_type != R_IA64_DTPREL64LSB)
+           || elfNN_ia64_dynamic_symbol_p (dyn_i->h, info, dyn_r_type)
+          || (dynindx != -1 && dyn_r_type == R_IA64_FPTR64LSB))
+         && (!dyn_i->want_ltoff_fptr
+             || !info->pie
+             || !dyn_i->h
+             || dyn_i->h->root.type != bfd_link_hash_undefweak))
        {
          if (dynindx == -1
              && dyn_r_type != R_IA64_TPREL64LSB
@@ -3530,6 +3411,24 @@ set_fptr_entry (abfd, info, dyn_i, value)
       bfd_put_64 (abfd, value, fptr_sec->contents + dyn_i->fptr_offset);
       bfd_put_64 (abfd, _bfd_get_gp_value (abfd),
                  fptr_sec->contents + dyn_i->fptr_offset + 8);
+      if (ia64_info->rel_fptr_sec)
+       {
+         Elf_Internal_Rela outrel;
+         bfd_byte *loc;
+
+         if (bfd_little_endian (abfd))
+           outrel.r_info = ELFNN_R_INFO (0, R_IA64_IPLTLSB);
+         else
+           outrel.r_info = ELFNN_R_INFO (0, R_IA64_IPLTMSB);
+         outrel.r_addend = value;
+         outrel.r_offset = (fptr_sec->output_section->vma
+                            + fptr_sec->output_offset
+                            + dyn_i->fptr_offset);
+         loc = ia64_info->rel_fptr_sec->contents;
+         loc += ia64_info->rel_fptr_sec->reloc_count++
+                * sizeof (ElfNN_External_Rela);
+         bfd_elfNN_swap_reloca_out (abfd, &outrel, loc);
+       }
     }
 
   /* Return the descriptor's address.  */
@@ -3893,7 +3792,6 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
       asection *sym_sec;
       bfd_byte *hit_addr;
       bfd_boolean dynamic_symbol_p;
-      bfd_boolean local_symbol_p;
       bfd_boolean undef_weak_ref;
 
       r_type = ELFNN_R_TYPE (rel->r_info);
@@ -3986,7 +3884,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            undef_weak_ref = TRUE;
-         else if (info->shared
+         else if (! info->executable
                   && !info->no_undefined
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            ;
@@ -4004,12 +3902,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
 
       hit_addr = contents + rel->r_offset;
       value += rel->r_addend;
-      dynamic_symbol_p = elfNN_ia64_dynamic_symbol_p (h, info);
-      /* Is this symbol locally defined? A protected symbol is locallly
-        defined. But its function descriptor may not. Use it with
-        caution.  */
-      local_symbol_p = (! dynamic_symbol_p
-                       || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT);
+      dynamic_symbol_p = elfNN_ia64_dynamic_symbol_p (h, info, r_type);
 
       switch (r_type)
        {
@@ -4025,11 +3918,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
        case R_IA64_DIR64MSB:
        case R_IA64_DIR64LSB:
          /* Install a dynamic relocation for this reloc.  */
-         if ((dynamic_symbol_p || info->shared
-              || (elfNN_ia64_aix_vec (info->hash->creator)
-                  /* Don't emit relocs for __GLOB_DATA_PTR on AIX. */
-                  && (!h || strcmp (h->root.root.string,
-                                    "__GLOB_DATA_PTR") != 0)))
+         if ((dynamic_symbol_p || info->shared)
              && r_symndx != 0
              && (input_section->flags & SEC_ALLOC) != 0)
            {
@@ -4042,7 +3931,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
              /* If we don't need dynamic symbol lookup, find a
                 matching RELATIVE relocation.  */
              dyn_r_type = r_type;
-             if (! local_symbol_p)
+             if (dynamic_symbol_p)
                {
                  dynindx = h->dynindx;
                  addend = rel->r_addend;
@@ -4082,8 +3971,6 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
                  addend = value;
                }
 
-             if (elfNN_ia64_aix_vec (info->hash->creator))
-               rel->r_addend = value;
              elfNN_ia64_install_dyn_reloc (output_bfd, info, input_section,
                                            srel, rel->r_offset, dyn_r_type,
                                            dynindx, addend);
@@ -4146,14 +4033,36 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
              if (!undef_weak_ref)
                value = set_fptr_entry (output_bfd, info, dyn_i, value);
            }
-         else
+         if (!dyn_i->want_fptr || info->pie)
            {
              long dynindx;
+             unsigned int dyn_r_type = r_type;
+             bfd_vma addend = rel->r_addend;
 
              /* Otherwise, we expect the dynamic linker to create
                 the entry.  */
 
-             if (h)
+             if (dyn_i->want_fptr)
+               {
+                 if (r_type == R_IA64_FPTR64I)
+                   {
+                     /* We can't represent this without a dynamic symbol.
+                        Adjust the relocation to be against an output
+                        section symbol, which are always present in the
+                        dynamic symbol table.  */
+                     /* ??? People shouldn't be doing non-pic code in
+                        shared libraries.  Hork.  */
+                     (*_bfd_error_handler)
+                       (_("%s: linking non-pic code in a position independent executable"),
+                        bfd_archive_filename (input_bfd));
+                     ret_val = FALSE;
+                     continue;
+                   }
+                 dynindx = 0;
+                 addend = value;
+                 dyn_r_type = r_type + R_IA64_REL64LSB - R_IA64_FPTR64LSB;
+               }
+             else if (h)
                {
                  if (h->dynindx != -1)
                    dynindx = h->dynindx;
@@ -4161,17 +4070,18 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
                    dynindx = (_bfd_elf_link_lookup_local_dynindx
                               (info, h->root.u.def.section->owner,
                                global_sym_index (h)));
+                 value = 0;
                }
              else
                {
                  dynindx = (_bfd_elf_link_lookup_local_dynindx
                             (info, input_bfd, (long) r_symndx));
+                 value = 0;
                }
 
              elfNN_ia64_install_dyn_reloc (output_bfd, info, input_section,
-                                           srel, rel->r_offset, r_type,
-                                           dynindx, rel->r_addend);
-             value = 0;
+                                           srel, rel->r_offset, dyn_r_type,
+                                           dynindx, addend);
            }
 
          r = elfNN_ia64_install_value (output_bfd, hit_addr, value, r_type);
@@ -4225,9 +4135,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
        case R_IA64_PCREL64MSB:
        case R_IA64_PCREL64LSB:
          /* Install a dynamic relocation for this reloc.  */
-         if ((dynamic_symbol_p
-              || elfNN_ia64_aix_vec (info->hash->creator))
-             && r_symndx != 0)
+         if (dynamic_symbol_p && r_symndx != 0)
            {
              BFD_ASSERT (srel != NULL);
 
@@ -4371,7 +4279,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
 
              /* If we don't need dynamic symbol lookup, install two
                 RELATIVE relocations.  */
-             if (local_symbol_p)
+             if (!dynamic_symbol_p)
                {
                  unsigned int dyn_r_type;
 
@@ -4619,7 +4527,7 @@ elfNN_ia64_finish_dynamic_symbol (output_bfd, info, h, sym)
 
       loc = ia64_info->rel_pltoff_sec->contents;
       loc += ((ia64_info->rel_pltoff_sec->reloc_count + index)
-             * sizeof (Elf64_External_Rela));
+             * sizeof (ElfNN_External_Rela));
       bfd_elfNN_swap_reloca_out (output_bfd, &outrel, loc);
     }
 
@@ -4869,6 +4777,16 @@ elfNN_ia64_reloc_type_class (rela)
     }
 }
 
+static struct bfd_elf_special_section const elfNN_ia64_special_sections[]=
+{
+  { ".sbss",           0,      NULL,   0,
+    SHT_NOBITS,                SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
+  { ".sdata",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
+
 static bfd_boolean
 elfNN_ia64_hpux_vec (const bfd_target *vec)
 {
@@ -4976,27 +4894,7 @@ elfNN_hpux_backend_section_from_bfd_section (abfd, sec, retval)
 #define elf_backend_hide_symbol                elfNN_ia64_hash_hide_symbol
 #define elf_backend_reloc_type_class   elfNN_ia64_reloc_type_class
 #define elf_backend_rela_normal                1
-
-#include "elfNN-target.h"
-
-/* AIX-specific vectors.  */
-
-#undef  TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM              bfd_elfNN_ia64_aix_little_vec
-#undef  TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME             "elfNN-ia64-aix-little"
-#undef  TARGET_BIG_SYM
-#define TARGET_BIG_SYM                 bfd_elfNN_ia64_aix_big_vec
-#undef  TARGET_BIG_NAME
-#define TARGET_BIG_NAME                        "elfNN-ia64-aix-big"
-
-#undef  elf_backend_add_symbol_hook
-#define elf_backend_add_symbol_hook    elfNN_ia64_aix_add_symbol_hook
-
-#undef  bfd_elfNN_bfd_link_add_symbols
-#define bfd_elfNN_bfd_link_add_symbols         elfNN_ia64_aix_link_add_symbols
-
-#define elfNN_bed elfNN_ia64_aix_bed
+#define elf_backend_special_sections   elfNN_ia64_special_sections
 
 #include "elfNN-target.h"
 
@@ -5009,14 +4907,6 @@ elfNN_hpux_backend_section_from_bfd_section (abfd, sec, retval)
 #undef  TARGET_BIG_NAME
 #define TARGET_BIG_NAME                 "elfNN-ia64-hpux-big"
 
-/* We need to undo the AIX specific functions.  */
-
-#undef  elf_backend_add_symbol_hook
-#define elf_backend_add_symbol_hook    elfNN_ia64_add_symbol_hook
-
-#undef  bfd_elfNN_bfd_link_add_symbols
-#define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols
-
 /* These are HP-UX specific functions.  */
 
 #undef  elf_backend_post_process_headers
index 478a0dbed8791f90be3c67aa4dd67b35d96efc2a..4c5496516a8e06d2e68a4cead8ce3a99ce9839a5 100644 (file)
@@ -188,10 +188,6 @@ struct mips_elf_link_hash_entry
      a readonly section.  */
   bfd_boolean readonly_reloc;
 
-  /* The index of the first dynamic relocation (in the .rel.dyn
-     section) against this symbol.  */
-  unsigned int min_dyn_reloc_index;
-
   /* We must not create a stub for a symbol that has relocations
      related to taking the function's address, i.e. any but
      R_MIPS_CALL*16 ones -- see "MIPS ABI Supplement, 3rd Edition",
@@ -390,12 +386,6 @@ static void bfd_elf32_swap_compact_rel_out
   PARAMS ((bfd *, const Elf32_compact_rel *, Elf32_External_compact_rel *));
 static void bfd_elf32_swap_crinfo_out
   PARAMS ((bfd *, const Elf32_crinfo *, Elf32_External_crinfo *));
-#if 0
-static void bfd_mips_elf_swap_msym_in
-  PARAMS ((bfd *, const Elf32_External_Msym *, Elf32_Internal_Msym *));
-#endif
-static void bfd_mips_elf_swap_msym_out
-  PARAMS ((bfd *, const Elf32_Internal_Msym *, Elf32_External_Msym *));
 static int sort_dynamic_relocs
   PARAMS ((const void *, const void *));
 static int sort_dynamic_relocs_64
@@ -442,8 +432,6 @@ static bfd_boolean mips_elf_create_compact_rel_section
   PARAMS ((bfd *, struct bfd_link_info *));
 static bfd_boolean mips_elf_create_got_section
   PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean));
-static asection *mips_elf_create_msym_section
-  PARAMS ((bfd *));
 static bfd_reloc_status_type mips_elf_calculate_relocation
   PARAMS ((bfd *, bfd *, asection *, struct bfd_link_info *,
           const Elf_Internal_Rela *, bfd_vma, reloc_howto_type *,
@@ -730,7 +718,6 @@ mips_elf_link_hash_newfunc (entry, table, string)
       ret->esym.ifd = -2;
       ret->possibly_dynamic_relocs = 0;
       ret->readonly_reloc = FALSE;
-      ret->min_dyn_reloc_index = 0;
       ret->no_fn_stub = FALSE;
       ret->fn_stub = NULL;
       ret->need_fn_stub = FALSE;
@@ -1192,31 +1179,6 @@ bfd_elf32_swap_crinfo_out (abfd, in, ex)
   H_PUT_32 (abfd, in->konst, ex->konst);
   H_PUT_32 (abfd, in->vaddr, ex->vaddr);
 }
-
-#if 0
-/* Swap in an MSYM entry.  */
-
-static void
-bfd_mips_elf_swap_msym_in (abfd, ex, in)
-     bfd *abfd;
-     const Elf32_External_Msym *ex;
-     Elf32_Internal_Msym *in;
-{
-  in->ms_hash_value = H_GET_32 (abfd, ex->ms_hash_value);
-  in->ms_info = H_GET_32 (abfd, ex->ms_info);
-}
-#endif
-/* Swap out an MSYM entry.  */
-
-static void
-bfd_mips_elf_swap_msym_out (abfd, in, ex)
-     bfd *abfd;
-     const Elf32_Internal_Msym *in;
-     Elf32_External_Msym *ex;
-{
-  H_PUT_32 (abfd, in->ms_hash_value, ex->ms_hash_value);
-  H_PUT_32 (abfd, in->ms_info, ex->ms_info);
-}
 \f
 /* A .reginfo section holds a single Elf32_RegInfo structure.  These
    routines swap this structure in and out.  They are used outside of
@@ -2917,34 +2879,6 @@ mips_elf_create_got_section (abfd, info, maybe_exclude)
 
   return TRUE;
 }
-
-/* Returns the .msym section for ABFD, creating it if it does not
-   already exist.  Returns NULL to indicate error.  */
-
-static asection *
-mips_elf_create_msym_section (abfd)
-     bfd *abfd;
-{
-  asection *s;
-
-  s = bfd_get_section_by_name (abfd, ".msym");
-  if (!s)
-    {
-      s = bfd_make_section (abfd, ".msym");
-      if (!s
-         || !bfd_set_section_flags (abfd, s,
-                                    SEC_ALLOC
-                                    | SEC_LOAD
-                                    | SEC_HAS_CONTENTS
-                                    | SEC_LINKER_CREATED
-                                    | SEC_READONLY)
-         || !bfd_set_section_alignment (abfd, s,
-                                        MIPS_ELF_LOG_FILE_ALIGN (abfd)))
-       return NULL;
-    }
-
-  return s;
-}
 \f
 /* Calculate the value produced by the RELOCATION (which comes from
    the INPUT_BFD).  The ADDEND is the addend to use for this
@@ -3875,9 +3809,17 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
     }
 #endif
 
-  if (outrel[0].r_offset == (bfd_vma) -1
-      || outrel[0].r_offset == (bfd_vma) -2)
+  if (outrel[0].r_offset == (bfd_vma) -1)
+    /* The relocation field has been deleted.  */
     skip = TRUE;
+  else if (outrel[0].r_offset == (bfd_vma) -2)
+    {
+      /* The relocation field has been converted into a relative value of
+        some sort.  Functions like _bfd_elf_write_section_eh_frame expect
+        the field to be fully relocated, so add in the symbol's value.  */
+      skip = TRUE;
+      *addendp += symbol;
+    }
 
   /* If we've decided to skip this relocation, just output an empty
      record.  Note that R_MIPS_NONE == 0, so that this call to memset
@@ -3887,18 +3829,27 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
   else
     {
       long indx;
+      bfd_boolean defined_p;
 
       /* We must now calculate the dynamic symbol table index to use
         in the relocation.  */
       if (h != NULL
          && (! info->symbolic || (h->root.elf_link_hash_flags
-                                  & ELF_LINK_HASH_DEF_REGULAR) == 0))
-       {
-         indx = h->root.dynindx;
+                                  & ELF_LINK_HASH_DEF_REGULAR) == 0)
          /* h->root.dynindx may be -1 if this symbol was marked to
             become local.  */
-         if (indx == -1)
-           indx = 0;
+         && h->root.dynindx != -1)
+       {
+         indx = h->root.dynindx;
+         if (SGI_COMPAT (output_bfd))
+           defined_p = ((h->root.elf_link_hash_flags
+                         & ELF_LINK_HASH_DEF_REGULAR) != 0);
+         else
+           /* ??? glibc's ld.so just adds the final GOT entry to the
+              relocation field.  It therefore treats relocs against
+              defined symbols in the same way as relocs against
+              undefined symbols.  */
+           defined_p = FALSE;
        }
       else
        {
@@ -3927,14 +3878,20 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
             section-relative relocations.  It's not like they're
             useful, after all.  This should be a bit more efficient
             as well.  */
-         indx = 0;
+         /* ??? Although this behavior is compatible with glibc's ld.so,
+            the ABI says that relocations against STN_UNDEF should have
+            a symbol value of 0.  Irix rld honors this, so relocations
+            against STN_UNDEF have no effect.  */
+         if (!SGI_COMPAT (output_bfd))
+           indx = 0;
+         defined_p = TRUE;
        }
 
       /* If the relocation was previously an absolute relocation and
         this symbol will not be referred to by the relocation, we must
         adjust it by the value we give it in the dynamic symbol table.
         Otherwise leave the job up to the dynamic linker.  */
-      if (!indx && r_type != R_MIPS_REL32)
+      if (defined_p && r_type != R_MIPS_REL32)
        *addendp += symbol;
 
       /* The relocation is always an REL32 relocation because we don't
@@ -3985,13 +3942,6 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
       (output_bfd, &outrel[0],
        (sreloc->contents + sreloc->reloc_count * sizeof (Elf32_External_Rel)));
 
-  /* Record the index of the first relocation referencing H.  This
-     information is later emitted in the .msym section.  */
-  if (h != NULL
-      && (h->min_dyn_reloc_index == 0
-         || sreloc->reloc_count < h->min_dyn_reloc_index))
-    h->min_dyn_reloc_index = sreloc->reloc_count;
-
   /* We've now added another relocation.  */
   ++sreloc->reloc_count;
 
@@ -4892,13 +4842,6 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
   if (! mips_elf_rel_dyn_section (elf_hash_table (info)->dynobj, TRUE))
     return FALSE;
 
-  /* Create the .msym section on IRIX6.  It is used by the dynamic
-     linker to speed up dynamic relocations, and to avoid computing
-     the ELF hash for symbols.  */
-  if (IRIX_COMPAT (abfd) == ict_irix6
-      && !mips_elf_create_msym_section (abfd))
-    return FALSE;
-
   /* Create .stub section.  */
   if (bfd_get_section_by_name (abfd,
                               MIPS_ELF_STUB_SECTION_NAME (abfd)) == NULL)
@@ -5495,6 +5438,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
        case R_MIPS_CALL16:
        case R_MIPS_CALL_HI16:
        case R_MIPS_CALL_LO16:
+       case R_MIPS_JALR:
          break;
        }
 
@@ -6060,10 +6004,6 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
       else if (SGI_COMPAT (output_bfd)
               && strncmp (name, ".compact_rel", 12) == 0)
        s->_raw_size += mips_elf_hash_table (info)->compact_rel_size;
-      else if (strcmp (name, ".msym") == 0)
-       s->_raw_size = (sizeof (Elf32_External_Msym)
-                       * (elf_hash_table (info)->dynsymcount
-                          + bfd_count_sections (output_bfd)));
       else if (strncmp (name, ".init", 5) != 0)
        {
          /* It's not one of our sections, so don't allocate space.  */
@@ -6208,10 +6148,6 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
              (dynobj, MIPS_ELF_OPTIONS_SECTION_NAME (dynobj)))
          && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_OPTIONS, 0))
        return FALSE;
-
-      if (bfd_get_section_by_name (dynobj, ".msym")
-         && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_MSYM, 0))
-       return FALSE;
     }
 
   return TRUE;
@@ -6644,6 +6580,7 @@ mips_elf_irix6_finish_dynamic_symbol (abfd, name, sym)
          /* All of these symbols are given type STT_SECTION by the
             IRIX6 linker.  */
          sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
+         sym->st_other = STO_PROTECTED;
 
          /* The IRIX linker puts these symbols in special sections.  */
          if (i == 0)
@@ -6668,14 +6605,11 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
   bfd *dynobj;
   bfd_vma gval;
   asection *sgot;
-  asection *smsym;
   struct mips_got_info *g, *gg;
   const char *name;
-  struct mips_elf_link_hash_entry *mh;
 
   dynobj = elf_hash_table (info)->dynobj;
   gval = sym->st_value;
-  mh = (struct mips_elf_link_hash_entry *) h;
 
   if (h->plt.offset != (bfd_vma) -1)
     {
@@ -6731,22 +6665,7 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
       bfd_vma offset;
       bfd_vma value;
 
-      if (sym->st_value)
-       value = sym->st_value;
-      else
-       {
-         /* For an entity defined in a shared object, this will be
-            NULL.  (For functions in shared objects for
-            which we have created stubs, ST_VALUE will be non-NULL.
-            That's because such the functions are now no longer defined
-            in a shared object.)  */
-
-         if ((info->shared && h->root.type == bfd_link_hash_undefined)
-             || h->root.type == bfd_link_hash_undefweak)
-           value = 0;
-         else
-           value = h->root.u.def.value;
-       }
+      value = sym->st_value;
       offset = mips_elf_global_got_index (dynobj, output_bfd, h);
       MIPS_ELF_PUT_WORD (output_bfd, value, sgot->contents + offset);
     }
@@ -6804,21 +6723,6 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
        }
     }
 
-  /* Create a .msym entry, if appropriate.  */
-  smsym = bfd_get_section_by_name (dynobj, ".msym");
-  if (smsym)
-    {
-      Elf32_Internal_Msym msym;
-
-      msym.ms_hash_value = bfd_elf_hash (h->root.root.string);
-      /* It is undocumented what the `1' indicates, but IRIX6 uses
-        this value.  */
-      msym.ms_info = ELF32_MS_INFO (mh->min_dyn_reloc_index, 1);
-      bfd_mips_elf_swap_msym_out
-       (dynobj, &msym,
-        ((Elf32_External_Msym *) smsym->contents) + h->dynindx);
-    }
-
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */
   name = h->root.root.string;
   if (strcmp (name, "_DYNAMIC") == 0
@@ -7141,33 +7045,9 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
     }
 
   {
-    asection *smsym;
     asection *s;
     Elf32_compact_rel cpt;
 
-    /* ??? The section symbols for the output sections were set up in
-       _bfd_elf_final_link.  SGI sets the STT_NOTYPE attribute for these
-       symbols.  Should we do so?  */
-
-    smsym = bfd_get_section_by_name (dynobj, ".msym");
-    if (smsym != NULL)
-      {
-       Elf32_Internal_Msym msym;
-
-       msym.ms_hash_value = 0;
-       msym.ms_info = ELF32_MS_INFO (0, 1);
-
-       for (s = output_bfd->sections; s != NULL; s = s->next)
-         {
-           long dynindx = elf_section_data (s)->dynindx;
-
-           bfd_mips_elf_swap_msym_out
-             (output_bfd, &msym,
-              (((Elf32_External_Msym *) smsym->contents)
-               + dynindx));
-         }
-      }
-
     if (SGI_COMPAT (output_bfd))
       {
        /* Write .compact_rel section out.  */
@@ -7283,6 +7163,7 @@ mips_set_isa_flags (abfd)
       break;
 
     case bfd_mach_mips5000:
+    case bfd_mach_mips7000:
     case bfd_mach_mips8000:
     case bfd_mach_mips10000:
     case bfd_mach_mips12000:
@@ -7760,10 +7641,6 @@ _bfd_mips_elf_copy_indirect_symbol (bed, dir, ind)
   dirmips->possibly_dynamic_relocs += indmips->possibly_dynamic_relocs;
   if (indmips->readonly_reloc)
     dirmips->readonly_reloc = TRUE;
-  if (dirmips->min_dyn_reloc_index == 0
-      || (indmips->min_dyn_reloc_index != 0
-         && indmips->min_dyn_reloc_index < dirmips->min_dyn_reloc_index))
-    dirmips->min_dyn_reloc_index = indmips->min_dyn_reloc_index;
   if (indmips->no_fn_stub)
     dirmips->no_fn_stub = TRUE;
 }
@@ -9069,6 +8946,7 @@ static const struct mips_mach_extension mips_mach_extensions[] = {
   { bfd_mach_mips5, bfd_mach_mips8000 },
   { bfd_mach_mips10000, bfd_mach_mips8000 },
   { bfd_mach_mips5000, bfd_mach_mips8000 },
+  { bfd_mach_mips7000, bfd_mach_mips8000 },
 
   /* VR4100 extensions.  */
   { bfd_mach_mips4120, bfd_mach_mips4100 },
@@ -9412,3 +9290,21 @@ _bfd_mips_elf_print_private_bfd_data (abfd, ptr)
 
   return TRUE;
 }
+
+struct bfd_elf_special_section const _bfd_mips_elf_special_sections[]=
+{
+  { ".sdata",          0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+  { ".sbss",           0,      NULL,   0,
+    SHT_NOBITS,                SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+  { ".lit4",           0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+  { ".lit8",           0,      NULL,   0,
+    SHT_PROGBITS,      SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+  { ".ucode",          0,      NULL,   0,
+    SHT_MIPS_UCODE,    0 },
+  { ".mdebug",         0,      NULL,   0,
+    SHT_MIPS_DEBUG,    0 },
+  { NULL,              0,      NULL,   0,
+    0,                 0 }
+};
index 088dd6a57eb3e791bed5c4fc6b5f0a12b6bfef6c..f6459a5de2ad628f308ab557723f845c0c421f51 100644 (file)
@@ -112,3 +112,6 @@ extern bfd_boolean _bfd_mips_relax_section
   PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
 extern bfd_vma _bfd_mips_elf_sign_extend
   PARAMS ((bfd_vma, int));
+
+extern struct bfd_elf_special_section const _bfd_mips_elf_special_sections[];
+#define elf_backend_special_sections _bfd_mips_elf_special_sections
index 58a96b14a0161249f158f8e3e3c1ab841d17fbe2..9329b2b960e3333dc8f60cab4bfd1a2cd915e262 100644 (file)
@@ -32,7 +32,8 @@
 #define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents
 #endif
 
-#define bfd_elfNN_canonicalize_dynamic_symtab _bfd_elf_canonicalize_dynamic_symtab
+#define bfd_elfNN_canonicalize_dynamic_symtab \
+  _bfd_elf_canonicalize_dynamic_symtab
 #ifndef bfd_elfNN_canonicalize_reloc
 #define bfd_elfNN_canonicalize_reloc   _bfd_elf_canonicalize_reloc
 #endif
@@ -41,7 +42,8 @@
 #endif
 #define bfd_elfNN_read_minisymbols     _bfd_elf_read_minisymbols
 #define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol
-#define bfd_elfNN_get_dynamic_symtab_upper_bound _bfd_elf_get_dynamic_symtab_upper_bound
+#define bfd_elfNN_get_dynamic_symtab_upper_bound \
+  _bfd_elf_get_dynamic_symtab_upper_bound
 #define bfd_elfNN_get_lineno           _bfd_elf_get_lineno
 #ifndef bfd_elfNN_get_reloc_upper_bound
 #define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound
@@ -51,9 +53,6 @@
 #endif
 #define bfd_elfNN_get_symtab           _bfd_elf_get_symtab
 #define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound
-#if 0 /* done in elf-bfd.h */
-#define bfd_elfNN_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
-#endif
 #define bfd_elfNN_make_empty_symbol    _bfd_elf_make_empty_symbol
 #ifndef bfd_elfNN_new_section_hook
 #define bfd_elfNN_new_section_hook     _bfd_elf_new_section_hook
 #define bfd_elfNN_bfd_debug_info_start bfd_void
 #define bfd_elfNN_bfd_debug_info_end   bfd_void
 #define bfd_elfNN_bfd_debug_info_accumulate \
-  (void (*) PARAMS ((bfd*, struct sec *))) bfd_void
+  ((void (*) (bfd*, struct sec *)) bfd_void)
 
 #ifndef bfd_elfNN_bfd_get_relocated_section_contents
 #define bfd_elfNN_bfd_get_relocated_section_contents \
- bfd_generic_get_relocated_section_contents
 bfd_generic_get_relocated_section_contents
 #endif
 
 #ifndef bfd_elfNN_bfd_relax_section
 
 #ifndef bfd_elfNN_bfd_make_debug_symbol
 #define bfd_elfNN_bfd_make_debug_symbol \
-  ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
+  ((asymbol * (*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
 #endif
 
 #ifndef bfd_elfNN_bfd_copy_private_symbol_data
 #endif
 #ifndef bfd_elfNN_bfd_merge_private_bfd_data
 #define bfd_elfNN_bfd_merge_private_bfd_data \
-  ((bfd_boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
+  ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
 #endif
 #ifndef bfd_elfNN_bfd_set_private_flags
 #define bfd_elfNN_bfd_set_private_flags \
-  ((bfd_boolean (*) PARAMS ((bfd *, flagword))) bfd_true)
+  ((bfd_boolean (*) (bfd *, flagword)) bfd_true)
 #endif
 #ifndef bfd_elfNN_bfd_is_local_label_name
 #define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name
 #define elf_backend_size_info _bfd_elfNN_size_info
 #endif
 
+#ifndef elf_backend_special_sections
+#define elf_backend_special_sections NULL
+#endif
+
 #ifndef elf_backend_sign_extend_vma
 #define elf_backend_sign_extend_vma 0
 #endif
@@ -497,6 +500,7 @@ static const struct elf_backend_data elfNN_bed =
   ELF_MACHINE_ALT1,
   ELF_MACHINE_ALT2,
   &elf_backend_size_info,
+  elf_backend_special_sections,
   elf_backend_got_symbol_offset,
   elf_backend_got_header_size,
   elf_backend_plt_header_size,
@@ -595,19 +599,19 @@ const bfd_target TARGET_BIG_SYM =
     bfd_elfNN_write_corefile_contents,
   },
 
-      BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
-      BFD_JUMP_TABLE_COPY (bfd_elfNN),
-      BFD_JUMP_TABLE_CORE (bfd_elfNN),
+  BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
+  BFD_JUMP_TABLE_COPY (bfd_elfNN),
+  BFD_JUMP_TABLE_CORE (bfd_elfNN),
 #ifdef bfd_elfNN_archive_functions
-      BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
+  BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
 #else
-      BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+  BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
 #endif
-      BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
-      BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
-      BFD_JUMP_TABLE_WRITE (bfd_elfNN),
-      BFD_JUMP_TABLE_LINK (bfd_elfNN),
-      BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
+  BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
+  BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
+  BFD_JUMP_TABLE_WRITE (bfd_elfNN),
+  BFD_JUMP_TABLE_LINK (bfd_elfNN),
+  BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
 
   /* Alternative endian target.  */
 #ifdef TARGET_LITTLE_SYM
@@ -691,19 +695,19 @@ const bfd_target TARGET_LITTLE_SYM =
     bfd_elfNN_write_corefile_contents,
   },
 
-      BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
-      BFD_JUMP_TABLE_COPY (bfd_elfNN),
-      BFD_JUMP_TABLE_CORE (bfd_elfNN),
+  BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
+  BFD_JUMP_TABLE_COPY (bfd_elfNN),
+  BFD_JUMP_TABLE_CORE (bfd_elfNN),
 #ifdef bfd_elfNN_archive_functions
-      BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
+  BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
 #else
-      BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+  BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
 #endif
-      BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
-      BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
-      BFD_JUMP_TABLE_WRITE (bfd_elfNN),
-      BFD_JUMP_TABLE_LINK (bfd_elfNN),
-      BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
+  BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
+  BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
+  BFD_JUMP_TABLE_WRITE (bfd_elfNN),
+  BFD_JUMP_TABLE_LINK (bfd_elfNN),
+  BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
 
   /* Alternative endian target.  */
 #ifdef TARGET_BIG_SYM
index 6415b8d57bc865827d82b386c4cdf2416d3d95fd..256ec0efd423f5992d928fe43e836846f7060177 100644 (file)
@@ -86,9 +86,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_check_format (abfd, format)
-     bfd *abfd;
-     bfd_format format;
+bfd_check_format (bfd *abfd, bfd_format format)
 {
   return bfd_check_format_matches (abfd, format, NULL);
 }
@@ -98,8 +96,8 @@ FUNCTION
        bfd_check_format_matches
 
 SYNOPSIS
-       bfd_boolean bfd_check_format_matches (bfd *abfd, bfd_format format,
-                                             char ***matching);
+       bfd_boolean bfd_check_format_matches
+         (bfd *abfd, bfd_format format, char ***matching);
 
 DESCRIPTION
        Like <<bfd_check_format>>, except when it returns FALSE with
@@ -114,10 +112,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_check_format_matches (abfd, format, matching)
-     bfd *abfd;
-     bfd_format format;
-     char ***matching;
+bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
 {
   extern const bfd_target binary_vec;
   const bfd_target * const *target;
@@ -148,7 +143,7 @@ bfd_check_format_matches (abfd, format, matching)
 
       *matching = NULL;
       amt = sizeof (*matching_vector) * 2 * _bfd_target_vector_entries;
-      matching_vector = (const bfd_target **) bfd_malloc (amt);
+      matching_vector = bfd_malloc (amt);
       if (!matching_vector)
        return FALSE;
     }
@@ -165,7 +160,7 @@ bfd_check_format_matches (abfd, format, matching)
       if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)        /* rewind! */
        {
          if (matching)
-           free ((PTR) matching_vector);
+           free (matching_vector);
          return FALSE;
        }
 
@@ -176,7 +171,7 @@ bfd_check_format_matches (abfd, format, matching)
          abfd->xvec = right_targ;      /* Set the target as returned.  */
 
          if (matching)
-           free ((PTR) matching_vector);
+           free (matching_vector);
 
          return TRUE;                  /* File position has moved, BTW.  */
        }
@@ -199,7 +194,7 @@ bfd_check_format_matches (abfd, format, matching)
          abfd->format = bfd_unknown;
 
          if (matching)
-           free ((PTR) matching_vector);
+           free (matching_vector);
 
          bfd_set_error (bfd_error_file_not_recognized);
 
@@ -220,7 +215,7 @@ bfd_check_format_matches (abfd, format, matching)
       if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
        {
          if (matching)
-           free ((PTR) matching_vector);
+           free (matching_vector);
          return FALSE;
        }
 
@@ -279,7 +274,7 @@ bfd_check_format_matches (abfd, format, matching)
          abfd->format = bfd_unknown;
 
          if (matching)
-           free ((PTR) matching_vector);
+           free (matching_vector);
 
          return FALSE;
        }
@@ -332,7 +327,7 @@ bfd_check_format_matches (abfd, format, matching)
       abfd->xvec = right_targ;         /* Change BFD's target permanently.  */
 
       if (matching)
-       free ((PTR) matching_vector);
+       free (matching_vector);
 
       return TRUE;                     /* File position has moved, BTW.  */
     }
@@ -345,7 +340,7 @@ bfd_check_format_matches (abfd, format, matching)
       bfd_set_error (bfd_error_file_not_recognized);
 
       if (matching)
-       free ((PTR) matching_vector);
+       free (matching_vector);
     }
   else
     {
@@ -383,9 +378,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_set_format (abfd, format)
-     bfd *abfd;
-     bfd_format format;
+bfd_set_format (bfd *abfd, bfd_format format)
 {
   if (bfd_read_p (abfd)
       || (unsigned int) abfd->format >= (unsigned int) bfd_type_end)
@@ -423,11 +416,10 @@ DESCRIPTION
 */
 
 const char *
-bfd_format_string (format)
-     bfd_format format;
+bfd_format_string (bfd_format format)
 {
-  if (((int)format <(int) bfd_unknown)
-      || ((int)format >=(int) bfd_type_end))
+  if (((int) format < (int) bfd_unknown)
+      || ((int) format >= (int) bfd_type_end))
     return "invalid";
 
   switch (format)
index 198b979e1b14f6cb8b7fa7ffe9498ef3f1b013f7..995213e3df578fcb19bbe7420aadb005bce73710 100644 (file)
@@ -35,7 +35,7 @@ FUNCTION
        bfd_init
 
 SYNOPSIS
-       void bfd_init(void);
+       void bfd_init (void);
 
 DESCRIPTION
        This routine must be called before any other BFD function to
@@ -46,6 +46,6 @@ DESCRIPTION
    However, someday it may be needed, so keep it around.  */
 
 void
-bfd_init ()
+bfd_init (void)
 {
 }
index 726883cb94370403b3245d76f33e2977b8ce0b62..2c9c23cd443dd1525d972b0460ea8557260fa465 100644 (file)
@@ -1,7 +1,7 @@
 /* libbfd.h -- Declarations used by bfd library *implementation*.
    (This include file is not for users of the library.)
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002
+   2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Set a tdata field.  Can't use the other macros for this, since they
    do casts, and casting to the left of assignment isn't portable.  */
-#define set_tdata(bfd, v) ((bfd)->tdata.any = (PTR) (v))
+#define set_tdata(bfd, v) ((bfd)->tdata.any = (v))
 
 /* If BFD_IN_MEMORY is set for a BFD, then the iostream fields points
    to an instance of this structure.  */
@@ -69,7 +69,7 @@ struct artdata {
                                   archive.  */
   file_ptr armap_datepos;      /* Position within archive to seek to
                                   rewrite the date field.  */
-  PTR tdata;                   /* Backend specific information.  */
+  void *tdata;                 /* Backend specific information.  */
 };
 
 #define bfd_ardata(bfd) ((bfd)->tdata.aout_ar_data)
@@ -83,105 +83,105 @@ struct areltdata {
 
 #define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size)
 
-extern PTR bfd_malloc
-  PARAMS ((bfd_size_type));
-extern PTR bfd_realloc
-  PARAMS ((PTR, bfd_size_type));
-extern PTR bfd_zmalloc
-  PARAMS ((bfd_size_type));
+extern void *bfd_malloc
+  (bfd_size_type);
+extern void *bfd_realloc
+  (void *, bfd_size_type);
+extern void *bfd_zmalloc
+  (bfd_size_type);
 
 extern bfd_error_handler_type _bfd_error_handler;
 
 /* These routines allocate and free things on the BFD's objalloc.  */
 
-extern PTR bfd_alloc
-  PARAMS ((bfd *, bfd_size_type));
-extern PTR bfd_zalloc
-  PARAMS ((bfd *, bfd_size_type));
+extern void *bfd_alloc
+  (bfd *, bfd_size_type);
+extern void *bfd_zalloc
+  (bfd *, bfd_size_type);
 extern void bfd_release
-  PARAMS ((bfd *, PTR));
+  (bfd *, void *);
 
 bfd * _bfd_create_empty_archive_element_shell
-  PARAMS ((bfd *obfd));
+  (bfd *obfd);
 bfd * _bfd_look_for_bfd_in_cache
-  PARAMS ((bfd *, file_ptr));
+  (bfd *, file_ptr);
 bfd_boolean _bfd_add_bfd_to_archive_cache
-  PARAMS ((bfd *, file_ptr, bfd *));
+  (bfd *, file_ptr, bfd *);
 bfd_boolean _bfd_generic_mkarchive
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 const bfd_target *bfd_generic_archive_p
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 bfd_boolean bfd_slurp_armap
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 bfd_boolean bfd_slurp_bsd_armap_f2
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 #define bfd_slurp_bsd_armap bfd_slurp_armap
 #define bfd_slurp_coff_armap bfd_slurp_armap
 bfd_boolean _bfd_slurp_extended_name_table
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 extern bfd_boolean _bfd_construct_extended_name_table
-  PARAMS ((bfd *, bfd_boolean, char **, bfd_size_type *));
+  (bfd *, bfd_boolean, char **, bfd_size_type *);
 bfd_boolean _bfd_write_archive_contents
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 bfd_boolean _bfd_compute_and_write_armap
-  PARAMS ((bfd *, unsigned int elength));
+  (bfd *, unsigned int elength);
 bfd *_bfd_get_elt_at_filepos
-  PARAMS ((bfd *archive, file_ptr filepos));
+  (bfd *archive, file_ptr filepos);
 extern bfd *_bfd_generic_get_elt_at_index
-  PARAMS ((bfd *, symindex));
+  (bfd *, symindex);
 bfd * _bfd_new_bfd
-  PARAMS ((void));
+  (void);
 void _bfd_delete_bfd
-  PARAMS ((bfd *));
+  (bfd *);
 
 bfd_boolean bfd_false
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 bfd_boolean bfd_true
-  PARAMS ((bfd *ignore));
-PTR bfd_nullvoidptr
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
+void *bfd_nullvoidptr
+  (bfd *ignore);
 int bfd_0
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 unsigned int bfd_0u
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 long bfd_0l
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 long _bfd_n1
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 void bfd_void
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 
 bfd *_bfd_new_bfd_contained_in
-  PARAMS ((bfd *));
+  (bfd *);
 const bfd_target *_bfd_dummy_target
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 
 void bfd_dont_truncate_arname
-  PARAMS ((bfd *abfd, const char *filename, char *hdr));
+  (bfd *abfd, const char *filename, char *hdr);
 void bfd_bsd_truncate_arname
-  PARAMS ((bfd *abfd, const char *filename, char *hdr));
+  (bfd *abfd, const char *filename, char *hdr);
 void bfd_gnu_truncate_arname
-  PARAMS ((bfd *abfd, const char *filename, char *hdr));
+  (bfd *abfd, const char *filename, char *hdr);
 
 bfd_boolean bsd_write_armap
-  PARAMS ((bfd *arch, unsigned int elength, struct orl *map,
-          unsigned int orl_count, int stridx));
+  (bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
+   int stridx);
 
 bfd_boolean coff_write_armap
-  PARAMS ((bfd *arch, unsigned int elength, struct orl *map,
-          unsigned int orl_count, int stridx));
+  (bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
+   int stridx);
 
-extern PTR _bfd_generic_read_ar_hdr
-  PARAMS ((bfd *));
+extern void *_bfd_generic_read_ar_hdr
+  (bfd *);
 
-extern PTR _bfd_generic_read_ar_hdr_mag
-  PARAMS ((bfd *, const char *));
+extern void *_bfd_generic_read_ar_hdr_mag
+  (bfd *, const char *);
 
 bfd * bfd_generic_openr_next_archived_file
-  PARAMS ((bfd *archive, bfd *last_file));
+  (bfd *archive, bfd *last_file);
 
 int bfd_generic_stat_arch_elt
-  PARAMS ((bfd *, struct stat *));
+  (bfd *, struct stat *);
 
 #define _bfd_read_ar_hdr(abfd) \
   BFD_SEND (abfd, _bfd_read_ar_hdr_fn, (abfd))
@@ -192,37 +192,37 @@ int bfd_generic_stat_arch_elt
 #define _bfd_generic_close_and_cleanup bfd_true
 #define _bfd_generic_bfd_free_cached_info bfd_true
 #define _bfd_generic_new_section_hook \
-  ((bfd_boolean (*) PARAMS ((bfd *, asection *))) bfd_true)
+  ((bfd_boolean (*) (bfd *, asection *)) bfd_true)
 extern bfd_boolean _bfd_generic_get_section_contents
-  PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+  (bfd *, asection *, void *, file_ptr, bfd_size_type);
 extern bfd_boolean _bfd_generic_get_section_contents_in_window
-  PARAMS ((bfd *, asection *, bfd_window *, file_ptr, bfd_size_type));
+  (bfd *, asection *, bfd_window *, file_ptr, bfd_size_type);
 
 /* Generic routines to use for BFD_JUMP_TABLE_COPY.  Use
    BFD_JUMP_TABLE_COPY (_bfd_generic).  */
 
 #define _bfd_generic_bfd_copy_private_bfd_data \
-  ((bfd_boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
+  ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
 #define _bfd_generic_bfd_merge_private_bfd_data \
-  ((bfd_boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
+  ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
 #define _bfd_generic_bfd_set_private_flags \
-  ((bfd_boolean (*) PARAMS ((bfd *, flagword))) bfd_true)
+  ((bfd_boolean (*) (bfd *, flagword)) bfd_true)
 #define _bfd_generic_bfd_copy_private_section_data \
-  ((bfd_boolean (*) PARAMS ((bfd *, asection *, bfd *, asection *))) bfd_true)
+  ((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true)
 #define _bfd_generic_bfd_copy_private_symbol_data \
-  ((bfd_boolean (*) PARAMS ((bfd *, asymbol *, bfd *, asymbol *))) bfd_true)
+  ((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true)
 #define _bfd_generic_bfd_print_private_bfd_data \
-  ((bfd_boolean (*) PARAMS ((bfd *, PTR))) bfd_true)
+  ((bfd_boolean (*) (bfd *, void *)) bfd_true)
 
 /* Routines to use for BFD_JUMP_TABLE_CORE when there is no core file
    support.  Use BFD_JUMP_TABLE_CORE (_bfd_nocore).  */
 
 extern char *_bfd_nocore_core_file_failing_command
-  PARAMS ((bfd *));
+  (bfd *);
 extern int _bfd_nocore_core_file_failing_signal
-  PARAMS ((bfd *));
+  (bfd *);
 extern bfd_boolean _bfd_nocore_core_file_matches_executable_p
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 
 /* Routines to use for BFD_JUMP_TABLE_ARCHIVE when there is no archive
    file support.  Use BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive).  */
@@ -230,20 +230,18 @@ extern bfd_boolean _bfd_nocore_core_file_matches_executable_p
 #define _bfd_noarchive_slurp_armap bfd_false
 #define _bfd_noarchive_slurp_extended_name_table bfd_false
 #define _bfd_noarchive_construct_extended_name_table \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \
+  ((bfd_boolean (*) (bfd *, char **, bfd_size_type *, const char **)) \
    bfd_false)
 #define _bfd_noarchive_truncate_arname \
-  ((void (*) PARAMS ((bfd *, const char *, char *))) bfd_void)
+  ((void (*) (bfd *, const char *, char *)) bfd_void)
 #define _bfd_noarchive_write_armap \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int))) \
+  ((bfd_boolean (*) (bfd *, unsigned int, struct orl *, unsigned int, int)) \
    bfd_false)
 #define _bfd_noarchive_read_ar_hdr bfd_nullvoidptr
 #define _bfd_noarchive_openr_next_archived_file \
-  ((bfd *(*) PARAMS ((bfd *, bfd *))) bfd_nullvoidptr)
+  ((bfd *(*) (bfd *, bfd *)) bfd_nullvoidptr)
 #define _bfd_noarchive_get_elt_at_index \
-  ((bfd *(*) PARAMS ((bfd *, symindex))) bfd_nullvoidptr)
+  ((bfd *(*) (bfd *, symindex)) bfd_nullvoidptr)
 #define _bfd_noarchive_generic_stat_arch_elt bfd_generic_stat_arch_elt
 #define _bfd_noarchive_update_armap_timestamp bfd_false
 
@@ -254,7 +252,7 @@ extern bfd_boolean _bfd_nocore_core_file_matches_executable_p
 #define _bfd_archive_bsd_slurp_extended_name_table \
   _bfd_slurp_extended_name_table
 extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table
-  PARAMS ((bfd *, char **, bfd_size_type *, const char **));
+  (bfd *, char **, bfd_size_type *, const char **);
 #define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname
 #define _bfd_archive_bsd_write_armap bsd_write_armap
 #define _bfd_archive_bsd_read_ar_hdr _bfd_generic_read_ar_hdr
@@ -264,7 +262,7 @@ extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table
 #define _bfd_archive_bsd_generic_stat_arch_elt \
   bfd_generic_stat_arch_elt
 extern bfd_boolean _bfd_archive_bsd_update_armap_timestamp
-  PARAMS ((bfd *));
+  (bfd *);
 
 /* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get COFF style
    archives.  Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff).  */
@@ -273,7 +271,7 @@ extern bfd_boolean _bfd_archive_bsd_update_armap_timestamp
 #define _bfd_archive_coff_slurp_extended_name_table \
   _bfd_slurp_extended_name_table
 extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
-  PARAMS ((bfd *, char **, bfd_size_type *, const char **));
+  (bfd *, char **, bfd_size_type *, const char **);
 #define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname
 #define _bfd_archive_coff_write_armap coff_write_armap
 #define _bfd_archive_coff_read_ar_hdr _bfd_generic_read_ar_hdr
@@ -289,49 +287,46 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
 
 #define _bfd_nosymbols_get_symtab_upper_bound _bfd_n1
 #define _bfd_nosymbols_get_symtab \
-  ((long (*) PARAMS ((bfd *, asymbol **))) _bfd_n1)
+  ((long (*) (bfd *, asymbol **)) _bfd_n1)
 #define _bfd_nosymbols_make_empty_symbol _bfd_generic_make_empty_symbol
 #define _bfd_nosymbols_print_symbol \
-  ((void (*) PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type))) bfd_void)
+  ((void (*) (bfd *, void *, asymbol *, bfd_print_symbol_type)) bfd_void)
 #define _bfd_nosymbols_get_symbol_info \
-  ((void (*) PARAMS ((bfd *, asymbol *, symbol_info *))) bfd_void)
+  ((void (*) (bfd *, asymbol *, symbol_info *)) bfd_void)
 #define _bfd_nosymbols_bfd_is_local_label_name \
-  ((bfd_boolean (*) PARAMS ((bfd *, const char *))) bfd_false)
+  ((bfd_boolean (*) (bfd *, const char *)) bfd_false)
 #define _bfd_nosymbols_get_lineno \
-  ((alent *(*) PARAMS ((bfd *, asymbol *))) bfd_nullvoidptr)
+  ((alent *(*) (bfd *, asymbol *)) bfd_nullvoidptr)
 #define _bfd_nosymbols_find_nearest_line \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **, \
-            const char **, unsigned int *))) \
+  ((bfd_boolean (*) (bfd *, asection *, asymbol **, bfd_vma, const char **, \
+                    const char **, unsigned int *)) \
    bfd_false)
 #define _bfd_nosymbols_bfd_make_debug_symbol \
-  ((asymbol *(*) PARAMS ((bfd *, PTR, unsigned long))) bfd_nullvoidptr)
+  ((asymbol *(*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
 #define _bfd_nosymbols_read_minisymbols \
-  ((long (*) PARAMS ((bfd *, bfd_boolean, PTR *, unsigned int *))) _bfd_n1)
+  ((long (*) (bfd *, bfd_boolean, void **, unsigned int *)) _bfd_n1)
 #define _bfd_nosymbols_minisymbol_to_symbol \
-  ((asymbol *(*) PARAMS ((bfd *, bfd_boolean, const PTR, asymbol *))) \
+  ((asymbol *(*) (bfd *, bfd_boolean, const void *, asymbol *)) \
    bfd_nullvoidptr)
 
 /* Routines to use for BFD_JUMP_TABLE_RELOCS when there is no reloc
    support.  Use BFD_JUMP_TABLE_RELOCS (_bfd_norelocs).  */
 
 #define _bfd_norelocs_get_reloc_upper_bound \
-  ((long (*) PARAMS ((bfd *, asection *))) _bfd_n1)
+  ((long (*) (bfd *, asection *)) _bfd_n1)
 #define _bfd_norelocs_canonicalize_reloc \
-  ((long (*) PARAMS ((bfd *, asection *, arelent **, asymbol **))) _bfd_n1)
+  ((long (*) (bfd *, asection *, arelent **, asymbol **)) _bfd_n1)
 #define _bfd_norelocs_bfd_reloc_type_lookup \
-  ((reloc_howto_type *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) \
-   bfd_nullvoidptr)
+  ((reloc_howto_type *(*) (bfd *, bfd_reloc_code_real_type)) bfd_nullvoidptr)
 
 /* Routines to use for BFD_JUMP_TABLE_WRITE for targets which may not
    be written.  Use BFD_JUMP_TABLE_WRITE (_bfd_nowrite).  */
 
 #define _bfd_nowrite_set_arch_mach \
-  ((bfd_boolean (*) PARAMS ((bfd *, enum bfd_architecture, unsigned long))) \
+  ((bfd_boolean (*) (bfd *, enum bfd_architecture, unsigned long)) \
    bfd_false)
 #define _bfd_nowrite_set_section_contents \
-  ((bfd_boolean (*) \
-   PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type))) \
+  ((bfd_boolean (*) (bfd *, asection *, void *, file_ptr, bfd_size_type)) \
    bfd_false)
 
 /* Generic routines to use for BFD_JUMP_TABLE_WRITE.  Use
@@ -339,45 +334,41 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
 
 #define _bfd_generic_set_arch_mach bfd_default_set_arch_mach
 extern bfd_boolean _bfd_generic_set_section_contents
-  PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+  (bfd *, asection *, void *, file_ptr, bfd_size_type);
 
 /* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not
    support linking.  Use BFD_JUMP_TABLE_LINK (_bfd_nolink).  */
 
-#define _bfd_nolink_sizeof_headers ((int (*) PARAMS ((bfd *, bfd_boolean))) bfd_0)
+#define _bfd_nolink_sizeof_headers ((int (*) (bfd *, bfd_boolean)) bfd_0)
 #define _bfd_nolink_bfd_get_relocated_section_contents \
-  ((bfd_byte *(*) \
-    PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, \
-            bfd_byte *, bfd_boolean, asymbol **))) \
+  ((bfd_byte *(*) (bfd *, struct bfd_link_info *, struct bfd_link_order *, \
+                  bfd_byte *, bfd_boolean, asymbol **)) \
    bfd_nullvoidptr)
 #define _bfd_nolink_bfd_relax_section \
   ((bfd_boolean (*) \
-    PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *))) \
+    (bfd *, asection *, struct bfd_link_info *, bfd_boolean *)) \
    bfd_false)
 #define _bfd_nolink_bfd_gc_sections \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, struct bfd_link_info *))) \
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
    bfd_false)
 #define _bfd_nolink_bfd_merge_sections \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, struct bfd_link_info *))) \
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
    bfd_false)
 #define _bfd_nolink_bfd_discard_group \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, struct sec *))) \
+  ((bfd_boolean (*) (bfd *, struct sec *)) \
    bfd_false)
 #define _bfd_nolink_bfd_link_hash_table_create \
-  ((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
+  ((struct bfd_link_hash_table *(*) (bfd *)) bfd_nullvoidptr)
 #define _bfd_nolink_bfd_link_hash_table_free \
-  ((void (*) PARAMS ((struct bfd_link_hash_table *))) bfd_void)
+  ((void (*) (struct bfd_link_hash_table *)) bfd_void)
 #define _bfd_nolink_bfd_link_add_symbols \
-  ((bfd_boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
 #define _bfd_nolink_bfd_link_just_syms \
-  ((void (*) PARAMS ((asection *, struct bfd_link_info *))) bfd_void)
+  ((void (*) (asection *, struct bfd_link_info *)) bfd_void)
 #define _bfd_nolink_bfd_final_link \
-  ((bfd_boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
 #define _bfd_nolink_bfd_link_split_section \
-  ((bfd_boolean (*) PARAMS ((bfd *, struct sec *))) bfd_false)
+  ((bfd_boolean (*) (bfd *, struct sec *)) bfd_false)
 
 /* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
    have dynamic symbols or relocs.  Use BFD_JUMP_TABLE_DYNAMIC
@@ -385,195 +376,189 @@ extern bfd_boolean _bfd_generic_set_section_contents
 
 #define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_n1
 #define _bfd_nodynamic_canonicalize_dynamic_symtab \
-  ((long (*) PARAMS ((bfd *, asymbol **))) _bfd_n1)
+  ((long (*) (bfd *, asymbol **)) _bfd_n1)
 #define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_n1
 #define _bfd_nodynamic_canonicalize_dynamic_reloc \
-  ((long (*) PARAMS ((bfd *, arelent **, asymbol **))) _bfd_n1)
+  ((long (*) (bfd *, arelent **, asymbol **)) _bfd_n1)
 \f
 /* Generic routine to determine of the given symbol is a local
    label.  */
 extern bfd_boolean bfd_generic_is_local_label_name
-  PARAMS ((bfd *, const char *));
+  (bfd *, const char *);
 
 /* Generic minisymbol routines.  */
 extern long _bfd_generic_read_minisymbols
-  PARAMS ((bfd *, bfd_boolean, PTR *, unsigned int *));
+  (bfd *, bfd_boolean, void **, unsigned int *);
 extern asymbol *_bfd_generic_minisymbol_to_symbol
-  PARAMS ((bfd *, bfd_boolean, const PTR, asymbol *));
+  (bfd *, bfd_boolean, const void *, asymbol *);
 
 /* Find the nearest line using .stab/.stabstr sections.  */
 extern bfd_boolean _bfd_stab_section_find_nearest_line
-  PARAMS ((bfd *, asymbol **, asection *, bfd_vma, bfd_boolean *,
-          const char **, const char **, unsigned int *, PTR *));
+  (bfd *, asymbol **, asection *, bfd_vma, bfd_boolean *,
+   const char **, const char **, unsigned int *, void **);
 
 /* Find the neaderst line using DWARF 1 debugging information.  */
 extern bfd_boolean _bfd_dwarf1_find_nearest_line
-  PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
-          const char **, unsigned int *));
+  (bfd *, asection *, asymbol **, bfd_vma, const char **,
+   const char **, unsigned int *);
 
 /* Find the nearest line using DWARF 2 debugging information.  */
 extern bfd_boolean _bfd_dwarf2_find_nearest_line
-  PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
-          const char **, unsigned int *, unsigned int,
-          PTR *));
+  (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
+   unsigned int *, unsigned int, void **);
 
 /* Create a new section entry.  */
 extern struct bfd_hash_entry *bfd_section_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+  (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
 
 /* A routine to create entries for a bfd_link_hash_table.  */
 extern struct bfd_hash_entry *_bfd_link_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *entry,
-          struct bfd_hash_table *table,
-          const char *string));
+  (struct bfd_hash_entry *entry, struct bfd_hash_table *table,
+   const char *string);
 
 /* Initialize a bfd_link_hash_table.  */
 extern bfd_boolean _bfd_link_hash_table_init
-  PARAMS ((struct bfd_link_hash_table *, bfd *,
-          struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
-                                      struct bfd_hash_table *,
-                                      const char *)));
+  (struct bfd_link_hash_table *, bfd *,
+   struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+                              struct bfd_hash_table *,
+                              const char *));
 
 /* Generic link hash table creation routine.  */
 extern struct bfd_link_hash_table *_bfd_generic_link_hash_table_create
-  PARAMS ((bfd *));
+  (bfd *);
 
 /* Generic link hash table destruction routine.  */
 extern void _bfd_generic_link_hash_table_free
-  PARAMS ((struct bfd_link_hash_table *));
+  (struct bfd_link_hash_table *);
 
 /* Generic add symbol routine.  */
 extern bfd_boolean _bfd_generic_link_add_symbols
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* Generic add symbol routine.  This version is used by targets for
    which the linker must collect constructors and destructors by name,
    as the collect2 program does.  */
 extern bfd_boolean _bfd_generic_link_add_symbols_collect
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* Generic archive add symbol routine.  */
 extern bfd_boolean _bfd_generic_link_add_archive_symbols
-  PARAMS ((bfd *, struct bfd_link_info *,
-          bfd_boolean (*) (bfd *, struct bfd_link_info *, bfd_boolean *)));
+  (bfd *, struct bfd_link_info *,
+   bfd_boolean (*) (bfd *, struct bfd_link_info *, bfd_boolean *));
 
 /* Forward declaration to avoid prototype errors.  */
 typedef struct bfd_link_hash_entry _bfd_link_hash_entry;
 
 /* Generic routine to add a single symbol.  */
 extern bfd_boolean _bfd_generic_link_add_one_symbol
-  PARAMS ((struct bfd_link_info *, bfd *, const char *name, flagword,
-          asection *, bfd_vma, const char *, bfd_boolean copy,
-          bfd_boolean constructor, struct bfd_link_hash_entry **));
+  (struct bfd_link_info *, bfd *, const char *name, flagword,
+   asection *, bfd_vma, const char *, bfd_boolean copy,
+   bfd_boolean constructor, struct bfd_link_hash_entry **);
 
 /* Generic routine to mark section as supplying symbols only.  */
 extern void _bfd_generic_link_just_syms
-  PARAMS ((asection *, struct bfd_link_info *));
+  (asection *, struct bfd_link_info *);
 
 /* Generic link routine.  */
 extern bfd_boolean _bfd_generic_final_link
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 extern bfd_boolean _bfd_generic_link_split_section
-  PARAMS ((bfd *, struct sec *));
+  (bfd *, struct sec *);
 
 /* Generic reloc_link_order processing routine.  */
 extern bfd_boolean _bfd_generic_reloc_link_order
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          struct bfd_link_order *));
+  (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
 
 /* Default link order processing routine.  */
 extern bfd_boolean _bfd_default_link_order
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          struct bfd_link_order *));
+  (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
 
 /* Count the number of reloc entries in a link order list.  */
 extern unsigned int _bfd_count_link_order_relocs
-  PARAMS ((struct bfd_link_order *));
+  (struct bfd_link_order *);
 
 /* Final link relocation routine.  */
 extern bfd_reloc_status_type _bfd_final_link_relocate
-  PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
-          bfd_vma, bfd_vma, bfd_vma));
+  (reloc_howto_type *, bfd *, asection *, bfd_byte *,
+   bfd_vma, bfd_vma, bfd_vma);
 
 /* Relocate a particular location by a howto and a value.  */
 extern bfd_reloc_status_type _bfd_relocate_contents
-  PARAMS ((reloc_howto_type *, bfd *, bfd_vma, bfd_byte *));
+  (reloc_howto_type *, bfd *, bfd_vma, bfd_byte *);
 
 /* Link stabs in sections in the first pass.  */
 
 extern bfd_boolean _bfd_link_section_stabs
-  PARAMS ((bfd *, PTR *, asection *, asection *, PTR *));
+  (bfd *, void **, asection *, asection *, void **);
 
 /* Eliminate stabs for discarded functions and symbols.  */
 extern bfd_boolean _bfd_discard_section_stabs
-  PARAMS ((bfd *, asection *, PTR,
-          bfd_boolean (*) (bfd_vma, PTR), PTR));
+  (bfd *, asection *, void *, bfd_boolean (*) (bfd_vma, void *), void *);
 
 /* Write out the .stab section when linking stabs in sections.  */
 
 extern bfd_boolean _bfd_write_section_stabs
-  PARAMS ((bfd *, PTR *, asection *, PTR *, bfd_byte *));
+  (bfd *, void **, asection *, void **, bfd_byte *);
 
 /* Write out the .stabstr string table when linking stabs in sections.  */
 
 extern bfd_boolean _bfd_write_stab_strings
-  PARAMS ((bfd *, PTR *));
+  (bfd *, void **);
 
 /* Find an offset within a .stab section when linking stabs in
    sections.  */
 
 extern bfd_vma _bfd_stab_section_offset
-  PARAMS ((bfd *, PTR *, asection *, PTR *, bfd_vma));
+  (bfd *, void **, asection *, void **, bfd_vma);
 
 /* Attempt to merge a SEC_MERGE section.  */
 
 extern bfd_boolean _bfd_merge_section
-  PARAMS ((bfd *, PTR *, asection *, PTR *));
+  (bfd *, void **, asection *, void **);
 
 /* Attempt to merge SEC_MERGE sections.  */
 
 extern bfd_boolean _bfd_merge_sections
-  PARAMS ((bfd *, PTR, void (*)(bfd *, asection *)));
+  (bfd *, void *, void (*) (bfd *, asection *));
 
 /* Write out a merged section.  */
 
 extern bfd_boolean _bfd_write_merged_section
-  PARAMS ((bfd *, asection *, PTR));
+  (bfd *, asection *, void *);
 
 /* Find an offset within a modified SEC_MERGE section.  */
 
 extern bfd_vma _bfd_merged_section_offset
-  PARAMS ((bfd *, asection **, PTR, bfd_vma, bfd_vma));
+  (bfd *, asection **, void *, bfd_vma, bfd_vma);
 
 /* Create a string table.  */
 extern struct bfd_strtab_hash *_bfd_stringtab_init
-  PARAMS ((void));
+  (void);
 
 /* Create an XCOFF .debug section style string table.  */
 extern struct bfd_strtab_hash *_bfd_xcoff_stringtab_init
-  PARAMS ((void));
+  (void);
 
 /* Free a string table.  */
 extern void _bfd_stringtab_free
-  PARAMS ((struct bfd_strtab_hash *));
+  (struct bfd_strtab_hash *);
 
 /* Get the size of a string table.  */
 extern bfd_size_type _bfd_stringtab_size
-  PARAMS ((struct bfd_strtab_hash *));
+  (struct bfd_strtab_hash *);
 
 /* Add a string to a string table.  */
 extern bfd_size_type _bfd_stringtab_add
-  PARAMS ((struct bfd_strtab_hash *, const char *, bfd_boolean hash,
-          bfd_boolean copy));
+  (struct bfd_strtab_hash *, const char *, bfd_boolean hash, bfd_boolean copy);
 
 /* Write out a string table.  */
 extern bfd_boolean _bfd_stringtab_emit
-  PARAMS ((bfd *, struct bfd_strtab_hash *));
+  (bfd *, struct bfd_strtab_hash *);
 
 /* Check that endianness of input and output file match.  */
 extern bfd_boolean _bfd_generic_verify_endian_match
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 \f
 /* Macros to tell if bfds are read or write enabled.
 
@@ -584,20 +569,22 @@ extern bfd_boolean _bfd_generic_verify_endian_match
    !bfd_read_p, and only sometimes bfd_write_p.
 */
 
-#define        bfd_read_p(abfd) ((abfd)->direction == read_direction || (abfd)->direction == both_direction)
-#define        bfd_write_p(abfd) ((abfd)->direction == write_direction || (abfd)->direction == both_direction)
+#define        bfd_read_p(abfd) \
+  ((abfd)->direction == read_direction || (abfd)->direction == both_direction)
+#define        bfd_write_p(abfd) \
+  ((abfd)->direction == write_direction || (abfd)->direction == both_direction)
 
 void bfd_assert
-  PARAMS ((const char*,int));
+  (const char*,int);
 
 #define BFD_ASSERT(x) \
-{ if (!(x)) bfd_assert(__FILE__,__LINE__); }
+  { if (!(x)) bfd_assert(__FILE__,__LINE__); }
 
 #define BFD_FAIL() \
-{ bfd_assert(__FILE__,__LINE__); }
+  { bfd_assert(__FILE__,__LINE__); }
 
 extern void _bfd_abort
-  PARAMS ((const char *, int, const char *)) ATTRIBUTE_NORETURN;
+  (const char *, int, const char *) ATTRIBUTE_NORETURN;
 
 /* if gcc >= 2.6, we can give a function name, too */
 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
@@ -608,7 +595,7 @@ extern void _bfd_abort
 #define abort() _bfd_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
 
 FILE * bfd_cache_lookup_worker
-  PARAMS ((bfd *));
+  (bfd *);
 
 extern bfd *bfd_last_cache;
 
@@ -628,26 +615,27 @@ struct ecoff_find_line;
 #endif
 
 extern bfd_boolean _bfd_ecoff_locate_line
-  PARAMS ((bfd *, asection *, bfd_vma, struct ecoff_debug_info * const,
-          const struct ecoff_debug_swap * const, struct ecoff_find_line *,
-          const char **, const char **, unsigned int *));
+  (bfd *, asection *, bfd_vma, struct ecoff_debug_info * const,
+   const struct ecoff_debug_swap * const, struct ecoff_find_line *,
+   const char **, const char **, unsigned int *);
 extern bfd_boolean _bfd_ecoff_get_accumulated_pdr
-  PARAMS ((PTR, bfd_byte *));
+  (void *, bfd_byte *);
 extern bfd_boolean _bfd_ecoff_get_accumulated_sym
-  PARAMS ((PTR, bfd_byte *));
+  (void *, bfd_byte *);
 extern bfd_boolean _bfd_ecoff_get_accumulated_ss
-  PARAMS ((PTR, bfd_byte *));
+  (void *, bfd_byte *);
 
 extern bfd_vma _bfd_get_gp_value
-  PARAMS ((bfd *));
+  (bfd *);
 extern void _bfd_set_gp_value
-  PARAMS ((bfd *, bfd_vma));
+  (bfd *, bfd_vma);
 
 /* Function shared by the COFF and ELF SH backends, which have no
    other common header files.  */
 
+#ifndef _bfd_sh_align_load_span
 extern bfd_boolean _bfd_sh_align_load_span
-  PARAMS ((bfd *, asection *, bfd_byte *,
-          bfd_boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma),
-          PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *));
-
+  (bfd *, asection *, bfd_byte *,
+   bfd_boolean (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma),
+   void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *);
+#endif
index da93831e6db526e10daa1a4969db311e6c755868..50bd21551e30d6225df26789a4c28d7d285cb272 100644 (file)
@@ -1,6 +1,6 @@
 /* Assorted BFD support routines, only used internally.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002
+   2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -42,8 +42,7 @@ DESCRIPTION
    operations.  */
 
 bfd_boolean
-bfd_false (ignore)
-     bfd *ignore ATTRIBUTE_UNUSED;
+bfd_false (bfd *ignore ATTRIBUTE_UNUSED)
 {
   bfd_set_error (bfd_error_invalid_operation);
   return FALSE;
@@ -53,8 +52,7 @@ bfd_false (ignore)
    which do not actually do anything.  */
 
 bfd_boolean
-bfd_true (ignore)
-     bfd *ignore ATTRIBUTE_UNUSED;
+bfd_true (bfd *ignore ATTRIBUTE_UNUSED)
 {
   return TRUE;
 }
@@ -62,31 +60,27 @@ bfd_true (ignore)
 /* A routine which is used in target vectors for unsupported
    operations which return a pointer value.  */
 
-PTR
-bfd_nullvoidptr (ignore)
-     bfd *ignore ATTRIBUTE_UNUSED;
+void *
+bfd_nullvoidptr (bfd *ignore ATTRIBUTE_UNUSED)
 {
   bfd_set_error (bfd_error_invalid_operation);
   return NULL;
 }
 
 int
-bfd_0 (ignore)
-     bfd *ignore ATTRIBUTE_UNUSED;
+bfd_0 (bfd *ignore ATTRIBUTE_UNUSED)
 {
   return 0;
 }
 
 unsigned int
-bfd_0u (ignore)
-     bfd *ignore ATTRIBUTE_UNUSED;
+bfd_0u (bfd *ignore ATTRIBUTE_UNUSED)
 {
    return 0;
 }
 
 long
-bfd_0l (ignore)
-     bfd *ignore ATTRIBUTE_UNUSED;
+bfd_0l (bfd *ignore ATTRIBUTE_UNUSED)
 {
   return 0;
 }
@@ -95,23 +89,21 @@ bfd_0l (ignore)
    operations which return -1 on error.  */
 
 long
-_bfd_n1 (ignore_abfd)
-     bfd *ignore_abfd ATTRIBUTE_UNUSED;
+_bfd_n1 (bfd *ignore_abfd ATTRIBUTE_UNUSED)
 {
   bfd_set_error (bfd_error_invalid_operation);
   return -1;
 }
 
 void
-bfd_void (ignore)
-     bfd *ignore ATTRIBUTE_UNUSED;
+bfd_void (bfd *ignore ATTRIBUTE_UNUSED)
 {
 }
 
 bfd_boolean
-_bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
-     bfd *ignore_core_bfd ATTRIBUTE_UNUSED;
-     bfd *ignore_exec_bfd ATTRIBUTE_UNUSED;
+_bfd_nocore_core_file_matches_executable_p
+  (bfd *ignore_core_bfd ATTRIBUTE_UNUSED,
+   bfd *ignore_exec_bfd ATTRIBUTE_UNUSED)
 {
   bfd_set_error (bfd_error_invalid_operation);
   return FALSE;
@@ -121,27 +113,24 @@ _bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd)
    without core file support.  */
 
 char *
-_bfd_nocore_core_file_failing_command (ignore_abfd)
-     bfd *ignore_abfd ATTRIBUTE_UNUSED;
+_bfd_nocore_core_file_failing_command (bfd *ignore_abfd ATTRIBUTE_UNUSED)
 {
   bfd_set_error (bfd_error_invalid_operation);
-  return (char *)NULL;
+  return NULL;
 }
 
 /* Routine to handle core_file_failing_signal entry point for targets
    without core file support.  */
 
 int
-_bfd_nocore_core_file_failing_signal (ignore_abfd)
-     bfd *ignore_abfd ATTRIBUTE_UNUSED;
+_bfd_nocore_core_file_failing_signal (bfd *ignore_abfd ATTRIBUTE_UNUSED)
 {
   bfd_set_error (bfd_error_invalid_operation);
   return 0;
 }
 
 const bfd_target *
-_bfd_dummy_target (ignore_abfd)
-     bfd *ignore_abfd ATTRIBUTE_UNUSED;
+_bfd_dummy_target (bfd *ignore_abfd ATTRIBUTE_UNUSED)
 {
   bfd_set_error (bfd_error_wrong_format);
   return 0;
@@ -149,11 +138,10 @@ _bfd_dummy_target (ignore_abfd)
 \f
 /* Allocate memory using malloc.  */
 
-PTR
-bfd_malloc (size)
-     bfd_size_type size;
+void *
+bfd_malloc (bfd_size_type size)
 {
-  PTR ptr;
+  void *ptr;
 
   if (size != (size_t) size)
     {
@@ -161,7 +149,7 @@ bfd_malloc (size)
       return NULL;
     }
 
-  ptr = (PTR) malloc ((size_t) size);
+  ptr = malloc ((size_t) size);
   if (ptr == NULL && (size_t) size != 0)
     bfd_set_error (bfd_error_no_memory);
 
@@ -170,12 +158,10 @@ bfd_malloc (size)
 
 /* Reallocate memory using realloc.  */
 
-PTR
-bfd_realloc (ptr, size)
-     PTR ptr;
-     bfd_size_type size;
+void *
+bfd_realloc (void *ptr, bfd_size_type size)
 {
-  PTR ret;
+  void *ret;
 
   if (size != (size_t) size)
     {
@@ -184,9 +170,9 @@ bfd_realloc (ptr, size)
     }
 
   if (ptr == NULL)
-    ret = (PTR) malloc ((size_t) size);
+    ret = malloc ((size_t) size);
   else
-    ret = (PTR) realloc (ptr, (size_t) size);
+    ret = realloc (ptr, (size_t) size);
 
   if (ret == NULL && (size_t) size != 0)
     bfd_set_error (bfd_error_no_memory);
@@ -196,11 +182,10 @@ bfd_realloc (ptr, size)
 
 /* Allocate memory using malloc and clear it.  */
 
-PTR
-bfd_zmalloc (size)
-     bfd_size_type size;
+void *
+bfd_zmalloc (bfd_size_type size)
 {
-  PTR ptr;
+  void *ptr;
 
   if (size != (size_t) size)
     {
@@ -208,7 +193,7 @@ bfd_zmalloc (size)
       return NULL;
     }
 
-  ptr = (PTR) malloc ((size_t) size);
+  ptr = malloc ((size_t) size);
 
   if ((size_t) size != 0)
     {
@@ -234,13 +219,11 @@ DESCRIPTION
 
 */
 bfd_boolean
-bfd_write_bigendian_4byte_int (abfd, i)
-     bfd *abfd;
-     unsigned int i;
+bfd_write_bigendian_4byte_int (bfd *abfd, unsigned int i)
 {
   bfd_byte buffer[4];
   bfd_putb32 ((bfd_vma) i, buffer);
-  return bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) == 4;
+  return bfd_bwrite (buffer, (bfd_size_type) 4, abfd) == 4;
 }
 
 \f
@@ -283,54 +266,54 @@ DESCRIPTION
 .{* Byte swapping macros for user section data.  *}
 .
 .#define bfd_put_8(abfd, val, ptr) \
-.                ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val)))
+.  ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val)))
 .#define bfd_put_signed_8 \
-.              bfd_put_8
+.  bfd_put_8
 .#define bfd_get_8(abfd, ptr) \
-.                (*(unsigned char *) (ptr) & 0xff)
+.  (*(unsigned char *) (ptr) & 0xff)
 .#define bfd_get_signed_8(abfd, ptr) \
-.              (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
+.  (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
 .
 .#define bfd_put_16(abfd, val, ptr) \
-.                BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
+.  BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
 .#define bfd_put_signed_16 \
-.               bfd_put_16
+.  bfd_put_16
 .#define bfd_get_16(abfd, ptr) \
-.                BFD_SEND(abfd, bfd_getx16, (ptr))
+.  BFD_SEND (abfd, bfd_getx16, (ptr))
 .#define bfd_get_signed_16(abfd, ptr) \
-.               BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
+.  BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
 .
 .#define bfd_put_32(abfd, val, ptr) \
-.                BFD_SEND(abfd, bfd_putx32, ((val),(ptr)))
+.  BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
 .#define bfd_put_signed_32 \
-.               bfd_put_32
+.  bfd_put_32
 .#define bfd_get_32(abfd, ptr) \
-.                BFD_SEND(abfd, bfd_getx32, (ptr))
+.  BFD_SEND (abfd, bfd_getx32, (ptr))
 .#define bfd_get_signed_32(abfd, ptr) \
-.               BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
+.  BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
 .
 .#define bfd_put_64(abfd, val, ptr) \
-.                BFD_SEND(abfd, bfd_putx64, ((val), (ptr)))
+.  BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
 .#define bfd_put_signed_64 \
-.               bfd_put_64
+.  bfd_put_64
 .#define bfd_get_64(abfd, ptr) \
-.                BFD_SEND(abfd, bfd_getx64, (ptr))
+.  BFD_SEND (abfd, bfd_getx64, (ptr))
 .#define bfd_get_signed_64(abfd, ptr) \
-.               BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
+.  BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
 .
-.#define bfd_get(bits, abfd, ptr)                              \
-.                ( (bits) ==  8 ? (bfd_vma) bfd_get_8 (abfd, ptr)      \
-.               : (bits) == 16 ? bfd_get_16 (abfd, ptr)        \
-.               : (bits) == 32 ? bfd_get_32 (abfd, ptr)        \
-.               : (bits) == 64 ? bfd_get_64 (abfd, ptr)        \
-.               : (abort (), (bfd_vma) - 1))
+.#define bfd_get(bits, abfd, ptr)                      \
+.  ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr)      \
+.   : (bits) == 16 ? bfd_get_16 (abfd, ptr)            \
+.   : (bits) == 32 ? bfd_get_32 (abfd, ptr)            \
+.   : (bits) == 64 ? bfd_get_64 (abfd, ptr)            \
+.   : (abort (), (bfd_vma) - 1))
 .
-.#define bfd_put(bits, abfd, val, ptr)                         \
-.                ( (bits) ==  8 ? bfd_put_8  (abfd, val, ptr)  \
-.               : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)   \
-.               : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)   \
-.               : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)   \
-.               : (abort (), (void) 0))
+.#define bfd_put(bits, abfd, val, ptr)                 \
+.  ((bits) == 8 ? bfd_put_8  (abfd, val, ptr)          \
+.   : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)               \
+.   : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)               \
+.   : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)               \
+.   : (abort (), (void) 0))
 .
 */
 
@@ -435,61 +418,51 @@ DESCRIPTION
 
 /* Sign extension to bfd_signed_vma.  */
 #define COERCE16(x) (((bfd_signed_vma) (x) ^ 0x8000) - 0x8000)
-#define COERCE32(x) \
-  ((bfd_signed_vma) (long) (((unsigned long) (x) ^ 0x80000000) - 0x80000000))
-#define EIGHT_GAZILLION (((BFD_HOST_64_BIT)0x80000000) << 32)
+#define COERCE32(x) (((bfd_signed_vma) (x) ^ 0x80000000) - 0x80000000)
+#define EIGHT_GAZILLION ((BFD_HOST_64_BIT) 1 << 63)
 #define COERCE64(x) \
   (((bfd_signed_vma) (x) ^ EIGHT_GAZILLION) - EIGHT_GAZILLION)
 
 bfd_vma
-bfd_getb16 (addr)
-     register const bfd_byte *addr;
+bfd_getb16 (const bfd_byte *addr)
 {
   return (addr[0] << 8) | addr[1];
 }
 
 bfd_vma
-bfd_getl16 (addr)
-     register const bfd_byte *addr;
+bfd_getl16 (const bfd_byte *addr)
 {
   return (addr[1] << 8) | addr[0];
 }
 
 bfd_signed_vma
-bfd_getb_signed_16 (addr)
-     register const bfd_byte *addr;
+bfd_getb_signed_16 (const bfd_byte *addr)
 {
-  return COERCE16((addr[0] << 8) | addr[1]);
+  return COERCE16 ((addr[0] << 8) | addr[1]);
 }
 
 bfd_signed_vma
-bfd_getl_signed_16 (addr)
-     register const bfd_byte *addr;
+bfd_getl_signed_16 (const bfd_byte *addr)
 {
-  return COERCE16((addr[1] << 8) | addr[0]);
+  return COERCE16 ((addr[1] << 8) | addr[0]);
 }
 
 void
-bfd_putb16 (data, addr)
-     bfd_vma data;
-     register bfd_byte *addr;
+bfd_putb16 (bfd_vma data, bfd_byte *addr)
 {
   addr[0] = (bfd_byte) (data >> 8);
   addr[1] = (bfd_byte) data;
 }
 
 void
-bfd_putl16 (data, addr)
-     bfd_vma data;
-     register bfd_byte *addr;
+bfd_putl16 (bfd_vma data, bfd_byte *addr)
 {
   addr[0] = (bfd_byte) data;
   addr[1] = (bfd_byte) (data >> 8);
 }
 
 bfd_vma
-bfd_getb32 (addr)
-     register const bfd_byte *addr;
+bfd_getb32 (const bfd_byte *addr)
 {
   unsigned long v;
 
@@ -497,12 +470,11 @@ bfd_getb32 (addr)
   v |= (unsigned long) addr[1] << 16;
   v |= (unsigned long) addr[2] << 8;
   v |= (unsigned long) addr[3];
-  return (bfd_vma) v;
+  return v;
 }
 
 bfd_vma
-bfd_getl32 (addr)
-     register const bfd_byte *addr;
+bfd_getl32 (const bfd_byte *addr)
 {
   unsigned long v;
 
@@ -510,12 +482,11 @@ bfd_getl32 (addr)
   v |= (unsigned long) addr[1] << 8;
   v |= (unsigned long) addr[2] << 16;
   v |= (unsigned long) addr[3] << 24;
-  return (bfd_vma) v;
+  return v;
 }
 
 bfd_signed_vma
-bfd_getb_signed_32 (addr)
-     register const bfd_byte *addr;
+bfd_getb_signed_32 (const bfd_byte *addr)
 {
   unsigned long v;
 
@@ -527,8 +498,7 @@ bfd_getb_signed_32 (addr)
 }
 
 bfd_signed_vma
-bfd_getl_signed_32 (addr)
-     register const bfd_byte *addr;
+bfd_getl_signed_32 (const bfd_byte *addr)
 {
   unsigned long v;
 
@@ -540,23 +510,21 @@ bfd_getl_signed_32 (addr)
 }
 
 bfd_vma
-bfd_getb64 (addr)
-     register const bfd_byte *addr ATTRIBUTE_UNUSED;
+bfd_getb64 (const bfd_byte *addr ATTRIBUTE_UNUSED)
 {
 #ifdef BFD64
-  bfd_vma low, high;
-
-  high= ((((((((addr[0]) << 8) |
-              addr[1]) << 8) |
-            addr[2]) << 8) |
-          addr[3]) );
-
-  low = (((((((((bfd_vma)addr[4]) << 8) |
-              addr[5]) << 8) |
-            addr[6]) << 8) |
-          addr[7]));
-
-  return high << 32 | low;
+  bfd_vma v;
+
+  v  = addr[0]; v <<= 8;
+  v |= addr[1]; v <<= 8;
+  v |= addr[2]; v <<= 8;
+  v |= addr[3]; v <<= 8;
+  v |= addr[4]; v <<= 8;
+  v |= addr[5]; v <<= 8;
+  v |= addr[6]; v <<= 8;
+  v |= addr[7];
+
+  return v;
 #else
   BFD_FAIL();
   return 0;
@@ -564,22 +532,21 @@ bfd_getb64 (addr)
 }
 
 bfd_vma
-bfd_getl64 (addr)
-     register const bfd_byte *addr ATTRIBUTE_UNUSED;
+bfd_getl64 (const bfd_byte *addr ATTRIBUTE_UNUSED)
 {
 #ifdef BFD64
-  bfd_vma low, high;
-  high= (((((((addr[7] << 8) |
-              addr[6]) << 8) |
-            addr[5]) << 8) |
-          addr[4]));
-
-  low = ((((((((bfd_vma)addr[3] << 8) |
-              addr[2]) << 8) |
-            addr[1]) << 8) |
-          addr[0]) );
-
-  return high << 32 | low;
+  bfd_vma v;
+
+  v  = addr[7]; v <<= 8;
+  v |= addr[6]; v <<= 8;
+  v |= addr[5]; v <<= 8;
+  v |= addr[4]; v <<= 8;
+  v |= addr[3]; v <<= 8;
+  v |= addr[2]; v <<= 8;
+  v |= addr[1]; v <<= 8;
+  v |= addr[0];
+
+  return v;
 #else
   BFD_FAIL();
   return 0;
@@ -592,19 +559,18 @@ bfd_getb_signed_64 (addr)
      register const bfd_byte *addr ATTRIBUTE_UNUSED;
 {
 #ifdef BFD64
-  bfd_vma low, high;
-
-  high= ((((((((addr[0]) << 8) |
-              addr[1]) << 8) |
-            addr[2]) << 8) |
-          addr[3]) );
-
-  low = (((((((((bfd_vma)addr[4]) << 8) |
-              addr[5]) << 8) |
-            addr[6]) << 8) |
-          addr[7]));
-
-  return COERCE64(high << 32 | low);
+  bfd_vma v;
+
+  v  = addr[0]; v <<= 8;
+  v |= addr[1]; v <<= 8;
+  v |= addr[2]; v <<= 8;
+  v |= addr[3]; v <<= 8;
+  v |= addr[4]; v <<= 8;
+  v |= addr[5]; v <<= 8;
+  v |= addr[6]; v <<= 8;
+  v |= addr[7];
+
+  return COERCE64 (v);
 #else
   BFD_FAIL();
   return 0;
@@ -616,18 +582,18 @@ bfd_getl_signed_64 (addr)
      register const bfd_byte *addr ATTRIBUTE_UNUSED;
 {
 #ifdef BFD64
-  bfd_vma low, high;
-  high= (((((((addr[7] << 8) |
-              addr[6]) << 8) |
-            addr[5]) << 8) |
-          addr[4]));
-
-  low = ((((((((bfd_vma)addr[3] << 8) |
-              addr[2]) << 8) |
-            addr[1]) << 8) |
-          addr[0]) );
-
-  return COERCE64(high << 32 | low);
+  bfd_vma v;
+
+  v  = addr[7]; v <<= 8;
+  v |= addr[6]; v <<= 8;
+  v |= addr[5]; v <<= 8;
+  v |= addr[4]; v <<= 8;
+  v |= addr[3]; v <<= 8;
+  v |= addr[2]; v <<= 8;
+  v |= addr[1]; v <<= 8;
+  v |= addr[0];
+
+  return COERCE64 (v);
 #else
   BFD_FAIL();
   return 0;
@@ -635,31 +601,25 @@ bfd_getl_signed_64 (addr)
 }
 
 void
-bfd_putb32 (data, addr)
-     bfd_vma data;
-     register bfd_byte *addr;
+bfd_putb32 (bfd_vma data, bfd_byte *addr)
 {
-        addr[0] = (bfd_byte) (data >> 24);
-        addr[1] = (bfd_byte) (data >> 16);
-        addr[2] = (bfd_byte) (data >>  8);
-        addr[3] = (bfd_byte) data;
+  addr[0] = (bfd_byte) (data >> 24);
+  addr[1] = (bfd_byte) (data >> 16);
+  addr[2] = (bfd_byte) (data >>  8);
+  addr[3] = (bfd_byte) data;
 }
 
 void
-bfd_putl32 (data, addr)
-     bfd_vma data;
-     register bfd_byte *addr;
+bfd_putl32 (bfd_vma data, bfd_byte *addr)
 {
-        addr[0] = (bfd_byte) data;
-        addr[1] = (bfd_byte) (data >>  8);
-        addr[2] = (bfd_byte) (data >> 16);
-        addr[3] = (bfd_byte) (data >> 24);
+  addr[0] = (bfd_byte) data;
+  addr[1] = (bfd_byte) (data >>  8);
+  addr[2] = (bfd_byte) (data >> 16);
+  addr[3] = (bfd_byte) (data >> 24);
 }
 
 void
-bfd_putb64 (data, addr)
-     bfd_vma data ATTRIBUTE_UNUSED;
-     register bfd_byte *addr ATTRIBUTE_UNUSED;
+bfd_putb64 (bfd_vma data ATTRIBUTE_UNUSED, bfd_byte *addr ATTRIBUTE_UNUSED)
 {
 #ifdef BFD64
   addr[0] = (bfd_byte) (data >> (7*8));
@@ -676,9 +636,7 @@ bfd_putb64 (data, addr)
 }
 
 void
-bfd_putl64 (data, addr)
-     bfd_vma data ATTRIBUTE_UNUSED;
-     register bfd_byte *addr ATTRIBUTE_UNUSED;
+bfd_putl64 (bfd_vma data ATTRIBUTE_UNUSED, bfd_byte *addr ATTRIBUTE_UNUSED)
 {
 #ifdef BFD64
   addr[7] = (bfd_byte) (data >> (7*8));
@@ -695,11 +653,7 @@ bfd_putl64 (data, addr)
 }
 
 void
-bfd_put_bits (data, addr, bits, big_p)
-     bfd_vma data;
-     bfd_byte *addr;
-     int bits;
-     bfd_boolean big_p;
+bfd_put_bits (bfd_vma data, bfd_byte *addr, int bits, bfd_boolean big_p)
 {
   int i;
   int bytes;
@@ -718,10 +672,7 @@ bfd_put_bits (data, addr, bits, big_p)
 }
 
 bfd_vma
-bfd_get_bits (addr, bits, big_p)
-     bfd_byte *addr;
-     int bits;
-     bfd_boolean big_p;
+bfd_get_bits (bfd_byte *addr, int bits, bfd_boolean big_p)
 {
   bfd_vma data;
   int i;
@@ -745,12 +696,11 @@ bfd_get_bits (addr, bits, big_p)
 /* Default implementation */
 
 bfd_boolean
-_bfd_generic_get_section_contents (abfd, section, location, offset, count)
-     bfd *abfd;
-     sec_ptr section;
-     PTR location;
-     file_ptr offset;
-     bfd_size_type count;
+_bfd_generic_get_section_contents (bfd *abfd,
+                                  sec_ptr section,
+                                  void *location,
+                                  file_ptr offset,
+                                  bfd_size_type count)
 {
   if (count == 0)
     return TRUE;
@@ -769,17 +719,18 @@ _bfd_generic_get_section_contents (abfd, section, location, offset, count)
 }
 
 bfd_boolean
-_bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     sec_ptr section ATTRIBUTE_UNUSED;
-     bfd_window *w ATTRIBUTE_UNUSED;
-     file_ptr offset ATTRIBUTE_UNUSED;
-     bfd_size_type count ATTRIBUTE_UNUSED;
+_bfd_generic_get_section_contents_in_window
+  (bfd *abfd ATTRIBUTE_UNUSED,
+   sec_ptr section ATTRIBUTE_UNUSED,
+   bfd_window *w ATTRIBUTE_UNUSED,
+   file_ptr offset ATTRIBUTE_UNUSED,
+   bfd_size_type count ATTRIBUTE_UNUSED)
 {
 #ifdef USE_MMAP
   if (count == 0)
     return TRUE;
-  if (abfd->xvec->_bfd_get_section_contents != _bfd_generic_get_section_contents)
+  if (abfd->xvec->_bfd_get_section_contents
+      != _bfd_generic_get_section_contents)
     {
       /* We don't know what changes the bfd's get_section_contents
         method may have to make.  So punt trying to map the file
@@ -787,11 +738,10 @@ _bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count)
       /* @@ FIXME : If the internal window has a refcount of 1 and was
         allocated with malloc instead of mmap, just reuse it.  */
       bfd_free_window (w);
-      w->i = ((bfd_window_internal *)
-             bfd_zmalloc ((bfd_size_type) sizeof (bfd_window_internal)));
+      w->i = bfd_zmalloc (sizeof (bfd_window_internal));
       if (w->i == NULL)
        return FALSE;
-      w->i->data = (PTR) bfd_malloc (count);
+      w->i->data = bfd_malloc (count);
       if (w->i->data == NULL)
        {
          free (w->i);
@@ -819,12 +769,11 @@ _bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count)
    in read-write files, though.  See other set_section_contents functions
    to see why it doesn't work for new sections.  */
 bfd_boolean
-_bfd_generic_set_section_contents (abfd, section, location, offset, count)
-     bfd *abfd;
-     sec_ptr section;
-     PTR location;
-     file_ptr offset;
-     bfd_size_type count;
+_bfd_generic_set_section_contents (bfd *abfd,
+                                  sec_ptr section,
+                                  void *location,
+                                  file_ptr offset,
+                                  bfd_size_type count)
 {
   if (count == 0)
     return TRUE;
@@ -849,8 +798,7 @@ DESCRIPTION
 */
 
 unsigned int
-bfd_log2 (x)
-     bfd_vma x;
+bfd_log2 (bfd_vma x)
 {
   unsigned int result = 0;
 
@@ -860,9 +808,7 @@ bfd_log2 (x)
 }
 
 bfd_boolean
-bfd_generic_is_local_label_name (abfd, name)
-     bfd *abfd;
-     const char *name;
+bfd_generic_is_local_label_name (bfd *abfd, const char *name)
 {
   char locals_prefix = (bfd_get_symbol_leading_char (abfd) == '_') ? 'L' : '.';
 
@@ -873,9 +819,7 @@ bfd_generic_is_local_label_name (abfd, name)
     endianness matches between input and output file.  Returns
     TRUE for a match, otherwise returns FALSE and emits an error.  */
 bfd_boolean
-_bfd_generic_verify_endian_match (ibfd, obfd)
-     bfd *ibfd;
-     bfd *obfd;
+_bfd_generic_verify_endian_match (bfd *ibfd, bfd *obfd)
 {
   if (ibfd->xvec->byteorder != obfd->xvec->byteorder
       && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
@@ -901,11 +845,10 @@ _bfd_generic_verify_endian_match (ibfd, obfd)
    old routines.  */
 
 void
-warn_deprecated (what, file, line, func)
-     const char *what;
-     const char *file;
-     int line;
-     const char *func;
+warn_deprecated (const char *what,
+                const char *file,
+                int line,
+                const char *func)
 {
   /* Poor man's tracking of functions we've already warned about.  */
   static size_t mask = 0;
index 46695e766ad4716dea7d5b506541611c31416cc5..61c8e65771d76634b43e53113d6e5d07f008a53b 100644 (file)
@@ -6,7 +6,7 @@
 /* libbfd.h -- Declarations used by bfd library *implementation*.
    (This include file is not for users of the library.)
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002
+   2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -41,7 +41,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Set a tdata field.  Can't use the other macros for this, since they
    do casts, and casting to the left of assignment isn't portable.  */
-#define set_tdata(bfd, v) ((bfd)->tdata.any = (PTR) (v))
+#define set_tdata(bfd, v) ((bfd)->tdata.any = (v))
 
 /* If BFD_IN_MEMORY is set for a BFD, then the iostream fields points
    to an instance of this structure.  */
@@ -74,7 +74,7 @@ struct artdata {
                                   archive.  */
   file_ptr armap_datepos;      /* Position within archive to seek to
                                   rewrite the date field.  */
-  PTR tdata;                   /* Backend specific information.  */
+  void *tdata;                 /* Backend specific information.  */
 };
 
 #define bfd_ardata(bfd) ((bfd)->tdata.aout_ar_data)
@@ -88,105 +88,105 @@ struct areltdata {
 
 #define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size)
 
-extern PTR bfd_malloc
-  PARAMS ((bfd_size_type));
-extern PTR bfd_realloc
-  PARAMS ((PTR, bfd_size_type));
-extern PTR bfd_zmalloc
-  PARAMS ((bfd_size_type));
+extern void *bfd_malloc
+  (bfd_size_type);
+extern void *bfd_realloc
+  (void *, bfd_size_type);
+extern void *bfd_zmalloc
+  (bfd_size_type);
 
 extern bfd_error_handler_type _bfd_error_handler;
 
 /* These routines allocate and free things on the BFD's objalloc.  */
 
-extern PTR bfd_alloc
-  PARAMS ((bfd *, bfd_size_type));
-extern PTR bfd_zalloc
-  PARAMS ((bfd *, bfd_size_type));
+extern void *bfd_alloc
+  (bfd *, bfd_size_type);
+extern void *bfd_zalloc
+  (bfd *, bfd_size_type);
 extern void bfd_release
-  PARAMS ((bfd *, PTR));
+  (bfd *, void *);
 
 bfd * _bfd_create_empty_archive_element_shell
-  PARAMS ((bfd *obfd));
+  (bfd *obfd);
 bfd * _bfd_look_for_bfd_in_cache
-  PARAMS ((bfd *, file_ptr));
+  (bfd *, file_ptr);
 bfd_boolean _bfd_add_bfd_to_archive_cache
-  PARAMS ((bfd *, file_ptr, bfd *));
+  (bfd *, file_ptr, bfd *);
 bfd_boolean _bfd_generic_mkarchive
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 const bfd_target *bfd_generic_archive_p
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 bfd_boolean bfd_slurp_armap
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 bfd_boolean bfd_slurp_bsd_armap_f2
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 #define bfd_slurp_bsd_armap bfd_slurp_armap
 #define bfd_slurp_coff_armap bfd_slurp_armap
 bfd_boolean _bfd_slurp_extended_name_table
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 extern bfd_boolean _bfd_construct_extended_name_table
-  PARAMS ((bfd *, bfd_boolean, char **, bfd_size_type *));
+  (bfd *, bfd_boolean, char **, bfd_size_type *);
 bfd_boolean _bfd_write_archive_contents
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 bfd_boolean _bfd_compute_and_write_armap
-  PARAMS ((bfd *, unsigned int elength));
+  (bfd *, unsigned int elength);
 bfd *_bfd_get_elt_at_filepos
-  PARAMS ((bfd *archive, file_ptr filepos));
+  (bfd *archive, file_ptr filepos);
 extern bfd *_bfd_generic_get_elt_at_index
-  PARAMS ((bfd *, symindex));
+  (bfd *, symindex);
 bfd * _bfd_new_bfd
-  PARAMS ((void));
+  (void);
 void _bfd_delete_bfd
-  PARAMS ((bfd *));
+  (bfd *);
 
 bfd_boolean bfd_false
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 bfd_boolean bfd_true
-  PARAMS ((bfd *ignore));
-PTR bfd_nullvoidptr
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
+void *bfd_nullvoidptr
+  (bfd *ignore);
 int bfd_0
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 unsigned int bfd_0u
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 long bfd_0l
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 long _bfd_n1
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 void bfd_void
-  PARAMS ((bfd *ignore));
+  (bfd *ignore);
 
 bfd *_bfd_new_bfd_contained_in
-  PARAMS ((bfd *));
+  (bfd *);
 const bfd_target *_bfd_dummy_target
-  PARAMS ((bfd *abfd));
+  (bfd *abfd);
 
 void bfd_dont_truncate_arname
-  PARAMS ((bfd *abfd, const char *filename, char *hdr));
+  (bfd *abfd, const char *filename, char *hdr);
 void bfd_bsd_truncate_arname
-  PARAMS ((bfd *abfd, const char *filename, char *hdr));
+  (bfd *abfd, const char *filename, char *hdr);
 void bfd_gnu_truncate_arname
-  PARAMS ((bfd *abfd, const char *filename, char *hdr));
+  (bfd *abfd, const char *filename, char *hdr);
 
 bfd_boolean bsd_write_armap
-  PARAMS ((bfd *arch, unsigned int elength, struct orl *map,
-          unsigned int orl_count, int stridx));
+  (bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
+   int stridx);
 
 bfd_boolean coff_write_armap
-  PARAMS ((bfd *arch, unsigned int elength, struct orl *map,
-          unsigned int orl_count, int stridx));
+  (bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
+   int stridx);
 
-extern PTR _bfd_generic_read_ar_hdr
-  PARAMS ((bfd *));
+extern void *_bfd_generic_read_ar_hdr
+  (bfd *);
 
-extern PTR _bfd_generic_read_ar_hdr_mag
-  PARAMS ((bfd *, const char *));
+extern void *_bfd_generic_read_ar_hdr_mag
+  (bfd *, const char *);
 
 bfd * bfd_generic_openr_next_archived_file
-  PARAMS ((bfd *archive, bfd *last_file));
+  (bfd *archive, bfd *last_file);
 
 int bfd_generic_stat_arch_elt
-  PARAMS ((bfd *, struct stat *));
+  (bfd *, struct stat *);
 
 #define _bfd_read_ar_hdr(abfd) \
   BFD_SEND (abfd, _bfd_read_ar_hdr_fn, (abfd))
@@ -197,37 +197,37 @@ int bfd_generic_stat_arch_elt
 #define _bfd_generic_close_and_cleanup bfd_true
 #define _bfd_generic_bfd_free_cached_info bfd_true
 #define _bfd_generic_new_section_hook \
-  ((bfd_boolean (*) PARAMS ((bfd *, asection *))) bfd_true)
+  ((bfd_boolean (*) (bfd *, asection *)) bfd_true)
 extern bfd_boolean _bfd_generic_get_section_contents
-  PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+  (bfd *, asection *, void *, file_ptr, bfd_size_type);
 extern bfd_boolean _bfd_generic_get_section_contents_in_window
-  PARAMS ((bfd *, asection *, bfd_window *, file_ptr, bfd_size_type));
+  (bfd *, asection *, bfd_window *, file_ptr, bfd_size_type);
 
 /* Generic routines to use for BFD_JUMP_TABLE_COPY.  Use
    BFD_JUMP_TABLE_COPY (_bfd_generic).  */
 
 #define _bfd_generic_bfd_copy_private_bfd_data \
-  ((bfd_boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
+  ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
 #define _bfd_generic_bfd_merge_private_bfd_data \
-  ((bfd_boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
+  ((bfd_boolean (*) (bfd *, bfd *)) bfd_true)
 #define _bfd_generic_bfd_set_private_flags \
-  ((bfd_boolean (*) PARAMS ((bfd *, flagword))) bfd_true)
+  ((bfd_boolean (*) (bfd *, flagword)) bfd_true)
 #define _bfd_generic_bfd_copy_private_section_data \
-  ((bfd_boolean (*) PARAMS ((bfd *, asection *, bfd *, asection *))) bfd_true)
+  ((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true)
 #define _bfd_generic_bfd_copy_private_symbol_data \
-  ((bfd_boolean (*) PARAMS ((bfd *, asymbol *, bfd *, asymbol *))) bfd_true)
+  ((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true)
 #define _bfd_generic_bfd_print_private_bfd_data \
-  ((bfd_boolean (*) PARAMS ((bfd *, PTR))) bfd_true)
+  ((bfd_boolean (*) (bfd *, void *)) bfd_true)
 
 /* Routines to use for BFD_JUMP_TABLE_CORE when there is no core file
    support.  Use BFD_JUMP_TABLE_CORE (_bfd_nocore).  */
 
 extern char *_bfd_nocore_core_file_failing_command
-  PARAMS ((bfd *));
+  (bfd *);
 extern int _bfd_nocore_core_file_failing_signal
-  PARAMS ((bfd *));
+  (bfd *);
 extern bfd_boolean _bfd_nocore_core_file_matches_executable_p
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 
 /* Routines to use for BFD_JUMP_TABLE_ARCHIVE when there is no archive
    file support.  Use BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive).  */
@@ -235,20 +235,18 @@ extern bfd_boolean _bfd_nocore_core_file_matches_executable_p
 #define _bfd_noarchive_slurp_armap bfd_false
 #define _bfd_noarchive_slurp_extended_name_table bfd_false
 #define _bfd_noarchive_construct_extended_name_table \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \
+  ((bfd_boolean (*) (bfd *, char **, bfd_size_type *, const char **)) \
    bfd_false)
 #define _bfd_noarchive_truncate_arname \
-  ((void (*) PARAMS ((bfd *, const char *, char *))) bfd_void)
+  ((void (*) (bfd *, const char *, char *)) bfd_void)
 #define _bfd_noarchive_write_armap \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int))) \
+  ((bfd_boolean (*) (bfd *, unsigned int, struct orl *, unsigned int, int)) \
    bfd_false)
 #define _bfd_noarchive_read_ar_hdr bfd_nullvoidptr
 #define _bfd_noarchive_openr_next_archived_file \
-  ((bfd *(*) PARAMS ((bfd *, bfd *))) bfd_nullvoidptr)
+  ((bfd *(*) (bfd *, bfd *)) bfd_nullvoidptr)
 #define _bfd_noarchive_get_elt_at_index \
-  ((bfd *(*) PARAMS ((bfd *, symindex))) bfd_nullvoidptr)
+  ((bfd *(*) (bfd *, symindex)) bfd_nullvoidptr)
 #define _bfd_noarchive_generic_stat_arch_elt bfd_generic_stat_arch_elt
 #define _bfd_noarchive_update_armap_timestamp bfd_false
 
@@ -259,7 +257,7 @@ extern bfd_boolean _bfd_nocore_core_file_matches_executable_p
 #define _bfd_archive_bsd_slurp_extended_name_table \
   _bfd_slurp_extended_name_table
 extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table
-  PARAMS ((bfd *, char **, bfd_size_type *, const char **));
+  (bfd *, char **, bfd_size_type *, const char **);
 #define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname
 #define _bfd_archive_bsd_write_armap bsd_write_armap
 #define _bfd_archive_bsd_read_ar_hdr _bfd_generic_read_ar_hdr
@@ -269,7 +267,7 @@ extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table
 #define _bfd_archive_bsd_generic_stat_arch_elt \
   bfd_generic_stat_arch_elt
 extern bfd_boolean _bfd_archive_bsd_update_armap_timestamp
-  PARAMS ((bfd *));
+  (bfd *);
 
 /* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get COFF style
    archives.  Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff).  */
@@ -278,7 +276,7 @@ extern bfd_boolean _bfd_archive_bsd_update_armap_timestamp
 #define _bfd_archive_coff_slurp_extended_name_table \
   _bfd_slurp_extended_name_table
 extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
-  PARAMS ((bfd *, char **, bfd_size_type *, const char **));
+  (bfd *, char **, bfd_size_type *, const char **);
 #define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname
 #define _bfd_archive_coff_write_armap coff_write_armap
 #define _bfd_archive_coff_read_ar_hdr _bfd_generic_read_ar_hdr
@@ -294,49 +292,46 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
 
 #define _bfd_nosymbols_get_symtab_upper_bound _bfd_n1
 #define _bfd_nosymbols_get_symtab \
-  ((long (*) PARAMS ((bfd *, asymbol **))) _bfd_n1)
+  ((long (*) (bfd *, asymbol **)) _bfd_n1)
 #define _bfd_nosymbols_make_empty_symbol _bfd_generic_make_empty_symbol
 #define _bfd_nosymbols_print_symbol \
-  ((void (*) PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type))) bfd_void)
+  ((void (*) (bfd *, void *, asymbol *, bfd_print_symbol_type)) bfd_void)
 #define _bfd_nosymbols_get_symbol_info \
-  ((void (*) PARAMS ((bfd *, asymbol *, symbol_info *))) bfd_void)
+  ((void (*) (bfd *, asymbol *, symbol_info *)) bfd_void)
 #define _bfd_nosymbols_bfd_is_local_label_name \
-  ((bfd_boolean (*) PARAMS ((bfd *, const char *))) bfd_false)
+  ((bfd_boolean (*) (bfd *, const char *)) bfd_false)
 #define _bfd_nosymbols_get_lineno \
-  ((alent *(*) PARAMS ((bfd *, asymbol *))) bfd_nullvoidptr)
+  ((alent *(*) (bfd *, asymbol *)) bfd_nullvoidptr)
 #define _bfd_nosymbols_find_nearest_line \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **, \
-            const char **, unsigned int *))) \
+  ((bfd_boolean (*) (bfd *, asection *, asymbol **, bfd_vma, const char **, \
+                    const char **, unsigned int *)) \
    bfd_false)
 #define _bfd_nosymbols_bfd_make_debug_symbol \
-  ((asymbol *(*) PARAMS ((bfd *, PTR, unsigned long))) bfd_nullvoidptr)
+  ((asymbol *(*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
 #define _bfd_nosymbols_read_minisymbols \
-  ((long (*) PARAMS ((bfd *, bfd_boolean, PTR *, unsigned int *))) _bfd_n1)
+  ((long (*) (bfd *, bfd_boolean, void **, unsigned int *)) _bfd_n1)
 #define _bfd_nosymbols_minisymbol_to_symbol \
-  ((asymbol *(*) PARAMS ((bfd *, bfd_boolean, const PTR, asymbol *))) \
+  ((asymbol *(*) (bfd *, bfd_boolean, const void *, asymbol *)) \
    bfd_nullvoidptr)
 
 /* Routines to use for BFD_JUMP_TABLE_RELOCS when there is no reloc
    support.  Use BFD_JUMP_TABLE_RELOCS (_bfd_norelocs).  */
 
 #define _bfd_norelocs_get_reloc_upper_bound \
-  ((long (*) PARAMS ((bfd *, asection *))) _bfd_n1)
+  ((long (*) (bfd *, asection *)) _bfd_n1)
 #define _bfd_norelocs_canonicalize_reloc \
-  ((long (*) PARAMS ((bfd *, asection *, arelent **, asymbol **))) _bfd_n1)
+  ((long (*) (bfd *, asection *, arelent **, asymbol **)) _bfd_n1)
 #define _bfd_norelocs_bfd_reloc_type_lookup \
-  ((reloc_howto_type *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) \
-   bfd_nullvoidptr)
+  ((reloc_howto_type *(*) (bfd *, bfd_reloc_code_real_type)) bfd_nullvoidptr)
 
 /* Routines to use for BFD_JUMP_TABLE_WRITE for targets which may not
    be written.  Use BFD_JUMP_TABLE_WRITE (_bfd_nowrite).  */
 
 #define _bfd_nowrite_set_arch_mach \
-  ((bfd_boolean (*) PARAMS ((bfd *, enum bfd_architecture, unsigned long))) \
+  ((bfd_boolean (*) (bfd *, enum bfd_architecture, unsigned long)) \
    bfd_false)
 #define _bfd_nowrite_set_section_contents \
-  ((bfd_boolean (*) \
-   PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type))) \
+  ((bfd_boolean (*) (bfd *, asection *, void *, file_ptr, bfd_size_type)) \
    bfd_false)
 
 /* Generic routines to use for BFD_JUMP_TABLE_WRITE.  Use
@@ -344,45 +339,41 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
 
 #define _bfd_generic_set_arch_mach bfd_default_set_arch_mach
 extern bfd_boolean _bfd_generic_set_section_contents
-  PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+  (bfd *, asection *, void *, file_ptr, bfd_size_type);
 
 /* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not
    support linking.  Use BFD_JUMP_TABLE_LINK (_bfd_nolink).  */
 
-#define _bfd_nolink_sizeof_headers ((int (*) PARAMS ((bfd *, bfd_boolean))) bfd_0)
+#define _bfd_nolink_sizeof_headers ((int (*) (bfd *, bfd_boolean)) bfd_0)
 #define _bfd_nolink_bfd_get_relocated_section_contents \
-  ((bfd_byte *(*) \
-    PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, \
-            bfd_byte *, bfd_boolean, asymbol **))) \
+  ((bfd_byte *(*) (bfd *, struct bfd_link_info *, struct bfd_link_order *, \
+                  bfd_byte *, bfd_boolean, asymbol **)) \
    bfd_nullvoidptr)
 #define _bfd_nolink_bfd_relax_section \
   ((bfd_boolean (*) \
-    PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *))) \
+    (bfd *, asection *, struct bfd_link_info *, bfd_boolean *)) \
    bfd_false)
 #define _bfd_nolink_bfd_gc_sections \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, struct bfd_link_info *))) \
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
    bfd_false)
 #define _bfd_nolink_bfd_merge_sections \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, struct bfd_link_info *))) \
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
    bfd_false)
 #define _bfd_nolink_bfd_discard_group \
-  ((bfd_boolean (*) \
-    PARAMS ((bfd *, struct sec *))) \
+  ((bfd_boolean (*) (bfd *, struct sec *)) \
    bfd_false)
 #define _bfd_nolink_bfd_link_hash_table_create \
-  ((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
+  ((struct bfd_link_hash_table *(*) (bfd *)) bfd_nullvoidptr)
 #define _bfd_nolink_bfd_link_hash_table_free \
-  ((void (*) PARAMS ((struct bfd_link_hash_table *))) bfd_void)
+  ((void (*) (struct bfd_link_hash_table *)) bfd_void)
 #define _bfd_nolink_bfd_link_add_symbols \
-  ((bfd_boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
 #define _bfd_nolink_bfd_link_just_syms \
-  ((void (*) PARAMS ((asection *, struct bfd_link_info *))) bfd_void)
+  ((void (*) (asection *, struct bfd_link_info *)) bfd_void)
 #define _bfd_nolink_bfd_final_link \
-  ((bfd_boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false)
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
 #define _bfd_nolink_bfd_link_split_section \
-  ((bfd_boolean (*) PARAMS ((bfd *, struct sec *))) bfd_false)
+  ((bfd_boolean (*) (bfd *, struct sec *)) bfd_false)
 
 /* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
    have dynamic symbols or relocs.  Use BFD_JUMP_TABLE_DYNAMIC
@@ -390,195 +381,189 @@ extern bfd_boolean _bfd_generic_set_section_contents
 
 #define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_n1
 #define _bfd_nodynamic_canonicalize_dynamic_symtab \
-  ((long (*) PARAMS ((bfd *, asymbol **))) _bfd_n1)
+  ((long (*) (bfd *, asymbol **)) _bfd_n1)
 #define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_n1
 #define _bfd_nodynamic_canonicalize_dynamic_reloc \
-  ((long (*) PARAMS ((bfd *, arelent **, asymbol **))) _bfd_n1)
+  ((long (*) (bfd *, arelent **, asymbol **)) _bfd_n1)
 \f
 /* Generic routine to determine of the given symbol is a local
    label.  */
 extern bfd_boolean bfd_generic_is_local_label_name
-  PARAMS ((bfd *, const char *));
+  (bfd *, const char *);
 
 /* Generic minisymbol routines.  */
 extern long _bfd_generic_read_minisymbols
-  PARAMS ((bfd *, bfd_boolean, PTR *, unsigned int *));
+  (bfd *, bfd_boolean, void **, unsigned int *);
 extern asymbol *_bfd_generic_minisymbol_to_symbol
-  PARAMS ((bfd *, bfd_boolean, const PTR, asymbol *));
+  (bfd *, bfd_boolean, const void *, asymbol *);
 
 /* Find the nearest line using .stab/.stabstr sections.  */
 extern bfd_boolean _bfd_stab_section_find_nearest_line
-  PARAMS ((bfd *, asymbol **, asection *, bfd_vma, bfd_boolean *,
-          const char **, const char **, unsigned int *, PTR *));
+  (bfd *, asymbol **, asection *, bfd_vma, bfd_boolean *,
+   const char **, const char **, unsigned int *, void **);
 
 /* Find the neaderst line using DWARF 1 debugging information.  */
 extern bfd_boolean _bfd_dwarf1_find_nearest_line
-  PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
-          const char **, unsigned int *));
+  (bfd *, asection *, asymbol **, bfd_vma, const char **,
+   const char **, unsigned int *);
 
 /* Find the nearest line using DWARF 2 debugging information.  */
 extern bfd_boolean _bfd_dwarf2_find_nearest_line
-  PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
-          const char **, unsigned int *, unsigned int,
-          PTR *));
+  (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
+   unsigned int *, unsigned int, void **);
 
 /* Create a new section entry.  */
 extern struct bfd_hash_entry *bfd_section_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+  (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
 
 /* A routine to create entries for a bfd_link_hash_table.  */
 extern struct bfd_hash_entry *_bfd_link_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *entry,
-          struct bfd_hash_table *table,
-          const char *string));
+  (struct bfd_hash_entry *entry, struct bfd_hash_table *table,
+   const char *string);
 
 /* Initialize a bfd_link_hash_table.  */
 extern bfd_boolean _bfd_link_hash_table_init
-  PARAMS ((struct bfd_link_hash_table *, bfd *,
-          struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
-                                      struct bfd_hash_table *,
-                                      const char *)));
+  (struct bfd_link_hash_table *, bfd *,
+   struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+                              struct bfd_hash_table *,
+                              const char *));
 
 /* Generic link hash table creation routine.  */
 extern struct bfd_link_hash_table *_bfd_generic_link_hash_table_create
-  PARAMS ((bfd *));
+  (bfd *);
 
 /* Generic link hash table destruction routine.  */
 extern void _bfd_generic_link_hash_table_free
-  PARAMS ((struct bfd_link_hash_table *));
+  (struct bfd_link_hash_table *);
 
 /* Generic add symbol routine.  */
 extern bfd_boolean _bfd_generic_link_add_symbols
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* Generic add symbol routine.  This version is used by targets for
    which the linker must collect constructors and destructors by name,
    as the collect2 program does.  */
 extern bfd_boolean _bfd_generic_link_add_symbols_collect
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 /* Generic archive add symbol routine.  */
 extern bfd_boolean _bfd_generic_link_add_archive_symbols
-  PARAMS ((bfd *, struct bfd_link_info *,
-          bfd_boolean (*) (bfd *, struct bfd_link_info *, bfd_boolean *)));
+  (bfd *, struct bfd_link_info *,
+   bfd_boolean (*) (bfd *, struct bfd_link_info *, bfd_boolean *));
 
 /* Forward declaration to avoid prototype errors.  */
 typedef struct bfd_link_hash_entry _bfd_link_hash_entry;
 
 /* Generic routine to add a single symbol.  */
 extern bfd_boolean _bfd_generic_link_add_one_symbol
-  PARAMS ((struct bfd_link_info *, bfd *, const char *name, flagword,
-          asection *, bfd_vma, const char *, bfd_boolean copy,
-          bfd_boolean constructor, struct bfd_link_hash_entry **));
+  (struct bfd_link_info *, bfd *, const char *name, flagword,
+   asection *, bfd_vma, const char *, bfd_boolean copy,
+   bfd_boolean constructor, struct bfd_link_hash_entry **);
 
 /* Generic routine to mark section as supplying symbols only.  */
 extern void _bfd_generic_link_just_syms
-  PARAMS ((asection *, struct bfd_link_info *));
+  (asection *, struct bfd_link_info *);
 
 /* Generic link routine.  */
 extern bfd_boolean _bfd_generic_final_link
-  PARAMS ((bfd *, struct bfd_link_info *));
+  (bfd *, struct bfd_link_info *);
 
 extern bfd_boolean _bfd_generic_link_split_section
-  PARAMS ((bfd *, struct sec *));
+  (bfd *, struct sec *);
 
 /* Generic reloc_link_order processing routine.  */
 extern bfd_boolean _bfd_generic_reloc_link_order
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          struct bfd_link_order *));
+  (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
 
 /* Default link order processing routine.  */
 extern bfd_boolean _bfd_default_link_order
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          struct bfd_link_order *));
+  (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
 
 /* Count the number of reloc entries in a link order list.  */
 extern unsigned int _bfd_count_link_order_relocs
-  PARAMS ((struct bfd_link_order *));
+  (struct bfd_link_order *);
 
 /* Final link relocation routine.  */
 extern bfd_reloc_status_type _bfd_final_link_relocate
-  PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
-          bfd_vma, bfd_vma, bfd_vma));
+  (reloc_howto_type *, bfd *, asection *, bfd_byte *,
+   bfd_vma, bfd_vma, bfd_vma);
 
 /* Relocate a particular location by a howto and a value.  */
 extern bfd_reloc_status_type _bfd_relocate_contents
-  PARAMS ((reloc_howto_type *, bfd *, bfd_vma, bfd_byte *));
+  (reloc_howto_type *, bfd *, bfd_vma, bfd_byte *);
 
 /* Link stabs in sections in the first pass.  */
 
 extern bfd_boolean _bfd_link_section_stabs
-  PARAMS ((bfd *, PTR *, asection *, asection *, PTR *));
+  (bfd *, void **, asection *, asection *, void **);
 
 /* Eliminate stabs for discarded functions and symbols.  */
 extern bfd_boolean _bfd_discard_section_stabs
-  PARAMS ((bfd *, asection *, PTR,
-          bfd_boolean (*) (bfd_vma, PTR), PTR));
+  (bfd *, asection *, void *, bfd_boolean (*) (bfd_vma, void *), void *);
 
 /* Write out the .stab section when linking stabs in sections.  */
 
 extern bfd_boolean _bfd_write_section_stabs
-  PARAMS ((bfd *, PTR *, asection *, PTR *, bfd_byte *));
+  (bfd *, void **, asection *, void **, bfd_byte *);
 
 /* Write out the .stabstr string table when linking stabs in sections.  */
 
 extern bfd_boolean _bfd_write_stab_strings
-  PARAMS ((bfd *, PTR *));
+  (bfd *, void **);
 
 /* Find an offset within a .stab section when linking stabs in
    sections.  */
 
 extern bfd_vma _bfd_stab_section_offset
-  PARAMS ((bfd *, PTR *, asection *, PTR *, bfd_vma));
+  (bfd *, void **, asection *, void **, bfd_vma);
 
 /* Attempt to merge a SEC_MERGE section.  */
 
 extern bfd_boolean _bfd_merge_section
-  PARAMS ((bfd *, PTR *, asection *, PTR *));
+  (bfd *, void **, asection *, void **);
 
 /* Attempt to merge SEC_MERGE sections.  */
 
 extern bfd_boolean _bfd_merge_sections
-  PARAMS ((bfd *, PTR, void (*)(bfd *, asection *)));
+  (bfd *, void *, void (*) (bfd *, asection *));
 
 /* Write out a merged section.  */
 
 extern bfd_boolean _bfd_write_merged_section
-  PARAMS ((bfd *, asection *, PTR));
+  (bfd *, asection *, void *);
 
 /* Find an offset within a modified SEC_MERGE section.  */
 
 extern bfd_vma _bfd_merged_section_offset
-  PARAMS ((bfd *, asection **, PTR, bfd_vma, bfd_vma));
+  (bfd *, asection **, void *, bfd_vma, bfd_vma);
 
 /* Create a string table.  */
 extern struct bfd_strtab_hash *_bfd_stringtab_init
-  PARAMS ((void));
+  (void);
 
 /* Create an XCOFF .debug section style string table.  */
 extern struct bfd_strtab_hash *_bfd_xcoff_stringtab_init
-  PARAMS ((void));
+  (void);
 
 /* Free a string table.  */
 extern void _bfd_stringtab_free
-  PARAMS ((struct bfd_strtab_hash *));
+  (struct bfd_strtab_hash *);
 
 /* Get the size of a string table.  */
 extern bfd_size_type _bfd_stringtab_size
-  PARAMS ((struct bfd_strtab_hash *));
+  (struct bfd_strtab_hash *);
 
 /* Add a string to a string table.  */
 extern bfd_size_type _bfd_stringtab_add
-  PARAMS ((struct bfd_strtab_hash *, const char *, bfd_boolean hash,
-          bfd_boolean copy));
+  (struct bfd_strtab_hash *, const char *, bfd_boolean hash, bfd_boolean copy);
 
 /* Write out a string table.  */
 extern bfd_boolean _bfd_stringtab_emit
-  PARAMS ((bfd *, struct bfd_strtab_hash *));
+  (bfd *, struct bfd_strtab_hash *);
 
 /* Check that endianness of input and output file match.  */
 extern bfd_boolean _bfd_generic_verify_endian_match
-  PARAMS ((bfd *, bfd *));
+  (bfd *, bfd *);
 \f
 /* Macros to tell if bfds are read or write enabled.
 
@@ -589,20 +574,22 @@ extern bfd_boolean _bfd_generic_verify_endian_match
    !bfd_read_p, and only sometimes bfd_write_p.
 */
 
-#define        bfd_read_p(abfd) ((abfd)->direction == read_direction || (abfd)->direction == both_direction)
-#define        bfd_write_p(abfd) ((abfd)->direction == write_direction || (abfd)->direction == both_direction)
+#define        bfd_read_p(abfd) \
+  ((abfd)->direction == read_direction || (abfd)->direction == both_direction)
+#define        bfd_write_p(abfd) \
+  ((abfd)->direction == write_direction || (abfd)->direction == both_direction)
 
 void bfd_assert
-  PARAMS ((const char*,int));
+  (const char*,int);
 
 #define BFD_ASSERT(x) \
-{ if (!(x)) bfd_assert(__FILE__,__LINE__); }
+  { if (!(x)) bfd_assert(__FILE__,__LINE__); }
 
 #define BFD_FAIL() \
-{ bfd_assert(__FILE__,__LINE__); }
+  { bfd_assert(__FILE__,__LINE__); }
 
 extern void _bfd_abort
-  PARAMS ((const char *, int, const char *)) ATTRIBUTE_NORETURN;
+  (const char *, int, const char *) ATTRIBUTE_NORETURN;
 
 /* if gcc >= 2.6, we can give a function name, too */
 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
@@ -613,7 +600,7 @@ extern void _bfd_abort
 #define abort() _bfd_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
 
 FILE * bfd_cache_lookup_worker
-  PARAMS ((bfd *));
+  (bfd *);
 
 extern bfd *bfd_last_cache;
 
@@ -633,42 +620,41 @@ struct ecoff_find_line;
 #endif
 
 extern bfd_boolean _bfd_ecoff_locate_line
-  PARAMS ((bfd *, asection *, bfd_vma, struct ecoff_debug_info * const,
-          const struct ecoff_debug_swap * const, struct ecoff_find_line *,
-          const char **, const char **, unsigned int *));
+  (bfd *, asection *, bfd_vma, struct ecoff_debug_info * const,
+   const struct ecoff_debug_swap * const, struct ecoff_find_line *,
+   const char **, const char **, unsigned int *);
 extern bfd_boolean _bfd_ecoff_get_accumulated_pdr
-  PARAMS ((PTR, bfd_byte *));
+  (void *, bfd_byte *);
 extern bfd_boolean _bfd_ecoff_get_accumulated_sym
-  PARAMS ((PTR, bfd_byte *));
+  (void *, bfd_byte *);
 extern bfd_boolean _bfd_ecoff_get_accumulated_ss
-  PARAMS ((PTR, bfd_byte *));
+  (void *, bfd_byte *);
 
 extern bfd_vma _bfd_get_gp_value
-  PARAMS ((bfd *));
+  (bfd *);
 extern void _bfd_set_gp_value
-  PARAMS ((bfd *, bfd_vma));
+  (bfd *, bfd_vma);
 
 /* Function shared by the COFF and ELF SH backends, which have no
    other common header files.  */
 
+#ifndef _bfd_sh_align_load_span
 extern bfd_boolean _bfd_sh_align_load_span
-  PARAMS ((bfd *, asection *, bfd_byte *,
-          bfd_boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma),
-          PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *));
-
+  (bfd *, asection *, bfd_byte *,
+   bfd_boolean (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma),
+   void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *);
+#endif
 /* Extracted from init.c.  */
 /* Extracted from libbfd.c.  */
-bfd_boolean
-bfd_write_bigendian_4byte_int PARAMS ((bfd *, unsigned int));
+bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
 
-unsigned int
-bfd_log2 PARAMS ((bfd_vma x));
+unsigned int bfd_log2 (bfd_vma x);
 
 /* Extracted from bfdio.c.  */
 /* Extracted from bfdwin.c.  */
 struct _bfd_window_internal {
   struct _bfd_window_internal *next;
-  PTR data;
+  void *data;
   bfd_size_type size;
   int refcount : 31;           /* should be enough...  */
   unsigned mapped : 1;         /* 1 = mmap, 0 = malloc */
@@ -681,17 +667,13 @@ extern bfd *bfd_last_cache;
     ((x)==bfd_last_cache? \
       (FILE*) (bfd_last_cache->iostream): \
        bfd_cache_lookup_worker(x))
-bfd_boolean
-bfd_cache_init PARAMS ((bfd *abfd));
+bfd_boolean bfd_cache_init (bfd *abfd);
 
-bfd_boolean
-bfd_cache_close PARAMS ((bfd *abfd));
+bfd_boolean bfd_cache_close (bfd *abfd);
 
-FILE*
-bfd_open_file PARAMS ((bfd *abfd));
+FILE* bfd_open_file (bfd *abfd);
 
-FILE *
-bfd_cache_lookup_worker PARAMS ((bfd *abfd));
+FILE *bfd_cache_lookup_worker (bfd *abfd);
 
 /* Extracted from reloc.c.  */
 #ifdef _BFD_MAKE_TABLE_bfd_reloc_code_real
@@ -881,6 +863,14 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_FRV_GPREL32",
   "BFD_RELOC_FRV_GPRELHI",
   "BFD_RELOC_FRV_GPRELLO",
+  "BFD_RELOC_MN10300_GOTOFF24",
+  "BFD_RELOC_MN10300_GOT32",
+  "BFD_RELOC_MN10300_GOT24",
+  "BFD_RELOC_MN10300_GOT16",
+  "BFD_RELOC_MN10300_COPY",
+  "BFD_RELOC_MN10300_GLOB_DAT",
+  "BFD_RELOC_MN10300_JMP_SLOT",
+  "BFD_RELOC_MN10300_RELATIVE",
 
   "BFD_RELOC_386_GOT32",
   "BFD_RELOC_386_PLT32",
@@ -1302,6 +1292,10 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
   "BFD_RELOC_390_TLS_DTPMOD",
   "BFD_RELOC_390_TLS_DTPOFF",
   "BFD_RELOC_390_TLS_TPOFF",
+  "BFD_RELOC_390_20",
+  "BFD_RELOC_390_GOT20",
+  "BFD_RELOC_390_GOTPLT20",
+  "BFD_RELOC_390_TLS_GOTIE20",
   "BFD_RELOC_IP2K_FR9",
   "BFD_RELOC_IP2K_BANK",
   "BFD_RELOC_IP2K_ADDR16CJP",
@@ -1489,44 +1483,40 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
 };
 #endif
 
-reloc_howto_type *
-bfd_default_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type  code));
+reloc_howto_type *bfd_default_reloc_type_lookup
+   (bfd *abfd, bfd_reloc_code_real_type  code);
 
-bfd_boolean
-bfd_generic_relax_section PARAMS ((bfd *abfd,
+bfd_boolean bfd_generic_relax_section
+   (bfd *abfd,
     asection *section,
     struct bfd_link_info *,
-    bfd_boolean *));
+    bfd_boolean *);
 
-bfd_boolean
-bfd_generic_gc_sections PARAMS ((bfd *, struct bfd_link_info *));
+bfd_boolean bfd_generic_gc_sections
+   (bfd *, struct bfd_link_info *);
 
-bfd_boolean
-bfd_generic_merge_sections PARAMS ((bfd *, struct bfd_link_info *));
+bfd_boolean bfd_generic_merge_sections
+   (bfd *, struct bfd_link_info *);
 
-bfd_byte *
-bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd,
+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,
     bfd_boolean relocatable,
-    asymbol **symbols));
+    asymbol **symbols);
 
 /* Extracted from archures.c.  */
 extern const bfd_arch_info_type bfd_default_arch_struct;
-bfd_boolean
-bfd_default_set_arch_mach PARAMS ((bfd *abfd,
-    enum bfd_architecture arch,
-    unsigned long mach));
+bfd_boolean bfd_default_set_arch_mach
+   (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
 
-const bfd_arch_info_type *
-bfd_default_compatible PARAMS ((const bfd_arch_info_type *a,
-    const bfd_arch_info_type *b));
+const bfd_arch_info_type *bfd_default_compatible
+   (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
 
-bfd_boolean
-bfd_default_scan PARAMS ((const struct bfd_arch_info *info, const char *string));
+bfd_boolean bfd_default_scan
+   (const struct bfd_arch_info *info, const char *string);
 
 /* Extracted from elf.c.  */
-struct elf_internal_shdr *
-bfd_elf_find_section PARAMS ((bfd *abfd, char *name));
+struct elf_internal_shdr *bfd_elf_find_section (bfd *abfd, char *name);
 
index 72f8bfd909d0e8a0a6a5133fee45f4432ce8eb87..b7c557608d606b6aec79b5b47a20969d24a13b1d 100644 (file)
@@ -406,34 +406,26 @@ SUBSUBSECTION
        file at the end of <<NAME(aout,final_link)>>.
 */
 
-static bfd_boolean generic_link_read_symbols
-  PARAMS ((bfd *));
-static bfd_boolean generic_link_add_symbols
-  PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean collect));
 static bfd_boolean generic_link_add_object_symbols
-  PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean collect));
+  (bfd *, struct bfd_link_info *, bfd_boolean collect);
+static bfd_boolean generic_link_add_symbols
+  (bfd *, struct bfd_link_info *, bfd_boolean);
 static bfd_boolean generic_link_check_archive_element_no_collect
-  PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *pneeded));
+  (bfd *, struct bfd_link_info *, bfd_boolean *);
 static bfd_boolean generic_link_check_archive_element_collect
-  PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *pneeded));
+  (bfd *, struct bfd_link_info *, bfd_boolean *);
 static bfd_boolean generic_link_check_archive_element
-  PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *pneeded,
-          bfd_boolean collect));
+  (bfd *, struct bfd_link_info *, bfd_boolean *, bfd_boolean);
 static bfd_boolean generic_link_add_symbol_list
-  PARAMS ((bfd *, struct bfd_link_info *, bfd_size_type count, asymbol **,
-          bfd_boolean collect));
-static bfd *hash_entry_bfd
-  PARAMS ((struct bfd_link_hash_entry *));
-static void set_symbol_from_hash
-  PARAMS ((asymbol *, struct bfd_link_hash_entry *));
+  (bfd *, struct bfd_link_info *, bfd_size_type count, asymbol **,
+   bfd_boolean);
 static bfd_boolean generic_add_output_symbol
-  PARAMS ((bfd *, size_t *psymalloc, asymbol *));
+  (bfd *, size_t *psymalloc, asymbol *);
 static bfd_boolean default_data_link_order
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          struct bfd_link_order *));
+  (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *);
 static bfd_boolean default_indirect_link_order
-  PARAMS ((bfd *, struct bfd_link_info *, asection *,
-          struct bfd_link_order *, bfd_boolean));
+  (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *,
+   bfd_boolean);
 
 /* The link hash table structure is defined in bfdlink.h.  It provides
    a base hash table which the backend specific hash tables are built
@@ -442,17 +434,15 @@ static bfd_boolean default_indirect_link_order
 /* Routine to create an entry in the link hash table.  */
 
 struct bfd_hash_entry *
-_bfd_link_hash_newfunc (entry, table, string)
-     struct bfd_hash_entry *entry;
-     struct bfd_hash_table *table;
-     const char *string;
+_bfd_link_hash_newfunc (struct bfd_hash_entry *entry,
+                       struct bfd_hash_table *table,
+                       const char *string)
 {
   /* Allocate the structure if it has not already been allocated by a
      subclass.  */
   if (entry == NULL)
     {
-      entry = (struct bfd_hash_entry *)
-       bfd_hash_allocate (table, sizeof (struct bfd_link_hash_entry));
+      entry = bfd_hash_allocate (table, sizeof (struct bfd_link_hash_entry));
       if (entry == NULL)
        return entry;
     }
@@ -475,12 +465,12 @@ _bfd_link_hash_newfunc (entry, table, string)
    responsible for creating this table.  */
 
 bfd_boolean
-_bfd_link_hash_table_init (table, abfd, newfunc)
-     struct bfd_link_hash_table *table;
-     bfd *abfd;
-     struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
-                                               struct bfd_hash_table *,
-                                               const char *));
+_bfd_link_hash_table_init
+  (struct bfd_link_hash_table *table,
+   bfd *abfd,
+   struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
+                                     struct bfd_hash_table *,
+                                     const char *))
 {
   table->creator = abfd->xvec;
   table->undefs = NULL;
@@ -495,19 +485,18 @@ _bfd_link_hash_table_init (table, abfd, newfunc)
    the real symbol.  */
 
 struct bfd_link_hash_entry *
-bfd_link_hash_lookup (table, string, create, copy, follow)
-     struct bfd_link_hash_table *table;
-     const char *string;
-     bfd_boolean create;
-     bfd_boolean copy;
-     bfd_boolean follow;
+bfd_link_hash_lookup (struct bfd_link_hash_table *table,
+                     const char *string,
+                     bfd_boolean create,
+                     bfd_boolean copy,
+                     bfd_boolean follow)
 {
   struct bfd_link_hash_entry *ret;
 
   ret = ((struct bfd_link_hash_entry *)
         bfd_hash_lookup (&table->table, string, create, copy));
 
-  if (follow && ret != (struct bfd_link_hash_entry *) NULL)
+  if (follow && ret != NULL)
     {
       while (ret->type == bfd_link_hash_indirect
             || ret->type == bfd_link_hash_warning)
@@ -522,13 +511,12 @@ bfd_link_hash_lookup (table, string, create, copy, follow)
    undefined symbol, not for definitions of a symbol.  */
 
 struct bfd_link_hash_entry *
-bfd_wrapped_link_hash_lookup (abfd, info, string, create, copy, follow)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     const char *string;
-     bfd_boolean create;
-     bfd_boolean copy;
-     bfd_boolean follow;
+bfd_wrapped_link_hash_lookup (bfd *abfd,
+                             struct bfd_link_info *info,
+                             const char *string,
+                             bfd_boolean create,
+                             bfd_boolean copy,
+                             bfd_boolean follow)
 {
   bfd_size_type amt;
 
@@ -552,7 +540,7 @@ bfd_wrapped_link_hash_lookup (abfd, info, string, create, copy, follow)
              references to SYM with references to __wrap_SYM.  */
 
          amt = strlen (l) + sizeof WRAP + 1;
-         n = (char *) bfd_malloc (amt);
+         n = bfd_malloc (amt);
          if (n == NULL)
            return NULL;
 
@@ -584,7 +572,7 @@ bfd_wrapped_link_hash_lookup (abfd, info, string, create, copy, follow)
              with references to SYM.  */
 
          amt = strlen (l + sizeof REAL - 1) + 2;
-         n = (char *) bfd_malloc (amt);
+         n = bfd_malloc (amt);
          if (n == NULL)
            return NULL;
 
@@ -610,28 +598,26 @@ bfd_wrapped_link_hash_lookup (abfd, info, string, create, copy, follow)
    call.  */
 
 void
-bfd_link_hash_traverse (table, func, info)
-     struct bfd_link_hash_table *table;
-     bfd_boolean (*func) PARAMS ((struct bfd_link_hash_entry *, PTR));
-     PTR info;
+bfd_link_hash_traverse
+  (struct bfd_link_hash_table *table,
+   bfd_boolean (*func) (struct bfd_link_hash_entry *, void *),
+   void *info)
 {
   bfd_hash_traverse (&table->table,
-                    ((bfd_boolean (*) PARAMS ((struct bfd_hash_entry *, PTR)))
-                     func),
+                    (bfd_boolean (*) (struct bfd_hash_entry *, void *)) func,
                     info);
 }
 
 /* Add a symbol to the linker hash table undefs list.  */
 
-INLINE void
-bfd_link_add_undef (table, h)
-     struct bfd_link_hash_table *table;
-     struct bfd_link_hash_entry *h;
+void
+bfd_link_add_undef (struct bfd_link_hash_table *table,
+                   struct bfd_link_hash_entry *h)
 {
   BFD_ASSERT (h->next == NULL);
-  if (table->undefs_tail != (struct bfd_link_hash_entry *) NULL)
+  if (table->undefs_tail != NULL)
     table->undefs_tail->next = h;
-  if (table->undefs == (struct bfd_link_hash_entry *) NULL)
+  if (table->undefs == NULL)
     table->undefs = h;
   table->undefs_tail = h;
 }
@@ -639,16 +625,15 @@ bfd_link_add_undef (table, h)
 /* Routine to create an entry in a generic link hash table.  */
 
 struct bfd_hash_entry *
-_bfd_generic_link_hash_newfunc (entry, table, string)
-     struct bfd_hash_entry *entry;
-     struct bfd_hash_table *table;
-     const char *string;
+_bfd_generic_link_hash_newfunc (struct bfd_hash_entry *entry,
+                               struct bfd_hash_table *table,
+                               const char *string)
 {
   /* Allocate the structure if it has not already been allocated by a
      subclass.  */
   if (entry == NULL)
     {
-      entry = (struct bfd_hash_entry *)
+      entry =
        bfd_hash_allocate (table, sizeof (struct generic_link_hash_entry));
       if (entry == NULL)
        return entry;
@@ -672,27 +657,25 @@ _bfd_generic_link_hash_newfunc (entry, table, string)
 /* Create a generic link hash table.  */
 
 struct bfd_link_hash_table *
-_bfd_generic_link_hash_table_create (abfd)
-     bfd *abfd;
+_bfd_generic_link_hash_table_create (bfd *abfd)
 {
   struct generic_link_hash_table *ret;
   bfd_size_type amt = sizeof (struct generic_link_hash_table);
 
-  ret = (struct generic_link_hash_table *) bfd_malloc (amt);
+  ret = bfd_malloc (amt);
   if (ret == NULL)
-    return (struct bfd_link_hash_table *) NULL;
+    return NULL;
   if (! _bfd_link_hash_table_init (&ret->root, abfd,
                                   _bfd_generic_link_hash_newfunc))
     {
       free (ret);
-      return (struct bfd_link_hash_table *) NULL;
+      return NULL;
     }
   return &ret->root;
 }
 
 void
-_bfd_generic_link_hash_table_free (hash)
-     struct bfd_link_hash_table *hash;
+_bfd_generic_link_hash_table_free (struct bfd_link_hash_table *hash)
 {
   struct generic_link_hash_table *ret
     = (struct generic_link_hash_table *) hash;
@@ -709,10 +692,9 @@ _bfd_generic_link_hash_table_free (hash)
    structure.  */
 
 static bfd_boolean
-generic_link_read_symbols (abfd)
-     bfd *abfd;
+generic_link_read_symbols (bfd *abfd)
 {
-  if (bfd_get_outsymbols (abfd) == (asymbol **) NULL)
+  if (bfd_get_outsymbols (abfd) == NULL)
     {
       long symsize;
       long symcount;
@@ -720,8 +702,7 @@ generic_link_read_symbols (abfd)
       symsize = bfd_get_symtab_upper_bound (abfd);
       if (symsize < 0)
        return FALSE;
-      bfd_get_outsymbols (abfd) =
-       (asymbol **) bfd_alloc (abfd, (bfd_size_type) symsize);
+      bfd_get_outsymbols (abfd) = bfd_alloc (abfd, symsize);
       if (bfd_get_outsymbols (abfd) == NULL && symsize != 0)
        return FALSE;
       symcount = bfd_canonicalize_symtab (abfd, bfd_get_outsymbols (abfd));
@@ -738,9 +719,7 @@ generic_link_read_symbols (abfd)
    constructors by name.  */
 
 bfd_boolean
-_bfd_generic_link_add_symbols (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+_bfd_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
 {
   return generic_link_add_symbols (abfd, info, FALSE);
 }
@@ -753,9 +732,7 @@ _bfd_generic_link_add_symbols (abfd, info)
    for which gcc uses collect2 and do not support stabs.  */
 
 bfd_boolean
-_bfd_generic_link_add_symbols_collect (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+_bfd_generic_link_add_symbols_collect (bfd *abfd, struct bfd_link_info *info)
 {
   return generic_link_add_symbols (abfd, info, TRUE);
 }
@@ -765,9 +742,8 @@ _bfd_generic_link_add_symbols_collect (abfd, info)
    file are absolute.  */
 
 void
-_bfd_generic_link_just_syms (sec, info)
-     asection *sec;
-     struct bfd_link_info *info ATTRIBUTE_UNUSED;
+_bfd_generic_link_just_syms (asection *sec,
+                            struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
   sec->output_section = bfd_abs_section_ptr;
   sec->output_offset = sec->vma;
@@ -776,10 +752,9 @@ _bfd_generic_link_just_syms (sec, info)
 /* Add symbols from an object file to the global hash table.  */
 
 static bfd_boolean
-generic_link_add_symbols (abfd, info, collect)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     bfd_boolean collect;
+generic_link_add_symbols (bfd *abfd,
+                         struct bfd_link_info *info,
+                         bfd_boolean collect)
 {
   bfd_boolean ret;
 
@@ -806,10 +781,9 @@ generic_link_add_symbols (abfd, info, collect)
 /* Add symbols from an object file to the global hash table.  */
 
 static bfd_boolean
-generic_link_add_object_symbols (abfd, info, collect)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     bfd_boolean collect;
+generic_link_add_object_symbols (bfd *abfd,
+                                struct bfd_link_info *info,
+                                bfd_boolean collect)
 {
   bfd_size_type symcount;
   struct symbol_cache_entry **outsyms;
@@ -848,30 +822,20 @@ struct archive_hash_table
   struct bfd_hash_table table;
 };
 
-static struct bfd_hash_entry *archive_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static bfd_boolean archive_hash_table_init
-  PARAMS ((struct archive_hash_table *,
-          struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
-                                      struct bfd_hash_table *,
-                                      const char *)));
-
 /* Create a new entry for an archive hash table.  */
 
 static struct bfd_hash_entry *
-archive_hash_newfunc (entry, table, string)
-     struct bfd_hash_entry *entry;
-     struct bfd_hash_table *table;
-     const char *string;
+archive_hash_newfunc (struct bfd_hash_entry *entry,
+                     struct bfd_hash_table *table,
+                     const char *string)
 {
   struct archive_hash_entry *ret = (struct archive_hash_entry *) entry;
 
   /* Allocate the structure if it has not already been allocated by a
      subclass.  */
-  if (ret == (struct archive_hash_entry *) NULL)
-    ret = ((struct archive_hash_entry *)
-          bfd_hash_allocate (table, sizeof (struct archive_hash_entry)));
-  if (ret == (struct archive_hash_entry *) NULL)
+  if (ret == NULL)
+    ret = bfd_hash_allocate (table, sizeof (struct archive_hash_entry));
+  if (ret == NULL)
     return NULL;
 
   /* Call the allocation method of the superclass.  */
@@ -881,20 +845,20 @@ archive_hash_newfunc (entry, table, string)
   if (ret)
     {
       /* Initialize the local fields.  */
-      ret->defs = (struct archive_list *) NULL;
+      ret->defs = NULL;
     }
 
-  return (struct bfd_hash_entry *) ret;
+  return &ret->root;
 }
 
 /* Initialize an archive hash table.  */
 
 static bfd_boolean
-archive_hash_table_init (table, newfunc)
-     struct archive_hash_table *table;
-     struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
-                                               struct bfd_hash_table *,
-                                               const char *));
+archive_hash_table_init
+  (struct archive_hash_table *table,
+   struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
+                                     struct bfd_hash_table *,
+                                     const char *))
 {
   return bfd_hash_table_init (&table->table, newfunc);
 }
@@ -947,11 +911,10 @@ archive_hash_table_init (table, newfunc)
    object file to be included.  */
 
 bfd_boolean
-_bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     bfd_boolean (*checkfn)
-       PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *pneeded));
+_bfd_generic_link_add_archive_symbols
+  (bfd *abfd,
+   struct bfd_link_info *info,
+   bfd_boolean (*checkfn) (bfd *, struct bfd_link_info *, bfd_boolean *))
 {
   carsym *arsyms;
   carsym *arsym_end;
@@ -964,7 +927,7 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
   if (! bfd_has_map (abfd))
     {
       /* An empty archive is a special case.  */
-      if (bfd_openr_next_archived_file (abfd, (bfd *) NULL) == NULL)
+      if (bfd_openr_next_archived_file (abfd, NULL) == NULL)
        return TRUE;
       bfd_set_error (bfd_error_no_armap);
       return FALSE;
@@ -983,16 +946,14 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
       struct archive_list *l, **pp;
 
       arh = archive_hash_lookup (&arsym_hash, arsym->name, TRUE, FALSE);
-      if (arh == (struct archive_hash_entry *) NULL)
+      if (arh == NULL)
        goto error_return;
       l = ((struct archive_list *)
           archive_hash_allocate (&arsym_hash, sizeof (struct archive_list)));
       if (l == NULL)
        goto error_return;
       l->indx = indx;
-      for (pp = &arh->defs;
-          *pp != (struct archive_list *) NULL;
-          pp = &(*pp)->next)
+      for (pp = &arh->defs; *pp != NULL; pp = &(*pp)->next)
        ;
       *pp = l;
       l->next = NULL;
@@ -1006,7 +967,7 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
   /* New undefined symbols are added to the end of the list, so we
      only need to look through it once.  */
   pundef = &info->hash->undefs;
-  while (*pundef != (struct bfd_link_hash_entry *) NULL)
+  while (*pundef != NULL)
     {
       struct bfd_link_hash_entry *h;
       struct archive_hash_entry *arh;
@@ -1035,14 +996,14 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
 
       /* Look for this symbol in the archive symbol map.  */
       arh = archive_hash_lookup (&arsym_hash, h->root.string, FALSE, FALSE);
-      if (arh == (struct archive_hash_entry *) NULL)
+      if (arh == NULL)
        {
          /* If we haven't found the exact symbol we're looking for,
             let's look for its import thunk */
          if (info->pei386_auto_import)
            {
              bfd_size_type amt = strlen (h->root.string) + 10;
-             char *buf = (char *) bfd_malloc (amt);
+             char *buf = bfd_malloc (amt);
              if (buf == NULL)
                return FALSE;
 
@@ -1050,14 +1011,14 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
              arh = archive_hash_lookup (&arsym_hash, buf, FALSE, FALSE);
              free(buf);
            }
-         if (arh == (struct archive_hash_entry *) NULL)
+         if (arh == NULL)
            {
              pundef = &(*pundef)->next;
              continue;
            }
        }
       /* Look at all the objects which define this symbol.  */
-      for (l = arh->defs; l != (struct archive_list *) NULL; l = l->next)
+      for (l = arh->defs; l != NULL; l = l->next)
        {
          bfd *element;
          bfd_boolean needed;
@@ -1068,7 +1029,7 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
            break;
 
          element = bfd_get_elt_at_index (abfd, l->indx);
-         if (element == (bfd *) NULL)
+         if (element == NULL)
            goto error_return;
 
          /* If we've already included this element, or if we've
@@ -1122,10 +1083,10 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
    for finding them.  */
 
 static bfd_boolean
-generic_link_check_archive_element_no_collect (abfd, info, pneeded)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     bfd_boolean *pneeded;
+generic_link_check_archive_element_no_collect (
+                                              bfd *abfd,
+                                              struct bfd_link_info *info,
+                                              bfd_boolean *pneeded)
 {
   return generic_link_check_archive_element (abfd, info, pneeded, FALSE);
 }
@@ -1135,10 +1096,9 @@ generic_link_check_archive_element_no_collect (abfd, info, pneeded)
    symbol name, as collect2 does.  */
 
 static bfd_boolean
-generic_link_check_archive_element_collect (abfd, info, pneeded)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     bfd_boolean *pneeded;
+generic_link_check_archive_element_collect (bfd *abfd,
+                                           struct bfd_link_info *info,
+                                           bfd_boolean *pneeded)
 {
   return generic_link_check_archive_element (abfd, info, pneeded, TRUE);
 }
@@ -1147,11 +1107,10 @@ generic_link_check_archive_element_collect (abfd, info, pneeded)
    constructors.  */
 
 static bfd_boolean
-generic_link_check_archive_element (abfd, info, pneeded, collect)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     bfd_boolean *pneeded;
-     bfd_boolean collect;
+generic_link_check_archive_element (bfd *abfd,
+                                   struct bfd_link_info *info,
+                                   bfd_boolean *pneeded,
+                                   bfd_boolean collect)
 {
   asymbol **pp, **ppend;
 
@@ -1181,7 +1140,7 @@ generic_link_check_archive_element (abfd, info, pneeded, collect)
         SVR4 ABI, p. 4-27.  */
       h = bfd_link_hash_lookup (info->hash, bfd_asymbol_name (p), FALSE,
                                FALSE, TRUE);
-      if (h == (struct bfd_link_hash_entry *) NULL
+      if (h == NULL
          || (h->type != bfd_link_hash_undefined
              && h->type != bfd_link_hash_common))
        continue;
@@ -1215,7 +1174,7 @@ generic_link_check_archive_element (abfd, info, pneeded, collect)
          unsigned int power;
 
          symbfd = h->u.undef.abfd;
-         if (symbfd == (bfd *) NULL)
+         if (symbfd == NULL)
            {
              /* This symbol was created as undefined from outside
                 BFD.  We assume that we should link in the object
@@ -1236,9 +1195,8 @@ generic_link_check_archive_element (abfd, info, pneeded, collect)
             will be linked in.  */
          h->type = bfd_link_hash_common;
          h->u.c.p =
-           ((struct bfd_link_hash_common_entry *)
-            bfd_hash_allocate (&info->hash->table,
-                               sizeof (struct bfd_link_hash_common_entry)));
+           bfd_hash_allocate (&info->hash->table,
+                              sizeof (struct bfd_link_hash_common_entry));
          if (h->u.c.p == NULL)
            return FALSE;
 
@@ -1279,12 +1237,11 @@ generic_link_check_archive_element (abfd, info, pneeded, collect)
    as is done by collect2.  */
 
 static bfd_boolean
-generic_link_add_symbol_list (abfd, info, symbol_count, symbols, collect)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     bfd_size_type symbol_count;
-     asymbol **symbols;
-     bfd_boolean collect;
+generic_link_add_symbol_list (bfd *abfd,
+                             struct bfd_link_info *info,
+                             bfd_size_type symbol_count,
+                             asymbol **symbols,
+                             bfd_boolean collect)
 {
   asymbol **pp, **ppend;
 
@@ -1358,7 +1315,7 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols, collect)
             generic one.  */
          if (info->hash->creator == abfd->xvec)
            {
-             if (h->sym == (asymbol *) NULL
+             if (h->sym == NULL
                  || (! bfd_is_und_section (bfd_get_section (p))
                      && (! bfd_is_com_section (bfd_get_section (p))
                          || bfd_is_und_section (bfd_get_section (h->sym)))))
@@ -1377,7 +1334,7 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols, collect)
             it gets rewritten to not use asymbol structures.
             Setting this is also used to check whether these
             symbols were set up by the generic linker.  */
-         p->udata.p = (PTR) h;
+         p->udata.p = h;
        }
     }
 
@@ -1477,8 +1434,7 @@ static const enum link_action link_action[8][8] =
 /* Return the BFD in which a hash entry has been defined, if known.  */
 
 static bfd *
-hash_entry_bfd (h)
-     struct bfd_link_hash_entry *h;
+hash_entry_bfd (struct bfd_link_hash_entry *h)
 {
   while (h->type == bfd_link_hash_warning)
     h = h->u.i.link;
@@ -1517,18 +1473,16 @@ hash_entry_bfd (h)
      the hash table entry, and stored it in *HASHP.  */
 
 bfd_boolean
-_bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
-                                 string, copy, collect, hashp)
-     struct bfd_link_info *info;
-     bfd *abfd;
-     const char *name;
-     flagword flags;
-     asection *section;
-     bfd_vma value;
-     const char *string;
-     bfd_boolean copy;
-     bfd_boolean collect;
-     struct bfd_link_hash_entry **hashp;
+_bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
+                                 bfd *abfd,
+                                 const char *name,
+                                 flagword flags,
+                                 asection *section,
+                                 bfd_vma value,
+                                 const char *string,
+                                 bfd_boolean copy,
+                                 bfd_boolean collect,
+                                 struct bfd_link_hash_entry **hashp)
 {
   enum link_row row;
   struct bfd_link_hash_entry *h;
@@ -1572,16 +1526,15 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
     }
 
   if (info->notice_all
-      || (info->notice_hash != (struct bfd_hash_table *) NULL
-         && (bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE)
-             != (struct bfd_hash_entry *) NULL)))
+      || (info->notice_hash != NULL
+         && bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL))
     {
       if (! (*info->callbacks->notice) (info, h->root.string, abfd, section,
                                        value))
        return FALSE;
     }
 
-  if (hashp != (struct bfd_link_hash_entry **) NULL)
+  if (hashp != NULL)
     *hashp = h;
 
   do
@@ -1619,7 +1572,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
          if (! ((*info->callbacks->multiple_common)
                 (info, h->root.string,
                  h->u.c.p->section->owner, bfd_link_hash_common, h->u.c.size,
-                 abfd, bfd_link_hash_defined, (bfd_vma) 0)))
+                 abfd, bfd_link_hash_defined, 0)))
            return FALSE;
          /* Fall through.  */
        case DEF:
@@ -1694,9 +1647,8 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
            bfd_link_add_undef (info->hash, h);
          h->type = bfd_link_hash_common;
          h->u.c.p =
-           ((struct bfd_link_hash_common_entry *)
-            bfd_hash_allocate (&info->hash->table,
-                               sizeof (struct bfd_link_hash_common_entry)));
+           bfd_hash_allocate (&info->hash->table,
+                              sizeof (struct bfd_link_hash_common_entry));
          if (h->u.c.p == NULL)
            return FALSE;
 
@@ -1802,7 +1754,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
            else
              obfd = NULL;
            if (! ((*info->callbacks->multiple_common)
-                  (info, h->root.string, obfd, h->type, (bfd_vma) 0,
+                  (info, h->root.string, obfd, h->type, 0,
                    abfd, bfd_link_hash_common, value)))
              return FALSE;
          }
@@ -1856,7 +1808,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
          if (! ((*info->callbacks->multiple_common)
                 (info, h->root.string,
                  h->u.c.p->section->owner, bfd_link_hash_common, h->u.c.size,
-                 abfd, bfd_link_hash_indirect, (bfd_vma) 0)))
+                 abfd, bfd_link_hash_indirect, 0)))
            return FALSE;
          /* Fall through.  */
        case IND:
@@ -1868,7 +1820,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
               to.  */
            inh = bfd_wrapped_link_hash_lookup (abfd, info, string, TRUE,
                                                copy, FALSE);
-           if (inh == (struct bfd_link_hash_entry *) NULL)
+           if (inh == NULL)
              return FALSE;
            if (inh->type == bfd_link_hash_indirect
                && inh->u.i.link == h)
@@ -1913,8 +1865,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
            {
              if (! (*info->callbacks->warning) (info, h->u.i.warning,
                                                 h->root.string, abfd,
-                                                (asection *) NULL,
-                                                (bfd_vma) 0))
+                                                NULL, 0))
                return FALSE;
              /* Only issue a warning once.  */
              h->u.i.warning = NULL;
@@ -1937,8 +1888,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
        case WARN:
          /* Issue a warning.  */
          if (! (*info->callbacks->warning) (info, string, h->root.string,
-                                            hash_entry_bfd (h),
-                                            (asection *) NULL, (bfd_vma) 0))
+                                            hash_entry_bfd (h), NULL, 0))
            return FALSE;
          break;
 
@@ -1951,9 +1901,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
          if (h->next != NULL || info->hash->undefs_tail == h)
            {
              if (! (*info->callbacks->warning) (info, string, h->root.string,
-                                                hash_entry_bfd (h),
-                                                (asection *) NULL,
-                                                (bfd_vma) 0))
+                                                hash_entry_bfd (h), NULL, 0))
                return FALSE;
              break;
            }
@@ -1966,8 +1914,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
            /* STRING is the warning to give.  */
            sub = ((struct bfd_link_hash_entry *)
                   ((*info->hash->table.newfunc)
-                   ((struct bfd_hash_entry *) NULL, &info->hash->table,
-                    h->root.string)));
+                   (NULL, &info->hash->table, h->root.string)));
            if (sub == NULL)
              return FALSE;
            *sub = *h;
@@ -2004,9 +1951,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
 /* Generic final link routine.  */
 
 bfd_boolean
-_bfd_generic_final_link (abfd, info)
-     bfd *abfd;
-     struct bfd_link_info *info;
+_bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info)
 {
   bfd *sub;
   asection *o;
@@ -2014,7 +1959,7 @@ _bfd_generic_final_link (abfd, info)
   size_t outsymalloc;
   struct generic_write_global_symbol_info wginfo;
 
-  bfd_get_outsymbols (abfd) = (asymbol **) NULL;
+  bfd_get_outsymbols (abfd) = NULL;
   bfd_get_symcount (abfd) = 0;
   outsymalloc = 0;
 
@@ -2025,7 +1970,7 @@ _bfd_generic_final_link (abfd, info)
        p->u.indirect.section->linker_mark = TRUE;
 
   /* Build the output symbol table.  */
-  for (sub = info->input_bfds; sub != (bfd *) NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
     if (! _bfd_generic_link_output_symbols (abfd, sub, info, &outsymalloc))
       return FALSE;
 
@@ -2035,7 +1980,7 @@ _bfd_generic_final_link (abfd, info)
   wginfo.psymalloc = &outsymalloc;
   _bfd_generic_link_hash_traverse (_bfd_generic_hash_table (info),
                                   _bfd_generic_link_write_global_symbol,
-                                  (PTR) &wginfo);
+                                  &wginfo);
 
   /* Make sure we have a trailing NULL pointer on OUTSYMBOLS.  We
      shouldn't really need one, since we have SYMCOUNT, but some old
@@ -2046,14 +1991,10 @@ _bfd_generic_final_link (abfd, info)
   if (info->relocatable)
     {
       /* Allocate space for the output relocs for each section.  */
-      for (o = abfd->sections;
-          o != (asection *) NULL;
-          o = o->next)
+      for (o = abfd->sections; o != NULL; o = o->next)
        {
          o->reloc_count = 0;
-         for (p = o->link_order_head;
-              p != (struct bfd_link_order *) NULL;
-              p = p->next)
+         for (p = o->link_order_head; p != NULL; p = p->next)
            {
              if (p->type == bfd_section_reloc_link_order
                  || p->type == bfd_symbol_reloc_link_order)
@@ -2073,7 +2014,7 @@ _bfd_generic_final_link (abfd, info)
                                                       input_section);
                  if (relsize < 0)
                    return FALSE;
-                 relocs = (arelent **) bfd_malloc ((bfd_size_type) relsize);
+                 relocs = bfd_malloc (relsize);
                  if (!relocs && relsize != 0)
                    return FALSE;
                  symbols = _bfd_generic_link_get_symbols (input_bfd);
@@ -2095,7 +2036,7 @@ _bfd_generic_final_link (abfd, info)
 
              amt = o->reloc_count;
              amt *= sizeof (arelent *);
-             o->orelocation = (arelent **) bfd_alloc (abfd, amt);
+             o->orelocation = bfd_alloc (abfd, amt);
              if (!o->orelocation)
                return FALSE;
              o->flags |= SEC_RELOC;
@@ -2107,13 +2048,9 @@ _bfd_generic_final_link (abfd, info)
     }
 
   /* Handle all the link order information for the sections.  */
-  for (o = abfd->sections;
-       o != (asection *) NULL;
-       o = o->next)
+  for (o = abfd->sections; o != NULL; o = o->next)
     {
-      for (p = o->link_order_head;
-          p != (struct bfd_link_order *) NULL;
-          p = p->next)
+      for (p = o->link_order_head; p != NULL; p = p->next)
        {
          switch (p->type)
            {
@@ -2140,10 +2077,7 @@ _bfd_generic_final_link (abfd, info)
 /* Add an output symbol to the output BFD.  */
 
 static bfd_boolean
-generic_add_output_symbol (output_bfd, psymalloc, sym)
-     bfd *output_bfd;
-     size_t *psymalloc;
-     asymbol *sym;
+generic_add_output_symbol (bfd *output_bfd, size_t *psymalloc, asymbol *sym)
 {
   if (bfd_get_symcount (output_bfd) >= *psymalloc)
     {
@@ -2156,8 +2090,8 @@ generic_add_output_symbol (output_bfd, psymalloc, sym)
        *psymalloc *= 2;
       amt = *psymalloc;
       amt *= sizeof (asymbol *);
-      newsyms = (asymbol **) bfd_realloc (bfd_get_outsymbols (output_bfd), amt);
-      if (newsyms == (asymbol **) NULL)
+      newsyms = bfd_realloc (bfd_get_outsymbols (output_bfd), amt);
+      if (newsyms == NULL)
        return FALSE;
       bfd_get_outsymbols (output_bfd) = newsyms;
     }
@@ -2172,11 +2106,10 @@ generic_add_output_symbol (output_bfd, psymalloc, sym)
 /* Handle the symbols for an input BFD.  */
 
 bfd_boolean
-_bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
-     bfd *output_bfd;
-     bfd *input_bfd;
-     struct bfd_link_info *info;
-     size_t *psymalloc;
+_bfd_generic_link_output_symbols (bfd *output_bfd,
+                                 bfd *input_bfd,
+                                 struct bfd_link_info *info,
+                                 size_t *psymalloc)
 {
   asymbol **sym_ptr;
   asymbol **sym_end;
@@ -2185,13 +2118,11 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
     return FALSE;
 
   /* Create a filename symbol if we are supposed to.  */
-  if (info->create_object_symbols_section != (asection *) NULL)
+  if (info->create_object_symbols_section != NULL)
     {
       asection *sec;
 
-      for (sec = input_bfd->sections;
-          sec != (asection *) NULL;
-          sec = sec->next)
+      for (sec = input_bfd->sections; sec != NULL; sec = sec->next)
        {
          if (sec->output_section == info->create_object_symbols_section)
            {
@@ -2224,7 +2155,7 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
       struct generic_link_hash_entry *h;
       bfd_boolean output;
 
-      h = (struct generic_link_hash_entry *) NULL;
+      h = NULL;
       sym = *sym_ptr;
       if ((sym->flags & (BSF_INDIRECT
                         | BSF_WARNING
@@ -2236,7 +2167,7 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
          || bfd_is_ind_section (bfd_get_section (sym)))
        {
          if (sym->udata.p != NULL)
-           h = (struct generic_link_hash_entry *) sym->udata.p;
+           h = sym->udata.p;
          else if ((sym->flags & BSF_CONSTRUCTOR) != 0)
            {
              /* This case normally means that the main linker code
@@ -2259,7 +2190,7 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
                                               bfd_asymbol_name (sym),
                                               FALSE, FALSE, TRUE);
 
-         if (h != (struct generic_link_hash_entry *) NULL)
+         if (h != NULL)
            {
              /* Force all references to this symbol to point to
                 the same area in memory.  It is possible that
@@ -2268,7 +2199,7 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
                 check that.  */
              if (info->hash->creator == input_bfd->xvec)
                {
-                 if (h->sym != (asymbol *) NULL)
+                 if (h->sym != NULL)
                    *sym_ptr = sym = h->sym;
                }
 
@@ -2320,9 +2251,8 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
         write_file_locals in ldsym.c.  */
       if (info->strip == strip_all
          || (info->strip == strip_some
-             && (bfd_hash_lookup (info->keep_hash, bfd_asymbol_name (sym),
-                                  FALSE, FALSE)
-                 == (struct bfd_hash_entry *) NULL)))
+             && bfd_hash_lookup (info->keep_hash, bfd_asymbol_name (sym),
+                                 FALSE, FALSE) == NULL))
        output = FALSE;
       else if ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0)
        {
@@ -2401,7 +2331,7 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
        {
          if (! generic_add_output_symbol (output_bfd, psymalloc, sym))
            return FALSE;
-         if (h != (struct generic_link_hash_entry *) NULL)
+         if (h != NULL)
            h->written = TRUE;
        }
     }
@@ -2413,9 +2343,7 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
    hash table entry.  */
 
 static void
-set_symbol_from_hash (sym, h)
-     asymbol *sym;
-     struct bfd_link_hash_entry *h;
+set_symbol_from_hash (asymbol *sym, struct bfd_link_hash_entry *h)
 {
   switch (h->type)
     {
@@ -2476,12 +2404,10 @@ set_symbol_from_hash (sym, h)
    This is called for each symbol in the hash table.  */
 
 bfd_boolean
-_bfd_generic_link_write_global_symbol (h, data)
-     struct generic_link_hash_entry *h;
-     PTR data;
+_bfd_generic_link_write_global_symbol (struct generic_link_hash_entry *h,
+                                      void *data)
 {
-  struct generic_write_global_symbol_info *wginfo =
-    (struct generic_write_global_symbol_info *) data;
+  struct generic_write_global_symbol_info *wginfo = data;
   asymbol *sym;
 
   if (h->root.type == bfd_link_hash_warning)
@@ -2498,7 +2424,7 @@ _bfd_generic_link_write_global_symbol (h, data)
                              FALSE, FALSE) == NULL))
     return TRUE;
 
-  if (h->sym != (asymbol *) NULL)
+  if (h->sym != NULL)
     sym = h->sym;
   else
     {
@@ -2526,21 +2452,20 @@ _bfd_generic_link_write_global_symbol (h, data)
 /* Create a relocation.  */
 
 bfd_boolean
-_bfd_generic_reloc_link_order (abfd, info, sec, link_order)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *sec;
-     struct bfd_link_order *link_order;
+_bfd_generic_reloc_link_order (bfd *abfd,
+                              struct bfd_link_info *info,
+                              asection *sec,
+                              struct bfd_link_order *link_order)
 {
   arelent *r;
 
   if (! info->relocatable)
     abort ();
-  if (sec->orelocation == (arelent **) NULL)
+  if (sec->orelocation == NULL)
     abort ();
 
-  r = (arelent *) bfd_alloc (abfd, (bfd_size_type) sizeof (arelent));
-  if (r == (arelent *) NULL)
+  r = bfd_alloc (abfd, sizeof (arelent));
+  if (r == NULL)
     return FALSE;
 
   r->address = link_order->offset;
@@ -2562,12 +2487,11 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
           bfd_wrapped_link_hash_lookup (abfd, info,
                                         link_order->u.reloc.p->u.name,
                                         FALSE, FALSE, TRUE));
-      if (h == (struct generic_link_hash_entry *) NULL
+      if (h == NULL
          || ! h->written)
        {
          if (! ((*info->callbacks->unattached_reloc)
-                (info, link_order->u.reloc.p->u.name,
-                 (bfd *) NULL, (asection *) NULL, (bfd_vma) 0)))
+                (info, link_order->u.reloc.p->u.name, NULL, NULL, 0)))
            return FALSE;
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
@@ -2588,8 +2512,8 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
       file_ptr loc;
 
       size = bfd_get_reloc_size (r->howto);
-      buf = (bfd_byte *) bfd_zmalloc (size);
-      if (buf == (bfd_byte *) NULL)
+      buf = bfd_zmalloc (size);
+      if (buf == NULL)
        return FALSE;
       rstat = _bfd_relocate_contents (r->howto, abfd,
                                      (bfd_vma) link_order->u.reloc.p->addend,
@@ -2608,7 +2532,7 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
                   ? bfd_section_name (abfd, link_order->u.reloc.p->u.section)
                   : link_order->u.reloc.p->u.name),
                  r->howto->name, link_order->u.reloc.p->addend,
-                 (bfd *) NULL, (asection *) NULL, (bfd_vma) 0)))
+                 NULL, NULL, 0)))
            {
              free (buf);
              return FALSE;
@@ -2616,8 +2540,7 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
          break;
        }
       loc = link_order->offset * bfd_octets_per_byte (abfd);
-      ok = bfd_set_section_contents (abfd, sec, (PTR) buf, loc,
-                                    (bfd_size_type) size);
+      ok = bfd_set_section_contents (abfd, sec, buf, loc, size);
       free (buf);
       if (! ok)
        return FALSE;
@@ -2634,20 +2557,18 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
 /* Allocate a new link_order for a section.  */
 
 struct bfd_link_order *
-bfd_new_link_order (abfd, section)
-     bfd *abfd;
-     asection *section;
+bfd_new_link_order (bfd *abfd, asection *section)
 {
   bfd_size_type amt = sizeof (struct bfd_link_order);
   struct bfd_link_order *new;
 
-  new = (struct bfd_link_order *) bfd_zalloc (abfd, amt);
+  new = bfd_zalloc (abfd, amt);
   if (!new)
     return NULL;
 
   new->type = bfd_undefined_link_order;
 
-  if (section->link_order_tail != (struct bfd_link_order *) NULL)
+  if (section->link_order_tail != NULL)
     section->link_order_tail->next = new;
   else
     section->link_order_head = new;
@@ -2661,11 +2582,10 @@ bfd_new_link_order (abfd, section)
    of how the particular backends generates relocs.  */
 
 bfd_boolean
-_bfd_default_link_order (abfd, info, sec, link_order)
-     bfd *abfd;
-     struct bfd_link_info *info;
-     asection *sec;
-     struct bfd_link_order *link_order;
+_bfd_default_link_order (bfd *abfd,
+                        struct bfd_link_info *info,
+                        asection *sec,
+                        struct bfd_link_order *link_order)
 {
   switch (link_order->type)
     {
@@ -2685,11 +2605,10 @@ _bfd_default_link_order (abfd, info, sec, link_order)
 /* Default routine to handle a bfd_data_link_order.  */
 
 static bfd_boolean
-default_data_link_order (abfd, info, sec, link_order)
-     bfd *abfd;
-     struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     asection *sec;
-     struct bfd_link_order *link_order;
+default_data_link_order (bfd *abfd,
+                        struct bfd_link_info *info ATTRIBUTE_UNUSED,
+                        asection *sec,
+                        struct bfd_link_order *link_order)
 {
   bfd_size_type size;
   size_t fill_size;
@@ -2708,7 +2627,7 @@ default_data_link_order (abfd, info, sec, link_order)
   if (fill_size != 0 && fill_size < size)
     {
       bfd_byte *p;
-      fill = (bfd_byte *) bfd_malloc (size);
+      fill = bfd_malloc (size);
       if (fill == NULL)
        return FALSE;
       p = fill;
@@ -2740,13 +2659,11 @@ default_data_link_order (abfd, info, sec, link_order)
 /* Default routine to handle a bfd_indirect_link_order.  */
 
 static bfd_boolean
-default_indirect_link_order (output_bfd, info, output_section, link_order,
-                            generic_linker)
-     bfd *output_bfd;
-     struct bfd_link_info *info;
-     asection *output_section;
-     struct bfd_link_order *link_order;
-     bfd_boolean generic_linker;
+default_indirect_link_order (bfd *output_bfd,
+                            struct bfd_link_info *info,
+                            asection *output_section,
+                            struct bfd_link_order *link_order,
+                            bfd_boolean generic_linker)
 {
   asection *input_section;
   bfd *input_bfd;
@@ -2769,7 +2686,7 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
 
   if (info->relocatable
       && input_section->reloc_count > 0
-      && output_section->orelocation == (arelent **) NULL)
+      && output_section->orelocation == NULL)
     {
       /* Space has not been allocated for the output relocations.
         This can happen when we are called by a specific backend
@@ -2821,7 +2738,7 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
              /* sym->udata may have been set by
                 generic_link_add_symbol_list.  */
              if (sym->udata.p != NULL)
-               h = (struct bfd_link_hash_entry *) sym->udata.p;
+               h = sym->udata.p;
              else if (bfd_is_und_section (bfd_get_section (sym)))
                h = bfd_wrapped_link_hash_lookup (output_bfd, info,
                                                  bfd_asymbol_name (sym),
@@ -2838,7 +2755,7 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
 
   /* Get and relocate the section contents.  */
   sec_size = bfd_section_size (input_bfd, input_section);
-  contents = ((bfd_byte *) bfd_malloc (sec_size));
+  contents = bfd_malloc (sec_size);
   if (contents == NULL && sec_size != 0)
     goto error_return;
   new_contents = (bfd_get_relocated_section_contents
@@ -2850,7 +2767,7 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
   /* Output the section contents.  */
   loc = link_order->offset * bfd_octets_per_byte (output_bfd);
   if (! bfd_set_section_contents (output_bfd, output_section,
-                                 (PTR) new_contents, loc, link_order->size))
+                                 new_contents, loc, link_order->size))
     goto error_return;
 
   if (contents != NULL)
@@ -2867,14 +2784,13 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
    list.  */
 
 unsigned int
-_bfd_count_link_order_relocs (link_order)
-     struct bfd_link_order *link_order;
+_bfd_count_link_order_relocs (struct bfd_link_order *link_order)
 {
   register unsigned int c;
   register struct bfd_link_order *l;
 
   c = 0;
-  for (l = link_order; l != (struct bfd_link_order *) NULL; l = l->next)
+  for (l = link_order; l != NULL; l = l->next)
     {
       if (l->type == bfd_section_reloc_link_order
          || l->type == bfd_symbol_reloc_link_order)
@@ -2889,7 +2805,7 @@ FUNCTION
        bfd_link_split_section
 
 SYNOPSIS
-        bfd_boolean bfd_link_split_section(bfd *abfd, asection *sec);
+        bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
 
 DESCRIPTION
        Return nonzero if @var{sec} should be split during a
@@ -2902,9 +2818,8 @@ DESCRIPTION
 */
 
 bfd_boolean
-_bfd_generic_link_split_section (abfd, sec)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *sec ATTRIBUTE_UNUSED;
+_bfd_generic_link_split_section (bfd *abfd ATTRIBUTE_UNUSED,
+                                asection *sec ATTRIBUTE_UNUSED)
 {
   return FALSE;
 }
index 5237190d97ca7b30e275d6acca39453a796d6bd4..086775bde5b0ea62e6afd8848648d42084b526aa 100644 (file)
@@ -47,17 +47,17 @@ static unsigned int _bfd_id_counter = 0;
 /* Return a new BFD.  All BFD's are allocated through this routine.  */
 
 bfd *
-_bfd_new_bfd ()
+_bfd_new_bfd (void)
 {
   bfd *nbfd;
 
-  nbfd = (bfd *) bfd_zmalloc ((bfd_size_type) sizeof (bfd));
+  nbfd = bfd_zmalloc (sizeof (bfd));
   if (nbfd == NULL)
     return NULL;
 
   nbfd->id = _bfd_id_counter++;
 
-  nbfd->memory = (PTR) objalloc_create ();
+  nbfd->memory = objalloc_create ();
   if (nbfd->memory == NULL)
     {
       bfd_set_error (bfd_error_no_memory);
@@ -77,15 +77,15 @@ _bfd_new_bfd ()
       free (nbfd);
       return NULL;
     }
-  nbfd->sections = (asection *) NULL;
+  nbfd->sections = NULL;
   nbfd->section_tail = &nbfd->sections;
   nbfd->format = bfd_unknown;
-  nbfd->my_archive = (bfd *) NULL;
+  nbfd->my_archive = NULL;
   nbfd->origin = 0;
   nbfd->opened_once = FALSE;
   nbfd->output_has_begun = FALSE;
   nbfd->section_count = 0;
-  nbfd->usrdata = (PTR) NULL;
+  nbfd->usrdata = NULL;
   nbfd->cacheable = FALSE;
   nbfd->flags = BFD_NO_FLAGS;
   nbfd->mtime_set = FALSE;
@@ -96,8 +96,7 @@ _bfd_new_bfd ()
 /* Allocate a new BFD as a member of archive OBFD.  */
 
 bfd *
-_bfd_new_bfd_contained_in (obfd)
-     bfd *obfd;
+_bfd_new_bfd_contained_in (bfd *obfd)
 {
   bfd *nbfd;
 
@@ -114,8 +113,7 @@ _bfd_new_bfd_contained_in (obfd)
 /* Delete a BFD.  */
 
 void
-_bfd_delete_bfd (abfd)
-     bfd *abfd;
+_bfd_delete_bfd (bfd *abfd)
 {
   bfd_hash_table_free (&abfd->section_htab);
   objalloc_free ((struct objalloc *) abfd->memory);
@@ -133,7 +131,7 @@ FUNCTION
        bfd_openr
 
 SYNOPSIS
-       bfd *bfd_openr(const char *filename, const char *target);
+       bfd *bfd_openr (const char *filename, const char *target);
 
 DESCRIPTION
        Open the file @var{filename} (using <<fopen>>) with the target
@@ -148,9 +146,7 @@ DESCRIPTION
 */
 
 bfd *
-bfd_openr (filename, target)
-     const char *filename;
-     const char *target;
+bfd_openr (const char *filename, const char *target)
 {
   bfd *nbfd;
   const bfd_target *target_vec;
@@ -192,7 +188,7 @@ FUNCTION
        bfd_fdopenr
 
 SYNOPSIS
-       bfd *bfd_fdopenr(const char *filename, const char *target, int fd);
+       bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
 
 DESCRIPTION
        <<bfd_fdopenr>> is to <<bfd_fopenr>> much like <<fdopen>> is to
@@ -214,10 +210,7 @@ DESCRIPTION
 */
 
 bfd *
-bfd_fdopenr (filename, target, fd)
-     const char *filename;
-     const char *target;
-     int fd;
+bfd_fdopenr (const char *filename, const char *target, int fd)
 {
   bfd *nbfd;
   const bfd_target *target_vec;
@@ -244,14 +237,14 @@ bfd_fdopenr (filename, target, fd)
     }
 
 #ifndef HAVE_FDOPEN
-  nbfd->iostream = (PTR) fopen (filename, FOPEN_RB);
+  nbfd->iostream = fopen (filename, FOPEN_RB);
 #else
   /* (O_ACCMODE) parens are to avoid Ultrix header file bug.  */
   switch (fdflags & (O_ACCMODE))
     {
-    case O_RDONLY: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RB);   break;
-    case O_WRONLY: nbfd->iostream = (PTR) fdopen (fd, FOPEN_RUB);  break;
-    case O_RDWR:   nbfd->iostream = (PTR) fdopen (fd, FOPEN_RUB);  break;
+    case O_RDONLY: nbfd->iostream = fdopen (fd, FOPEN_RB);   break;
+    case O_WRONLY: nbfd->iostream = fdopen (fd, FOPEN_RUB);  break;
+    case O_RDWR:   nbfd->iostream = fdopen (fd, FOPEN_RUB);  break;
     default: abort ();
     }
 #endif
@@ -292,7 +285,7 @@ FUNCTION
        bfd_openstreamr
 
 SYNOPSIS
-       bfd *bfd_openstreamr(const char *, const char *, PTR);
+       bfd *bfd_openstreamr (const char *, const char *, void *);
 
 DESCRIPTION
 
@@ -301,12 +294,9 @@ DESCRIPTION
 */
 
 bfd *
-bfd_openstreamr (filename, target, streamarg)
-     const char *filename;
-     const char *target;
-     PTR streamarg;
+bfd_openstreamr (const char *filename, const char *target, void *streamarg)
 {
-  FILE *stream = (FILE *) streamarg;
+  FILE *stream = streamarg;
   bfd *nbfd;
   const bfd_target *target_vec;
 
@@ -321,7 +311,7 @@ bfd_openstreamr (filename, target, streamarg)
       return NULL;
     }
 
-  nbfd->iostream = (PTR) stream;
+  nbfd->iostream = stream;
   nbfd->filename = filename;
   nbfd->direction = read_direction;
 
@@ -344,7 +334,7 @@ FUNCTION
        bfd_openw
 
 SYNOPSIS
-       bfd *bfd_openw(const char *filename, const char *target);
+       bfd *bfd_openw (const char *filename, const char *target);
 
 DESCRIPTION
        Create a BFD, associated with file @var{filename}, using the
@@ -355,9 +345,7 @@ DESCRIPTION
 */
 
 bfd *
-bfd_openw (filename, target)
-     const char *filename;
-     const char *target;
+bfd_openw (const char *filename, const char *target)
 {
   bfd *nbfd;
   const bfd_target *target_vec;
@@ -415,8 +403,7 @@ RETURNS
 
 
 bfd_boolean
-bfd_close (abfd)
-     bfd *abfd;
+bfd_close (bfd *abfd)
 {
   bfd_boolean ret;
 
@@ -478,8 +465,7 @@ RETURNS
 */
 
 bfd_boolean
-bfd_close_all_done (abfd)
-     bfd *abfd;
+bfd_close_all_done (bfd *abfd)
 {
   bfd_boolean ret;
 
@@ -514,7 +500,7 @@ FUNCTION
        bfd_create
 
 SYNOPSIS
-       bfd *bfd_create(const char *filename, bfd *templ);
+       bfd *bfd_create (const char *filename, bfd *templ);
 
 DESCRIPTION
        Create a new BFD in the manner of <<bfd_openw>>, but without
@@ -523,9 +509,7 @@ DESCRIPTION
 */
 
 bfd *
-bfd_create (filename, templ)
-     const char *filename;
-     bfd *templ;
+bfd_create (const char *filename, bfd *templ)
 {
   bfd *nbfd;
 
@@ -559,8 +543,7 @@ RETURNS
 */
 
 bfd_boolean
-bfd_make_writable(abfd)
-     bfd *abfd;
+bfd_make_writable (bfd *abfd)
 {
   struct bfd_in_memory *bim;
 
@@ -570,9 +553,8 @@ bfd_make_writable(abfd)
       return FALSE;
     }
 
-  bim = ((struct bfd_in_memory *)
-        bfd_malloc ((bfd_size_type) sizeof (struct bfd_in_memory)));
-  abfd->iostream = (PTR) bim;
+  bim = bfd_malloc (sizeof (struct bfd_in_memory));
+  abfd->iostream = bim;
   /* bfd_bwrite will grow these as needed.  */
   bim->size = 0;
   bim->buffer = 0;
@@ -602,8 +584,7 @@ RETURNS
        <<TRUE>> is returned if all is ok, otherwise <<FALSE>>.  */
 
 bfd_boolean
-bfd_make_readable(abfd)
-     bfd *abfd;
+bfd_make_readable (bfd *abfd)
 {
   if (abfd->direction != write_direction || !(abfd->flags & BFD_IN_MEMORY))
     {
@@ -622,12 +603,12 @@ bfd_make_readable(abfd)
 
   abfd->where = 0;
   abfd->format = bfd_unknown;
-  abfd->my_archive = (bfd *) NULL;
+  abfd->my_archive = NULL;
   abfd->origin = 0;
   abfd->opened_once = FALSE;
   abfd->output_has_begun = FALSE;
   abfd->section_count = 0;
-  abfd->usrdata = (PTR) NULL;
+  abfd->usrdata = NULL;
   abfd->cacheable = FALSE;
   abfd->flags = BFD_IN_MEMORY;
   abfd->mtime_set = FALSE;
@@ -650,7 +631,7 @@ INTERNAL_FUNCTION
        bfd_alloc
 
 SYNOPSIS
-       PTR bfd_alloc (bfd *abfd, size_t wanted);
+       void *bfd_alloc (bfd *abfd, size_t wanted);
 
 DESCRIPTION
        Allocate a block of @var{wanted} bytes of memory attached to
@@ -658,12 +639,10 @@ DESCRIPTION
 */
 
 
-PTR
-bfd_alloc (abfd, size)
-     bfd *abfd;
-     bfd_size_type size;
+void *
+bfd_alloc (bfd *abfd, bfd_size_type size)
 {
-  PTR ret;
+  void *ret;
 
   if (size != (unsigned long) size)
     {
@@ -677,12 +656,10 @@ bfd_alloc (abfd, size)
   return ret;
 }
 
-PTR
-bfd_zalloc (abfd, size)
-     bfd *abfd;
-     bfd_size_type size;
+void *
+bfd_zalloc (bfd *abfd, bfd_size_type size)
 {
-  PTR res;
+  void *res;
 
   res = bfd_alloc (abfd, size);
   if (res)
@@ -694,9 +671,7 @@ bfd_zalloc (abfd, size)
    Note:  Also frees all more recently allocated blocks!  */
 
 void
-bfd_release (abfd, block)
-     bfd *abfd;
-     PTR block;
+bfd_release (bfd *abfd, void *block)
 {
   objalloc_free_block ((struct objalloc *) abfd->memory, block);
 }
@@ -716,17 +691,14 @@ bfd_release (abfd, block)
    without debug symbols).
 */
 
-static char *         get_debug_link_info         PARAMS ((bfd *, unsigned long *));
-static bfd_boolean    separate_debug_file_exists  PARAMS ((const char *, const unsigned long));
-static char *         find_separate_debug_file    PARAMS ((bfd *, const char *));
-
 #define GNU_DEBUGLINK  ".gnu_debuglink"
 /*
 FUNCTION
        bfd_calc_gnu_debuglink_crc32
 
 SYNOPSIS
-       unsigned long bfd_calc_gnu_debuglink_crc32 (unsigned long crc, const unsigned char *buf, bfd_size_type len);
+       unsigned long bfd_calc_gnu_debuglink_crc32
+         (unsigned long crc, const unsigned char *buf, bfd_size_type len);
 
 DESCRIPTION
        Computes a CRC value as used in the .gnu_debuglink section.
@@ -738,10 +710,9 @@ RETURNS
 */     
 
 unsigned long
-bfd_calc_gnu_debuglink_crc32 (crc, buf, len)
-     unsigned long crc;
-     const unsigned char *buf;
-     bfd_size_type len;
+bfd_calc_gnu_debuglink_crc32 (unsigned long crc,
+                             const unsigned char *buf,
+                             bfd_size_type len)
 {
   static const unsigned long crc32_table[256] =
     {
@@ -812,7 +783,7 @@ INTERNAL_FUNCTION
        get_debug_link_info
 
 SYNOPSIS
-       char * get_debug_link_info (bfd * abfd, unsigned long * crc32_out)
+       char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
 
 DESCRIPTION
        fetch the filename and CRC32 value for any separate debuginfo
@@ -821,9 +792,7 @@ DESCRIPTION
 */
 
 static char *
-get_debug_link_info (abfd, crc32_out)
-     bfd * abfd;
-     unsigned long * crc32_out;
+get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
 {
   asection * sect;
   bfd_size_type debuglink_size;
@@ -846,8 +815,7 @@ get_debug_link_info (abfd, crc32_out)
   if (contents == NULL)
     return NULL;
 
-  ret = bfd_get_section_contents (abfd, sect, contents,
-                                 (file_ptr)0, debuglink_size);
+  ret = bfd_get_section_contents (abfd, sect, contents, 0, debuglink_size);
   if (! ret)
     {
       free (contents);
@@ -858,7 +826,7 @@ get_debug_link_info (abfd, crc32_out)
   crc_offset = strlen (contents) + 1;
   crc_offset = (crc_offset + 3) & ~3;
 
-  crc32 = bfd_get_32 (abfd, (bfd_byte *) (contents + crc_offset));
+  crc32 = bfd_get_32 (abfd, contents + crc_offset);
 
   *crc32_out = crc32;
   return contents;
@@ -869,7 +837,8 @@ INTERNAL_FUNCTION
        separate_debug_file_exists
 
 SYNOPSIS
-       bfd_boolean separate_debug_file_exists (char * name, unsigned long crc32)
+       bfd_boolean separate_debug_file_exists
+         (char *name, unsigned long crc32);
 
 DESCRIPTION
        Checks to see if @var{name} is a file and if its contents
@@ -877,9 +846,7 @@ DESCRIPTION
 */
 
 static bfd_boolean
-separate_debug_file_exists (name, crc)
-     const char *name;
-     const unsigned long crc;
+separate_debug_file_exists (const char *name, const unsigned long crc)
 {
   static char buffer [8 * 1024];
   unsigned long file_crc = 0;
@@ -906,7 +873,7 @@ INTERNAL_FUNCTION
        find_separate_debug_file
 
 SYNOPSIS
-       char * find_separate_debug_file (bfd *abfd)
+       char *find_separate_debug_file (bfd *abfd);
 
 DESCRIPTION
        Searches @var{abfd} for a reference to separate debugging
@@ -918,9 +885,7 @@ DESCRIPTION
 */
 
 static char *
-find_separate_debug_file (abfd, debug_file_directory)
-     bfd *abfd;
-     const char *debug_file_directory;
+find_separate_debug_file (bfd *abfd, const char *debug_file_directory)
 {
   char *basename;
   char *dir;
@@ -1026,7 +991,7 @@ FUNCTION
        bfd_follow_gnu_debuglink
 
 SYNOPSIS
-       char * bfd_follow_gnu_debuglink(bfd *abfd, const char *dir);
+       char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
 
 DESCRIPTION
 
@@ -1045,9 +1010,7 @@ RETURNS
 */
 
 char *
-bfd_follow_gnu_debuglink (abfd, dir)
-     bfd *abfd;
-     const char * dir;
+bfd_follow_gnu_debuglink (bfd *abfd, const char *dir)
 {
 #if 0 /* Disabled until DEBUGDIR can be defined by configure.in  */
   if (dir == NULL)
@@ -1061,7 +1024,8 @@ FUNCTION
        bfd_create_gnu_debuglink_section
 
 SYNOPSIS
-       struct sec * bfd_create_gnu_debuglink_section (bfd * abfd, const char * filename);
+       struct sec *bfd_create_gnu_debuglink_section
+         (bfd *abfd, const char *filename);
 
 DESCRIPTION
 
@@ -1074,12 +1038,10 @@ RETURNS
 */
 
 asection *
-bfd_create_gnu_debuglink_section 
-    (bfd *        abfd,
-     const char * filename)
+bfd_create_gnu_debuglink_section (bfd *abfd, const char *filename)
 {
-  asection *      sect;
-  bfd_size_type   debuglink_size;
+  asection *sect;
+  bfd_size_type debuglink_size;
 
   if (abfd == NULL || filename == NULL)
     {
@@ -1126,7 +1088,8 @@ FUNCTION
        bfd_fill_in_gnu_debuglink_section
 
 SYNOPSIS
-       bfd_boolean bfd_fill_in_gnu_debuglink_section (bfd * abfd, struct sec * sect, const char * filename);
+       bfd_boolean bfd_fill_in_gnu_debuglink_section
+         (bfd *abfd, struct sec *sect, const char *filename);
 
 DESCRIPTION
 
@@ -1141,10 +1104,9 @@ RETURNS
 */
 
 bfd_boolean
-bfd_fill_in_gnu_debuglink_section
-    (bfd *        abfd,
-     struct sec * sect,
-     const char * filename)
+bfd_fill_in_gnu_debuglink_section (bfd *abfd,
+                                  struct sec *sect,
+                                  const char *filename)
 {
   bfd_size_type debuglink_size;
   unsigned long crc32;
@@ -1198,10 +1160,9 @@ bfd_fill_in_gnu_debuglink_section
   strcpy (contents, filename);
   crc_offset = debuglink_size - 4;
 
-  bfd_put_32 (abfd, crc32, (bfd_byte *) (contents + crc_offset));
+  bfd_put_32 (abfd, crc32, contents + crc_offset);
 
-  if (! bfd_set_section_contents (abfd, sect, contents,
-                                 (file_ptr)0, debuglink_size))
+  if (! bfd_set_section_contents (abfd, sect, contents, 0, debuglink_size))
     {
       /* XXX Should we delete the section from the bfd ?  */
       free (contents);
index bbd8ddad0963125a2c66f4b3901d92786d44a4f5..07742dd9f27f10784527a4cb04e8f83761cd7b76 100644 (file)
@@ -1,19 +1,19 @@
 aix386-core.c
 aix5ppc-core.c
+aout0.c
+aout32.c
+aout64.c
 aout-adobe.c
 aout-arm.c
 aout-cris.c
+aoutf1.h
 aout-ns32k.c
 aout-sparcle.c
 aout-target.h
 aout-tic30.c
-aout0.c
-aout32.c
-aout64.c
-aoutf1.h
 aoutx.h
-archive.c
 archive64.c
+archive.c
 archures.c
 armnetbsd.c
 bfd.c
@@ -26,17 +26,21 @@ cf-i386lynx.c
 cf-m68klynx.c
 cf-sparclynx.c
 cisco-core.c
+coff64-rs6000.c
 coff-a29k.c
 coff-alpha.c
 coff-apollo.c
 coff-arm.c
 coff-aux.c
+coffcode.h
+coffgen.c
 coff-go32.c
 coff-h8300.c
 coff-h8500.c
 coff-i386.c
 coff-i860.c
 coff-i960.c
+cofflink.c
 coff-m68k.c
 coff-m88k.c
 coff-mips.c
@@ -46,6 +50,7 @@ coff-sh.c
 coff-sparc.c
 coff-stgo32.c
 coff-svm68k.c
+coffswap.h
 coff-tic30.c
 coff-tic4x.c
 coff-tic54x.c
@@ -54,11 +59,6 @@ coff-u68k.c
 coff-w65.c
 coff-we32k.c
 coff-z8k.c
-coff64-rs6000.c
-coffcode.h
-coffgen.c
-cofflink.c
-coffswap.h
 corefile.c
 cpu-a29k.c
 cpu-alpha.c
@@ -121,16 +121,11 @@ ecofflink.c
 ecoffswap.h
 efi-app-ia32.c
 efi-app-ia64.c
-elf-bfd.h
-elf-eh-frame.c
-elf-hppa.h
-elf-m10200.c
-elf-m10300.c
-elf-strtab.c
-elf.c
+elf32-am33lin.c
 elf32-arc.c
 elf32-arm.h
 elf32-avr.c
+elf32.c
 elf32-cris.c
 elf32-d10v.c
 elf32-d30v.c
@@ -161,16 +156,16 @@ elf32-or32.c
 elf32-pj.c
 elf32-ppc.c
 elf32-s390.c
-elf32-sh.c
-elf32-sh64-com.c
 elf32-sh64.c
+elf32-sh64-com.c
+elf32-sh.c
 elf32-sparc.c
 elf32-v850.c
 elf32-vax.c
 elf32-xstormy16.c
 elf32-xtensa.c
-elf32.c
 elf64-alpha.c
+elf64.c
 elf64-gen.c
 elf64-hppa.c
 elf64-hppa.h
@@ -181,14 +176,20 @@ elf64-s390.c
 elf64-sh64.c
 elf64-sparc.c
 elf64-x86-64.c
-elf64.c
 elfarm-nabi.c
 elfarm-oabi.c
+elf-bfd.h
+elf.c
 elfcode.h
 elfcore.h
+elf-eh-frame.c
+elf-hppa.h
 elflink.c
 elflink.h
+elf-m10200.c
+elf-m10300.c
 elfn32-mips.c
+elf-strtab.c
 elfxx-mips.c
 epoc-pe-arm.c
 epoc-pei-arm.c
@@ -239,16 +240,16 @@ mipsbsd.c
 mmo.c
 netbsd.h
 newsos3.c
-nlm-target.h
-nlm.c
 nlm32-alpha.c
+nlm32.c
 nlm32-i386.c
 nlm32-ppc.c
 nlm32-sparc.c
-nlm32.c
 nlm64.c
+nlm.c
 nlmcode.h
 nlmswap.h
+nlm-target.h
 ns32k.h
 ns32knetbsd.c
 oasys.c
@@ -257,24 +258,24 @@ osf-core.c
 pc532-mach.c
 pdp11.c
 pe-arm.c
-pe-i386.c
-pe-mcore.c
-pe-mips.c
-pe-ppc.c
-pe-sh.c
-pef-traceback.h
 pef.c
 pef.h
+pef-traceback.h
+pe-i386.c
 pei-arm.c
+peicode.h
 pei-i386.c
 pei-mcore.c
 pei-mips.c
 pei-ppc.c
 pei-sh.c
-peicode.h
+pe-mcore.c
+pe-mips.c
+pe-ppc.c
+pe-sh.c
 ppcboot.c
-reloc.c
 reloc16.c
+reloc.c
 riscix.c
 sco5-core.c
 section.c
@@ -285,8 +286,8 @@ sparclinux.c
 sparclynx.c
 sparcnetbsd.c
 srec.c
-stab-syms.c
 stabs.c
+stab-syms.c
 sunos.c
 syms.c
 targets.c
@@ -297,14 +298,14 @@ vaxbsd.c
 vaxnetbsd.c
 versados.c
 version.h
+vms.c
 vms-gsd.c
+vms.h
 vms-hdr.c
 vms-misc.c
 vms-tir.c
-vms.c
-vms.h
-xcoff-target.h
 xcofflink.c
+xcoff-target.h
 xsym.c
 xsym.h
 xtensa-isa.c
index f402c966b59bd9f2365fd0742a64e787c17ae39d..5d4f2349a028c41f5ca18b18b89289dc3c4ee11b 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-06-03 14:40+0100\n"
+"POT-Creation-Date: 2003-07-17 14:52+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -51,126 +51,126 @@ msgstr ""
 
 #: aoutx.h:3776
 #, c-format
-msgid "%s: relocateable link from %s to %s not supported"
+msgid "%s: relocatable link from %s to %s not supported"
 msgstr ""
 
-#: archive.c:1823
+#: archive.c:1751
 msgid "Warning: writing archive was slow: rewriting timestamp\n"
 msgstr ""
 
-#: archive.c:2090
+#: archive.c:2014
 msgid "Reading archive file mod timestamp"
 msgstr ""
 
-#: archive.c:2116
+#: archive.c:2040
 msgid "Writing updated armap timestamp"
 msgstr ""
 
-#: bfd.c:286
+#: bfd.c:280
 msgid "No error"
 msgstr ""
 
-#: bfd.c:287
+#: bfd.c:281
 msgid "System call error"
 msgstr ""
 
-#: bfd.c:288
+#: bfd.c:282
 msgid "Invalid bfd target"
 msgstr ""
 
-#: bfd.c:289
+#: bfd.c:283
 msgid "File in wrong format"
 msgstr ""
 
-#: bfd.c:290
+#: bfd.c:284
 msgid "Archive object file in wrong format"
 msgstr ""
 
-#: bfd.c:291
+#: bfd.c:285
 msgid "Invalid operation"
 msgstr ""
 
-#: bfd.c:292
+#: bfd.c:286
 msgid "Memory exhausted"
 msgstr ""
 
-#: bfd.c:293
+#: bfd.c:287
 msgid "No symbols"
 msgstr ""
 
-#: bfd.c:294
+#: bfd.c:288
 msgid "Archive has no index; run ranlib to add one"
 msgstr ""
 
-#: bfd.c:295
+#: bfd.c:289
 msgid "No more archived files"
 msgstr ""
 
-#: bfd.c:296
+#: bfd.c:290
 msgid "Malformed archive"
 msgstr ""
 
-#: bfd.c:297
+#: bfd.c:291
 msgid "File format not recognized"
 msgstr ""
 
-#: bfd.c:298
+#: bfd.c:292
 msgid "File format is ambiguous"
 msgstr ""
 
-#: bfd.c:299
+#: bfd.c:293
 msgid "Section has no contents"
 msgstr ""
 
-#: bfd.c:300
+#: bfd.c:294
 msgid "Nonrepresentable section on output"
 msgstr ""
 
-#: bfd.c:301
+#: bfd.c:295
 msgid "Symbol needs debug section which does not exist"
 msgstr ""
 
-#: bfd.c:302
+#: bfd.c:296
 msgid "Bad value"
 msgstr ""
 
-#: bfd.c:303
+#: bfd.c:297
 msgid "File truncated"
 msgstr ""
 
-#: bfd.c:304
+#: bfd.c:298
 msgid "File too big"
 msgstr ""
 
-#: bfd.c:305
+#: bfd.c:299
 msgid "#<Invalid error code>"
 msgstr ""
 
-#: bfd.c:712
+#: bfd.c:687
 #, c-format
 msgid "BFD %s assertion fail %s:%d"
 msgstr ""
 
-#: bfd.c:731
+#: bfd.c:703
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d in %s\n"
 msgstr ""
 
-#: bfd.c:735
+#: bfd.c:707
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d\n"
 msgstr ""
 
-#: bfd.c:737
+#: bfd.c:709
 msgid "Please report this bug.\n"
 msgstr ""
 
-#: bfdwin.c:206
+#: bfdwin.c:202
 #, c-format
 msgid "not mapping: data=%lx mapped=%d\n"
 msgstr ""
 
-#: bfdwin.c:209
+#: bfdwin.c:205
 msgid "not mapping: env var not set\n"
 msgstr ""
 
@@ -184,23 +184,23 @@ msgstr ""
 msgid "%s: symbol `%s' has unrecognized smclas %d"
 msgstr ""
 
-#: coff-a29k.c:119
+#: coff-a29k.c:120
 msgid "Missing IHCONST"
 msgstr ""
 
-#: coff-a29k.c:180
+#: coff-a29k.c:181
 msgid "Missing IHIHALF"
 msgstr ""
 
-#: coff-a29k.c:212 coff-or32.c:236
+#: coff-a29k.c:213 coff-or32.c:236
 msgid "Unrecognized reloc"
 msgstr ""
 
-#: coff-a29k.c:408
+#: coff-a29k.c:409
 msgid "missing IHCONST reloc"
 msgstr ""
 
-#: coff-a29k.c:498
+#: coff-a29k.c:499
 msgid "missing IHIHALF reloc"
 msgstr ""
 
@@ -241,7 +241,7 @@ msgstr ""
 msgid "  consider relinking with --support-old-code enabled"
 msgstr ""
 
-#: coff-arm.c:1788 coff-tic80.c:686 cofflink.c:3038
+#: coff-arm.c:1788 coff-tic80.c:687 cofflink.c:3038
 #, c-format
 msgid "%s: bad reloc address 0x%lx in section `%s'"
 msgstr ""
@@ -339,42 +339,42 @@ msgstr ""
 msgid "Warning: Clearing the interworking flag of %s due to outside request"
 msgstr ""
 
-#: coffcode.h:1102
+#: coffcode.h:1108
 #, c-format
 msgid "%s (%s): Section flag %s (0x%x) ignored"
 msgstr ""
 
-#: coffcode.h:2178
+#: coffcode.h:2214
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
 msgstr ""
 
-#: coffcode.h:4401
+#: coffcode.h:4439
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in line numbers"
 msgstr ""
 
-#: coffcode.h:4415
+#: coffcode.h:4453
 #, c-format
 msgid "%s: warning: duplicate line number information for `%s'"
 msgstr ""
 
-#: coffcode.h:4769
+#: coffcode.h:4807
 #, c-format
 msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
 msgstr ""
 
-#: coffcode.h:4902
+#: coffcode.h:4940
 #, c-format
 msgid "warning: %s: local symbol `%s' has no section"
 msgstr ""
 
-#: coff-tic4x.c:248 coff-tic54x.c:403 coffcode.h:5009
+#: coff-tic4x.c:218 coff-tic54x.c:373 coffcode.h:5047
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
 msgstr ""
 
-#: coffcode.h:5047
+#: coffcode.h:5085
 #, c-format
 msgid "%s: illegal relocation type %d at address 0x%lx"
 msgstr ""
@@ -384,7 +384,7 @@ msgstr ""
 msgid "%s: bad string table size %lu"
 msgstr ""
 
-#: coff-h8300.c:1096
+#: coff-h8300.c:1047
 #, c-format
 msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
 msgstr ""
@@ -413,11 +413,11 @@ msgstr ""
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
 msgstr ""
 
-#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2193 elf32-mips.c:1741
+#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2193 elf32-mips.c:1783
 msgid "unsupported reloc type"
 msgstr ""
 
-#: coff-mips.c:839 elf32-mips.c:1061 elf64-mips.c:1587 elfn32-mips.c:1553
+#: coff-mips.c:839 elf32-mips.c:1088 elf64-mips.c:1590 elfn32-mips.c:1554
 msgid "GP relative relocation when _gp not defined"
 msgstr ""
 
@@ -441,7 +441,7 @@ msgstr ""
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
 msgstr ""
 
-#: coff-tic4x.c:200 coff-tic54x.c:292 coff-tic80.c:449
+#: coff-tic4x.c:170 coff-tic54x.c:288 coff-tic80.c:450
 #, c-format
 msgid "Unrecognized reloc type 0x%x"
 msgstr ""
@@ -531,61 +531,61 @@ msgstr ""
 msgid "Dwarf Error: Bad abbrev number: %u."
 msgstr ""
 
-#: ecoff.c:1337
+#: ecoff.c:1339
 #, c-format
 msgid "Unknown basic type %d"
 msgstr ""
 
-#: ecoff.c:1597
+#: ecoff.c:1599
 #, c-format
 msgid ""
 "\n"
 "      End+1 symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1604 ecoff.c:1607
+#: ecoff.c:1606 ecoff.c:1609
 #, c-format
 msgid ""
 "\n"
 "      First symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1619
+#: ecoff.c:1621
 #, c-format
 msgid ""
 "\n"
 "      End+1 symbol: %-7ld   Type:  %s"
 msgstr ""
 
-#: ecoff.c:1626
+#: ecoff.c:1628
 #, c-format
 msgid ""
 "\n"
 "      Local symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1634
+#: ecoff.c:1636
 #, c-format
 msgid ""
 "\n"
 "      struct; End+1 symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1639
+#: ecoff.c:1641
 #, c-format
 msgid ""
 "\n"
 "      union; End+1 symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1644
+#: ecoff.c:1646
 #, c-format
 msgid ""
 "\n"
 "      enum; End+1 symbol: %ld"
 msgstr ""
 
-#: ecoff.c:1650
+#: ecoff.c:1652
 #, c-format
 msgid ""
 "\n"
@@ -602,7 +602,7 @@ msgstr ""
 msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
 msgstr ""
 
-#: elf32-arm.h:1918 elf32-sh.c:4703 elf64-sh64.c:1613
+#: elf32-arm.h:1918 elf32-sh.c:4706 elf64-sh64.c:1613
 #, c-format
 msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
 msgstr ""
@@ -613,33 +613,33 @@ msgid ""
 "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
 msgstr ""
 
-#: elf-m10200.c:442 elf-m10300.c:655 elf32-arm.h:2088 elf32-avr.c:812
-#: elf32-cris.c:1383 elf32-d10v.c:481 elf32-fr30.c:633 elf32-frv.c:815
-#: elf32-h8300.c:528 elf32-i860.c:1028 elf32-ip2k.c:1586 elf32-iq2000.c:699
+#: elf-m10200.c:442 elf-m10300.c:1695 elf32-arm.h:2088 elf32-avr.c:812
+#: elf32-cris.c:1390 elf32-d10v.c:482 elf32-fr30.c:634 elf32-frv.c:815
+#: elf32-h8300.c:509 elf32-i860.c:1028 elf32-ip2k.c:1586 elf32-iq2000.c:699
 #: elf32-m32r.c:1283 elf32-m68hc1x.c:1305 elf32-msp430.c:510
-#: elf32-openrisc.c:436 elf32-v850.c:1753 elf32-xstormy16.c:976
+#: elf32-openrisc.c:436 elf32-v850.c:1777 elf32-xstormy16.c:976
 #: elf64-mmix.c:1332
 msgid "internal error: out of range error"
 msgstr ""
 
-#: elf-m10200.c:446 elf-m10300.c:659 elf32-arm.h:2092 elf32-avr.c:816
-#: elf32-cris.c:1387 elf32-d10v.c:485 elf32-fr30.c:637 elf32-frv.c:819
-#: elf32-h8300.c:532 elf32-i860.c:1032 elf32-iq2000.c:703 elf32-m32r.c:1287
+#: elf-m10200.c:446 elf-m10300.c:1699 elf32-arm.h:2092 elf32-avr.c:816
+#: elf32-cris.c:1394 elf32-d10v.c:486 elf32-fr30.c:638 elf32-frv.c:819
+#: elf32-h8300.c:513 elf32-i860.c:1032 elf32-iq2000.c:703 elf32-m32r.c:1287
 #: elf32-m68hc1x.c:1309 elf32-msp430.c:514 elf32-openrisc.c:440
-#: elf32-v850.c:1757 elf32-xstormy16.c:980 elf64-mmix.c:1336 elfxx-mips.c:6533
+#: elf32-v850.c:1781 elf32-xstormy16.c:980 elf64-mmix.c:1336 elfxx-mips.c:6452
 msgid "internal error: unsupported relocation error"
 msgstr ""
 
-#: elf-m10200.c:450 elf-m10300.c:663 elf32-arm.h:2096 elf32-d10v.c:489
-#: elf32-h8300.c:536 elf32-m32r.c:1291 elf32-m68hc1x.c:1313
+#: elf-m10200.c:450 elf-m10300.c:1703 elf32-arm.h:2096 elf32-d10v.c:490
+#: elf32-h8300.c:517 elf32-m32r.c:1291 elf32-m68hc1x.c:1313
 msgid "internal error: dangerous error"
 msgstr ""
 
-#: elf-m10200.c:454 elf-m10300.c:667 elf32-arm.h:2100 elf32-avr.c:824
-#: elf32-cris.c:1395 elf32-d10v.c:493 elf32-fr30.c:645 elf32-frv.c:827
-#: elf32-h8300.c:540 elf32-i860.c:1040 elf32-ip2k.c:1601 elf32-iq2000.c:711
+#: elf-m10200.c:454 elf-m10300.c:1707 elf32-arm.h:2100 elf32-avr.c:824
+#: elf32-cris.c:1402 elf32-d10v.c:494 elf32-fr30.c:646 elf32-frv.c:827
+#: elf32-h8300.c:521 elf32-i860.c:1040 elf32-ip2k.c:1601 elf32-iq2000.c:711
 #: elf32-m32r.c:1295 elf32-m68hc1x.c:1317 elf32-msp430.c:522
-#: elf32-openrisc.c:448 elf32-v850.c:1777 elf32-xstormy16.c:988
+#: elf32-openrisc.c:448 elf32-v850.c:1801 elf32-xstormy16.c:988
 #: elf64-mmix.c:1344
 msgid "internal error: unknown error"
 msgstr ""
@@ -690,8 +690,8 @@ msgstr ""
 
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.h:2443 elf32-cris.c:2968 elf32-m68hc1x.c:1459 elf32-m68k.c:397
-#: elf32-vax.c:546 elfxx-mips.c:9379
+#: elf32-arm.h:2443 elf32-cris.c:2975 elf32-m68hc1x.c:1459 elf32-m68k.c:397
+#: elf32-vax.c:546 elfxx-mips.c:9240
 #, c-format
 msgid "private flags = %lx:"
 msgstr ""
@@ -764,9 +764,9 @@ msgstr ""
 msgid "<Unrecognised flag bits set>"
 msgstr ""
 
-#: elf32-avr.c:820 elf32-cris.c:1391 elf32-fr30.c:641 elf32-frv.c:823
+#: elf32-avr.c:820 elf32-cris.c:1398 elf32-fr30.c:642 elf32-frv.c:823
 #: elf32-i860.c:1036 elf32-ip2k.c:1597 elf32-iq2000.c:707 elf32-msp430.c:518
-#: elf32-openrisc.c:444 elf32-v850.c:1761 elf32-xstormy16.c:984
+#: elf32-openrisc.c:444 elf32-v850.c:1785 elf32-xstormy16.c:984
 #: elf64-mmix.c:1340
 msgid "internal error: dangerous relocation"
 msgstr ""
@@ -799,39 +799,39 @@ msgid ""
 "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
 msgstr ""
 
-#: elf32-cris.c:1136
+#: elf32-cris.c:1143
 #, c-format
 msgid ""
 "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
 msgstr ""
 
-#: elf32-cris.c:1151
+#: elf32-cris.c:1158
 #, c-format
 msgid "%s: relocation %s in section %s with no GOT created"
 msgstr ""
 
-#: elf32-cris.c:1270
+#: elf32-cris.c:1277
 #, c-format
 msgid "%s: Internal inconsistency; no relocation section %s"
 msgstr ""
 
-#: elf32-cris.c:2493
+#: elf32-cris.c:2500
 #, c-format
 msgid ""
 "%s, section %s:\n"
 "  relocation %s should not be used in a shared object; recompile with -fPIC"
 msgstr ""
 
-#: elf32-cris.c:2971
+#: elf32-cris.c:2978
 msgid " [symbols have a _ prefix]"
 msgstr ""
 
-#: elf32-cris.c:3010
+#: elf32-cris.c:3017
 #, c-format
 msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
 msgstr ""
 
-#: elf32-cris.c:3011
+#: elf32-cris.c:3018
 #, c-format
 msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
 msgstr ""
@@ -864,7 +864,7 @@ msgstr ""
 msgid "%s: Relocations in generic ELF (EM: %d)"
 msgstr ""
 
-#: elf32-hppa.c:672 elf32-m68hc1x.c:176 elf64-ppc.c:3147
+#: elf32-hppa.c:672 elf32-m68hc1x.c:176 elf64-ppc.c:3118
 #, c-format
 msgid "%s: cannot create stub entry %s"
 msgstr ""
@@ -874,7 +874,7 @@ msgstr ""
 msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
 msgstr ""
 
-#: elf32-hppa.c:1340 elf64-x86-64.c:751 elf64-x86-64.c:876
+#: elf32-hppa.c:1340 elf64-x86-64.c:672 elf64-x86-64.c:797
 #, c-format
 msgid ""
 "%s: relocation %s can not be used when making a shared object; recompile "
@@ -912,38 +912,38 @@ msgstr ""
 msgid ".got section not immediately after .plt section"
 msgstr ""
 
-#: elf32-i386.c:390
+#: elf32-i386.c:326
 #, c-format
 msgid "%s: invalid relocation type %d"
 msgstr ""
 
-#: elf32-i386.c:923 elf32-s390.c:919 elf32-sparc.c:887 elf32-xtensa.c:635
-#: elf64-s390.c:873 elf64-x86-64.c:729
+#: elf32-i386.c:841 elf32-s390.c:990 elf32-sparc.c:887 elf32-xtensa.c:637
+#: elf64-s390.c:943 elf64-x86-64.c:650
 #, c-format
 msgid "%s: bad symbol index: %d"
 msgstr ""
 
-#: elf32-i386.c:1032 elf32-s390.c:1089 elf32-sh.c:6422 elf32-sparc.c:1011
-#: elf64-s390.c:1051
+#: elf32-i386.c:949 elf32-s390.c:1168 elf32-sh.c:6426 elf32-sparc.c:1011
+#: elf64-s390.c:1129
 #, c-format
 msgid "%s: `%s' accessed both as normal and thread local symbol"
 msgstr ""
 
-#: elf32-i386.c:1146 elf32-s390.c:1200 elf64-ppc.c:3956 elf64-s390.c:1165
-#: elf64-x86-64.c:965
+#: elf32-i386.c:1064 elf32-s390.c:1279 elf64-ppc.c:3929 elf64-s390.c:1243
+#: elf64-x86-64.c:886
 #, c-format
 msgid "%s: bad relocation section name `%s'"
 msgstr ""
 
-#: elf32-i386.c:3003 elf32-m68k.c:1757 elf32-s390.c:2936 elf32-sparc.c:2876
-#: elf32-xtensa.c:2160 elf64-s390.c:2933 elf64-sparc.c:2664
-#: elf64-x86-64.c:2553
+#: elf32-i386.c:2908 elf32-m68k.c:1757 elf32-s390.c:3022 elf32-sparc.c:2879
+#: elf32-xtensa.c:2193 elf64-s390.c:3018 elf64-sparc.c:2664
+#: elf64-x86-64.c:2452
 #, c-format
 msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
 msgstr ""
 
-#: elf32-i386.c:3042 elf32-m68k.c:1796 elf32-s390.c:2974 elf64-s390.c:2971
-#: elf64-x86-64.c:2591
+#: elf32-i386.c:2947 elf32-m68k.c:1796 elf32-s390.c:3072 elf64-s390.c:3068
+#: elf64-x86-64.c:2490
 #, c-format
 msgid "%s(%s+0x%lx): reloc against `%s': error %d"
 msgstr ""
@@ -972,8 +972,8 @@ msgstr ""
 msgid "unsupported relocation between data/insn address spaces"
 msgstr ""
 
-#: elf32-iq2000.c:907 elf32-m68hc1x.c:1431 elf32-ppc.c:2211 elf64-sparc.c:3072
-#: elfxx-mips.c:9336
+#: elf32-iq2000.c:907 elf32-m68hc1x.c:1431 elf32-ppc.c:2175 elf64-sparc.c:3072
+#: elfxx-mips.c:9197
 #, c-format
 msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
 msgstr ""
@@ -982,8 +982,8 @@ msgstr ""
 msgid "SDA relocation when _SDA_BASE_ not defined"
 msgstr ""
 
-#: elf32-ia64.c:3903 elf32-m32r.c:1018 elf64-alpha.c:4279 elf64-alpha.c:4407
-#: elf64-ia64.c:3903
+#: elf32-ia64.c:3817 elf32-m32r.c:1018 elf64-alpha.c:4279 elf64-alpha.c:4407
+#: elf64-ia64.c:3817
 #, c-format
 msgid "%s: unknown relocation type %d"
 msgstr ""
@@ -1105,101 +1105,108 @@ msgstr ""
 msgid "%s: Unknown relocation type %d\n"
 msgstr ""
 
-#: elf32-mips.c:1151 elf64-mips.c:1720 elfn32-mips.c:1665
+#: elf32-mips.c:1170 elf64-mips.c:1717 elfn32-mips.c:1664
 msgid "32bits gp relative relocation occurs for an external symbol"
 msgstr ""
 
-#: elf32-mips.c:1294 elf64-mips.c:1836 elfn32-mips.c:1781
+#: elf32-mips.c:1314 elf64-mips.c:1830 elfn32-mips.c:1783
 #, c-format
 msgid "Linking mips16 objects into %s format is not supported"
 msgstr ""
 
-#: elf32-ppc.c:2176
+#: elf32-ppc.c:2056
+#, c-format
+msgid "generic linker can't handle %s"
+msgstr ""
+
+#: elf32-ppc.c:2138
 #, c-format
 msgid ""
 "%s: compiled with -mrelocatable and linked with modules compiled normally"
 msgstr ""
 
-#: elf32-ppc.c:2184
+#: elf32-ppc.c:2147
 #, c-format
 msgid ""
 "%s: compiled normally and linked with modules compiled with -mrelocatable"
 msgstr ""
 
-#: elf32-ppc.c:2309
+#: elf32-ppc.c:3413
 #, c-format
-msgid "%s: unknown special linker type %d"
+msgid "%s: relocation %s cannot be used when making a shared object"
 msgstr ""
 
-#: elf32-ppc.c:3178
+#. It does not make sense to have a procedure linkage
+#. table entry for a local symbol.
+#: elf32-ppc.c:3619
 #, c-format
-msgid "%s: relocation %s cannot be used when making a shared object"
+msgid "%s(%s+0x%lx): %s reloc against local symbol"
 msgstr ""
 
-#: elf32-ppc.c:4651 elf64-ppc.c:7532
+#: elf32-ppc.c:4862 elf64-ppc.c:7789
 #, c-format
 msgid "%s: unknown relocation type %d for symbol %s"
 msgstr ""
 
-#: elf32-ppc.c:4902
+#: elf32-ppc.c:5113
 #, c-format
 msgid "%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"
 msgstr ""
 
-#: elf32-ppc.c:5190 elf32-ppc.c:5214 elf32-ppc.c:5271
+#: elf32-ppc.c:5399 elf32-ppc.c:5425 elf32-ppc.c:5484
 #, c-format
 msgid ""
 "%s: the target (%s) of a %s relocation is in the wrong output section (%s)"
 msgstr ""
 
-#: elf32-ppc.c:5325
+#: elf32-ppc.c:5539
 #, c-format
 msgid "%s: relocation %s is not yet supported for symbol %s."
 msgstr ""
 
-#: elf32-ppc.c:5379 elf64-ppc.c:8124
+#: elf32-ppc.c:5594 elf64-ppc.c:8461
 #, c-format
 msgid "%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
 msgstr ""
 
-#: elf32-ppc.c:5429 elf64-ppc.c:8170
+#: elf32-ppc.c:5644 elf64-ppc.c:8507
 #, c-format
 msgid "%s(%s+0x%lx): %s reloc against `%s': error %d"
 msgstr ""
 
-#: elf32-ppc.c:5695
+#: elf32-ppc.c:5888
 #, c-format
 msgid "corrupt or empty %s section in %s"
 msgstr ""
 
-#: elf32-ppc.c:5702
+#: elf32-ppc.c:5895
 #, c-format
 msgid "unable to read in %s section from %s"
 msgstr ""
 
-#: elf32-ppc.c:5708
+#: elf32-ppc.c:5901
 #, c-format
 msgid "corrupt %s section in %s"
 msgstr ""
 
-#: elf32-ppc.c:5751
+#: elf32-ppc.c:5944
 #, c-format
 msgid "warning: unable to set size of %s section in %s"
 msgstr ""
 
-#: elf32-ppc.c:5804
+#: elf32-ppc.c:5994
 msgid "failed to allocate space for new APUinfo section."
 msgstr ""
 
-#: elf32-ppc.c:5823
+#: elf32-ppc.c:6013
 msgid "failed to compute new APUinfo section."
 msgstr ""
 
-#: elf32-ppc.c:5826
+#: elf32-ppc.c:6016
 msgid "failed to install new APUinfo section."
 msgstr ""
 
-#: elf32-s390.c:2173 elf64-s390.c:2144
+#: elf32-s390.c:2256 elf64-s390.c:2226
 #, c-format
 msgid "%s(%s+0x%lx): invalid instruction for TLS relocation %s"
 msgstr ""
@@ -1292,100 +1299,100 @@ msgstr ""
 msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
 msgstr ""
 
-#: elf32-sh.c:4651 elf64-sh64.c:1585
+#: elf32-sh.c:4654 elf64-sh64.c:1585
 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
 msgstr ""
 
-#: elf32-sh.c:4806
+#: elf32-sh.c:4809
 #, c-format
 msgid "%s: unresolvable relocation against symbol `%s' from %s section"
 msgstr ""
 
-#: elf32-sh.c:4878
+#: elf32-sh.c:4881
 #, c-format
 msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
 msgstr ""
 
-#: elf32-sh.c:6621 elf64-alpha.c:4848
+#: elf32-sh.c:6627 elf64-alpha.c:4848
 #, c-format
 msgid "%s: TLS local exec code cannot be linked into shared objects"
 msgstr ""
 
-#: elf32-sparc.c:2518 elf64-sparc.c:2314
+#: elf32-sparc.c:2521 elf64-sparc.c:2314
 #, c-format
 msgid "%s: probably compiled without -fPIC?"
 msgstr ""
 
-#: elf32-sparc.c:3345
+#: elf32-sparc.c:3348
 #, c-format
 msgid "%s: compiled for a 64 bit system and target is 32 bit"
 msgstr ""
 
-#: elf32-sparc.c:3359
+#: elf32-sparc.c:3362
 #, c-format
 msgid "%s: linking little endian files with big endian files"
 msgstr ""
 
-#: elf32-v850.c:736
+#: elf32-v850.c:753
 #, c-format
 msgid "Variable `%s' cannot occupy in multiple small data regions"
 msgstr ""
 
-#: elf32-v850.c:739
+#: elf32-v850.c:756
 #, c-format
 msgid ""
 "Variable `%s' can only be in one of the small, zero, and tiny data regions"
 msgstr ""
 
-#: elf32-v850.c:742
+#: elf32-v850.c:759
 #, c-format
 msgid ""
 "Variable `%s' cannot be in both small and zero data regions simultaneously"
 msgstr ""
 
-#: elf32-v850.c:745
+#: elf32-v850.c:762
 #, c-format
 msgid ""
 "Variable `%s' cannot be in both small and tiny data regions simultaneously"
 msgstr ""
 
-#: elf32-v850.c:748
+#: elf32-v850.c:765
 #, c-format
 msgid ""
 "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
 msgstr ""
 
-#: elf32-v850.c:1126
+#: elf32-v850.c:1144
 msgid "FAILED to find previous HI16 reloc\n"
 msgstr ""
 
-#: elf32-v850.c:1765
+#: elf32-v850.c:1789
 msgid "could not locate special linker symbol __gp"
 msgstr ""
 
-#: elf32-v850.c:1769
+#: elf32-v850.c:1793
 msgid "could not locate special linker symbol __ep"
 msgstr ""
 
-#: elf32-v850.c:1773
+#: elf32-v850.c:1797
 msgid "could not locate special linker symbol __ctbp"
 msgstr ""
 
-#: elf32-v850.c:1939
+#: elf32-v850.c:1963
 #, c-format
 msgid "%s: Architecture mismatch with previous modules"
 msgstr ""
 
-#: elf32-v850.c:1959
+#: elf32-v850.c:1983
 #, c-format
 msgid "private flags = %lx: "
 msgstr ""
 
-#: elf32-v850.c:1964
+#: elf32-v850.c:1988
 msgid "v850 architecture"
 msgstr ""
 
-#: elf32-v850.c:1965
+#: elf32-v850.c:1989
 msgid "v850e architecture"
 msgstr ""
 
@@ -1423,7 +1430,7 @@ msgstr ""
 msgid "%s: warning: %s relocation to 0x%x from %s section"
 msgstr ""
 
-#: elf32-ia64.c:2429 elf32-xstormy16.c:462 elf64-ia64.c:2429
+#: elf32-ia64.c:2326 elf32-xstormy16.c:462 elf64-ia64.c:2326
 msgid "non-zero addend in @fptr reloc"
 msgstr ""
 
@@ -1539,61 +1546,91 @@ msgid ""
 "  Please report this bug."
 msgstr ""
 
-#: elf64-ppc.c:2362 libbfd.c:887
+#: elf64-ppc.c:2388 libbfd.c:831
 #, c-format
 msgid "%s: compiled for a big endian system and target is little endian"
 msgstr ""
 
-#: elf64-ppc.c:2364 libbfd.c:889
+#: elf64-ppc.c:2391 libbfd.c:833
 #, c-format
 msgid "%s: compiled for a little endian system and target is big endian"
 msgstr ""
 
-#: elf64-ppc.c:4903
+#: elf64-ppc.c:4857
 #, c-format
 msgid "%s: unexpected reloc type %u in .opd section"
 msgstr ""
 
-#: elf64-ppc.c:4923
+#: elf64-ppc.c:4877
 #, c-format
 msgid "%s: .opd is not a regular array of opd entries"
 msgstr ""
 
-#: elf64-ppc.c:4943
+#: elf64-ppc.c:4897
 #, c-format
 msgid "%s: undefined sym `%s' in .opd section"
 msgstr ""
 
-#: elf64-ppc.c:6131
+#: elf64-ppc.c:6136
 #, c-format
 msgid "can't find branch stub `%s'"
 msgstr ""
 
-#: elf64-ppc.c:6170 elf64-ppc.c:6220
+#: elf64-ppc.c:6175 elf64-ppc.c:6250
 #, c-format
 msgid "linkage table error against `%s'"
 msgstr ""
 
-#: elf64-ppc.c:6301
+#: elf64-ppc.c:6340
 #, c-format
 msgid "can't build branch stub `%s'"
 msgstr ""
 
-#: elf64-ppc.c:6934
+#: elf64-ppc.c:7047
+msgid ".glink and .plt too far apart"
+msgstr ""
+
+#: elf64-ppc.c:7135
 msgid "stubs don't match calculated size"
 msgstr ""
 
-#: elf64-ppc.c:8009
+#: elf64-ppc.c:7147
+#, c-format
+msgid ""
+"linker stubs in %u groups\n"
+"  branch       %lu\n"
+"  toc adjust   %lu\n"
+"  long branch  %lu\n"
+"  long toc adj %lu\n"
+"  plt call     %lu"
+msgstr ""
+
+#: elf64-ppc.c:7723
+#, c-format
+msgid ""
+"%s(%s+0x%lx): automatic multiple TOCs not supported using your crt files; "
+"recompile with -mminimal-toc or upgrade gcc"
+msgstr ""
+
+#: elf64-ppc.c:7731
+#, c-format
+msgid ""
+"%s(%s+0x%lx): sibling call optimization to `%s' does not allow automatic "
+"multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, "
+"or make `%s' extern"
+msgstr ""
+
+#: elf64-ppc.c:8329
 #, c-format
 msgid "%s: relocation %s is not supported for symbol %s."
 msgstr ""
 
-#: elf64-ppc.c:8078
+#: elf64-ppc.c:8408
 #, c-format
-msgid "%s: error: relocation %s not a multiple of 4"
+msgid "%s: error: relocation %s not a multiple of %d"
 msgstr ""
 
-#: elf-hppa.h:1458 elf-hppa.h:1491 elf64-sh64.c:1704
+#: elf-hppa.h:1458 elf-hppa.h:1491 elf-m10300.c:1628 elf64-sh64.c:1704
 #, c-format
 msgid ""
 "%s: warning: unresolvable relocation against symbol `%s' from %s section"
@@ -1629,7 +1666,7 @@ msgstr ""
 msgid "%s: linking UltraSPARC specific with HAL specific code"
 msgstr ""
 
-#: elf64-x86-64.c:818
+#: elf64-x86-64.c:739
 #, c-format
 msgid "%s: %s' accessed both as normal and thread local symbol"
 msgstr ""
@@ -1655,25 +1692,25 @@ msgid ""
 "Program Header:\n"
 msgstr ""
 
-#: elf.c:1105
+#: elf.c:1106
 msgid ""
 "\n"
 "Dynamic Section:\n"
 msgstr ""
 
-#: elf.c:1234
+#: elf.c:1235
 msgid ""
 "\n"
 "Version definitions:\n"
 msgstr ""
 
-#: elf.c:1257
+#: elf.c:1258
 msgid ""
 "\n"
 "Version References:\n"
 msgstr ""
 
-#: elf.c:1262
+#: elf.c:1263
 #, c-format
 msgid "  required from %s:\n"
 msgstr ""
@@ -1683,55 +1720,55 @@ msgstr ""
 msgid "%s: invalid link %lu for reloc section %s (index %u)"
 msgstr ""
 
-#: elf.c:3668
+#: elf.c:3686
 #, c-format
 msgid "%s: Not enough room for program headers (allocated %u, need %u)"
 msgstr ""
 
-#: elf.c:3773
+#: elf.c:3791
 #, c-format
 msgid "%s: Not enough room for program headers, try linking with -N"
 msgstr ""
 
-#: elf.c:3904
+#: elf.c:3922
 #, c-format
 msgid ""
 "Error: First section in segment (%s) starts at 0x%x whereas the segment "
 "starts at 0x%x"
 msgstr ""
 
-#: elf.c:4218
+#: elf.c:4242
 #, c-format
 msgid "%s: warning: allocated section `%s' not in segment"
 msgstr ""
 
-#: elf.c:4542
+#: elf.c:4566
 #, c-format
 msgid "%s: symbol `%s' required but not present"
 msgstr ""
 
-#: elf.c:4830
+#: elf.c:4854
 #, c-format
 msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
 msgstr ""
 
-#: elf.c:5461
+#: elf.c:5485
 #, c-format
 msgid ""
 "Unable to find equivalent output section for symbol '%s' from section '%s'"
 msgstr ""
 
-#: elf.c:6274
+#: elf.c:6298
 #, c-format
 msgid "%s: unsupported relocation type %s"
 msgstr ""
 
-#: elfcode.h:1117
+#: elfcode.h:1113
 #, c-format
 msgid "%s: version count (%ld) does not match symbol count (%ld)"
 msgstr ""
 
-#: elfcode.h:1346
+#: elfcode.h:1342
 #, c-format
 msgid "%s(%s): relocation %d has invalid symbol index %ld"
 msgstr ""
@@ -1746,17 +1783,12 @@ msgstr ""
 msgid "%s: undefined versioned symbol name %s"
 msgstr ""
 
-#: elflink.c:1956
-#, c-format
-msgid "%s: Section %s is too large to add hole of %ld bytes"
-msgstr ""
-
-#: elflink.c:2315
+#: elflink.c:2142
 #, c-format
 msgid "%s: relocation size mismatch in %s section %s"
 msgstr ""
 
-#: elflink.c:2607
+#: elflink.c:2434
 #, c-format
 msgid "warning: type and size of dynamic symbol `%s' are not defined"
 msgstr ""
@@ -1781,189 +1813,188 @@ msgstr ""
 msgid "Warning: size of symbol `%s' changed from %lu in %s to %lu in %s"
 msgstr ""
 
-#: elflink.h:2123
+#: elflink.h:2160
 #, c-format
 msgid "%s: undefined version: %s"
 msgstr ""
 
-#: elflink.h:2189
+#: elflink.h:2226
 #, c-format
 msgid "%s: .preinit_array section is not allowed in DSO"
 msgstr ""
 
-#: elflink.h:3040
+#: elflink.h:3078
 msgid "Not enough memory to sort relocations"
 msgstr ""
 
-#: elflink.h:3922 elflink.h:3965
+#: elflink.h:3958 elflink.h:4001
 #, c-format
 msgid "%s: could not find output section %s"
 msgstr ""
 
-#: elflink.h:3928
+#: elflink.h:3964
 #, c-format
 msgid "warning: %s section has zero size"
 msgstr ""
 
-#: elflink.h:4447
+#: elflink.h:4483
 #, c-format
 msgid "%s: %s symbol `%s' in %s is referenced by DSO"
 msgstr ""
 
-#: elflink.h:4528
+#: elflink.h:4564
 #, c-format
 msgid "%s: could not find output section %s for input section %s"
 msgstr ""
 
-#: elflink.h:4630
+#: elflink.h:4666
 #, c-format
 msgid "%s: %s symbol `%s' isn't defined"
 msgstr ""
 
-#: elflink.h:5033
-#, c-format
-msgid "local symbols in discarded section %s"
+#: elflink.h:5053 elflink.h:5095
+msgid "%T: discarded in section `%s' from %s\n"
 msgstr ""
 
-#: elfxx-mips.c:901
+#: elfxx-mips.c:887
 msgid "static procedure (no name)"
 msgstr ""
 
-#: elfxx-mips.c:1935
+#: elfxx-mips.c:1897
 msgid "not enough GOT space for local GOT entries"
 msgstr ""
 
-#: elfxx-mips.c:3755
+#: elfxx-mips.c:3691
 #, c-format
 msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
 msgstr ""
 
-#: elfxx-mips.c:5266
+#: elfxx-mips.c:5192
 #, c-format
 msgid "%s: Malformed reloc detected for section %s"
 msgstr ""
 
-#: elfxx-mips.c:5340
+#: elfxx-mips.c:5266
 #, c-format
 msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
 msgstr ""
 
-#: elfxx-mips.c:8833
+#: elfxx-mips.c:8693
 #, c-format
 msgid "%s: illegal section name `%s'"
 msgstr ""
 
-#: elfxx-mips.c:9166
+#: elfxx-mips.c:9027
 #, c-format
 msgid "%s: endianness incompatible with that of the selected emulation"
 msgstr ""
 
-#: elfxx-mips.c:9178
+#: elfxx-mips.c:9039
 #, c-format
 msgid "%s: ABI is incompatible with that of the selected emulation"
 msgstr ""
 
-#: elfxx-mips.c:9245
+#: elfxx-mips.c:9106
 #, c-format
 msgid "%s: warning: linking PIC files with non-PIC files"
 msgstr ""
 
-#: elfxx-mips.c:9262
+#: elfxx-mips.c:9123
 #, c-format
 msgid "%s: linking 32-bit code with 64-bit code"
 msgstr ""
 
-#: elfxx-mips.c:9290
+#: elfxx-mips.c:9151
 #, c-format
 msgid "%s: linking %s module with previous %s modules"
 msgstr ""
 
-#: elfxx-mips.c:9313
+#: elfxx-mips.c:9174
 #, c-format
 msgid "%s: ABI mismatch: linking %s module with previous %s modules"
 msgstr ""
 
-#: elfxx-mips.c:9382
+#: elfxx-mips.c:9243
 msgid " [abi=O32]"
 msgstr ""
 
-#: elfxx-mips.c:9384
+#: elfxx-mips.c:9245
 msgid " [abi=O64]"
 msgstr ""
 
-#: elfxx-mips.c:9386
+#: elfxx-mips.c:9247
 msgid " [abi=EABI32]"
 msgstr ""
 
-#: elfxx-mips.c:9388
+#: elfxx-mips.c:9249
 msgid " [abi=EABI64]"
 msgstr ""
 
-#: elfxx-mips.c:9390
+#: elfxx-mips.c:9251
 msgid " [abi unknown]"
 msgstr ""
 
-#: elfxx-mips.c:9392
+#: elfxx-mips.c:9253
 msgid " [abi=N32]"
 msgstr ""
 
-#: elfxx-mips.c:9394
+#: elfxx-mips.c:9255
 msgid " [abi=64]"
 msgstr ""
 
-#: elfxx-mips.c:9396
+#: elfxx-mips.c:9257
 msgid " [no abi set]"
 msgstr ""
 
-#: elfxx-mips.c:9399
+#: elfxx-mips.c:9260
 msgid " [mips1]"
 msgstr ""
 
-#: elfxx-mips.c:9401
+#: elfxx-mips.c:9262
 msgid " [mips2]"
 msgstr ""
 
-#: elfxx-mips.c:9403
+#: elfxx-mips.c:9264
 msgid " [mips3]"
 msgstr ""
 
-#: elfxx-mips.c:9405
+#: elfxx-mips.c:9266
 msgid " [mips4]"
 msgstr ""
 
-#: elfxx-mips.c:9407
+#: elfxx-mips.c:9268
 msgid " [mips5]"
 msgstr ""
 
-#: elfxx-mips.c:9409
+#: elfxx-mips.c:9270
 msgid " [mips32]"
 msgstr ""
 
-#: elfxx-mips.c:9411
+#: elfxx-mips.c:9272
 msgid " [mips64]"
 msgstr ""
 
-#: elfxx-mips.c:9413
+#: elfxx-mips.c:9274
 msgid " [mips32r2]"
 msgstr ""
 
-#: elfxx-mips.c:9415
+#: elfxx-mips.c:9276
 msgid " [unknown ISA]"
 msgstr ""
 
-#: elfxx-mips.c:9418
+#: elfxx-mips.c:9279
 msgid " [mdmx]"
 msgstr ""
 
-#: elfxx-mips.c:9421
+#: elfxx-mips.c:9282
 msgid " [mips16]"
 msgstr ""
 
-#: elfxx-mips.c:9424
+#: elfxx-mips.c:9285
 msgid " [32bitmode]"
 msgstr ""
 
-#: elfxx-mips.c:9426
+#: elfxx-mips.c:9287
 msgid " [not 32bitmode]"
 msgstr ""
 
@@ -2062,24 +2093,24 @@ msgstr ""
 msgid "%s: address 0x%s out of range for Intel Hex file"
 msgstr ""
 
-#: libbfd.c:918
+#: libbfd.c:861
 #, c-format
 msgid "Deprecated %s called at %s line %d in %s\n"
 msgstr ""
 
-#: libbfd.c:921
+#: libbfd.c:864
 #, c-format
 msgid "Deprecated %s called\n"
 msgstr ""
 
-#: linker.c:1877
+#: linker.c:1829
 #, c-format
 msgid "%s: indirect symbol `%s' to `%s' is a loop"
 msgstr ""
 
-#: linker.c:2780
+#: linker.c:2697
 #, c-format
-msgid "Attempt to do relocateable link with %s input and %s output"
+msgid "Attempt to do relocatable link with %s input and %s output"
 msgstr ""
 
 #: merge.c:896
@@ -2364,7 +2395,7 @@ msgstr ""
 msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
 msgstr ""
 
-#: syms.c:1042
+#: syms.c:1019
 msgid "Unsupported .stab relocation"
 msgstr ""
 
@@ -2611,70 +2642,75 @@ msgstr ""
 msgid "%s: loader reloc in read-only section %s"
 msgstr ""
 
-#: elf32-ia64.c:2371 elf64-ia64.c:2371
+#: elf32-ia64.c:2271 elf64-ia64.c:2271
 msgid "@pltoff reloc against local symbol"
 msgstr ""
 
-#: elf32-ia64.c:3749 elf64-ia64.c:3749
+#: elf32-ia64.c:3663 elf64-ia64.c:3663
 #, c-format
 msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
 msgstr ""
 
-#: elf32-ia64.c:3760 elf64-ia64.c:3760
+#: elf32-ia64.c:3674 elf64-ia64.c:3674
 #, c-format
 msgid "%s: __gp does not cover short data segment"
 msgstr ""
 
-#: elf32-ia64.c:4076 elf64-ia64.c:4076
+#: elf32-ia64.c:3986 elf64-ia64.c:3986
 #, c-format
 msgid "%s: linking non-pic code in a shared library"
 msgstr ""
 
-#: elf32-ia64.c:4109 elf64-ia64.c:4109
+#: elf32-ia64.c:4017 elf64-ia64.c:4017
 #, c-format
 msgid "%s: @gprel relocation against dynamic symbol %s"
 msgstr ""
 
-#: elf32-ia64.c:4285 elf64-ia64.c:4285
+#: elf32-ia64.c:4077 elf64-ia64.c:4077
+#, c-format
+msgid "%s: linking non-pic code in a position independent executable"
+msgstr ""
+
+#: elf32-ia64.c:4214 elf64-ia64.c:4214
 #, c-format
 msgid "%s: @internal branch to dynamic symbol %s"
 msgstr ""
 
-#: elf32-ia64.c:4287 elf64-ia64.c:4287
+#: elf32-ia64.c:4216 elf64-ia64.c:4216
 #, c-format
 msgid "%s: speculation fixup to dynamic symbol %s"
 msgstr ""
 
-#: elf32-ia64.c:4289 elf64-ia64.c:4289
+#: elf32-ia64.c:4218 elf64-ia64.c:4218
 #, c-format
 msgid "%s: @pcrel relocation against dynamic symbol %s"
 msgstr ""
 
-#: elf32-ia64.c:4501 elf64-ia64.c:4501
+#: elf32-ia64.c:4430 elf64-ia64.c:4430
 msgid "unsupported reloc"
 msgstr ""
 
-#: elf32-ia64.c:4780 elf64-ia64.c:4780
+#: elf32-ia64.c:4709 elf64-ia64.c:4709
 #, c-format
 msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
 msgstr ""
 
-#: elf32-ia64.c:4789 elf64-ia64.c:4789
+#: elf32-ia64.c:4718 elf64-ia64.c:4718
 #, c-format
 msgid "%s: linking big-endian files with little-endian files"
 msgstr ""
 
-#: elf32-ia64.c:4798 elf64-ia64.c:4798
+#: elf32-ia64.c:4727 elf64-ia64.c:4727
 #, c-format
 msgid "%s: linking 64-bit files with 32-bit files"
 msgstr ""
 
-#: elf32-ia64.c:4807 elf64-ia64.c:4807
+#: elf32-ia64.c:4736 elf64-ia64.c:4736
 #, c-format
 msgid "%s: linking constant-gp files with non-constant-gp files"
 msgstr ""
 
-#: elf32-ia64.c:4817 elf64-ia64.c:4817
+#: elf32-ia64.c:4746 elf64-ia64.c:4746
 #, c-format
 msgid "%s: linking auto-pic files with non-auto-pic files"
 msgstr ""
index ab8b837f9b10f012ca67ff4a4e02949f66888722..3aa3336bf5b1201d954bd87a50872177d52e3ae4 100644 (file)
-# Mensajes en español para bfd 2.12.91.
-# Copyright (C) 2002 Free Software Foundation, Inc.
-# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2002.
+# Mensajes en español para bfd 2.14rel030712.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2002, 2003.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: bfd 2.12.91\n"
-"POT-Creation-Date: 2002-07-23 15:55-0400\n"
-"PO-Revision-Date: 2002-07-24 02:29-0500\n"
+"Project-Id-Version: bfd 2.14rel030712\n"
+"POT-Creation-Date: 2003-07-11 13:53+0930\n"
+"PO-Revision-Date: 2003-07-13 21:49-0500\n"
 "Last-Translator: Cristian Othón Martínez Vera <cfuga@itam.mx>\n"
 "Language-Team: Spanish <es@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: aout-adobe.c:197
+#: aout-adobe.c:204
 #, c-format
 msgid "%s: Unknown section type in a.out.adobe file: %x\n"
 msgstr "%s: Tipo de sección desconocido en el fichero a.out.adobe: %x\n"
 
-#: aout-cris.c:208
+#: aout-cris.c:207
 #, c-format
 msgid "%s: Invalid relocation type exported: %d"
 msgstr "%s: Tipo de reubicación exportado inválido: %d"
 
-#: aout-cris.c:252
+#: aout-cris.c:251
 #, c-format
 msgid "%s: Invalid relocation type imported: %d"
 msgstr "%s: Tipo de reubicación importado inválido: %d"
 
-#: aout-cris.c:263
+#: aout-cris.c:262
 #, c-format
 msgid "%s: Bad relocation record imported: %d"
 msgstr "%s: Registro de reubicación importado erróneo: %d"
 
-#: aoutx.h:1282 aoutx.h:1699
+#: aoutx.h:1295 aoutx.h:1716
 #, c-format
 msgid "%s: can not represent section `%s' in a.out object file format"
 msgstr "%s: no se puede representar la sección `%s' en el fichero objeto de formato a.out"
 
-#: aoutx.h:1669
+#: aoutx.h:1682
 #, c-format
 msgid "%s: can not represent section for symbol `%s' in a.out object file format"
 msgstr "%s: no se puede representar la sección para el símbolo `%s' en el fichero objeto de formato a.out"
 
-#: aoutx.h:1671
+#: aoutx.h:1684
 msgid "*unknown*"
 msgstr "*desconocido*"
 
-#: aoutx.h:3732
+#: aoutx.h:3776
 #, c-format
-msgid "%s: relocateable link from %s to %s not supported"
-msgstr "%s: enlace reubicable desde %s a %s sin soporte"
+msgid "%s: relocatable link from %s to %s not supported"
+msgstr "%s: el enlace reubicable de %s a %s no está soportado"
 
-#: archive.c:1826
+#: archive.c:1751
 msgid "Warning: writing archive was slow: rewriting timestamp\n"
 msgstr "Aviso: la escritura del fichero fue lenta: reescribiendo la marca de tiempo\n"
 
 # ¡Uff! Si utilizáramos file=archivo, esta traducción sería imposible. cfuga
-#: archive.c:2093
+#: archive.c:2014
 msgid "Reading archive file mod timestamp"
 msgstr "Leyendo el archivo de la modificación de marca de tiempo del fichero"
 
-#. FIXME: bfd can't call perror.
-#: archive.c:2120
+#: archive.c:2040
 msgid "Writing updated armap timestamp"
 msgstr "Escribiendo la marca de tiempo actualizada de armap"
 
-#: bfd.c:274
+#: bfd.c:280
 msgid "No error"
 msgstr "No hay error"
 
-#: bfd.c:275
+#: bfd.c:281
 msgid "System call error"
 msgstr "Error en la llamada al sistema"
 
-#: bfd.c:276
+#: bfd.c:282
 msgid "Invalid bfd target"
 msgstr "Objetivo bfd inválido"
 
-#: bfd.c:277
+#: bfd.c:283
 msgid "File in wrong format"
 msgstr "Fichero en formato erróneo"
 
-#: bfd.c:278
+#: bfd.c:284
 msgid "Archive object file in wrong format"
 msgstr "Archivo de ficheros objeto en formato erróneo"
 
-#: bfd.c:279
+#: bfd.c:285
 msgid "Invalid operation"
 msgstr "Operación inválida"
 
-#: bfd.c:280
+#: bfd.c:286
 msgid "Memory exhausted"
 msgstr "Memoria agotada"
 
-#: bfd.c:281
+#: bfd.c:287
 msgid "No symbols"
 msgstr "No hay símbolos"
 
-#: bfd.c:282
+#: bfd.c:288
 msgid "Archive has no index; run ranlib to add one"
 msgstr "El archivo no tiene índice; ejecute ranlib para agregar uno"
 
-#: bfd.c:283
+#: bfd.c:289
 msgid "No more archived files"
 msgstr "No hay más ficheros archivados"
 
-#: bfd.c:284
+#: bfd.c:290
 msgid "Malformed archive"
 msgstr "Archivo malformado"
 
-#: bfd.c:285
+#: bfd.c:291
 msgid "File format not recognized"
 msgstr "No se reconoce el formato del fichero"
 
-#: bfd.c:286
+#: bfd.c:292
 msgid "File format is ambiguous"
 msgstr "El formato del fichero es ambiguo"
 
-#: bfd.c:287
+#: bfd.c:293
 msgid "Section has no contents"
 msgstr "La sección no tiene contenidos"
 
-#: bfd.c:288
+#: bfd.c:294
 msgid "Nonrepresentable section on output"
 msgstr "Sección no representable en la salida"
 
-#: bfd.c:289
+#: bfd.c:295
 msgid "Symbol needs debug section which does not exist"
 msgstr "Un símbolo requiere de una sección de depuración, la cual no existe"
 
-#: bfd.c:290
+#: bfd.c:296
 msgid "Bad value"
 msgstr "Valor erróneo"
 
-#: bfd.c:291
+#: bfd.c:297
 msgid "File truncated"
 msgstr "Fichero truncado"
 
-#: bfd.c:292
+#: bfd.c:298
 msgid "File too big"
 msgstr "Fichero demasiado grande"
 
-#: bfd.c:293
+#: bfd.c:299
 msgid "#<Invalid error code>"
 msgstr "#<Código de error inválido>"
 
-#: bfd.c:700
+#: bfd.c:687
 #, c-format
 msgid "BFD %s assertion fail %s:%d"
 msgstr "falló la aseveración BFD %s %s:%d"
 
-#: bfd.c:719
+#: bfd.c:703
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d in %s\n"
 msgstr "error interno de BFD %s, abortando en %s línea %d en %s\n"
 
-#: bfd.c:723
+#: bfd.c:707
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d\n"
 msgstr "error interno de BFD %s, abortando en %s línea %d\n"
 
-#: bfd.c:725
+#: bfd.c:709
 msgid "Please report this bug.\n"
 msgstr "Por favor reporte este bicho.\n"
 
+#: bfdwin.c:202
+#, c-format
+msgid "not mapping: data=%lx mapped=%d\n"
+msgstr "no se mapea: datos=%lx mapeados%d\n"
+
+#: bfdwin.c:205
+msgid "not mapping: env var not set\n"
+msgstr "no se mapea: no se estableció la variable de ambiente\n"
+
 #: binary.c:306
 #, c-format
 msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
 msgstr "Aviso: Escribiendo la sección `%s' a un desplazamiento de fichero grande (pe negativo) 0x%lx."
 
-#: coff-a29k.c:119
+#: coff-a29k.c:120
 msgid "Missing IHCONST"
 msgstr "IHCONST faltante"
 
-#: coff-a29k.c:180
+#: coff-a29k.c:181
 msgid "Missing IHIHALF"
 msgstr "IHIHALF faltante"
 
-#: coff-a29k.c:212 coff-or32.c:229
+#: coff-a29k.c:213 coff-or32.c:236
 msgid "Unrecognized reloc"
 msgstr "Reubicación no reconocida"
 
-#: coff-a29k.c:408
+#: coff-a29k.c:409
 msgid "missing IHCONST reloc"
 msgstr "reubicación IHCONST faltante"
 
-#: coff-a29k.c:498
+#: coff-a29k.c:499
 msgid "missing IHIHALF reloc"
 msgstr "reubicación IHIHALF faltante"
 
-#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
+#: coff-alpha.c:884 coff-alpha.c:921 coff-alpha.c:1992 coff-mips.c:1397
 msgid "GP relative relocation used when GP not defined"
 msgstr "se usó una reubicación GP relativa cuando GP no estaba definido"
 
-#: coff-alpha.c:1485
+#: coff-alpha.c:1488
 msgid "using multiple gp values"
 msgstr "usando valores múltiples de gp"
 
-#: coff-arm.c:1066 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:294
 #, c-format
 msgid "%s: unable to find THUMB glue '%s' for `%s'"
 msgstr "%s: no se puede encontrar el pegamento THUMB '%s' para `%s'"
 
-#: coff-arm.c:1096 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:329
 #, c-format
 msgid "%s: unable to find ARM glue '%s' for `%s'"
 msgstr "%s: no se puede encontrar el pegamento ARM '%s' para `%s'"
 
-#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
+#: coff-arm.c:1394 coff-arm.c:1489 elf32-arm.h:892 elf32-arm.h:999
 #, c-format
 msgid "%s(%s): warning: interworking not enabled."
 msgstr "%s(%s): aviso: interoperabilidad no activada."
 
-#: coff-arm.c:1395 elf32-arm.h:994
+#: coff-arm.c:1398 elf32-arm.h:1002
 #, c-format
 msgid "  first occurrence: %s: arm call to thumb"
 msgstr "  primera ocurrencia: %s: llamada arm a thumb"
 
-#: coff-arm.c:1490 elf32-arm.h:890
+#: coff-arm.c:1493 elf32-arm.h:895
 #, c-format
 msgid "  first occurrence: %s: thumb call to arm"
 msgstr "  primera ocurrencia: %s: llamada thumb a arm"
 
-#: coff-arm.c:1493
+#: coff-arm.c:1496
 msgid "  consider relinking with --support-old-code enabled"
 msgstr "  considere el reenlace con --support-old-code activado"
 
-#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
+#: coff-arm.c:1788 coff-tic80.c:687 cofflink.c:3038
 #, c-format
 msgid "%s: bad reloc address 0x%lx in section `%s'"
 msgstr "%s: dirección de reubicación 0x%lx errónea en la sección `%s'"
 
-#: coff-arm.c:2127
+#: coff-arm.c:2132
 #, c-format
 msgid "%s: illegal symbol index in reloc: %d"
 msgstr "%s: índice de símbolos ilegal en la reubicación: %d"
 
-#: coff-arm.c:2255
+#: coff-arm.c:2265
 #, c-format
 msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
 msgstr "ERROR: %s está compilado para APCS-%d, mientras que %s está compilado para APCS-%d"
 
-#: coff-arm.c:2270 elf32-arm.h:2297
+#: coff-arm.c:2280 elf32-arm.h:2328
 #, c-format
 msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
 msgstr "ERROR: %s pasa números de coma flotante en registros de coma flotante, mientras que %s los pasa en registros enteros"
 
-#: coff-arm.c:2273 elf32-arm.h:2302
+#: coff-arm.c:2283 elf32-arm.h:2333
 #, c-format
 msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
 msgstr "ERROR: %s pasa números de coma flotante en registros enteros, mientras que %s los pasa en registros de coma flotante"
 
-#: coff-arm.c:2288
+#: coff-arm.c:2298
 #, c-format
 msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
 msgstr "ERROR: %s está compilado como código independiente de posición, mientras que el objetivo %s es de posición absoluta"
 
-#: coff-arm.c:2291
+#: coff-arm.c:2301
 #, c-format
 msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
 msgstr "ERROR: %s está compilado como código de posición absoluta, mientras que el objetivo %s es independiente de posición"
 
-#: coff-arm.c:2320 elf32-arm.h:2358
+#: coff-arm.c:2330 elf32-arm.h:2405
 #, c-format
 msgid "Warning: %s supports interworking, whereas %s does not"
 msgstr "Aviso: el fichero de entrada %s soporta interoperabilidad, mientras que %s no"
 
-#: coff-arm.c:2323 elf32-arm.h:2365
+#: coff-arm.c:2333 elf32-arm.h:2412
 #, c-format
 msgid "Warning: %s does not support interworking, whereas %s does"
 msgstr "Aviso: el fichero de entrada %s no soporta interoperabilidad, mientras que %s sí"
 
-#: coff-arm.c:2350
+#: coff-arm.c:2360
 #, c-format
 msgid "private flags = %x:"
 msgstr "opciones privadas = %x:"
 
-#: coff-arm.c:2358 elf32-arm.h:2418
+#: coff-arm.c:2368 elf32-arm.h:2467
 msgid " [floats passed in float registers]"
 msgstr "[números de coma flotante pasados en registros de coma flotante]"
 
-#: coff-arm.c:2360
+#: coff-arm.c:2370
 msgid " [floats passed in integer registers]"
 msgstr "[números de coma flotante pasados en registros enteros]"
 
-#: coff-arm.c:2363 elf32-arm.h:2421
+#: coff-arm.c:2373 elf32-arm.h:2470
 msgid " [position independent]"
 msgstr "[independiente de posición]"
 
-#: coff-arm.c:2365
+#: coff-arm.c:2375
 msgid " [absolute position]"
 msgstr "[posición absoluta]"
 
-#: coff-arm.c:2369
+#: coff-arm.c:2379
 msgid " [interworking flag not initialised]"
 msgstr "[opción de interoperabilidad no iniciada]"
 
-#: coff-arm.c:2371
+#: coff-arm.c:2381
 msgid " [interworking supported]"
 msgstr "[soporte para interoperabilidad]"
 
-#: coff-arm.c:2373
+#: coff-arm.c:2383
 msgid " [interworking not supported]"
 msgstr "[sin soporte para interoperabilidad]"
 
-#: coff-arm.c:2421 elf32-arm.h:2124
+#: coff-arm.c:2431 elf32-arm.h:2150
 #, c-format
 msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
 msgstr "Aviso: No se establece la opción de interoperabilidad de %s ya que se había especificado con anterioridad como no interoperable"
 
-#: coff-arm.c:2425 elf32-arm.h:2128
+#: coff-arm.c:2435 elf32-arm.h:2154
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s due to outside request"
 msgstr "Aviso: Limpiando la opción de interoperabilidad de %s debido a una petición externa"
 
-#: coff-i960.c:136 coff-i960.c:485
+#: coff-h8300.c:1096
+#, c-format
+msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
+msgstr "no se puede manejar la reubicación R_MEM_INDIRECT cuando se utiliza la salida %s"
+
+#: coff-i960.c:137 coff-i960.c:486
 msgid "uncertain calling convention for non-COFF symbol"
 msgstr "convención de llamada incierta para un símbolo que no es COFF"
 
-#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
+#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2193 elf32-mips.c:1783
 msgid "unsupported reloc type"
 msgstr "tipo de reubicación sin soporte"
 
-#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
+#: coff-mips.c:839 elf32-mips.c:1088 elf64-mips.c:1590 elfn32-mips.c:1554
 msgid "GP relative relocation when _gp not defined"
 msgstr "reubicación GP relativa cuando _gp no está definido"
 
 #. No other sections should appear in -membedded-pic
 #. code.
-#: coff-mips.c:2466
+#: coff-mips.c:2431
 msgid "reloc against unsupported section"
 msgstr "reubicación contra una sección sin soporte"
 
-#: coff-mips.c:2474
+#: coff-mips.c:2439
 msgid "reloc not properly aligned"
 msgstr "reubicación no alineada adecuadamente"
 
-#: coff-rs6000.c:2766
+#: coff-rs6000.c:2790
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
 msgstr "%s: tipo de reubicación 0x%02x sin soporte"
 
-#: coff-rs6000.c:2859
+#: coff-rs6000.c:2883
 #, c-format
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
 msgstr "%s: reubicación de TOC en 0x%x al símbolo `%s' sin entrada TOC"
 
-#: coff-rs6000.c:3590 coff64-rs6000.c:2091
+#: coff-rs6000.c:3616 coff64-rs6000.c:2109
 #, c-format
 msgid "%s: symbol `%s' has unrecognized smclas %d"
 msgstr "%s: el símbolo `%s' tiene smclas %d no reconocido"
 
-#: coff-tic54x.c:279 coff-tic80.c:449
+#: coff-tic4x.c:170 coff-tic54x.c:288 coff-tic80.c:450
 #, c-format
 msgid "Unrecognized reloc type 0x%x"
 msgstr "Tipo de reubicación 0x%x no reconocida"
 
-#: coff-tic54x.c:390 coffcode.h:4974
+#: coff-tic4x.c:218 coff-tic54x.c:373 coffcode.h:5045
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
 msgstr "%s: aviso: íncide de símbolos %ld ilegal en reubicaciones"
 
-#: coff-w65.c:363
+#: coff-w65.c:364
 #, c-format
 msgid "ignoring reloc %s\n"
 msgstr "ignorando la reubicación %s\n"
 
-#: coffcode.h:1086
+#: coffcode.h:1108
 #, c-format
 msgid "%s (%s): Section flag %s (0x%x) ignored"
 msgstr "%s (%s): Se ignora la opción de sección %s (0x%x)"
 
-#: coffcode.h:2143
+#: coffcode.h:2214
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
 msgstr "Id de objetivo TI COFF '0x%x' no reconocido"
 
-#: coffcode.h:4365
+#: coffcode.h:4437
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in line numbers"
 msgstr "%s: aviso: índice de símbolos %ld ilegal en los números de línea"
 
-#: coffcode.h:4379
+#: coffcode.h:4451
 #, c-format
 msgid "%s: warning: duplicate line number information for `%s'"
 msgstr "%s: aviso: información duplicada de números de línea para `%s'"
 
-#: coffcode.h:4736
+#: coffcode.h:4805
 #, c-format
 msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
 msgstr "%s: Clase de almacenamiento %d no reconocida para %s símbolo `%s'"
 
-#: coffcode.h:4867
+#: coffcode.h:4938
 #, c-format
 msgid "warning: %s: local symbol `%s' has no section"
 msgstr "aviso: %s: el símbolo local `%s' no tiene sección"
 
-#: coffcode.h:5012
+#: coffcode.h:5083
 #, c-format
 msgid "%s: illegal relocation type %d at address 0x%lx"
 msgstr "%s: tipo de reubicación %d ilegal en la dirección 0x%lx"
 
-#: coffgen.c:1661
+#: coffgen.c:1666
 #, c-format
 msgid "%s: bad string table size %lu"
 msgstr "%s: tamaño de tabla de cadenas %lu erróneo"
 
-#: cofflink.c:534 elflink.h:1912
+#: cofflink.c:538 elflink.h:1276
 #, c-format
 msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
 msgstr "Aviso: el tipo del símbolo `%s' cambió de %d a %d en %s"
 
-#: cofflink.c:2321
+#: cofflink.c:2328
 #, c-format
 msgid "%s: relocs in section `%s', but it has no contents"
 msgstr "%s: reubicaciones en la sección `%s', pero no tiene contenidos"
 
-#: cofflink.c:2664 coffswap.h:877
+#: cofflink.c:2671 coffswap.h:890
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
 msgstr "%s: %s: desbordamiento de reubicación: 0x%lx > 0xffff"
 
-#: cofflink.c:2673 coffswap.h:864
+#: cofflink.c:2680 coffswap.h:876
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: aviso: %s: desbordamiento de número de línea: 0x%lx > 0xffff"
 
-#: dwarf2.c:382
+#: cpu-arm.c:196 cpu-arm.c:206
+#, c-format
+msgid "ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"
+msgstr "ERROR: %s está compilado para el EP9312, mientras que %s está compilado para Xscale"
+
+#: cpu-arm.c:344
+#, c-format
+msgid "warning: unable to update contents of %s section in %s"
+msgstr "aviso: no se puede actualizar el contenido de la sección %s en %s"
+
+#: dwarf2.c:380
 msgid "Dwarf Error: Can't find .debug_str section."
 msgstr "Error de Dwarf: No se puede encontrar la sección .debug_str."
 
-#: dwarf2.c:399
+#: dwarf2.c:397
 #, c-format
 msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
 msgstr "Error de Dwarf: El desplazamiento DW_FROM_strp (%lu) es más grande o igual que el tamaño de .debug_str (%lu)."
 
-#: dwarf2.c:543
+#: dwarf2.c:541
 msgid "Dwarf Error: Can't find .debug_abbrev section."
 msgstr "Error de Dwarf: No se puede encontrar la sección .debug_abbrev."
 
-#: dwarf2.c:560
+#: dwarf2.c:556
 #, c-format
 msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
 msgstr "Error de Dwarf: El desplazamiento de abreviatura (%lu) es más grande o igual que el tamaño de .debug_abbrev (%lu)."
 
-#: dwarf2.c:757
+#: dwarf2.c:756
 #, c-format
 msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
 msgstr "Error de Dwarf: Valor de FORM inválido o no manejado: %u."
 
-#: dwarf2.c:852
+#: dwarf2.c:933
 msgid "Dwarf Error: mangled line number section (bad file number)."
 msgstr "Error de Dwarf: sección de números de línea revuelta (número erróneo de fichero)."
 
-#: dwarf2.c:938
+#: dwarf2.c:1032
 msgid "Dwarf Error: Can't find .debug_line section."
 msgstr "Error de Dwarf: No se puede encontrar lan sección .debug_line."
 
-#: dwarf2.c:961
+#: dwarf2.c:1049
 #, c-format
 msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
 msgstr "Error de Dwarf: El desplazamiento de línea (%lu) es más grande o igual que el tamaño de .debug_line (%lu)."
 
-#: dwarf2.c:1159
+#: dwarf2.c:1255
 msgid "Dwarf Error: mangled line number section."
 msgstr "Error de Dwarf: sección de números de línea revuelta."
 
-#: dwarf2.c:1355 dwarf2.c:1566
+#: dwarf2.c:1470 dwarf2.c:1620
 #, c-format
 msgid "Dwarf Error: Could not find abbrev number %u."
 msgstr "Error de Dwarf: No se puede encontrar el número de abreviatura %u."
 
-#: dwarf2.c:1527
+#: dwarf2.c:1581
 #, c-format
 msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
 msgstr "Error de Dwarf: se encontró la versión de dwarf '%u', este lector solamente maneja información de la versión 2."
 
-#: dwarf2.c:1534
+#: dwarf2.c:1588
 #, c-format
 msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
 msgstr "Error de Dwarf: se encontró el tamaño de dirección '%u', este lector no puede manejar tamaños más grandes que '%u'."
 
-#: dwarf2.c:1557
+#: dwarf2.c:1611
 #, c-format
 msgid "Dwarf Error: Bad abbrev number: %u."
 msgstr "Error de Dwarf: Número de abreviación erróneo: %u."
 
-#: ecoff.c:1318
+#: ecoff.c:1339
 #, c-format
 msgid "Unknown basic type %d"
 msgstr "Tipo básico %d desconocido"
 
-#: ecoff.c:1578
+#: ecoff.c:1599
 #, c-format
 msgid ""
 "\n"
@@ -501,7 +524,7 @@ msgstr ""
 "\n"
 "      Símbolo final+1: %ld"
 
-#: ecoff.c:1585 ecoff.c:1588
+#: ecoff.c:1606 ecoff.c:1609
 #, c-format
 msgid ""
 "\n"
@@ -510,7 +533,7 @@ msgstr ""
 "\n"
 "      Primer símbolo: %ld"
 
-#: ecoff.c:1600
+#: ecoff.c:1621
 #, c-format
 msgid ""
 "\n"
@@ -519,7 +542,7 @@ msgstr ""
 "\n"
 "      Símbolo final+1: %-7ld Tipo: %s"
 
-#: ecoff.c:1607
+#: ecoff.c:1628
 #, c-format
 msgid ""
 "\n"
@@ -528,7 +551,7 @@ msgstr ""
 "\n"
 "      Símbolo local: %ld"
 
-#: ecoff.c:1615
+#: ecoff.c:1636
 #, c-format
 msgid ""
 "\n"
@@ -537,7 +560,7 @@ msgstr ""
 "\n"
 "      struct; símbolo final+1: %ld"
 
-#: ecoff.c:1620
+#: ecoff.c:1641
 #, c-format
 msgid ""
 "\n"
@@ -546,7 +569,7 @@ msgstr ""
 "\n"
 "      union; símbolo final+1: %ld"
 
-#: ecoff.c:1625
+#: ecoff.c:1646
 #, c-format
 msgid ""
 "\n"
@@ -555,7 +578,7 @@ msgstr ""
 "\n"
 "      enum; símbolo final+1: %ld"
 
-#: ecoff.c:1631
+#: ecoff.c:1652
 #, c-format
 msgid ""
 "\n"
@@ -564,54 +587,58 @@ msgstr ""
 "\n"
 "      Tipo: %s"
 
-#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
-#: elf64-sh64.c:1659
+#: elf-hppa.h:1458 elf-hppa.h:1491 elf-m10300.c:1628 elf64-sh64.c:1704
 #, c-format
 msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
 msgstr "%s: aviso: reubicación sin resolución contra el símbolo `%s' de la sección %s"
 
-#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
-#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
-#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
-#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
+#: elf-m10200.c:442 elf-m10300.c:1695 elf32-arm.h:2088 elf32-avr.c:812
+#: elf32-cris.c:1390 elf32-d10v.c:570 elf32-fr30.c:634 elf32-frv.c:815
+#: elf32-h8300.c:528 elf32-i860.c:1028 elf32-ip2k.c:1586 elf32-iq2000.c:699
+#: elf32-m32r.c:1283 elf32-m68hc1x.c:1305 elf32-msp430.c:510
+#: elf32-openrisc.c:436 elf32-v850.c:1777 elf32-xstormy16.c:976
+#: elf64-mmix.c:1332
 msgid "internal error: out of range error"
 msgstr "error interno: error fuera de rango"
 
-#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
-#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
-#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
-#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
+#: elf-m10200.c:446 elf-m10300.c:1699 elf32-arm.h:2092 elf32-avr.c:816
+#: elf32-cris.c:1394 elf32-d10v.c:574 elf32-fr30.c:638 elf32-frv.c:819
+#: elf32-h8300.c:532 elf32-i860.c:1032 elf32-iq2000.c:703 elf32-m32r.c:1287
+#: elf32-m68hc1x.c:1309 elf32-msp430.c:514 elf32-openrisc.c:440
+#: elf32-v850.c:1781 elf32-xstormy16.c:980 elf64-mmix.c:1336 elfxx-mips.c:6452
 msgid "internal error: unsupported relocation error"
 msgstr "error interno: error de reubicación sin soporte"
 
-#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
-#: elf32-h8300.c:556 elf32-m32r.c:1286
+#: elf-m10200.c:450 elf-m10300.c:1703 elf32-arm.h:2096 elf32-d10v.c:578
+#: elf32-h8300.c:536 elf32-m32r.c:1291 elf32-m68hc1x.c:1313
 msgid "internal error: dangerous error"
 msgstr "error interno: error peligroso"
 
-#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
-#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
-#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
-#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
+#: elf-m10200.c:454 elf-m10300.c:1707 elf32-arm.h:2100 elf32-avr.c:824
+#: elf32-cris.c:1402 elf32-d10v.c:582 elf32-fr30.c:646 elf32-frv.c:827
+#: elf32-h8300.c:540 elf32-i860.c:1040 elf32-ip2k.c:1601 elf32-iq2000.c:711
+#: elf32-m32r.c:1295 elf32-m68hc1x.c:1317 elf32-msp430.c:522
+#: elf32-openrisc.c:448 elf32-v850.c:1801 elf32-xstormy16.c:988
+#: elf64-mmix.c:1344
 msgid "internal error: unknown error"
 msgstr "error interno: error desconocido"
 
-#: elf.c:343
+#: elf.c:372
 #, c-format
 msgid "%s: invalid string offset %u >= %lu for section `%s'"
 msgstr "%s: desplazamiento de cadena inválido %u >= %lu para la sección `%s'"
 
-#: elf.c:589
+#: elf.c:624
 #, c-format
 msgid "%s: invalid SHT_GROUP entry"
 msgstr "%s: entrada SHT_GROUP inválida"
 
-#: elf.c:660
+#: elf.c:695
 #, c-format
 msgid "%s: no group info for section %s"
 msgstr "%s: no hay información de grupo para la sección %s"
 
-#: elf.c:1023
+#: elf.c:1055
 msgid ""
 "\n"
 "Program Header:\n"
@@ -619,7 +646,7 @@ msgstr ""
 "\n"
 "Encabezado del Programa:\n"
 
-#: elf.c:1073
+#: elf.c:1106
 msgid ""
 "\n"
 "Dynamic Section:\n"
@@ -627,7 +654,7 @@ msgstr ""
 "\n"
 "Sección Dinámica:\n"
 
-#: elf.c:1202
+#: elf.c:1235
 msgid ""
 "\n"
 "Version definitions:\n"
@@ -635,7 +662,7 @@ msgstr ""
 "\n"
 "Definiciones de versión:\n"
 
-#: elf.c:1225
+#: elf.c:1258
 msgid ""
 "\n"
 "Version References:\n"
@@ -643,224 +670,239 @@ msgstr ""
 "\n"
 "Referencias de Versión:\n"
 
-#: elf.c:1230
+#: elf.c:1263
 #, c-format
 msgid "  required from %s:\n"
 msgstr "  requerido desde %s:\n"
 
-#: elf.c:1902
+#: elf.c:1944
 #, c-format
 msgid "%s: invalid link %lu for reloc section %s (index %u)"
 msgstr "%s: enlace %lu inválido para la sección de reubicación %s (índice %u)"
 
-#: elf.c:3603
+#: elf.c:3686
 #, c-format
 msgid "%s: Not enough room for program headers (allocated %u, need %u)"
 msgstr "%s: No hay suficiente espacio para los encabezados del programa (%u asignados, %u necesarios)"
 
-#: elf.c:3708
+#: elf.c:3791
 #, c-format
 msgid "%s: Not enough room for program headers, try linking with -N"
 msgstr "%s: No hay suficiente espacio para los encabezados del programa, pruebe enlazar con -N"
 
-#: elf.c:3833
+#: elf.c:3922
 #, c-format
 msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
 msgstr "Error: La primera sección en el segmento (%s) inicia en 0x%x mientras que el segmento inicia en 0x%x"
 
-#: elf.c:4148
+#: elf.c:4242
 #, c-format
 msgid "%s: warning: allocated section `%s' not in segment"
 msgstr "%s: aviso: la sección asignada `%s' no está en el segmento"
 
-#: elf.c:4472
+#: elf.c:4566
 #, c-format
 msgid "%s: symbol `%s' required but not present"
 msgstr "%s: se requiere el símbolo `%s' pero no está presente"
 
-#: elf.c:4749
+#: elf.c:4854
 #, c-format
 msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
 msgstr "%s: aviso: Se detectó un segmento cargable vacío, ¿ es intencional ?\n"
 
-#: elf.c:6193
+#: elf.c:5485
+#, c-format
+msgid "Unable to find equivalent output section for symbol '%s' from section '%s'"
+msgstr "No se puede encontrar la sección de salida equivalente para el símbolo '%s' de la sección '%s'"
+
+#: elf.c:6298
 #, c-format
 msgid "%s: unsupported relocation type %s"
 msgstr "%s: tipo de reubicación %s sin soporte"
 
-#: elf32-arm.h:1221
+#: elf32-arm.h:1228
 #, c-format
 msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
 msgstr "%s: Aviso: La instrucción Arm BLX apunta a la función Arm '%s'."
 
-#: elf32-arm.h:1417
+#: elf32-arm.h:1424
 #, c-format
 msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
 msgstr "%s: Aviso: La instrucción Thumb BLX apunta a la función thumb '%s'."
 
-#: elf32-arm.h:1914 elf32-sh.c:4125
+#: elf32-arm.h:1918 elf32-sh.c:4706 elf64-sh64.c:1613
 #, c-format
 msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
 msgstr "%s(%s+0x%lx): reubicación %s contra la sección SEC_MERGE"
 
-#: elf32-arm.h:2008
+#: elf32-arm.h:2012
 #, c-format
 msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
 msgstr "%s: aviso: reubicación %d sin resolución contra el símbolo `%s' de la sección %s"
 
-#: elf32-arm.h:2176
+#: elf32-arm.h:2202
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
 msgstr "Aviso: Limpiando la opción de interoperación en %s porque se ha enlazado con él código no interoperable en %s"
 
-#: elf32-arm.h:2271
+#: elf32-arm.h:2302
 #, c-format
 msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
 msgstr "ERROR: %s está compilado para EABI versión %d, mientras que %s está compilado para la versión %d"
 
-#: elf32-arm.h:2285
+#: elf32-arm.h:2316
 #, c-format
 msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
 msgstr "ERROR: %s está compilado para APCS-%d mientras que el objetivo %s usa APCS-%d"
 
-#: elf32-arm.h:2313
+#: elf32-arm.h:2344
 #, c-format
-msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
-msgstr "ERROR: %s utiliza instrucciones VFP, mientras que %s utiliza instrucciones FPA"
+msgid "ERROR: %s uses VFP instructions, whereas %s does not"
+msgstr "ERROR: %s utiliza instrucciones VFP, mientras que %s no"
 
-#: elf32-arm.h:2318
+#: elf32-arm.h:2349
 #, c-format
-msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
-msgstr "ERROR: %s utiliza instrucciones FPA, mientras que %s utiliza instrucciones VFP"
+msgid "ERROR: %s uses FPA instructions, whereas %s does not"
+msgstr "ERROR: %s utiliza instrucciones FPA, mientras que %s no"
 
-#: elf32-arm.h:2338
+#: elf32-arm.h:2360 elf32-arm.h:2365
+#, c-format
+msgid "ERROR: %s uses Maverick instructions, whereas %s does not"
+msgstr "ERROR: %s utiliza instrucciones Maverick, mientras que %s no"
+
+#: elf32-arm.h:2385
 #, c-format
 msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
 msgstr "ERROR: %s utiliza FP de software, mientras que %s utiliza FP de hardware"
 
-#: elf32-arm.h:2343
+#: elf32-arm.h:2390
 #, c-format
 msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
 msgstr "ERROR: %s utiliza FP de hardware, mientras que %s utiliza FP de software"
 
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
-#: elfxx-mips.c:7756
+#: elf32-arm.h:2443 elf32-cris.c:2975 elf32-m68hc1x.c:1459 elf32-m68k.c:397
+#: elf32-vax.c:546 elfxx-mips.c:9238
 #, c-format
 msgid "private flags = %lx:"
 msgstr "opciones privadas = %lx:"
 
-#: elf32-arm.h:2405
+#: elf32-arm.h:2452
 msgid " [interworking enabled]"
 msgstr " [interoperabilidad activada]"
 
-#: elf32-arm.h:2413
+#: elf32-arm.h:2460
 msgid " [VFP float format]"
 msgstr " [formato de coma flotante VFP]"
 
-#: elf32-arm.h:2415
+#: elf32-arm.h:2462
+msgid " [Maverick float format]"
+msgstr " [formato de coma flotante Maverick]"
+
+#: elf32-arm.h:2464
 msgid " [FPA float format]"
 msgstr " [formato de coma flotante FPA]"
 
-#: elf32-arm.h:2424
+#: elf32-arm.h:2473
 msgid " [new ABI]"
 msgstr " [ABI nuevo]"
 
-#: elf32-arm.h:2427
+#: elf32-arm.h:2476
 msgid " [old ABI]"
 msgstr " [ABI antiguo]"
 
-#: elf32-arm.h:2430
+#: elf32-arm.h:2479
 msgid " [software FP]"
 msgstr " [FP por software]"
 
-#: elf32-arm.h:2438
+#: elf32-arm.h:2488
 msgid " [Version1 EABI]"
 msgstr " [EABI Version1]"
 
-#: elf32-arm.h:2441 elf32-arm.h:2452
+#: elf32-arm.h:2491 elf32-arm.h:2502
 msgid " [sorted symbol table]"
 msgstr " [tabla de símbolos ordenados]"
 
-#: elf32-arm.h:2443 elf32-arm.h:2454
+#: elf32-arm.h:2493 elf32-arm.h:2504
 msgid " [unsorted symbol table]"
 msgstr " [tabla de símbolos sin ordenar]"
 
-#: elf32-arm.h:2449
+#: elf32-arm.h:2499
 msgid " [Version2 EABI]"
 msgstr " [EABI Version2]"
 
-#: elf32-arm.h:2457
+#: elf32-arm.h:2507
 msgid " [dynamic symbols use segment index]"
 msgstr " [los símbolos dinámicos utilizan índices de segmento]"
 
-#: elf32-arm.h:2460
+#: elf32-arm.h:2510
 msgid " [mapping symbols precede others]"
 msgstr " [el mapeo de símbolos precede a otros]"
 
-#: elf32-arm.h:2467
+#: elf32-arm.h:2517
 msgid " <EABI version unrecognised>"
 msgstr " <versión de EABI no reconocida>"
 
-#: elf32-arm.h:2474
+#: elf32-arm.h:2524
 msgid " [relocatable executable]"
 msgstr " [ejecutable reubicable]"
 
-#: elf32-arm.h:2477
+#: elf32-arm.h:2527
 msgid " [has entry point]"
 msgstr " [tiene punto de entrada]"
 
-#: elf32-arm.h:2482
+#: elf32-arm.h:2532
 msgid "<Unrecognised flag bits set>"
 msgstr "<Conjunto de bits de opción no reconocidos>"
 
-#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
-#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
-#: elf32-xstormy16.c:941 elf64-mmix.c:1310
+#: elf32-avr.c:820 elf32-cris.c:1398 elf32-fr30.c:642 elf32-frv.c:823
+#: elf32-i860.c:1036 elf32-ip2k.c:1597 elf32-iq2000.c:707 elf32-msp430.c:518
+#: elf32-openrisc.c:444 elf32-v850.c:1785 elf32-xstormy16.c:984
+#: elf64-mmix.c:1340
 msgid "internal error: dangerous relocation"
 msgstr "error interno: reubicación peligrosa"
 
-#: elf32-cris.c:949
+#: elf32-cris.c:931
 #, c-format
 msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
 msgstr "%s: reubicación %s sin resolución contra el símbolo `%s' de la sección %s"
 
-#: elf32-cris.c:1012
+#: elf32-cris.c:993
 #, c-format
 msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
 msgstr "%s: No hay PLT ni GOT para la reubicación %s contra el símbolo `%s' de la sección %s"
 
-#: elf32-cris.c:1015 elf32-cris.c:1141
+#: elf32-cris.c:996 elf32-cris.c:1122
 msgid "[whose name is lost]"
 msgstr "[cuyo nombre se pierde]"
 
-#: elf32-cris.c:1130
+#: elf32-cris.c:1111
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
 msgstr "%s: reubicación %s con adición %d que no es cero contra un símbolo local de la sección %s"
 
-#: elf32-cris.c:1137
+#: elf32-cris.c:1118
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
 msgstr "%s: reubicación %s con adición %d que no es cero contra el símbolo `%s' de la sección %s"
 
-#: elf32-cris.c:1155
+#: elf32-cris.c:1143
 #, c-format
 msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
 msgstr "%s: no se permite la reubicación %s para el símbolo global: `%s' de la sección %s"
 
-#: elf32-cris.c:1170
+#: elf32-cris.c:1158
 #, c-format
 msgid "%s: relocation %s in section %s with no GOT created"
 msgstr "%s: la reubicación %s en la sección %s sin GOT creado"
 
-#: elf32-cris.c:1288
+#: elf32-cris.c:1277
 #, c-format
 msgid "%s: Internal inconsistency; no relocation section %s"
 msgstr "%s: Inconsistencia interna; no se encuentra la sección de reubicación %s"
 
-#: elf32-cris.c:2514
+#: elf32-cris.c:2500
 #, c-format
 msgid ""
 "%s, section %s:\n"
@@ -869,492 +911,645 @@ msgstr ""
 "%s, sección %s:\n"
 "  no se debe usar la reubicación %s en un objeto compartido; recompile con -fPIC"
 
-#: elf32-cris.c:2991
+#: elf32-cris.c:2978
 msgid " [symbols have a _ prefix]"
 msgstr " [los símbolos tiene un prefijo _]"
 
-#: elf32-cris.c:3030
+#: elf32-cris.c:3017
 #, c-format
 msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
 msgstr "%s: utiliza símbolos con prefijo _, pero escribe el fichero con símbolos sin prefijo"
 
-#: elf32-cris.c:3031
+#: elf32-cris.c:3018
 #, c-format
 msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
 msgstr "%s: utiliza símbolos sin prefijo, pero escribe el fichero con símbolos con prefijo _"
 
-#: elf32-frv.c:1217
+#: elf32-frv.c:1223
 #, c-format
 msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
 msgstr "%s: compilado con %s y enlazado con módulos que usan reubicaciones que no son pic"
 
-#: elf32-frv.c:1267
+#: elf32-frv.c:1273 elf32-iq2000.c:895
 #, c-format
 msgid "%s: compiled with %s and linked with modules compiled with %s"
 msgstr "%s: compilado con %s y enlazado con módulos compilados con %s"
 
-#: elf32-frv.c:1279
+#: elf32-frv.c:1285
 #, c-format
 msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
 msgstr "%s: usa campos e_flags desconocidos (0x%lx) diferentes a aquéllos de los módulos previos (0x%lx)"
 
-#: elf32-frv.c:1315
+#: elf32-frv.c:1321 elf32-iq2000.c:933
 #, c-format
 msgid "private flags = 0x%lx:"
 msgstr "opciones privadas = 0x%lx:"
 
-#: elf32-gen.c:82 elf64-gen.c:82
+#: elf32-gen.c:83 elf64-gen.c:82
 #, c-format
 msgid "%s: Relocations in generic ELF (EM: %d)"
 msgstr "%s: Reubicaciones en ELF genérico (EM: %d)"
 
-#: elf32-hppa.c:671 elf64-ppc.c:2323
+#: elf32-hppa.c:672 elf32-m68hc1x.c:176 elf64-ppc.c:3118
 #, c-format
 msgid "%s: cannot create stub entry %s"
 msgstr "%s: no se puede crear la entrada de cabo %s"
 
-#: elf32-hppa.c:956 elf32-hppa.c:3555
+#: elf32-hppa.c:957 elf32-hppa.c:3538
 #, c-format
 msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
 msgstr "%s(%s+0x%lx): no se puede alcanzar %s, recompile con -ffuntion-sections"
 
-#: elf32-hppa.c:1338 elf64-x86-64.c:673
+#: elf32-hppa.c:1340 elf64-x86-64.c:672 elf64-x86-64.c:797
 #, c-format
 msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
 msgstr "%s: no se puede usar la reubicación %s cuando se hace un objeto compartido; recompile con -fPIC"
 
-#: elf32-hppa.c:1358
+#: elf32-hppa.c:1360
 #, c-format
 msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
 msgstr "%s: no se debe usar la reubicación %s cuando se hace un objeto compartido; recompile con -fPIC"
 
-#: elf32-hppa.c:1551
+#: elf32-hppa.c:1553
 #, c-format
 msgid "Could not find relocation section for %s"
 msgstr "No se puede encontrar la sección de reubicación para %s"
 
-#: elf32-hppa.c:2855
+#: elf32-hppa.c:2828
 #, c-format
 msgid "%s: duplicate export stub %s"
 msgstr "%s: cabo de exportación %s duplicado"
 
-#: elf32-hppa.c:3433
+#: elf32-hppa.c:3416
 #, c-format
 msgid "%s(%s+0x%lx): fixing %s"
 msgstr "%s(%s+0x%lx): componiendo %s"
 
-#: elf32-hppa.c:4080
+#: elf32-hppa.c:4039
 #, c-format
 msgid "%s(%s+0x%lx): cannot handle %s for %s"
 msgstr "%s(%s+0x%lx): no se puede manejar %s para %s"
 
-#: elf32-hppa.c:4393
+#: elf32-hppa.c:4357
 msgid ".got section not immediately after .plt section"
 msgstr "la sección .got no está inmediatamente después de la sección .plt"
 
-#: elf32-i386.c:379
+#: elf32-i386.c:326
 #, c-format
 msgid "%s: invalid relocation type %d"
 msgstr "%s: tipo de reubicación %d inválido"
 
-#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
+#: elf32-i386.c:841 elf32-s390.c:990 elf32-sparc.c:887 elf32-xtensa.c:637
+#: elf64-s390.c:943 elf64-x86-64.c:650
 #, c-format
 msgid "%s: bad symbol index: %d"
 msgstr "%s: índice de símbolos erróneo: %d"
 
-#: elf32-i386.c:948
+#: elf32-i386.c:949 elf32-s390.c:1168 elf32-sh.c:6426 elf32-sparc.c:1011
+#: elf64-s390.c:1129
 #, c-format
 msgid "%s: `%s' accessed both as normal and thread local symbol"
 msgstr "%s: se accesó `%s' como un símbolo normal y un símbolo local de hilo"
 
-#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
-#: elf64-x86-64.c:761
+#: elf32-i386.c:1064 elf32-s390.c:1279 elf64-ppc.c:3929 elf64-s390.c:1243
+#: elf64-x86-64.c:886
 #, c-format
 msgid "%s: bad relocation section name `%s'"
 msgstr "%s: nombre de sección de reubicación `%s' erróneo"
 
-#: elf32-i386.c:1159 elf64-alpha.c:4768
-#, c-format
-msgid "%s: TLS local exec code cannot be linked into shared objects"
-msgstr "%s: el código de ejecución local TLS no se puede enlazar en objetos compartidos"
-
-#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
-#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
+#: elf32-i386.c:2908 elf32-m68k.c:1757 elf32-s390.c:3022 elf32-sparc.c:2879
+#: elf32-xtensa.c:2193 elf64-s390.c:3018 elf64-sparc.c:2664
+#: elf64-x86-64.c:2452
 #, c-format
 msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
 msgstr "%s(%s+0x%lx): reubicación sin resolución contra el símbolo `%s'"
 
-#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
-#: elf64-x86-64.c:1986
+#: elf32-i386.c:2947 elf32-m68k.c:1796 elf32-s390.c:3072 elf64-s390.c:3068
+#: elf64-x86-64.c:2490
 #, c-format
 msgid "%s(%s+0x%lx): reloc against `%s': error %d"
 msgstr "%s(%s+0x%lx): reubicación contra `%s': error %d"
 
-#: elf32-m32r.c:924
+#: elf32-ip2k.c:565 elf32-ip2k.c:571 elf32-ip2k.c:734 elf32-ip2k.c:740
+msgid "ip2k relaxer: switch table without complete matching relocation information."
+msgstr "relajador ip2k: tabla switch sin información completa de reubicación de coincidencias."
+
+#: elf32-ip2k.c:588 elf32-ip2k.c:767
+msgid "ip2k relaxer: switch table header corrupt."
+msgstr "relajador ip2k: encabezado de tabla switch corrupto."
+
+#: elf32-ip2k.c:1395
+#, c-format
+msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr "enlazador ip2k: instrucción de página faltante en 0x%08lx (dest = 0x%08lx)."
+
+#: elf32-ip2k.c:1409
+#, c-format
+msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr "enlazador ip2k: instrucción de página redundante en 0x%08lx (dest = 0x%08lx)."
+
+#. Only if it's not an unresolved symbol.
+#: elf32-ip2k.c:1593
+msgid "unsupported relocation between data/insn address spaces"
+msgstr "reubicación sin soporte entre espacios de direcciones datos/insn"
+
+#: elf32-iq2000.c:907 elf32-m68hc1x.c:1431 elf32-ppc.c:2175 elf64-sparc.c:3072
+#: elfxx-mips.c:9195
+#, c-format
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: usa campos de e_flags diferentes (0x%lx) que los módulos previos (0x%lx)"
+
+#: elf32-m32r.c:930
 msgid "SDA relocation when _SDA_BASE_ not defined"
 msgstr "reubicación SDA cuando _SDA_BASE_ no está definido"
 
-#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
-#: elf64-alpha.c:4313 elf64-ia64.c:3687
+#: elf32-m32r.c:1018 elf64-alpha.c:4279 elf64-alpha.c:4407 elf32-ia64.c:3958
+#: elf64-ia64.c:3958
 #, c-format
 msgid "%s: unknown relocation type %d"
 msgstr "%s: tipo de reubicación %d desconocido"
 
-#: elf32-m32r.c:1221
+#: elf32-m32r.c:1226
 #, c-format
 msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
 msgstr "%s: El objetivo (%s) de una reubicación %s está en la sección errónea (%s)"
 
-#: elf32-m32r.c:1947
+#: elf32-m32r.c:1952
 #, c-format
 msgid "%s: Instruction set mismatch with previous modules"
 msgstr "%s: Conjunto de instrucciones no coincidente con módulos previos"
 
-#: elf32-m32r.c:1970
+#: elf32-m32r.c:1975
 #, c-format
 msgid "private flags = %lx"
 msgstr "opciones privadas = %lx"
 
-#: elf32-m32r.c:1975
+#: elf32-m32r.c:1980
 msgid ": m32r instructions"
 msgstr ": instrucciones m32r"
 
-#: elf32-m32r.c:1976
+#: elf32-m32r.c:1981
 msgid ": m32rx instructions"
 msgstr ": instrucciones m32rx"
 
-#: elf32-m68k.c:413
+#: elf32-m68hc1x.c:1217
+#, c-format
+msgid "Reference to the far symbol `%s' using a wrong relocation may result in incorrect execution"
+msgstr "Una referencia al símbolo far `%s' usando una reubicación incorrecta puede resultar en una ejecución incorrecta"
+
+#: elf32-m68hc1x.c:1240
+#, c-format
+msgid "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)"
+msgstr "la dirección almacenada [%lx:%04lx] (%lx) no está en el mismo banco que la dirección almacenada actual [%lx:%04lx] (%lx)"
+
+#: elf32-m68hc1x.c:1259
+#, c-format
+msgid "reference to a banked address [%lx:%04lx] in the normal address space at %04lx"
+msgstr "referencia a una dirección almacenada [%lx:%04lx] en el espacio normal de direcciones en %04lx"
+
+#: elf32-m68hc1x.c:1396
+#, c-format
+msgid "%s: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers"
+msgstr "%s: enlazando ficheros compilados con enteros de 16-bit (-mshort) y otros con enteros de 32-bit"
+
+#: elf32-m68hc1x.c:1404
+#, c-format
+msgid "%s: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double"
+msgstr "%s: enlazando ficheros compilados con dobles de 32-bit (-fshort-double) y otros con dobles de 64-bit"
+
+#: elf32-m68hc1x.c:1414
+#, c-format
+msgid "%s: linking files compiled for HCS12 with others compiled for HC12"
+msgstr "%s: enlazando ficheros compilados para HCS12, con otros compilados para HC12"
+
+#: elf32-m68hc1x.c:1462
+msgid "[abi=32-bit int, "
+msgstr "[abi=int de 32-bit, "
+
+#: elf32-m68hc1x.c:1464
+msgid "[abi=16-bit int, "
+msgstr "[abi=int de 16-bit, "
+
+#: elf32-m68hc1x.c:1467
+msgid "64-bit double, "
+msgstr "doble de 64-bit, "
+
+#: elf32-m68hc1x.c:1469
+msgid "32-bit double, "
+msgstr "doble de 32-bit, "
+
+#: elf32-m68hc1x.c:1472
+msgid "cpu=HC11]"
+msgstr "cpu=HC11]"
+
+#: elf32-m68hc1x.c:1474
+msgid "cpu=HCS12]"
+msgstr "cpu=HCS12]"
+
+#: elf32-m68hc1x.c:1476
+msgid "cpu=HC12]"
+msgstr "cpu=HC12]"
+
+#: elf32-m68hc1x.c:1479
+msgid " [memory=bank-model]"
+msgstr " [memoria=modelo de bancos]"
+
+#: elf32-m68hc1x.c:1481
+msgid " [memory=flat]"
+msgstr " [memoria=plana]"
+
+#: elf32-m68k.c:400
 msgid " [cpu32]"
 msgstr " [cpu32]"
 
-#: elf32-m68k.c:416
+#: elf32-m68k.c:403
 msgid " [m68000]"
 msgstr " [m68000]"
 
-#: elf32-mcore.c:354 elf32-mcore.c:457
+#: elf32-mcore.c:353 elf32-mcore.c:456
 #, c-format
 msgid "%s: Relocation %s (%d) is not currently supported.\n"
 msgstr "%s: La reubicación %s (%d) actualmente no tiene soporte.\n"
 
-#: elf32-mcore.c:442
+#: elf32-mcore.c:441
 #, c-format
 msgid "%s: Unknown relocation type %d\n"
 msgstr "%s: Tipo de reubicación %d desconocido\n"
 
-#: elf32-mips.c:1152 elf64-mips.c:1783
+#: elf32-mips.c:1170 elf64-mips.c:1717 elfn32-mips.c:1664
 msgid "32bits gp relative relocation occurs for an external symbol"
 msgstr "la reubicación gp relativa de 32bits sucede para un símbolo externo"
 
-#: elf32-mips.c:1301
+#: elf32-mips.c:1314 elf64-mips.c:1830 elfn32-mips.c:1783
 #, c-format
 msgid "Linking mips16 objects into %s format is not supported"
 msgstr "Enlazar objetos mips16 en el formato %s no tiene soporte"
 
-#: elf32-ppc.c:1460
+#: elf32-ppc.c:2056
+#, c-format
+msgid "generic linker can't handle %s"
+msgstr "el enlazador genérico no puede manejar %s"
+
+#: elf32-ppc.c:2138
 #, c-format
 msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
 msgstr "%s: compilado con -mrelocatable y enlazado con módulos compilados de forma normal"
 
-#: elf32-ppc.c:1468
+#: elf32-ppc.c:2147
 #, c-format
 msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
 msgstr "%s: compilado de forma normal y enlazado con módulos compilados con -mrelocatable"
 
-#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
-#, c-format
-msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr "%s: usa campos de e_flags diferentes (0x%lx) que los módulos previos (0x%lx)"
-
-#: elf32-ppc.c:1592
-#, c-format
-msgid "%s: Unknown special linker type %d"
-msgstr "%s: Tipo de enlazador especial %d desconocido"
-
-#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
+#: elf32-ppc.c:3413
 #, c-format
 msgid "%s: relocation %s cannot be used when making a shared object"
 msgstr "%s: no se puede usar la reubicación %s cuando se hace un objeto compartido"
 
-#: elf32-ppc.c:3126 elf64-ppc.c:5473
+#. It does not make sense to have a procedure linkage
+#. table entry for a local symbol.
+#: elf32-ppc.c:3619
+#, c-format
+msgid "%s(%s+0x%lx): %s reloc against local symbol"
+msgstr "%s(%s+0x%lx): reubicación %s contra un símbolo local"
+
+#: elf32-ppc.c:4862 elf64-ppc.c:7789
 #, c-format
 msgid "%s: unknown relocation type %d for symbol %s"
 msgstr "%s: tipo de reubicación %d desconocido para el símbolo %s"
 
-#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
+#: elf32-ppc.c:5113
 #, c-format
-msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
-msgstr "%s: El objetivo (%s) de una reubicación %s está en la sección de salida errónea (%s)"
+msgid "%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"
+msgstr "%s(%s+0x%lx): adición que no es cero en la reubicación %s contra `%s'"
 
-#: elf32-ppc.c:3619
+#: elf32-ppc.c:5399 elf32-ppc.c:5425 elf32-ppc.c:5484
+#, c-format
+msgid "%s: the target (%s) of a %s relocation is in the wrong output section (%s)"
+msgstr "%s: el objetivo (%s) de una reubicación %s está en la sección de salida errónea (%s)"
+
+#: elf32-ppc.c:5539
 #, c-format
-msgid "%s: Relocation %s is not yet supported for symbol %s."
-msgstr "%s: La reubicación %s aún no tiene soporte para el símbolo %s."
+msgid "%s: relocation %s is not yet supported for symbol %s."
+msgstr "%s: la reubicación %s aún no tiene soporte para el símbolo %s."
 
-#: elf32-sh.c:1964
+#: elf32-ppc.c:5594 elf64-ppc.c:8461
+#, c-format
+msgid "%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
+msgstr "%s(%s+0x%lx): reubicación %s sin resolución contra el símbolo `%s'"
+
+#: elf32-ppc.c:5644 elf64-ppc.c:8507
+#, c-format
+msgid "%s(%s+0x%lx): %s reloc against `%s': error %d"
+msgstr "%s(%s+0x%lx): reubicación %s contra `%s': error %d"
+
+#: elf32-ppc.c:5888
+#, c-format
+msgid "corrupt or empty %s section in %s"
+msgstr "sección %s corrupta o vacía en %s"
+
+#: elf32-ppc.c:5895
+#, c-format
+msgid "unable to read in %s section from %s"
+msgstr "no se puede leer en la sección %s desde %s"
+
+#: elf32-ppc.c:5901
+#, c-format
+msgid "corrupt %s section in %s"
+msgstr "sección %s corrupta en %s"
+
+#: elf32-ppc.c:5944
+#, c-format
+msgid "warning: unable to set size of %s section in %s"
+msgstr "aviso: no se puede establecer el tamaño de la sección %s en %s"
+
+#: elf32-ppc.c:5994
+msgid "failed to allocate space for new APUinfo section."
+msgstr "no se puede reservar espacio para la nueva sección APUinfo."
+
+#: elf32-ppc.c:6013
+msgid "failed to compute new APUinfo section."
+msgstr "no se puede calcular la nueva sección APUinfo."
+
+#: elf32-ppc.c:6016
+msgid "failed to install new APUinfo section."
+msgstr "no se puede instalar la nueva sección APUinfo."
+
+#: elf32-s390.c:2256 elf64-s390.c:2226
+#, c-format
+msgid "%s(%s+0x%lx): invalid instruction for TLS relocation %s"
+msgstr "%s(%s+0x%lx): instrucción inválida para la reubicación TLS %s"
+
+#: elf32-sh.c:2103
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
 msgstr "%s: 0x%lx: aviso: desplazamiento R_SH_USES erróneo"
 
-#: elf32-sh.c:1976
+#: elf32-sh.c:2115
 #, c-format
 msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
 msgstr "%s: 0x%lx: aviso: R_SH_USES señala al insn 0x%x no reconocido"
 
-#: elf32-sh.c:1993
+#: elf32-sh.c:2132
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
 msgstr "%s: 0x%lx: aviso: desplazamiento de carga R_SH_USES erróneo"
 
-#: elf32-sh.c:2008
+#: elf32-sh.c:2147
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected reloc"
 msgstr "%s: 0x%lx: aviso: no se puede encontrar la reubicación esperada"
 
-#: elf32-sh.c:2036
+#: elf32-sh.c:2175
 #, c-format
 msgid "%s: 0x%lx: warning: symbol in unexpected section"
 msgstr "%s: 0x%lx: aviso: símbolo en una sección inesperada"
 
-#: elf32-sh.c:2153
+#: elf32-sh.c:2300
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
 msgstr "%s: 0x%lx: aviso: no se puede encontrar la reubicación COUNT esperada"
 
-#: elf32-sh.c:2162
+#: elf32-sh.c:2309
 #, c-format
 msgid "%s: 0x%lx: warning: bad count"
 msgstr "%s: 0x%lx: aviso: cuenta errónea"
 
-#: elf32-sh.c:2550 elf32-sh.c:2926
+#: elf32-sh.c:2712 elf32-sh.c:3088
 #, c-format
 msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
 msgstr "%s: 0x%lx: fatal: desbordamiento de reubicación durante la relajación"
 
-#: elf32-sh.c:4073 elf64-sh64.c:1576
+#: elf32-sh.c:4654 elf64-sh64.c:1585
 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
 msgstr "No se maneja un STO_SH5_ISA32 inesperado en un símbolo local"
 
-#: elf32-sh.c:4284
+#: elf32-sh.c:4809
+#, c-format
+msgid "%s: unresolvable relocation against symbol `%s' from %s section"
+msgstr "%s: reubicación sin resolución contra el símbolo `%s' de la sección %s"
+
+#: elf32-sh.c:4881
 #, c-format
 msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
 msgstr "%s: 0x%lx: fatal: objetivo de ramificación sin alineación para la reubicación de soporte de relajamiento"
 
-#: elf32-sh64.c:203 elf64-sh64.c:2364
+#: elf32-sh.c:6627 elf64-alpha.c:4848
+#, c-format
+msgid "%s: TLS local exec code cannot be linked into shared objects"
+msgstr "%s: el código de ejecución local TLS no se puede enlazar en objetos compartidos"
+
+#: elf32-sh64.c:221 elf64-sh64.c:2407
 #, c-format
 msgid "%s: compiled as 32-bit object and %s is 64-bit"
 msgstr "%s: compilado como un objeto de 32-bit y %s es de 64-bit"
 
-#: elf32-sh64.c:206 elf64-sh64.c:2367
+#: elf32-sh64.c:224 elf64-sh64.c:2410
 #, c-format
 msgid "%s: compiled as 64-bit object and %s is 32-bit"
 msgstr "%s: compilado como un objeto de 64-bit y %s es de 32-bit"
 
-#: elf32-sh64.c:208 elf64-sh64.c:2369
+#: elf32-sh64.c:226 elf64-sh64.c:2412
 #, c-format
 msgid "%s: object size does not match that of target %s"
 msgstr "%s: el tamaño del objeto no coincide con el tamaño del objetivo %s"
 
-#: elf32-sh64.c:440 elf64-sh64.c:2941
+#: elf32-sh64.c:461 elf64-sh64.c:2990
 #, c-format
 msgid "%s: encountered datalabel symbol in input"
 msgstr "%s: se encontró un símbolo datalabel en la entrada"
 
-#: elf32-sh64.c:523
+#: elf32-sh64.c:544
 msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
 msgstr "No coincide PTB: una dirección SHmedia (bit 0 == 1)"
 
-#: elf32-sh64.c:526
+#: elf32-sh64.c:547
 msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
 msgstr "No coincide PTA: una dirección SHcompact (bit 0 == 0)"
 
-#: elf32-sh64.c:544
+#: elf32-sh64.c:565
 #, c-format
 msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
 msgstr "%s: error de GAS: instrucción PTB inesperada con R_SH_PT_16"
 
-#: elf32-sh64.c:593 elf64-sh64.c:1703
+#: elf32-sh64.c:614 elf64-sh64.c:1748
 #, c-format
 msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
 msgstr "%s: error: tipo de reubicación %d sin alinear en %08x reubicación %08x\n"
 
-#: elf32-sh64.c:677
+#: elf32-sh64.c:698
 #, c-format
 msgid "%s: could not write out added .cranges entries"
 msgstr "%s: no se pueden escribir las entradas .cranges agregadas"
 
-#: elf32-sh64.c:739
+#: elf32-sh64.c:760
 #, c-format
 msgid "%s: could not write out sorted .cranges entries"
 msgstr "%s: no se pueden escribir las entradas .cranges ordenadas"
 
-#: elf32-sparc.c:1535 elf64-sparc.c:2224
+#: elf32-sparc.c:2521 elf64-sparc.c:2314
 #, c-format
 msgid "%s: probably compiled without -fPIC?"
 msgstr "%s: ¿Compilado probablemente sin -fPIC?"
 
-#: elf32-sparc.c:2002
+#: elf32-sparc.c:3348
 #, c-format
 msgid "%s: compiled for a 64 bit system and target is 32 bit"
 msgstr "%s: compilado para un sistema de 64 bit y el objetivo es de 32 bit"
 
-#: elf32-sparc.c:2016
+#: elf32-sparc.c:3362
 #, c-format
 msgid "%s: linking little endian files with big endian files"
 msgstr "%s: enlazando ficheros little endian con ficheros big endian"
 
-#: elf32-v850.c:682
+#: elf32-v850.c:753
 #, c-format
 msgid "Variable `%s' cannot occupy in multiple small data regions"
 msgstr "La variable `%s' no puede ocupar múltiples regiones de datos small"
 
-#: elf32-v850.c:685
+#: elf32-v850.c:756
 #, c-format
 msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
 msgstr "La variable `%s' solamente puede estar en una de las regiones de datos small, cero, y tiny"
 
-#: elf32-v850.c:688
+#: elf32-v850.c:759
 #, c-format
 msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
 msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos small y cero"
 
-#: elf32-v850.c:691
+#: elf32-v850.c:762
 #, c-format
 msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
 msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos small y tiny"
 
-#: elf32-v850.c:694
+#: elf32-v850.c:765
 #, c-format
 msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
 msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos cero y tiny"
 
-#: elf32-v850.c:1072
+#: elf32-v850.c:1144
 msgid "FAILED to find previous HI16 reloc\n"
 msgstr "FALLO para encontrar la reubicación HI16 previa\n"
 
-#: elf32-v850.c:1703
+#: elf32-v850.c:1789
 msgid "could not locate special linker symbol __gp"
 msgstr "no se puede localizar el símbolo especial del enlazador __gp"
 
-#: elf32-v850.c:1707
+#: elf32-v850.c:1793
 msgid "could not locate special linker symbol __ep"
 msgstr "no se puede localizar el símbolo especial del enlazador __ep"
 
-#: elf32-v850.c:1711
+#: elf32-v850.c:1797
 msgid "could not locate special linker symbol __ctbp"
 msgstr "no se puede localizar el símbolo especial del enlazador __ctbp"
 
-#: elf32-v850.c:1875
+#: elf32-v850.c:1963
 #, c-format
 msgid "%s: Architecture mismatch with previous modules"
 msgstr "%s: No coincide la arquitectura con los módulos previos"
 
-#: elf32-v850.c:1895
+#: elf32-v850.c:1983
 #, c-format
 msgid "private flags = %lx: "
 msgstr "opciones privadas = %lx: "
 
-#: elf32-v850.c:1900
+#: elf32-v850.c:1988
 msgid "v850 architecture"
 msgstr "arquitectura v850"
 
-#: elf32-v850.c:1901
+#: elf32-v850.c:1989
 msgid "v850e architecture"
 msgstr "arquitectura v850e"
 
-#: elf32-v850.c:1902
-msgid "v850ea architecture"
-msgstr "arquitectura v850ea"
-
-#: elf32-vax.c:546
+#: elf32-vax.c:549
 msgid " [nonpic]"
 msgstr " [no pic]"
 
-#: elf32-vax.c:549
+#: elf32-vax.c:552
 msgid " [d-float]"
 msgstr " [flotante-d]"
 
-#: elf32-vax.c:552
+#: elf32-vax.c:555
 msgid " [g-float]"
 msgstr " [flotante-g]"
 
-#: elf32-vax.c:674
+#: elf32-vax.c:663
 #, c-format
 msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
 msgstr "%s: aviso: la adición GOT de %ld a `%s' no coincide con la adición previa GOT de %ld"
 
-#: elf32-vax.c:1679
+#: elf32-vax.c:1667
 #, c-format
 msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
 msgstr "%s: aviso: se ignora la adición PLT de %d a `%s' de la sección %s"
 
-#: elf32-vax.c:1814
+#: elf32-vax.c:1802
 #, c-format
 msgid "%s: warning: %s relocation against symbol `%s' from %s section"
 msgstr "%s: aviso: reubicación %s contra el símbolo `%s' de la sección %s"
 
-#: elf32-vax.c:1820
+#: elf32-vax.c:1808
 #, c-format
 msgid "%s: warning: %s relocation to 0x%x from %s section"
 msgstr "%s: aviso: reubicación %s a 0x%x de la sección %s"
 
-#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
+#: elf32-xstormy16.c:462 elf32-ia64.c:2450 elf64-ia64.c:2450
 msgid "non-zero addend in @fptr reloc"
 msgstr "adición que no es cero en la reubicación @fptr"
 
-#: elf64-alpha.c:1097
+#: elf64-alpha.c:1108
 msgid "GPDISP relocation did not find ldah and lda instructions"
 msgstr "la reubicación GPDISP no encontró las instrucciones ldah y lda"
 
-#: elf64-alpha.c:3675
+#: elf64-alpha.c:3731
 #, c-format
 msgid "%s: .got subsegment exceeds 64K (size %d)"
 msgstr "%s: el subsegmento .got excede los 64K (tamaño %d)"
 
-#: elf64-alpha.c:4498 elf64-alpha.c:4510
+#: elf64-alpha.c:4602 elf64-alpha.c:4614
 #, c-format
 msgid "%s: gp-relative relocation against dynamic symbol %s"
 msgstr "%s: reubicación gp relativa contra el símbolo dinámico %s"
 
-#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#: elf64-alpha.c:4640 elf64-alpha.c:4773
 #, c-format
 msgid "%s: pc-relative relocation against dynamic symbol %s"
 msgstr "%s: reubicación relativa al pc contra el símbolo dinámico %s"
 
-#: elf64-alpha.c:4564
+#: elf64-alpha.c:4668
 #, c-format
 msgid "%s: change in gp: BRSGP %s"
 msgstr "%s: cambio en gp: BRSGP %s"
 
-#: elf64-alpha.c:4589
+#: elf64-alpha.c:4693
 msgid "<unknown>"
 msgstr "<desconocido>"
 
-#: elf64-alpha.c:4594
+#: elf64-alpha.c:4698
 #, c-format
 msgid "%s: !samegp reloc against symbol without .prologue: %s"
 msgstr "%s: reubicación !samegp contra un símbolo sin .prologue: %s"
 
-#: elf64-alpha.c:4639
+#: elf64-alpha.c:4749
 #, c-format
 msgid "%s: unhandled dynamic relocation against %s"
 msgstr "%s: reubicación dinámica sin manejar contra %s"
 
-#: elf64-alpha.c:4752
+#: elf64-alpha.c:4832
 #, c-format
 msgid "%s: dtp-relative relocation against dynamic symbol %s"
 msgstr "%s: reubicación relativa a dtp contra el símbolo dinámico %s"
 
-#: elf64-alpha.c:4775
+#: elf64-alpha.c:4855
 #, c-format
 msgid "%s: tp-relative relocation against dynamic symbol %s"
 msgstr "%s: reubicación relativa a tp contra el símbolo dinámico %s"
 
-#: elf64-hppa.c:2080
+#: elf64-hppa.c:2086
 #, c-format
 msgid "stub entry for %s cannot load .plt, dp offset = %ld"
 msgstr "la entrada de cabo para %s no puede cargar .plt, desplazamiento dp = %ld"
 
-#: elf64-mmix.c:1002
+#: elf64-mmix.c:1032
 #, c-format
 msgid ""
 "%s: Internal inconsistency error for value for\n"
@@ -1363,46 +1558,46 @@ msgstr ""
 "%s: Error de inconsistencia interna para el valor para\n"
 " un registro global colocado por el enlazador: enlazado: 0x%lx%08lx != relajado: 0x%lx%08lx\n"
 
-#: elf64-mmix.c:1386
+#: elf64-mmix.c:1416
 #, c-format
 msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
 msgstr "%s: reubicación base-más-desplazamiento contra un símbolo de registro: (desconocido) en %s"
 
-#: elf64-mmix.c:1391
+#: elf64-mmix.c:1421
 #, c-format
 msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
 msgstr "%s: reubicación base-más-desplazamiento contra un símbolo de registro: %s en %s"
 
-#: elf64-mmix.c:1435
+#: elf64-mmix.c:1465
 #, c-format
 msgid "%s: register relocation against non-register symbol: (unknown) in %s"
 msgstr "%s: reubicación de registro contra un símbolo que no es registro: (desconocido) en %s"
 
-#: elf64-mmix.c:1440
+#: elf64-mmix.c:1470
 #, c-format
 msgid "%s: register relocation against non-register symbol: %s in %s"
 msgstr "%s: reubicación de registro contra un símbolo que no es registro: %s en %s"
 
-#: elf64-mmix.c:1477
+#: elf64-mmix.c:1507
 #, c-format
 msgid "%s: directive LOCAL valid only with a register or absolute value"
 msgstr "%s: la directiva LOCAL sólo es válida con un registro o un valor absoluto"
 
-#: elf64-mmix.c:1505
+#: elf64-mmix.c:1535
 #, c-format
 msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
 msgstr "%s: directiva LOCAL: El registro $%ld no es un registro local.  El primer registro global es $%ld."
 
-#: elf64-mmix.c:1965
+#: elf64-mmix.c:1994
 #, c-format
 msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
 msgstr "%s: Error: definición múltiple de `%s'; el inicio de %s está definido en un fichero enlazado con anterioridad\n"
 
-#: elf64-mmix.c:2024
+#: elf64-mmix.c:2053
 msgid "Register section has contents\n"
 msgstr "La sección de registros no tiene contenido\n"
 
-#: elf64-mmix.c:2186
+#: elf64-mmix.c:2216
 #, c-format
 msgid ""
 "Internal inconsistency: remaining %u != max %u.\n"
@@ -1411,574 +1606,617 @@ msgstr ""
 "Inconsistencia interna: %u restante != %u máximo.\n"
 "  Por favor reporte este bicho."
 
-#: elf64-ppc.c:1669 libbfd.c:1435
+#: elf64-ppc.c:2388 libbfd.c:831
 #, c-format
 msgid "%s: compiled for a big endian system and target is little endian"
 msgstr "%s: compilado para un sistema big endian y el objetivo es little endian"
 
-#: elf64-ppc.c:1671 libbfd.c:1437
+#: elf64-ppc.c:2391 libbfd.c:833
 #, c-format
 msgid "%s: compiled for a little endian system and target is big endian"
 msgstr "%s: compilado para un sistema little endian y el objetivo es big endian"
 
-#: elf64-ppc.c:3610
+#: elf64-ppc.c:4857
 #, c-format
 msgid "%s: unexpected reloc type %u in .opd section"
 msgstr "%s: tipo de reubicación %u inesperado en la sección .opd"
 
-#: elf64-ppc.c:3630
+#: elf64-ppc.c:4877
 #, c-format
 msgid "%s: .opd is not a regular array of opd entries"
 msgstr "%s: .opd no es una matriz regular de entradas opd"
 
-#: elf64-ppc.c:3672
+#: elf64-ppc.c:4897
 #, c-format
 msgid "%s: undefined sym `%s' in .opd section"
 msgstr "%s: símbolo `%s' indefinido en la sección .opd"
 
-#: elf64-ppc.c:4397
+#: elf64-ppc.c:6136
 #, c-format
 msgid "can't find branch stub `%s'"
 msgstr "no se puede encontrar la ramificación de cabo `%s'"
 
-#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#: elf64-ppc.c:6175 elf64-ppc.c:6250
 #, c-format
 msgid "linkage table error against `%s'"
 msgstr "error de la tabla de enlazado contra `%s'"
 
-#: elf64-ppc.c:4573
+#: elf64-ppc.c:6340
 #, c-format
 msgid "can't build branch stub `%s'"
 msgstr "no se puede construir la ramificación de cabos `%s'"
 
-#: elf64-ppc.c:5179
+#: elf64-ppc.c:7047
+msgid ".glink and .plt too far apart"
+msgstr ".glink y .plt están demasiado alejados"
+
+#: elf64-ppc.c:7135
 msgid "stubs don't match calculated size"
 msgstr "los cabos no coinciden con el tamaño calculado"
 
-#: elf64-ppc.c:5828
+#: elf64-ppc.c:7147
+#, c-format
+msgid ""
+"linker stubs in %u groups\n"
+"  branch       %lu\n"
+"  toc adjust   %lu\n"
+"  long branch  %lu\n"
+"  long toc adj %lu\n"
+"  plt call     %lu"
+msgstr ""
+"cabos de enlazador en %u grupos\n"
+"  rama            %lu\n"
+"  ajuste toc      %lu\n"
+"  rama long       %lu\n"
+"  ajuste toc long %lu\n"
+"  llamada plt     %lu"
+
+#: elf64-ppc.c:7723
+#, c-format
+msgid "%s(%s+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc"
+msgstr "%s(%s+0x%lx): los TOCs múltiples automáticos no tienes soporte utilizando sus ficheros crt; recompile con -mminimal-toc o actualice gcc"
+
+#: elf64-ppc.c:7731
+#, c-format
+msgid "%s(%s+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern"
+msgstr "%s(%s+0x%lx): la optimización de llamada hermana a `%s' no permite TOCs múltiples automáticos; recompile con -mminimal-toc ó -fno-optimize-sibling-calls, o vuelva `%s' externa"
+
+#: elf64-ppc.c:8329
 #, c-format
-msgid "%s: Relocation %s is not supported for symbol %s."
-msgstr "%s: La reubicación %s no tiene soporte para el símbolo %s."
+msgid "%s: relocation %s is not supported for symbol %s."
+msgstr "%s: la reubicación %s no tiene soporte para el símbolo %s."
 
-#: elf64-ppc.c:5872
+#: elf64-ppc.c:8408
 #, c-format
-msgid "%s: error: relocation %s not a multiple of 4"
-msgstr "%s: error: la reubicación %s no es un múltiplo de 4"
+msgid "%s: error: relocation %s not a multiple of %d"
+msgstr "%s: error: la reubicación %s no es un múltiplo de %d"
 
-#: elf64-sparc.c:1280
+#: elf64-sparc.c:1370
 #, c-format
 msgid "%s: check_relocs: unhandled reloc type %d"
 msgstr "%s: check_relocs: tipo de reubicación %d sin manejar"
 
-#: elf64-sparc.c:1317
+#: elf64-sparc.c:1407
 #, c-format
 msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
 msgstr "%s: Solamente los registros %%g[2367] pueden ser declarados utilizando STT_REGISTER"
 
-#: elf64-sparc.c:1337
+#: elf64-sparc.c:1427
 #, c-format
 msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
 msgstr "El registro %%g%d se usó de forma incompatible: %s en %s, previamente %s en %s"
 
-#: elf64-sparc.c:1360
+#: elf64-sparc.c:1450
 #, c-format
 msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
 msgstr "El símbolo `%s' tiene tipos divergentes: REGISTER en %s, previamente %s en %s"
 
-#: elf64-sparc.c:1406
+#: elf64-sparc.c:1496
 #, c-format
 msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
 msgstr "El símbolo `%s' tiene tipos divergentes: %s en %s, previamente REGISTER en %s"
 
-#: elf64-sparc.c:2970
+#: elf64-sparc.c:3053
 #, c-format
 msgid "%s: linking UltraSPARC specific with HAL specific code"
 msgstr "%s: enlazando código específico de UltraSPARC con código específico de HAL"
 
-#: elfcode.h:1198
+#: elf64-x86-64.c:739
+#, c-format
+msgid "%s: %s' accessed both as normal and thread local symbol"
+msgstr "%s: se accesó `%s' como un símbolo normal y como un símbolo local de hilo"
+
+#: elfcode.h:1113
 #, c-format
 msgid "%s: version count (%ld) does not match symbol count (%ld)"
 msgstr "%s: la cuenta de versión (%ld) no coincide con la cuenta de símbolos (%ld)"
 
-#: elflink.c:440
+#: elfcode.h:1342
+#, c-format
+msgid "%s(%s): relocation %d has invalid symbol index %ld"
+msgstr "%s(%s): la reubicación %d tiene un índice de símbolo %ld inválido"
+
+#: elflink.c:1456
+#, c-format
+msgid "%s: warning: unexpected redefinition of indirect versioned symbol `%s'"
+msgstr "%s: aviso: redefinición inesperada del símbolo con versión indirecta `%s'"
+
+#: elflink.c:1807
 #, c-format
-msgid "%s: Section %s is too large to add hole of %ld bytes"
-msgstr "%s: La sección %s es muy grande para agregar un agujero de %ld bytes"
+msgid "%s: undefined versioned symbol name %s"
+msgstr "%s: nombre de símbolo con versión %s sin definir"
 
-#: elflink.h:1090
+#: elflink.c:2142
 #, c-format
-msgid "%s: warning: unexpected redefinition of `%s'"
-msgstr "%s: aviso: redefinición inesperada de `%s'"
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr "%s: tamaño de reubicación no coincidente en %s sección %s"
 
-#: elflink.h:1727
+#: elflink.c:2434
+#, c-format
+msgid "warning: type and size of dynamic symbol `%s' are not defined"
+msgstr "aviso: el tipo y tamaño del símbolo dinámico `%s' no están definidos"
+
+#: elflink.h:1022
 #, c-format
 msgid "%s: %s: invalid version %u (max %d)"
 msgstr "%s: %s: versión %u inválida (máximo %d)"
 
-#: elflink.h:1768
+#: elflink.h:1063
 #, c-format
 msgid "%s: %s: invalid needed version %d"
 msgstr "%s: %s: versión requerida %d inválida"
 
-#: elflink.h:1890
+#: elflink.h:1238
 #, c-format
-msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
-msgstr "Aviso: el tamaño del símbolo `%s' cambió de %lu a %lu en %s"
+msgid "Warning: alignment %u of symbol `%s' in %s is smaller than %u in %s"
+msgstr "Aviso: la alineación %u del símbolo `%s' en %s es más pequeña que %u en %s"
 
-#: elflink.h:3174
+#: elflink.h:1252
 #, c-format
-msgid "%s: .preinit_array section is not allowed in DSO"
-msgstr "%s: no se permite la sección .preinit_array en DSO"
+msgid "Warning: size of symbol `%s' changed from %lu in %s to %lu in %s"
+msgstr "Aviso: el tamaño del símbolo `%s' cambió de %lu en %s a %lu en %s"
 
-#: elflink.h:4030
+#: elflink.h:2160
 #, c-format
-msgid "warning: type and size of dynamic symbol `%s' are not defined"
-msgstr "aviso: el tipo y tamaño del símbolo dinámico `%s' no están definidos"
+msgid "%s: undefined version: %s"
+msgstr "%s: versión sin definir: %s"
 
-#: elflink.h:4345
+#: elflink.h:2226
 #, c-format
-msgid "%s: undefined versioned symbol name %s"
-msgstr "%s: nombre de símbolo con versión %s sin definir"
-
-#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
-msgid "Error: out of memory"
-msgstr "Error: memoria agotada"
+msgid "%s: .preinit_array section is not allowed in DSO"
+msgstr "%s: no se permite la sección .preinit_array en DSO"
 
-#: elflink.h:4781
+#: elflink.h:3078
 msgid "Not enough memory to sort relocations"
 msgstr "No hay suficiente memoria para ordenar las reubicaciones"
 
-#: elflink.h:5682 elflink.h:5725
+#: elflink.h:3958 elflink.h:4001
 #, c-format
 msgid "%s: could not find output section %s"
 msgstr "%s: no se puede encontrar la sección de salida %s"
 
-#: elflink.h:5688
+#: elflink.h:3964
 #, c-format
 msgid "warning: %s section has zero size"
 msgstr "aviso: la sección %s es de tamaño cero"
 
-#: elflink.h:6275
+#: elflink.h:4483
+#, c-format
+msgid "%s: %s symbol `%s' in %s is referenced by DSO"
+msgstr "%s: el símbolo %s `%s' en %s está referenciado por DSO"
+
+#: elflink.h:4564
 #, c-format
 msgid "%s: could not find output section %s for input section %s"
 msgstr "%s: no se puede encontrar la sección de salida %s para la sección de entrada %s"
 
-#: elflink.h:6486
+#: elflink.h:4666
 #, c-format
-msgid "%s: relocation size mismatch in %s section %s"
-msgstr "%s: tamaño de reubicación no coincidente en %s sección %s"
-
-#: elflink.h:6849
-msgid "warning: relocation against removed section; zeroing"
-msgstr "aviso: reubicación contra una sección eliminada; cambiando a ceros"
+msgid "%s: %s symbol `%s' isn't defined"
+msgstr "%s: el símbolo %s `%s' no está definido"
 
-#: elflink.h:6879
-msgid "warning: relocation against removed section"
-msgstr "aviso: reubicación contra una sección eliminada"
+#: elflink.h:5053 elflink.h:5095
+msgid "%T: discarded in section `%s' from %s\n"
+msgstr "%T: descartado en la sección `%s' desde %s\n"
 
-#: elflink.h:6892
-#, c-format
-msgid "local symbols in discarded section %s"
-msgstr "símbolos locales en la sección descartada %s"
-
-#: elfxx-mips.c:734
+#: elfxx-mips.c:887
 msgid "static procedure (no name)"
 msgstr "procedimiento estático (sin nombre)"
 
-#: elfxx-mips.c:1601
+#: elfxx-mips.c:1897
 msgid "not enough GOT space for local GOT entries"
 msgstr "no hay suficiente espacio GOT para entradas GOT locales"
 
-#: elfxx-mips.c:2750
+#: elfxx-mips.c:3691
 #, c-format
 msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
 msgstr "%s: %s+0x%lx: salto a una rutina cabo la cual no es jal"
 
-#: elfxx-mips.c:4270
+#: elfxx-mips.c:5192
 #, c-format
 msgid "%s: Malformed reloc detected for section %s"
 msgstr "%s: Se detectó una reubicación malformada para la sección %s"
 
-#: elfxx-mips.c:4348
+#: elfxx-mips.c:5266
 #, c-format
 msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
 msgstr "%s: la reubicación CALL16 en 0x%lx no es contra un símbolo global"
 
-#: elfxx-mips.c:7301
+#: elfxx-mips.c:8692
 #, c-format
 msgid "%s: illegal section name `%s'"
 msgstr "%s: nombre de sección `%s' ilegal"
 
-#: elfxx-mips.c:7615
+#: elfxx-mips.c:9025
+#, c-format
+msgid "%s: endianness incompatible with that of the selected emulation"
+msgstr "%s: la endianez es incompatible con aquella de la emulación seleccionada"
+
+#: elfxx-mips.c:9037
 #, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s: enlazando ficheros PIC con ficheros que no son PIC"
+msgid "%s: ABI is incompatible with that of the selected emulation"
+msgstr "%s: la ABI es incompatible con aquella de la emulación seleccionada"
 
-#: elfxx-mips.c:7625
+#: elfxx-mips.c:9104
 #, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
-msgstr "%s: enlazando ficheros de llamadas abi con ficheros que no son de llamadas abi"
+msgid "%s: warning: linking PIC files with non-PIC files"
+msgstr "%s: aviso: enlazando ficheros PIC con ficheros que no son PIC"
 
-#: elfxx-mips.c:7654
+#: elfxx-mips.c:9121
 #, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%s: no coincide el ISA (-mips%d) con módulos previos (-mips%d)"
+msgid "%s: linking 32-bit code with 64-bit code"
+msgstr "%s: enlazando código de 32-bit con código de 64-bit"
 
-#: elfxx-mips.c:7676
+#: elfxx-mips.c:9149
 #, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%s: no coincide el ISA (%d) con módulos previos (%d)"
+msgid "%s: linking %s module with previous %s modules"
+msgstr "%s: enlazando el módulo %s con módulos %s previos"
 
-#: elfxx-mips.c:7699
+#: elfxx-mips.c:9172
 #, c-format
 msgid "%s: ABI mismatch: linking %s module with previous %s modules"
 msgstr "%s: no coincide el ABI: enlazando el módulo %s con módulos %s previos"
 
-#: elfxx-mips.c:7759
+#: elfxx-mips.c:9241
 msgid " [abi=O32]"
 msgstr " [abi=O32]"
 
-#: elfxx-mips.c:7761
+#: elfxx-mips.c:9243
 msgid " [abi=O64]"
 msgstr " [abi=O64]"
 
-#: elfxx-mips.c:7763
+#: elfxx-mips.c:9245
 msgid " [abi=EABI32]"
 msgstr " [abi=EABI32]"
 
-#: elfxx-mips.c:7765
+#: elfxx-mips.c:9247
 msgid " [abi=EABI64]"
 msgstr " [abi=EABI64]"
 
-#: elfxx-mips.c:7767
+#: elfxx-mips.c:9249
 msgid " [abi unknown]"
 msgstr " [abi desconocido]"
 
-#: elfxx-mips.c:7769
+#: elfxx-mips.c:9251
 msgid " [abi=N32]"
 msgstr " [abi=N32]"
 
-#: elfxx-mips.c:7771
+#: elfxx-mips.c:9253
 msgid " [abi=64]"
 msgstr " [abi=64]"
 
-#: elfxx-mips.c:7773
+#: elfxx-mips.c:9255
 msgid " [no abi set]"
 msgstr " [no hay conjunto abi]"
 
-#: elfxx-mips.c:7776
+#: elfxx-mips.c:9258
 msgid " [mips1]"
 msgstr " [mips1]"
 
-#: elfxx-mips.c:7778
+#: elfxx-mips.c:9260
 msgid " [mips2]"
 msgstr " [mips2]"
 
-#: elfxx-mips.c:7780
+#: elfxx-mips.c:9262
 msgid " [mips3]"
 msgstr " [mips3]"
 
-#: elfxx-mips.c:7782
+#: elfxx-mips.c:9264
 msgid " [mips4]"
 msgstr " [mips4]"
 
-#: elfxx-mips.c:7784
+#: elfxx-mips.c:9266
 msgid " [mips5]"
 msgstr " [mips5]"
 
-#: elfxx-mips.c:7786
+#: elfxx-mips.c:9268
 msgid " [mips32]"
 msgstr " [mips32]"
 
-#: elfxx-mips.c:7788
+#: elfxx-mips.c:9270
 msgid " [mips64]"
 msgstr " [mips64]"
 
-#: elfxx-mips.c:7790
+#: elfxx-mips.c:9272
+msgid " [mips32r2]"
+msgstr " [mips32r2]"
+
+#: elfxx-mips.c:9274
 msgid " [unknown ISA]"
 msgstr " [ISA desconocido]"
 
-#: elfxx-mips.c:7793
+#: elfxx-mips.c:9277
 msgid " [mdmx]"
 msgstr " [mdmx]"
 
-#: elfxx-mips.c:7796
+#: elfxx-mips.c:9280
 msgid " [mips16]"
 msgstr " [mips16]"
 
-#: elfxx-mips.c:7799
+#: elfxx-mips.c:9283
 msgid " [32bitmode]"
 msgstr " [modo 32bit]"
 
-#: elfxx-mips.c:7801
+#: elfxx-mips.c:9285
 msgid " [not 32bitmode]"
 msgstr " [no es modo 32bit]"
 
-#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
+#: i386linux.c:457 m68klinux.c:461 sparclinux.c:458
 #, c-format
 msgid "Output file requires shared library `%s'\n"
 msgstr "El fichero de salida requiere la biblioteca compartida `%s'\n"
 
-#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
+#: i386linux.c:465 m68klinux.c:469 sparclinux.c:466
 #, c-format
 msgid "Output file requires shared library `%s.so.%s'\n"
 msgstr "El fichero de salida requiere la biblioteca compartida `%s.so.%s'\n"
 
-#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
-#: sparclinux.c:657 sparclinux.c:707
+#: i386linux.c:654 i386linux.c:704 m68klinux.c:661 m68klinux.c:709
+#: sparclinux.c:656 sparclinux.c:706
 #, c-format
 msgid "Symbol %s not defined for fixups\n"
 msgstr "El símbolo %s no está definido para composturas\n"
 
-#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
+#: i386linux.c:728 m68klinux.c:733 sparclinux.c:730
 msgid "Warning: fixup count mismatch\n"
 msgstr "Aviso: no coincide la cuenta de composturas\n"
 
-#: ieee.c:235
+#: ieee.c:293
 #, c-format
 msgid "%s: string too long (%d chars, max 65535)"
 msgstr "%s: la cadena es demasiado larga (%d caracteres, máximo 65535)"
 
-#: ieee.c:365
+#: ieee.c:428
 #, c-format
 msgid "%s: unrecognized symbol `%s' flags 0x%x"
 msgstr "%s: símbolo `%s' no reconocido opciones 0x%x"
 
-#: ieee.c:877
+#: ieee.c:938
 #, c-format
 msgid "%s: unimplemented ATI record %u for symbol %u"
 msgstr "%s: grabación ATI %u sin implementar para el símbolo %u"
 
-#: ieee.c:902
+#: ieee.c:963
 #, c-format
 msgid "%s: unexpected ATN type %d in external part"
 msgstr "%s: tipo ATN %d inesperado en la parte externa"
 
-#: ieee.c:924
+#: ieee.c:985
 #, c-format
 msgid "%s: unexpected type after ATN"
 msgstr "%s: tipo inesperado después de ATN"
 
-#: ihex.c:258
+#: ihex.c:264
 #, c-format
 msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
 msgstr "%s:%d: carácter `%s' inesperado en el fichero Hexadecimal de Intel\n"
 
-#: ihex.c:366
+#: ihex.c:372
 #, c-format
 msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
 msgstr "%s:%u: suma de comprobación errónea en el fichero Hexadecimal de Intel (se esperaba %u, se obtuvo %u)"
 
-#: ihex.c:420
+#: ihex.c:426
 #, c-format
 msgid "%s:%u: bad extended address record length in Intel Hex file"
 msgstr "%s:%u: longitud de registro de dirección extendida errónea en el fichero Hexadecimal de Intel"
 
-#: ihex.c:437
+#: ihex.c:443
 #, c-format
 msgid "%s:%u: bad extended start address length in Intel Hex file"
 msgstr "%s:%u: longitud de dirección de inicio extendida errónea en el fichero Hexadecimal de Intel"
 
-#: ihex.c:454
+#: ihex.c:460
 #, c-format
 msgid "%s:%u: bad extended linear address record length in Intel Hex file"
 msgstr "%s:%u: longitud de registro de dirección lineal extendida errónea en el fichero Hexadecimal de Intel"
 
-#: ihex.c:471
+#: ihex.c:477
 #, c-format
 msgid "%s:%u: bad extended linear start address length in Intel Hex file"
 msgstr "%s:%u: longitud de dirección de inicio lineal extendida errónea en el fichero Hexadecimal de Intel"
 
-#: ihex.c:488
+#: ihex.c:494
 #, c-format
 msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
 msgstr "%s:%u: tipo ihex %u no reconocido en el fichero Hexadecimal de Intel\n"
 
-#: ihex.c:607
+#: ihex.c:619
 #, c-format
 msgid "%s: internal error in ihex_read_section"
 msgstr "%s: error interno en ihex_read_section"
 
-#: ihex.c:642
+#: ihex.c:654
 #, c-format
 msgid "%s: bad section length in ihex_read_section"
 msgstr "%s: longitud de sección errónea en ihex_read_section"
 
-#: ihex.c:860
+#: ihex.c:872
 #, c-format
 msgid "%s: address 0x%s out of range for Intel Hex file"
 msgstr "%s: la dirección 0x%s está fuera de rango en el fichero Hexadecimal de Intel"
 
-#: libbfd.c:492
-#, c-format
-msgid "not mapping: data=%lx mapped=%d\n"
-msgstr "no se mapea: datos=%lx mapeados%d\n"
-
-#: libbfd.c:495
-msgid "not mapping: env var not set\n"
-msgstr "no se mapea: no se estableció la variable de ambiente\n"
-
-#: libbfd.c:1466
+#: libbfd.c:861
 #, c-format
 msgid "Deprecated %s called at %s line %d in %s\n"
 msgstr "Se llamó a %s que está deprecado en %s línea %d en %s\n"
 
-#: libbfd.c:1469
+#: libbfd.c:864
 #, c-format
 msgid "Deprecated %s called\n"
 msgstr "Se llamó a %s que está deprecado\n"
 
-#: linker.c:1873
+#: linker.c:1829
 #, c-format
 msgid "%s: indirect symbol `%s' to `%s' is a loop"
 msgstr "%s: el símbolo indirecto `%s' para `%s' es un ciclo"
 
-#: linker.c:2776
+#: linker.c:2697
 #, c-format
-msgid "Attempt to do relocateable link with %s input and %s output"
+msgid "Attempt to do relocatable link with %s input and %s output"
 msgstr "Se intentó hacer un enlace reubicable con entrada %s y salida %s"
 
-#: merge.c:892
+#: merge.c:896
 #, c-format
 msgid "%s: access beyond end of merged section (%ld + %ld)"
 msgstr "%s: acceso más allá del final de la sección mezclada (%ld + %ld)"
 
-#: mmo.c:460
+#: mmo.c:503
 #, c-format
 msgid "%s: No core to allocate section name %s\n"
 msgstr "%s: No hay core para asignar el nombre de sección %s\n"
 
-#: mmo.c:536
+#: mmo.c:579
 #, c-format
 msgid "%s: No core to allocate a symbol %d bytes long\n"
 msgstr "%s: No hay core para asignar un símbolo de %d bytes de longitud\n"
 
-#: mmo.c:1245
+#: mmo.c:1287
 #, c-format
 msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
 msgstr "%s: fichero mmo inválido: el valor de iniciación para $255 no es `Main'\n"
 
-#: mmo.c:1391
+#: mmo.c:1433
 #, c-format
 msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
 msgstr "%s: secuencia de caracteres anchos 0x%02X 0x%02X sin soporte después del nombre de símbolo que inicia con `%s'\n"
 
-#: mmo.c:1633
+#: mmo.c:1674
 #, c-format
 msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
 msgstr "%s: fichero mmo inválido: código de operación-l `%d' sin soporte\n"
 
-#: mmo.c:1643
+#: mmo.c:1684
 #, c-format
 msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
 msgstr "%s: fichero mmo inválido: se esperaba YZ = 1 se obtuvo YZ = %d para lop_quote\n"
 
-#: mmo.c:1679
+#: mmo.c:1720
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
 msgstr "%s: fichero mmo inválido: se esperaba z = 1 ó z = 2, se obtuvo z = %d para lop_loc\n"
 
-#: mmo.c:1725
+#: mmo.c:1766
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
 msgstr "%s: fichero mmo inválido: se esperaba z = 1 ó z = 2, se obtuvo z = %d para lop_fixo\n"
 
-#: mmo.c:1764
+#: mmo.c:1805
 #, c-format
 msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
 msgstr "%s: fichero mmo inválido: se esperaba y = 0, se obtuvo y = %d para lop_fixrx\n"
 
-#: mmo.c:1773
+#: mmo.c:1814
 #, c-format
 msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
 msgstr "%s: fichero mmo inválido: se esperaba z = 16 ó z = 24, se obtuvo z = %d para lop_fixrx\n"
 
-#: mmo.c:1796
+#: mmo.c:1837
 #, c-format
 msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
 msgstr "%s: fichero mmo inválido: el byte inicial de la palabra operando debe ser 0 ó 1, se obtuvo %d para lop_fixrx\n"
 
-#: mmo.c:1819
+#: mmo.c:1860
 #, c-format
 msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
 msgstr "%s: no se puede asignar el nombre de fichero para el número de fichero %d, %d bytes\n"
 
-#: mmo.c:1839
+#: mmo.c:1880
 #, c-format
 msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
 msgstr "%s: fichero mmo inválido: el número de fichero %d `%s' ya se había introducido como `%s'\n"
 
-#: mmo.c:1852
+#: mmo.c:1893
 #, c-format
 msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
 msgstr "%s: fichero mmo inválido: no se especificó un nombre de fichero para el número %d antes de utilizarse\n"
 
-#: mmo.c:1958
+#: mmo.c:1999
 #, c-format
 msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
 msgstr "%s: fichero mmo inválido: los campos y y z de lop_stab no son cero, y: %d, z: %d\n"
 
-#: mmo.c:1994
+#: mmo.c:2035
 #, c-format
 msgid "%s: invalid mmo file: lop_end not last item in file\n"
 msgstr "%s: fichero mmo inválido: lop_end no es el último elemento en el fichero\n"
 
-#: mmo.c:2007
+#: mmo.c:2048
 #, c-format
 msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
 msgstr "%s: fichero mmo inválido: YZ de lop_end (%ld) no es igual al número de tetras del lop_stab precedente (%ld)\n"
 
-#: mmo.c:2670
+#: mmo.c:2698
 #, c-format
 msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
 msgstr "%s: tabla de símbolos inválida: símbolo `%s' duplicado\n"
 
-#: mmo.c:2921
+#: mmo.c:2949
 #, c-format
 msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
 msgstr "%s: Definición de símbolo errónea: `Main' se estableción como %s en lugar de la dirección de inicio %s\n"
 
-#: mmo.c:3011
+#: mmo.c:3039
 #, c-format
 msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
 msgstr "%s: aviso: la tabla de símbolos es demasiado grande para mmo, es más grande que 65535 words de 32-bit: %d. Sólo se emitirá `Main'.\n"
 
-#: mmo.c:3056
+#: mmo.c:3084
 #, c-format
 msgid "%s: internal error, symbol table changed size from %d to %d words\n"
 msgstr "%s: error interno, la tabla de símbolos cambió de tamaño de %d a %d words\n"
 
-#: mmo.c:3111
+#: mmo.c:3139
 #, c-format
 msgid "%s: internal error, internal register section %s had contents\n"
 msgstr "%s: error interno, la sección interna de registros %s tiene contenido\n"
 
-#: mmo.c:3163
+#: mmo.c:3191
 #, c-format
 msgid "%s: no initialized registers; section length 0\n"
 msgstr "%s: no hay registros iniciados; longitud de sección 0\n"
 
-#: mmo.c:3169
+#: mmo.c:3197
 #, c-format
 msgid "%s: too many initialized registers; section length %ld\n"
 msgstr "%s: demasiados registros iniciados: longitud de sección %ld\n"
 
-#: mmo.c:3174
+#: mmo.c:3202
 #, c-format
 msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
 msgstr "%s: dirección de inicio inválida para los registros iniciados de longitud %ld: 0x%lx%08lx\n"
 
-#: oasys.c:1029
+#: oasys.c:1052
 #, c-format
 msgid "%s: can not represent section `%s' in oasys"
 msgstr "%s: no se puede representar la sección `%s' en oasys"
 
-#: osf-core.c:132
+#: osf-core.c:137
 #, c-format
 msgid "Unhandled OSF/1 core file section type %d\n"
 msgstr "Tipo de sección de fichero núcleo OSF/1 %d sin manejar\n"
 
-#: pe-mips.c:658
+#: pe-mips.c:659
 #, c-format
 msgid "%s: `ld -r' not supported with PE MIPS objects\n"
 msgstr "%s: `ld -r' no tiene soporte con objetos PE MIPS\n"
@@ -1988,53 +2226,53 @@ msgstr "%s: `ld -r' no tiene soporte con objetos PE MIPS\n"
 #. mem = pointer to memory we're fixing up
 #. val = VMA of what we need to refer to
 #.
-#: pe-mips.c:794
+#: pe-mips.c:795
 #, c-format
 msgid "%s: unimplemented %s\n"
 msgstr "%s: %s sin implementar\n"
 
-#: pe-mips.c:820
+#: pe-mips.c:821
 #, c-format
 msgid "%s: jump too far away\n"
 msgstr "%s: salto demasiado lejos\n"
 
-#: pe-mips.c:847
+#: pe-mips.c:848
 #, c-format
 msgid "%s: bad pair/reflo after refhi\n"
 msgstr "%s: pair/reflo erróneo después de refhi\n"
 
 #. XXX code yet to be written.
-#: peicode.h:785
+#: peicode.h:787
 #, c-format
 msgid "%s: Unhandled import type; %x"
 msgstr "%s: Tipo de importación sin manejar; %x"
 
-#: peicode.h:790
+#: peicode.h:792
 #, c-format
 msgid "%s: Unrecognised import type; %x"
 msgstr "%s: Tipo de importación no reconocida; %x"
 
-#: peicode.h:804
+#: peicode.h:806
 #, c-format
 msgid "%s: Unrecognised import name type; %x"
 msgstr "%s: Tipo de nombre de importación no reconocida; %x"
 
-#: peicode.h:1162
+#: peicode.h:1164
 #, c-format
 msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
 msgstr "%s: Tipo de máquina (0x%x) no reconocida en el archivo de Formato de Importación de Bibliotecas"
 
-#: peicode.h:1174
+#: peicode.h:1176
 #, c-format
 msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
 msgstr "%s: Tipo de máquina (0x%x) reconocida pero sin manejar en el archivo de Formato de Importación de Bibliotecas"
 
-#: peicode.h:1191
+#: peicode.h:1193
 #, c-format
 msgid "%s: size field is zero in Import Library Format header"
 msgstr "%s: el tamaño del campo es cero en el encabezado del Formato de Importación de Bibliotecas"
 
-#: peicode.h:1219
+#: peicode.h:1224
 #, c-format
 msgid "%s: string not null terminated in ILF object file."
 msgstr "%s: la cadena no termina en null en el fichero objeto ILF."
@@ -2091,11 +2329,11 @@ msgstr "Partici
 msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
 msgstr "Partición[%d] longitud = 0x%.8lx (%ld)\n"
 
-#: som.c:5398
+#: som.c:5422
 msgid "som_sizeof_headers unimplemented"
 msgstr "som_sizeof_headers sin implementar"
 
-#: srec.c:301
+#: srec.c:302
 #, c-format
 msgid "%s:%d: Unexpected character `%s' in S-record file\n"
 msgstr "%s:%d: Caractér `%s' inesperado en el fichero S-record\n"
@@ -2105,7 +2343,7 @@ msgstr "%s:%d: Caract
 msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
 msgstr "%s(%s+0x%lx): La entrada de cabos tiene una cadena índice inválida."
 
-#: syms.c:1044
+#: syms.c:1019
 msgid "Unsupported .stab relocation"
 msgstr "Reubicación .stab sin soporte"
 
@@ -2124,33 +2362,33 @@ msgstr "bfd_set_section_flags (%s, %x) fall
 msgid "Size mismatch section %s=%lx, %s=%lx"
 msgstr "No coincide el tamaño de la sección %s=%lx, %s=%lx"
 
-#: vms-gsd.c:702
+#: vms-gsd.c:704
 #, c-format
 msgid "unknown gsd/egsd subtype %d"
 msgstr "subtipo de gsd/egsd %d desconocido"
 
-#: vms-hdr.c:406
+#: vms-hdr.c:408
 msgid "Object module NOT error-free !\n"
 msgstr "¡ El módulo objeto NO está libre de errores !\n"
 
-#: vms-misc.c:543
+#: vms-misc.c:541
 #, c-format
 msgid "Stack overflow (%d) in _bfd_vms_push"
 msgstr "Desbordamiento de la pila (%d) en _bfd_vms_push"
 
-#: vms-misc.c:561
+#: vms-misc.c:559
 msgid "Stack underflow in _bfd_vms_pop"
 msgstr "Desbordamiento por debajo de la pila en _bfd_vms_pop"
 
-#: vms-misc.c:919
+#: vms-misc.c:918
 msgid "_bfd_vms_output_counted called with zero bytes"
 msgstr "se llamó _bfd_vms_output_counted con cero bytes"
 
-#: vms-misc.c:924
+#: vms-misc.c:923
 msgid "_bfd_vms_output_counted called with too many bytes"
 msgstr "se llamó _bfd_vms_output_counted con demasiados bytes"
 
-#: vms-misc.c:1055
+#: vms-misc.c:1054
 #, c-format
 msgid "Symbol %s replaced by %s\n"
 msgstr "El símbolo %s fue reemplazado por %s\n"
@@ -2160,26 +2398,26 @@ msgstr "El s
 msgid "failed to enter %s"
 msgstr "falló la introducción de %s"
 
-#: vms-tir.c:81
+#: vms-tir.c:102
 msgid "No Mem !"
 msgstr "¡ No hay Memoria !"
 
-#: vms-tir.c:362
+#: vms-tir.c:383
 #, c-format
 msgid "bad section index in %s"
 msgstr "Índice de sección erróneo en %s"
 
-#: vms-tir.c:375
+#: vms-tir.c:396
 #, c-format
 msgid "unsupported STA cmd %s"
 msgstr "orden STA %s sin soporte"
 
-#: vms-tir.c:380 vms-tir.c:1240
+#: vms-tir.c:401 vms-tir.c:1261
 #, c-format
 msgid "reserved STA cmd %d"
 msgstr "orden STA %d reservada"
 
-#: vms-tir.c:491 vms-tir.c:514
+#: vms-tir.c:512 vms-tir.c:535
 #, c-format
 msgid "%s: no symbol \"%s\""
 msgstr "%s: no existe el símbolo \"%s\""
@@ -2188,39 +2426,39 @@ msgstr "%s: no existe el s
 #. rotate
 #. Redefine symbol to current location.
 #. Define a literal.
-#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
-#: vms-tir.c:838 vms-tir.c:1563
+#: vms-tir.c:602 vms-tir.c:714 vms-tir.c:824 vms-tir.c:842 vms-tir.c:850
+#: vms-tir.c:859 vms-tir.c:1584
 #, c-format
 msgid "%s: not supported"
 msgstr "%s: no tiene soporte"
 
-#: vms-tir.c:586 vms-tir.c:1418
+#: vms-tir.c:607 vms-tir.c:1439
 #, c-format
 msgid "%s: not implemented"
 msgstr "%s: sin implementar"
 
-#: vms-tir.c:590 vms-tir.c:1422
+#: vms-tir.c:611 vms-tir.c:1443
 #, c-format
 msgid "reserved STO cmd %d"
 msgstr "orden STO %d reservada"
 
-#: vms-tir.c:708 vms-tir.c:1568
+#: vms-tir.c:729 vms-tir.c:1589
 #, c-format
 msgid "reserved OPR cmd %d"
 msgstr "orden OPR %d reservada"
 
-#: vms-tir.c:776 vms-tir.c:1632
+#: vms-tir.c:797 vms-tir.c:1653
 #, c-format
 msgid "reserved CTL cmd %d"
 msgstr "orden CTL %d reservada"
 
 #. stack byte from image
 #. arg: none.
-#: vms-tir.c:1148
+#: vms-tir.c:1169
 msgid "stack-from-image not implemented"
 msgstr "pila-desde-imagen sin implementar"
 
-#: vms-tir.c:1166
+#: vms-tir.c:1187
 msgid "stack-entry-mask not fully implemented"
 msgstr "pila-máscara-entrada no está completamente implementado"
 
@@ -2231,261 +2469,271 @@ msgstr "pila-m
 #.
 #. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
 #. and stack TRUE (args match) or FALSE (args dont match) value.
-#: vms-tir.c:1180
+#: vms-tir.c:1201
 msgid "PASSMECH not fully implemented"
 msgstr "PASSMECH no está completamente implementado"
 
-#: vms-tir.c:1199
+#: vms-tir.c:1220
 msgid "stack-local-symbol not fully implemented"
 msgstr "pila-símbolo-local no está completamente implementado"
 
-#: vms-tir.c:1212
+#: vms-tir.c:1233
 msgid "stack-literal not fully implemented"
 msgstr "pila-literal no está completamente implementado"
 
-#: vms-tir.c:1233
+#: vms-tir.c:1254
 msgid "stack-local-symbol-entry-point-mask not fully implemented"
 msgstr "pila-símbolo-local-máscara-punto-entrada no está completamente implementado"
 
-#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
-#: vms-tir.c:1619 vms-tir.c:1627
+#: vms-tir.c:1531 vms-tir.c:1543 vms-tir.c:1555 vms-tir.c:1567 vms-tir.c:1632
+#: vms-tir.c:1640 vms-tir.c:1648
 #, c-format
 msgid "%s: not fully implemented"
 msgstr "%s: no está completamente implementado"
 
-#: vms-tir.c:1684
+#: vms-tir.c:1705
 #, c-format
 msgid "obj code %d not found"
 msgstr "no se encontró el código objeto %d"
 
-#: vms-tir.c:2019
+#: vms-tir.c:2043
 #, c-format
 msgid "SEC_RELOC with no relocs in section %s"
 msgstr "SEC_RELOC sin reubicaciones en la sección %s"
 
-#: vms-tir.c:2307
+#: vms-tir.c:2331
 #, c-format
 msgid "Unhandled relocation %s"
 msgstr "Reubicación %s sin manejar"
 
-#: xcofflink.c:1243
+#: xcofflink.c:1244
 #, c-format
 msgid "%s: `%s' has line numbers but no enclosing section"
 msgstr "%s: `%s' tiene números de línea pero no una sección contenedora"
 
-#: xcofflink.c:1296
+#: xcofflink.c:1297
 #, c-format
 msgid "%s: class %d symbol `%s' has no aux entries"
 msgstr "%s: clase %d símbolo `%s' no tiene entradas auxiliares"
 
-#: xcofflink.c:1319
+#: xcofflink.c:1320
 #, c-format
 msgid "%s: symbol `%s' has unrecognized csect type %d"
 msgstr "%s: el símbolo `%s' tiene un tipo csect %d no reconocido"
 
-#: xcofflink.c:1331
+#: xcofflink.c:1332
 #, c-format
 msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
 msgstr "%s: símbolo XTY_ER `%s' erróneo: clase %d scnum %d scnlen %d"
 
-#: xcofflink.c:1367
+#: xcofflink.c:1368
 #, c-format
 msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
 msgstr "%s: símbolo XMC_TCO `%s' es clase %d scnlen %d"
 
-#: xcofflink.c:1519
+#: xcofflink.c:1520
 #, c-format
 msgid "%s: csect `%s' not in enclosing section"
 msgstr "%s: csect `%s' no está contenido en una sección"
 
-#: xcofflink.c:1626
+#: xcofflink.c:1627
 #, c-format
 msgid "%s: misplaced XTY_LD `%s'"
 msgstr "%s: XTY_LD `%s' mal ubicado"
 
-#: xcofflink.c:1957
+#: xcofflink.c:1958
 #, c-format
 msgid "%s: reloc %s:%d not in csect"
 msgstr "%s: la reubicación %s:%d no está en csect"
 
-#: xcofflink.c:2092
+#: xcofflink.c:2095
 #, c-format
 msgid "%s: XCOFF shared object when not producing XCOFF output"
 msgstr "%s: objeto compartido XCOFF cuando no se produce salida XCOFF"
 
-#: xcofflink.c:2113
+#: xcofflink.c:2116
 #, c-format
 msgid "%s: dynamic object with no .loader section"
 msgstr "%s: objeto dinámico sin sección .loader"
 
-#: xcofflink.c:2758
+#: xcofflink.c:2761
 #, c-format
 msgid "%s: no such symbol"
 msgstr "%s: no hay tal símbolo"
 
-#: xcofflink.c:2891
+#: xcofflink.c:2894
 msgid "error: undefined symbol __rtinit"
 msgstr "error: símbolo __rtinit indefinido"
 
-#: xcofflink.c:3453
+#: xcofflink.c:3455
 #, c-format
 msgid "warning: attempt to export undefined symbol `%s'"
 msgstr "aviso: intento de exportar el símbolo sin definir `%s'"
 
-#: xcofflink.c:4447
+#: xcofflink.c:4448
 #, c-format
 msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
 msgstr "Desbordamiento de TOC: 0x%lx > 0x10000; pruebe -mminimal-toc al compilar"
 
-#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
+#: xcofflink.c:5288 xcofflink.c:5755 xcofflink.c:5817 xcofflink.c:6119
 #, c-format
 msgid "%s: loader reloc in unrecognized section `%s'"
 msgstr "%s: reubicación del cargador en la sección `%s' no reconocida"
 
-#: xcofflink.c:5309 xcofflink.c:6130
+#: xcofflink.c:5310 xcofflink.c:6130
 #, c-format
 msgid "%s: `%s' in loader reloc but not loader sym"
 msgstr "%s: `%s' en la reubicación del cargador pero no es un símbolo del cargador"
 
-#: xcofflink.c:5324
+#: xcofflink.c:5325
 #, c-format
 msgid "%s: loader reloc in read-only section %s"
 msgstr "%s: reubicación del cargador en la sección de sólo lectura %s"
 
-#: elf32-ia64.c:2222 elf64-ia64.c:2222
+#: elf32-ia64.c:2392 elf64-ia64.c:2392
 msgid "@pltoff reloc against local symbol"
 msgstr "reubicación @pltoff contra un símbolo local"
 
-#: elf32-ia64.c:3562 elf64-ia64.c:3562
+#: elf32-ia64.c:3804 elf64-ia64.c:3804
 #, c-format
 msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
 msgstr "%s: segmento de datos short desbordado (0x%lx >= 0x400000)"
 
-#: elf32-ia64.c:3573 elf64-ia64.c:3573
+#: elf32-ia64.c:3815 elf64-ia64.c:3815
 #, c-format
 msgid "%s: __gp does not cover short data segment"
 msgstr "%s: __gp no cubre el segmento de datos short"
 
-#: elf32-ia64.c:3858 elf64-ia64.c:3858
+#: elf32-ia64.c:4131 elf64-ia64.c:4131
 #, c-format
 msgid "%s: linking non-pic code in a shared library"
 msgstr "%s: enlazando código que no es pic en una biblioteca compartida"
 
-#: elf32-ia64.c:3891 elf64-ia64.c:3891
+#: elf32-ia64.c:4164 elf64-ia64.c:4164
 #, c-format
 msgid "%s: @gprel relocation against dynamic symbol %s"
 msgstr "%s: reubicación @gprel contra el símbolo dinámico %s"
 
-#: elf32-ia64.c:4030 elf64-ia64.c:4030
+#: elf32-ia64.c:4224 elf64-ia64.c:4224
+#, c-format
+msgid "%s: linking non-pic code in a position independent executable"
+msgstr "%s: enlazando código que no es pic en un ejecutable independiente de posición"
+
+#: elf32-ia64.c:4363 elf64-ia64.c:4363
 #, c-format
-msgid "%s: dynamic relocation against speculation fixup"
-msgstr "%s: reubicación dinámica contra una compostura de especulación"
+msgid "%s: @internal branch to dynamic symbol %s"
+msgstr "%s: ramificación @internal al símbolo dinámico %s"
 
-#: elf32-ia64.c:4038 elf64-ia64.c:4038
+#: elf32-ia64.c:4365 elf64-ia64.c:4365
 #, c-format
-msgid "%s: speculation fixup against undefined weak symbol"
-msgstr "%s: compostura de especulación contra un símbolo débil indefinido"
+msgid "%s: speculation fixup to dynamic symbol %s"
+msgstr "%s: compostura de especulación al símbolo dinámico %s"
 
-#: elf32-ia64.c:4271 elf64-ia64.c:4271
+#: elf32-ia64.c:4367 elf64-ia64.c:4367
+#, c-format
+msgid "%s: @pcrel relocation against dynamic symbol %s"
+msgstr "%s: reubicación @pcrel contra el símbolo dinámico %s"
+
+#: elf32-ia64.c:4579 elf64-ia64.c:4579
 msgid "unsupported reloc"
 msgstr "reubicación sin soporte"
 
-#: elf32-ia64.c:4551 elf64-ia64.c:4551
+#: elf32-ia64.c:4858 elf64-ia64.c:4858
 #, c-format
 msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
 msgstr "%s: enlazando deferencias-captura-en-NULL con ficheros que no son de captura"
 
-#: elf32-ia64.c:4560 elf64-ia64.c:4560
+#: elf32-ia64.c:4867 elf64-ia64.c:4867
 #, c-format
 msgid "%s: linking big-endian files with little-endian files"
 msgstr "%s: enlazando ficheros big endian con ficheros little endian"
 
-#: elf32-ia64.c:4569 elf64-ia64.c:4569
+#: elf32-ia64.c:4876 elf64-ia64.c:4876
 #, c-format
 msgid "%s: linking 64-bit files with 32-bit files"
 msgstr "%s: enlazando ficheros de 64-bit con ficheros de 32-bit"
 
-#: elf32-ia64.c:4578 elf64-ia64.c:4578
+#: elf32-ia64.c:4885 elf64-ia64.c:4885
 #, c-format
 msgid "%s: linking constant-gp files with non-constant-gp files"
 msgstr "%s: enlazando ficheros de gp constante con ficheros con gp no constante"
 
-#: elf32-ia64.c:4588 elf64-ia64.c:4588
+#: elf32-ia64.c:4895 elf64-ia64.c:4895
 #, c-format
 msgid "%s: linking auto-pic files with non-auto-pic files"
 msgstr "%s: enlazando ficheros de pic automático con ficheros sin pic automático"
 
-#: peigen.c:962 pepigen.c:962
+#: peigen.c:985 pepigen.c:985
 #, c-format
 msgid "%s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: desbordamiento de número de línea: 0x%lx > 0xffff"
 
-#: peigen.c:979 pepigen.c:979
+#: peigen.c:1002 pepigen.c:1002
 #, c-format
 msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
 msgstr "%s: desbordamiento de reubicación 1: 0x%lx > 0xffff"
 
-#: peigen.c:993 pepigen.c:993
+#: peigen.c:1016 pepigen.c:1016
 msgid "Export Directory [.edata (or where ever we found it)]"
 msgstr "Directorio de Exportación [.edata (o donde quiera que se encuentre)]"
 
-#: peigen.c:994 pepigen.c:994
+#: peigen.c:1017 pepigen.c:1017
 msgid "Import Directory [parts of .idata]"
 msgstr "Directorio de Importación [partes de .idata]"
 
-#: peigen.c:995 pepigen.c:995
+#: peigen.c:1018 pepigen.c:1018
 msgid "Resource Directory [.rsrc]"
 msgstr "Directorio de Recursos [.rsrc]"
 
-#: peigen.c:996 pepigen.c:996
+#: peigen.c:1019 pepigen.c:1019
 msgid "Exception Directory [.pdata]"
 msgstr "Directorio de Excepciones [.pdata]"
 
-#: peigen.c:997 pepigen.c:997
+#: peigen.c:1020 pepigen.c:1020
 msgid "Security Directory"
 msgstr "Directorio de Seguridad"
 
-#: peigen.c:998 pepigen.c:998
+#: peigen.c:1021 pepigen.c:1021
 msgid "Base Relocation Directory [.reloc]"
 msgstr "Directorio de Reubicación Base [.reloc]"
 
-#: peigen.c:999 pepigen.c:999
+#: peigen.c:1022 pepigen.c:1022
 msgid "Debug Directory"
 msgstr "Directorio de Depuración"
 
-#: peigen.c:1000 pepigen.c:1000
+#: peigen.c:1023 pepigen.c:1023
 msgid "Description Directory"
 msgstr "Directorio de Descripciones"
 
-#: peigen.c:1001 pepigen.c:1001
+#: peigen.c:1024 pepigen.c:1024
 msgid "Special Directory"
 msgstr "Directorio Especial"
 
-#: peigen.c:1002 pepigen.c:1002
+#: peigen.c:1025 pepigen.c:1025
 msgid "Thread Storage Directory [.tls]"
 msgstr "Directorio de Almacenamiento de Hilos [.tls]"
 
-#: peigen.c:1003 pepigen.c:1003
+#: peigen.c:1026 pepigen.c:1026
 msgid "Load Configuration Directory"
 msgstr "Directorio de Carga de Configuraciones"
 
-#: peigen.c:1004 pepigen.c:1004
+#: peigen.c:1027 pepigen.c:1027
 msgid "Bound Import Directory"
 msgstr "Directorio de Importación de Relaciones"
 
-#: peigen.c:1005 pepigen.c:1005
+#: peigen.c:1028 pepigen.c:1028
 msgid "Import Address Table Directory"
 msgstr "Directorio de Importación de Tablas de Direcciones"
 
-#: peigen.c:1006 pepigen.c:1006
+#: peigen.c:1029 pepigen.c:1029
 msgid "Delay Import Directory"
 msgstr "Directorio de Retardo de Importación"
 
-#: peigen.c:1007 peigen.c:1008 pepigen.c:1007 pepigen.c:1008
+#: peigen.c:1030 peigen.c:1031 pepigen.c:1030 pepigen.c:1031
 msgid "Reserved"
 msgstr "Reservado"
 
-#: peigen.c:1071 pepigen.c:1071
+#: peigen.c:1094 pepigen.c:1094
 msgid ""
 "\n"
 "There is an import table, but the section containing it could not be found\n"
@@ -2493,7 +2741,7 @@ msgstr ""
 "\n"
 "Hay una tabla de importación, pero la sección que la contiene no se puede encontrar\n"
 
-#: peigen.c:1076 pepigen.c:1076
+#: peigen.c:1099 pepigen.c:1099
 #, c-format
 msgid ""
 "\n"
@@ -2502,7 +2750,7 @@ msgstr ""
 "\n"
 "Hay una tabla de importación en %s en 0x%lx\n"
 
-#: peigen.c:1113 pepigen.c:1113
+#: peigen.c:1136 pepigen.c:1136
 #, c-format
 msgid ""
 "\n"
@@ -2511,12 +2759,12 @@ msgstr ""
 "\n"
 "Se localizó el descriptor de función en la dirección de inicio: %04lx\n"
 
-#: peigen.c:1116 pepigen.c:1116
+#: peigen.c:1139 pepigen.c:1139
 #, c-format
 msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
 msgstr "\tcódigo-base %08lx tabla-de-contenidos (cargable/actual) %08lx/%08lx\n"
 
-#: peigen.c:1122 pepigen.c:1122
+#: peigen.c:1145 pepigen.c:1145
 msgid ""
 "\n"
 "No reldata section! Function descriptor not decoded.\n"
@@ -2524,7 +2772,7 @@ msgstr ""
 "\n"
 "¡No está la sección reldata! No se decodificó el descriptor de función.\n"
 
-#: peigen.c:1127 pepigen.c:1127
+#: peigen.c:1150 pepigen.c:1150
 #, c-format
 msgid ""
 "\n"
@@ -2533,7 +2781,7 @@ msgstr ""
 "\n"
 "Las Tablas de Importación (se interpretaron los contenidos de la sección %s)\n"
 
-#: peigen.c:1130 pepigen.c:1130
+#: peigen.c:1153 pepigen.c:1153
 msgid ""
 " vma:            Hint    Time      Forward  DLL       First\n"
 "                 Table   Stamp     Chain    Name      Thunk\n"
@@ -2541,7 +2789,7 @@ msgstr ""
 " vma:            Pista   Fecha     Adelante DLL       Primero\n"
 "                 Tabla   Estampa   Cadena   Nombre    Thunk\n"
 
-#: peigen.c:1181 pepigen.c:1181
+#: peigen.c:1204 pepigen.c:1204
 #, c-format
 msgid ""
 "\n"
@@ -2550,11 +2798,11 @@ msgstr ""
 "\n"
 "\tNombre de la DLL: %s\n"
 
-#: peigen.c:1192 pepigen.c:1192
+#: peigen.c:1215 pepigen.c:1215
 msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
 msgstr "\tvma:  Pista/Ord Nombre-Miembro Unido-A\n"
 
-#: peigen.c:1217 pepigen.c:1217
+#: peigen.c:1240 pepigen.c:1240
 msgid ""
 "\n"
 "There is a first thunk, but the section containing it could not be found\n"
@@ -2562,7 +2810,7 @@ msgstr ""
 "\n"
 "Hay un thunk inicial, pero la sección que lo contiene no se puede encontrar\n"
 
-#: peigen.c:1357 pepigen.c:1357
+#: peigen.c:1380 pepigen.c:1380
 msgid ""
 "\n"
 "There is an export table, but the section containing it could not be found\n"
@@ -2570,7 +2818,7 @@ msgstr ""
 "\n"
 "Hay una tabla de exportación, pero la sección que la contiene no se puede encontrar\n"
 
-#: peigen.c:1362 pepigen.c:1362
+#: peigen.c:1385 pepigen.c:1385
 #, c-format
 msgid ""
 "\n"
@@ -2579,7 +2827,7 @@ msgstr ""
 "\n"
 "Hay una tabla de exportación en %s en 0x%lx\n"
 
-#: peigen.c:1393 pepigen.c:1393
+#: peigen.c:1416 pepigen.c:1416
 #, c-format
 msgid ""
 "\n"
@@ -2590,62 +2838,62 @@ msgstr ""
 "Las Tablas de Exportación (se interpretaron los contenidos de la sección %s)\n"
 "\n"
 
-#: peigen.c:1397 pepigen.c:1397
+#: peigen.c:1420 pepigen.c:1420
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
 msgstr "Opciones de Exportación \t\t\t%lx\n"
 
-#: peigen.c:1400 pepigen.c:1400
+#: peigen.c:1423 pepigen.c:1423
 #, c-format
 msgid "Time/Date stamp \t\t%lx\n"
 msgstr "marca de Hora/Fecha \t\t%lx\n"
 
-#: peigen.c:1403 pepigen.c:1403
+#: peigen.c:1426 pepigen.c:1426
 #, c-format
 msgid "Major/Minor \t\t\t%d/%d\n"
 msgstr "Mayor/Menor \t\t\t%d/%d\n"
 
-#: peigen.c:1406 pepigen.c:1406
+#: peigen.c:1429 pepigen.c:1429
 msgid "Name \t\t\t\t"
 msgstr "Nombre \t\t\t\t"
 
-#: peigen.c:1412 pepigen.c:1412
+#: peigen.c:1435 pepigen.c:1435
 #, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
 msgstr "Base Ordinal \t\t\t%ld\n"
 
-#: peigen.c:1415 pepigen.c:1415
+#: peigen.c:1438 pepigen.c:1438
 msgid "Number in:\n"
 msgstr "Número en:\n"
 
-#: peigen.c:1418 pepigen.c:1418
+#: peigen.c:1441 pepigen.c:1441
 #, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
 msgstr "\tTabla de Exportación de Direcciones \t\t%08lx\n"
 
-#: peigen.c:1422 pepigen.c:1422
+#: peigen.c:1445 pepigen.c:1445
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
 msgstr "\tTabla [Nombre Apuntador/Ordinal]\t%08lx\n"
 
-#: peigen.c:1425 pepigen.c:1425
+#: peigen.c:1448 pepigen.c:1448
 msgid "Table Addresses\n"
 msgstr "Direcciones de la Tabla\n"
 
-#: peigen.c:1428 pepigen.c:1428
+#: peigen.c:1451 pepigen.c:1451
 msgid "\tExport Address Table \t\t"
 msgstr "\tTabla de Exportación de Direcciones \t\t"
 
-#: peigen.c:1433 pepigen.c:1433
+#: peigen.c:1456 pepigen.c:1456
 msgid "\tName Pointer Table \t\t"
 msgstr "\tNombre de la Tabla de Apuntadores \t\t"
 
 # continuar aqui
-#: peigen.c:1438 pepigen.c:1438
+#: peigen.c:1461 pepigen.c:1461
 msgid "\tOrdinal Table \t\t\t"
 msgstr "\tTabla Ordinal \t\t\t"
 
-#: peigen.c:1453 pepigen.c:1453
+#: peigen.c:1476 pepigen.c:1476
 #, c-format
 msgid ""
 "\n"
@@ -2654,15 +2902,15 @@ msgstr ""
 "\n"
 "Tabla de Exportación de Direcciones -- Base Ordinal %ld\n"
 
-#: peigen.c:1472 pepigen.c:1472
+#: peigen.c:1495 pepigen.c:1495
 msgid "Forwarder RVA"
 msgstr "RVA Adelantador"
 
-#: peigen.c:1483 pepigen.c:1483
+#: peigen.c:1506 pepigen.c:1506
 msgid "Export RVA"
 msgstr "RVA Exportador"
 
-#: peigen.c:1490 pepigen.c:1490
+#: peigen.c:1513 pepigen.c:1513
 msgid ""
 "\n"
 "[Ordinal/Name Pointer] Table\n"
@@ -2670,12 +2918,12 @@ msgstr ""
 "\n"
 "Tabla [Apuntador a Ordinal/Nombre]\n"
 
-#: peigen.c:1545 pepigen.c:1545
+#: peigen.c:1568 pepigen.c:1568
 #, c-format
 msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
 msgstr "Aviso, el tamaño de la sección .pdata (%ld) no es un múltiplo de %d\n"
 
-#: peigen.c:1549 pepigen.c:1549
+#: peigen.c:1572 pepigen.c:1572
 msgid ""
 "\n"
 "The Function Table (interpreted .pdata section contents)\n"
@@ -2683,11 +2931,11 @@ msgstr ""
 "\n"
 "La Tabla de Funciones (se interpretaron los contenidos de la sección .pdata)\n"
 
-#: peigen.c:1552 pepigen.c:1552
+#: peigen.c:1575 pepigen.c:1575
 msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
 msgstr " vma:\t\t\tDirección Inicio Dirección Fin    Información Desenvuelta\n"
 
-#: peigen.c:1554 pepigen.c:1554
+#: peigen.c:1577 pepigen.c:1577
 msgid ""
 " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
 "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
@@ -2695,19 +2943,19 @@ msgstr ""
 " vma:\t\tInicio   Fin      EH       EH       FinPrólogo Excepción\n"
 "     \t\tDirecc   Direcc   Asa      Datos    Dirección  Máscara\n"
 
-#: peigen.c:1624 pepigen.c:1624
+#: peigen.c:1647 pepigen.c:1647
 msgid " Register save millicode"
 msgstr " Registro para guardar milicódigo"
 
-#: peigen.c:1627 pepigen.c:1627
+#: peigen.c:1650 pepigen.c:1650
 msgid " Register restore millicode"
 msgstr " Registro para restaurar milicódigo"
 
-#: peigen.c:1630 pepigen.c:1630
+#: peigen.c:1653 pepigen.c:1653
 msgid " Glue code sequence"
 msgstr " Secuencia de código pegamento"
 
-#: peigen.c:1682 pepigen.c:1682
+#: peigen.c:1705 pepigen.c:1705
 msgid ""
 "\n"
 "\n"
@@ -2717,7 +2965,7 @@ msgstr ""
 "\n"
 "Reubicaciones de Fichero Base PE (se interpretaron los contenidos de la sección .reloc)\n"
 
-#: peigen.c:1712 pepigen.c:1712
+#: peigen.c:1735 pepigen.c:1735
 #, c-format
 msgid ""
 "\n"
@@ -2726,7 +2974,7 @@ msgstr ""
 "\n"
 "Dirección Virtual: %08lx Tamaño del trozo %ld (0x%lx) Número de composturas %ld\n"
 
-#: peigen.c:1725 pepigen.c:1725
+#: peigen.c:1748 pepigen.c:1748
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
 msgstr "\treubicación %4d desplazamiento %4x [%4lx] %s"
@@ -2734,7 +2982,7 @@ msgstr "\treubicaci
 #. The MS dumpbin program reportedly ands with 0xff0f before
 #. printing the characteristics field.  Not sure why.  No reason to
 #. emulate it here.
-#: peigen.c:1765 pepigen.c:1765
+#: peigen.c:1788 pepigen.c:1788
 #, c-format
 msgid ""
 "\n"
@@ -2743,6 +2991,42 @@ msgstr ""
 "\n"
 "Características 0x%x\n"
 
+#~ msgid "%s: Unknown special linker type %d"
+#~ msgstr "%s: Tipo de enlazador especial %d desconocido"
+
+#~ msgid "v850ea architecture"
+#~ msgstr "arquitectura v850ea"
+
+#~ msgid "%s: Section %s is too large to add hole of %ld bytes"
+#~ msgstr "%s: La sección %s es muy grande para agregar un agujero de %ld bytes"
+
+#~ msgid "Error: out of memory"
+#~ msgstr "Error: memoria agotada"
+
+#~ msgid "warning: relocation against removed section; zeroing"
+#~ msgstr "aviso: reubicación contra una sección eliminada; cambiando a ceros"
+
+#~ msgid "warning: relocation against removed section"
+#~ msgstr "aviso: reubicación contra una sección eliminada"
+
+#~ msgid "local symbols in discarded section %s"
+#~ msgstr "símbolos locales en la sección descartada %s"
+
+#~ msgid "%s: linking abicalls files with non-abicalls files"
+#~ msgstr "%s: enlazando ficheros de llamadas abi con ficheros que no son de llamadas abi"
+
+#~ msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+#~ msgstr "%s: no coincide el ISA (-mips%d) con módulos previos (-mips%d)"
+
+#~ msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+#~ msgstr "%s: no coincide el ISA (%d) con módulos previos (%d)"
+
+#~ msgid "%s: dynamic relocation against speculation fixup"
+#~ msgstr "%s: reubicación dinámica contra una compostura de especulación"
+
+#~ msgid "%s: speculation fixup against undefined weak symbol"
+#~ msgstr "%s: compostura de especulación contra un símbolo débil indefinido"
+
 #~ msgid "\tThe Import Address Table (difference found)\n"
 #~ msgstr "\tLa Tabla de Importación de Direcciones (se encontró una diferencia)\n"
 
index 4c0defd005a42c4e27e879d85f2c073def42fde1..805904bce010ae55b696b0c55ceeaa0bb88a8ab5 100644 (file)
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU bfd 2.12.91\n"
-"POT-Creation-Date: 2002-07-23 15:55-0400\n"
-"PO-Revision-Date: 2002-07-24 08:00-0500\n"
+"Project-Id-Version: GNU bfd 2.14rel030712\n"
+"POT-Creation-Date: 2003-07-11 13:53+0930\n"
+"PO-Revision-Date: 2003-07-22 08:00-0500\n"
 "Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
 "Language-Team: French <traduc@traduc.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8-bit\n"
 
-#: aout-adobe.c:197
+#: aout-adobe.c:204
 #, c-format
 msgid "%s: Unknown section type in a.out.adobe file: %x\n"
 msgstr "%s: type de section inconnu dans le fichier a.out.adobe: %x\n"
 
-#: aout-cris.c:208
+#: aout-cris.c:207
 #, c-format
 msgid "%s: Invalid relocation type exported: %d"
 msgstr "%s: relocalisation invalide du type exporté: %d"
 
-#: aout-cris.c:252
+#: aout-cris.c:251
 #, c-format
 msgid "%s: Invalid relocation type imported: %d"
 msgstr "%s: relocalisation invalide du type importé: %d"
 
-#: aout-cris.c:263
+#: aout-cris.c:262
 #, c-format
 msgid "%s: Bad relocation record imported: %d"
 msgstr "%s: mauvais enregistrement de relocalisation importé: %d"
 
-#: aoutx.h:1282 aoutx.h:1699
+#: aoutx.h:1295 aoutx.h:1716
 #, c-format
 msgid "%s: can not represent section `%s' in a.out object file format"
 msgstr "%s: ne peut représenter la section « %s » dans le fichier format objet a.out"
 
-#: aoutx.h:1669
+#: aoutx.h:1682
 #, c-format
 msgid "%s: can not represent section for symbol `%s' in a.out object file format"
 msgstr "%s: ne peut représenter la section pour le symbole « %s » dans le fichier format objet a.out"
 
-#: aoutx.h:1671
+#: aoutx.h:1684
 msgid "*unknown*"
 msgstr "*inconnu*"
 
-#: aoutx.h:3732
+#: aoutx.h:3776
 #, c-format
-msgid "%s: relocateable link from %s to %s not supported"
-msgstr "%s: relocalisation de liens de %s vers %s n'est pas supporté"
+msgid "%s: relocatable link from %s to %s not supported"
+msgstr "%s: lien relocalisable de %s vers %s n'est pas supporté"
 
-#: archive.c:1826
+#: archive.c:1751
 msgid "Warning: writing archive was slow: rewriting timestamp\n"
 msgstr "AVERTISSEMENT: l'écriture de l'archive était lente: réécriture du cachet de date-heure\n"
 
-#: archive.c:2093
+#: archive.c:2014
 msgid "Reading archive file mod timestamp"
 msgstr "Lecture du cachet date-heure modifé du fichier d'archive"
 
-#. FIXME: bfd can't call perror.
-#: archive.c:2120
+#: archive.c:2040
 msgid "Writing updated armap timestamp"
 msgstr "Écriture du cachet date-heure armap mise à jour"
 
-#: bfd.c:274
+#: bfd.c:280
 msgid "No error"
 msgstr "Pas d'erreur"
 
-#: bfd.c:275
+#: bfd.c:281
 msgid "System call error"
 msgstr "Erreur d'appel système"
 
-#: bfd.c:276
+#: bfd.c:282
 msgid "Invalid bfd target"
 msgstr "cible bfd invalide"
 
-#: bfd.c:277
+#: bfd.c:283
 msgid "File in wrong format"
 msgstr "Fichier dans un mauvais format"
 
-#: bfd.c:278
+#: bfd.c:284
 msgid "Archive object file in wrong format"
 msgstr "Fichier objet d'archive dans un mauvais format"
 
-#: bfd.c:279
+#: bfd.c:285
 msgid "Invalid operation"
 msgstr "Opération invalide"
 
-#: bfd.c:280
+#: bfd.c:286
 msgid "Memory exhausted"
 msgstr "Mémoire épuisée"
 
-#: bfd.c:281
+#: bfd.c:287
 msgid "No symbols"
 msgstr "Aucun symbole"
 
-#: bfd.c:282
+#: bfd.c:288
 msgid "Archive has no index; run ranlib to add one"
 msgstr "L'archive n'a pas d'index; exécuter ranlib pour en ajouter un"
 
-#: bfd.c:283
+#: bfd.c:289
 msgid "No more archived files"
 msgstr "Aucun autre fichier d'archive"
 
-#: bfd.c:284
+#: bfd.c:290
 msgid "Malformed archive"
 msgstr "Archive mal formé"
 
-#: bfd.c:285
+#: bfd.c:291
 msgid "File format not recognized"
 msgstr "Format de fichier non reconnu"
 
-#: bfd.c:286
+#: bfd.c:292
 msgid "File format is ambiguous"
 msgstr "Format de fichier ambiguë"
 
-#: bfd.c:287
+#: bfd.c:293
 msgid "Section has no contents"
 msgstr "Section sans contenu"
 
-#: bfd.c:288
+#: bfd.c:294
 msgid "Nonrepresentable section on output"
 msgstr "Section non-représentable pour la sortie"
 
-#: bfd.c:289
+#: bfd.c:295
 msgid "Symbol needs debug section which does not exist"
 msgstr "Symboles ont besoin de la section de débug qui est inexistente"
 
-#: bfd.c:290
+#: bfd.c:296
 msgid "Bad value"
 msgstr "Mauvaise valeur"
 
-#: bfd.c:291
+#: bfd.c:297
 msgid "File truncated"
 msgstr "Fichier tronqué"
 
-#: bfd.c:292
+#: bfd.c:298
 msgid "File too big"
 msgstr "Fichier trop gros"
 
-#: bfd.c:293
+#: bfd.c:299
 msgid "#<Invalid error code>"
 msgstr "#<Code d'erreur invalide>"
 
-#: bfd.c:700
+#: bfd.c:687
 #, c-format
 msgid "BFD %s assertion fail %s:%d"
 msgstr "BFD assertion %s a échoué %s:%d"
 
-#: bfd.c:719
+#: bfd.c:703
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d in %s\n"
 msgstr "BFD erreur interne %s, abandon à %s, ligne %d dans %s\n"
 
-#: bfd.c:723
+#: bfd.c:707
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d\n"
 msgstr "BFD erreur interne %s, abandon à %s, ligne %d\n"
 
-#: bfd.c:725
+#: bfd.c:709
 msgid "Please report this bug.\n"
 msgstr "SVP rapporter cette anomalie.\n"
 
+#: bfdwin.c:202
+#, c-format
+msgid "not mapping: data=%lx mapped=%d\n"
+msgstr "pas de table de projection: données=%lx adresse de la table=%d\n"
+
+#: bfdwin.c:205
+msgid "not mapping: env var not set\n"
+msgstr "pas de table de projection: variable d'environnement pas initialisée\n"
+
 #: binary.c:306
 #, c-format
 msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
 msgstr "AVERTISSEMENT: écriture de la section « %s » vers un énorme décalage (ie négatif) dans le fichier 0x%lx."
 
-#: coff-a29k.c:119
+#: coff-a29k.c:120
 msgid "Missing IHCONST"
 msgstr "IHCONST manquant"
 
-#: coff-a29k.c:180
+#: coff-a29k.c:181
 msgid "Missing IHIHALF"
 msgstr "IHIHALF manquant"
 
-#: coff-a29k.c:212 coff-or32.c:229
+#: coff-a29k.c:213 coff-or32.c:236
 msgid "Unrecognized reloc"
 msgstr "Relocalisation non reconnue"
 
-#: coff-a29k.c:408
+#: coff-a29k.c:409
 msgid "missing IHCONST reloc"
 msgstr "IHCONST de relocalisation manquant"
 
-#: coff-a29k.c:498
+#: coff-a29k.c:499
 msgid "missing IHIHALF reloc"
 msgstr "IHIHALF de relocalisation manquant"
 
-#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
+#: coff-alpha.c:884 coff-alpha.c:921 coff-alpha.c:1992 coff-mips.c:1397
 msgid "GP relative relocation used when GP not defined"
 msgstr "Relocalisation relative GP utilisé alors que GP n'est pas défini"
 
-#: coff-alpha.c:1485
+#: coff-alpha.c:1488
 msgid "using multiple gp values"
 msgstr "utilisation de valeurs multiples gp"
 
-#: coff-arm.c:1066 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:294
 #, c-format
 msgid "%s: unable to find THUMB glue '%s' for `%s'"
 msgstr "%s: incapable de repérer le REPÈRE de liant « %s » pour « %s »"
 
-#: coff-arm.c:1096 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:329
 #, c-format
 msgid "%s: unable to find ARM glue '%s' for `%s'"
 msgstr "%s: incapable de repérer le liant ARM « %s » pour « %s »"
 
-#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
+#: coff-arm.c:1394 coff-arm.c:1489 elf32-arm.h:892 elf32-arm.h:999
 #, c-format
 msgid "%s(%s): warning: interworking not enabled."
 msgstr "%s(%s): AVERTISSEMENT: l'inter-réseautage n'est pas permis."
 
-#: coff-arm.c:1395 elf32-arm.h:994
+#: coff-arm.c:1398 elf32-arm.h:1002
 #, c-format
 msgid "  first occurrence: %s: arm call to thumb"
 msgstr "  première occurrence: %s: appel arm de repérage"
 
-#: coff-arm.c:1490 elf32-arm.h:890
+#: coff-arm.c:1493 elf32-arm.h:895
 #, c-format
 msgid "  first occurrence: %s: thumb call to arm"
 msgstr "  première occurrence: %s: appel de repérage à ARM"
 
-#: coff-arm.c:1493
+#: coff-arm.c:1496
 msgid "  consider relinking with --support-old-code enabled"
 msgstr "  considérer de rafaire les liens avec --support-old-code enabled"
 
-#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
+#: coff-arm.c:1788 coff-tic80.c:687 cofflink.c:3038
 #, c-format
 msgid "%s: bad reloc address 0x%lx in section `%s'"
 msgstr "%s: mauvaise adresse de relocalisation 0x%lx dans la section « %s »"
 
-#: coff-arm.c:2127
+#: coff-arm.c:2132
 #, c-format
 msgid "%s: illegal symbol index in reloc: %d"
 msgstr "%s: symbole index illégal dans la relocalisation: %d"
 
-#: coff-arm.c:2255
+#: coff-arm.c:2265
 #, c-format
 msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
 msgstr "Erreur: %s compilé pour APCS-%d alors que %s a été compilé pour APCS-%d"
 
-#: coff-arm.c:2270 elf32-arm.h:2297
+#: coff-arm.c:2280 elf32-arm.h:2328
 #, c-format
 msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
 msgstr "Erreur: %s passage de valeurs en virgule flottante dans les registres FP alors que %s les passe dans les registres entiers"
 
-#: coff-arm.c:2273 elf32-arm.h:2302
+#: coff-arm.c:2283 elf32-arm.h:2333
 #, c-format
 msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
 msgstr "Erreur: %s passage de valeurs en virgule flottante dans les registres entiers alors que %s les passe dans les registres FP"
 
-#: coff-arm.c:2288
+#: coff-arm.c:2298
 #, c-format
 msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
 msgstr "ERREUR: %s compilé avec du code à position indépendante alors que la cible %s est à position absolue"
 
-#: coff-arm.c:2291
+#: coff-arm.c:2301
 #, c-format
 msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
 msgstr "ERREUR: %s compilé avec du code à position absolu alors que la cible %s est à position indépendante"
 
-#: coff-arm.c:2320 elf32-arm.h:2358
+#: coff-arm.c:2330 elf32-arm.h:2405
 #, c-format
 msgid "Warning: %s supports interworking, whereas %s does not"
 msgstr "AVERTISSEMENT: %s supporte l'inter-réseautage, contrairement à %s."
 
-#: coff-arm.c:2323 elf32-arm.h:2365
+#: coff-arm.c:2333 elf32-arm.h:2412
 #, c-format
 msgid "Warning: %s does not support interworking, whereas %s does"
 msgstr "AVERTISSEMENT: %s ne supporte pas l'inter-réseautage, contrairement à %s."
 
-#: coff-arm.c:2350
+#: coff-arm.c:2360
 #, c-format
 msgid "private flags = %x:"
 msgstr "fanions privés = %x"
 
-#: coff-arm.c:2358 elf32-arm.h:2418
+#: coff-arm.c:2368 elf32-arm.h:2467
 msgid " [floats passed in float registers]"
 msgstr " [valeurs en virgule flottante passées dans des registres de valeurs en virgule flottante]"
 
-#: coff-arm.c:2360
+#: coff-arm.c:2370
 msgid " [floats passed in integer registers]"
 msgstr " [valeurs en virgule flottante passées dans des registres de valeurs entières]"
 
-#: coff-arm.c:2363 elf32-arm.h:2421
+#: coff-arm.c:2373 elf32-arm.h:2470
 msgid " [position independent]"
 msgstr " [position indépendante]"
 
-#: coff-arm.c:2365
+#: coff-arm.c:2375
 msgid " [absolute position]"
 msgstr " [position absolue]"
 
-#: coff-arm.c:2369
+#: coff-arm.c:2379
 msgid " [interworking flag not initialised]"
 msgstr " [fanion d'inter-réseautage n'a pas été initialisé]"
 
-#: coff-arm.c:2371
+#: coff-arm.c:2381
 msgid " [interworking supported]"
 msgstr " [inter-réseautage supporté]"
 
-#: coff-arm.c:2373
+#: coff-arm.c:2383
 msgid " [interworking not supported]"
 msgstr " [inter-réseautage non supporté]"
 
-#: coff-arm.c:2421 elf32-arm.h:2124
+#: coff-arm.c:2431 elf32-arm.h:2150
 #, c-format
 msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
 msgstr "AVERTISSEMENT: pas d'initialisation du fanion d'inter-réseautage %s puisqu'il a déjà été spécifié sans inter-réseautage"
 
-#: coff-arm.c:2425 elf32-arm.h:2128
+#: coff-arm.c:2435 elf32-arm.h:2154
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s due to outside request"
 msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison d'une requête externe"
 
-#: coff-i960.c:136 coff-i960.c:485
+#: coff-h8300.c:1096
+#, c-format
+msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
+msgstr "ne peut traiter la relocalisation R_MEM_INDIRECT lorsque %s est utilisé en sortie"
+
+#: coff-i960.c:137 coff-i960.c:486
 msgid "uncertain calling convention for non-COFF symbol"
 msgstr "convention d'appel incertaine pour un symbole non COFF"
 
-#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
+#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2193 elf32-mips.c:1783
 msgid "unsupported reloc type"
 msgstr "type de relocalisation non supporté"
 
-#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
+#: coff-mips.c:839 elf32-mips.c:1088 elf64-mips.c:1590 elfn32-mips.c:1554
 msgid "GP relative relocation when _gp not defined"
 msgstr "relocalisation relative GP sans que _gp ne soit défini"
 
 #. No other sections should appear in -membedded-pic
 #. code.
-#: coff-mips.c:2466
+#: coff-mips.c:2431
 msgid "reloc against unsupported section"
 msgstr "relocalisation vers une section non supportée"
 
-#: coff-mips.c:2474
+#: coff-mips.c:2439
 msgid "reloc not properly aligned"
 msgstr "relocalisation n'est pas alignée correctement"
 
-#: coff-rs6000.c:2766
+#: coff-rs6000.c:2790
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
 msgstr "%s: type de relocalisation non supporté 0x%02x"
 
-#: coff-rs6000.c:2859
+#: coff-rs6000.c:2883
 #, c-format
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
 msgstr "%s: table des matières des relocalisation à 0x%x pour les symboles « %s » sans aucune entrée"
 
-#: coff-rs6000.c:3590 coff64-rs6000.c:2091
+#: coff-rs6000.c:3616 coff64-rs6000.c:2109
 #, c-format
 msgid "%s: symbol `%s' has unrecognized smclas %d"
 msgstr "%s: symbole « %s » a une classe smclas non reconnue %d"
 
-#: coff-tic54x.c:279 coff-tic80.c:449
+#: coff-tic4x.c:170 coff-tic54x.c:288 coff-tic80.c:450
 #, c-format
 msgid "Unrecognized reloc type 0x%x"
 msgstr "Type de relocalisation non reconnu 0x%x"
 
-#: coff-tic54x.c:390 coffcode.h:4974
+#: coff-tic4x.c:218 coff-tic54x.c:373 coffcode.h:5045
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
 msgstr "%s: AVERTISSEMENT: symbole index illégal %ld dans les relocalisations"
 
-#: coff-w65.c:363
+#: coff-w65.c:364
 #, c-format
 msgid "ignoring reloc %s\n"
 msgstr "relocalisation de %s ignorée\n"
 
-#: coffcode.h:1086
+#: coffcode.h:1108
 #, c-format
 msgid "%s (%s): Section flag %s (0x%x) ignored"
 msgstr "%s (%s): fanion de section %s (0x%x) ignoré"
 
-#: coffcode.h:2143
+#: coffcode.h:2214
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
 msgstr "cible TI COFF non reconnue identificateur '0x%x'"
 
-#: coffcode.h:4365
+#: coffcode.h:4437
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in line numbers"
 msgstr "%s: AVERTISSEMENT: symbole d'index illégal %ld dans le numéro de ligne"
 
-#: coffcode.h:4379
+#: coffcode.h:4451
 #, c-format
 msgid "%s: warning: duplicate line number information for `%s'"
 msgstr "%s: AVERTISSEMENT: information de numéro de ligne dédoublée pour « %s »"
 
-#: coffcode.h:4736
+#: coffcode.h:4805
 #, c-format
 msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
 msgstr "%s: classe de stockage non reconnue %d pour %s symbole « %s »"
 
-#: coffcode.h:4867
+#: coffcode.h:4938
 #, c-format
 msgid "warning: %s: local symbol `%s' has no section"
 msgstr "AVERTISSEMENT: %s: symbole local « %s » n'a pas de section"
 
-#: coffcode.h:5012
+#: coffcode.h:5083
 #, c-format
 msgid "%s: illegal relocation type %d at address 0x%lx"
 msgstr "%s: type de relocalisation illégal %d à l'adresse 0x%lx"
 
-#: coffgen.c:1661
+#: coffgen.c:1666
 #, c-format
 msgid "%s: bad string table size %lu"
 msgstr "%s: chaîne erronée de la taille de table %lu"
 
-#: cofflink.c:534 elflink.h:1912
+#: cofflink.c:538 elflink.h:1276
 #, c-format
 msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
 msgstr "AVERTISSEMENT: type de symbole « %s » a changé de %d à %d dans %s"
 
-#: cofflink.c:2321
+#: cofflink.c:2328
 #, c-format
 msgid "%s: relocs in section `%s', but it has no contents"
 msgstr "%s: relocalisations dans la section « %s », mais n'a aucun contenu"
 
-#: cofflink.c:2664 coffswap.h:877
+#: cofflink.c:2671 coffswap.h:890
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
 msgstr "%s: %s: débordement de relocalisation: 0x%lx > 0xffff"
 
-#: cofflink.c:2673 coffswap.h:864
+#: cofflink.c:2680 coffswap.h:876
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: AVERTISSEMENT: %s: débordement du compteur de numéro de ligne: 0x%lx > 0xffff"
 
-#: dwarf2.c:382
+#: cpu-arm.c:196 cpu-arm.c:206
+#, c-format
+msgid "ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"
+msgstr "ERREUR: %s compilé pour EP9312 alors que %s a été compilé pour XScale"
+
+#: cpu-arm.c:344
+#, c-format
+msgid "warning: unable to update contents of %s section in %s"
+msgstr "AVERTISSEMENT: incapable de mettre à jour le contenu de la section %s dans %s"
+
+#: dwarf2.c:380
 msgid "Dwarf Error: Can't find .debug_str section."
 msgstr "Erreur DWARF: ne peut repérer la section .debug_str"
 
-#: dwarf2.c:399
+#: dwarf2.c:397
 #, c-format
 msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
 msgstr "Erreur DWARF: décalage DW_FORM_strp (%lu) est >= à la taille de .debug_str (%lu)."
 
-#: dwarf2.c:543
+#: dwarf2.c:541
 msgid "Dwarf Error: Can't find .debug_abbrev section."
 msgstr "Erreur DWARF: ne peut repérer la section .debug_abbrev"
 
-#: dwarf2.c:560
+#: dwarf2.c:556
 #, c-format
 msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
 msgstr "Erreur DWARF: décalage Abbrev (%lu) est >= à la taille .debug_abbrev (%lu)."
 
-#: dwarf2.c:757
+#: dwarf2.c:756
 #, c-format
 msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
 msgstr "Erreur DWARF: valeur de FORME invalide ou mal traitée: %u"
 
-#: dwarf2.c:852
+#: dwarf2.c:933
 msgid "Dwarf Error: mangled line number section (bad file number)."
 msgstr "Erreur DWARF: numéro mutilé de ligne de section (mauvais no. de fichier)"
 
-#: dwarf2.c:938
+#: dwarf2.c:1032
 msgid "Dwarf Error: Can't find .debug_line section."
 msgstr "Erreur DWARF: ne peut repérer la section .debug_line"
 
-#: dwarf2.c:961
+#: dwarf2.c:1049
 #, c-format
 msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
 msgstr "Erreur DWARF: décalage de ligne (%lu) est >= à la taille de .debug_line (%lu)"
 
-#: dwarf2.c:1159
+#: dwarf2.c:1255
 msgid "Dwarf Error: mangled line number section."
 msgstr "Erreur DWARF: numéro mutilé de ligne de section"
 
-#: dwarf2.c:1355 dwarf2.c:1566
+#: dwarf2.c:1470 dwarf2.c:1620
 #, c-format
 msgid "Dwarf Error: Could not find abbrev number %u."
 msgstr "Erreur DWARF: ne peut repérer le numéro abrégé %u"
 
-#: dwarf2.c:1527
+#: dwarf2.c:1581
 #, c-format
 msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
 msgstr "Erreur DWARF: version DWARF retrouvée « %u », ce lecteur ne supporte que les informations de la version 2."
 
-#: dwarf2.c:1534
+#: dwarf2.c:1588
 #, c-format
 msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
 msgstr "Erreur DWARF: taille d'adresse obtenue « %u », ce lecteur ne peut traiter des tailles plus grandes que « %u »."
 
-#: dwarf2.c:1557
+#: dwarf2.c:1611
 #, c-format
 msgid "Dwarf Error: Bad abbrev number: %u."
 msgstr "Erreur DWARF: mauvais numéro abrégé: %u"
 
-#: ecoff.c:1318
+#: ecoff.c:1339
 #, c-format
 msgid "Unknown basic type %d"
 msgstr "type de base inconnu %d"
 
-#: ecoff.c:1578
+#: ecoff.c:1599
 #, c-format
 msgid ""
 "\n"
@@ -500,7 +523,7 @@ msgstr ""
 "\n"
 "      Dernier+1 symbole: %ld"
 
-#: ecoff.c:1585 ecoff.c:1588
+#: ecoff.c:1606 ecoff.c:1609
 #, c-format
 msgid ""
 "\n"
@@ -509,7 +532,7 @@ msgstr ""
 "\n"
 "      Premier symbole: %ld"
 
-#: ecoff.c:1600
+#: ecoff.c:1621
 #, c-format
 msgid ""
 "\n"
@@ -518,7 +541,7 @@ msgstr ""
 "\n"
 "      Dernier+1 symbole: %-7ld   Type:  %s"
 
-#: ecoff.c:1607
+#: ecoff.c:1628
 #, c-format
 msgid ""
 "\n"
@@ -527,7 +550,7 @@ msgstr ""
 "\n"
 "      Symbole local: %ld"
 
-#: ecoff.c:1615
+#: ecoff.c:1636
 #, c-format
 msgid ""
 "\n"
@@ -536,7 +559,7 @@ msgstr ""
 "\n"
 "      struct; Symbole Fin+1: %ld"
 
-#: ecoff.c:1620
+#: ecoff.c:1641
 #, c-format
 msgid ""
 "\n"
@@ -545,7 +568,7 @@ msgstr ""
 "\n"
 "      union; Dernier+1 symbole: %ld"
 
-#: ecoff.c:1625
+#: ecoff.c:1646
 #, c-format
 msgid ""
 "\n"
@@ -554,7 +577,7 @@ msgstr ""
 "\n"
 "      enum; Dernier+1 symbol: %ld"
 
-#: ecoff.c:1631
+#: ecoff.c:1652
 #, c-format
 msgid ""
 "\n"
@@ -563,54 +586,58 @@ msgstr ""
 "\n"
 "      Type: %s"
 
-#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
-#: elf64-sh64.c:1659
+#: elf-hppa.h:1458 elf-hppa.h:1491 elf-m10300.c:1628 elf64-sh64.c:1704
 #, c-format
 msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
 msgstr "%s: AVERTISSEMENT: relocalisation sans solution vers le symbole « %s » de la section %s"
 
-#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
-#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
-#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
-#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
+#: elf-m10200.c:442 elf-m10300.c:1695 elf32-arm.h:2088 elf32-avr.c:812
+#: elf32-cris.c:1390 elf32-d10v.c:570 elf32-fr30.c:634 elf32-frv.c:815
+#: elf32-h8300.c:528 elf32-i860.c:1028 elf32-ip2k.c:1586 elf32-iq2000.c:699
+#: elf32-m32r.c:1283 elf32-m68hc1x.c:1305 elf32-msp430.c:510
+#: elf32-openrisc.c:436 elf32-v850.c:1777 elf32-xstormy16.c:976
+#: elf64-mmix.c:1332
 msgid "internal error: out of range error"
 msgstr "erreur interne: hors gamme"
 
-#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
-#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
-#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
-#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
+#: elf-m10200.c:446 elf-m10300.c:1699 elf32-arm.h:2092 elf32-avr.c:816
+#: elf32-cris.c:1394 elf32-d10v.c:574 elf32-fr30.c:638 elf32-frv.c:819
+#: elf32-h8300.c:532 elf32-i860.c:1032 elf32-iq2000.c:703 elf32-m32r.c:1287
+#: elf32-m68hc1x.c:1309 elf32-msp430.c:514 elf32-openrisc.c:440
+#: elf32-v850.c:1781 elf32-xstormy16.c:980 elf64-mmix.c:1336 elfxx-mips.c:6452
 msgid "internal error: unsupported relocation error"
 msgstr "erreur interne: erreur de relocalisation non supportée"
 
-#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
-#: elf32-h8300.c:556 elf32-m32r.c:1286
+#: elf-m10200.c:450 elf-m10300.c:1703 elf32-arm.h:2096 elf32-d10v.c:578
+#: elf32-h8300.c:536 elf32-m32r.c:1291 elf32-m68hc1x.c:1313
 msgid "internal error: dangerous error"
 msgstr "erreur interne: erreur dangereuse"
 
-#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
-#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
-#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
-#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
+#: elf-m10200.c:454 elf-m10300.c:1707 elf32-arm.h:2100 elf32-avr.c:824
+#: elf32-cris.c:1402 elf32-d10v.c:582 elf32-fr30.c:646 elf32-frv.c:827
+#: elf32-h8300.c:540 elf32-i860.c:1040 elf32-ip2k.c:1601 elf32-iq2000.c:711
+#: elf32-m32r.c:1295 elf32-m68hc1x.c:1317 elf32-msp430.c:522
+#: elf32-openrisc.c:448 elf32-v850.c:1801 elf32-xstormy16.c:988
+#: elf64-mmix.c:1344
 msgid "internal error: unknown error"
 msgstr "erreur interne: erreur inconnue"
 
-#: elf.c:343
+#: elf.c:372
 #, c-format
 msgid "%s: invalid string offset %u >= %lu for section `%s'"
 msgstr "%s: chaîne de décalage invalide %u >= %lu pour la section « %s »"
 
-#: elf.c:589
+#: elf.c:624
 #, c-format
 msgid "%s: invalid SHT_GROUP entry"
 msgstr "%s: entrée SHT_GROUP invalide"
 
-#: elf.c:660
+#: elf.c:695
 #, c-format
 msgid "%s: no group info for section %s"
 msgstr "%s: aucune info de groupe pour la section %s"
 
-#: elf.c:1023
+#: elf.c:1055
 msgid ""
 "\n"
 "Program Header:\n"
@@ -618,7 +645,7 @@ msgstr ""
 "\n"
 "En-tête de programme:\n"
 
-#: elf.c:1073
+#: elf.c:1106
 msgid ""
 "\n"
 "Dynamic Section:\n"
@@ -626,7 +653,7 @@ msgstr ""
 "\n"
 "Section dynamique:\n"
 
-#: elf.c:1202
+#: elf.c:1235
 msgid ""
 "\n"
 "Version definitions:\n"
@@ -634,7 +661,7 @@ msgstr ""
 "\n"
 "Définitions des versions:\n"
 
-#: elf.c:1225
+#: elf.c:1258
 msgid ""
 "\n"
 "Version References:\n"
@@ -642,224 +669,239 @@ msgstr ""
 "\n"
 "Références de version:\n"
 
-#: elf.c:1230
+#: elf.c:1263
 #, c-format
 msgid "  required from %s:\n"
 msgstr " requis par %s:\n"
 
-#: elf.c:1902
+#: elf.c:1944
 #, c-format
 msgid "%s: invalid link %lu for reloc section %s (index %u)"
 msgstr "%s: lien invalide %lu pour la section de relocalisation %s (index %u)"
 
-#: elf.c:3603
+#: elf.c:3686
 #, c-format
 msgid "%s: Not enough room for program headers (allocated %u, need %u)"
 msgstr "%s: pas suffisamment d'espace pour les en-têtes du programme (alloué %u, besoin de %u)"
 
-#: elf.c:3708
+#: elf.c:3791
 #, c-format
 msgid "%s: Not enough room for program headers, try linking with -N"
 msgstr "%s: pas suffisamment d'espace pour les en-têtes du programme, essayer l'option -N"
 
-#: elf.c:3833
+#: elf.c:3922
 #, c-format
 msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
 msgstr "Erreur: première section dans le segment (%s) débute à 0x%x alors que le segment débute à 0x%x"
 
-#: elf.c:4148
+#: elf.c:4242
 #, c-format
 msgid "%s: warning: allocated section `%s' not in segment"
 msgstr "%s: AVERTISSEMENT: section allouée « %s » n'est pas dans le segment"
 
-#: elf.c:4472
+#: elf.c:4566
 #, c-format
 msgid "%s: symbol `%s' required but not present"
 msgstr "%s: symbole « %s » requis mais absent"
 
-#: elf.c:4749
+#: elf.c:4854
 #, c-format
 msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
 msgstr "%s: AVERTISSEMENT: segment chargeable vide détecté, est-ce intentionnel ?\n"
 
-#: elf.c:6193
+#: elf.c:5485
+#, c-format
+msgid "Unable to find equivalent output section for symbol '%s' from section '%s'"
+msgstr "Incapable de trouver un équivalent pour le symbole « %s » de la section « %s »"
+
+#: elf.c:6298
 #, c-format
 msgid "%s: unsupported relocation type %s"
 msgstr "%s: type de relocalisation non supporté %s"
 
-#: elf32-arm.h:1221
+#: elf32-arm.h:1228
 #, c-format
 msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
 msgstr "%s: AVERTISSEMENT: instruction Arm BLX vise la fonction Arm « %s »."
 
-#: elf32-arm.h:1417
+#: elf32-arm.h:1424
 #, c-format
 msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
 msgstr "%s: AVERTISSEMENT: instruction de repérage BLX vise la function de repérage « %s »."
 
-#: elf32-arm.h:1914 elf32-sh.c:4125
+#: elf32-arm.h:1918 elf32-sh.c:4706 elf64-sh64.c:1613
 #, c-format
 msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
 msgstr "%s(%s+0x%lx): %s relocation vers une section SEC_MERGE"
 
-#: elf32-arm.h:2008
+#: elf32-arm.h:2012
 #, c-format
 msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
 msgstr "%s: AVERTISSEMENT: relocalisation sans solution %d vers le symbole « %s » de la section %s"
 
-#: elf32-arm.h:2176
+#: elf32-arm.h:2202
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
 msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison du code sans inter-réseautage dans %s lié avec lui"
 
-#: elf32-arm.h:2271
+#: elf32-arm.h:2302
 #, c-format
 msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
 msgstr "ERREUR: %s compilé pour une version EABI %d alors que %s a été compilé pour la version %d"
 
-#: elf32-arm.h:2285
+#: elf32-arm.h:2316
 #, c-format
 msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
 msgstr "ERREUR: %s compilé pour APCS-%d alors que la cible %s utilise APCS-%d"
 
-#: elf32-arm.h:2313
+#: elf32-arm.h:2344
 #, c-format
-msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
-msgstr "ERREUR: %s utilise les instructions VFP alors que %s utilise les instructions FPA"
+msgid "ERROR: %s uses VFP instructions, whereas %s does not"
+msgstr "ERREUR: %s utilise les instructions VFP alors que %s ne les utilise pas"
 
-#: elf32-arm.h:2318
+#: elf32-arm.h:2349
 #, c-format
-msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
-msgstr "ERREUR: %s utilise les instructions FPA alors que %s utilise les instructions VFP"
+msgid "ERROR: %s uses FPA instructions, whereas %s does not"
+msgstr "ERREUR: %s utilise les instructions FPA alors que %s ne les utilise pas"
 
-#: elf32-arm.h:2338
+#: elf32-arm.h:2360 elf32-arm.h:2365
+#, c-format
+msgid "ERROR: %s uses Maverick instructions, whereas %s does not"
+msgstr "ERREUR: %s utilise les instructions Maverick alors que %s ne les utilise pas"
+
+#: elf32-arm.h:2385
 #, c-format
 msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
 msgstr "ERREUR: %s utilise le logiciel pour virgule flottante alors que %s utilise le matériel pour virgule flottante"
 
-#: elf32-arm.h:2343
+#: elf32-arm.h:2390
 #, c-format
 msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
 msgstr "ERREUR: %s utilise le matériel pour virgule flottante alors que %s utilise le logiciel pour virgule flottante"
 
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
-#: elfxx-mips.c:7756
+#: elf32-arm.h:2443 elf32-cris.c:2975 elf32-m68hc1x.c:1459 elf32-m68k.c:397
+#: elf32-vax.c:546 elfxx-mips.c:9238
 #, c-format
 msgid "private flags = %lx:"
 msgstr "fanions privés = %lx"
 
-#: elf32-arm.h:2405
+#: elf32-arm.h:2452
 msgid " [interworking enabled]"
 msgstr " [inter-réseautage autorisé]"
 
-#: elf32-arm.h:2413
+#: elf32-arm.h:2460
 msgid " [VFP float format]"
 msgstr " [format flottant VFP]"
 
-#: elf32-arm.h:2415
+#: elf32-arm.h:2462
+msgid " [Maverick float format]"
+msgstr " [format flottant Maverick]"
+
+#: elf32-arm.h:2464
 msgid " [FPA float format]"
 msgstr " [format flottant FPA]"
 
-#: elf32-arm.h:2424
+#: elf32-arm.h:2473
 msgid " [new ABI]"
 msgstr " [nouvel ABI]"
 
-#: elf32-arm.h:2427
+#: elf32-arm.h:2476
 msgid " [old ABI]"
 msgstr " [ancien ABI]"
 
-#: elf32-arm.h:2430
+#: elf32-arm.h:2479
 msgid " [software FP]"
 msgstr " [virgule flottante logiciel]"
 
-#: elf32-arm.h:2438
+#: elf32-arm.h:2488
 msgid " [Version1 EABI]"
 msgstr " [Version 1 EABI]"
 
-#: elf32-arm.h:2441 elf32-arm.h:2452
+#: elf32-arm.h:2491 elf32-arm.h:2502
 msgid " [sorted symbol table]"
 msgstr " [table des symboles triés]"
 
-#: elf32-arm.h:2443 elf32-arm.h:2454
+#: elf32-arm.h:2493 elf32-arm.h:2504
 msgid " [unsorted symbol table]"
 msgstr " [table des symboles non triés]"
 
-#: elf32-arm.h:2449
+#: elf32-arm.h:2499
 msgid " [Version2 EABI]"
 msgstr " [Version2 EABI]"
 
-#: elf32-arm.h:2457
+#: elf32-arm.h:2507
 msgid " [dynamic symbols use segment index]"
 msgstr " [symboles dynamiques utilisent un index de segment]"
 
-#: elf32-arm.h:2460
+#: elf32-arm.h:2510
 msgid " [mapping symbols precede others]"
 msgstr " [mapping de symboles précèdes les autres]"
 
-#: elf32-arm.h:2467
+#: elf32-arm.h:2517
 msgid " <EABI version unrecognised>"
 msgstr " <Version EABI non reconnue>"
 
-#: elf32-arm.h:2474
+#: elf32-arm.h:2524
 msgid " [relocatable executable]"
 msgstr " [exécutables relocalisés]"
 
-#: elf32-arm.h:2477
+#: elf32-arm.h:2527
 msgid " [has entry point]"
 msgstr " [a des points d'entrées]"
 
-#: elf32-arm.h:2482
+#: elf32-arm.h:2532
 msgid "<Unrecognised flag bits set>"
 msgstr "<Bits de fanions non reconnus>"
 
-#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
-#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
-#: elf32-xstormy16.c:941 elf64-mmix.c:1310
+#: elf32-avr.c:820 elf32-cris.c:1398 elf32-fr30.c:642 elf32-frv.c:823
+#: elf32-i860.c:1036 elf32-ip2k.c:1597 elf32-iq2000.c:707 elf32-msp430.c:518
+#: elf32-openrisc.c:444 elf32-v850.c:1785 elf32-xstormy16.c:984
+#: elf64-mmix.c:1340
 msgid "internal error: dangerous relocation"
 msgstr "erreur interne: relocalisation dangereuse"
 
-#: elf32-cris.c:949
+#: elf32-cris.c:931
 #, c-format
 msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
 msgstr "%s: relocalisation %s sans solution vers le symbole « %s » à partir de la section %s"
 
-#: elf32-cris.c:1012
+#: elf32-cris.c:993
 #, c-format
 msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
 msgstr "%s: pas de relocalisation %s PLT ni GOT vers le symbole « %s » à partir de la section %s"
 
-#: elf32-cris.c:1015 elf32-cris.c:1141
+#: elf32-cris.c:996 elf32-cris.c:1122
 msgid "[whose name is lost]"
 msgstr "[où le nom est perdu]"
 
-#: elf32-cris.c:1130
+#: elf32-cris.c:1111
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
 msgstr "%s: relocalisation %s sans zéro ajoute %d vers le symbole local à partir de la section %s"
 
-#: elf32-cris.c:1137
+#: elf32-cris.c:1118
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
 msgstr "%s: relocalisation %s sans zéro ajoute %d vers le symbole « %s » à partir de la section %s"
 
-#: elf32-cris.c:1155
+#: elf32-cris.c:1143
 #, c-format
 msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
 msgstr "%s: relocalisation %s n'est pas permise pour le symbole global: « %s » de la section %s."
 
-#: elf32-cris.c:1170
+#: elf32-cris.c:1158
 #, c-format
 msgid "%s: relocation %s in section %s with no GOT created"
 msgstr "%s: relocalisation %s dans la section %s mais aucun GOT créé"
 
-#: elf32-cris.c:1288
+#: elf32-cris.c:1277
 #, c-format
 msgid "%s: Internal inconsistency; no relocation section %s"
 msgstr "%s: inconsistence interne; pas de section de relocalisation %s"
 
-#: elf32-cris.c:2514
+#: elf32-cris.c:2500
 #, c-format
 msgid ""
 "%s, section %s:\n"
@@ -868,494 +910,647 @@ msgstr ""
 "%s, section %s:\n"
 " relocalisation %s devrait être utilisée dans un objet partagé; recompiler avec -fPIC"
 
-#: elf32-cris.c:2991
+#: elf32-cris.c:2978
 msgid " [symbols have a _ prefix]"
 msgstr " [symboles sont préfixés par « _ »]"
 
-#: elf32-cris.c:3030
+#: elf32-cris.c:3017
 #, c-format
 msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
 msgstr "%s: utilise  _-prefixed symbols, mais avec écriture au fichier avec des symboles sans préfixes"
 
-#: elf32-cris.c:3031
+#: elf32-cris.c:3018
 #, c-format
 msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
 msgstr "%s: utilise des symboles sans préfixes, mais avec écriture au fichier avec des symboles ayant des préfixes_-prefixed"
 
-#: elf32-frv.c:1217
+#: elf32-frv.c:1223
 #, c-format
 msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
 msgstr "%s: compilé avec %s et lié avec les modules qui utilisent de la relocalisation non PIC"
 
-#: elf32-frv.c:1267
+#: elf32-frv.c:1273 elf32-iq2000.c:895
 #, c-format
 msgid "%s: compiled with %s and linked with modules compiled with %s"
 msgstr "%s: compilé avec %s et lié avec les modules compilés avec %s"
 
-#: elf32-frv.c:1279
+#: elf32-frv.c:1285
 #, c-format
 msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
 msgstr "%s: utilise différents champs e_flags (0x%lx) que les modules précédents (0x%lx)"
 
-#: elf32-frv.c:1315
+#: elf32-frv.c:1321 elf32-iq2000.c:933
 #, c-format
 msgid "private flags = 0x%lx:"
 msgstr "fanions privés = 0x%lx:"
 
-#: elf32-gen.c:82 elf64-gen.c:82
+#: elf32-gen.c:83 elf64-gen.c:82
 #, c-format
 msgid "%s: Relocations in generic ELF (EM: %d)"
 msgstr "%s: relocalisation en format ELF générique (EM: %d)"
 
-#: elf32-hppa.c:671 elf64-ppc.c:2323
+#: elf32-hppa.c:672 elf32-m68hc1x.c:176 elf64-ppc.c:3118
 #, c-format
 msgid "%s: cannot create stub entry %s"
 msgstr "%s: ne peut créer l'entrée du talon %s"
 
-#: elf32-hppa.c:956 elf32-hppa.c:3555
+#: elf32-hppa.c:957 elf32-hppa.c:3538
 #, c-format
 msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
 msgstr "%s(%s+0x%lx): ne peut atteindre %s, recompiler avec -ffunction-sections"
 
-#: elf32-hppa.c:1338 elf64-x86-64.c:673
+#: elf32-hppa.c:1340 elf64-x86-64.c:672 elf64-x86-64.c:797
 #, c-format
 msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
 msgstr "%s: relocalisation de %s ne peut être utilisée lors de la création d'un objet partagé; recompiler avec -fPIC"
 
-#: elf32-hppa.c:1358
+#: elf32-hppa.c:1360
 #, c-format
 msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
 msgstr "%s: relocalisation %s ne doit pas être utilisée lors de la création d'un objet partagé; recompiler avec -fPIC"
 
-#: elf32-hppa.c:1551
+#: elf32-hppa.c:1553
 #, c-format
 msgid "Could not find relocation section for %s"
 msgstr "Ne peut repérer la section de relocalisation pour %s"
 
-#: elf32-hppa.c:2855
+#: elf32-hppa.c:2828
 #, c-format
 msgid "%s: duplicate export stub %s"
 msgstr "%s: talon d'exportation en double %s"
 
-#: elf32-hppa.c:3433
+#: elf32-hppa.c:3416
 #, c-format
 msgid "%s(%s+0x%lx): fixing %s"
 msgstr "%s(%s+0x%lx): corrigeant %s"
 
-#: elf32-hppa.c:4080
+#: elf32-hppa.c:4039
 #, c-format
 msgid "%s(%s+0x%lx): cannot handle %s for %s"
 msgstr "%s(%s+0x%lx): ne traiter %s pour %s"
 
-#: elf32-hppa.c:4393
+#: elf32-hppa.c:4357
 msgid ".got section not immediately after .plt section"
 msgstr "section .got pas immédiatement après la section .plt"
 
-#: elf32-i386.c:379
+#: elf32-i386.c:326
 #, c-format
 msgid "%s: invalid relocation type %d"
 msgstr "%s: type de relocalisation invalide %d"
 
-#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
+#: elf32-i386.c:841 elf32-s390.c:990 elf32-sparc.c:887 elf32-xtensa.c:637
+#: elf64-s390.c:943 elf64-x86-64.c:650
 #, c-format
 msgid "%s: bad symbol index: %d"
 msgstr "%s: symbole index erroné: %d"
 
-#: elf32-i386.c:948
+#: elf32-i386.c:949 elf32-s390.c:1168 elf32-sh.c:6426 elf32-sparc.c:1011
+#: elf64-s390.c:1129
 #, c-format
 msgid "%s: `%s' accessed both as normal and thread local symbol"
 msgstr "%s: « %s » symbole local accéder à la fois comme normal et avec thread"
 
-#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
-#: elf64-x86-64.c:761
+#: elf32-i386.c:1064 elf32-s390.c:1279 elf64-ppc.c:3929 elf64-s390.c:1243
+#: elf64-x86-64.c:886
 #, c-format
 msgid "%s: bad relocation section name `%s'"
 msgstr "%s: nom de section de relocalisation erroné « %s »"
 
-#: elf32-i386.c:1159 elf64-alpha.c:4768
-#, c-format
-msgid "%s: TLS local exec code cannot be linked into shared objects"
-msgstr "%s: code exécutable local TLS ne peut être lié en objets partagés"
-
-#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
-#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
+#: elf32-i386.c:2908 elf32-m68k.c:1757 elf32-s390.c:3022 elf32-sparc.c:2879
+#: elf32-xtensa.c:2193 elf64-s390.c:3018 elf64-sparc.c:2664
+#: elf64-x86-64.c:2452
 #, c-format
 msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
 msgstr "%s(%s+0x%lx): relocalisation sans solution vers le symbole « %s »"
 
-#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
-#: elf64-x86-64.c:1986
+#: elf32-i386.c:2947 elf32-m68k.c:1796 elf32-s390.c:3072 elf64-s390.c:3068
+#: elf64-x86-64.c:2490
 #, c-format
 msgid "%s(%s+0x%lx): reloc against `%s': error %d"
 msgstr "%s(%s+0x%lx): relocalisation vers « %s »: erreur %d"
 
-#: elf32-m32r.c:924
+#: elf32-ip2k.c:565 elf32-ip2k.c:571 elf32-ip2k.c:734 elf32-ip2k.c:740
+msgid "ip2k relaxer: switch table without complete matching relocation information."
+msgstr "relâche ip2k: table de commutation sans concordance complète des informations de relocalisation"
+
+#: elf32-ip2k.c:588 elf32-ip2k.c:767
+msgid "ip2k relaxer: switch table header corrupt."
+msgstr "relâche ip2k: en-tête de table de commutation corrompue"
+
+#: elf32-ip2k.c:1395
+#, c-format
+msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr "liaison ip2k: instruction de page manquante à 0x%08lx (cible = 0x%08lx)."
+
+#: elf32-ip2k.c:1409
+#, c-format
+msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr "liaison ip2k: instruction de page redondante à 0x%08lx (cible = 0x%08lx)."
+
+#. Only if it's not an unresolved symbol.
+#: elf32-ip2k.c:1593
+msgid "unsupported relocation between data/insn address spaces"
+msgstr "relocalisation non supporté entre les espaces d'adresses data/insn"
+
+#: elf32-iq2000.c:907 elf32-m68hc1x.c:1431 elf32-ppc.c:2175 elf64-sparc.c:3072
+#: elfxx-mips.c:9195
+#, c-format
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: utilise differents champs e_flags (0x%lx) que les modules précédents (0x%lx)"
+
+#: elf32-m32r.c:930
 msgid "SDA relocation when _SDA_BASE_ not defined"
 msgstr "relocalisation SDA alors que _SDA_BASE_ n'est pas définie"
 
-#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
-#: elf64-alpha.c:4313 elf64-ia64.c:3687
+#: elf32-m32r.c:1018 elf64-alpha.c:4279 elf64-alpha.c:4407 elf32-ia64.c:3958
+#: elf64-ia64.c:3958
 #, c-format
 msgid "%s: unknown relocation type %d"
 msgstr "%s: type de relocalisation inconnu %d"
 
-#: elf32-m32r.c:1221
+#: elf32-m32r.c:1226
 #, c-format
 msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
 msgstr "%s: la cible (%s) de la relocalisation %s est dans la mauvaise section (%s)"
 
-#: elf32-m32r.c:1947
+#: elf32-m32r.c:1952
 #, c-format
 msgid "%s: Instruction set mismatch with previous modules"
 msgstr "%s: jeu d'instructions ne concorde par avec les modules précédents"
 
-#: elf32-m32r.c:1970
+#: elf32-m32r.c:1975
 #, c-format
 msgid "private flags = %lx"
 msgstr "fanions privés = %lx"
 
-#: elf32-m32r.c:1975
+#: elf32-m32r.c:1980
 msgid ": m32r instructions"
 msgstr ": instructions m32r"
 
-#: elf32-m32r.c:1976
+#: elf32-m32r.c:1981
 msgid ": m32rx instructions"
 msgstr ": instruction m32rx"
 
-#: elf32-m68k.c:413
+#: elf32-m68hc1x.c:1217
+#, c-format
+msgid "Reference to the far symbol `%s' using a wrong relocation may result in incorrect execution"
+msgstr "Référence à un symbole far « %s » utilisant la mauvaise relocalisation peut provoquer une exécution incorrecte"
+
+#: elf32-m68hc1x.c:1240
+#, c-format
+msgid "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)"
+msgstr "banque d'adresses [%lx:%04lx] (%lx) n'es pas dans la même banque que la banque courante d'adresses [%lx:%04lx] (%lx)"
+
+#: elf32-m68hc1x.c:1259
+#, c-format
+msgid "reference to a banked address [%lx:%04lx] in the normal address space at %04lx"
+msgstr "référence à une banque d'adresses [%lx:%04lx] dans l'espace normal d'adresses à %04lx"
+
+#: elf32-m68hc1x.c:1396
+#, c-format
+msgid "%s: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers"
+msgstr "%s: fichiers liés compilés pour des entiers de 16 bits (-mshort) et d'autres pour des entiers de 32 bits"
+
+#: elf32-m68hc1x.c:1404
+#, c-format
+msgid "%s: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double"
+msgstr "%s: fichiers liés compilés pour des doubles de 32 bits (-fshort-double) et d'autres pour des doubles de 64 bits"
+
+#: elf32-m68hc1x.c:1414
+#, c-format
+msgid "%s: linking files compiled for HCS12 with others compiled for HC12"
+msgstr "%s: certains fichiers liés compilés pour HCS12 avec d'autres compilés pour HC12"
+
+#: elf32-m68hc1x.c:1462
+msgid "[abi=32-bit int, "
+msgstr "[abi=32-bit int, "
+
+#: elf32-m68hc1x.c:1464
+msgid "[abi=16-bit int, "
+msgstr "[abi=16-bit int, "
+
+#: elf32-m68hc1x.c:1467
+msgid "64-bit double, "
+msgstr "double de 64 bits, "
+
+#: elf32-m68hc1x.c:1469
+msgid "32-bit double, "
+msgstr "double de 32 bits, "
+
+#: elf32-m68hc1x.c:1472
+msgid "cpu=HC11]"
+msgstr "cpu=HC11]"
+
+#: elf32-m68hc1x.c:1474
+msgid "cpu=HCS12]"
+msgstr "cpu=HCS12]"
+
+#: elf32-m68hc1x.c:1476
+msgid "cpu=HC12]"
+msgstr "cpu=HC12]"
+
+#: elf32-m68hc1x.c:1479
+msgid " [memory=bank-model]"
+msgstr " [memory=bank-model]"
+
+#: elf32-m68hc1x.c:1481
+msgid " [memory=flat]"
+msgstr " [memory=flat]"
+
+#: elf32-m68k.c:400
 msgid " [cpu32]"
 msgstr " [cpu32]"
 
-#: elf32-m68k.c:416
+#: elf32-m68k.c:403
 msgid " [m68000]"
 msgstr " [m68000]"
 
-#: elf32-mcore.c:354 elf32-mcore.c:457
+#: elf32-mcore.c:353 elf32-mcore.c:456
 #, c-format
 msgid "%s: Relocation %s (%d) is not currently supported.\n"
 msgstr "%s: relocalisation %s (%d) n'est pas couramment supportée.\n"
 
-#: elf32-mcore.c:442
+#: elf32-mcore.c:441
 #, c-format
 msgid "%s: Unknown relocation type %d\n"
 msgstr "%s: type de relocalisation inconnue %d\n"
 
-#: elf32-mips.c:1152 elf64-mips.c:1783
+#: elf32-mips.c:1170 elf64-mips.c:1717 elfn32-mips.c:1664
 msgid "32bits gp relative relocation occurs for an external symbol"
 msgstr "relocalisation relative gp 32bits est survenue pour un symbole externe"
 
-#: elf32-mips.c:1301
+#: elf32-mips.c:1314 elf64-mips.c:1830 elfn32-mips.c:1783
 #, c-format
 msgid "Linking mips16 objects into %s format is not supported"
 msgstr "Édition de liens d'objets mips16 dans le format %s n'est pas supporté"
 
-#: elf32-ppc.c:1460
+#: elf32-ppc.c:2056
+#, c-format
+msgid "generic linker can't handle %s"
+msgstr "liaison générique ne peut traiter %s"
+
+#: elf32-ppc.c:2138
 #, c-format
 msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
 msgstr "%s: compilé avec -mrelocatable et fait l'édition de lien avec les modules compilés normalement"
 
-#: elf32-ppc.c:1468
+#: elf32-ppc.c:2147
 #, c-format
 msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
 msgstr "%s: compilé normalement et fait l'édition de lien avec les modules compilés avec -mrelocatable"
 
-#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
-#, c-format
-msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr "%s: utilise differents champs e_flags (0x%lx) que les modules précédents (0x%lx)"
-
-#: elf32-ppc.c:1592
-#, c-format
-msgid "%s: Unknown special linker type %d"
-msgstr "%s: type d'édition spécial de lien inconnu %d"
-
-#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
+#: elf32-ppc.c:3413
 #, c-format
 msgid "%s: relocation %s cannot be used when making a shared object"
 msgstr "%s: relocalisation %s ne peut être utilisée lors de la création d'un objet partagé"
 
-#: elf32-ppc.c:3126 elf64-ppc.c:5473
+#. It does not make sense to have a procedure linkage
+#. table entry for a local symbol.
+#: elf32-ppc.c:3619
+#, c-format
+msgid "%s(%s+0x%lx): %s reloc against local symbol"
+msgstr "%s(%s+0x%lx): %s relocalisation vers un symbole local"
+
+#: elf32-ppc.c:4862 elf64-ppc.c:7789
 #, c-format
 msgid "%s: unknown relocation type %d for symbol %s"
 msgstr "%s: type de relocalisation inconnue %d pour le symbole %s"
 
-#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
+#: elf32-ppc.c:5113
 #, c-format
-msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
+msgid "%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"
+msgstr "%s(%s+0x%lx): ajot non nulle sur la relocalisation %s vers « %s »"
+
+#: elf32-ppc.c:5399 elf32-ppc.c:5425 elf32-ppc.c:5484
+#, c-format
+msgid "%s: the target (%s) of a %s relocation is in the wrong output section (%s)"
 msgstr "%s: la cible (%s) d'une relocalisation %s est dans la mauvaise section de sortie (%s)"
 
-#: elf32-ppc.c:3619
+#: elf32-ppc.c:5539
 #, c-format
-msgid "%s: Relocation %s is not yet supported for symbol %s."
+msgid "%s: relocation %s is not yet supported for symbol %s."
 msgstr "%s: relocalisation %s n'est pas encore supporté pour le symbole %s."
 
-#: elf32-sh.c:1964
+#: elf32-ppc.c:5594 elf64-ppc.c:8461
+#, c-format
+msgid "%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
+msgstr "%s(%s+0x%lx): relocalisation %s sans solution vers le symbole « %s »"
+
+#: elf32-ppc.c:5644 elf64-ppc.c:8507
+#, c-format
+msgid "%s(%s+0x%lx): %s reloc against `%s': error %d"
+msgstr "%s(%s+0x%lx): %s relocalisation vers « %s »: erreur %d"
+
+#: elf32-ppc.c:5888
+#, c-format
+msgid "corrupt or empty %s section in %s"
+msgstr "section %s vide ou corrompue dans %s"
+
+#: elf32-ppc.c:5895
+#, c-format
+msgid "unable to read in %s section from %s"
+msgstr "incapable de lire dans la section %s à partir de %s"
+
+#: elf32-ppc.c:5901
+#, c-format
+msgid "corrupt %s section in %s"
+msgstr "section %s corrompue dans %s"
+
+#: elf32-ppc.c:5944
+#, c-format
+msgid "warning: unable to set size of %s section in %s"
+msgstr "AVERTISSEMENT: incapable d'initialiser la taille de la section %s dans %s"
+
+#: elf32-ppc.c:5994
+msgid "failed to allocate space for new APUinfo section."
+msgstr "échec d'allocation d'espace pour une nouvelle section APUinfo"
+
+#: elf32-ppc.c:6013
+msgid "failed to compute new APUinfo section."
+msgstr "échec d'évaluation de la nouvelle section APUinfo"
+
+#: elf32-ppc.c:6016
+msgid "failed to install new APUinfo section."
+msgstr "échec d'installation de la nouvelle section APUinfo"
+
+#: elf32-s390.c:2256 elf64-s390.c:2226
+#, c-format
+msgid "%s(%s+0x%lx): invalid instruction for TLS relocation %s"
+msgstr "%s(%s+0x%lx): instruction invalide pour la relocalisation TLS %s"
+
+#: elf32-sh.c:2103
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
 msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décalage pour R_SH_USES"
 
-#: elf32-sh.c:1976
+#: elf32-sh.c:2115
 #, c-format
 msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
 msgstr "%s: 0x%lx: AVERTISSEMENT: R_SH_USES pointe vers un insn inconnu 0x%x "
 
-#: elf32-sh.c:1993
+#: elf32-sh.c:2132
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
 msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décalage de chargement R_SH_USES"
 
-#: elf32-sh.c:2008
+#: elf32-sh.c:2147
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected reloc"
 msgstr "%s: 0x%lx: AVERTISSEMENT: ne peut repérer la relocalisation attendue"
 
-#: elf32-sh.c:2036
+#: elf32-sh.c:2175
 #, c-format
 msgid "%s: 0x%lx: warning: symbol in unexpected section"
 msgstr "%s: 0x%lx: AVERTISSEMENT: symbole dans une section inattendue"
 
-#: elf32-sh.c:2153
+#: elf32-sh.c:2300
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
 msgstr "%s: 0x%lx: AVERTISSEMENT: ne peut repérer le compteur de relocalisation attendu"
 
-#: elf32-sh.c:2162
+#: elf32-sh.c:2309
 #, c-format
 msgid "%s: 0x%lx: warning: bad count"
 msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décompte"
 
-#: elf32-sh.c:2550 elf32-sh.c:2926
+#: elf32-sh.c:2712 elf32-sh.c:3088
 #, c-format
 msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
 msgstr "%s: 0x%lx: erreur fatale: débordement de relocalisation lors de relâches"
 
-#: elf32-sh.c:4073 elf64-sh64.c:1576
+#: elf32-sh.c:4654 elf64-sh64.c:1585
 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
 msgstr "STO_SH5_ISA32 inattendu sur le symbole local n'est pas traité"
 
-#: elf32-sh.c:4284
+#: elf32-sh.c:4809
+#, c-format
+msgid "%s: unresolvable relocation against symbol `%s' from %s section"
+msgstr "%s: relocalisation sans solution vers le symbole « %s » à partir de la section %s"
+
+#: elf32-sh.c:4881
 #, c-format
 msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
 msgstr "%s: 0x%lx: fatal: cible de branchement non aligné pour une relocalisatin de type relax-support"
 
-#: elf32-sh64.c:203 elf64-sh64.c:2364
+#: elf32-sh.c:6627 elf64-alpha.c:4848
+#, c-format
+msgid "%s: TLS local exec code cannot be linked into shared objects"
+msgstr "%s: code exécutable local TLS ne peut être lié en objets partagés"
+
+#: elf32-sh64.c:221 elf64-sh64.c:2407
 #, c-format
 msgid "%s: compiled as 32-bit object and %s is 64-bit"
 msgstr "%s: compilé comme un objet de 32 bits et %s est de 64 bits"
 
-#: elf32-sh64.c:206 elf64-sh64.c:2367
+#: elf32-sh64.c:224 elf64-sh64.c:2410
 #, c-format
 msgid "%s: compiled as 64-bit object and %s is 32-bit"
 msgstr "%s: compilé comme un objet de 64 bits et %s est de 32 bits"
 
-#: elf32-sh64.c:208 elf64-sh64.c:2369
+#: elf32-sh64.c:226 elf64-sh64.c:2412
 #, c-format
 msgid "%s: object size does not match that of target %s"
 msgstr "%s: taille de l'objet ne concorde pas avec la taille de la cible %s"
 
-#: elf32-sh64.c:440 elf64-sh64.c:2941
+#: elf32-sh64.c:461 elf64-sh64.c:2990
 #, c-format
 msgid "%s: encountered datalabel symbol in input"
 msgstr "%s: rencontre du symbole d'une étiquette de donnée dans l'entrée"
 
-#: elf32-sh64.c:523
+#: elf32-sh64.c:544
 msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
 msgstr "Non concordance PTB: adresse SHmedia (bit 0 == 1)"
 
-#: elf32-sh64.c:526
+#: elf32-sh64.c:547
 msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
 msgstr "Non concordance PTA: adresse SHcompact (bit 0 == 0)"
 
-#: elf32-sh64.c:544
+#: elf32-sh64.c:565
 #, c-format
 msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
 msgstr "%s: ERREUR GAS: insn PTB inattendue avec R_SH_PT_16"
 
-#: elf32-sh64.c:593 elf64-sh64.c:1703
+#: elf32-sh64.c:614 elf64-sh64.c:1748
 #, c-format
 msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
 msgstr "%s: ERREUR: relocalisation non alignée type %d à %08x relocalisé`%08x\n"
 
-#: elf32-sh64.c:677
+#: elf32-sh64.c:698
 #, c-format
 msgid "%s: could not write out added .cranges entries"
 msgstr "%s: ne peut écrire en sortie des entrées .cranges"
 
-#: elf32-sh64.c:739
+#: elf32-sh64.c:760
 #, c-format
 msgid "%s: could not write out sorted .cranges entries"
 msgstr "%s: ne peut écrire en sortie des entrées .cranges"
 
-#: elf32-sparc.c:1535 elf64-sparc.c:2224
+#: elf32-sparc.c:2521 elf64-sparc.c:2314
 #, c-format
 msgid "%s: probably compiled without -fPIC?"
 msgstr "%s: probablement compilé sans -fPIC?"
 
-#: elf32-sparc.c:2002
+#: elf32-sparc.c:3348
 #, c-format
 msgid "%s: compiled for a 64 bit system and target is 32 bit"
 msgstr "%s: compilé pour un système à 64 bits et la cible est de 32 bits"
 
-#: elf32-sparc.c:2016
+#: elf32-sparc.c:3362
 #, c-format
 msgid "%s: linking little endian files with big endian files"
 msgstr ""
 "%s: édition de liens pour des fichiers en système à octets de poids faibles\n"
 "avec des fichiers pour des systèmes à octets de poids fort"
 
-#: elf32-v850.c:682
+#: elf32-v850.c:753
 #, c-format
 msgid "Variable `%s' cannot occupy in multiple small data regions"
 msgstr "Variable « %s » ne peut occuper de multiples petites régions de données"
 
-#: elf32-v850.c:685
+#: elf32-v850.c:756
 #, c-format
 msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
 msgstr "Variable « %s » peut seulement être dans une région de données petite, zéro ou minuscule"
 
-#: elf32-v850.c:688
+#: elf32-v850.c:759
 #, c-format
 msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
 msgstr "Variable « %s » ne peut être dans une région de données petite et zéro à la fois"
 
-#: elf32-v850.c:691
+#: elf32-v850.c:762
 #, c-format
 msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
 msgstr "Variable « %s » ne peut être dans une région de données petite et minuscule zéro à la fois"
 
-#: elf32-v850.c:694
+#: elf32-v850.c:765
 #, c-format
 msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
 msgstr "Variable « %s » ne peut être dans une région de données zéro et minuscule zéro à la fois"
 
-#: elf32-v850.c:1072
+#: elf32-v850.c:1144
 msgid "FAILED to find previous HI16 reloc\n"
 msgstr "ÉCHEC de repérage de la relocalisation précédente HI16\n"
 
-#: elf32-v850.c:1703
+#: elf32-v850.c:1789
 msgid "could not locate special linker symbol __gp"
 msgstr "ne peut repérer le symbole spécial d'édition de lien __gp"
 
-#: elf32-v850.c:1707
+#: elf32-v850.c:1793
 msgid "could not locate special linker symbol __ep"
 msgstr "ne peut repérer le symbole spécial d'édition de lien __ep"
 
-#: elf32-v850.c:1711
+#: elf32-v850.c:1797
 msgid "could not locate special linker symbol __ctbp"
 msgstr "ne peut repérer le symbole spécial d'édition de lien __ctbp"
 
-#: elf32-v850.c:1875
+#: elf32-v850.c:1963
 #, c-format
 msgid "%s: Architecture mismatch with previous modules"
 msgstr "%s: l'architecture ne concorde pas avec les modules précédents"
 
-#: elf32-v850.c:1895
+#: elf32-v850.c:1983
 #, c-format
 msgid "private flags = %lx: "
 msgstr "fanions privés = %lx"
 
-#: elf32-v850.c:1900
+#: elf32-v850.c:1988
 msgid "v850 architecture"
 msgstr "architecture v850"
 
-#: elf32-v850.c:1901
+#: elf32-v850.c:1989
 msgid "v850e architecture"
 msgstr "architecture v850e"
 
-#: elf32-v850.c:1902
-msgid "v850ea architecture"
-msgstr "architecture v850ea"
-
-#: elf32-vax.c:546
+#: elf32-vax.c:549
 msgid " [nonpic]"
 msgstr " [nonpic]"
 
-#: elf32-vax.c:549
+#: elf32-vax.c:552
 msgid " [d-float]"
 msgstr " [d-float]"
 
-#: elf32-vax.c:552
+#: elf32-vax.c:555
 msgid " [g-float]"
 msgstr " [g-float]"
 
-#: elf32-vax.c:674
+#: elf32-vax.c:663
 #, c-format
 msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
 msgstr "%s: AVERTISSEMENT: GOT ajouté de %ld vers « %s » ne concorde par avec le GOT ajouté de %ld"
 
-#: elf32-vax.c:1679
+#: elf32-vax.c:1667
 #, c-format
 msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
 msgstr "%s: AVERTISSEMENT: PLT ajouté de %d vers « %s » de la section %s ignoré"
 
-#: elf32-vax.c:1814
+#: elf32-vax.c:1802
 #, c-format
 msgid "%s: warning: %s relocation against symbol `%s' from %s section"
 msgstr "%s: AVERTISSEMENT: relocalisation %s vers le symbole « %s » de la section %s"
 
-#: elf32-vax.c:1820
+#: elf32-vax.c:1808
 #, c-format
 msgid "%s: warning: %s relocation to 0x%x from %s section"
 msgstr "%s: AVERTISSEMENT: relocalisation %s vers 0x%x de la section %s"
 
-#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
+#: elf32-xstormy16.c:462 elf32-ia64.c:2450 elf64-ia64.c:2450
 msgid "non-zero addend in @fptr reloc"
 msgstr "ajout non null dans la relocalisation @fptr"
 
-#: elf64-alpha.c:1097
+#: elf64-alpha.c:1108
 msgid "GPDISP relocation did not find ldah and lda instructions"
 msgstr "la relocalisation GPDISP n'a pas repéré les instructions ldah et lda"
 
-#: elf64-alpha.c:3675
+#: elf64-alpha.c:3731
 #, c-format
 msgid "%s: .got subsegment exceeds 64K (size %d)"
 msgstr "%s: le sous-segment .got excède 64K (taille %d)"
 
-#: elf64-alpha.c:4498 elf64-alpha.c:4510
+#: elf64-alpha.c:4602 elf64-alpha.c:4614
 #, c-format
 msgid "%s: gp-relative relocation against dynamic symbol %s"
 msgstr "%s: relocalisation relative gp vers le symbole dynamique %s"
 
-#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#: elf64-alpha.c:4640 elf64-alpha.c:4773
 #, c-format
 msgid "%s: pc-relative relocation against dynamic symbol %s"
 msgstr "%s: relocalisation relative au PC vers le symbole dynamique %s"
 
-#: elf64-alpha.c:4564
+#: elf64-alpha.c:4668
 #, c-format
 msgid "%s: change in gp: BRSGP %s"
 msgstr "%s: changé dans le GP: BRSGP %s"
 
-#: elf64-alpha.c:4589
+#: elf64-alpha.c:4693
 msgid "<unknown>"
 msgstr "<inconnu>"
 
-#: elf64-alpha.c:4594
+#: elf64-alpha.c:4698
 #, c-format
 msgid "%s: !samegp reloc against symbol without .prologue: %s"
 msgstr "%s: relocalisation !samegp vers le symbole sans .prologue: %s"
 
-#: elf64-alpha.c:4639
+#: elf64-alpha.c:4749
 #, c-format
 msgid "%s: unhandled dynamic relocation against %s"
 msgstr "%s: relocalisation dynamique non traitée vers %s"
 
-#: elf64-alpha.c:4752
+#: elf64-alpha.c:4832
 #, c-format
 msgid "%s: dtp-relative relocation against dynamic symbol %s"
 msgstr "%s: relocalisation relative dtp vers le symbole dynamique %s"
 
-#: elf64-alpha.c:4775
+#: elf64-alpha.c:4855
 #, c-format
 msgid "%s: tp-relative relocation against dynamic symbol %s"
 msgstr "%s: relocalisation relative tp vers le symbole dynamique %s"
 
-#: elf64-hppa.c:2080
+#: elf64-hppa.c:2086
 #, c-format
 msgid "stub entry for %s cannot load .plt, dp offset = %ld"
 msgstr "entrée du talon pour %s ne peut charger .plt, décalage dp = %ld"
 
-#: elf64-mmix.c:1002
+#: elf64-mmix.c:1032
 #, c-format
 msgid ""
 "%s: Internal inconsistency error for value for\n"
@@ -1364,46 +1559,46 @@ msgstr ""
 "%s: erreur d'inconsistence interne pour la valeur du registre global\n"
 " alloué à l'édition de lien: lié: 0x%lx%08lx != relâché: 0x%lx%08lx\n"
 
-#: elf64-mmix.c:1386
+#: elf64-mmix.c:1416
 #, c-format
 msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
 msgstr "%s: relocalisation base plus décalage vers le symbole registre: (inconnu) dans %s"
 
-#: elf64-mmix.c:1391
+#: elf64-mmix.c:1421
 #, c-format
 msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
 msgstr "%s: relocalisation base plus décalage vers le symbole registre: %s dans %s"
 
-#: elf64-mmix.c:1435
+#: elf64-mmix.c:1465
 #, c-format
 msgid "%s: register relocation against non-register symbol: (unknown) in %s"
 msgstr "%s: relocalisation de registre vers le symbole non-registre: (inconnu) dans %s"
 
-#: elf64-mmix.c:1440
+#: elf64-mmix.c:1470
 #, c-format
 msgid "%s: register relocation against non-register symbol: %s in %s"
 msgstr "%s: relocalisation de registre vers le symbole non-registre: %s dans %s"
 
-#: elf64-mmix.c:1477
+#: elf64-mmix.c:1507
 #, c-format
 msgid "%s: directive LOCAL valid only with a register or absolute value"
 msgstr "%s: directive LOCAL valide seulement avec un registre ou une valeur absolue"
 
-#: elf64-mmix.c:1505
+#: elf64-mmix.c:1535
 #, c-format
 msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
 msgstr "%s: directive LOCAL: registre $%ld n'est pas un registre local.  Premier registre global est $%ld."
 
-#: elf64-mmix.c:1965
+#: elf64-mmix.c:1994
 #, c-format
 msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
 msgstr "%s: erreur: multiple définitions de « %s »; début de %s est initialisé dans un précédent fichier lié\n"
 
-#: elf64-mmix.c:2024
+#: elf64-mmix.c:2053
 msgid "Register section has contents\n"
 msgstr "Registre de section contient\n"
 
-#: elf64-mmix.c:2186
+#: elf64-mmix.c:2216
 #, c-format
 msgid ""
 "Internal inconsistency: remaining %u != max %u.\n"
@@ -1412,578 +1607,621 @@ msgstr ""
 "Inconsistence interne: reste %u != max %u.\n"
 "  SVP rapporter cette anomalie."
 
-#: elf64-ppc.c:1669 libbfd.c:1435
+#: elf64-ppc.c:2388 libbfd.c:831
 #, c-format
 msgid "%s: compiled for a big endian system and target is little endian"
 msgstr ""
 "%s: compilé pour un système à octets de poids fort alors que la cible\n"
 "est un système à octets de poids faible"
 
-#: elf64-ppc.c:1671 libbfd.c:1437
+#: elf64-ppc.c:2391 libbfd.c:833
 #, c-format
 msgid "%s: compiled for a little endian system and target is big endian"
 msgstr ""
 "%s: compilé pour un système à octets de poids faible alors que la cible\n"
 "est un système à octets de poids fort"
 
-#: elf64-ppc.c:3610
+#: elf64-ppc.c:4857
 #, c-format
 msgid "%s: unexpected reloc type %u in .opd section"
 msgstr "%s: type inattendu de relocalisation %u dans la section .opd"
 
-#: elf64-ppc.c:3630
+#: elf64-ppc.c:4877
 #, c-format
 msgid "%s: .opd is not a regular array of opd entries"
 msgstr "%s: .opd n'est pas un tableau régulier d'entrées opd"
 
-#: elf64-ppc.c:3672
+#: elf64-ppc.c:4897
 #, c-format
 msgid "%s: undefined sym `%s' in .opd section"
 msgstr "%s: symbole « %s » indéfini dans la section .opd"
 
-#: elf64-ppc.c:4397
+#: elf64-ppc.c:6136
 #, c-format
 msgid "can't find branch stub `%s'"
 msgstr "ne peut repérer le talon de branchement « %s »"
 
-#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#: elf64-ppc.c:6175 elf64-ppc.c:6250
 #, c-format
 msgid "linkage table error against `%s'"
 msgstr "erreur de liaison de la table de liaison vers « %s »"
 
-#: elf64-ppc.c:4573
+#: elf64-ppc.c:6340
 #, c-format
 msgid "can't build branch stub `%s'"
 msgstr "ne peut construire un talon de branchement « %s »"
 
-#: elf64-ppc.c:5179
+#: elf64-ppc.c:7047
+msgid ".glink and .plt too far apart"
+msgstr ".glink et .plt trop éloignée"
+
+#: elf64-ppc.c:7135
 msgid "stubs don't match calculated size"
 msgstr "taille des talons ne concorde pas avec la taille calculée"
 
-#: elf64-ppc.c:5828
+#: elf64-ppc.c:7147
+#, c-format
+msgid ""
+"linker stubs in %u groups\n"
+"  branch       %lu\n"
+"  toc adjust   %lu\n"
+"  long branch  %lu\n"
+"  long toc adj %lu\n"
+"  plt call     %lu"
+msgstr ""
+"talons d'édition de liens dans les groupes %u\n"
+"  branchements         %lu\n"
+"  ajustements toc      %lu\n"
+"  long branchements    %lu\n"
+"  long ajustements toc %lu\n"
+"  appels plt           %lu"
+
+#: elf64-ppc.c:7723
+#, c-format
+msgid "%s(%s+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc"
+msgstr "%s(%s+0x%lx): TOC multiples et automatiques non supportés utilisant votre fichier crt; recompiler avec -mminimal-toc ou mettre à jour gcc"
+
+#: elf64-ppc.c:7731
+#, c-format
+msgid "%s(%s+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern"
+msgstr "%s(%s+0x%lx): optimisation soeurs des appels vers `%s' ne permet par de TOC multiples et automatiques; recompiler avec -mminimal-toc ou -fno-optimize-sibling-calls, ou rendre externe `%s'"
+
+#: elf64-ppc.c:8329
 #, c-format
-msgid "%s: Relocation %s is not supported for symbol %s."
+msgid "%s: relocation %s is not supported for symbol %s."
 msgstr "%s: relocalisation %s n'est pas supportée pour le symbole %s."
 
-#: elf64-ppc.c:5872
+#: elf64-ppc.c:8408
 #, c-format
-msgid "%s: error: relocation %s not a multiple of 4"
-msgstr "%s: erreur: relocalisation %s n'est pas un multiple de 4"
+msgid "%s: error: relocation %s not a multiple of %d"
+msgstr "%s: erreur: relocalisation %s n'est pas un multiple de %d"
 
-#: elf64-sparc.c:1280
+#: elf64-sparc.c:1370
 #, c-format
 msgid "%s: check_relocs: unhandled reloc type %d"
 msgstr "%s: check_relocs: type de relocalisation non traitée %d"
 
-#: elf64-sparc.c:1317
+#: elf64-sparc.c:1407
 #, c-format
 msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
 msgstr "%s: seuls les registres %%g[2367] peuvent être déclarés en utilisant les registres STT_REGISTER"
 
-#: elf64-sparc.c:1337
+#: elf64-sparc.c:1427
 #, c-format
 msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
 msgstr "Registre %%g%d utilisé de manière incompatible: %s dans %s précédemment %s dans %s"
 
-#: elf64-sparc.c:1360
+#: elf64-sparc.c:1450
 #, c-format
 msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
 msgstr "Symbole « %s » a des types qui diffèrent: REGISTRE dans %s, précédemment %s dans %s"
 
-#: elf64-sparc.c:1406
+#: elf64-sparc.c:1496
 #, c-format
 msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
 msgstr "Symbole « %s » a des types qui diffèrent: %s dans %s, précédemment REGISTRE dans %s"
 
-#: elf64-sparc.c:2970
+#: elf64-sparc.c:3053
 #, c-format
 msgid "%s: linking UltraSPARC specific with HAL specific code"
 msgstr "%s: édition de liens spécifiques pour UltraSPARC avec du code spécifique HAL"
 
-#: elfcode.h:1198
+#: elf64-x86-64.c:739
+#, c-format
+msgid "%s: %s' accessed both as normal and thread local symbol"
+msgstr "%s: %s symbole accédé à la fois comme normal et comme thread"
+
+#: elfcode.h:1113
 #, c-format
 msgid "%s: version count (%ld) does not match symbol count (%ld)"
 msgstr "%s: compteur de version (%ld) ne concorde pas avec le symbole du compteur (%ld)"
 
-#: elflink.c:440
+#: elfcode.h:1342
+#, c-format
+msgid "%s(%s): relocation %d has invalid symbol index %ld"
+msgstr "%s(%s): relocalisation %d a un index de symbole invalide %ld"
+
+#: elflink.c:1456
+#, c-format
+msgid "%s: warning: unexpected redefinition of indirect versioned symbol `%s'"
+msgstr "%s: AVERTISSEMENT: redéfinition inattendue du symbole indirect avec version « %s »"
+
+#: elflink.c:1807
 #, c-format
-msgid "%s: Section %s is too large to add hole of %ld bytes"
-msgstr "%s: section %s est trop grande pour ajouter un trou de %ld octets"
+msgid "%s: undefined versioned symbol name %s"
+msgstr "%s: nom symbole avec version indéfinie %s"
 
-#: elflink.h:1090
+#: elflink.c:2142
 #, c-format
-msgid "%s: warning: unexpected redefinition of `%s'"
-msgstr "%s: AVERTISSEMENT: redéfinition inattendue de « %s »"
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr "%s: taille de la relocalisation ne concorde pas dans %s section %s"
 
-#: elflink.h:1727
+#: elflink.c:2434
+#, c-format
+msgid "warning: type and size of dynamic symbol `%s' are not defined"
+msgstr "AVERTISSEMENT: type et taille du symbole dynamique « %s » ne sont pas définis"
+
+#: elflink.h:1022
 #, c-format
 msgid "%s: %s: invalid version %u (max %d)"
 msgstr "%s: %s: version invalide %u (max %d)"
 
-#: elflink.h:1768
+#: elflink.h:1063
 #, c-format
 msgid "%s: %s: invalid needed version %d"
 msgstr "%s: %s: version requise invalide %d"
 
-#: elflink.h:1890
+#: elflink.h:1238
 #, c-format
-msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
-msgstr "AVERTISSEMENT: taille du symbole « %s » a changé de %lu à %lu dans %s"
+msgid "Warning: alignment %u of symbol `%s' in %s is smaller than %u in %s"
+msgstr "AVERTISSEMENT: alignement %u du symbole « %s » ans %s est plus petit que %u dans %s"
 
-#: elflink.h:3174
+#: elflink.h:1252
 #, c-format
-msgid "%s: .preinit_array section is not allowed in DSO"
-msgstr "%s: section .preinit_array n'est pas permise dans DSO"
+msgid "Warning: size of symbol `%s' changed from %lu in %s to %lu in %s"
+msgstr "AVERTISSEMENT: taille du symbole « %s » a changé de %lu dans %s à %lu dans %s"
 
-#: elflink.h:4030
+#: elflink.h:2160
 #, c-format
-msgid "warning: type and size of dynamic symbol `%s' are not defined"
-msgstr "AVERTISSEMENT: type et taille du symbole dynamique « %s » ne sont pas définis"
+msgid "%s: undefined version: %s"
+msgstr "%s: version non définie: %s"
 
-#: elflink.h:4345
+#: elflink.h:2226
 #, c-format
-msgid "%s: undefined versioned symbol name %s"
-msgstr "%s: nom symbole avec version indéfinie %s"
-
-#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
-msgid "Error: out of memory"
-msgstr "Erreur: mémoire épuisée"
+msgid "%s: .preinit_array section is not allowed in DSO"
+msgstr "%s: section .preinit_array n'est pas permise dans DSO"
 
-#: elflink.h:4781
+#: elflink.h:3078
 msgid "Not enough memory to sort relocations"
 msgstr "Pas assez de mémoire pour effectuer le trie des relocalisations"
 
-#: elflink.h:5682 elflink.h:5725
+#: elflink.h:3958 elflink.h:4001
 #, c-format
 msgid "%s: could not find output section %s"
 msgstr "%s: ne peut repérer la section de sortie %s"
 
-#: elflink.h:5688
+#: elflink.h:3964
 #, c-format
 msgid "warning: %s section has zero size"
 msgstr "AVERTISSEMENT: section %s a une taille nulle"
 
-#: elflink.h:6275
+#: elflink.h:4483
+#, c-format
+msgid "%s: %s symbol `%s' in %s is referenced by DSO"
+msgstr "%s: %s symbole « %s » in %s est référencé par DSO"
+
+#: elflink.h:4564
 #, c-format
 msgid "%s: could not find output section %s for input section %s"
 msgstr "%s: ne peut repérer la section de sortie %s pour la section d'entrée %s"
 
-#: elflink.h:6486
+#: elflink.h:4666
 #, c-format
-msgid "%s: relocation size mismatch in %s section %s"
-msgstr "%s: taille de la relocalisation ne concorde pas dans %s section %s"
-
-#: elflink.h:6849
-msgid "warning: relocation against removed section; zeroing"
-msgstr "AVERTISSEMENT: relocalisation vers une section qui a été enlevée; mise à zéro"
+msgid "%s: %s symbol `%s' isn't defined"
+msgstr "%s: %s symbole « %s » n'est pas défini"
 
-#: elflink.h:6879
-msgid "warning: relocation against removed section"
-msgstr "AVERTISSEMENT: relocalisation vers une section enlevée"
+#: elflink.h:5053 elflink.h:5095
+msgid "%T: discarded in section `%s' from %s\n"
+msgstr "%T: mis de côté dans la section « %s » à partir de %s\n"
 
-#: elflink.h:6892
-#, c-format
-msgid "local symbols in discarded section %s"
-msgstr "symboles locaux de la section mise à l'écart %s"
-
-#: elfxx-mips.c:734
+#: elfxx-mips.c:887
 msgid "static procedure (no name)"
 msgstr "procédure statique (sans name)"
 
-#: elfxx-mips.c:1601
+#: elfxx-mips.c:1897
 msgid "not enough GOT space for local GOT entries"
 msgstr "pas suffisamment d'espace GOT pour les entrées locales GOT"
 
-#: elfxx-mips.c:2750
+#: elfxx-mips.c:3691
 #, c-format
 msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
 msgstr "%s: %s+0x%lx: saut vers la routine dans la partie du talon (stub) qui n'est pas jal"
 
-#: elfxx-mips.c:4270
+#: elfxx-mips.c:5192
 #, c-format
 msgid "%s: Malformed reloc detected for section %s"
 msgstr "%s: relocalisation mal composée détectée dans la section %s"
 
-#: elfxx-mips.c:4348
+#: elfxx-mips.c:5266
 #, c-format
 msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
 msgstr "%s: appel CALL16 de relocalisation à 0x%lx qui n'est pas pourun symbole global"
 
-#: elfxx-mips.c:7301
+#: elfxx-mips.c:8692
 #, c-format
 msgid "%s: illegal section name `%s'"
 msgstr "%s: nom illégal de section « %s »"
 
-#: elfxx-mips.c:7615
+#: elfxx-mips.c:9025
+#, c-format
+msgid "%s: endianness incompatible with that of the selected emulation"
+msgstr "%s: système de poids fort ou faible incompatible avec celui sélectionné pour l'émulation"
+
+#: elfxx-mips.c:9037
 #, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s: édition de liens des fichiers PIC avec des fichiers non PIC"
+msgid "%s: ABI is incompatible with that of the selected emulation"
+msgstr "%s: ABI est incompatible avec celui sélectionné pour l'émulation"
 
-#: elfxx-mips.c:7625
+#: elfxx-mips.c:9104
 #, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
-msgstr "%s: édition de liens des fichier abicalls avec des fichiers non abicalls"
+msgid "%s: warning: linking PIC files with non-PIC files"
+msgstr "%s: AVERTISSEMENT: édition de liens des fichiers PIC avec des fichiers non PIC"
 
-#: elfxx-mips.c:7654
+#: elfxx-mips.c:9121
 #, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%s: ISA ne concorde pas (-mips%d) avec les modules précédents (-mips%d)"
+msgid "%s: linking 32-bit code with 64-bit code"
+msgstr "%s: édition de liens de code de 32 bits avec du code de 64 bits"
 
-#: elfxx-mips.c:7676
+#: elfxx-mips.c:9149
 #, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%s: ISA ne concorde pas (%d) avec les modules précédents (%d)"
+msgid "%s: linking %s module with previous %s modules"
+msgstr "%s: édition de liens du module %s avec les modules précédents %s"
 
-#: elfxx-mips.c:7699
+#: elfxx-mips.c:9172
 #, c-format
 msgid "%s: ABI mismatch: linking %s module with previous %s modules"
 msgstr "%s: ABI ne concorde pas: édition de lien du module %s avec les modules précédents %s"
 
-#: elfxx-mips.c:7759
+#: elfxx-mips.c:9241
 msgid " [abi=O32]"
 msgstr " [abi=O32]"
 
-#: elfxx-mips.c:7761
+#: elfxx-mips.c:9243
 msgid " [abi=O64]"
 msgstr " [abi=O64]"
 
-#: elfxx-mips.c:7763
+#: elfxx-mips.c:9245
 msgid " [abi=EABI32]"
 msgstr " [abi=EABI32]"
 
-#: elfxx-mips.c:7765
+#: elfxx-mips.c:9247
 msgid " [abi=EABI64]"
 msgstr " [abi=EABI64]"
 
-#: elfxx-mips.c:7767
+#: elfxx-mips.c:9249
 msgid " [abi unknown]"
 msgstr " [abi inconnu]"
 
-#: elfxx-mips.c:7769
+#: elfxx-mips.c:9251
 msgid " [abi=N32]"
 msgstr " [abi=N32]"
 
-#: elfxx-mips.c:7771
+#: elfxx-mips.c:9253
 msgid " [abi=64]"
 msgstr " [abi=64]"
 
-#: elfxx-mips.c:7773
+#: elfxx-mips.c:9255
 msgid " [no abi set]"
 msgstr " [aucun jeu abi]"
 
-#: elfxx-mips.c:7776
+#: elfxx-mips.c:9258
 msgid " [mips1]"
 msgstr " [mips1]"
 
-#: elfxx-mips.c:7778
+#: elfxx-mips.c:9260
 msgid " [mips2]"
 msgstr " [mips2]"
 
-#: elfxx-mips.c:7780
+#: elfxx-mips.c:9262
 msgid " [mips3]"
 msgstr " [mips3]"
 
-#: elfxx-mips.c:7782
+#: elfxx-mips.c:9264
 msgid " [mips4]"
 msgstr " [mips4]"
 
-#: elfxx-mips.c:7784
+#: elfxx-mips.c:9266
 msgid " [mips5]"
 msgstr " [mips5]"
 
-#: elfxx-mips.c:7786
+#: elfxx-mips.c:9268
 msgid " [mips32]"
 msgstr " [mips32]"
 
-#: elfxx-mips.c:7788
+#: elfxx-mips.c:9270
 msgid " [mips64]"
 msgstr " [mips64]"
 
-#: elfxx-mips.c:7790
+#: elfxx-mips.c:9272
+msgid " [mips32r2]"
+msgstr " [mips32r2]"
+
+#: elfxx-mips.c:9274
 msgid " [unknown ISA]"
 msgstr " [ISA inconnu]"
 
-#: elfxx-mips.c:7793
+#: elfxx-mips.c:9277
 msgid " [mdmx]"
 msgstr " [mdmx]"
 
-#: elfxx-mips.c:7796
+#: elfxx-mips.c:9280
 msgid " [mips16]"
 msgstr " [mips16]"
 
-#: elfxx-mips.c:7799
+#: elfxx-mips.c:9283
 msgid " [32bitmode]"
 msgstr " [mode 32 bits]"
 
-#: elfxx-mips.c:7801
+#: elfxx-mips.c:9285
 msgid " [not 32bitmode]"
 msgstr " [aucun mode 32 bits]"
 
-#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
+#: i386linux.c:457 m68klinux.c:461 sparclinux.c:458
 #, c-format
 msgid "Output file requires shared library `%s'\n"
 msgstr "La sortie requiert une ilbrairie partagée « %s »\n"
 
-#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
+#: i386linux.c:465 m68klinux.c:469 sparclinux.c:466
 #, c-format
 msgid "Output file requires shared library `%s.so.%s'\n"
 msgstr "Le fichier de sortie requiert une librairie partagée « %s.so.%s »\n"
 
-#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
-#: sparclinux.c:657 sparclinux.c:707
+#: i386linux.c:654 i386linux.c:704 m68klinux.c:661 m68klinux.c:709
+#: sparclinux.c:656 sparclinux.c:706
 #, c-format
 msgid "Symbol %s not defined for fixups\n"
 msgstr "Symbole %s n'est pas défini pour les corrections\n"
 
-#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
+#: i386linux.c:728 m68klinux.c:733 sparclinux.c:730
 msgid "Warning: fixup count mismatch\n"
 msgstr "AVERTISSEMENT: correction du compteur qui ne concordait pas\n"
 
-#: ieee.c:235
+#: ieee.c:293
 #, c-format
 msgid "%s: string too long (%d chars, max 65535)"
 msgstr "%s: chaîne trop longue (%d caractères, max 65535)"
 
-#: ieee.c:365
+#: ieee.c:428
 #, c-format
 msgid "%s: unrecognized symbol `%s' flags 0x%x"
 msgstr "%s: symbole non reconnue « %s » fanions 0x%x"
 
-#: ieee.c:877
+#: ieee.c:938
 #, c-format
 msgid "%s: unimplemented ATI record %u for symbol %u"
 msgstr "%s: enregistrement ATI non implanté %u pour le symbole %u"
 
-#: ieee.c:902
+#: ieee.c:963
 #, c-format
 msgid "%s: unexpected ATN type %d in external part"
 msgstr "%s: type ATN inattendu %d dans la partie externe"
 
-#: ieee.c:924
+#: ieee.c:985
 #, c-format
 msgid "%s: unexpected type after ATN"
 msgstr "%s: type inattendu après ATN"
 
-#: ihex.c:258
+#: ihex.c:264
 #, c-format
 msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
 msgstr "%s:%d: caractères inattendue « %s » dans le fichier Intel hexadécimal\n"
 
-#: ihex.c:366
+#: ihex.c:372
 #, c-format
 msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
 msgstr "%s:%u: somme de contrôle erronée dans le fichier Intel hexadécimal (attendu %u, obtenu %u)"
 
-#: ihex.c:420
+#: ihex.c:426
 #, c-format
 msgid "%s:%u: bad extended address record length in Intel Hex file"
 msgstr "%s:%u: longueur erronée de l'enregistrement d'adresse étendue dans le fichier Intel hexadécimal"
 
-#: ihex.c:437
+#: ihex.c:443
 #, c-format
 msgid "%s:%u: bad extended start address length in Intel Hex file"
 msgstr "%s:%u: longueur erronée d'adresse étendue de début dans le fichier Intel hexadécimal"
 
-#: ihex.c:454
+#: ihex.c:460
 #, c-format
 msgid "%s:%u: bad extended linear address record length in Intel Hex file"
 msgstr "%s:%u: longueur erronée de l'enregistrement d'adresse étendue linéaire dans le fichier Intel hexadécimal"
 
-#: ihex.c:471
+#: ihex.c:477
 #, c-format
 msgid "%s:%u: bad extended linear start address length in Intel Hex file"
 msgstr "%s:%u: longueur erronée d'adresse étendue linéraire de début dans le fichier Intel hexadécimal"
 
-#: ihex.c:488
+#: ihex.c:494
 #, c-format
 msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
 msgstr "%s:%u: type ihex non reconnu %u dans le fichier Intel hexadécimal\n"
 
-#: ihex.c:607
+#: ihex.c:619
 #, c-format
 msgid "%s: internal error in ihex_read_section"
 msgstr "%s: erreur interne dans ihex_read_section"
 
-#: ihex.c:642
+#: ihex.c:654
 #, c-format
 msgid "%s: bad section length in ihex_read_section"
 msgstr "%s: longuer erronée de section dans ihex_read_section"
 
-#: ihex.c:860
+#: ihex.c:872
 #, c-format
 msgid "%s: address 0x%s out of range for Intel Hex file"
 msgstr "%s: adresse 0x%s hors gamme pour le fichier Intel hexadécimal"
 
-#: libbfd.c:492
-#, c-format
-msgid "not mapping: data=%lx mapped=%d\n"
-msgstr "pas de table de projection: données=%lx adresse de la table=%d\n"
-
-#: libbfd.c:495
-msgid "not mapping: env var not set\n"
-msgstr "pas de table de projection: variable d'environnement pas initialisée\n"
-
-#: libbfd.c:1466
+#: libbfd.c:861
 #, c-format
 msgid "Deprecated %s called at %s line %d in %s\n"
 msgstr "%s déprécié appelé à %s dans la ligne %d dans %s\n"
 
-#: libbfd.c:1469
+#: libbfd.c:864
 #, c-format
 msgid "Deprecated %s called\n"
 msgstr "%s appel déprécié\n"
 
-#: linker.c:1873
+#: linker.c:1829
 #, c-format
 msgid "%s: indirect symbol `%s' to `%s' is a loop"
 msgstr "%s: symbole indirect « %s » vers « %s » est une boucle"
 
-#: linker.c:2776
+#: linker.c:2697
 #, c-format
-msgid "Attempt to do relocateable link with %s input and %s output"
+msgid "Attempt to do relocatable link with %s input and %s output"
 msgstr "Tentative de relocalisation d'un lien avec %s à l'entrée et %s à la sortie"
 
-#: merge.c:892
+#: merge.c:896
 #, c-format
 msgid "%s: access beyond end of merged section (%ld + %ld)"
 msgstr "%s: accès au-delà de la fin de la section fusionnée (%ld + %ld)"
 
-#: mmo.c:460
+#: mmo.c:503
 #, c-format
 msgid "%s: No core to allocate section name %s\n"
 msgstr "%s: pas de corps pour allouer un nom de section %s\n"
 
-#: mmo.c:536
+#: mmo.c:579
 #, c-format
 msgid "%s: No core to allocate a symbol %d bytes long\n"
 msgstr "%s: pas de corps pour allouer un symbole %d octets de longueur\n"
 
-#: mmo.c:1245
+#: mmo.c:1287
 #, c-format
 msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
 msgstr "%s: fichier mmo invalide: valeur d'initialisation pour $255 n'est pas « Main »\n"
 
-#: mmo.c:1391
+#: mmo.c:1433
 #, c-format
 msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
 msgstr "%s: séquence de caractères large 0x%02X 0x%02X non supportée après le nom de symbole débutant avec « %s »\n"
 
-#: mmo.c:1633
+#: mmo.c:1674
 #, c-format
 msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
 msgstr "%s: fichier mmo invalide: lopcode non supporté « %d »\n"
 
-#: mmo.c:1643
+#: mmo.c:1684
 #, c-format
 msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
 msgstr "%s: fichier mmo invalide: attendu YZ = 1 obtenu YZ = %d pour lop_quote\n"
 
-#: mmo.c:1679
+#: mmo.c:1720
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
 msgstr "%s: fichier mmo invalide: attendu z = 1 ou z = 2, obtenu z = %d pour lop_loc\n"
 
-#: mmo.c:1725
+#: mmo.c:1766
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
 msgstr "%s: fichier mmo invalide: attendu z = 1 ou z = 2, obtenu z = %d pour lop_fixo\n"
 
-#: mmo.c:1764
+#: mmo.c:1805
 #, c-format
 msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
 msgstr "%s: fichier mmo invalide: attendu y = 0, obtenu y = %d pour lop_fixrx\n"
 
-#: mmo.c:1773
+#: mmo.c:1814
 #, c-format
 msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
 msgstr "%s: fichier mmo invalide: attendu z = 16 ou z = 24, obtenu z = %d pour lop_fixrx\n"
 
-#: mmo.c:1796
+#: mmo.c:1837
 #, c-format
 msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
 msgstr "%s: fichier mmo invalide: octet de tête du mot de l'opérande doit être 0 ou 1, obtenu %d pour lop_fixrx\n"
 
-#: mmo.c:1819
+#: mmo.c:1860
 #, c-format
 msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
 msgstr "%s: ne allouer un nom de ficheir pour le no. de fichier %d, %d octets\n"
 
-#: mmo.c:1839
+#: mmo.c:1880
 #, c-format
 msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
 msgstr "%s: fichier mmo invalide: no. de fichier %d « %s », a déjà été entré comme « %s »\n"
 
-#: mmo.c:1852
+#: mmo.c:1893
 #, c-format
 msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
 msgstr "%s: fichier mmo invalide: nom de fichier %d n'a pas été spécifié avant son utilisation\n"
 
-#: mmo.c:1958
+#: mmo.c:1999
 #, c-format
 msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
 msgstr "%s: fichier mmo invalide: champs y et z de lop_stab non null, y: %d, z: %d\n"
 
-#: mmo.c:1994
+#: mmo.c:2035
 #, c-format
 msgid "%s: invalid mmo file: lop_end not last item in file\n"
 msgstr "%s: fichier mmo invalide: lop_end N,est pas le dernier item dans le fichier\n"
 
-#: mmo.c:2007
+#: mmo.c:2048
 #, c-format
 msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
 msgstr "%s: fichier mmo invalide: YZ de lop_end (%ld) n'est pas égal au nombre de teras du lop_stab précédent (%ld)\n"
 
-#: mmo.c:2670
+#: mmo.c:2698
 #, c-format
 msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
 msgstr "%s: table de symboles invalides: duplication du symbole « %s »\n"
 
-#: mmo.c:2921
+#: mmo.c:2949
 #, c-format
 msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
 msgstr "%s: définition de symbole erronée: « Main » initialisé à %s au lieu de l'adresse de départ %s\n"
 
-#: mmo.c:3011
+#: mmo.c:3039
 #, c-format
 msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
 msgstr "%s: avertissement: table de symboles trop grande pour mmo, plus grande que 65535 mots de 32 bits: %d. Seul « Main » sera produit.\n"
 
-#: mmo.c:3056
+#: mmo.c:3084
 #, c-format
 msgid "%s: internal error, symbol table changed size from %d to %d words\n"
 msgstr "%s: erreur interne, table de symbole a changé de taille de %d à %d mots\n"
 
-#: mmo.c:3111
+#: mmo.c:3139
 #, c-format
 msgid "%s: internal error, internal register section %s had contents\n"
 msgstr "%s: erreur interne, registre interne de section %s a du contenu\n"
 
-#: mmo.c:3163
+#: mmo.c:3191
 #, c-format
 msgid "%s: no initialized registers; section length 0\n"
 msgstr "%s: pas de registres initialisés; section de longeur 0\n"
 
-#: mmo.c:3169
+#: mmo.c:3197
 #, c-format
 msgid "%s: too many initialized registers; section length %ld\n"
 msgstr "%s: trop de resigstres initialisés; longueur de section %ld\n"
 
-#: mmo.c:3174
+#: mmo.c:3202
 #, c-format
 msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
 msgstr "%s: adresse de départ invalide pour des registres initialisés de longueur %ld: 0x%lx%08lx\n"
 
-#: oasys.c:1029
+#: oasys.c:1052
 #, c-format
 msgid "%s: can not represent section `%s' in oasys"
 msgstr "%s: ne peut représenter la section « %s » dans oasis"
 
-#: osf-core.c:132
+#: osf-core.c:137
 #, c-format
 msgid "Unhandled OSF/1 core file section type %d\n"
 msgstr "Type de section de fichier core OSF/1 non traité %d\n"
 
-#: pe-mips.c:658
+#: pe-mips.c:659
 #, c-format
 msgid "%s: `ld -r' not supported with PE MIPS objects\n"
 msgstr "%s: « ld -r » non supporté avec les objets PE MIPS\n"
@@ -1993,53 +2231,53 @@ msgstr "%s: 
 #. mem = pointer to memory we're fixing up
 #. val = VMA of what we need to refer to
 #.
-#: pe-mips.c:794
+#: pe-mips.c:795
 #, c-format
 msgid "%s: unimplemented %s\n"
 msgstr "%s: non implanté %s\n"
 
-#: pe-mips.c:820
+#: pe-mips.c:821
 #, c-format
 msgid "%s: jump too far away\n"
 msgstr "%s: le saut va trop loin\n"
 
-#: pe-mips.c:847
+#: pe-mips.c:848
 #, c-format
 msgid "%s: bad pair/reflo after refhi\n"
 msgstr "%s: pairage erronée pair/reflo après refhi\n"
 
 #. XXX code yet to be written.
-#: peicode.h:785
+#: peicode.h:787
 #, c-format
 msgid "%s: Unhandled import type; %x"
 msgstr "%s: type d'importation non traitée; %x"
 
-#: peicode.h:790
+#: peicode.h:792
 #, c-format
 msgid "%s: Unrecognised import type; %x"
 msgstr "%s: type d'importation non reconnu; %x"
 
-#: peicode.h:804
+#: peicode.h:806
 #, c-format
 msgid "%s: Unrecognised import name type; %x"
 msgstr "%s: type de nom d'importation non reconnu: %x"
 
-#: peicode.h:1162
+#: peicode.h:1164
 #, c-format
 msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
 msgstr "%s: type de machine non reconnue (0x%x) dans l'archive de librairie d'importation"
 
-#: peicode.h:1174
+#: peicode.h:1176
 #, c-format
 msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
 msgstr "%s: type de machine reconnue mais non traitée (0x%x) dans l'archive da la librairie de formats d'importation"
 
-#: peicode.h:1191
+#: peicode.h:1193
 #, c-format
 msgid "%s: size field is zero in Import Library Format header"
 msgstr "%s: taille du champ est zéro dans l'en-tête de la librairie de formats d'importation"
 
-#: peicode.h:1219
+#: peicode.h:1224
 #, c-format
 msgid "%s: string not null terminated in ILF object file."
 msgstr "%s: chaîne n'est pas terminée par un nulle dans le fichier objet ILF."
@@ -2096,11 +2334,11 @@ msgstr "Secteur de la partition[%d] = 0x%.8lx (%ld)\n"
 msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
 msgstr "Longueur de la partition[%d] = 0x%.8lx (%ld)\n"
 
-#: som.c:5398
+#: som.c:5422
 msgid "som_sizeof_headers unimplemented"
 msgstr "som_sizeof_headers non implanté"
 
-#: srec.c:301
+#: srec.c:302
 #, c-format
 msgid "%s:%d: Unexpected character `%s' in S-record file\n"
 msgstr "%s:%d: caractère inattendue « %s » dans le fichier S-record\n"
@@ -2110,7 +2348,7 @@ msgstr "%s:%d: caract
 msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
 msgstr "%s(%s+0x%lx): entrée des talons a une chaîne index invalide"
 
-#: syms.c:1044
+#: syms.c:1019
 msgid "Unsupported .stab relocation"
 msgstr "Relocalisation du .stab non supporté"
 
@@ -2129,33 +2367,33 @@ msgstr "bfd_set_section_flags (%s, %x) a 
 msgid "Size mismatch section %s=%lx, %s=%lx"
 msgstr "Taille de section ne concorde pas %s=%lx, %s=%lx"
 
-#: vms-gsd.c:702
+#: vms-gsd.c:704
 #, c-format
 msgid "unknown gsd/egsd subtype %d"
 msgstr "sous type gsd/egsd inconnu %d"
 
-#: vms-hdr.c:406
+#: vms-hdr.c:408
 msgid "Object module NOT error-free !\n"
 msgstr "Module objet N'EST PAS sans erreur !\n"
 
-#: vms-misc.c:543
+#: vms-misc.c:541
 #, c-format
 msgid "Stack overflow (%d) in _bfd_vms_push"
 msgstr "Débordement de la pile (%d) dans _bfd_vms_push"
 
-#: vms-misc.c:561
+#: vms-misc.c:559
 msgid "Stack underflow in _bfd_vms_pop"
 msgstr "Sous dépilage de la pile dans _bfd_vms_pop"
 
-#: vms-misc.c:919
+#: vms-misc.c:918
 msgid "_bfd_vms_output_counted called with zero bytes"
 msgstr "_bfd_vms_output_counted appelé avec un compte de zéro octet"
 
-#: vms-misc.c:924
+#: vms-misc.c:923
 msgid "_bfd_vms_output_counted called with too many bytes"
 msgstr "_bfd_vms_output_counted appelé avec trop d'octets"
 
-#: vms-misc.c:1055
+#: vms-misc.c:1054
 #, c-format
 msgid "Symbol %s replaced by %s\n"
 msgstr "Symbole %s remplacé par %s\n"
@@ -2165,26 +2403,26 @@ msgstr "Symbole %s remplac
 msgid "failed to enter %s"
 msgstr "échec d'insertion de %s"
 
-#: vms-tir.c:81
+#: vms-tir.c:102
 msgid "No Mem !"
 msgstr "Mémoire épuisée!"
 
-#: vms-tir.c:362
+#: vms-tir.c:383
 #, c-format
 msgid "bad section index in %s"
 msgstr "index de section erronée dans %s"
 
-#: vms-tir.c:375
+#: vms-tir.c:396
 #, c-format
 msgid "unsupported STA cmd %s"
 msgstr "commande STA non supportée %s"
 
-#: vms-tir.c:380 vms-tir.c:1240
+#: vms-tir.c:401 vms-tir.c:1261
 #, c-format
 msgid "reserved STA cmd %d"
 msgstr "commande STA réservée %d"
 
-#: vms-tir.c:491 vms-tir.c:514
+#: vms-tir.c:512 vms-tir.c:535
 #, c-format
 msgid "%s: no symbol \"%s\""
 msgstr "%s: pas de symbole \"%s\""
@@ -2193,39 +2431,39 @@ msgstr "%s: pas de symbole \"%s\""
 #. rotate
 #. Redefine symbol to current location.
 #. Define a literal.
-#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
-#: vms-tir.c:838 vms-tir.c:1563
+#: vms-tir.c:602 vms-tir.c:714 vms-tir.c:824 vms-tir.c:842 vms-tir.c:850
+#: vms-tir.c:859 vms-tir.c:1584
 #, c-format
 msgid "%s: not supported"
 msgstr "%s: pas supporté"
 
-#: vms-tir.c:586 vms-tir.c:1418
+#: vms-tir.c:607 vms-tir.c:1439
 #, c-format
 msgid "%s: not implemented"
 msgstr "%s: non implanté"
 
-#: vms-tir.c:590 vms-tir.c:1422
+#: vms-tir.c:611 vms-tir.c:1443
 #, c-format
 msgid "reserved STO cmd %d"
 msgstr "commande STO réservée %d"
 
-#: vms-tir.c:708 vms-tir.c:1568
+#: vms-tir.c:729 vms-tir.c:1589
 #, c-format
 msgid "reserved OPR cmd %d"
 msgstr "commande OPR réservée %d"
 
-#: vms-tir.c:776 vms-tir.c:1632
+#: vms-tir.c:797 vms-tir.c:1653
 #, c-format
 msgid "reserved CTL cmd %d"
 msgstr "commande CTL réservée %d"
 
 #. stack byte from image
 #. arg: none.
-#: vms-tir.c:1148
+#: vms-tir.c:1169
 msgid "stack-from-image not implemented"
 msgstr "pile depuis l'image non implanté"
 
-#: vms-tir.c:1166
+#: vms-tir.c:1187
 msgid "stack-entry-mask not fully implemented"
 msgstr "masque de pile d'entrée pas complètement implanté"
 
@@ -2236,263 +2474,273 @@ msgstr "masque de pile d'entr
 #.
 #. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
 #. and stack TRUE (args match) or FALSE (args dont match) value.
-#: vms-tir.c:1180
+#: vms-tir.c:1201
 msgid "PASSMECH not fully implemented"
 msgstr "PASSMECH pas complètement implanté"
 
-#: vms-tir.c:1199
+#: vms-tir.c:1220
 msgid "stack-local-symbol not fully implemented"
 msgstr "symbole local de pile pas complètement implanté"
 
-#: vms-tir.c:1212
+#: vms-tir.c:1233
 msgid "stack-literal not fully implemented"
 msgstr "litéral de pile pas complètement implanté"
 
-#: vms-tir.c:1233
+#: vms-tir.c:1254
 msgid "stack-local-symbol-entry-point-mask not fully implemented"
 msgstr "masque du symbole local de point d'entrée de pile pas complètement implanté"
 
-#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
-#: vms-tir.c:1619 vms-tir.c:1627
+#: vms-tir.c:1531 vms-tir.c:1543 vms-tir.c:1555 vms-tir.c:1567 vms-tir.c:1632
+#: vms-tir.c:1640 vms-tir.c:1648
 #, c-format
 msgid "%s: not fully implemented"
 msgstr "%s: pas complètement implanté"
 
-#: vms-tir.c:1684
+#: vms-tir.c:1705
 #, c-format
 msgid "obj code %d not found"
 msgstr "code objet %d non repéré"
 
-#: vms-tir.c:2019
+#: vms-tir.c:2043
 #, c-format
 msgid "SEC_RELOC with no relocs in section %s"
 msgstr "SEC_RELOC sans relocalisation dans la section %s"
 
-#: vms-tir.c:2307
+#: vms-tir.c:2331
 #, c-format
 msgid "Unhandled relocation %s"
 msgstr "Relocalisation non traitée: %s"
 
-#: xcofflink.c:1243
+#: xcofflink.c:1244
 #, c-format
 msgid "%s: `%s' has line numbers but no enclosing section"
 msgstr "%s: « %s » contient des numéros de lignes mais de section de fermeture"
 
-#: xcofflink.c:1296
+#: xcofflink.c:1297
 #, c-format
 msgid "%s: class %d symbol `%s' has no aux entries"
 msgstr "%s: classe %d symbole « %s » n'a pas d'entrée auxiliaire"
 
-#: xcofflink.c:1319
+#: xcofflink.c:1320
 #, c-format
 msgid "%s: symbol `%s' has unrecognized csect type %d"
 msgstr "%s: symbole « %s » a un type csect non reconnu %d"
 
-#: xcofflink.c:1331
+#: xcofflink.c:1332
 #, c-format
 msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
 msgstr "%s: symbole XTY_ER erroné « %s »: classe %d scnum %d scnlen %d"
 
-#: xcofflink.c:1367
+#: xcofflink.c:1368
 #, c-format
 msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
 msgstr "%s: XMC_TC0 symbol « %s » est la classe %d scnlen %d"
 
-#: xcofflink.c:1519
+#: xcofflink.c:1520
 #, c-format
 msgid "%s: csect `%s' not in enclosing section"
 msgstr "%s: csect « %s » n'est pas dans un section fermée"
 
-#: xcofflink.c:1626
+#: xcofflink.c:1627
 #, c-format
 msgid "%s: misplaced XTY_LD `%s'"
 msgstr "%s: XTY_LD mal placé « %s »"
 
-#: xcofflink.c:1957
+#: xcofflink.c:1958
 #, c-format
 msgid "%s: reloc %s:%d not in csect"
 msgstr "%s: relocalisation %s:%d n'est pas dans csect"
 
-#: xcofflink.c:2092
+#: xcofflink.c:2095
 #, c-format
 msgid "%s: XCOFF shared object when not producing XCOFF output"
 msgstr "%s: objet XCOFF partagé sans être en production de sortie XCOFF"
 
-#: xcofflink.c:2113
+#: xcofflink.c:2116
 #, c-format
 msgid "%s: dynamic object with no .loader section"
 msgstr "%s: objet dynamique sans section .loader"
 
-#: xcofflink.c:2758
+#: xcofflink.c:2761
 #, c-format
 msgid "%s: no such symbol"
 msgstr "%s: pas de tel symbole"
 
-#: xcofflink.c:2891
+#: xcofflink.c:2894
 msgid "error: undefined symbol __rtinit"
 msgstr "erreur: symbole __rtinit indéfini"
 
-#: xcofflink.c:3453
+#: xcofflink.c:3455
 #, c-format
 msgid "warning: attempt to export undefined symbol `%s'"
 msgstr "AVERTISSEMENT: tentative d'exportation d'un symbole indéfini « %s »"
 
-#: xcofflink.c:4447
+#: xcofflink.c:4448
 #, c-format
 msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
 msgstr "Débordement de la table des entrées: 0x%lx > 0x10000; essayer l'option -mminimal-toc"
 
-#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
+#: xcofflink.c:5288 xcofflink.c:5755 xcofflink.c:5817 xcofflink.c:6119
 #, c-format
 msgid "%s: loader reloc in unrecognized section `%s'"
 msgstr "%s: chargeur de relocalisation dans une section non reconnnue « %s »"
 
-#: xcofflink.c:5309 xcofflink.c:6130
+#: xcofflink.c:5310 xcofflink.c:6130
 #, c-format
 msgid "%s: `%s' in loader reloc but not loader sym"
 msgstr "%s: « %s » est dans le chargeur de relocalisation mais pas dans celui des symboles"
 
-#: xcofflink.c:5324
+#: xcofflink.c:5325
 #, c-format
 msgid "%s: loader reloc in read-only section %s"
 msgstr "%s: chargeur de relocalisation dans un section en lecture seulement %s"
 
-#: elf32-ia64.c:2222 elf64-ia64.c:2222
+#: elf32-ia64.c:2392 elf64-ia64.c:2392
 msgid "@pltoff reloc against local symbol"
 msgstr "relocalisation @pltoff vers un symbole local"
 
-#: elf32-ia64.c:3562 elf64-ia64.c:3562
+#: elf32-ia64.c:3804 elf64-ia64.c:3804
 #, c-format
 msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
 msgstr "%s: débordement du segment de données court (0x%lx >= 0x400000)"
 
-#: elf32-ia64.c:3573 elf64-ia64.c:3573
+#: elf32-ia64.c:3815 elf64-ia64.c:3815
 #, c-format
 msgid "%s: __gp does not cover short data segment"
 msgstr "%s: __gp ne couvre pas ce segment de données court"
 
-#: elf32-ia64.c:3858 elf64-ia64.c:3858
+#: elf32-ia64.c:4131 elf64-ia64.c:4131
 #, c-format
 msgid "%s: linking non-pic code in a shared library"
 msgstr "%s: liaison de code non-pic dans une librairie partagée"
 
-#: elf32-ia64.c:3891 elf64-ia64.c:3891
+#: elf32-ia64.c:4164 elf64-ia64.c:4164
 #, c-format
 msgid "%s: @gprel relocation against dynamic symbol %s"
 msgstr "%s: relocalisation @gprel vers le symbole dynamique %s"
 
-#: elf32-ia64.c:4030 elf64-ia64.c:4030
+#: elf32-ia64.c:4224 elf64-ia64.c:4224
+#, c-format
+msgid "%s: linking non-pic code in a position independent executable"
+msgstr "%s: liaison de code non-pic dans un exécutable à position indépendante"
+
+#: elf32-ia64.c:4363 elf64-ia64.c:4363
 #, c-format
-msgid "%s: dynamic relocation against speculation fixup"
-msgstr "%s: relocalisation dynamique vers un correctif spéculé"
+msgid "%s: @internal branch to dynamic symbol %s"
+msgstr "%s: relocalisation @internal vers le symbole dynamique %s"
 
-#: elf32-ia64.c:4038 elf64-ia64.c:4038
+#: elf32-ia64.c:4365 elf64-ia64.c:4365
 #, c-format
-msgid "%s: speculation fixup against undefined weak symbol"
-msgstr "%s: correctif spéculé vers un symbole faible indéfini"
+msgid "%s: speculation fixup to dynamic symbol %s"
+msgstr "%s: spéculation d'ajustements vers un symbole dynamique %s"
 
-#: elf32-ia64.c:4271 elf64-ia64.c:4271
+#: elf32-ia64.c:4367 elf64-ia64.c:4367
+#, c-format
+msgid "%s: @pcrel relocation against dynamic symbol %s"
+msgstr "%s: relocalisation @pcrel vers le symbole dynamique %s"
+
+#: elf32-ia64.c:4579 elf64-ia64.c:4579
 msgid "unsupported reloc"
-msgstr "relocalisation non supporté"
+msgstr "relocalisation non supportée"
 
-#: elf32-ia64.c:4551 elf64-ia64.c:4551
+#: elf32-ia64.c:4858 elf64-ia64.c:4858
 #, c-format
 msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
 msgstr "%s: édition de liens trap-on-NULL-dereference avec des fichiers non-trapping"
 
-#: elf32-ia64.c:4560 elf64-ia64.c:4560
+#: elf32-ia64.c:4867 elf64-ia64.c:4867
 #, c-format
 msgid "%s: linking big-endian files with little-endian files"
 msgstr ""
 "%s: édition de liens pour des fichiers en système à octets de poids fort\n"
 "avec des fichiers pour des systèmes à octets de poids faible"
 
-#: elf32-ia64.c:4569 elf64-ia64.c:4569
+#: elf32-ia64.c:4876 elf64-ia64.c:4876
 #, c-format
 msgid "%s: linking 64-bit files with 32-bit files"
 msgstr "%s: édition de liens de fichiers de 64 bits avec des fichiers de 32 bits"
 
-#: elf32-ia64.c:4578 elf64-ia64.c:4578
+#: elf32-ia64.c:4885 elf64-ia64.c:4885
 #, c-format
 msgid "%s: linking constant-gp files with non-constant-gp files"
 msgstr "%s: édition de liens de fichiers constant-gp avec des fichier non-constant-gp"
 
-#: elf32-ia64.c:4588 elf64-ia64.c:4588
+#: elf32-ia64.c:4895 elf64-ia64.c:4895
 #, c-format
 msgid "%s: linking auto-pic files with non-auto-pic files"
 msgstr "%s: édition de liens de fichiers auto-pic avec des fichiers non-auto-pic"
 
-#: peigen.c:962 pepigen.c:962
+#: peigen.c:985 pepigen.c:985
 #, c-format
 msgid "%s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: débordement du nombre de lignes: 0x%lx > 0xffff"
 
-#: peigen.c:979 pepigen.c:979
+#: peigen.c:1002 pepigen.c:1002
 #, c-format
 msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
 msgstr "%s: débordement de la relocalisation 1: 0x%lx > 0xffff"
 
-#: peigen.c:993 pepigen.c:993
+#: peigen.c:1016 pepigen.c:1016
 msgid "Export Directory [.edata (or where ever we found it)]"
 msgstr "Répertoire d'exportation [.edata (ou là où il a été repéré)]"
 
-#: peigen.c:994 pepigen.c:994
+#: peigen.c:1017 pepigen.c:1017
 msgid "Import Directory [parts of .idata]"
 msgstr "Répertoire d'importation [faisant partie de .idata]"
 
-#: peigen.c:995 pepigen.c:995
+#: peigen.c:1018 pepigen.c:1018
 msgid "Resource Directory [.rsrc]"
 msgstr "Répertoire des resources [.rsrc]"
 
-#: peigen.c:996 pepigen.c:996
+#: peigen.c:1019 pepigen.c:1019
 msgid "Exception Directory [.pdata]"
 msgstr "Répertoire des exceptions [.pdata]"
 
-#: peigen.c:997 pepigen.c:997
+#: peigen.c:1020 pepigen.c:1020
 msgid "Security Directory"
 msgstr "Répertoire de la sécurité"
 
-#: peigen.c:998 pepigen.c:998
+#: peigen.c:1021 pepigen.c:1021
 msgid "Base Relocation Directory [.reloc]"
 msgstr "Répertoire de base de relocalisation [.reloc]"
 
-#: peigen.c:999 pepigen.c:999
+#: peigen.c:1022 pepigen.c:1022
 msgid "Debug Directory"
 msgstr "Répertoire de débug"
 
-#: peigen.c:1000 pepigen.c:1000
+#: peigen.c:1023 pepigen.c:1023
 msgid "Description Directory"
 msgstr "Répertoire de description"
 
-#: peigen.c:1001 pepigen.c:1001
+#: peigen.c:1024 pepigen.c:1024
 msgid "Special Directory"
 msgstr "Répertoire spécial"
 
-#: peigen.c:1002 pepigen.c:1002
+#: peigen.c:1025 pepigen.c:1025
 msgid "Thread Storage Directory [.tls]"
 msgstr "Répertoire des files de stockage [.tls]"
 
-#: peigen.c:1003 pepigen.c:1003
+#: peigen.c:1026 pepigen.c:1026
 msgid "Load Configuration Directory"
 msgstr "Répertoire de chargement de configuration"
 
-#: peigen.c:1004 pepigen.c:1004
+#: peigen.c:1027 pepigen.c:1027
 msgid "Bound Import Directory"
 msgstr "Répertoire des importations limitées"
 
-#: peigen.c:1005 pepigen.c:1005
+#: peigen.c:1028 pepigen.c:1028
 msgid "Import Address Table Directory"
 msgstr "Répertoire de la table d'adresse d'importation"
 
-#: peigen.c:1006 pepigen.c:1006
+#: peigen.c:1029 pepigen.c:1029
 msgid "Delay Import Directory"
 msgstr "Répertoire des délais d'importation"
 
-#: peigen.c:1007 peigen.c:1008 pepigen.c:1007 pepigen.c:1008
+#: peigen.c:1030 peigen.c:1031 pepigen.c:1030 pepigen.c:1031
 msgid "Reserved"
 msgstr "Réservé"
 
-#: peigen.c:1071 pepigen.c:1071
+#: peigen.c:1094 pepigen.c:1094
 msgid ""
 "\n"
 "There is an import table, but the section containing it could not be found\n"
@@ -2500,7 +2748,7 @@ msgstr ""
 "\n"
 "Il y a une table d'importation, mais la section la contenant ne peut être repérée\n"
 
-#: peigen.c:1076 pepigen.c:1076
+#: peigen.c:1099 pepigen.c:1099
 #, c-format
 msgid ""
 "\n"
@@ -2509,7 +2757,7 @@ msgstr ""
 "\n"
 "Il y a une table d'importation dans %s à 0x%lx\n"
 
-#: peigen.c:1113 pepigen.c:1113
+#: peigen.c:1136 pepigen.c:1136
 #, c-format
 msgid ""
 "\n"
@@ -2518,12 +2766,12 @@ msgstr ""
 "\n"
 "Descripteur de fonction localisé à l'adresse de départ: %04lx\n"
 
-#: peigen.c:1116 pepigen.c:1116
+#: peigen.c:1139 pepigen.c:1139
 #, c-format
 msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
 msgstr "\tcode-base %08lx tab. des entrées (chargeable/actuel) %08lx/%08lx\n"
 
-#: peigen.c:1122 pepigen.c:1122
+#: peigen.c:1145 pepigen.c:1145
 msgid ""
 "\n"
 "No reldata section! Function descriptor not decoded.\n"
@@ -2531,7 +2779,7 @@ msgstr ""
 "\n"
 "Pas de section reldata! Descripteur de fonction n'a pas été décodé.\n"
 
-#: peigen.c:1127 pepigen.c:1127
+#: peigen.c:1150 pepigen.c:1150
 #, c-format
 msgid ""
 "\n"
@@ -2540,7 +2788,7 @@ msgstr ""
 "\n"
 "Les tables d'importation (contenus interprétés de la section %s)\n"
 
-#: peigen.c:1130 pepigen.c:1130
+#: peigen.c:1153 pepigen.c:1153
 msgid ""
 " vma:            Hint    Time      Forward  DLL       First\n"
 "                 Table   Stamp     Chain    Name      Thunk\n"
@@ -2548,7 +2796,7 @@ msgstr ""
 " vma:            Hint    Temps     Avant    DLL       Premier\n"
 "                 Table   Estampil. Chaîne   Nom       Thunk\n"
 
-#: peigen.c:1181 pepigen.c:1181
+#: peigen.c:1204 pepigen.c:1204
 #, c-format
 msgid ""
 "\n"
@@ -2557,11 +2805,11 @@ msgstr ""
 "\n"
 "\tNom DLL: %s\n"
 
-#: peigen.c:1192 pepigen.c:1192
+#: peigen.c:1215 pepigen.c:1215
 msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
 msgstr "\tvma:  Hint/Ord Membre      Lien\n"
 
-#: peigen.c:1217 pepigen.c:1217
+#: peigen.c:1240 pepigen.c:1240
 msgid ""
 "\n"
 "There is a first thunk, but the section containing it could not be found\n"
@@ -2569,7 +2817,7 @@ msgstr ""
 "\n"
 "Il y a un premier « thunk », mais la section le contenant ne peut être repérée\n"
 
-#: peigen.c:1357 pepigen.c:1357
+#: peigen.c:1380 pepigen.c:1380
 msgid ""
 "\n"
 "There is an export table, but the section containing it could not be found\n"
@@ -2577,7 +2825,7 @@ msgstr ""
 "\n"
 "Il y a une table d'exportation, mais la section la contenant n'a pu être repérée\n"
 
-#: peigen.c:1362 pepigen.c:1362
+#: peigen.c:1385 pepigen.c:1385
 #, c-format
 msgid ""
 "\n"
@@ -2586,7 +2834,7 @@ msgstr ""
 "\n"
 "Il y a une table d'exportation dans %s à 0x%lx\n"
 
-#: peigen.c:1393 pepigen.c:1393
+#: peigen.c:1416 pepigen.c:1416
 #, c-format
 msgid ""
 "\n"
@@ -2597,61 +2845,61 @@ msgstr ""
 "Les tables d'exportation (contenus interprétés de la section %s)\n"
 "\n"
 
-#: peigen.c:1397 pepigen.c:1397
+#: peigen.c:1420 pepigen.c:1420
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
 msgstr "Fanion d'exportation \t\t\t%lx\n"
 
-#: peigen.c:1400 pepigen.c:1400
+#: peigen.c:1423 pepigen.c:1423
 #, c-format
 msgid "Time/Date stamp \t\t%lx\n"
 msgstr "Tampon Heure/Date \t\t%lx\n"
 
-#: peigen.c:1403 pepigen.c:1403
+#: peigen.c:1426 pepigen.c:1426
 #, c-format
 msgid "Major/Minor \t\t\t%d/%d\n"
 msgstr "Majeur/Mineur \t\t\t%d/%d\n"
 
-#: peigen.c:1406 pepigen.c:1406
+#: peigen.c:1429 pepigen.c:1429
 msgid "Name \t\t\t\t"
 msgstr "Nom \t\t\t\t"
 
-#: peigen.c:1412 pepigen.c:1412
+#: peigen.c:1435 pepigen.c:1435
 #, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
 msgstr "base de nombre ordinal \t\t\t%ld\n"
 
-#: peigen.c:1415 pepigen.c:1415
+#: peigen.c:1438 pepigen.c:1438
 msgid "Number in:\n"
 msgstr "Numéro dans:\n"
 
-#: peigen.c:1418 pepigen.c:1418
+#: peigen.c:1441 pepigen.c:1441
 #, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
 msgstr "\tTable d'adresses d'exportation \t\t%08lx\n"
 
-#: peigen.c:1422 pepigen.c:1422
+#: peigen.c:1445 pepigen.c:1445
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
 msgstr "\tTable de noms [Pointeur/Nombre ordinal]\t%08lx\n"
 
-#: peigen.c:1425 pepigen.c:1425
+#: peigen.c:1448 pepigen.c:1448
 msgid "Table Addresses\n"
 msgstr "Table d'adresses\n"
 
-#: peigen.c:1428 pepigen.c:1428
+#: peigen.c:1451 pepigen.c:1451
 msgid "\tExport Address Table \t\t"
 msgstr "\tTable d'adresse d'exportation \t\t"
 
-#: peigen.c:1433 pepigen.c:1433
+#: peigen.c:1456 pepigen.c:1456
 msgid "\tName Pointer Table \t\t"
 msgstr "\tTable des noms de pointeurs \t\t"
 
-#: peigen.c:1438 pepigen.c:1438
+#: peigen.c:1461 pepigen.c:1461
 msgid "\tOrdinal Table \t\t\t"
 msgstr "\tTable des ordinals \t\t\t"
 
-#: peigen.c:1453 pepigen.c:1453
+#: peigen.c:1476 pepigen.c:1476
 #, c-format
 msgid ""
 "\n"
@@ -2660,15 +2908,15 @@ msgstr ""
 "\n"
 "Table d'adresses d'exportation -- base de nombre ordinal %ld\n"
 
-#: peigen.c:1472 pepigen.c:1472
+#: peigen.c:1495 pepigen.c:1495
 msgid "Forwarder RVA"
 msgstr "Adresseur RVA"
 
-#: peigen.c:1483 pepigen.c:1483
+#: peigen.c:1506 pepigen.c:1506
 msgid "Export RVA"
 msgstr "Exportation RVA"
 
-#: peigen.c:1490 pepigen.c:1490
+#: peigen.c:1513 pepigen.c:1513
 msgid ""
 "\n"
 "[Ordinal/Name Pointer] Table\n"
@@ -2676,12 +2924,12 @@ msgstr ""
 "\n"
 "Table [Ordinal/Nom de pointeurs]\n"
 
-#: peigen.c:1545 pepigen.c:1545
+#: peigen.c:1568 pepigen.c:1568
 #, c-format
 msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
 msgstr "AVERTISSEMENT, taille de la section .pdata (%ld) n'est pas un multiple de %d\n"
 
-#: peigen.c:1549 pepigen.c:1549
+#: peigen.c:1572 pepigen.c:1572
 msgid ""
 "\n"
 "The Function Table (interpreted .pdata section contents)\n"
@@ -2689,11 +2937,11 @@ msgstr ""
 "\n"
 "La table de fonctions (interprétation du contenu de la section .pdata)\n"
 
-#: peigen.c:1552 pepigen.c:1552
+#: peigen.c:1575 pepigen.c:1575
 msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
 msgstr " vma:\t\t\tDébut Adresse    Fin Adresse      Unwind Info\n"
 
-#: peigen.c:1554 pepigen.c:1554
+#: peigen.c:1577 pepigen.c:1577
 msgid ""
 " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
 "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
@@ -2701,19 +2949,19 @@ msgstr ""
 " vma:\t\tDébut    Fin      EH       EH       FinProlog  Exception\n"
 "     \t\tAdresse  Adresse  Handler  Données  Adresse    Masque\n"
 
-#: peigen.c:1624 pepigen.c:1624
+#: peigen.c:1647 pepigen.c:1647
 msgid " Register save millicode"
 msgstr " Registre a préservé le millicode"
 
-#: peigen.c:1627 pepigen.c:1627
+#: peigen.c:1650 pepigen.c:1650
 msgid " Register restore millicode"
 msgstr " Registre a restauré le millicode"
 
-#: peigen.c:1630 pepigen.c:1630
+#: peigen.c:1653 pepigen.c:1653
 msgid " Glue code sequence"
 msgstr " Séquence du code de liants"
 
-#: peigen.c:1682 pepigen.c:1682
+#: peigen.c:1705 pepigen.c:1705
 msgid ""
 "\n"
 "\n"
@@ -2723,7 +2971,7 @@ msgstr ""
 "\n"
 "Fichier de base des relocalisation PE (contenus interprétés de la section .reloc)\n"
 
-#: peigen.c:1712 pepigen.c:1712
+#: peigen.c:1735 pepigen.c:1735
 #, c-format
 msgid ""
 "\n"
@@ -2732,7 +2980,7 @@ msgstr ""
 "\n"
 "Adresse virtuelle: %08lx taille des morceaux %ld (0x%lx) nombre de correctifs %ld\n"
 
-#: peigen.c:1725 pepigen.c:1725
+#: peigen.c:1748 pepigen.c:1748
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
 msgstr "\trelocalisation %4d décalage %4x [%4lx] %s"
@@ -2740,7 +2988,7 @@ msgstr "\trelocalisation %4d d
 #. The MS dumpbin program reportedly ands with 0xff0f before
 #. printing the characteristics field.  Not sure why.  No reason to
 #. emulate it here.
-#: peigen.c:1765 pepigen.c:1765
+#: peigen.c:1788 pepigen.c:1788
 #, c-format
 msgid ""
 "\n"
@@ -2749,6 +2997,42 @@ msgstr ""
 "\n"
 "Caractéristiques 0x%x\n"
 
+#~ msgid "%s: Unknown special linker type %d"
+#~ msgstr "%s: type d'édition spécial de lien inconnu %d"
+
+#~ msgid "v850ea architecture"
+#~ msgstr "architecture v850ea"
+
+#~ msgid "%s: Section %s is too large to add hole of %ld bytes"
+#~ msgstr "%s: section %s est trop grande pour ajouter un trou de %ld octets"
+
+#~ msgid "Error: out of memory"
+#~ msgstr "Erreur: mémoire épuisée"
+
+#~ msgid "warning: relocation against removed section; zeroing"
+#~ msgstr "AVERTISSEMENT: relocalisation vers une section qui a été enlevée; mise à zéro"
+
+#~ msgid "warning: relocation against removed section"
+#~ msgstr "AVERTISSEMENT: relocalisation vers une section enlevée"
+
+#~ msgid "local symbols in discarded section %s"
+#~ msgstr "symboles locaux de la section mise à l'écart %s"
+
+#~ msgid "%s: linking abicalls files with non-abicalls files"
+#~ msgstr "%s: édition de liens des fichier abicalls avec des fichiers non abicalls"
+
+#~ msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+#~ msgstr "%s: ISA ne concorde pas (-mips%d) avec les modules précédents (-mips%d)"
+
+#~ msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+#~ msgstr "%s: ISA ne concorde pas (%d) avec les modules précédents (%d)"
+
+#~ msgid "%s: dynamic relocation against speculation fixup"
+#~ msgstr "%s: relocalisation dynamique vers un correctif spéculé"
+
+#~ msgid "%s: speculation fixup against undefined weak symbol"
+#~ msgstr "%s: correctif spéculé vers un symbole faible indéfini"
+
 #~ msgid "\tThe Import Address Table (difference found)\n"
 #~ msgstr "\tL'adresse de la table d'importation (différence détectée)\n"
 
index e73f09b0b68469087b49ae256abd0ff88dc22e60..f63790bd221a6997b7bab429efc997bf6f579600 100644 (file)
 # Swedish messages for bfd.
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-# Christian Rose <menthos@menthos.com>, 2001, 2002.
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Christian Rose <menthos@menthos.com>, 2001, 2002, 2003.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: bfd 2.12.91\n"
-"POT-Creation-Date: 2002-07-23 15:55-0400\n"
-"PO-Revision-Date: 2002-07-30 21:55+0200\n"
+"Project-Id-Version: bfd 2.14rel030712\n"
+"POT-Creation-Date: 2003-07-11 13:53+0930\n"
+"PO-Revision-Date: 2003-07-17 22:55+0200\n"
 "Last-Translator: Christian Rose <menthos@menthos.com>\n"
 "Language-Team: Swedish <sv@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=iso-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: aout-adobe.c:197
+#: aout-adobe.c:204
 #, c-format
 msgid "%s: Unknown section type in a.out.adobe file: %x\n"
 msgstr "%s: Okänd sektionstyp i a.out.adobe-fil: %x\n"
 
-#: aout-cris.c:208
+#: aout-cris.c:207
 #, c-format
 msgid "%s: Invalid relocation type exported: %d"
 msgstr "%s: Ogiltig omlokaliseringstyp exporterad: %d"
 
-#: aout-cris.c:252
+#: aout-cris.c:251
 #, c-format
 msgid "%s: Invalid relocation type imported: %d"
 msgstr "%s: Ogiltig omlokaliseringstyp importerad: %d"
 
-#: aout-cris.c:263
+#: aout-cris.c:262
 #, c-format
 msgid "%s: Bad relocation record imported: %d"
 msgstr "%s: Felaktig omlokaliseringstyp importerad: %d"
 
-#: aoutx.h:1282 aoutx.h:1699
+#: aoutx.h:1295 aoutx.h:1716
 #, c-format
 msgid "%s: can not represent section `%s' in a.out object file format"
 msgstr "%s: kan inte representera sektionen \"%s\" i a.out-objektfilformat"
 
-#: aoutx.h:1669
+#: aoutx.h:1682
 #, c-format
 msgid "%s: can not represent section for symbol `%s' in a.out object file format"
 msgstr "%s: kan inte representera sektion för symbolen \"%s\" i a.out-objektfilformat"
 
-#: aoutx.h:1671
+#: aoutx.h:1684
 msgid "*unknown*"
 msgstr "*okänd*"
 
-#: aoutx.h:3732
+#: aoutx.h:3776
 #, c-format
-msgid "%s: relocateable link from %s to %s not supported"
+msgid "%s: relocatable link from %s to %s not supported"
 msgstr "%s: omlokaliseringsbar länk från %s till %s stöds inte"
 
-#: archive.c:1826
+#: archive.c:1751
 msgid "Warning: writing archive was slow: rewriting timestamp\n"
 msgstr "Varning: arkivskrivning var långsam: skriver om tidsstämpel\n"
 
-#: archive.c:2093
+#: archive.c:2014
 msgid "Reading archive file mod timestamp"
 msgstr "Läser arkivfilens modifieringstidsstämpel"
 
-#. FIXME: bfd can't call perror.
-#: archive.c:2120
+#: archive.c:2040
 msgid "Writing updated armap timestamp"
 msgstr "Skriver uppdaterad armap-tidsstämpel"
 
-#: bfd.c:274
+#: bfd.c:280
 msgid "No error"
 msgstr "Inget fel"
 
-#: bfd.c:275
+#: bfd.c:281
 msgid "System call error"
 msgstr "Systemanropsfel"
 
-#: bfd.c:276
+#: bfd.c:282
 msgid "Invalid bfd target"
 msgstr "Ogiltigt bfd-mål"
 
-#: bfd.c:277
+#: bfd.c:283
 msgid "File in wrong format"
 msgstr "Filen är i fel format"
 
-#: bfd.c:278
+#: bfd.c:284
 msgid "Archive object file in wrong format"
 msgstr "Arkivobjektfil är i fel format"
 
-#: bfd.c:279
+#: bfd.c:285
 msgid "Invalid operation"
 msgstr "Ogiltig åtgärd"
 
-#: bfd.c:280
+#: bfd.c:286
 msgid "Memory exhausted"
 msgstr "Minnet är slut"
 
-#: bfd.c:281
+#: bfd.c:287
 msgid "No symbols"
 msgstr "Inga symboler"
 
-#: bfd.c:282
+#: bfd.c:288
 msgid "Archive has no index; run ranlib to add one"
 msgstr "Arkivet har inget index; kör ranlib för att lägga till ett"
 
-#: bfd.c:283
+#: bfd.c:289
 msgid "No more archived files"
 msgstr "Inga fler arkiverade filer"
 
-#: bfd.c:284
+#: bfd.c:290
 msgid "Malformed archive"
 msgstr "Trasigt arkiv"
 
-#: bfd.c:285
+#: bfd.c:291
 msgid "File format not recognized"
 msgstr "Filformatet känns inte igen"
 
-#: bfd.c:286
+#: bfd.c:292
 msgid "File format is ambiguous"
 msgstr "Filformatet är tvetydigt"
 
-#: bfd.c:287
+#: bfd.c:293
 msgid "Section has no contents"
 msgstr "Sektionen har inget innehåll"
 
-#: bfd.c:288
+#: bfd.c:294
 msgid "Nonrepresentable section on output"
 msgstr "Ickerepresenterbar sektion i utdata"
 
-#: bfd.c:289
+#: bfd.c:295
 msgid "Symbol needs debug section which does not exist"
 msgstr "Symbolen kräver felsökningssektion som inte finns"
 
-#: bfd.c:290
+#: bfd.c:296
 msgid "Bad value"
 msgstr "Felaktigt värde"
 
-#: bfd.c:291
+#: bfd.c:297
 msgid "File truncated"
 msgstr "Filen trunkerad"
 
-#: bfd.c:292
+#: bfd.c:298
 msgid "File too big"
 msgstr "Filen är för stor"
 
-#: bfd.c:293
+#: bfd.c:299
 msgid "#<Invalid error code>"
 msgstr "#<Ogiltig felkod>"
 
-#: bfd.c:700
+#: bfd.c:687
 #, c-format
 msgid "BFD %s assertion fail %s:%d"
 msgstr "BFD %s-försäkran misslyckades %s:%d"
 
-#: bfd.c:719
+#: bfd.c:703
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d in %s\n"
 msgstr "Internt BFD %s-fel, avbryter vid %s rad %d i %s\n"
 
-#: bfd.c:723
+#: bfd.c:707
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d\n"
 msgstr "Internt BFD %s-fel, avbryter vid %s rad %d\n"
 
-#: bfd.c:725
+#: bfd.c:709
 msgid "Please report this bug.\n"
 msgstr "Rapportera gärna detta fel.\n"
 
+#: bfdwin.c:202
+#, c-format
+msgid "not mapping: data=%lx mapped=%d\n"
+msgstr "mappar inte: data=%lx mappat=%d\n"
+
+#: bfdwin.c:205
+msgid "not mapping: env var not set\n"
+msgstr "mappar inte: miljövariabel är inte satt\n"
+
 #: binary.c:306
 #, c-format
 msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
 msgstr "Varning: Skrivning av sektionen \"%s\" till enormt (dvs negativt) avlägsen byte 0x%lx."
 
 # src/menus.c:341
-#: coff-a29k.c:119
+#: coff-a29k.c:120
 msgid "Missing IHCONST"
 msgstr "IHCONST saknas"
 
 # src/menus.c:341
-#: coff-a29k.c:180
+#: coff-a29k.c:181
 msgid "Missing IHIHALF"
 msgstr "IHIHALF saknas"
 
-#: coff-a29k.c:212 coff-or32.c:229
+#: coff-a29k.c:213 coff-or32.c:236
 msgid "Unrecognized reloc"
 msgstr "Okänd omlokalisering"
 
-#: coff-a29k.c:408
+#: coff-a29k.c:409
 msgid "missing IHCONST reloc"
 msgstr "IHCONST-omlokalisering saknas"
 
-#: coff-a29k.c:498
+#: coff-a29k.c:499
 msgid "missing IHIHALF reloc"
 msgstr "IHIHALF-omlokalisering saknas"
 
-#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
+#: coff-alpha.c:884 coff-alpha.c:921 coff-alpha.c:1992 coff-mips.c:1397
 msgid "GP relative relocation used when GP not defined"
 msgstr "GP-relativ omlokalisering användes då GP inte är definierad"
 
-#: coff-alpha.c:1485
+#: coff-alpha.c:1488
 msgid "using multiple gp values"
 msgstr "använder flera gp-värden"
 
-#: coff-arm.c:1066 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:294
 #, c-format
 msgid "%s: unable to find THUMB glue '%s' for `%s'"
 msgstr "%s: kunde inte hitta THUMB-klistret \"%s\" till \"%s\""
 
-#: coff-arm.c:1096 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:329
 #, c-format
 msgid "%s: unable to find ARM glue '%s' for `%s'"
 msgstr "%s: kunde inte hitta ARM-klistret \"%s\" till \"%s\""
 
-#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
+#: coff-arm.c:1394 coff-arm.c:1489 elf32-arm.h:892 elf32-arm.h:999
 #, c-format
 msgid "%s(%s): warning: interworking not enabled."
 msgstr "%s(%s): varning: samverkande är inte aktiverat."
 
-#: coff-arm.c:1395 elf32-arm.h:994
+#: coff-arm.c:1398 elf32-arm.h:1002
 #, c-format
 msgid "  first occurrence: %s: arm call to thumb"
 msgstr "  första förekomst: %s: arm-anrop till thumb"
 
-#: coff-arm.c:1490 elf32-arm.h:890
+#: coff-arm.c:1493 elf32-arm.h:895
 #, c-format
 msgid "  first occurrence: %s: thumb call to arm"
 msgstr "  första förekomst: %s: thumb-anrop till arm"
 
-#: coff-arm.c:1493
+#: coff-arm.c:1496
 msgid "  consider relinking with --support-old-code enabled"
 msgstr "  överväg omlänkning med --support-old-code aktiverat"
 
-#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
+#: coff-arm.c:1788 coff-tic80.c:687 cofflink.c:3038
 #, c-format
 msgid "%s: bad reloc address 0x%lx in section `%s'"
 msgstr "%s: felaktig omlokaliseringsadress 0x%lx i sektionen \"%s\""
 
-#: coff-arm.c:2127
+#: coff-arm.c:2132
 #, c-format
 msgid "%s: illegal symbol index in reloc: %d"
 msgstr "%s: otillåtet symbolindex i omlokalisering: %d"
 
-#: coff-arm.c:2255
+#: coff-arm.c:2265
 #, c-format
 msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
 msgstr "FEL: %s kompilerad för APCS-%d, medan %s är kompilerad för APCS-%d"
 
-#: coff-arm.c:2270 elf32-arm.h:2297
+#: coff-arm.c:2280 elf32-arm.h:2328
 #, c-format
 msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
 msgstr "FEL: %s skickar flyttal i flyttalsregister, medan %s skickar dem i heltalsregister"
 
-#: coff-arm.c:2273 elf32-arm.h:2302
+#: coff-arm.c:2283 elf32-arm.h:2333
 #, c-format
 msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
 msgstr "FEL: %s skickar flyttal i heltalsregister, medan %s skickar dem i flyttalsregister"
 
-#: coff-arm.c:2288
+#: coff-arm.c:2298
 #, c-format
 msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
 msgstr "FEL: %s är kompilerad som positionsoberoende kod, medan målet %s har absolut position"
 
-#: coff-arm.c:2291
+#: coff-arm.c:2301
 #, c-format
 msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
 msgstr "FEL: %s är kompilerad som kod med absolut position, medan målet %s är positionsoberoende"
 
-#: coff-arm.c:2320 elf32-arm.h:2358
+#: coff-arm.c:2330 elf32-arm.h:2405
 #, c-format
 msgid "Warning: %s supports interworking, whereas %s does not"
 msgstr "Varning: %s stöder samverkande, medan %s däremot inte gör det"
 
-#: coff-arm.c:2323 elf32-arm.h:2365
+#: coff-arm.c:2333 elf32-arm.h:2412
 #, c-format
 msgid "Warning: %s does not support interworking, whereas %s does"
 msgstr "Varning: %s stöder inte samverkande, medan %s däremot gör det"
 
-#: coff-arm.c:2350
+#: coff-arm.c:2360
 #, c-format
 msgid "private flags = %x:"
 msgstr "privata flaggor = %x:"
 
-#: coff-arm.c:2358 elf32-arm.h:2418
+#: coff-arm.c:2368 elf32-arm.h:2467
 msgid " [floats passed in float registers]"
 msgstr " [flyttal skickade i flyttalsregister]"
 
-#: coff-arm.c:2360
+#: coff-arm.c:2370
 msgid " [floats passed in integer registers]"
 msgstr " [flyttal skickade i heltalsregister]"
 
-#: coff-arm.c:2363 elf32-arm.h:2421
+#: coff-arm.c:2373 elf32-arm.h:2470
 msgid " [position independent]"
 msgstr " [positionsoberoende]"
 
-#: coff-arm.c:2365
+#: coff-arm.c:2375
 msgid " [absolute position]"
 msgstr " [absolut position]"
 
-#: coff-arm.c:2369
+#: coff-arm.c:2379
 msgid " [interworking flag not initialised]"
 msgstr " [samverkandeflagga är inte initierad]"
 
-#: coff-arm.c:2371
+#: coff-arm.c:2381
 msgid " [interworking supported]"
 msgstr " [samverkan stöds]"
 
-#: coff-arm.c:2373
+#: coff-arm.c:2383
 msgid " [interworking not supported]"
 msgstr " [samverkan stöds inte]"
 
-#: coff-arm.c:2421 elf32-arm.h:2124
+#: coff-arm.c:2431 elf32-arm.h:2150
 #, c-format
 msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
 msgstr "Varning: Ställer inte in samverkansflaggan för %s eftersom den redan har angivits som inte samverkande"
 
-#: coff-arm.c:2425 elf32-arm.h:2128
+#: coff-arm.c:2435 elf32-arm.h:2154
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s due to outside request"
 msgstr "Varning: Stänger av samverkansflaggan för %s på grund av begäran utifrån"
 
-#: coff-i960.c:136 coff-i960.c:485
+#: coff-h8300.c:1096
+#, c-format
+msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
+msgstr "kan inte hantera R_MEM_INDIRECT-omlokalisering vid användning av %s-utdata"
+
+#: coff-i960.c:137 coff-i960.c:486
 msgid "uncertain calling convention for non-COFF symbol"
 msgstr "osäker anropskonvention för icke-COFF-symbol"
 
-#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
+#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2193 elf32-mips.c:1783
 msgid "unsupported reloc type"
 msgstr "omlokaliseringstypen stöds inte"
 
-#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
+#: coff-mips.c:839 elf32-mips.c:1088 elf64-mips.c:1590 elfn32-mips.c:1554
 msgid "GP relative relocation when _gp not defined"
 msgstr "GP-relativ omlokalisering då _gp inte var definierat"
 
 #. No other sections should appear in -membedded-pic
 #. code.
-#: coff-mips.c:2466
+#: coff-mips.c:2431
 msgid "reloc against unsupported section"
 msgstr "omlokalisering mot sektion som inte stöds"
 
-#: coff-mips.c:2474
+#: coff-mips.c:2439
 msgid "reloc not properly aligned"
 msgstr "omlokalisering inte på jämn gräns"
 
-#: coff-rs6000.c:2766
+#: coff-rs6000.c:2790
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
 msgstr "%s: omlokaliseringstypen 0x%02x stöds inte"
 
-#: coff-rs6000.c:2859
+#: coff-rs6000.c:2883
 #, c-format
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
 msgstr "%s: TOC-omlokalisering vid 0x%x till symbolen \"%s\" utan någon TOC-post"
 
-#: coff-rs6000.c:3590 coff64-rs6000.c:2091
+#: coff-rs6000.c:3616 coff64-rs6000.c:2109
 #, c-format
 msgid "%s: symbol `%s' has unrecognized smclas %d"
 msgstr "%s: symbolen \"%s\" har okänd smclas %d"
 
-#: coff-tic54x.c:279 coff-tic80.c:449
+#: coff-tic4x.c:170 coff-tic54x.c:288 coff-tic80.c:450
 #, c-format
 msgid "Unrecognized reloc type 0x%x"
 msgstr "Okänd omlokaliseringstyp 0x%x"
 
-#: coff-tic54x.c:390 coffcode.h:4974
+#: coff-tic4x.c:218 coff-tic54x.c:373 coffcode.h:5045
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
 msgstr "%s: varning: otillåtet symbolindex %ld i omlokaliseringarna"
 
-#: coff-w65.c:363
+#: coff-w65.c:364
 #, c-format
 msgid "ignoring reloc %s\n"
 msgstr "ignorerar omlokalisering %s\n"
 
-#: coffcode.h:1086
+#: coffcode.h:1108
 #, c-format
 msgid "%s (%s): Section flag %s (0x%x) ignored"
 msgstr "%s (%s): Sektionsflaggan %s (0x%x) ignorerades"
 
-#: coffcode.h:2143
+#: coffcode.h:2214
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
 msgstr "Okänt TI COFF-målid \"0x%x\""
 
-#: coffcode.h:4365
+#: coffcode.h:4437
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in line numbers"
 msgstr "%s: varning: otillåtet symbolindex %ld i radnummer"
 
-#: coffcode.h:4379
+#: coffcode.h:4451
 #, c-format
 msgid "%s: warning: duplicate line number information for `%s'"
 msgstr "%s: varning: dubbel radnummersinformation för \"%s\""
 
-#: coffcode.h:4736
+#: coffcode.h:4805
 #, c-format
 msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
 msgstr "%s: Okänd lagringsklass %d för %s-symbolen \"%s\""
 
-#: coffcode.h:4867
+#: coffcode.h:4938
 #, c-format
 msgid "warning: %s: local symbol `%s' has no section"
 msgstr "varning: %s: lokala symbolen \"%s\" har ingen sektion"
 
-#: coffcode.h:5012
+#: coffcode.h:5083
 #, c-format
 msgid "%s: illegal relocation type %d at address 0x%lx"
 msgstr "%s: otillåten omlokaliseringstyp %d på adress 0x%lx"
 
-#: coffgen.c:1661
+#: coffgen.c:1666
 #, c-format
 msgid "%s: bad string table size %lu"
 msgstr "%s: felaktig strängtabellstorlek %lu"
 
-#: cofflink.c:534 elflink.h:1912
+#: cofflink.c:538 elflink.h:1276
 #, c-format
 msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
 msgstr "Varning: typen på symbolen \"%s\" ändrades från %d till %d i %s"
 
-#: cofflink.c:2321
+#: cofflink.c:2328
 #, c-format
 msgid "%s: relocs in section `%s', but it has no contents"
 msgstr "%s: omlokaliseringar i sektionen \"%s\", men den har inget innehåll"
 
-#: cofflink.c:2664 coffswap.h:877
+#: cofflink.c:2671 coffswap.h:890
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
 msgstr "%s: %s: omlokalisering ger överspill: 0x%lx > 0xffff"
 
-#: cofflink.c:2673 coffswap.h:864
+#: cofflink.c:2680 coffswap.h:876
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: varning: %s: radnummer ger överspill: 0x%lx > 0xffff"
 
-#: dwarf2.c:382
+#: cpu-arm.c:196 cpu-arm.c:206
+#, c-format
+msgid "ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"
+msgstr "FEL: %s kompilerad för EP9312, medan %s är kompilerad för XScale"
+
+#: cpu-arm.c:344
+#, c-format
+msgid "warning: unable to update contents of %s section in %s"
+msgstr "varning: kan inte uppdatera innehållet i %s-sektion i %s"
+
+#: dwarf2.c:380
 msgid "Dwarf Error: Can't find .debug_str section."
 msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_str."
 
-#: dwarf2.c:399
+#: dwarf2.c:397
 #, c-format
 msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
 msgstr "Dwarf-fel: DW_FORM_strp-avståndet (%lu) större än eller lika med storleken på .debug_str (%lu)."
 
-#: dwarf2.c:543
+#: dwarf2.c:541
 msgid "Dwarf Error: Can't find .debug_abbrev section."
 msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_abbrev."
 
-#: dwarf2.c:560
+#: dwarf2.c:556
 #, c-format
 msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
 msgstr "Dwarf-fel: Förkortningsavståndet (%lu) större än eller lika med storleken .debug_abbrev (%lu)."
 
-#: dwarf2.c:757
+#: dwarf2.c:756
 #, c-format
 msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
 msgstr "Dwarf-fel: Ogiltig eller ohanterat FORM-värde: %u."
 
-#: dwarf2.c:852
+#: dwarf2.c:933
 msgid "Dwarf Error: mangled line number section (bad file number)."
 msgstr "Dwarf-fel: trasig radnummerssektion (felaktigt filnummer)."
 
-#: dwarf2.c:938
+#: dwarf2.c:1032
 msgid "Dwarf Error: Can't find .debug_line section."
 msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_line."
 
-#: dwarf2.c:961
+#: dwarf2.c:1049
 #, c-format
 msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
 msgstr "Dwarf-fel: Radavståndet (%lu) större än eller lika med storleken .debug_line (%lu)."
 
-#: dwarf2.c:1159
+#: dwarf2.c:1255
 msgid "Dwarf Error: mangled line number section."
 msgstr "Dwarf-fel: trasig radnummerssektion."
 
-#: dwarf2.c:1355 dwarf2.c:1566
+#: dwarf2.c:1470 dwarf2.c:1620
 #, c-format
 msgid "Dwarf Error: Could not find abbrev number %u."
 msgstr "Dwarf-fel: Kunde inte hitta förkortningsnumret %u."
 
-#: dwarf2.c:1527
+#: dwarf2.c:1581
 #, c-format
 msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
 msgstr "Dwarf-fel: hittade dwarf version \"%u\", denna läsare hanterar endast information från version 2."
 
-#: dwarf2.c:1534
+#: dwarf2.c:1588
 #, c-format
 msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
 msgstr "Dwarf-fel: hittade adresstorleken \"%u\", denna läsare kan inte hantera storlekar större än \"%u\"."
 
-#: dwarf2.c:1557
+#: dwarf2.c:1611
 #, c-format
 msgid "Dwarf Error: Bad abbrev number: %u."
 msgstr "Dwarf-fel: Felaktigt förkortningsnummer: %u."
 
-#: ecoff.c:1318
+#: ecoff.c:1339
 #, c-format
 msgid "Unknown basic type %d"
 msgstr "Okänd grundtyp %d"
 
-#: ecoff.c:1578
+#: ecoff.c:1599
 #, c-format
 msgid ""
 "\n"
@@ -502,7 +525,7 @@ msgstr ""
 "\n"
 "      Symbol slut+1: %ld"
 
-#: ecoff.c:1585 ecoff.c:1588
+#: ecoff.c:1606 ecoff.c:1609
 #, c-format
 msgid ""
 "\n"
@@ -511,7 +534,7 @@ msgstr ""
 "\n"
 "      Första symbolen: %ld"
 
-#: ecoff.c:1600
+#: ecoff.c:1621
 #, c-format
 msgid ""
 "\n"
@@ -520,7 +543,7 @@ msgstr ""
 "\n"
 "      Symbol slut+1: %-7ld  Typ:  %s"
 
-#: ecoff.c:1607
+#: ecoff.c:1628
 #, c-format
 msgid ""
 "\n"
@@ -529,7 +552,7 @@ msgstr ""
 "\n"
 "      Lokal symbol: %ld"
 
-#: ecoff.c:1615
+#: ecoff.c:1636
 #, c-format
 msgid ""
 "\n"
@@ -538,7 +561,7 @@ msgstr ""
 "\n"
 "      struct; symbol slut+1: %ld"
 
-#: ecoff.c:1620
+#: ecoff.c:1641
 #, c-format
 msgid ""
 "\n"
@@ -547,7 +570,7 @@ msgstr ""
 "\n"
 "      union; symbol slut+1: %ld"
 
-#: ecoff.c:1625
+#: ecoff.c:1646
 #, c-format
 msgid ""
 "\n"
@@ -556,7 +579,7 @@ msgstr ""
 "\n"
 "      enum; symbol slut+1: %ld"
 
-#: ecoff.c:1631
+#: ecoff.c:1652
 #, c-format
 msgid ""
 "\n"
@@ -565,54 +588,58 @@ msgstr ""
 "\n"
 "      Typ: %s"
 
-#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
-#: elf64-sh64.c:1659
+#: elf-hppa.h:1458 elf-hppa.h:1491 elf-m10300.c:1628 elf64-sh64.c:1704
 #, c-format
 msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
 msgstr "%s: varning: olöslig omlokalisering mot symbolen \"%s\" från sektionen %s"
 
-#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
-#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
-#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
-#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
+#: elf-m10200.c:442 elf-m10300.c:1695 elf32-arm.h:2088 elf32-avr.c:812
+#: elf32-cris.c:1390 elf32-d10v.c:570 elf32-fr30.c:634 elf32-frv.c:815
+#: elf32-h8300.c:528 elf32-i860.c:1028 elf32-ip2k.c:1586 elf32-iq2000.c:699
+#: elf32-m32r.c:1283 elf32-m68hc1x.c:1305 elf32-msp430.c:510
+#: elf32-openrisc.c:436 elf32-v850.c:1777 elf32-xstormy16.c:976
+#: elf64-mmix.c:1332
 msgid "internal error: out of range error"
 msgstr "internt fel: utanför intervallet"
 
-#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
-#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
-#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
-#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
+#: elf-m10200.c:446 elf-m10300.c:1699 elf32-arm.h:2092 elf32-avr.c:816
+#: elf32-cris.c:1394 elf32-d10v.c:574 elf32-fr30.c:638 elf32-frv.c:819
+#: elf32-h8300.c:532 elf32-i860.c:1032 elf32-iq2000.c:703 elf32-m32r.c:1287
+#: elf32-m68hc1x.c:1309 elf32-msp430.c:514 elf32-openrisc.c:440
+#: elf32-v850.c:1781 elf32-xstormy16.c:980 elf64-mmix.c:1336 elfxx-mips.c:6452
 msgid "internal error: unsupported relocation error"
 msgstr "internt fel: omlokaliseringen stöds inte"
 
-#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
-#: elf32-h8300.c:556 elf32-m32r.c:1286
+#: elf-m10200.c:450 elf-m10300.c:1703 elf32-arm.h:2096 elf32-d10v.c:578
+#: elf32-h8300.c:536 elf32-m32r.c:1291 elf32-m68hc1x.c:1313
 msgid "internal error: dangerous error"
 msgstr "internt fel: farligt fel"
 
-#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
-#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
-#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
-#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
+#: elf-m10200.c:454 elf-m10300.c:1707 elf32-arm.h:2100 elf32-avr.c:824
+#: elf32-cris.c:1402 elf32-d10v.c:582 elf32-fr30.c:646 elf32-frv.c:827
+#: elf32-h8300.c:540 elf32-i860.c:1040 elf32-ip2k.c:1601 elf32-iq2000.c:711
+#: elf32-m32r.c:1295 elf32-m68hc1x.c:1317 elf32-msp430.c:522
+#: elf32-openrisc.c:448 elf32-v850.c:1801 elf32-xstormy16.c:988
+#: elf64-mmix.c:1344
 msgid "internal error: unknown error"
 msgstr "internt fel: okänt fel"
 
-#: elf.c:343
+#: elf.c:372
 #, c-format
 msgid "%s: invalid string offset %u >= %lu for section `%s'"
 msgstr "%s: ogiltigt strängavstånd %u >= %lu för sektionen \"%s\""
 
-#: elf.c:589
+#: elf.c:624
 #, c-format
 msgid "%s: invalid SHT_GROUP entry"
 msgstr "%s: ogiltig SHT_GROUP-post"
 
-#: elf.c:660
+#: elf.c:695
 #, c-format
 msgid "%s: no group info for section %s"
 msgstr "%s: ingen gruppinformation för sektionen %s"
 
-#: elf.c:1023
+#: elf.c:1055
 msgid ""
 "\n"
 "Program Header:\n"
@@ -620,7 +647,7 @@ msgstr ""
 "\n"
 "Programhuvud:\n"
 
-#: elf.c:1073
+#: elf.c:1106
 msgid ""
 "\n"
 "Dynamic Section:\n"
@@ -628,7 +655,7 @@ msgstr ""
 "\n"
 "Dynamisk sektion:\n"
 
-#: elf.c:1202
+#: elf.c:1235
 msgid ""
 "\n"
 "Version definitions:\n"
@@ -636,7 +663,7 @@ msgstr ""
 "\n"
 "Versionsdefinitioner:\n"
 
-#: elf.c:1225
+#: elf.c:1258
 msgid ""
 "\n"
 "Version References:\n"
@@ -644,224 +671,239 @@ msgstr ""
 "\n"
 "Versionsreferenser:\n"
 
-#: elf.c:1230
+#: elf.c:1263
 #, c-format
 msgid "  required from %s:\n"
 msgstr "  krävs från %s:\n"
 
-#: elf.c:1902
+#: elf.c:1944
 #, c-format
 msgid "%s: invalid link %lu for reloc section %s (index %u)"
 msgstr "%s: ogiltig länk %lu för omlokaliseringssektion %s (index %u)"
 
-#: elf.c:3603
+#: elf.c:3686
 #, c-format
 msgid "%s: Not enough room for program headers (allocated %u, need %u)"
 msgstr "%s: Inte tillräckligt med utrymme för programhuvuden (allokerade %u, behöver %u)"
 
-#: elf.c:3708
+#: elf.c:3791
 #, c-format
 msgid "%s: Not enough room for program headers, try linking with -N"
 msgstr "%s: Inte tillräckligt med utrymme för programhuvuden, försök att länka med -N"
 
-#: elf.c:3833
+#: elf.c:3922
 #, c-format
 msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
 msgstr "Fel: Första sektionen i segmentet (%s) börjar vid 0x%x medan segmentet börjar med 0x%x"
 
-#: elf.c:4148
+#: elf.c:4242
 #, c-format
 msgid "%s: warning: allocated section `%s' not in segment"
 msgstr "%s: varning: allokerad sektion \"%s\" inte i segment"
 
-#: elf.c:4472
+#: elf.c:4566
 #, c-format
 msgid "%s: symbol `%s' required but not present"
 msgstr "%s: symbolen \"%s\" krävs men finns inte med"
 
-#: elf.c:4749
+#: elf.c:4854
 #, c-format
 msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
 msgstr "%s: varning: Tomt inläsningsbart segment upptäckt, är detta meningen?\n"
 
-#: elf.c:6193
+#: elf.c:5485
+#, c-format
+msgid "Unable to find equivalent output section for symbol '%s' from section '%s'"
+msgstr "Kan inte hitta ekvivalent utdatasektion för symbolen \"%s\" från sektionen \"%s\""
+
+#: elf.c:6298
 #, c-format
 msgid "%s: unsupported relocation type %s"
 msgstr "%s: omlokaliseringstypen %s stöds inte"
 
-#: elf32-arm.h:1221
+#: elf32-arm.h:1228
 #, c-format
 msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
 msgstr "%s: Varning: Arm BLX-instruktion använder Arm-funktionen \"%s\" som mål."
 
-#: elf32-arm.h:1417
+#: elf32-arm.h:1424
 #, c-format
 msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
 msgstr "%s: Varning: Thumb BLX-instruktionen använder thumb-funktionen \"%s\" som mål."
 
-#: elf32-arm.h:1914 elf32-sh.c:4125
+#: elf32-arm.h:1918 elf32-sh.c:4706 elf64-sh64.c:1613
 #, c-format
 msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
 msgstr "%s(%s+0x%lx): %s omlokalisering mot SEC_MERGE-sektion"
 
-#: elf32-arm.h:2008
+#: elf32-arm.h:2012
 #, c-format
 msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
 msgstr "%s: varning: olöslig omlokalisering %d mot symbolen \"%s\" från sektionen %s"
 
-#: elf32-arm.h:2176
+#: elf32-arm.h:2202
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
 msgstr "Varning: Stänger av samverkandeflaggan i %s eftersom icke-samverkande kod i %s har länkats med det"
 
-#: elf32-arm.h:2271
+#: elf32-arm.h:2302
 #, c-format
 msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
 msgstr "FEL: %s är kompilerad för EABI version %d, medan %s är kompilerad för version %d"
 
-#: elf32-arm.h:2285
+#: elf32-arm.h:2316
 #, c-format
 msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
 msgstr "FEL: %s är kompilerad för APCS-%d, medan målet %s använder APCS-%d"
 
-#: elf32-arm.h:2313
+#: elf32-arm.h:2344
 #, c-format
-msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
-msgstr "FEL: %s använder VFP-instruktioner, medan %s använder FPA-instruktioner"
+msgid "ERROR: %s uses VFP instructions, whereas %s does not"
+msgstr "FEL: %s använder VFP-instruktioner, men det gör inte %s"
 
-#: elf32-arm.h:2318
+#: elf32-arm.h:2349
 #, c-format
-msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
-msgstr "FEL: %s använder FPA-instruktioner, medan %s använder VFP-instruktioner"
+msgid "ERROR: %s uses FPA instructions, whereas %s does not"
+msgstr "FEL: %s använder FPA-instruktioner, men det gör inte %s"
 
-#: elf32-arm.h:2338
+#: elf32-arm.h:2360 elf32-arm.h:2365
+#, c-format
+msgid "ERROR: %s uses Maverick instructions, whereas %s does not"
+msgstr "FEL: %s använder Maverick-instruktioner, men det gör inte %s"
+
+#: elf32-arm.h:2385
 #, c-format
 msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
 msgstr "FEL: %s använder programvaruflyttal, medan %s använder hårdvaruflyttal"
 
-#: elf32-arm.h:2343
+#: elf32-arm.h:2390
 #, c-format
 msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
 msgstr "FEL: %s använder hårdvaruflyttal, medan %s använder programvaruflyttal"
 
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
-#: elfxx-mips.c:7756
+#: elf32-arm.h:2443 elf32-cris.c:2975 elf32-m68hc1x.c:1459 elf32-m68k.c:397
+#: elf32-vax.c:546 elfxx-mips.c:9238
 #, c-format
 msgid "private flags = %lx:"
 msgstr "privata flaggor = %lx:"
 
-#: elf32-arm.h:2405
+#: elf32-arm.h:2452
 msgid " [interworking enabled]"
 msgstr " [samverkande är aktiverat]"
 
-#: elf32-arm.h:2413
+#: elf32-arm.h:2460
 msgid " [VFP float format]"
 msgstr " [VFP-flyttalsformat]"
 
-#: elf32-arm.h:2415
+#: elf32-arm.h:2462
+msgid " [Maverick float format]"
+msgstr " [Maverick-flyttalsformat]"
+
+#: elf32-arm.h:2464
 msgid " [FPA float format]"
 msgstr " [FPA-flyttalsformat]"
 
-#: elf32-arm.h:2424
+#: elf32-arm.h:2473
 msgid " [new ABI]"
 msgstr " [nytt ABI]"
 
-#: elf32-arm.h:2427
+#: elf32-arm.h:2476
 msgid " [old ABI]"
 msgstr " [gammalt ABI]"
 
-#: elf32-arm.h:2430
+#: elf32-arm.h:2479
 msgid " [software FP]"
 msgstr " [programvaru-FP]"
 
-#: elf32-arm.h:2438
+#: elf32-arm.h:2488
 msgid " [Version1 EABI]"
 msgstr " [Version1 EABI]"
 
-#: elf32-arm.h:2441 elf32-arm.h:2452
+#: elf32-arm.h:2491 elf32-arm.h:2502
 msgid " [sorted symbol table]"
 msgstr " [sorterad symboltabell]"
 
-#: elf32-arm.h:2443 elf32-arm.h:2454
+#: elf32-arm.h:2493 elf32-arm.h:2504
 msgid " [unsorted symbol table]"
 msgstr " [osorterad symboltabell]"
 
-#: elf32-arm.h:2449
+#: elf32-arm.h:2499
 msgid " [Version2 EABI]"
 msgstr " [Version2 EABI]"
 
-#: elf32-arm.h:2457
+#: elf32-arm.h:2507
 msgid " [dynamic symbols use segment index]"
 msgstr " [dynamiska symboler använder segmentindex]"
 
-#: elf32-arm.h:2460
+#: elf32-arm.h:2510
 msgid " [mapping symbols precede others]"
 msgstr " [mappsymboler har företräde före andra]"
 
-#: elf32-arm.h:2467
+#: elf32-arm.h:2517
 msgid " <EABI version unrecognised>"
 msgstr " <EABI-version känns inte igen>"
 
-#: elf32-arm.h:2474
+#: elf32-arm.h:2524
 msgid " [relocatable executable]"
 msgstr " [omlokaliseringsbar körbar fil]"
 
-#: elf32-arm.h:2477
+#: elf32-arm.h:2527
 msgid " [has entry point]"
 msgstr " [har startpunkt]"
 
-#: elf32-arm.h:2482
+#: elf32-arm.h:2532
 msgid "<Unrecognised flag bits set>"
 msgstr "<Okända flaggbitar satta>"
 
-#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
-#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
-#: elf32-xstormy16.c:941 elf64-mmix.c:1310
+#: elf32-avr.c:820 elf32-cris.c:1398 elf32-fr30.c:642 elf32-frv.c:823
+#: elf32-i860.c:1036 elf32-ip2k.c:1597 elf32-iq2000.c:707 elf32-msp430.c:518
+#: elf32-openrisc.c:444 elf32-v850.c:1785 elf32-xstormy16.c:984
+#: elf64-mmix.c:1340
 msgid "internal error: dangerous relocation"
 msgstr "internt fel: farlig omlokalisering"
 
-#: elf32-cris.c:949
+#: elf32-cris.c:931
 #, c-format
 msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
 msgstr "%s: olöslig omlokalisering %s mot symbolen \"%s\" från sektionen %s"
 
-#: elf32-cris.c:1012
+#: elf32-cris.c:993
 #, c-format
 msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
 msgstr "%s: Varken någon PLT eller GOT för omlokalisering %s  mot symbolen \"%s\" från sektionen %s"
 
-#: elf32-cris.c:1015 elf32-cris.c:1141
+#: elf32-cris.c:996 elf32-cris.c:1122
 msgid "[whose name is lost]"
 msgstr "[vars namn tappats bort]"
 
-#: elf32-cris.c:1130
+#: elf32-cris.c:1111
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
 msgstr "%s: omlokalisering %s med icke-tomt addendum %d mot lokal symbol från sektionen %s"
 
-#: elf32-cris.c:1137
+#: elf32-cris.c:1118
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
 msgstr "%s: omlokalisering %s med icke-tomt addendum %d mot symbolen \"%s\" från sektionen %s"
 
-#: elf32-cris.c:1155
+#: elf32-cris.c:1143
 #, c-format
 msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
 msgstr "%s: omlokaliseringen %s är inte tillåten för global symbol: \"%s\" från sektionen %s"
 
-#: elf32-cris.c:1170
+#: elf32-cris.c:1158
 #, c-format
 msgid "%s: relocation %s in section %s with no GOT created"
 msgstr "%s: omlokalisering %s i sektionen %s utan GOT skapad"
 
-#: elf32-cris.c:1288
+#: elf32-cris.c:1277
 #, c-format
 msgid "%s: Internal inconsistency; no relocation section %s"
 msgstr "%s: Intern inkonsistens; ingen omlokaliseringssektion %s"
 
-#: elf32-cris.c:2514
+#: elf32-cris.c:2500
 #, c-format
 msgid ""
 "%s, section %s:\n"
@@ -870,492 +912,645 @@ msgstr ""
 "%s, sektion %s:\n"
 "  omlokaliseringen %s bör inte användas i ett delat objekt; kompilera om med -fPIC"
 
-#: elf32-cris.c:2991
+#: elf32-cris.c:2978
 msgid " [symbols have a _ prefix]"
 msgstr " [symboler har ett _-prefix]"
 
-#: elf32-cris.c:3030
+#: elf32-cris.c:3017
 #, c-format
 msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
 msgstr "%s: använder symboler med _-prefix, men skriver fil med symboler utan prefix"
 
-#: elf32-cris.c:3031
+#: elf32-cris.c:3018
 #, c-format
 msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
 msgstr "%s: använder symboler utan prefix, men skriver fil med symboler med _-prefix"
 
-#: elf32-frv.c:1217
+#: elf32-frv.c:1223
 #, c-format
 msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
 msgstr "%s: kompilerad med %s och länkad med moduler som använder icke-pic-omlokalisering"
 
-#: elf32-frv.c:1267
+#: elf32-frv.c:1273 elf32-iq2000.c:895
 #, c-format
 msgid "%s: compiled with %s and linked with modules compiled with %s"
 msgstr "%s: kompilerad med %s och länkad med moduler som kompilerats med %s"
 
-#: elf32-frv.c:1279
+#: elf32-frv.c:1285
 #, c-format
 msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
 msgstr "%s: använder andra okända e_flags-fält (0x%lx) än tidigare moduler (0x%lx)"
 
-#: elf32-frv.c:1315
+#: elf32-frv.c:1321 elf32-iq2000.c:933
 #, c-format
 msgid "private flags = 0x%lx:"
 msgstr "privata flaggor = 0x%lx:"
 
-#: elf32-gen.c:82 elf64-gen.c:82
+#: elf32-gen.c:83 elf64-gen.c:82
 #, c-format
 msgid "%s: Relocations in generic ELF (EM: %d)"
 msgstr "%s: Omlokalisering i allmän ELF (EM: %d)"
 
-#: elf32-hppa.c:671 elf64-ppc.c:2323
+#: elf32-hppa.c:672 elf32-m68hc1x.c:176 elf64-ppc.c:3118
 #, c-format
 msgid "%s: cannot create stub entry %s"
 msgstr "%s: kan inte skapa stubbstarten %s"
 
-#: elf32-hppa.c:956 elf32-hppa.c:3555
+#: elf32-hppa.c:957 elf32-hppa.c:3538
 #, c-format
 msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
 msgstr "%s(%s+0x%lx): kan inte nå %s, kompilera om med -ffunction-sections"
 
-#: elf32-hppa.c:1338 elf64-x86-64.c:673
+#: elf32-hppa.c:1340 elf64-x86-64.c:672 elf64-x86-64.c:797
 #, c-format
 msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
 msgstr "%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas; kompilera om med -fPIC"
 
-#: elf32-hppa.c:1358
+#: elf32-hppa.c:1360
 #, c-format
 msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
 msgstr "%s: omlokaliseringen %s bör inte användas då ett delat objekt skapas; kompilera om med -fPIC"
 
-#: elf32-hppa.c:1551
+#: elf32-hppa.c:1553
 #, c-format
 msgid "Could not find relocation section for %s"
 msgstr "Kunde inte hitta omlokaliseringssektion för %s"
 
-#: elf32-hppa.c:2855
+#: elf32-hppa.c:2828
 #, c-format
 msgid "%s: duplicate export stub %s"
 msgstr "%s: dubbel exportstubb %s"
 
-#: elf32-hppa.c:3433
+#: elf32-hppa.c:3416
 #, c-format
 msgid "%s(%s+0x%lx): fixing %s"
 msgstr "%s(%s+0x%lx): fixar %s"
 
-#: elf32-hppa.c:4080
+#: elf32-hppa.c:4039
 #, c-format
 msgid "%s(%s+0x%lx): cannot handle %s for %s"
 msgstr "%s(%s+0x%lx): kan inte hantera %s för %s"
 
-#: elf32-hppa.c:4393
+#: elf32-hppa.c:4357
 msgid ".got section not immediately after .plt section"
 msgstr ".got-sektionen följer inte omedelbart efter .plt-sektion"
 
-#: elf32-i386.c:379
+#: elf32-i386.c:326
 #, c-format
 msgid "%s: invalid relocation type %d"
 msgstr "%s: ogiltig omlokaliseringstyp %d"
 
-#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
+#: elf32-i386.c:841 elf32-s390.c:990 elf32-sparc.c:887 elf32-xtensa.c:637
+#: elf64-s390.c:943 elf64-x86-64.c:650
 #, c-format
 msgid "%s: bad symbol index: %d"
 msgstr "%s: felaktigt symbolindex: %d"
 
-#: elf32-i386.c:948
+#: elf32-i386.c:949 elf32-s390.c:1168 elf32-sh.c:6426 elf32-sparc.c:1011
+#: elf64-s390.c:1129
 #, c-format
 msgid "%s: `%s' accessed both as normal and thread local symbol"
 msgstr "%s: \"%s\" anropad både som lokal normal symbol och lokal trådsymbol"
 
-#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
-#: elf64-x86-64.c:761
+#: elf32-i386.c:1064 elf32-s390.c:1279 elf64-ppc.c:3929 elf64-s390.c:1243
+#: elf64-x86-64.c:886
 #, c-format
 msgid "%s: bad relocation section name `%s'"
 msgstr "%s: felaktig omlokaliseringssektionsnamn \"%s\""
 
-#: elf32-i386.c:1159 elf64-alpha.c:4768
-#, c-format
-msgid "%s: TLS local exec code cannot be linked into shared objects"
-msgstr "%s: lokal TLS-exekveringskod kan inte länkas in i delade objekt"
-
-#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
-#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
+#: elf32-i386.c:2908 elf32-m68k.c:1757 elf32-s390.c:3022 elf32-sparc.c:2879
+#: elf32-xtensa.c:2193 elf64-s390.c:3018 elf64-sparc.c:2664
+#: elf64-x86-64.c:2452
 #, c-format
 msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
 msgstr "%s(%s+0x%lx): olöslig omlokalisering mot symbolen \"%s\""
 
-#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
-#: elf64-x86-64.c:1986
+#: elf32-i386.c:2947 elf32-m68k.c:1796 elf32-s390.c:3072 elf64-s390.c:3068
+#: elf64-x86-64.c:2490
 #, c-format
 msgid "%s(%s+0x%lx): reloc against `%s': error %d"
 msgstr "%s(%s+0x%lx): omlokalisering mot \"%s\": fel %d"
 
-#: elf32-m32r.c:924
+#: elf32-ip2k.c:565 elf32-ip2k.c:571 elf32-ip2k.c:734 elf32-ip2k.c:740
+msgid "ip2k relaxer: switch table without complete matching relocation information."
+msgstr "ip2k-relaxerare: switchtabell utan helt matchande omlokaliseringsinformation."
+
+#: elf32-ip2k.c:588 elf32-ip2k.c:767
+msgid "ip2k relaxer: switch table header corrupt."
+msgstr "ip2k-relaxerare: switchtabellshuvud trasigt."
+
+#: elf32-ip2k.c:1395
+#, c-format
+msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr "ip2k-länkare: sidinstruktion saknas vid 0x%08lx (dest = 0x%08lx)."
+
+#: elf32-ip2k.c:1409
+#, c-format
+msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr "ip2k-länkare: redundant sidinstruktion vid 0x%08lx (dest = 0x%08lx)."
+
+#. Only if it's not an unresolved symbol.
+#: elf32-ip2k.c:1593
+msgid "unsupported relocation between data/insn address spaces"
+msgstr "omlokalisering mellan data/-instruktionsadressutrymmen stöds inte"
+
+#: elf32-iq2000.c:907 elf32-m68hc1x.c:1431 elf32-ppc.c:2175 elf64-sparc.c:3072
+#: elfxx-mips.c:9195
+#, c-format
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: använder andra e_flags-fält (0x%lx) än tidigare moduler (0x%lx)"
+
+#: elf32-m32r.c:930
 msgid "SDA relocation when _SDA_BASE_ not defined"
 msgstr "SDA-omlokalisering då _SDA_BASE_ inte är definierat"
 
-#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
-#: elf64-alpha.c:4313 elf64-ia64.c:3687
+#: elf32-m32r.c:1018 elf64-alpha.c:4279 elf64-alpha.c:4407 elf32-ia64.c:3958
+#: elf64-ia64.c:3958
 #, c-format
 msgid "%s: unknown relocation type %d"
 msgstr "%s: okänd omlokaliseringstyp %d"
 
-#: elf32-m32r.c:1221
+#: elf32-m32r.c:1226
 #, c-format
 msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
 msgstr "%s: Målet (%s) för en %s-omlokalisering är i fel sektion (%s)"
 
-#: elf32-m32r.c:1947
+#: elf32-m32r.c:1952
 #, c-format
 msgid "%s: Instruction set mismatch with previous modules"
 msgstr "%s: Instruktionsuppsättning passar inte med tidigare moduler"
 
-#: elf32-m32r.c:1970
+#: elf32-m32r.c:1975
 #, c-format
 msgid "private flags = %lx"
 msgstr "privata flaggor = %lx"
 
-#: elf32-m32r.c:1975
+#: elf32-m32r.c:1980
 msgid ": m32r instructions"
 msgstr ": m32r-instruktioner"
 
-#: elf32-m32r.c:1976
+#: elf32-m32r.c:1981
 msgid ": m32rx instructions"
 msgstr ": m32rx-instruktioner"
 
-#: elf32-m68k.c:413
+#: elf32-m68hc1x.c:1217
+#, c-format
+msgid "Reference to the far symbol `%s' using a wrong relocation may result in incorrect execution"
+msgstr "Referens till den avlägsna symbolen \"%s\" med hjälp av en felaktig omlokalisering kan resultera i felaktig exekvering"
+
+#: elf32-m68hc1x.c:1240
+#, c-format
+msgid "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)"
+msgstr "bankad adress [%lx:%04lx] (%lx) är inte i samma bank som den aktuella bankade adressen [%lx:%04lx] (%lx)"
+
+#: elf32-m68hc1x.c:1259
+#, c-format
+msgid "reference to a banked address [%lx:%04lx] in the normal address space at %04lx"
+msgstr "referens till en bankad adress [%lx:%04lx] i det normala adressutrymmet vid %04lx"
+
+#: elf32-m68hc1x.c:1396
+#, c-format
+msgid "%s: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers"
+msgstr "%s: länkar filer kompilerade för 16-bitars heltal (-mshort) och andra för 32-bitars heltal"
+
+#: elf32-m68hc1x.c:1404
+#, c-format
+msgid "%s: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double"
+msgstr "%s: länkar filer kompilerade för 32-bitars dubbelprecisionsflyttal (-fshort-double) och andra för 64-bitars dubbelprecisionsflyttal"
+
+#: elf32-m68hc1x.c:1414
+#, c-format
+msgid "%s: linking files compiled for HCS12 with others compiled for HC12"
+msgstr "%s: länkar filer kompilerade för HCS12 med andra kompilerade för HC12"
+
+#: elf32-m68hc1x.c:1462
+msgid "[abi=32-bit int, "
+msgstr "[abi=32-bitars heltal, "
+
+#: elf32-m68hc1x.c:1464
+msgid "[abi=16-bit int, "
+msgstr "[abi=16-bitars heltal, "
+
+#: elf32-m68hc1x.c:1467
+msgid "64-bit double, "
+msgstr "64-bitars dubbelprecisionsflyttal, "
+
+#: elf32-m68hc1x.c:1469
+msgid "32-bit double, "
+msgstr "32-bitars dubbelprecisionsflyttal, "
+
+#: elf32-m68hc1x.c:1472
+msgid "cpu=HC11]"
+msgstr "cpu=HC11]"
+
+#: elf32-m68hc1x.c:1474
+msgid "cpu=HCS12]"
+msgstr "cpu=HCS12]"
+
+#: elf32-m68hc1x.c:1476
+msgid "cpu=HC12]"
+msgstr "cpu=HC12]"
+
+#: elf32-m68hc1x.c:1479
+msgid " [memory=bank-model]"
+msgstr " [memory=bank-modell]"
+
+#: elf32-m68hc1x.c:1481
+msgid " [memory=flat]"
+msgstr " [memory=platt]"
+
+#: elf32-m68k.c:400
 msgid " [cpu32]"
 msgstr " [cpu32]"
 
-#: elf32-m68k.c:416
+#: elf32-m68k.c:403
 msgid " [m68000]"
 msgstr " [m68000]"
 
-#: elf32-mcore.c:354 elf32-mcore.c:457
+#: elf32-mcore.c:353 elf32-mcore.c:456
 #, c-format
 msgid "%s: Relocation %s (%d) is not currently supported.\n"
 msgstr "%s: Omlokalisering %s (%d) stöds för närvarande inte.\n"
 
-#: elf32-mcore.c:442
+#: elf32-mcore.c:441
 #, c-format
 msgid "%s: Unknown relocation type %d\n"
 msgstr "%s: Okänd omlokaliseringstyp %d\n"
 
-#: elf32-mips.c:1152 elf64-mips.c:1783
+#: elf32-mips.c:1170 elf64-mips.c:1717 elfn32-mips.c:1664
 msgid "32bits gp relative relocation occurs for an external symbol"
 msgstr "32-bitars gp-relativ omlokalisering förekom för en extern symbol"
 
-#: elf32-mips.c:1301
+#: elf32-mips.c:1314 elf64-mips.c:1830 elfn32-mips.c:1783
 #, c-format
 msgid "Linking mips16 objects into %s format is not supported"
 msgstr "Länkning av mips16-objekt till %s-format stöds inte"
 
-#: elf32-ppc.c:1460
+#: elf32-ppc.c:2056
+#, c-format
+msgid "generic linker can't handle %s"
+msgstr "allmän länkare kan inte hantera %s"
+
+#: elf32-ppc.c:2138
 #, c-format
 msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
 msgstr "%s: kompilerad med -mrelocatable och länkad med moduler som kompilerats normalt"
 
-#: elf32-ppc.c:1468
+#: elf32-ppc.c:2147
 #, c-format
 msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
 msgstr "%s: kompilerad normalt och länkad med moduler som kompilerats med -mrelocatable"
 
-#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
-#, c-format
-msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr "%s: använder andra e_flags-fält (0x%lx) än tidigare moduler (0x%lx)"
-
-#: elf32-ppc.c:1592
-#, c-format
-msgid "%s: Unknown special linker type %d"
-msgstr "%s: Okänd speciallänkartyp %d"
-
-#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
+#: elf32-ppc.c:3413
 #, c-format
 msgid "%s: relocation %s cannot be used when making a shared object"
 msgstr "%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas"
 
-#: elf32-ppc.c:3126 elf64-ppc.c:5473
+#. It does not make sense to have a procedure linkage
+#. table entry for a local symbol.
+#: elf32-ppc.c:3619
+#, c-format
+msgid "%s(%s+0x%lx): %s reloc against local symbol"
+msgstr "%s(%s+0x%lx): %s-omlokalisering mot lokal symbol"
+
+#: elf32-ppc.c:4862 elf64-ppc.c:7789
 #, c-format
 msgid "%s: unknown relocation type %d for symbol %s"
 msgstr "%s: okänd omlokaliseringstyp %d för symbolen %s"
 
-#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
+#: elf32-ppc.c:5113
 #, c-format
-msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
-msgstr "%s: Målet (%s) för en %s-omlokalisering är i fel utdatasektion (%s)"
+msgid "%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"
+msgstr "%s(%s+0x%lx): icke-tomt addendum på %s-omlokalisering mot \"%s\""
 
-#: elf32-ppc.c:3619
+#: elf32-ppc.c:5399 elf32-ppc.c:5425 elf32-ppc.c:5484
+#, c-format
+msgid "%s: the target (%s) of a %s relocation is in the wrong output section (%s)"
+msgstr "%s: målet (%s) för en %s-omlokalisering är i fel utdatasektion (%s)"
+
+#: elf32-ppc.c:5539
+#, c-format
+msgid "%s: relocation %s is not yet supported for symbol %s."
+msgstr "%s: omlokaliseringen %s stöds inte än för symbolen %s."
+
+#: elf32-ppc.c:5594 elf64-ppc.c:8461
+#, c-format
+msgid "%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
+msgstr "%s(%s+0x%lx): olöslig %s-omlokalisering mot symbolen \"%s\""
+
+#: elf32-ppc.c:5644 elf64-ppc.c:8507
+#, c-format
+msgid "%s(%s+0x%lx): %s reloc against `%s': error %d"
+msgstr "%s(%s+0x%lx): %s-omlokalisering mot \"%s\": fel %d"
+
+#: elf32-ppc.c:5888
+#, c-format
+msgid "corrupt or empty %s section in %s"
+msgstr "trasig eller tom %s-sektion i %s"
+
+#: elf32-ppc.c:5895
+#, c-format
+msgid "unable to read in %s section from %s"
+msgstr "kan inte läsa in %s-sektion från %s"
+
+#: elf32-ppc.c:5901
+#, c-format
+msgid "corrupt %s section in %s"
+msgstr "trasig %s-sektion i %s"
+
+#: elf32-ppc.c:5944
 #, c-format
-msgid "%s: Relocation %s is not yet supported for symbol %s."
-msgstr "%s: Omlokaliseringen %s stöds inte än för symbolen %s."
+msgid "warning: unable to set size of %s section in %s"
+msgstr "varning: kan inte ställa in storleken för sektionen %s i %s"
 
-#: elf32-sh.c:1964
+#: elf32-ppc.c:5994
+msgid "failed to allocate space for new APUinfo section."
+msgstr "misslyckades med att allokera utrymme för ny APUinfo-sektion."
+
+#: elf32-ppc.c:6013
+msgid "failed to compute new APUinfo section."
+msgstr "misslyckades med att beräkna ny APUinfo-sektion."
+
+#: elf32-ppc.c:6016
+msgid "failed to install new APUinfo section."
+msgstr "misslyckades med att installera ny APUinfo-sektion."
+
+#: elf32-s390.c:2256 elf64-s390.c:2226
+#, c-format
+msgid "%s(%s+0x%lx): invalid instruction for TLS relocation %s"
+msgstr "%s(%s+0x%lx): ogiltig instruktion för TLS-omlokalisering %s"
+
+#: elf32-sh.c:2103
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
 msgstr "%s: 0x%lx: varning: felaktigt R_SH_USES-avstånd"
 
-#: elf32-sh.c:1976
+#: elf32-sh.c:2115
 #, c-format
 msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
 msgstr "%s: 0x%lx: varning: R_SH_USES pekar till okänd instruktion 0x%x"
 
-#: elf32-sh.c:1993
+#: elf32-sh.c:2132
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
 msgstr "%s: 0x%lx: varning: felaktigt R_SH_USES-inläsningsavstånd"
 
-#: elf32-sh.c:2008
+#: elf32-sh.c:2147
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected reloc"
 msgstr "%s: 0x%lx: varning: kunde inte hitta förväntad omlokalisering"
 
-#: elf32-sh.c:2036
+#: elf32-sh.c:2175
 #, c-format
 msgid "%s: 0x%lx: warning: symbol in unexpected section"
 msgstr "%s: 0x%lx: varning: symbol i oväntad sektion"
 
-#: elf32-sh.c:2153
+#: elf32-sh.c:2300
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
 msgstr "%s: 0x%lx: varning: kunde inte hitta förväntad COUNT-omlokalisering"
 
-#: elf32-sh.c:2162
+#: elf32-sh.c:2309
 #, c-format
 msgid "%s: 0x%lx: warning: bad count"
 msgstr "%s: 0x%lx: varning: felaktigt antal"
 
-#: elf32-sh.c:2550 elf32-sh.c:2926
+#: elf32-sh.c:2712 elf32-sh.c:3088
 #, c-format
 msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
 msgstr "%s: 0x%lx: ödesdigert: omlokalisering ger överspill vid förenklingen"
 
-#: elf32-sh.c:4073 elf64-sh64.c:1576
+#: elf32-sh.c:4654 elf64-sh64.c:1585
 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
 msgstr "Oväntat STO_SH5_ISA32 på lokal symbol hanteras inte"
 
-#: elf32-sh.c:4284
+#: elf32-sh.c:4809
+#, c-format
+msgid "%s: unresolvable relocation against symbol `%s' from %s section"
+msgstr "%s: olöslig omlokalisering mot symbolen \"%s\" från sektionen %s"
+
+#: elf32-sh.c:4881
 #, c-format
 msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
 msgstr "%s: 0x%lx: ödesdigert: ojusterat grenmål för omlokalisering för förenklingsstöd"
 
-#: elf32-sh64.c:203 elf64-sh64.c:2364
+#: elf32-sh.c:6627 elf64-alpha.c:4848
+#, c-format
+msgid "%s: TLS local exec code cannot be linked into shared objects"
+msgstr "%s: lokal TLS-exekveringskod kan inte länkas in i delade objekt"
+
+#: elf32-sh64.c:221 elf64-sh64.c:2407
 #, c-format
 msgid "%s: compiled as 32-bit object and %s is 64-bit"
 msgstr "%s: kompilerat som 32-bitarsobjekt och %s är 64-bitars"
 
-#: elf32-sh64.c:206 elf64-sh64.c:2367
+#: elf32-sh64.c:224 elf64-sh64.c:2410
 #, c-format
 msgid "%s: compiled as 64-bit object and %s is 32-bit"
 msgstr "%s: kompilerat som 64-bitarsobjekt och %s är 32-bitars"
 
-#: elf32-sh64.c:208 elf64-sh64.c:2369
+#: elf32-sh64.c:226 elf64-sh64.c:2412
 #, c-format
 msgid "%s: object size does not match that of target %s"
 msgstr "%s: objektstorleken stämmer inte överens med den hos målet %s"
 
-#: elf32-sh64.c:440 elf64-sh64.c:2941
+#: elf32-sh64.c:461 elf64-sh64.c:2990
 #, c-format
 msgid "%s: encountered datalabel symbol in input"
 msgstr "%s: påträffade dataetikettssymbol i indata"
 
-#: elf32-sh64.c:523
+#: elf32-sh64.c:544
 msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
 msgstr "PTB passar inte: en SHmedia-adress (bit 0 == 1)"
 
-#: elf32-sh64.c:526
+#: elf32-sh64.c:547
 msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
 msgstr "PTA passar inte: en SHcompact-adress (bit 0 == 0)"
 
-#: elf32-sh64.c:544
+#: elf32-sh64.c:565
 #, c-format
 msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
 msgstr "%s: GAS-fel: oväntad PTB-instruktion med R_SH_PT_16"
 
-#: elf32-sh64.c:593 elf64-sh64.c:1703
+#: elf32-sh64.c:614 elf64-sh64.c:1748
 #, c-format
 msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
 msgstr "%s: fel: ojusterad omlokaliseringstyp %d på %08x omlokalisering %08x\n"
 
-#: elf32-sh64.c:677
+#: elf32-sh64.c:698
 #, c-format
 msgid "%s: could not write out added .cranges entries"
 msgstr "%s: kunde inte skriva ut tillagda .cranges-poster"
 
-#: elf32-sh64.c:739
+#: elf32-sh64.c:760
 #, c-format
 msgid "%s: could not write out sorted .cranges entries"
 msgstr "%s: kunde inte skriva ut sorterade cranges-poster"
 
-#: elf32-sparc.c:1535 elf64-sparc.c:2224
+#: elf32-sparc.c:2521 elf64-sparc.c:2314
 #, c-format
 msgid "%s: probably compiled without -fPIC?"
 msgstr "%s: troligen kompilerad utan -fPIC?"
 
-#: elf32-sparc.c:2002
+#: elf32-sparc.c:3348
 #, c-format
 msgid "%s: compiled for a 64 bit system and target is 32 bit"
 msgstr "%s: kompilerat för ett 64-bitarssystem och målet är 32-bitars"
 
-#: elf32-sparc.c:2016
+#: elf32-sparc.c:3362
 #, c-format
 msgid "%s: linking little endian files with big endian files"
 msgstr "%s: länkar little endian-filer med big endian-filer"
 
-#: elf32-v850.c:682
+#: elf32-v850.c:753
 #, c-format
 msgid "Variable `%s' cannot occupy in multiple small data regions"
 msgstr "Variabel \"%s\" kan inte befinna sig i flera små dataområden"
 
-#: elf32-v850.c:685
+#: elf32-v850.c:756
 #, c-format
 msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
 msgstr "Variabel \"%s\" kan bara vara i ett av de små, tomma och pyttesmå dataområdena"
 
-#: elf32-v850.c:688
+#: elf32-v850.c:759
 #, c-format
 msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
 msgstr "Variabel \"%s\" kan inte vara i både små och tomma dataområden samtidigt"
 
-#: elf32-v850.c:691
+#: elf32-v850.c:762
 #, c-format
 msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
 msgstr "Variabel \"%s\" kan inte vara i både små och pyttesmå dataområden samtidigt"
 
-#: elf32-v850.c:694
+#: elf32-v850.c:765
 #, c-format
 msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
 msgstr "Variabel \"%s\" kan inte vara i både tomma och pyttesmå dataområden samtidigt"
 
-#: elf32-v850.c:1072
+#: elf32-v850.c:1144
 msgid "FAILED to find previous HI16 reloc\n"
 msgstr "MISSLYCKADES med att hitta tidigare HI16-omlokalisering\n"
 
-#: elf32-v850.c:1703
+#: elf32-v850.c:1789
 msgid "could not locate special linker symbol __gp"
 msgstr "kunde inte lokalisera speciell länkarsymbol __gp"
 
-#: elf32-v850.c:1707
+#: elf32-v850.c:1793
 msgid "could not locate special linker symbol __ep"
 msgstr "kunde inte lokalisera speciell länkarsymbol __ep"
 
-#: elf32-v850.c:1711
+#: elf32-v850.c:1797
 msgid "could not locate special linker symbol __ctbp"
 msgstr "kunde inte lokalisera speciell länkarsymbol __ctbp"
 
-#: elf32-v850.c:1875
+#: elf32-v850.c:1963
 #, c-format
 msgid "%s: Architecture mismatch with previous modules"
 msgstr "%s: Arkitekturen passar inte ihop med tidigare moduler"
 
-#: elf32-v850.c:1895
+#: elf32-v850.c:1983
 #, c-format
 msgid "private flags = %lx: "
 msgstr "privata flaggor = %lx: "
 
-#: elf32-v850.c:1900
+#: elf32-v850.c:1988
 msgid "v850 architecture"
 msgstr "v850-arkitektur"
 
-#: elf32-v850.c:1901
+#: elf32-v850.c:1989
 msgid "v850e architecture"
 msgstr "v850e-arkitektur"
 
-#: elf32-v850.c:1902
-msgid "v850ea architecture"
-msgstr "v850ea-arkitektur"
-
-#: elf32-vax.c:546
+#: elf32-vax.c:549
 msgid " [nonpic]"
 msgstr " [icke-pic]"
 
-#: elf32-vax.c:549
+#: elf32-vax.c:552
 msgid " [d-float]"
 msgstr " [d-flyttal]"
 
-#: elf32-vax.c:552
+#: elf32-vax.c:555
 msgid " [g-float]"
 msgstr " [g-flyttal]"
 
-#: elf32-vax.c:674
+#: elf32-vax.c:663
 #, c-format
 msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
 msgstr "%s: varning: GOT-addendum %ld till \"%s\" stämmer inte överens med tidigare GOT-addendum %ld"
 
-#: elf32-vax.c:1679
+#: elf32-vax.c:1667
 #, c-format
 msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
 msgstr "%s: varning: PLT-addendum %d till \"%s\" från sektionen %s ignorerades"
 
-#: elf32-vax.c:1814
+#: elf32-vax.c:1802
 #, c-format
 msgid "%s: warning: %s relocation against symbol `%s' from %s section"
 msgstr "%s: varning: %s-omlokalisering mot symbolen \"%s\" från sektionen %s"
 
-#: elf32-vax.c:1820
+#: elf32-vax.c:1808
 #, c-format
 msgid "%s: warning: %s relocation to 0x%x from %s section"
 msgstr "%s: varning: %s-omlokalisering till 0x%x från sektionen %s"
 
-#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
+#: elf32-xstormy16.c:462 elf32-ia64.c:2450 elf64-ia64.c:2450
 msgid "non-zero addend in @fptr reloc"
 msgstr "icke-tomt addendum i @fptr-omlokalisering"
 
-#: elf64-alpha.c:1097
+#: elf64-alpha.c:1108
 msgid "GPDISP relocation did not find ldah and lda instructions"
 msgstr "GPDISP-omlokalisering hittade inga ldah- och lda-instruktioner"
 
-#: elf64-alpha.c:3675
+#: elf64-alpha.c:3731
 #, c-format
 msgid "%s: .got subsegment exceeds 64K (size %d)"
 msgstr "%s: .got-subsegment överskrider 64 kB (storlek %d)"
 
-#: elf64-alpha.c:4498 elf64-alpha.c:4510
+#: elf64-alpha.c:4602 elf64-alpha.c:4614
 #, c-format
 msgid "%s: gp-relative relocation against dynamic symbol %s"
 msgstr "%s: gp-relativ omlokalisering mot dynamiska symbolen %s"
 
-#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#: elf64-alpha.c:4640 elf64-alpha.c:4773
 #, c-format
 msgid "%s: pc-relative relocation against dynamic symbol %s"
 msgstr "%s: pc-relativ omlokalisering mot dynamiska symbolen %s"
 
-#: elf64-alpha.c:4564
+#: elf64-alpha.c:4668
 #, c-format
 msgid "%s: change in gp: BRSGP %s"
 msgstr "%s: ändring i gp: BRSGP %s"
 
-#: elf64-alpha.c:4589
+#: elf64-alpha.c:4693
 msgid "<unknown>"
 msgstr "<okänd>"
 
-#: elf64-alpha.c:4594
+#: elf64-alpha.c:4698
 #, c-format
 msgid "%s: !samegp reloc against symbol without .prologue: %s"
 msgstr "%s: !samegp-omlokalisering mot symbol utan .prologue: %s"
 
-#: elf64-alpha.c:4639
+#: elf64-alpha.c:4749
 #, c-format
 msgid "%s: unhandled dynamic relocation against %s"
 msgstr "%s: ohanterad dynamisk omlokalisering mot %s"
 
-#: elf64-alpha.c:4752
+#: elf64-alpha.c:4832
 #, c-format
 msgid "%s: dtp-relative relocation against dynamic symbol %s"
 msgstr "%s: dtp-relativ omlokalisering mot dynamiska symbolen %s"
 
-#: elf64-alpha.c:4775
+#: elf64-alpha.c:4855
 #, c-format
 msgid "%s: tp-relative relocation against dynamic symbol %s"
 msgstr "%s: tp-relativ omlokalisering mot dynamiska symbolen %s"
 
-#: elf64-hppa.c:2080
+#: elf64-hppa.c:2086
 #, c-format
 msgid "stub entry for %s cannot load .plt, dp offset = %ld"
 msgstr "stubbpost för %s kan inte läsa in .plt, dp-avstånd = %ld"
 
-#: elf64-mmix.c:1002
+#: elf64-mmix.c:1032
 #, c-format
 msgid ""
 "%s: Internal inconsistency error for value for\n"
@@ -1364,46 +1559,46 @@ msgstr ""
 "%s: Intern inkkonsistensfel för värdet för\n"
 " länkarallokerat globalt register: länkat: 0x%lx%08lx != avslappnat: 0x%lx%08lx\n"
 
-#: elf64-mmix.c:1386
+#: elf64-mmix.c:1416
 #, c-format
 msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
 msgstr "%s: bas-plus-avståndsomlokalisering mot registersymbol: (okänd) i %s"
 
-#: elf64-mmix.c:1391
+#: elf64-mmix.c:1421
 #, c-format
 msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
 msgstr "%s: bas-plus-avståndsomlokalisering mot registersymbol: %s i %s"
 
-#: elf64-mmix.c:1435
+#: elf64-mmix.c:1465
 #, c-format
 msgid "%s: register relocation against non-register symbol: (unknown) in %s"
 msgstr "%s: registeromlokalisering mot icke-registersymbol: (okänd) i %s"
 
-#: elf64-mmix.c:1440
+#: elf64-mmix.c:1470
 #, c-format
 msgid "%s: register relocation against non-register symbol: %s in %s"
 msgstr "%s: registeromlokalisering mot icke-registersymbol: %s i %s"
 
-#: elf64-mmix.c:1477
+#: elf64-mmix.c:1507
 #, c-format
 msgid "%s: directive LOCAL valid only with a register or absolute value"
 msgstr "%s: LOCAL-direktivet är endast giltigt med ett register eller absolutvärde"
 
-#: elf64-mmix.c:1505
+#: elf64-mmix.c:1535
 #, c-format
 msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
 msgstr "%s: LOCAL-direktiv: Register $%ld är inte ett lokalt register. Första globala registret är $%ld."
 
-#: elf64-mmix.c:1965
+#: elf64-mmix.c:1994
 #, c-format
 msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
 msgstr "%s: Fel: flera definitioner av \"%s\"; början på %s är inställd i en tidigare länkad fil\n"
 
-#: elf64-mmix.c:2024
+#: elf64-mmix.c:2053
 msgid "Register section has contents\n"
 msgstr "Registersektion har innehåll\n"
 
-#: elf64-mmix.c:2186
+#: elf64-mmix.c:2216
 #, c-format
 msgid ""
 "Internal inconsistency: remaining %u != max %u.\n"
@@ -1412,574 +1607,617 @@ msgstr ""
 "Intern inkonsekvens: återstående %u != max %u.\n"
 "  Rapportera gärna detta fel."
 
-#: elf64-ppc.c:1669 libbfd.c:1435
+#: elf64-ppc.c:2388 libbfd.c:831
 #, c-format
 msgid "%s: compiled for a big endian system and target is little endian"
 msgstr "%s: kompilerad för big endian-system och målet är little endian"
 
-#: elf64-ppc.c:1671 libbfd.c:1437
+#: elf64-ppc.c:2391 libbfd.c:833
 #, c-format
 msgid "%s: compiled for a little endian system and target is big endian"
 msgstr "%s: kompilerad för ett little endian-system och målet är big endian"
 
-#: elf64-ppc.c:3610
+#: elf64-ppc.c:4857
 #, c-format
 msgid "%s: unexpected reloc type %u in .opd section"
 msgstr "%s: oväntad omlokaliseringstyp %u i .opd-sektion"
 
-#: elf64-ppc.c:3630
+#: elf64-ppc.c:4877
 #, c-format
 msgid "%s: .opd is not a regular array of opd entries"
 msgstr "%s: .opd är inte en vanlig vektor med opd-poster"
 
-#: elf64-ppc.c:3672
+#: elf64-ppc.c:4897
 #, c-format
 msgid "%s: undefined sym `%s' in .opd section"
 msgstr "%s: odefinierad symbol \"%s\" i .opd-sektion"
 
-#: elf64-ppc.c:4397
+#: elf64-ppc.c:6136
 #, c-format
 msgid "can't find branch stub `%s'"
 msgstr "kan inte hitta grenstubb \"%s\""
 
-#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#: elf64-ppc.c:6175 elf64-ppc.c:6250
 #, c-format
 msgid "linkage table error against `%s'"
 msgstr "länktabellsfel mot \"%s\""
 
-#: elf64-ppc.c:4573
+#: elf64-ppc.c:6340
 #, c-format
 msgid "can't build branch stub `%s'"
 msgstr "kan inte bygga grenstubb \"%s\""
 
-#: elf64-ppc.c:5179
+#: elf64-ppc.c:7047
+msgid ".glink and .plt too far apart"
+msgstr ".glink och .plt för långt ifrån varandra"
+
+#: elf64-ppc.c:7135
 msgid "stubs don't match calculated size"
 msgstr "stubbar stämmer inte överens med beräknad storlek"
 
-#: elf64-ppc.c:5828
+#: elf64-ppc.c:7147
 #, c-format
-msgid "%s: Relocation %s is not supported for symbol %s."
-msgstr "%s: Omlokaliseringen %s stöds inte för symbolen %s."
+msgid ""
+"linker stubs in %u groups\n"
+"  branch       %lu\n"
+"  toc adjust   %lu\n"
+"  long branch  %lu\n"
+"  long toc adj %lu\n"
+"  plt call     %lu"
+msgstr ""
+"länkarstubbar i %u grupper\n"
+"  gren           %lu\n"
+"  toc-justering  %lu\n"
+"  lång gren      %lu\n"
+"  lång toc-just. %lu\n"
+"  plt-anrop      %lu"
+
+#: elf64-ppc.c:7723
+#, c-format
+msgid "%s(%s+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc"
+msgstr "%s(%s+0x%lx): flera automatiska TOC stöds inte vid användning av dina crt-filer; kompilera om med -mminimal-toc eller uppgradera gcc"
 
-#: elf64-ppc.c:5872
+#: elf64-ppc.c:7731
 #, c-format
-msgid "%s: error: relocation %s not a multiple of 4"
-msgstr "%s: fel: omlokaliseringen %s är inte en multipel av 4"
+msgid "%s(%s+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern"
+msgstr "%s(%s+0x%lx): syskonanropsoptimering till \"%s\" stöder inte flera automatiska TOC; kompilera om med -mminimal-toc eller -fno-optimize-sibling-calls, eller gör \"%s\" extern"
 
-#: elf64-sparc.c:1280
+#: elf64-ppc.c:8329
+#, c-format
+msgid "%s: relocation %s is not supported for symbol %s."
+msgstr "%s: omlokaliseringen %s stöds inte för symbolen %s."
+
+#: elf64-ppc.c:8408
+#, c-format
+msgid "%s: error: relocation %s not a multiple of %d"
+msgstr "%s: fel: omlokaliseringen %s är inte en multipel av %d"
+
+#: elf64-sparc.c:1370
 #, c-format
 msgid "%s: check_relocs: unhandled reloc type %d"
 msgstr "%s: check_relocs: ohanterad omlokaliseringstyp %d"
 
-#: elf64-sparc.c:1317
+#: elf64-sparc.c:1407
 #, c-format
 msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
 msgstr "%s: Endast register %%g[2367] kan deklareras med STT_REGISTER"
 
-#: elf64-sparc.c:1337
+#: elf64-sparc.c:1427
 #, c-format
 msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
 msgstr "Register %%g%d används inkompatibelt: %s i %s, tidigare %s i %s"
 
-#: elf64-sparc.c:1360
+#: elf64-sparc.c:1450
 #, c-format
 msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
 msgstr "Symbolen \"%s\" har olika typer: REGISTER i %s, tidigare %s i %s"
 
-#: elf64-sparc.c:1406
+#: elf64-sparc.c:1496
 #, c-format
 msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
 msgstr "Symbolen \"%s\" har olika typer: %s i %s, tidigare REGISTER i %s"
 
-#: elf64-sparc.c:2970
+#: elf64-sparc.c:3053
 #, c-format
 msgid "%s: linking UltraSPARC specific with HAL specific code"
 msgstr "%s: länkar UltraSPARC-specifik med HAL-specifik kod"
 
-#: elfcode.h:1198
+#: elf64-x86-64.c:739
+#, c-format
+msgid "%s: %s' accessed both as normal and thread local symbol"
+msgstr "%s: \"%s\" anropad både som lokal normal symbol och lokal trådsymbol"
+
+#: elfcode.h:1113
 #, c-format
 msgid "%s: version count (%ld) does not match symbol count (%ld)"
 msgstr "%s: versionsantal (%ld) stämmer inte med symbolantal (%ld)"
 
-#: elflink.c:440
+#: elfcode.h:1342
+#, c-format
+msgid "%s(%s): relocation %d has invalid symbol index %ld"
+msgstr "%s(%s): omlokalisering %d har ogiltigt symbolindex %ld"
+
+#: elflink.c:1456
 #, c-format
-msgid "%s: Section %s is too large to add hole of %ld bytes"
-msgstr "%s: Sektionen %s är för stor för att stoppa hål med %ld byte i"
+msgid "%s: warning: unexpected redefinition of indirect versioned symbol `%s'"
+msgstr "%s: varning: oväntad omdefinition av indirekt versionsangiven symbol \"%s\""
 
-#: elflink.h:1090
+#: elflink.c:1807
 #, c-format
-msgid "%s: warning: unexpected redefinition of `%s'"
-msgstr "%s: varning: oväntad omdefinition av \"%s\""
+msgid "%s: undefined versioned symbol name %s"
+msgstr "%s: odefinierat symbolnamn med version %s"
+
+#: elflink.c:2142
+#, c-format
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr "%s: omlokaliseringsstorleken stämmer inte överens i sektionen %s %s"
 
-#: elflink.h:1727
+#: elflink.c:2434
+#, c-format
+msgid "warning: type and size of dynamic symbol `%s' are not defined"
+msgstr "varning: typen och storleken på dynamiska symbolen \"%s\" är inte definierade"
+
+#: elflink.h:1022
 #, c-format
 msgid "%s: %s: invalid version %u (max %d)"
 msgstr "%s: %s: ogiltig version %u (max %d)"
 
-#: elflink.h:1768
+#: elflink.h:1063
 #, c-format
 msgid "%s: %s: invalid needed version %d"
 msgstr "%s: %s: ogiltig krävd version %d"
 
-#: elflink.h:1890
+#: elflink.h:1238
 #, c-format
-msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
-msgstr "Varning: storleken på symbolen \"%s\" ändrades från %lu till %lu i %s"
+msgid "Warning: alignment %u of symbol `%s' in %s is smaller than %u in %s"
+msgstr "Varning: justeringen %u på symbolen \"%s\" i %s är mindre än %u i %s"
 
-#: elflink.h:3174
+#: elflink.h:1252
 #, c-format
-msgid "%s: .preinit_array section is not allowed in DSO"
-msgstr "%s: .preinit_array-sektionen är inte tillåten i DSO"
+msgid "Warning: size of symbol `%s' changed from %lu in %s to %lu in %s"
+msgstr "Varning: storleken på symbolen \"%s\" ändrades från %lu i %s till %lu i %s"
 
-#: elflink.h:4030
+#: elflink.h:2160
 #, c-format
-msgid "warning: type and size of dynamic symbol `%s' are not defined"
-msgstr "varning: typen och storleken på dynamiska symbolen \"%s\" är inte definierade"
+msgid "%s: undefined version: %s"
+msgstr "%s: odefinierad version: %s"
 
-#: elflink.h:4345
+#: elflink.h:2226
 #, c-format
-msgid "%s: undefined versioned symbol name %s"
-msgstr "%s: odefinierat symbolnamn med version %s"
-
-#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
-msgid "Error: out of memory"
-msgstr "Fel: slut på minne"
+msgid "%s: .preinit_array section is not allowed in DSO"
+msgstr "%s: .preinit_array-sektionen är inte tillåten i DSO"
 
-#: elflink.h:4781
+#: elflink.h:3078
 msgid "Not enough memory to sort relocations"
 msgstr "Inte tillräckligt med minne för att sortera omlokaliseringar"
 
-#: elflink.h:5682 elflink.h:5725
+#: elflink.h:3958 elflink.h:4001
 #, c-format
 msgid "%s: could not find output section %s"
 msgstr "%s: kunde inte hitta utdatasektionen %s"
 
-#: elflink.h:5688
+#: elflink.h:3964
 #, c-format
 msgid "warning: %s section has zero size"
-msgstr "varning: %s-sektionen har nollstorlek"
+msgstr "varning: sektionen %s har nollstorlek"
 
-#: elflink.h:6275
+#: elflink.h:4483
+#, c-format
+msgid "%s: %s symbol `%s' in %s is referenced by DSO"
+msgstr "%s: %s-symbolen \"%s\" i %s refereras till av DSO"
+
+#: elflink.h:4564
 #, c-format
 msgid "%s: could not find output section %s for input section %s"
 msgstr "%s: kunde inte hitta utdatasektionen %s för indatasektionen %s"
 
-#: elflink.h:6486
+#: elflink.h:4666
 #, c-format
-msgid "%s: relocation size mismatch in %s section %s"
-msgstr "%s: omlokaliseringsstorleken stämmer inte överens i %s-sektionen %s"
-
-#: elflink.h:6849
-msgid "warning: relocation against removed section; zeroing"
-msgstr "varning: omlokalisering mot borttagen sektion; nollställer"
+msgid "%s: %s symbol `%s' isn't defined"
+msgstr "%s: %s-symbolen \"%s\" är inte definierad"
 
-#: elflink.h:6879
-msgid "warning: relocation against removed section"
-msgstr "varning: omlokalisering mot borttagen sektion"
+#: elflink.h:5053 elflink.h:5095
+msgid "%T: discarded in section `%s' from %s\n"
+msgstr "%T: bortkastade i sektionen \"%s\" från %s\n"
 
-#: elflink.h:6892
-#, c-format
-msgid "local symbols in discarded section %s"
-msgstr "lokala symboler i bortkastade sektionen %s"
-
-#: elfxx-mips.c:734
+#: elfxx-mips.c:887
 msgid "static procedure (no name)"
 msgstr "statisk procedur (inget namn)"
 
-#: elfxx-mips.c:1601
+#: elfxx-mips.c:1897
 msgid "not enough GOT space for local GOT entries"
 msgstr "inte tillräckligt med GOT-utrymme för lokala GOT-poster"
 
-#: elfxx-mips.c:2750
+#: elfxx-mips.c:3691
 #, c-format
 msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
 msgstr "%s: %s+0x%lx: hoppa till stubbrutin som inte är jal"
 
-#: elfxx-mips.c:4270
+#: elfxx-mips.c:5192
 #, c-format
 msgid "%s: Malformed reloc detected for section %s"
 msgstr "%s: Felaktig omlokalisering för sektion %s upptäckt"
 
-#: elfxx-mips.c:4348
+#: elfxx-mips.c:5266
 #, c-format
 msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
 msgstr "%s: CALL16-omlokalisering vid 0x%lx är inte mot global symbol"
 
-#: elfxx-mips.c:7301
+#: elfxx-mips.c:8692
 #, c-format
 msgid "%s: illegal section name `%s'"
 msgstr "%s: ogiltigt sektionsnamn \"%s\""
 
-#: elfxx-mips.c:7615
+#: elfxx-mips.c:9025
+#, c-format
+msgid "%s: endianness incompatible with that of the selected emulation"
+msgstr "%s: endianess inkompatibel med den för den valda emuleringen"
+
+#: elfxx-mips.c:9037
 #, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s: länkar PIC-filer med icke-PIC-filer"
+msgid "%s: ABI is incompatible with that of the selected emulation"
+msgstr "%s: ABI är inkompatibelt med den för den valda emuleringen"
 
-#: elfxx-mips.c:7625
+#: elfxx-mips.c:9104
 #, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
-msgstr "%s: länkar abicalls-filer med icke-abicalls-filer"
+msgid "%s: warning: linking PIC files with non-PIC files"
+msgstr "%s: varning: länkar PIC-filer med icke-PIC-filer"
 
-#: elfxx-mips.c:7654
+#: elfxx-mips.c:9121
 #, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%s: ISA (-mips%d) passar inte med tidigare moduler (-mips%d)"
+msgid "%s: linking 32-bit code with 64-bit code"
+msgstr "%s: länkar 32-bitarskod med 64-bitarskod"
 
-#: elfxx-mips.c:7676
+#: elfxx-mips.c:9149
 #, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%s: ISA (%d) passar inte med tidigare moduler (%d)"
+msgid "%s: linking %s module with previous %s modules"
+msgstr "%s: länkar %s-modul med tidigare %s-moduler"
 
-#: elfxx-mips.c:7699
+#: elfxx-mips.c:9172
 #, c-format
 msgid "%s: ABI mismatch: linking %s module with previous %s modules"
 msgstr "%s: ABI passar inte: länkar %s-modul med tidigare %s-moduler"
 
-#: elfxx-mips.c:7759
+#: elfxx-mips.c:9241
 msgid " [abi=O32]"
 msgstr " [abi=O32]"
 
-#: elfxx-mips.c:7761
+#: elfxx-mips.c:9243
 msgid " [abi=O64]"
 msgstr " [abi=O64]"
 
-#: elfxx-mips.c:7763
+#: elfxx-mips.c:9245
 msgid " [abi=EABI32]"
 msgstr " [abi=EABI32]"
 
-#: elfxx-mips.c:7765
+#: elfxx-mips.c:9247
 msgid " [abi=EABI64]"
 msgstr " [abi=EABI64]"
 
-#: elfxx-mips.c:7767
+#: elfxx-mips.c:9249
 msgid " [abi unknown]"
 msgstr " [okänt abi]"
 
-#: elfxx-mips.c:7769
+#: elfxx-mips.c:9251
 msgid " [abi=N32]"
 msgstr " [abi=N32]"
 
-#: elfxx-mips.c:7771
+#: elfxx-mips.c:9253
 msgid " [abi=64]"
 msgstr " [abi=64]"
 
-#: elfxx-mips.c:7773
+#: elfxx-mips.c:9255
 msgid " [no abi set]"
 msgstr " [inget abi inställt]"
 
-#: elfxx-mips.c:7776
+#: elfxx-mips.c:9258
 msgid " [mips1]"
 msgstr " [mips1]"
 
-#: elfxx-mips.c:7778
+#: elfxx-mips.c:9260
 msgid " [mips2]"
 msgstr " [mips2]"
 
-#: elfxx-mips.c:7780
+#: elfxx-mips.c:9262
 msgid " [mips3]"
 msgstr " [mips3]"
 
-#: elfxx-mips.c:7782
+#: elfxx-mips.c:9264
 msgid " [mips4]"
 msgstr " [mips4]"
 
-#: elfxx-mips.c:7784
+#: elfxx-mips.c:9266
 msgid " [mips5]"
 msgstr " [mips5]"
 
-#: elfxx-mips.c:7786
+#: elfxx-mips.c:9268
 msgid " [mips32]"
 msgstr " [mips32]"
 
-#: elfxx-mips.c:7788
+#: elfxx-mips.c:9270
 msgid " [mips64]"
 msgstr " [mips64]"
 
-#: elfxx-mips.c:7790
+#: elfxx-mips.c:9272
+msgid " [mips32r2]"
+msgstr " [mips32r2]"
+
+#: elfxx-mips.c:9274
 msgid " [unknown ISA]"
 msgstr " [okänd ISA]"
 
-#: elfxx-mips.c:7793
+#: elfxx-mips.c:9277
 msgid " [mdmx]"
 msgstr " [mdmx]"
 
-#: elfxx-mips.c:7796
+#: elfxx-mips.c:9280
 msgid " [mips16]"
 msgstr " [mips16]"
 
-#: elfxx-mips.c:7799
+#: elfxx-mips.c:9283
 msgid " [32bitmode]"
 msgstr " [32-bitarsläge]"
 
-#: elfxx-mips.c:7801
+#: elfxx-mips.c:9285
 msgid " [not 32bitmode]"
 msgstr " [inte 32-bitarsläge]"
 
-#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
+#: i386linux.c:457 m68klinux.c:461 sparclinux.c:458
 #, c-format
 msgid "Output file requires shared library `%s'\n"
 msgstr "Utdatafilen kräver delade biblioteket \"%s\"\n"
 
-#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
+#: i386linux.c:465 m68klinux.c:469 sparclinux.c:466
 #, c-format
 msgid "Output file requires shared library `%s.so.%s'\n"
 msgstr "Utdatafilen kräver delade biblioteket \"%s.so.%s\"\n"
 
-#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
-#: sparclinux.c:657 sparclinux.c:707
+#: i386linux.c:654 i386linux.c:704 m68klinux.c:661 m68klinux.c:709
+#: sparclinux.c:656 sparclinux.c:706
 #, c-format
 msgid "Symbol %s not defined for fixups\n"
 msgstr "Symbolen %s är inte definierad för fixar\n"
 
-#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
+#: i386linux.c:728 m68klinux.c:733 sparclinux.c:730
 msgid "Warning: fixup count mismatch\n"
 msgstr "Varning: antalet fixar stämmer inte\n"
 
-#: ieee.c:235
+#: ieee.c:293
 #, c-format
 msgid "%s: string too long (%d chars, max 65535)"
 msgstr "%s: strängen är för lång (%d tecken, max 65535)"
 
-#: ieee.c:365
+#: ieee.c:428
 #, c-format
 msgid "%s: unrecognized symbol `%s' flags 0x%x"
 msgstr "%s: okänd symbol \"%s\" flaggor 0x%x"
 
-#: ieee.c:877
+#: ieee.c:938
 #, c-format
 msgid "%s: unimplemented ATI record %u for symbol %u"
 msgstr "%s: inte implementerad ATI-post %u för symbolen %u"
 
-#: ieee.c:902
+#: ieee.c:963
 #, c-format
 msgid "%s: unexpected ATN type %d in external part"
 msgstr "%s: oväntad ATN-typ %d i extern del"
 
-#: ieee.c:924
+#: ieee.c:985
 #, c-format
 msgid "%s: unexpected type after ATN"
 msgstr "%s: oväntad typ efter ATN"
 
-#: ihex.c:258
+#: ihex.c:264
 #, c-format
 msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
 msgstr "%s:%d: oväntat tecken \"%s\" i hexadecimal Intel-fil\n"
 
-#: ihex.c:366
+#: ihex.c:372
 #, c-format
 msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
 msgstr "%s:%u: felaktig kontrollsumma i hexadecimal Intel-fil (förväntade %u, hittade %u)"
 
-#: ihex.c:420
+#: ihex.c:426
 #, c-format
 msgid "%s:%u: bad extended address record length in Intel Hex file"
 msgstr "%s:%u: felaktig längd på post för utökad adress i hexadecimal Intel-fil"
 
-#: ihex.c:437
+#: ihex.c:443
 #, c-format
 msgid "%s:%u: bad extended start address length in Intel Hex file"
 msgstr "%s:%u: felaktig längd på utökad startadress i hexadecimal Intel-fil"
 
-#: ihex.c:454
+#: ihex.c:460
 #, c-format
 msgid "%s:%u: bad extended linear address record length in Intel Hex file"
 msgstr "%s:%u: felaktig längd på post för utökad linjär adress i hexadecimal Intel-fil"
 
-#: ihex.c:471
+#: ihex.c:477
 #, c-format
 msgid "%s:%u: bad extended linear start address length in Intel Hex file"
 msgstr "%s:%u: felaktig längd på post för utökad linjär startadress i hexadecimal Intel-fil"
 
-#: ihex.c:488
+#: ihex.c:494
 #, c-format
 msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
 msgstr "%s:%u: okänd ihex-typ %u i hexadecimal Intel-fil\n"
 
-#: ihex.c:607
+#: ihex.c:619
 #, c-format
 msgid "%s: internal error in ihex_read_section"
 msgstr "%s: internt fel i ihex_read_section"
 
-#: ihex.c:642
+#: ihex.c:654
 #, c-format
 msgid "%s: bad section length in ihex_read_section"
 msgstr "%s: felaktig sektionslängd i ihex_read_sektion"
 
-#: ihex.c:860
+#: ihex.c:872
 #, c-format
 msgid "%s: address 0x%s out of range for Intel Hex file"
 msgstr "%s: adressen 0x%s är utanför intervallet för hexadecimal Intel-fil"
 
-#: libbfd.c:492
-#, c-format
-msgid "not mapping: data=%lx mapped=%d\n"
-msgstr "mappar inte: data=%lx mappat=%d\n"
-
-#: libbfd.c:495
-msgid "not mapping: env var not set\n"
-msgstr "mappar inte: miljövariabel är inte satt\n"
-
-#: libbfd.c:1466
+#: libbfd.c:861
 #, c-format
 msgid "Deprecated %s called at %s line %d in %s\n"
 msgstr "Föråldrad %s anropad vid %s rad %d i %s\n"
 
-#: libbfd.c:1469
+#: libbfd.c:864
 #, c-format
 msgid "Deprecated %s called\n"
 msgstr "Föråldrad %s anropad\n"
 
-#: linker.c:1873
+#: linker.c:1829
 #, c-format
 msgid "%s: indirect symbol `%s' to `%s' is a loop"
 msgstr "%s: indirekt symbol \"%s\" till \"%s\" är en slinga"
 
-#: linker.c:2776
+#: linker.c:2697
 #, c-format
-msgid "Attempt to do relocateable link with %s input and %s output"
+msgid "Attempt to do relocatable link with %s input and %s output"
 msgstr "Försök att göra en omlokaliseringsbar länk med %s-indata och %s-utdata"
 
-#: merge.c:892
+#: merge.c:896
 #, c-format
 msgid "%s: access beyond end of merged section (%ld + %ld)"
 msgstr "%s: åtkomst bortom slut på sammanslagen sektion (%ld + %ld)"
 
-#: mmo.c:460
+#: mmo.c:503
 #, c-format
 msgid "%s: No core to allocate section name %s\n"
 msgstr "%s: Ingen kärna för att allokera sektionsnamn %s\n"
 
-#: mmo.c:536
+#: mmo.c:579
 #, c-format
 msgid "%s: No core to allocate a symbol %d bytes long\n"
 msgstr "%s: Ingen kärna för att allokera en %d byte lång symbol\n"
 
-#: mmo.c:1245
+#: mmo.c:1287
 #, c-format
 msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
 msgstr "%s: ogiltig mmo-fil: initieringsvärde för $255 är inte \"Main\"\n"
 
-#: mmo.c:1391
+#: mmo.c:1433
 #, c-format
 msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
 msgstr "%s: bred teckensekvens som inte stöds 0x%02X 0x%02X efter symbolnamnet som börjar med \"%s\"\n"
 
-#: mmo.c:1633
+#: mmo.c:1674
 #, c-format
 msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
 msgstr "%s: ogiltig mmo-fil: lopkod \"%d\" stöds inte\n"
 
-#: mmo.c:1643
+#: mmo.c:1684
 #, c-format
 msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
 msgstr "%s: ogiltig mmo-fil: förväntade YZ = 1 fick YZ = %d för lop_quote\n"
 
-#: mmo.c:1679
+#: mmo.c:1720
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
 msgstr "%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_loc\n"
 
-#: mmo.c:1725
+#: mmo.c:1766
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
 msgstr "%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_fixo\n"
 
-#: mmo.c:1764
+#: mmo.c:1805
 #, c-format
 msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
 msgstr "%s: ogiltig mmo-fil: förväntade y = 0, fick y = %d för lop_fixrx\n"
 
-#: mmo.c:1773
+#: mmo.c:1814
 #, c-format
 msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
 msgstr "%s: ogiltig mmo-fil: förväntade z = 16 eller z = 24, fick z = %d för lop_fixr\n"
 
-#: mmo.c:1796
+#: mmo.c:1837
 #, c-format
 msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
 msgstr "%s: ogiltig mmo-fil: inledande byte i operandord måste vara 0 eller 1, fick %d för lop_fixrx\n"
 
-#: mmo.c:1819
+#: mmo.c:1860
 #, c-format
 msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
 msgstr "%s: kan inte allokera filnamn för fil nummer %d, %d byte\n"
 
-#: mmo.c:1839
+#: mmo.c:1880
 #, c-format
 msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
 msgstr "%s: ogiltig mmo-fil: fil nummer %d \"%s\", var redan angiven som \"%s\"\n"
 
-#: mmo.c:1852
+#: mmo.c:1893
 #, c-format
 msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
 msgstr "%s: ogiltig mmo-fil: filnamnet för nummer %d angavs inte innan användning\n"
 
-#: mmo.c:1958
+#: mmo.c:1999
 #, c-format
 msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
 msgstr "%s: ogiltig mmo-fil: fälten y och z i lop_stab är icke-tomma, y: %d, z: %d\n"
 
-#: mmo.c:1994
+#: mmo.c:2035
 #, c-format
 msgid "%s: invalid mmo file: lop_end not last item in file\n"
 msgstr "%s: ogiltig mmo-fil: lop_end är inte sista objektet i fil\n"
 
-#: mmo.c:2007
+#: mmo.c:2048
 #, c-format
 msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
 msgstr "%s: ogiltig mmo-fil: YZ i lop_end (%ld) är inte lika med antalet tetra till den föregående lop_stab (%ld)\n"
 
-#: mmo.c:2670
+#: mmo.c:2698
 #, c-format
 msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
 msgstr "%s: ogiltig symboltabell: dublettsymbol \"%s\"\n"
 
-#: mmo.c:2921
+#: mmo.c:2949
 #, c-format
 msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
 msgstr "%s: Felaktig symboldefinition: \"Main\" är inställd till %s istället för startadressen %s\n"
 
-#: mmo.c:3011
+#: mmo.c:3039
 #, c-format
 msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
 msgstr "%s: varning: symboltabellen är för stor för mmo, större än 65535 32-bitars ord: %d. Endast \"Main\" kommer att skickas.\n"
 
-#: mmo.c:3056
+#: mmo.c:3084
 #, c-format
 msgid "%s: internal error, symbol table changed size from %d to %d words\n"
 msgstr "%s: internt fel, symboltabellen ändrade storlek från %d till %d ord\n"
 
-#: mmo.c:3111
+#: mmo.c:3139
 #, c-format
 msgid "%s: internal error, internal register section %s had contents\n"
 msgstr "%s: internt fel, interna registersektionen %s hade innehåll\n"
 
-#: mmo.c:3163
+#: mmo.c:3191
 #, c-format
 msgid "%s: no initialized registers; section length 0\n"
 msgstr "%s: inga initierade register; sektionslängd 0\n"
 
-#: mmo.c:3169
+#: mmo.c:3197
 #, c-format
 msgid "%s: too many initialized registers; section length %ld\n"
 msgstr "%s: för många initierade register; sektionslängd %ld\n"
 
-#: mmo.c:3174
+#: mmo.c:3202
 #, c-format
 msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
 msgstr "%s: ogiltig startadress för initierade register med längden %ld: 0x%lx%08lx\n"
 
-#: oasys.c:1029
+#: oasys.c:1052
 #, c-format
 msgid "%s: can not represent section `%s' in oasys"
 msgstr "%s: kan inte representera sektionen \"%s\" i oasys"
 
-#: osf-core.c:132
+#: osf-core.c:137
 #, c-format
 msgid "Unhandled OSF/1 core file section type %d\n"
 msgstr "Ohanterad sektionstyp %d för OSF/1-minnesfil\n"
 
-#: pe-mips.c:658
+#: pe-mips.c:659
 #, c-format
 msgid "%s: `ld -r' not supported with PE MIPS objects\n"
 msgstr "%s: \"ld -r\" stöds inte med PE MIPS-objekt\n"
@@ -1989,53 +2227,53 @@ msgstr "%s: \"ld -r\" st
 #. mem = pointer to memory we're fixing up
 #. val = VMA of what we need to refer to
 #.
-#: pe-mips.c:794
+#: pe-mips.c:795
 #, c-format
 msgid "%s: unimplemented %s\n"
 msgstr "%s: oimplementerat %s\n"
 
-#: pe-mips.c:820
+#: pe-mips.c:821
 #, c-format
 msgid "%s: jump too far away\n"
 msgstr "%s: hopp för långt bort\n"
 
-#: pe-mips.c:847
+#: pe-mips.c:848
 #, c-format
 msgid "%s: bad pair/reflo after refhi\n"
 msgstr "%s: felaktigt par/reflo efter refhi\n"
 
 #. XXX code yet to be written.
-#: peicode.h:785
+#: peicode.h:787
 #, c-format
 msgid "%s: Unhandled import type; %x"
 msgstr "%s: Ohanterad importtyp; %x"
 
-#: peicode.h:790
+#: peicode.h:792
 #, c-format
 msgid "%s: Unrecognised import type; %x"
 msgstr "%s: Okänd importtyp; %x"
 
-#: peicode.h:804
+#: peicode.h:806
 #, c-format
 msgid "%s: Unrecognised import name type; %x"
 msgstr "%s: Okänd importnamnstyp; %x"
 
-#: peicode.h:1162
+#: peicode.h:1164
 #, c-format
 msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
 msgstr "%s: Okänd maskintyp (0x%x) i Import Library Format-arkiv"
 
-#: peicode.h:1174
+#: peicode.h:1176
 #, c-format
 msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
 msgstr "%s: Känd men ohanterad maskintyp (0x%x) i Import Library Format-arkiv"
 
-#: peicode.h:1191
+#: peicode.h:1193
 #, c-format
 msgid "%s: size field is zero in Import Library Format header"
 msgstr "%s: storleksfältet är noll i Import Library Format-huvud"
 
-#: peicode.h:1219
+#: peicode.h:1224
 #, c-format
 msgid "%s: string not null terminated in ILF object file."
 msgstr "%s: sträng inte nollterminerad i ILF-objektfil."
@@ -2092,11 +2330,11 @@ msgstr "Sektor f
 msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
 msgstr "Längd på partition[%d] = 0x%.8lx (%ld)\n"
 
-#: som.c:5398
+#: som.c:5422
 msgid "som_sizeof_headers unimplemented"
 msgstr "som_sizeof_headers är inte implementerat"
 
-#: srec.c:301
+#: srec.c:302
 #, c-format
 msgid "%s:%d: Unexpected character `%s' in S-record file\n"
 msgstr "%s:%d: Oväntat tecken \"%s\" i S-postfil\n"
@@ -2107,7 +2345,7 @@ msgstr "%s:%d: Ov
 msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
 msgstr "%s(%s+0x%lx): Stabbpost har ogiltigt strängindex."
 
-#: syms.c:1044
+#: syms.c:1019
 msgid "Unsupported .stab relocation"
 msgstr ".stab-omlokalisering som inte stöds"
 
@@ -2126,33 +2364,33 @@ msgstr "bfd_set_section_flags (%s, %x) misslyckades"
 msgid "Size mismatch section %s=%lx, %s=%lx"
 msgstr "Storleken passar inte på sektion %s=%lx, %s=%lx"
 
-#: vms-gsd.c:702
+#: vms-gsd.c:704
 #, c-format
 msgid "unknown gsd/egsd subtype %d"
 msgstr "okänd gsd/egsd-undertyp %d"
 
-#: vms-hdr.c:406
+#: vms-hdr.c:408
 msgid "Object module NOT error-free !\n"
 msgstr "Objektmodulen INTE felfri!\n"
 
-#: vms-misc.c:543
+#: vms-misc.c:541
 #, c-format
 msgid "Stack overflow (%d) in _bfd_vms_push"
 msgstr "Stacken ger överspill (%d) i _bfd_vms_push"
 
-#: vms-misc.c:561
+#: vms-misc.c:559
 msgid "Stack underflow in _bfd_vms_pop"
 msgstr "Stacken ger underspill i _bfd_vms_pop"
 
-#: vms-misc.c:919
+#: vms-misc.c:918
 msgid "_bfd_vms_output_counted called with zero bytes"
 msgstr "_bfd_vms_output_counted anropad med noll byte"
 
-#: vms-misc.c:924
+#: vms-misc.c:923
 msgid "_bfd_vms_output_counted called with too many bytes"
 msgstr "_bfd_vms_output_counted called anropad med för många byte"
 
-#: vms-misc.c:1055
+#: vms-misc.c:1054
 #, c-format
 msgid "Symbol %s replaced by %s\n"
 msgstr "Symbolen %s ersatt med %s\n"
@@ -2162,26 +2400,26 @@ msgstr "Symbolen %s ersatt med %s\n"
 msgid "failed to enter %s"
 msgstr "misslyckades med att gå in i %s"
 
-#: vms-tir.c:81
+#: vms-tir.c:102
 msgid "No Mem !"
 msgstr "Inget minne!"
 
-#: vms-tir.c:362
+#: vms-tir.c:383
 #, c-format
 msgid "bad section index in %s"
 msgstr "felaktigt sektionsindex i %s"
 
-#: vms-tir.c:375
+#: vms-tir.c:396
 #, c-format
 msgid "unsupported STA cmd %s"
 msgstr "STA-kommando %s stöds inte"
 
-#: vms-tir.c:380 vms-tir.c:1240
+#: vms-tir.c:401 vms-tir.c:1261
 #, c-format
 msgid "reserved STA cmd %d"
 msgstr "reserverat STA-kommando %d"
 
-#: vms-tir.c:491 vms-tir.c:514
+#: vms-tir.c:512 vms-tir.c:535
 #, c-format
 msgid "%s: no symbol \"%s\""
 msgstr "%s: ingen symbol \"%s\""
@@ -2190,39 +2428,39 @@ msgstr "%s: ingen symbol \"%s\""
 #. rotate
 #. Redefine symbol to current location.
 #. Define a literal.
-#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
-#: vms-tir.c:838 vms-tir.c:1563
+#: vms-tir.c:602 vms-tir.c:714 vms-tir.c:824 vms-tir.c:842 vms-tir.c:850
+#: vms-tir.c:859 vms-tir.c:1584
 #, c-format
 msgid "%s: not supported"
 msgstr "%s: stöds inte"
 
-#: vms-tir.c:586 vms-tir.c:1418
+#: vms-tir.c:607 vms-tir.c:1439
 #, c-format
 msgid "%s: not implemented"
 msgstr "%s: inte implementerad"
 
-#: vms-tir.c:590 vms-tir.c:1422
+#: vms-tir.c:611 vms-tir.c:1443
 #, c-format
 msgid "reserved STO cmd %d"
 msgstr "reserverat STO-kommando %d"
 
-#: vms-tir.c:708 vms-tir.c:1568
+#: vms-tir.c:729 vms-tir.c:1589
 #, c-format
 msgid "reserved OPR cmd %d"
 msgstr "reserverat OPR-kommando %d"
 
-#: vms-tir.c:776 vms-tir.c:1632
+#: vms-tir.c:797 vms-tir.c:1653
 #, c-format
 msgid "reserved CTL cmd %d"
 msgstr "reserverat CTL-kommando %d"
 
 #. stack byte from image
 #. arg: none.
-#: vms-tir.c:1148
+#: vms-tir.c:1169
 msgid "stack-from-image not implemented"
 msgstr "stack-from-image är inte implementerat"
 
-#: vms-tir.c:1166
+#: vms-tir.c:1187
 msgid "stack-entry-mask not fully implemented"
 msgstr "stack-entry-mask är inte helt implementerat"
 
@@ -2233,261 +2471,271 @@ msgstr "stack-entry-mask 
 #.
 #. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
 #. and stack TRUE (args match) or FALSE (args dont match) value.
-#: vms-tir.c:1180
+#: vms-tir.c:1201
 msgid "PASSMECH not fully implemented"
 msgstr "PASSMECH är inte helt implementerat"
 
-#: vms-tir.c:1199
+#: vms-tir.c:1220
 msgid "stack-local-symbol not fully implemented"
 msgstr "stack-local-symbol är inte helt implementerat"
 
-#: vms-tir.c:1212
+#: vms-tir.c:1233
 msgid "stack-literal not fully implemented"
 msgstr "stack-literal är inte helt implementerat"
 
-#: vms-tir.c:1233
+#: vms-tir.c:1254
 msgid "stack-local-symbol-entry-point-mask not fully implemented"
 msgstr "stack-local-symbol-entry-point-mask är inte helt implementerat"
 
-#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
-#: vms-tir.c:1619 vms-tir.c:1627
+#: vms-tir.c:1531 vms-tir.c:1543 vms-tir.c:1555 vms-tir.c:1567 vms-tir.c:1632
+#: vms-tir.c:1640 vms-tir.c:1648
 #, c-format
 msgid "%s: not fully implemented"
 msgstr "%s: inte helt implementerat"
 
-#: vms-tir.c:1684
+#: vms-tir.c:1705
 #, c-format
 msgid "obj code %d not found"
 msgstr "objektkod %d kunde inte hittas"
 
-#: vms-tir.c:2019
+#: vms-tir.c:2043
 #, c-format
 msgid "SEC_RELOC with no relocs in section %s"
 msgstr "SEC_RELOC utan omlokaliseringar i sektion %s"
 
-#: vms-tir.c:2307
+#: vms-tir.c:2331
 #, c-format
 msgid "Unhandled relocation %s"
 msgstr "Ohanterad omlokalisering %s"
 
-#: xcofflink.c:1243
+#: xcofflink.c:1244
 #, c-format
 msgid "%s: `%s' has line numbers but no enclosing section"
 msgstr "%s: \"%s\" har radnummer men ingen inneslutande sektion"
 
-#: xcofflink.c:1296
+#: xcofflink.c:1297
 #, c-format
 msgid "%s: class %d symbol `%s' has no aux entries"
 msgstr "%s: klass %d-symbolen \"%s\" har inga yttre poster"
 
-#: xcofflink.c:1319
+#: xcofflink.c:1320
 #, c-format
 msgid "%s: symbol `%s' has unrecognized csect type %d"
 msgstr "%s: symbolen \"%s\" har okänd csect-typ %d"
 
-#: xcofflink.c:1331
+#: xcofflink.c:1332
 #, c-format
 msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
 msgstr "%s: felaktig XTY_ER-symbol \"%s\": klass %d scnum %d scnlen %d"
 
-#: xcofflink.c:1367
+#: xcofflink.c:1368
 #, c-format
 msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
 msgstr "%s: XMC_TC0-symbolen \"%s\" är klass %d scnlen %d"
 
-#: xcofflink.c:1519
+#: xcofflink.c:1520
 #, c-format
 msgid "%s: csect `%s' not in enclosing section"
 msgstr "%s: csect \"%s\" är inte i inneslutande sektion"
 
-#: xcofflink.c:1626
+#: xcofflink.c:1627
 #, c-format
 msgid "%s: misplaced XTY_LD `%s'"
 msgstr "%s: felaktigt placerat XTY_LD \"%s\""
 
-#: xcofflink.c:1957
+#: xcofflink.c:1958
 #, c-format
 msgid "%s: reloc %s:%d not in csect"
 msgstr "%s: omlokaliseringen %s:%d är inte i csect"
 
-#: xcofflink.c:2092
+#: xcofflink.c:2095
 #, c-format
 msgid "%s: XCOFF shared object when not producing XCOFF output"
 msgstr "%s: XCOFF delade objekt när inte XCOFF-utdata produceras"
 
-#: xcofflink.c:2113
+#: xcofflink.c:2116
 #, c-format
 msgid "%s: dynamic object with no .loader section"
 msgstr "%s: dynamiskt objekt utan någon .loader-sektion"
 
-#: xcofflink.c:2758
+#: xcofflink.c:2761
 #, c-format
 msgid "%s: no such symbol"
 msgstr "%s: ingen sådan symbol"
 
-#: xcofflink.c:2891
+#: xcofflink.c:2894
 msgid "error: undefined symbol __rtinit"
 msgstr "fel: odefinierad symbol __rtinit"
 
-#: xcofflink.c:3453
+#: xcofflink.c:3455
 #, c-format
 msgid "warning: attempt to export undefined symbol `%s'"
 msgstr "varning: försök att exportera odefinierade symbolen \"%s\""
 
-#: xcofflink.c:4447
+#: xcofflink.c:4448
 #, c-format
 msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
 msgstr "TOC ger överspill: 0x%lx > 0x10000; prova -mminimal-toc vid kompilering"
 
-#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
+#: xcofflink.c:5288 xcofflink.c:5755 xcofflink.c:5817 xcofflink.c:6119
 #, c-format
 msgid "%s: loader reloc in unrecognized section `%s'"
 msgstr "%s: inläsaromlokalisering i okända sektionen \"%s\""
 
-#: xcofflink.c:5309 xcofflink.c:6130
+#: xcofflink.c:5310 xcofflink.c:6130
 #, c-format
 msgid "%s: `%s' in loader reloc but not loader sym"
 msgstr "%s: \"%s\" i inläsaromlokalisering men inte inläsarsym"
 
-#: xcofflink.c:5324
+#: xcofflink.c:5325
 #, c-format
 msgid "%s: loader reloc in read-only section %s"
 msgstr "%s: inläsaromlokalisering i skrivskyddade sektionen %s"
 
-#: elf32-ia64.c:2222 elf64-ia64.c:2222
+#: elf32-ia64.c:2392 elf64-ia64.c:2392
 msgid "@pltoff reloc against local symbol"
 msgstr "@pltoff-omlokalisering mot lokal symbol"
 
-#: elf32-ia64.c:3562 elf64-ia64.c:3562
+#: elf32-ia64.c:3804 elf64-ia64.c:3804
 #, c-format
 msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
 msgstr "%s: kort datasegment spillde över (0x%lx >= 0x400000)"
 
-#: elf32-ia64.c:3573 elf64-ia64.c:3573
+#: elf32-ia64.c:3815 elf64-ia64.c:3815
 #, c-format
 msgid "%s: __gp does not cover short data segment"
 msgstr "%s: __gp täcker inte kort datasegment"
 
-#: elf32-ia64.c:3858 elf64-ia64.c:3858
+#: elf32-ia64.c:4131 elf64-ia64.c:4131
 #, c-format
 msgid "%s: linking non-pic code in a shared library"
 msgstr "%s: länkar icke-pic-kod i delat bibliotek"
 
-#: elf32-ia64.c:3891 elf64-ia64.c:3891
+#: elf32-ia64.c:4164 elf64-ia64.c:4164
 #, c-format
 msgid "%s: @gprel relocation against dynamic symbol %s"
 msgstr "%s: @gprel-omlokalisering mot dynamiska symbolen %s"
 
-#: elf32-ia64.c:4030 elf64-ia64.c:4030
+#: elf32-ia64.c:4224 elf64-ia64.c:4224
+#, c-format
+msgid "%s: linking non-pic code in a position independent executable"
+msgstr "%s: länkar icke-pic-kod i en positionsoberoende körbar fil"
+
+#: elf32-ia64.c:4363 elf64-ia64.c:4363
 #, c-format
-msgid "%s: dynamic relocation against speculation fixup"
-msgstr "%s: dynamisk omlokalisering utan spekulationsfixar"
+msgid "%s: @internal branch to dynamic symbol %s"
+msgstr "%s: @internal-gren till dynamiska symbolen %s"
 
-#: elf32-ia64.c:4038 elf64-ia64.c:4038
+#: elf32-ia64.c:4365 elf64-ia64.c:4365
 #, c-format
-msgid "%s: speculation fixup against undefined weak symbol"
-msgstr "%s: spekulationsfix mot odefinierad svag symbol"
+msgid "%s: speculation fixup to dynamic symbol %s"
+msgstr "%s: spekulationsfix till dynamiska symbolen %s"
 
-#: elf32-ia64.c:4271 elf64-ia64.c:4271
+#: elf32-ia64.c:4367 elf64-ia64.c:4367
+#, c-format
+msgid "%s: @pcrel relocation against dynamic symbol %s"
+msgstr "%s: @pcrel-omlokalisering mot dynamiska symbolen %s"
+
+#: elf32-ia64.c:4579 elf64-ia64.c:4579
 msgid "unsupported reloc"
 msgstr "omlokaliseringen stöds inte"
 
-#: elf32-ia64.c:4551 elf64-ia64.c:4551
+#: elf32-ia64.c:4858 elf64-ia64.c:4858
 #, c-format
 msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
 msgstr "%s: länkar fånga-vid-NULL-dereferens med ickefångande filer"
 
-#: elf32-ia64.c:4560 elf64-ia64.c:4560
+#: elf32-ia64.c:4867 elf64-ia64.c:4867
 #, c-format
 msgid "%s: linking big-endian files with little-endian files"
 msgstr "%s: länkar big endian-filer med little endian-filer"
 
-#: elf32-ia64.c:4569 elf64-ia64.c:4569
+#: elf32-ia64.c:4876 elf64-ia64.c:4876
 #, c-format
 msgid "%s: linking 64-bit files with 32-bit files"
 msgstr "%s: länkar 64-bitarsfiler med 32-bitarsfiler"
 
-#: elf32-ia64.c:4578 elf64-ia64.c:4578
+#: elf32-ia64.c:4885 elf64-ia64.c:4885
 #, c-format
 msgid "%s: linking constant-gp files with non-constant-gp files"
 msgstr "%s: länkar konstant-gp-filer med icke-konstant-gp-filer"
 
-#: elf32-ia64.c:4588 elf64-ia64.c:4588
+#: elf32-ia64.c:4895 elf64-ia64.c:4895
 #, c-format
 msgid "%s: linking auto-pic files with non-auto-pic files"
 msgstr "%s: länkar auto-pic-filer med icke-auto-pic-filer"
 
-#: peigen.c:962 pepigen.c:962
+#: peigen.c:985 pepigen.c:985
 #, c-format
 msgid "%s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: radnummer ger överspill: 0x%lx > 0xffff"
 
-#: peigen.c:979 pepigen.c:979
+#: peigen.c:1002 pepigen.c:1002
 #, c-format
 msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
 msgstr "%s: omlokalisering ger överspill 1: 0x%lx > 0xffff"
 
-#: peigen.c:993 pepigen.c:993
+#: peigen.c:1016 pepigen.c:1016
 msgid "Export Directory [.edata (or where ever we found it)]"
 msgstr "Exportkatalog [.edata (eller där vi hittade det)]"
 
-#: peigen.c:994 pepigen.c:994
+#: peigen.c:1017 pepigen.c:1017
 msgid "Import Directory [parts of .idata]"
 msgstr "Importkatalog [delar av .idata]"
 
-#: peigen.c:995 pepigen.c:995
+#: peigen.c:1018 pepigen.c:1018
 msgid "Resource Directory [.rsrc]"
 msgstr "Resurskatalog [.rsrc]"
 
-#: peigen.c:996 pepigen.c:996
+#: peigen.c:1019 pepigen.c:1019
 msgid "Exception Directory [.pdata]"
 msgstr "Undantagskatalog [.pdata]"
 
-#: peigen.c:997 pepigen.c:997
+#: peigen.c:1020 pepigen.c:1020
 msgid "Security Directory"
 msgstr "Säkerhetskatalog"
 
-#: peigen.c:998 pepigen.c:998
+#: peigen.c:1021 pepigen.c:1021
 msgid "Base Relocation Directory [.reloc]"
 msgstr "Basomlokaliseringskatalog [.reloc]"
 
-#: peigen.c:999 pepigen.c:999
+#: peigen.c:1022 pepigen.c:1022
 msgid "Debug Directory"
 msgstr "Felsökningskatalog"
 
-#: peigen.c:1000 pepigen.c:1000
+#: peigen.c:1023 pepigen.c:1023
 msgid "Description Directory"
 msgstr "Beskrivningskatalog"
 
-#: peigen.c:1001 pepigen.c:1001
+#: peigen.c:1024 pepigen.c:1024
 msgid "Special Directory"
 msgstr "Specialkatalog"
 
-#: peigen.c:1002 pepigen.c:1002
+#: peigen.c:1025 pepigen.c:1025
 msgid "Thread Storage Directory [.tls]"
 msgstr "Trådlagringskatalog [.tls]"
 
-#: peigen.c:1003 pepigen.c:1003
+#: peigen.c:1026 pepigen.c:1026
 msgid "Load Configuration Directory"
 msgstr "Inläsningskonfigurationskatalog"
 
-#: peigen.c:1004 pepigen.c:1004
+#: peigen.c:1027 pepigen.c:1027
 msgid "Bound Import Directory"
 msgstr "Katalog över bundna importer"
 
-#: peigen.c:1005 pepigen.c:1005
+#: peigen.c:1028 pepigen.c:1028
 msgid "Import Address Table Directory"
 msgstr "Importadresstabellkatalog"
 
-#: peigen.c:1006 pepigen.c:1006
+#: peigen.c:1029 pepigen.c:1029
 msgid "Delay Import Directory"
 msgstr "Katalog över fördröjda importer"
 
-#: peigen.c:1007 peigen.c:1008 pepigen.c:1007 pepigen.c:1008
+#: peigen.c:1030 peigen.c:1031 pepigen.c:1030 pepigen.c:1031
 msgid "Reserved"
 msgstr "Reserverad"
 
-#: peigen.c:1071 pepigen.c:1071
+#: peigen.c:1094 pepigen.c:1094
 msgid ""
 "\n"
 "There is an import table, but the section containing it could not be found\n"
@@ -2495,7 +2743,7 @@ msgstr ""
 "\n"
 "Det finns en importtabell, men sektionen som innehåller den kunde inte hittas\n"
 
-#: peigen.c:1076 pepigen.c:1076
+#: peigen.c:1099 pepigen.c:1099
 #, c-format
 msgid ""
 "\n"
@@ -2504,7 +2752,7 @@ msgstr ""
 "\n"
 "Det finns en importtabell i %s på 0x%lx\n"
 
-#: peigen.c:1113 pepigen.c:1113
+#: peigen.c:1136 pepigen.c:1136
 #, c-format
 msgid ""
 "\n"
@@ -2513,12 +2761,12 @@ msgstr ""
 "\n"
 "Funktionsidentifierare hittad på startadressen: %04lx\n"
 
-#: peigen.c:1116 pepigen.c:1116
+#: peigen.c:1139 pepigen.c:1139
 #, c-format
 msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
 msgstr "\tkodbas %08lx toc (inläsningsbar/verklig) %08lx/%08lx\n"
 
-#: peigen.c:1122 pepigen.c:1122
+#: peigen.c:1145 pepigen.c:1145
 msgid ""
 "\n"
 "No reldata section! Function descriptor not decoded.\n"
@@ -2526,7 +2774,7 @@ msgstr ""
 "\n"
 "Ingen reldata-sektion! Funktionsidentifierare avkodades inte.\n"
 
-#: peigen.c:1127 pepigen.c:1127
+#: peigen.c:1150 pepigen.c:1150
 #, c-format
 msgid ""
 "\n"
@@ -2536,7 +2784,7 @@ msgstr ""
 "Importtabellerna (tolkade innehåll i %s-sektion)\n"
 
 # Vad är thunk?
-#: peigen.c:1130 pepigen.c:1130
+#: peigen.c:1153 pepigen.c:1153
 msgid ""
 " vma:            Hint    Time      Forward  DLL       First\n"
 "                 Table   Stamp     Chain    Name      Thunk\n"
@@ -2544,7 +2792,7 @@ msgstr ""
 " vma:            Tips-   Tids-     Framåt-  DLL-      Första\n"
 "                 tabell  stämpel   kedja    namn      thunk\n"
 
-#: peigen.c:1181 pepigen.c:1181
+#: peigen.c:1204 pepigen.c:1204
 #, c-format
 msgid ""
 "\n"
@@ -2553,11 +2801,11 @@ msgstr ""
 "\n"
 "\tDLL-namn: %s\n"
 
-#: peigen.c:1192 pepigen.c:1192
+#: peigen.c:1215 pepigen.c:1215
 msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
 msgstr "\tvma: Tips/Ordn Medlemsnamn Bundet till\n"
 
-#: peigen.c:1217 pepigen.c:1217
+#: peigen.c:1240 pepigen.c:1240
 msgid ""
 "\n"
 "There is a first thunk, but the section containing it could not be found\n"
@@ -2565,7 +2813,7 @@ msgstr ""
 "\n"
 "Det finns en första thunk, men sektionen som innehåller den kunde inte hittas\n"
 
-#: peigen.c:1357 pepigen.c:1357
+#: peigen.c:1380 pepigen.c:1380
 msgid ""
 "\n"
 "There is an export table, but the section containing it could not be found\n"
@@ -2573,7 +2821,7 @@ msgstr ""
 "\n"
 "Det finns en exporttabell, men sektionen som innehåller den kunde inte hittas\n"
 
-#: peigen.c:1362 pepigen.c:1362
+#: peigen.c:1385 pepigen.c:1385
 #, c-format
 msgid ""
 "\n"
@@ -2582,7 +2830,7 @@ msgstr ""
 "\n"
 "Det finns en exporttabell i %s vid 0x%lx\n"
 
-#: peigen.c:1393 pepigen.c:1393
+#: peigen.c:1416 pepigen.c:1416
 #, c-format
 msgid ""
 "\n"
@@ -2592,61 +2840,61 @@ msgstr ""
 "\n"
 "Exporttabellerna (tolkade innehåll i %s-sektion)\n"
 
-#: peigen.c:1397 pepigen.c:1397
+#: peigen.c:1420 pepigen.c:1420
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
 msgstr "Exportflaggor \t\t\t%lx\n"
 
-#: peigen.c:1400 pepigen.c:1400
+#: peigen.c:1423 pepigen.c:1423
 #, c-format
 msgid "Time/Date stamp \t\t%lx\n"
 msgstr "Tid-/Datumstämpel \t\t%lx\n"
 
-#: peigen.c:1403 pepigen.c:1403
+#: peigen.c:1426 pepigen.c:1426
 #, c-format
 msgid "Major/Minor \t\t\t%d/%d\n"
 msgstr "Övre/Undre \t\t\t%d/%d\n"
 
-#: peigen.c:1406 pepigen.c:1406
+#: peigen.c:1429 pepigen.c:1429
 msgid "Name \t\t\t\t"
 msgstr "Namn \t\t\t\t"
 
-#: peigen.c:1412 pepigen.c:1412
+#: peigen.c:1435 pepigen.c:1435
 #, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
 msgstr "Ordningsbas \t\t\t%ld\n"
 
-#: peigen.c:1415 pepigen.c:1415
+#: peigen.c:1438 pepigen.c:1438
 msgid "Number in:\n"
 msgstr "Tal i:\n"
 
-#: peigen.c:1418 pepigen.c:1418
+#: peigen.c:1441 pepigen.c:1441
 #, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
 msgstr "\tExportadresstabell \t\t%08lx\n"
 
-#: peigen.c:1422 pepigen.c:1422
+#: peigen.c:1445 pepigen.c:1445
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
 msgstr "\t[Namnpekare/Ordningstal]-tabell\t%08lx\n"
 
-#: peigen.c:1425 pepigen.c:1425
+#: peigen.c:1448 pepigen.c:1448
 msgid "Table Addresses\n"
 msgstr "Tabelladresser\n"
 
-#: peigen.c:1428 pepigen.c:1428
+#: peigen.c:1451 pepigen.c:1451
 msgid "\tExport Address Table \t\t"
 msgstr "\tExportadresstabell \t\t"
 
-#: peigen.c:1433 pepigen.c:1433
+#: peigen.c:1456 pepigen.c:1456
 msgid "\tName Pointer Table \t\t"
 msgstr "\tNamnpekartabell \t\t"
 
-#: peigen.c:1438 pepigen.c:1438
+#: peigen.c:1461 pepigen.c:1461
 msgid "\tOrdinal Table \t\t\t"
 msgstr "\tOrdningstalstabell \t\t\t"
 
-#: peigen.c:1453 pepigen.c:1453
+#: peigen.c:1476 pepigen.c:1476
 #, c-format
 msgid ""
 "\n"
@@ -2655,15 +2903,15 @@ msgstr ""
 "\n"
 "Exportadresstabell -- Orningsbas %ld\n"
 
-#: peigen.c:1472 pepigen.c:1472
+#: peigen.c:1495 pepigen.c:1495
 msgid "Forwarder RVA"
 msgstr "Vidarebefordrar-RVA"
 
-#: peigen.c:1483 pepigen.c:1483
+#: peigen.c:1506 pepigen.c:1506
 msgid "Export RVA"
 msgstr "Export-RVA"
 
-#: peigen.c:1490 pepigen.c:1490
+#: peigen.c:1513 pepigen.c:1513
 msgid ""
 "\n"
 "[Ordinal/Name Pointer] Table\n"
@@ -2671,12 +2919,12 @@ msgstr ""
 "\n"
 "[Ordningstals-/Namnpekar-]tabell\n"
 
-#: peigen.c:1545 pepigen.c:1545
+#: peigen.c:1568 pepigen.c:1568
 #, c-format
 msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
 msgstr "Varning, storleken på .pdata-sektionen (%ld) är inte en multipel av %d\n"
 
-#: peigen.c:1549 pepigen.c:1549
+#: peigen.c:1572 pepigen.c:1572
 msgid ""
 "\n"
 "The Function Table (interpreted .pdata section contents)\n"
@@ -2684,11 +2932,11 @@ msgstr ""
 "\n"
 "Funktionstabellen (tolkade innehåll från .pdata-sektionen)\n"
 
-#: peigen.c:1552 pepigen.c:1552
+#: peigen.c:1575 pepigen.c:1575
 msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
 msgstr " vma:\t\t\tStartadress      Slutadress       Ospola information\n"
 
-#: peigen.c:1554 pepigen.c:1554
+#: peigen.c:1577 pepigen.c:1577
 msgid ""
 " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
 "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
@@ -2696,19 +2944,19 @@ msgstr ""
 " vma:\t\tStart-   Slut-    EH-       EH-    Prologsluts- Undantags-\n"
 "     \t\tadress   adress   hanterare data   adress       mask\n"
 
-#: peigen.c:1624 pepigen.c:1624
+#: peigen.c:1647 pepigen.c:1647
 msgid " Register save millicode"
 msgstr " Registerspara millikod"
 
-#: peigen.c:1627 pepigen.c:1627
+#: peigen.c:1650 pepigen.c:1650
 msgid " Register restore millicode"
 msgstr " Registeråterställ millikod"
 
-#: peigen.c:1630 pepigen.c:1630
+#: peigen.c:1653 pepigen.c:1653
 msgid " Glue code sequence"
 msgstr " Klisterkodsekvens"
 
-#: peigen.c:1682 pepigen.c:1682
+#: peigen.c:1705 pepigen.c:1705
 msgid ""
 "\n"
 "\n"
@@ -2718,7 +2966,7 @@ msgstr ""
 "\n"
 "PE-filbasomlokaliseringar (tolkat innehåll i .reloc-sektionen)\n"
 
-#: peigen.c:1712 pepigen.c:1712
+#: peigen.c:1735 pepigen.c:1735
 #, c-format
 msgid ""
 "\n"
@@ -2727,7 +2975,7 @@ msgstr ""
 "\n"
 "Virtuell adress: %08lx Områdesstorlek %ld (0x%lx) Antal fixar %ld\n"
 
-#: peigen.c:1725 pepigen.c:1725
+#: peigen.c:1748 pepigen.c:1748
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
 msgstr "\tomlokalisering %4d avstånd %4x [%4lx] %s"
@@ -2735,7 +2983,7 @@ msgstr "\tomlokalisering %4d avst
 #. The MS dumpbin program reportedly ands with 0xff0f before
 #. printing the characteristics field.  Not sure why.  No reason to
 #. emulate it here.
-#: peigen.c:1765 pepigen.c:1765
+#: peigen.c:1788 pepigen.c:1788
 #, c-format
 msgid ""
 "\n"
@@ -2744,6 +2992,42 @@ msgstr ""
 "\n"
 "Karakteristik 0x%x\n"
 
+#~ msgid "%s: Unknown special linker type %d"
+#~ msgstr "%s: Okänd speciallänkartyp %d"
+
+#~ msgid "v850ea architecture"
+#~ msgstr "v850ea-arkitektur"
+
+#~ msgid "%s: Section %s is too large to add hole of %ld bytes"
+#~ msgstr "%s: Sektionen %s är för stor för att stoppa hål med %ld byte i"
+
+#~ msgid "Error: out of memory"
+#~ msgstr "Fel: slut på minne"
+
+#~ msgid "warning: relocation against removed section; zeroing"
+#~ msgstr "varning: omlokalisering mot borttagen sektion; nollställer"
+
+#~ msgid "warning: relocation against removed section"
+#~ msgstr "varning: omlokalisering mot borttagen sektion"
+
+#~ msgid "local symbols in discarded section %s"
+#~ msgstr "lokala symboler i bortkastade sektionen %s"
+
+#~ msgid "%s: linking abicalls files with non-abicalls files"
+#~ msgstr "%s: länkar abicalls-filer med icke-abicalls-filer"
+
+#~ msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+#~ msgstr "%s: ISA (-mips%d) passar inte med tidigare moduler (-mips%d)"
+
+#~ msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+#~ msgstr "%s: ISA (%d) passar inte med tidigare moduler (%d)"
+
+#~ msgid "%s: dynamic relocation against speculation fixup"
+#~ msgstr "%s: dynamisk omlokalisering utan spekulationsfixar"
+
+#~ msgid "%s: speculation fixup against undefined weak symbol"
+#~ msgstr "%s: spekulationsfix mot odefinierad svag symbol"
+
 #~ msgid "\tThe Import Address Table (difference found)\n"
 #~ msgstr "\tImportadresstabellen (skillnad hittad)\n"
 
index 092c0ac5a0c83c72cabd9b913e02a2b53deec6da..11630c6ab40f86c4d5a3ff19c08171ca1c1d66a8 100644 (file)
-# BFD Turkish Translation.
-# Copyright (C) 2001 Free Software Foundation, Inc.
-# Deniz Akkus Kanca <deniz@arayan.com>, 2001.
+# translation of bfd-2.14rel030712.tr.po to Turkish
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# Deniz Akkus Kanca <deniz@arayan.com>, 2001,2003.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: bfd 2.12.91\n"
-"POT-Creation-Date: 2002-07-23 15:55-0400\n"
-"PO-Revision-Date: 2002-08-10 13:11EET\n"
+"Project-Id-Version: bfd 2.14rel030712\n"
+"POT-Creation-Date: 2003-07-11 13:53+0930\n"
+"PO-Revision-Date: 2003-07-13 22:07+0300\n"
 "Last-Translator: Deniz Akkus Kanca <deniz@arayan.com>\n"
 "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 0.9.5\n"
+"X-Generator: KBabel 1.0\n"
 
-#: aout-adobe.c:197
+#: aout-adobe.c:204
 #, c-format
 msgid "%s: Unknown section type in a.out.adobe file: %x\n"
 msgstr "%s: a.out.adobe dosyasında bilinmeyen bölüm türü: %x\n"
 
-#: aout-cris.c:208
+#: aout-cris.c:207
 #, c-format
 msgid "%s: Invalid relocation type exported: %d"
 msgstr "%s: Geçersiz yer değiştirme türü ihraç edilmiş: %d"
 
-#: aout-cris.c:252
+#: aout-cris.c:251
 #, c-format
 msgid "%s: Invalid relocation type imported: %d"
 msgstr "%s: Geçersiz yer değiştirme türü ithal edilmiş: %d"
 
-#: aout-cris.c:263
+#: aout-cris.c:262
 #, c-format
 msgid "%s: Bad relocation record imported: %d"
 msgstr "%s: Geçersiz yer değiştirme kaydı ithal edilmiş: %d"
 
-#: aoutx.h:1282 aoutx.h:1699
+#: aoutx.h:1295 aoutx.h:1716
 #, c-format
 msgid "%s: can not represent section `%s' in a.out object file format"
 msgstr "%s: `%s' bölümü a.out nesne dosya biçeminde gösterilemez"
 
-#: aoutx.h:1669
+#: aoutx.h:1682
 #, c-format
 msgid "%s: can not represent section for symbol `%s' in a.out object file format"
 msgstr "%s: `%s' sembol bölümü a.out nesne dosyasında gösterilemez"
 
-#: aoutx.h:1671
+#: aoutx.h:1684
 msgid "*unknown*"
 msgstr "*bilinmeyen*"
 
-#: aoutx.h:3732
+#: aoutx.h:3776
 #, c-format
-msgid "%s: relocateable link from %s to %s not supported"
+msgid "%s: relocatable link from %s to %s not supported"
 msgstr "%s: %s'dan %s'ya yeri değiştirilebilen bağ desteklenmiyor"
 
-#: archive.c:1826
+#: archive.c:1751
 msgid "Warning: writing archive was slow: rewriting timestamp\n"
 msgstr "Uyarı: arşiv yazma işlemi yavaş: zaman damgası yeniden yazılıyor\n"
 
-#: archive.c:2093
+#: archive.c:2014
 msgid "Reading archive file mod timestamp"
 msgstr "Arşiv dosyası değişim zaman damgası okunuyor"
 
-#. FIXME: bfd can't call perror.
-#: archive.c:2120
+#: archive.c:2040
 msgid "Writing updated armap timestamp"
 msgstr "Güncellenmiş armap zaman damgası yazılıyor"
 
-#: bfd.c:274
+#: bfd.c:280
 msgid "No error"
 msgstr "Hata yok"
 
-#: bfd.c:275
+#: bfd.c:281
 msgid "System call error"
 msgstr "Sistem çağrı hatası"
 
-#: bfd.c:276
+#: bfd.c:282
 msgid "Invalid bfd target"
 msgstr "Geçersiz bfd hedefi"
 
-#: bfd.c:277
+#: bfd.c:283
 msgid "File in wrong format"
 msgstr "Dosya yanlış biçemde"
 
-#: bfd.c:278
+#: bfd.c:284
 msgid "Archive object file in wrong format"
 msgstr "Arşiv nesne dosyası yanlış biçemde"
 
-#: bfd.c:279
+#: bfd.c:285
 msgid "Invalid operation"
 msgstr "Geçersiz işlem"
 
-#: bfd.c:280
+#: bfd.c:286
 msgid "Memory exhausted"
 msgstr "Bellek tükendi"
 
-#: bfd.c:281
+#: bfd.c:287
 msgid "No symbols"
 msgstr "Sembol yok"
 
-#: bfd.c:282
+#: bfd.c:288
 msgid "Archive has no index; run ranlib to add one"
 msgstr "Arşivin indeksi yok; ranlib çalıştırarak indeks ekleyin"
 
-#: bfd.c:283
+#: bfd.c:289
 msgid "No more archived files"
 msgstr "Başka arşivlenmiş dosya yok"
 
-#: bfd.c:284
+#: bfd.c:290
 msgid "Malformed archive"
 msgstr "Bozuk arşiv"
 
-#: bfd.c:285
+#: bfd.c:291
 msgid "File format not recognized"
 msgstr "Dosya biçemi tanınmıyor"
 
-#: bfd.c:286
+#: bfd.c:292
 msgid "File format is ambiguous"
 msgstr "Dosya biçemi belirsiz"
 
-#: bfd.c:287
+#: bfd.c:293
 msgid "Section has no contents"
 msgstr "Bölümde içerik yok"
 
-#: bfd.c:288
+#: bfd.c:294
 msgid "Nonrepresentable section on output"
 msgstr "Çıktıda gösterilemeyen bölüm"
 
-#: bfd.c:289
+#: bfd.c:295
 msgid "Symbol needs debug section which does not exist"
 msgstr "Sembol, olmayan hata ayıklama bölümünü istiyor"
 
-#: bfd.c:290
+#: bfd.c:296
 msgid "Bad value"
 msgstr "Geçersiz değer"
 
-#: bfd.c:291
+#: bfd.c:297
 msgid "File truncated"
 msgstr "Dosya budandı"
 
-#: bfd.c:292
+#: bfd.c:298
 msgid "File too big"
 msgstr "Dosya fazla büyük"
 
-#: bfd.c:293
+#: bfd.c:299
 msgid "#<Invalid error code>"
 msgstr "#<Geçersiz hata kodu>"
 
-#: bfd.c:700
+#: bfd.c:687
 #, c-format
 msgid "BFD %s assertion fail %s:%d"
 msgstr "BFD %s, olumlama başarısız %s:%d"
 
-#: bfd.c:719
+#: bfd.c:703
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d in %s\n"
 msgstr "BFD %s iç hatası, %s'da, %d satırı, %s içerisinde işlem durduruldu\n"
 
-#: bfd.c:723
+#: bfd.c:707
 #, c-format
 msgid "BFD %s internal error, aborting at %s line %d\n"
 msgstr "BFD %s iç hatası, %s, %d satırında işlem durduruldu\n"
 
-#: bfd.c:725
+#: bfd.c:709
 msgid "Please report this bug.\n"
 msgstr "Lütfen bu hatayı bildirin.\n"
 
+#: bfdwin.c:202
+#, c-format
+msgid "not mapping: data=%lx mapped=%d\n"
+msgstr "eşlenmeyen: veri=%lx eşleşen=%d\n"
+
+#: bfdwin.c:205
+msgid "not mapping: env var not set\n"
+msgstr "eşlenmeyen: çevre değişkeni atanmamış\n"
+
 #: binary.c:306
 #, c-format
 msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
 msgstr "Uyarı: `%s' bölümü çok büyük (negatif) dosya göreli konumu 0x%lx'e yazılıyor."
 
-#: coff-a29k.c:119
+#: coff-a29k.c:120
 msgid "Missing IHCONST"
 msgstr "IHCONST yok"
 
-#: coff-a29k.c:180
+#: coff-a29k.c:181
 msgid "Missing IHIHALF"
 msgstr "IHIHALF yok"
 
-#: coff-a29k.c:212 coff-or32.c:229
+#: coff-a29k.c:213 coff-or32.c:236
 msgid "Unrecognized reloc"
 msgstr "Tanınmayan yer değiştirme"
 
-#: coff-a29k.c:408
+#: coff-a29k.c:409
 msgid "missing IHCONST reloc"
 msgstr "eksik IHCONST yer değiştirmesi"
 
-#: coff-a29k.c:498
+#: coff-a29k.c:499
 msgid "missing IHIHALF reloc"
 msgstr "eksik IHIHALF yer değiştirmesi"
 
-#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
+#: coff-alpha.c:884 coff-alpha.c:921 coff-alpha.c:1992 coff-mips.c:1397
 msgid "GP relative relocation used when GP not defined"
 msgstr "GP tanımlanmamışken GP göreli yer değiştirmesi kullanılmış"
 
-#: coff-alpha.c:1485
+#: coff-alpha.c:1488
 msgid "using multiple gp values"
 msgstr "birden fazla gp değeri kullanılıyor"
 
-#: coff-arm.c:1066 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:294
 #, c-format
 msgid "%s: unable to find THUMB glue '%s' for `%s'"
 msgstr "%1$s: `%3$s' için THUMB birleştiricisi '%2$s' bulunamadı "
 
-#: coff-arm.c:1096 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:329
 #, c-format
 msgid "%s: unable to find ARM glue '%s' for `%s'"
 msgstr "%1$s: `%3$s' için ARM birleştiricisi '%2$s' bulunamadı"
 
-#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
+#: coff-arm.c:1394 coff-arm.c:1489 elf32-arm.h:892 elf32-arm.h:999
 #, c-format
 msgid "%s(%s): warning: interworking not enabled."
 msgstr "%s(%s): uyarı: beraber çalışma kipi etkin değil."
 
-#: coff-arm.c:1395 elf32-arm.h:994
+#: coff-arm.c:1398 elf32-arm.h:1002
 #, c-format
 msgid "  first occurrence: %s: arm call to thumb"
 msgstr "  ilk ortaya çıkış: %s: thumb'a arm'dan çağrı"
 
-#: coff-arm.c:1490 elf32-arm.h:890
+#: coff-arm.c:1493 elf32-arm.h:895
 #, c-format
 msgid "  first occurrence: %s: thumb call to arm"
 msgstr "  ilk ortaya çıkış: %s: arm'a thumb'dan çağrı"
 
-#: coff-arm.c:1493
+#: coff-arm.c:1496
 msgid "  consider relinking with --support-old-code enabled"
 msgstr "  --support-old-code seçeneği ile yeniden bağlamayı deneyin"
 
-#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
+#: coff-arm.c:1788 coff-tic80.c:687 cofflink.c:3038
 #, c-format
 msgid "%s: bad reloc address 0x%lx in section `%s'"
 msgstr "%1$s:  `%3$s' bölümünde geçersiz yer değiştirme adresi 0x%2$lx"
 
-#: coff-arm.c:2127
+#: coff-arm.c:2132
 #, c-format
 msgid "%s: illegal symbol index in reloc: %d"
 msgstr "%s: yer değiştirmede geçersiz sembol indeksi: %d"
 
-#: coff-arm.c:2255
+#: coff-arm.c:2265
 #, c-format
 msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
 msgstr "Hata: %s APCS-%d için derlenmiş, fakat %s APCS-%d için derlenmiş"
 
-#: coff-arm.c:2270 elf32-arm.h:2297
+#: coff-arm.c:2280 elf32-arm.h:2328
 #, c-format
 msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
 msgstr ""
 "Hata: %s kayan sayıları kayan sayı yazmaçlarında geçiriyor, \n"
 "      fakat %s tamsayı yazmaçlarında geçiriyor"
 
-#: coff-arm.c:2273 elf32-arm.h:2302
+#: coff-arm.c:2283 elf32-arm.h:2333
 #, c-format
 msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
 msgstr ""
 "Hata: %s kayan sayıları tamsayı yazmaçlarında geçiriyor, \n"
 "      fakat %s kayan sayı yazmaçlarında geçiriyor"
 
-#: coff-arm.c:2288
+#: coff-arm.c:2298
 #, c-format
 msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
 msgstr "HATA: %s yerden bağımsız kod olarak derlendi, fakat hedef %s yere bağımlı"
 
-#: coff-arm.c:2291
+#: coff-arm.c:2301
 #, c-format
 msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
 msgstr "HATA: %s yere bağımlı kod olarak derlendi, fakat hedef %s yerden bağımsız"
 
-#: coff-arm.c:2320 elf32-arm.h:2358
+#: coff-arm.c:2330 elf32-arm.h:2405
 #, c-format
 msgid "Warning: %s supports interworking, whereas %s does not"
 msgstr "Uyarı: %s girdi dosyası beraber çalışmayı destekliyor, fakat %s desteklemiyor."
 
-#: coff-arm.c:2323 elf32-arm.h:2365
+#: coff-arm.c:2333 elf32-arm.h:2412
 #, c-format
 msgid "Warning: %s does not support interworking, whereas %s does"
 msgstr "Uyarı: %s girdi dosyası beraber çalışmayı desteklemiyor, fakat %s destekliyor."
 
-#: coff-arm.c:2350
+#: coff-arm.c:2360
 #, c-format
 msgid "private flags = %x:"
 msgstr "özel bayraklar = %x:"
 
-#: coff-arm.c:2358 elf32-arm.h:2418
+#: coff-arm.c:2368 elf32-arm.h:2467
 msgid " [floats passed in float registers]"
 msgstr " [kayan sayılar kayan yazmaçlarda geçirildi]"
 
-#: coff-arm.c:2360
+#: coff-arm.c:2370
 msgid " [floats passed in integer registers]"
 msgstr " [kayan sayılar tamsayı yazmaçlarda geçirildi]"
 
-#: coff-arm.c:2363 elf32-arm.h:2421
+#: coff-arm.c:2373 elf32-arm.h:2470
 msgid " [position independent]"
 msgstr " [yerden bağımsız]"
 
-#: coff-arm.c:2365
+#: coff-arm.c:2375
 msgid " [absolute position]"
 msgstr " [yere bağımlı]"
 
-#: coff-arm.c:2369
+#: coff-arm.c:2379
 msgid " [interworking flag not initialised]"
 msgstr " [beraber çalışma bayrağına öndeğer atanmamış]"
 
-#: coff-arm.c:2371
+#: coff-arm.c:2381
 msgid " [interworking supported]"
 msgstr " [beraber çalışma destekleniyor]"
 
-#: coff-arm.c:2373
+#: coff-arm.c:2383
 msgid " [interworking not supported]"
 msgstr " [beraber çalışma desteklenmiyor]"
 
-#: coff-arm.c:2421 elf32-arm.h:2124
+#: coff-arm.c:2431 elf32-arm.h:2150
 #, c-format
 msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
 msgstr "Uyarı: %s beraber çalışma bayrağı atanmadı, çünkü beraber çalışma olmayacağı önceden belirtilmiş"
 
-#: coff-arm.c:2425 elf32-arm.h:2128
+#: coff-arm.c:2435 elf32-arm.h:2154
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s due to outside request"
 msgstr "Uyarı: %s beraber çalışma bayrağı dış istek üzerine temizlendi"
 
-#: coff-i960.c:136 coff-i960.c:485
+#: coff-h8300.c:1096
+#, c-format
+msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
+msgstr "%s çıktısı kullanılırken R_MEM_INDIRECT yerdeğiştirmesi kullanılamıyor"
+
+#: coff-i960.c:137 coff-i960.c:486
 msgid "uncertain calling convention for non-COFF symbol"
 msgstr "COFF olmayan sembol için belirsiz çağrı davranışı"
 
-#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
+#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2193 elf32-mips.c:1783
 msgid "unsupported reloc type"
 msgstr "desteklenmeyen yer değiştirme türü"
 
-#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
+#: coff-mips.c:839 elf32-mips.c:1088 elf64-mips.c:1590 elfn32-mips.c:1554
 msgid "GP relative relocation when _gp not defined"
 msgstr "_gp tanımsız iken GP göreli yer değiştirmesi"
 
 #. No other sections should appear in -membedded-pic
 #. code.
-#: coff-mips.c:2466
+#: coff-mips.c:2431
 msgid "reloc against unsupported section"
 msgstr "desteklenmeyen bölümde yer değiştirme"
 
-#: coff-mips.c:2474
+#: coff-mips.c:2439
 msgid "reloc not properly aligned"
 msgstr "yer değiştirme doğru hizalanmamış"
 
-#: coff-rs6000.c:2766
+#: coff-rs6000.c:2790
 #, c-format
 msgid "%s: unsupported relocation type 0x%02x"
 msgstr "%s: desteklenmeyen yükleyici yerdeğişimi 0x%02x"
 
-#: coff-rs6000.c:2859
+#: coff-rs6000.c:2883
 #, c-format
 msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
 msgstr "%s: 0x%x'da TOC girdisi olmayan `%s' sembolüne TOC yerdeğişimi"
 
-#: coff-rs6000.c:3590 coff64-rs6000.c:2091
+#: coff-rs6000.c:3616 coff64-rs6000.c:2109
 #, c-format
 msgid "%s: symbol `%s' has unrecognized smclas %d"
 msgstr "%s: `%s' sembolünde bilinmeyen %d var"
 
-#: coff-tic54x.c:279 coff-tic80.c:449
+#: coff-tic4x.c:170 coff-tic54x.c:288 coff-tic80.c:450
 #, c-format
 msgid "Unrecognized reloc type 0x%x"
 msgstr "Bilinmeyen yer değiştirme türü 0x%x"
 
-#: coff-tic54x.c:390 coffcode.h:4974
+#: coff-tic4x.c:218 coff-tic54x.c:373 coffcode.h:5045
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in relocs"
 msgstr "%s: uyarı: yer değiştirmelerde geçersiz sembol indeksi %ld"
 
-#: coff-w65.c:363
+#: coff-w65.c:364
 #, c-format
 msgid "ignoring reloc %s\n"
 msgstr "yer değiştirme %s yoksayıldı\n"
 
-#: coffcode.h:1086
+#: coffcode.h:1108
 #, c-format
 msgid "%s (%s): Section flag %s (0x%x) ignored"
 msgstr "%s (%s): Bölüm bayrağı %s (0x%x) yoksayıldı"
 
-#: coffcode.h:2143
+#: coffcode.h:2214
 #, c-format
 msgid "Unrecognized TI COFF target id '0x%x'"
 msgstr "Tanınmayan TI COFF hedef kimliği '0x%x'"
 
-#: coffcode.h:4365
+#: coffcode.h:4437
 #, c-format
 msgid "%s: warning: illegal symbol index %ld in line numbers"
 msgstr "%s: uyarı: satır numaralarında geçersiz sembol indeksi %ld"
 
-#: coffcode.h:4379
+#: coffcode.h:4451
 #, c-format
 msgid "%s: warning: duplicate line number information for `%s'"
 msgstr "%s: uyarı: `%s' için tekrarlanmış satır numarası bilgisi"
 
-#: coffcode.h:4736
+#: coffcode.h:4805
 #, c-format
 msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
 msgstr "%1$s: %3$s sembolü `%4$s' için bilinmeyen saklama sınıfı %2$d"
 
-#: coffcode.h:4867
+#: coffcode.h:4938
 #, c-format
 msgid "warning: %s: local symbol `%s' has no section"
 msgstr "uyarı: %s: `%s' yerel sembolünün bölümü yok"
 
-#: coffcode.h:5012
+#: coffcode.h:5083
 #, c-format
 msgid "%s: illegal relocation type %d at address 0x%lx"
 msgstr "%1$s: 0x%3$lx adresinde geçersiz yer değiştirme türü %2$d"
 
-#: coffgen.c:1661
+#: coffgen.c:1666
 #, c-format
 msgid "%s: bad string table size %lu"
 msgstr "%s: geçersiz dizge tablo boyu %lu"
 
-#: cofflink.c:534 elflink.h:1912
+#: cofflink.c:538 elflink.h:1276
 #, c-format
 msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
 msgstr "Uyarı: %4$s içerisinde `%1$s' sembolünün türü %2$d'den %3$d'e değiştirildi"
 
-#: cofflink.c:2321
+#: cofflink.c:2328
 #, c-format
 msgid "%s: relocs in section `%s', but it has no contents"
 msgstr "%s: `%s' bölümünde yer değiştirmeler mevcut, fakat içi boş"
 
-#: cofflink.c:2664 coffswap.h:877
+#: cofflink.c:2671 coffswap.h:890
 #, c-format
 msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
 msgstr "%s: %s: yer değiştirme taşması: 0x%lx > 0xffff"
 
-#: cofflink.c:2673 coffswap.h:864
+#: cofflink.c:2680 coffswap.h:876
 #, c-format
 msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: uyarı: %s: satır numarası taşması: 0x%lx > 0xffff"
 
-#: dwarf2.c:382
+#: cpu-arm.c:196 cpu-arm.c:206
+#, c-format
+msgid "ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"
+msgstr "Hata: %s EP9312 için derlenmiş, fakat %s XScale için derlenmiş"
+
+#: cpu-arm.c:344
+#, c-format
+msgid "warning: unable to update contents of %s section in %s"
+msgstr "uyarı: %2$s içinde %1$s bölümünün içeriği güncellenemedi"
+
+#: dwarf2.c:380
 msgid "Dwarf Error: Can't find .debug_str section."
 msgstr "Dwarf Hatası: .debug_str bölümü bulunamadı."
 
-#: dwarf2.c:399
+#: dwarf2.c:397
 #, c-format
 msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
 msgstr ""
 "Dwarf Hatası: DW_FORM_strp göreli konumu (%lu) .debug_str boyutundan (%lu) \n"
 "              daha büyük veya eşit."
 
-#: dwarf2.c:543
+#: dwarf2.c:541
 msgid "Dwarf Error: Can't find .debug_abbrev section."
 msgstr "Dwarf Hatası: .debug_abbrev bölümü bulunamadı."
 
-#: dwarf2.c:560
+#: dwarf2.c:556
 #, c-format
 msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
 msgstr ""
 "Dwarf Hatası: Kısaltma göreli konumu (%lu) kısaltma boyutundan (%lu) \n"
 "              daha büyük veya eşit."
 
-#: dwarf2.c:757
+#: dwarf2.c:756
 #, c-format
 msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
 msgstr "Dwarf Hatası: Geçersiz veya desteklenmeyen FORM değeri: %u."
 
-#: dwarf2.c:852
+#: dwarf2.c:933
 msgid "Dwarf Error: mangled line number section (bad file number)."
 msgstr "Dwarf Hatası: bozulmuş satır numarası bölümü (geçersiz dosya numarası)."
 
-#: dwarf2.c:938
+#: dwarf2.c:1032
 msgid "Dwarf Error: Can't find .debug_line section."
 msgstr "Dwarf Hatası: .debug_line bölümü bulunamadı."
 
-#: dwarf2.c:961
+#: dwarf2.c:1049
 #, c-format
 msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
 msgstr ""
 "Dwarf Hatası: Satır göreli konumu (%lu) satır boyutundan (%lu)\n"
 "              daha büyük veya eşit."
 
-#: dwarf2.c:1159
+#: dwarf2.c:1255
 msgid "Dwarf Error: mangled line number section."
 msgstr "Dwarf Hatası: bozuk satır numarası bölümü."
 
-#: dwarf2.c:1355 dwarf2.c:1566
+#: dwarf2.c:1470 dwarf2.c:1620
 #, c-format
 msgid "Dwarf Error: Could not find abbrev number %u."
 msgstr "Dwarf Hatası: Kısaltma numarası %u bulunamadı."
 
-#: dwarf2.c:1527
+#: dwarf2.c:1581
 #, c-format
 msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
 msgstr "Dwarf Hatası: dwarf sürümü '%u' bulundu, bu okuyucu yalnızca sürüm 2 bilgisini anlayabiliyor."
 
-#: dwarf2.c:1534
+#: dwarf2.c:1588
 #, c-format
 msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
 msgstr "Dwarf Hatası: adres boyu '%u' bulundu, bu okuyucu '%u'dan daha büyük boyları okuyamıyor."
 
-#: dwarf2.c:1557
+#: dwarf2.c:1611
 #, c-format
 msgid "Dwarf Error: Bad abbrev number: %u."
 msgstr "Dwarf Hatası: Geçersiz kısaltma numarası: %u."
 
-#: ecoff.c:1318
+#: ecoff.c:1339
 #, c-format
 msgid "Unknown basic type %d"
 msgstr "Bilinmeyen temel tür %d"
 
-#: ecoff.c:1578
+#: ecoff.c:1599
 #, c-format
 msgid ""
 "\n"
@@ -511,7 +534,7 @@ msgstr ""
 "\n"
 "      Son+1 sembolü: %ld"
 
-#: ecoff.c:1585 ecoff.c:1588
+#: ecoff.c:1606 ecoff.c:1609
 #, c-format
 msgid ""
 "\n"
@@ -520,7 +543,7 @@ msgstr ""
 "\n"
 "      İlk sembol: %ld"
 
-#: ecoff.c:1600
+#: ecoff.c:1621
 #, c-format
 msgid ""
 "\n"
@@ -529,7 +552,7 @@ msgstr ""
 "\n"
 "      Son+1 sembolü: %-7ld   Tür:  %s"
 
-#: ecoff.c:1607
+#: ecoff.c:1628
 #, c-format
 msgid ""
 "\n"
@@ -538,7 +561,7 @@ msgstr ""
 "\n"
 "      Yerel sembol: %ld"
 
-#: ecoff.c:1615
+#: ecoff.c:1636
 #, c-format
 msgid ""
 "\n"
@@ -547,7 +570,7 @@ msgstr ""
 "\n"
 "      yapı; Son+1 sembolü: %ld"
 
-#: ecoff.c:1620
+#: ecoff.c:1641
 #, c-format
 msgid ""
 "\n"
@@ -556,7 +579,7 @@ msgstr ""
 "\n"
 "      birleşim; Son+1 sembolü: %ld"
 
-#: ecoff.c:1625
+#: ecoff.c:1646
 #, c-format
 msgid ""
 "\n"
@@ -565,7 +588,7 @@ msgstr ""
 "\n"
 "      enum; Son+1 sembolü: %ld"
 
-#: ecoff.c:1631
+#: ecoff.c:1652
 #, c-format
 msgid ""
 "\n"
@@ -574,54 +597,58 @@ msgstr ""
 "\n"
 "      Tür: %s"
 
-#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
-#: elf64-sh64.c:1659
+#: elf-hppa.h:1458 elf-hppa.h:1491 elf-m10300.c:1628 elf64-sh64.c:1704
 #, c-format
 msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
 msgstr "%1$s: uyarı: %3$s bölümünden `%2$s' sembolüne çözümlenemeyen yer değişimi"
 
-#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
-#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
-#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
-#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
+#: elf-m10200.c:442 elf-m10300.c:1695 elf32-arm.h:2088 elf32-avr.c:812
+#: elf32-cris.c:1390 elf32-d10v.c:570 elf32-fr30.c:634 elf32-frv.c:815
+#: elf32-h8300.c:528 elf32-i860.c:1028 elf32-ip2k.c:1586 elf32-iq2000.c:699
+#: elf32-m32r.c:1283 elf32-m68hc1x.c:1305 elf32-msp430.c:510
+#: elf32-openrisc.c:436 elf32-v850.c:1777 elf32-xstormy16.c:976
+#: elf64-mmix.c:1332
 msgid "internal error: out of range error"
 msgstr "iç hata: kapsam dışı hatası"
 
-#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
-#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
-#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
-#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
+#: elf-m10200.c:446 elf-m10300.c:1699 elf32-arm.h:2092 elf32-avr.c:816
+#: elf32-cris.c:1394 elf32-d10v.c:574 elf32-fr30.c:638 elf32-frv.c:819
+#: elf32-h8300.c:532 elf32-i860.c:1032 elf32-iq2000.c:703 elf32-m32r.c:1287
+#: elf32-m68hc1x.c:1309 elf32-msp430.c:514 elf32-openrisc.c:440
+#: elf32-v850.c:1781 elf32-xstormy16.c:980 elf64-mmix.c:1336 elfxx-mips.c:6452
 msgid "internal error: unsupported relocation error"
 msgstr "iç hata: desteklenmeyen yer değişim hatası"
 
-#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
-#: elf32-h8300.c:556 elf32-m32r.c:1286
+#: elf-m10200.c:450 elf-m10300.c:1703 elf32-arm.h:2096 elf32-d10v.c:578
+#: elf32-h8300.c:536 elf32-m32r.c:1291 elf32-m68hc1x.c:1313
 msgid "internal error: dangerous error"
 msgstr "iç hata: ölümcül hata"
 
-#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
-#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
-#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
-#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
+#: elf-m10200.c:454 elf-m10300.c:1707 elf32-arm.h:2100 elf32-avr.c:824
+#: elf32-cris.c:1402 elf32-d10v.c:582 elf32-fr30.c:646 elf32-frv.c:827
+#: elf32-h8300.c:540 elf32-i860.c:1040 elf32-ip2k.c:1601 elf32-iq2000.c:711
+#: elf32-m32r.c:1295 elf32-m68hc1x.c:1317 elf32-msp430.c:522
+#: elf32-openrisc.c:448 elf32-v850.c:1801 elf32-xstormy16.c:988
+#: elf64-mmix.c:1344
 msgid "internal error: unknown error"
 msgstr "iç hata: bilinmeyen hata"
 
-#: elf.c:343
+#: elf.c:372
 #, c-format
 msgid "%s: invalid string offset %u >= %lu for section `%s'"
 msgstr "%1$s: `%4$s' bölümünde geçersiz dizge göreli konumu  %2$u >= %3$lu"
 
-#: elf.c:589
+#: elf.c:624
 #, c-format
 msgid "%s: invalid SHT_GROUP entry"
 msgstr "%s: geçersiz SHT_GROUP girdisi"
 
-#: elf.c:660
+#: elf.c:695
 #, c-format
 msgid "%s: no group info for section %s"
 msgstr "%s: %s bölümünde grup bilgisi yok"
 
-#: elf.c:1023
+#: elf.c:1055
 msgid ""
 "\n"
 "Program Header:\n"
@@ -629,7 +656,7 @@ msgstr ""
 "\n"
 "Yazılım Başlığı:\n"
 
-#: elf.c:1073
+#: elf.c:1106
 msgid ""
 "\n"
 "Dynamic Section:\n"
@@ -637,7 +664,7 @@ msgstr ""
 "\n"
 "Dinamik Bölüm:\n"
 
-#: elf.c:1202
+#: elf.c:1235
 msgid ""
 "\n"
 "Version definitions:\n"
@@ -645,7 +672,7 @@ msgstr ""
 "\n"
 "Sürüm tanımları:\n"
 
-#: elf.c:1225
+#: elf.c:1258
 msgid ""
 "\n"
 "Version References:\n"
@@ -653,104 +680,114 @@ msgstr ""
 "\n"
 "Sürüm Referansları:\n"
 
-#: elf.c:1230
+#: elf.c:1263
 #, c-format
 msgid "  required from %s:\n"
 msgstr "  %s'den isteniyor:\n"
 
-#: elf.c:1902
+#: elf.c:1944
 #, c-format
 msgid "%s: invalid link %lu for reloc section %s (index %u)"
 msgstr "%1$s: yerdeğişim bölümü %3$s (indeks %4$u) için geçersiz bağ %2$lu"
 
-#: elf.c:3603
+#: elf.c:3686
 #, c-format
 msgid "%s: Not enough room for program headers (allocated %u, need %u)"
 msgstr "%s: Yazılım başlıkları için yeterli yer yok (%u ayrıldı, %u gerekli)"
 
-#: elf.c:3708
+#: elf.c:3791
 #, c-format
 msgid "%s: Not enough room for program headers, try linking with -N"
 msgstr "%s: yazılım başlıkları için gerekli yer yok, -N ile bağlamayı deneyin"
 
-#: elf.c:3833
+#: elf.c:3922
 #, c-format
 msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
 msgstr "Hata: Parçadaki (%s) ilk bölüm 0x%x'de, parça ise 0x%x'de başlıyor"
 
-#: elf.c:4148
+#: elf.c:4242
 #, c-format
 msgid "%s: warning: allocated section `%s' not in segment"
 msgstr "%s: uyarı: ayrılmış `%s' bölümü parça içinde değil"
 
-#: elf.c:4472
+#: elf.c:4566
 #, c-format
 msgid "%s: symbol `%s' required but not present"
 msgstr "%s: `%s' sembolü gerekli fakat mevcut değil"
 
-#: elf.c:4749
+#: elf.c:4854
 #, c-format
 msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
 msgstr "%s: uyarı: Boş yüklenebilir parça bulundu, bu isteyerek mi yapılıyor?\n"
 
-#: elf.c:6193
+#: elf.c:5485
+#, c-format
+msgid "Unable to find equivalent output section for symbol '%s' from section '%s'"
+msgstr "'%2$s' bölümünden '%1$s' sembolü için eşdeğer çıktı bölümü bulunamadı"
+
+#: elf.c:6298
 #, c-format
 msgid "%s: unsupported relocation type %s"
 msgstr "%s: desteklenmeyen yerdeğişim türü %s"
 
-#: elf32-arm.h:1221
+#: elf32-arm.h:1228
 #, c-format
 msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
 msgstr "%s: Uyarı: Arm BLX işlemi Arm işlevi '%s' hedefliyor."
 
-#: elf32-arm.h:1417
+#: elf32-arm.h:1424
 #, c-format
 msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
 msgstr "%s: Uyarı: Thumb BLX işlemi thumb işlevi '%s'ı hedefliyor."
 
-#: elf32-arm.h:1914 elf32-sh.c:4125
+#: elf32-arm.h:1918 elf32-sh.c:4706 elf64-sh64.c:1613
 #, c-format
 msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
 msgstr "%s(%s+0x%lx): SEC_MERGE bölümüne %s yerdeğişimi"
 
-#: elf32-arm.h:2008
+#: elf32-arm.h:2012
 #, c-format
 msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
 msgstr "%1$s: uyarı: %4$s bölümünden `%3$s' sembolüne çözümlenemeyen %2$d yer değişimi"
 
-#: elf32-arm.h:2176
+#: elf32-arm.h:2202
 #, c-format
 msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
 msgstr "Uyarı: %2$s'deki beraber çalışmaz kod ona bağlandığı için %1$s'nin beraber çalışma bayrağı temizlendi"
 
-#: elf32-arm.h:2271
+#: elf32-arm.h:2302
 #, c-format
 msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
 msgstr "Hata: %s EABI sürüm %d için derlenmiş, fakat %s %d sürümü için derlenmiş"
 
-#: elf32-arm.h:2285
+#: elf32-arm.h:2316
 #, c-format
 msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
 msgstr "HATA: %s, APCS-%d için derlenmiş fakat hedef %s APCS-%d kullanıyor"
 
-#: elf32-arm.h:2313
+#: elf32-arm.h:2344
 #, c-format
-msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
-msgstr "Hata: %s VFP işlemi kullanıyor, fakat %s FPA işlemi kullanıyor"
+msgid "ERROR: %s uses VFP instructions, whereas %s does not"
+msgstr "Hata: %s VFP işlemi kullanıyor, fakat %s kullanmıyor"
 
-#: elf32-arm.h:2318
+#: elf32-arm.h:2349
 #, c-format
-msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
-msgstr "Hata: %s FPA işlemi kullanıyor, fakat %s VFP işlemi kullanıyor"
+msgid "ERROR: %s uses FPA instructions, whereas %s does not"
+msgstr "Hata: %s FPA işlemi kullanıyor, fakat %s kullanmıyor"
 
-#: elf32-arm.h:2338
+#: elf32-arm.h:2360 elf32-arm.h:2365
+#, c-format
+msgid "ERROR: %s uses Maverick instructions, whereas %s does not"
+msgstr "Hata: %s Maverick işlemi kullanıyor, fakat %s kullanmıyor"
+
+#: elf32-arm.h:2385
 #, c-format
 msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
 msgstr ""
 "Hata: %s yazılımda kayan sayı kullanıyor,\n"
 "      fakat %s donanımda kayan sayı kullanıyor"
 
-#: elf32-arm.h:2343
+#: elf32-arm.h:2390
 #, c-format
 msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
 msgstr ""
@@ -759,124 +796,129 @@ msgstr ""
 
 #. Ignore init flag - it may not be set, despite the flags field
 #. containing valid data.
-#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
-#: elfxx-mips.c:7756
+#: elf32-arm.h:2443 elf32-cris.c:2975 elf32-m68hc1x.c:1459 elf32-m68k.c:397
+#: elf32-vax.c:546 elfxx-mips.c:9238
 #, c-format
 msgid "private flags = %lx:"
 msgstr "özel bayraklar = %lx:"
 
-#: elf32-arm.h:2405
+#: elf32-arm.h:2452
 msgid " [interworking enabled]"
 msgstr " [beraber çalışma etkinleştirilmiş]"
 
-#: elf32-arm.h:2413
+#: elf32-arm.h:2460
 msgid " [VFP float format]"
 msgstr " [VFP kayan nokta biçemi]"
 
-#: elf32-arm.h:2415
+#: elf32-arm.h:2462
+msgid " [Maverick float format]"
+msgstr " [Maverick kayan nokta biçemi]"
+
+#: elf32-arm.h:2464
 msgid " [FPA float format]"
 msgstr " [FPA kayan nokta biçemi]"
 
-#: elf32-arm.h:2424
+#: elf32-arm.h:2473
 msgid " [new ABI]"
 msgstr " [yeni ABI]"
 
-#: elf32-arm.h:2427
+#: elf32-arm.h:2476
 msgid " [old ABI]"
 msgstr " [eski ABI]"
 
-#: elf32-arm.h:2430
+#: elf32-arm.h:2479
 msgid " [software FP]"
 msgstr " [yazılım FP]"
 
-#: elf32-arm.h:2438
+#: elf32-arm.h:2488
 msgid " [Version1 EABI]"
 msgstr " [Sürüm1 EABI]"
 
-#: elf32-arm.h:2441 elf32-arm.h:2452
+#: elf32-arm.h:2491 elf32-arm.h:2502
 msgid " [sorted symbol table]"
 msgstr " [sıralanmış sembol tablosu]"
 
-#: elf32-arm.h:2443 elf32-arm.h:2454
+#: elf32-arm.h:2493 elf32-arm.h:2504
 msgid " [unsorted symbol table]"
 msgstr " [sıralanmamış sembol tablosu]"
 
-#: elf32-arm.h:2449
+#: elf32-arm.h:2499
 msgid " [Version2 EABI]"
 msgstr " [Sürüm2 EABI]"
 
-#: elf32-arm.h:2457
+#: elf32-arm.h:2507
 msgid " [dynamic symbols use segment index]"
 msgstr " [dinamik semboller bölüm indeksini kullanıyor]"
 
-#: elf32-arm.h:2460
+#: elf32-arm.h:2510
 msgid " [mapping symbols precede others]"
 msgstr " [eşleşme sembolleri diğerlerinden önceliklidir]"
 
-#: elf32-arm.h:2467
+#: elf32-arm.h:2517
 msgid " <EABI version unrecognised>"
 msgstr " <EABI sürümü bilinmiyor>"
 
-#: elf32-arm.h:2474
+#: elf32-arm.h:2524
 msgid " [relocatable executable]"
 msgstr " [yer değiştirebilir uygulama]"
 
-#: elf32-arm.h:2477
+#: elf32-arm.h:2527
 msgid " [has entry point]"
 msgstr " [girdi noktası var]"
 
-#: elf32-arm.h:2482
+#: elf32-arm.h:2532
 msgid "<Unrecognised flag bits set>"
 msgstr "<Bilinmeyen bayrak bitleri atanmış>"
 
-#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
-#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
-#: elf32-xstormy16.c:941 elf64-mmix.c:1310
+#: elf32-avr.c:820 elf32-cris.c:1398 elf32-fr30.c:642 elf32-frv.c:823
+#: elf32-i860.c:1036 elf32-ip2k.c:1597 elf32-iq2000.c:707 elf32-msp430.c:518
+#: elf32-openrisc.c:444 elf32-v850.c:1785 elf32-xstormy16.c:984
+#: elf64-mmix.c:1340
 msgid "internal error: dangerous relocation"
 msgstr "iç hata: tehlikeli yer değişim"
 
-#: elf32-cris.c:949
+#: elf32-cris.c:931
 #, c-format
 msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
 msgstr "%1$s: uyarı: %4$s bölümünden `%3$s' sembolüne çözümlenemeyen %2$s yer değişimi"
 
-#: elf32-cris.c:1012
+#: elf32-cris.c:993
 #, c-format
 msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
 msgstr "%1$s: %4$s bölümünden `%3$s' sembolüne %2$s yer değişimi için PLT veya GOT yok"
 
-#: elf32-cris.c:1015 elf32-cris.c:1141
+#: elf32-cris.c:996 elf32-cris.c:1122
 msgid "[whose name is lost]"
 msgstr "[adı kaybolmuş]"
 
-#: elf32-cris.c:1130
+#: elf32-cris.c:1111
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
 msgstr ""
 "%1$s: %4$s bölümünden yerel sembol sıfır olmayan %3$d eklemesi ile\n"
 "      %2$s yerdeğişimi"
 
-#: elf32-cris.c:1137
+#: elf32-cris.c:1118
 #, c-format
 msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
-msgstr "%1$s: %5$s bölümünden `%4$s' sembolüne sıfır olmayan %3$d eklemesi ile       %2$s yerdeğişimi"
+msgstr "%1$s: %5$s bölümünden `%4$s' sembolüne sıfır olmayan %3$d eklemesi ile %2$s yerdeğişimi"
 
-#: elf32-cris.c:1155
+#: elf32-cris.c:1143
 #, c-format
 msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
 msgstr "%1$s: %4$s bölümünden %3$s evrensel sembolü için %2$s yerdeğişimi yapılamaz"
 
-#: elf32-cris.c:1170
+#: elf32-cris.c:1158
 #, c-format
 msgid "%s: relocation %s in section %s with no GOT created"
 msgstr "%1$s: `%3$s' bölümünde %2$s yer değiştirmesi mevcut, fakat GOT oluşturulmamış"
 
-#: elf32-cris.c:1288
+#: elf32-cris.c:1277
 #, c-format
 msgid "%s: Internal inconsistency; no relocation section %s"
 msgstr "%s: İç tutarsızlık; %s yerdeğişim bölümü yok"
 
-#: elf32-cris.c:2514
+#: elf32-cris.c:2500
 #, c-format
 msgid ""
 "%s, section %s:\n"
@@ -886,492 +928,645 @@ msgstr ""
 "  %s yer değişimi paylaşımlı nesne oluştururken kullanılamaz;\n"
 "  -fPIC ile yeniden derleyin"
 
-#: elf32-cris.c:2991
+#: elf32-cris.c:2978
 msgid " [symbols have a _ prefix]"
 msgstr " [semboller _ önekine sahip]"
 
-#: elf32-cris.c:3030
+#: elf32-cris.c:3017
 #, c-format
 msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
 msgstr "%s: _-önekli sembolleri kullanıyor, fakat dosyaya öneksiz sembolleri yazıyor"
 
-#: elf32-cris.c:3031
+#: elf32-cris.c:3018
 #, c-format
 msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
 msgstr "%s: öneksiz sembolleri kullanıyor, fakat dosyaya _-önekli sembolleri yazıyor"
 
-#: elf32-frv.c:1217
+#: elf32-frv.c:1223
 #, c-format
 msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
 msgstr "%s: %s ile derlendi ve normal derlenmiş modüllerle bağlandı"
 
-#: elf32-frv.c:1267
+#: elf32-frv.c:1273 elf32-iq2000.c:895
 #, c-format
 msgid "%s: compiled with %s and linked with modules compiled with %s"
 msgstr "%s: %s ile derlendi ve %s ile derlenmiş modüllerle bağlandı"
 
-#: elf32-frv.c:1279
+#: elf32-frv.c:1285
 #, c-format
 msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
 msgstr "%s: önceki modüllerden farklı bilinmeyen e_flags (0x%lx)  alanları kullanılıyor (0x%lx)"
 
-#: elf32-frv.c:1315
+#: elf32-frv.c:1321 elf32-iq2000.c:933
 #, c-format
 msgid "private flags = 0x%lx:"
 msgstr "özel bayraklar = 0x%lx:"
 
-#: elf32-gen.c:82 elf64-gen.c:82
+#: elf32-gen.c:83 elf64-gen.c:82
 #, c-format
 msgid "%s: Relocations in generic ELF (EM: %d)"
 msgstr "%s: Normal ELF'de yerdeğişimler (EM: %d)"
 
-#: elf32-hppa.c:671 elf64-ppc.c:2323
+#: elf32-hppa.c:672 elf32-m68hc1x.c:176 elf64-ppc.c:3118
 #, c-format
 msgid "%s: cannot create stub entry %s"
 msgstr "%s: koçan girişi %s oluşturulamadı"
 
-#: elf32-hppa.c:956 elf32-hppa.c:3555
+#: elf32-hppa.c:957 elf32-hppa.c:3538
 #, c-format
 msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
 msgstr "%s(%s+0x%lx): %s'e ulaşılamadı, -ffunction-sections ile derleyin"
 
-#: elf32-hppa.c:1338 elf64-x86-64.c:673
+#: elf32-hppa.c:1340 elf64-x86-64.c:672 elf64-x86-64.c:797
 #, c-format
 msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
 msgstr "%s: %s yer değişimi paylaşımlı nesne oluşturulurken kullanılamaz; -fPIC ile yeniden derleyin"
 
-#: elf32-hppa.c:1358
+#: elf32-hppa.c:1360
 #, c-format
 msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
 msgstr "%s: %s yer değişimi paylaşımlı nesne oluştururken kullanılamaz; -fPIC ile yeniden derleyin"
 
-#: elf32-hppa.c:1551
+#: elf32-hppa.c:1553
 #, c-format
 msgid "Could not find relocation section for %s"
 msgstr "%s için yer değiştirme bölümü bulunamadı"
 
-#: elf32-hppa.c:2855
+#: elf32-hppa.c:2828
 #, c-format
 msgid "%s: duplicate export stub %s"
 msgstr "%s: birden fazla ihraç koçanı %s"
 
-#: elf32-hppa.c:3433
+#: elf32-hppa.c:3416
 #, c-format
 msgid "%s(%s+0x%lx): fixing %s"
 msgstr "%s(%s+0x%lx): %s düzeltiliyor"
 
-#: elf32-hppa.c:4080
+#: elf32-hppa.c:4039
 #, c-format
 msgid "%s(%s+0x%lx): cannot handle %s for %s"
 msgstr "%1$s(%2$s+0x%3$lx): %5$s için %4$s işlenemedi"
 
-#: elf32-hppa.c:4393
+#: elf32-hppa.c:4357
 msgid ".got section not immediately after .plt section"
 msgstr ".got bölümü .plt bölümünün hemen arkasında değil"
 
-#: elf32-i386.c:379
+#: elf32-i386.c:326
 #, c-format
 msgid "%s: invalid relocation type %d"
 msgstr "%s: geçersiz yer değişim türü %d"
 
-#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
+#: elf32-i386.c:841 elf32-s390.c:990 elf32-sparc.c:887 elf32-xtensa.c:637
+#: elf64-s390.c:943 elf64-x86-64.c:650
 #, c-format
 msgid "%s: bad symbol index: %d"
 msgstr "%s: geçersiz sembol indeksi: %d"
 
-#: elf32-i386.c:948
+#: elf32-i386.c:949 elf32-s390.c:1168 elf32-sh.c:6426 elf32-sparc.c:1011
+#: elf64-s390.c:1129
 #, c-format
 msgid "%s: `%s' accessed both as normal and thread local symbol"
 msgstr "%s: `%s'a hem normal, hem de dal yerel sembolü olarak erişildi"
 
-#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
-#: elf64-x86-64.c:761
+#: elf32-i386.c:1064 elf32-s390.c:1279 elf64-ppc.c:3929 elf64-s390.c:1243
+#: elf64-x86-64.c:886
 #, c-format
 msgid "%s: bad relocation section name `%s'"
 msgstr "%s: geçersiz yerdeğişim bölümü adı `%s'"
 
-#: elf32-i386.c:1159 elf64-alpha.c:4768
-#, c-format
-msgid "%s: TLS local exec code cannot be linked into shared objects"
-msgstr "%s: TLS yerel çalıştırma kodu paylaşımlı nesnelere bağlanamaz"
-
-#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
-#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
+#: elf32-i386.c:2908 elf32-m68k.c:1757 elf32-s390.c:3022 elf32-sparc.c:2879
+#: elf32-xtensa.c:2193 elf64-s390.c:3018 elf64-sparc.c:2664
+#: elf64-x86-64.c:2452
 #, c-format
 msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
 msgstr "%s(%s+0x%lx): `%s' sembolüne çözümlenemeyen yer değişimi"
 
-#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
-#: elf64-x86-64.c:1986
+#: elf32-i386.c:2947 elf32-m68k.c:1796 elf32-s390.c:3072 elf64-s390.c:3068
+#: elf64-x86-64.c:2490
 #, c-format
 msgid "%s(%s+0x%lx): reloc against `%s': error %d"
 msgstr "%s(%s+0x%lx): %s'e yer değişimi: %d hatası"
 
-#: elf32-m32r.c:924
+#: elf32-ip2k.c:565 elf32-ip2k.c:571 elf32-ip2k.c:734 elf32-ip2k.c:740
+msgid "ip2k relaxer: switch table without complete matching relocation information."
+msgstr "ip2k esneticisi: tamamen eşleşen yerdeğişim bilgisi olmadan tabloyu değiştirir."
+
+#: elf32-ip2k.c:588 elf32-ip2k.c:767
+msgid "ip2k relaxer: switch table header corrupt."
+msgstr "ip2k esneticisi: değişiklik tablosu başlığı bozuk."
+
+#: elf32-ip2k.c:1395
+#, c-format
+msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr "ip2k bağlayıcısı: 0x%08lx adresinde sayfa işlemi eksik (hedef = 0x%08lx)."
+
+#: elf32-ip2k.c:1409
+#, c-format
+msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr "ip2k bağlayıcısı: 0x%08lx adresinde gereksiz sayfa işlemi (hedef = 0x%08lx)."
+
+#. Only if it's not an unresolved symbol.
+#: elf32-ip2k.c:1593
+msgid "unsupported relocation between data/insn address spaces"
+msgstr "veri/işlem adres yerleri arasında desteklenmeyen yerdeğişim"
+
+#: elf32-iq2000.c:907 elf32-m68hc1x.c:1431 elf32-ppc.c:2175 elf64-sparc.c:3072
+#: elfxx-mips.c:9195
+#, c-format
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%1$s: önceki modüllerden (0x%3$lx) farklı e_flags (0x%2$lx) alanları kullanılıyor"
+
+#: elf32-m32r.c:930
 msgid "SDA relocation when _SDA_BASE_ not defined"
 msgstr "_SDA_BASE_ tanımlanmamış iken SDA yer değişimi"
 
-#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
-#: elf64-alpha.c:4313 elf64-ia64.c:3687
+#: elf32-m32r.c:1018 elf64-alpha.c:4279 elf64-alpha.c:4407 elf32-ia64.c:3958
+#: elf64-ia64.c:3958
 #, c-format
 msgid "%s: unknown relocation type %d"
 msgstr "%s: bilinmeyen yer değişim türü %d"
 
-#: elf32-m32r.c:1221
+#: elf32-m32r.c:1226
 #, c-format
 msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
 msgstr "%1$s: Bir %3$s yer değişiminin hedefi (%2$s) yanlış bölümde (%4$s)"
 
-#: elf32-m32r.c:1947
+#: elf32-m32r.c:1952
 #, c-format
 msgid "%s: Instruction set mismatch with previous modules"
 msgstr "%s: Önceki modüllerle işlem uyuşmazlığı"
 
-#: elf32-m32r.c:1970
+#: elf32-m32r.c:1975
 #, c-format
 msgid "private flags = %lx"
 msgstr "özel bayraklar = %lx"
 
-#: elf32-m32r.c:1975
+#: elf32-m32r.c:1980
 msgid ": m32r instructions"
 msgstr ": m32r işlemleri"
 
-#: elf32-m32r.c:1976
+#: elf32-m32r.c:1981
 msgid ": m32rx instructions"
 msgstr ": m32rx işlemleri"
 
-#: elf32-m68k.c:413
+#: elf32-m68hc1x.c:1217
+#, c-format
+msgid "Reference to the far symbol `%s' using a wrong relocation may result in incorrect execution"
+msgstr "Uzak sembol `%s''ye yanlış bir yerdeğişim ile referans yanlış işlemeye yol açabilir."
+
+#: elf32-m68hc1x.c:1240
+#, c-format
+msgid "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)"
+msgstr "saklanmış adres [%lx:%04lx] (%lx) şimdiki saklanmış adres [%lx:%04lx] (%lx) ile aynı saklama bankında değil"
+
+#: elf32-m68hc1x.c:1259
+#, c-format
+msgid "reference to a banked address [%lx:%04lx] in the normal address space at %04lx"
+msgstr "%3$04lx normal adresinde saklanmış adres [%1$lx:%2$04lx]'e referans var"
+
+#: elf32-m68hc1x.c:1396
+#, c-format
+msgid "%s: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers"
+msgstr "%s: 16-bit tamsayı için derlenmiş (-mshort) dosyalar, 32 bit tamsayı için derlenmiş başka dosyalarla bağlanıyor"
+
+#: elf32-m68hc1x.c:1404
+#, c-format
+msgid "%s: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double"
+msgstr "%s: 32-bit double (-fshort-double) için derlenmiş dosyalar 64-bit double için derlenmiş dosyalarla bağlanıyor"
+
+#: elf32-m68hc1x.c:1414
+#, c-format
+msgid "%s: linking files compiled for HCS12 with others compiled for HC12"
+msgstr "%s: HCS12 için derlenmiş dosyalar HC12 için derlenmiş dosyalarla bağlanıyor"
+
+#: elf32-m68hc1x.c:1462
+msgid "[abi=32-bit int, "
+msgstr "[abi=32-bit int, "
+
+#: elf32-m68hc1x.c:1464
+msgid "[abi=16-bit int, "
+msgstr "[abi=16-bit int, "
+
+#: elf32-m68hc1x.c:1467
+msgid "64-bit double, "
+msgstr "64-bit double, "
+
+#: elf32-m68hc1x.c:1469
+msgid "32-bit double, "
+msgstr "32-bit double, "
+
+#: elf32-m68hc1x.c:1472
+msgid "cpu=HC11]"
+msgstr "cpu=HC11]"
+
+#: elf32-m68hc1x.c:1474
+msgid "cpu=HCS12]"
+msgstr "cpu=HCS12]"
+
+#: elf32-m68hc1x.c:1476
+msgid "cpu=HC12]"
+msgstr "cpu=HC12]"
+
+#: elf32-m68hc1x.c:1479
+msgid " [memory=bank-model]"
+msgstr " [bellek=bank türü]"
+
+#: elf32-m68hc1x.c:1481
+msgid " [memory=flat]"
+msgstr " [bellek=düz]"
+
+#: elf32-m68k.c:400
 msgid " [cpu32]"
 msgstr " [cpu32]"
 
-#: elf32-m68k.c:416
+#: elf32-m68k.c:403
 msgid " [m68000]"
 msgstr " [m68000]"
 
-#: elf32-mcore.c:354 elf32-mcore.c:457
+#: elf32-mcore.c:353 elf32-mcore.c:456
 #, c-format
 msgid "%s: Relocation %s (%d) is not currently supported.\n"
 msgstr "%s: %s (%d) yer değişimi henüz desteklenmiyor.\n"
 
-#: elf32-mcore.c:442
+#: elf32-mcore.c:441
 #, c-format
 msgid "%s: Unknown relocation type %d\n"
 msgstr "%s: Bilinmeyen yer değişim türü %d\n"
 
-#: elf32-mips.c:1152 elf64-mips.c:1783
+#: elf32-mips.c:1170 elf64-mips.c:1717 elfn32-mips.c:1664
 msgid "32bits gp relative relocation occurs for an external symbol"
 msgstr "32 bitlik gp göreceli yer değişim bir dış sembol için yapılıyor"
 
-#: elf32-mips.c:1301
+#: elf32-mips.c:1314 elf64-mips.c:1830 elfn32-mips.c:1783
 #, c-format
 msgid "Linking mips16 objects into %s format is not supported"
 msgstr "mips16 nesnelerini %s biçemine bağlamak desteklenmiyor"
 
-#: elf32-ppc.c:1460
+#: elf32-ppc.c:2056
+#, c-format
+msgid "generic linker can't handle %s"
+msgstr "jenerik bağlayıcı %s desteklemiyor"
+
+#: elf32-ppc.c:2138
 #, c-format
 msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
 msgstr "%s: -mrelocatable ile derlendi ve normal derlenmiş modüllerle bağlandı"
 
-#: elf32-ppc.c:1468
+#: elf32-ppc.c:2147
 #, c-format
 msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
 msgstr "%s: normal derlendi ve -mrelocatable ile derlenmiş modüllere bağlandı"
 
-#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
-#, c-format
-msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr "%1$s: önceki modüllerden (0x%3$lx) farklı e_flags (0x%2$lx) alanları kullanılıyor"
-
-#: elf32-ppc.c:1592
-#, c-format
-msgid "%s: Unknown special linker type %d"
-msgstr "%s: Bilinmeyen özel bağlayıcı türü %d"
-
-#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
+#: elf32-ppc.c:3413
 #, c-format
 msgid "%s: relocation %s cannot be used when making a shared object"
 msgstr "%s: %s yerdeğişimi paylaşımlı nesne oluşturulurken kullanılamaz"
 
-#: elf32-ppc.c:3126 elf64-ppc.c:5473
+#. It does not make sense to have a procedure linkage
+#. table entry for a local symbol.
+#: elf32-ppc.c:3619
+#, c-format
+msgid "%s(%s+0x%lx): %s reloc against local symbol"
+msgstr "%s(%s+0x%lx): %s yerel sembole yerdeğişimi"
+
+#: elf32-ppc.c:4862 elf64-ppc.c:7789
 #, c-format
 msgid "%s: unknown relocation type %d for symbol %s"
 msgstr "%1$s: %3$s sembolü için bilinmeyen %2$d türünde yerdeğişimi"
 
-#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
+#: elf32-ppc.c:5113
+#, c-format
+msgid "%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"
+msgstr "%1$s(%2$s+0x%3$lx): %5$s'ye yerdeğişimde `%4$s'de sıfır olmayan ekleme"
+
+#: elf32-ppc.c:5399 elf32-ppc.c:5425 elf32-ppc.c:5484
 #, c-format
-msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
+msgid "%s: the target (%s) of a %s relocation is in the wrong output section (%s)"
 msgstr "%1$s: %3$s yerdeğişiminin hedefi (%2$s) yanlış çıktı bölümünde (%4$s)"
 
-#: elf32-ppc.c:3619
+#: elf32-ppc.c:5539
 #, c-format
-msgid "%s: Relocation %s is not yet supported for symbol %s."
+msgid "%s: relocation %s is not yet supported for symbol %s."
 msgstr "%s: %s yerdeğişimi %s sembolü için henüz desteklenmiyor."
 
-#: elf32-sh.c:1964
+#: elf32-ppc.c:5594 elf64-ppc.c:8461
+#, c-format
+msgid "%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
+msgstr "%1$s(%2$s+0x%3$lx): `%5$s' sembolüne çözümlenemeyen yer değişimi %4$s"
+
+#: elf32-ppc.c:5644 elf64-ppc.c:8507
+#, c-format
+msgid "%s(%s+0x%lx): %s reloc against `%s': error %d"
+msgstr "%1$s(%2$s+0x%3$lx): %5$s'e %4$s yer değişimi: %6$d hatası"
+
+#: elf32-ppc.c:5888
+#, c-format
+msgid "corrupt or empty %s section in %s"
+msgstr "%2$s içinde bozuk veya boş %1$s bölümü"
+
+#: elf32-ppc.c:5895
+#, c-format
+msgid "unable to read in %s section from %s"
+msgstr "%s bölümü %s'den okunamadı"
+
+#: elf32-ppc.c:5901
+#, c-format
+msgid "corrupt %s section in %s"
+msgstr "%2$s içinde bozuk %1$s bölümü"
+
+#: elf32-ppc.c:5944
+#, c-format
+msgid "warning: unable to set size of %s section in %s"
+msgstr "uyarı: %2$s içinde %1$s bölümünün boyu atanamadı"
+
+#: elf32-ppc.c:5994
+msgid "failed to allocate space for new APUinfo section."
+msgstr "yeni APUinfo bölümü için yer ayrılamadı."
+
+#: elf32-ppc.c:6013
+msgid "failed to compute new APUinfo section."
+msgstr "yeni APUinfo bölümü hesaplanamadı."
+
+#: elf32-ppc.c:6016
+msgid "failed to install new APUinfo section."
+msgstr "yeni APUinfo bölümü kurulamadı."
+
+#: elf32-s390.c:2256 elf64-s390.c:2226
+#, c-format
+msgid "%s(%s+0x%lx): invalid instruction for TLS relocation %s"
+msgstr "%s(%s+0x%lx): TLS yerdeğişimi %s için geçersiz işlem"
+
+#: elf32-sh.c:2103
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
 msgstr "%s: 0x%lx: uyarı: hatalı R_SH_USES göreli konumu"
 
-#: elf32-sh.c:1976
+#: elf32-sh.c:2115
 #, c-format
 msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
 msgstr "%s: 0x%lx: uyarı: R_SH_USES bilinmeyen insn 0x%x'ı imliyor"
 
-#: elf32-sh.c:1993
+#: elf32-sh.c:2132
 #, c-format
 msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
 msgstr "%s: 0x%lx: uyarı: hatalı R_SH_USES yükleme göreli konumu"
 
-#: elf32-sh.c:2008
+#: elf32-sh.c:2147
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected reloc"
 msgstr "%s: 0x%lx: uyarı: beklenen yerdeğişim bulunamadı"
 
-#: elf32-sh.c:2036
+#: elf32-sh.c:2175
 #, c-format
 msgid "%s: 0x%lx: warning: symbol in unexpected section"
 msgstr "%s: 0x%lx: uyarı: beklenmeyen bölümde sembol"
 
-#: elf32-sh.c:2153
+#: elf32-sh.c:2300
 #, c-format
 msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
 msgstr "%s: 0x%lx: uyarı: beklenen COUNT yerdeğişimi bulunamadı"
 
-#: elf32-sh.c:2162
+#: elf32-sh.c:2309
 #, c-format
 msgid "%s: 0x%lx: warning: bad count"
 msgstr "%s: 0x%lx: uyarı: hatalı sayım"
 
-#: elf32-sh.c:2550 elf32-sh.c:2926
+#: elf32-sh.c:2712 elf32-sh.c:3088
 #, c-format
 msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
 msgstr "%s: 0x%lx: ölümcül: gevşetilirken yerdeğişim taşması"
 
-#: elf32-sh.c:4073 elf64-sh64.c:1576
+#: elf32-sh.c:4654 elf64-sh64.c:1585
 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
 msgstr "Yerel sembolde STO_SH5_ISA32 desteklenmiyor"
 
-#: elf32-sh.c:4284
+#: elf32-sh.c:4809
+#, c-format
+msgid "%s: unresolvable relocation against symbol `%s' from %s section"
+msgstr "%1$s: %3$s bölümünden `%2$s' sembolüne çözümlenemeyen yer değişimi"
+
+#: elf32-sh.c:4881
 #, c-format
 msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
 msgstr "%s: 0x%lx: ölümcül: gevşetme destek yerdeğişimi için hizalanmamış dal"
 
-#: elf32-sh64.c:203 elf64-sh64.c:2364
+#: elf32-sh.c:6627 elf64-alpha.c:4848
+#, c-format
+msgid "%s: TLS local exec code cannot be linked into shared objects"
+msgstr "%s: TLS yerel çalıştırma kodu paylaşımlı nesnelere bağlanamaz"
+
+#: elf32-sh64.c:221 elf64-sh64.c:2407
 #, c-format
 msgid "%s: compiled as 32-bit object and %s is 64-bit"
 msgstr "%s: 32 bitlik sistem için derlenmiş ve %s 64 bit"
 
-#: elf32-sh64.c:206 elf64-sh64.c:2367
+#: elf32-sh64.c:224 elf64-sh64.c:2410
 #, c-format
 msgid "%s: compiled as 64-bit object and %s is 32-bit"
 msgstr "%s: 64 bitlik sistem için derlenmiş ve %s 32 bit"
 
-#: elf32-sh64.c:208 elf64-sh64.c:2369
+#: elf32-sh64.c:226 elf64-sh64.c:2412
 #, c-format
 msgid "%s: object size does not match that of target %s"
 msgstr "%s: nesne boyu hedef %s'nin boyuyla eşleşmiyor"
 
-#: elf32-sh64.c:440 elf64-sh64.c:2941
+#: elf32-sh64.c:461 elf64-sh64.c:2990
 #, c-format
 msgid "%s: encountered datalabel symbol in input"
 msgstr "%s: girdide veri etiketi sembolüne rastlandı"
 
-#: elf32-sh64.c:523
+#: elf32-sh64.c:544
 msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
 msgstr "PTB uyumsuzluğu: SHmedia adresi (bit 0 == 1)"
 
-#: elf32-sh64.c:526
+#: elf32-sh64.c:547
 msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
 msgstr "PTA uyumsuzluğu: SHcompact adresi (bit 0 == 0)"
 
-#: elf32-sh64.c:544
+#: elf32-sh64.c:565
 #, c-format
 msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
 msgstr "%s: GAS hatası: R_SH_PT_16 içeren PTB yönergesi beklenmiyordu"
 
-#: elf32-sh64.c:593 elf64-sh64.c:1703
+#: elf32-sh64.c:614 elf64-sh64.c:1748
 #, c-format
 msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
 msgstr "%1$s: %3$08x ve %4$08x yerdeğiştirmesinde hizalanmamış yer değiştirme türü %2$d\n"
 
-#: elf32-sh64.c:677
+#: elf32-sh64.c:698
 #, c-format
 msgid "%s: could not write out added .cranges entries"
 msgstr "%s: eklenen .cranges girdileri yazılamadı"
 
-#: elf32-sh64.c:739
+#: elf32-sh64.c:760
 #, c-format
 msgid "%s: could not write out sorted .cranges entries"
 msgstr "%s: sıralanmış .cranges girdileri yazılamadı"
 
-#: elf32-sparc.c:1535 elf64-sparc.c:2224
+#: elf32-sparc.c:2521 elf64-sparc.c:2314
 #, c-format
 msgid "%s: probably compiled without -fPIC?"
 msgstr "%s: acaba -fPIC olmaksızın mı derlenmiş?"
 
-#: elf32-sparc.c:2002
+#: elf32-sparc.c:3348
 #, c-format
 msgid "%s: compiled for a 64 bit system and target is 32 bit"
 msgstr "%s: 64 bitlik sistem için derlenmiş ve hedef 32 bit"
 
-#: elf32-sparc.c:2016
+#: elf32-sparc.c:3362
 #, c-format
 msgid "%s: linking little endian files with big endian files"
 msgstr "%s: küçük sonlu dosyalar büyük sonlu dosyalarla bağlanıyor"
 
-#: elf32-v850.c:682
+#: elf32-v850.c:753
 #, c-format
 msgid "Variable `%s' cannot occupy in multiple small data regions"
 msgstr "`%s' değişkeni birden fazla küçük veri sahasını kapsayamaz"
 
-#: elf32-v850.c:685
+#: elf32-v850.c:756
 #, c-format
 msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
 msgstr "`%s' değişkeni küçük, sıfır ve ufak veri sahalarından yalnız birinde olabilir"
 
-#: elf32-v850.c:688
+#: elf32-v850.c:759
 #, c-format
 msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
 msgstr "`%s' değişkeni aynı anda hem küçük hem sıfır veri sahalarında bulunamaz"
 
-#: elf32-v850.c:691
+#: elf32-v850.c:762
 #, c-format
 msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
 msgstr "`%s' değişkeni aynı anda hem küçük hem ufak veri sahalarında bulunamaz"
 
-#: elf32-v850.c:694
+#: elf32-v850.c:765
 #, c-format
 msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
 msgstr "`%s' değişkeni aynı anda hem sıfır hem ufak veri sahalarında bulunamaz"
 
-#: elf32-v850.c:1072
+#: elf32-v850.c:1144
 msgid "FAILED to find previous HI16 reloc\n"
 msgstr "önceki HI16 yerdeğişimi BULUNAMADI\n"
 
-#: elf32-v850.c:1703
+#: elf32-v850.c:1789
 msgid "could not locate special linker symbol __gp"
 msgstr "özel bağlayıcı sembolü __gp bulunamadı"
 
-#: elf32-v850.c:1707
+#: elf32-v850.c:1793
 msgid "could not locate special linker symbol __ep"
 msgstr "özel bağlayıcı sembolü __ep bulunamadı"
 
-#: elf32-v850.c:1711
+#: elf32-v850.c:1797
 msgid "could not locate special linker symbol __ctbp"
 msgstr "özel bağlayıcı sembolü __ctbp bulunamadı"
 
-#: elf32-v850.c:1875
+#: elf32-v850.c:1963
 #, c-format
 msgid "%s: Architecture mismatch with previous modules"
 msgstr "%s: Önceki modüllerle platform uyumsuzluğu"
 
-#: elf32-v850.c:1895
+#: elf32-v850.c:1983
 #, c-format
 msgid "private flags = %lx: "
 msgstr "özel bayraklar = %lx:"
 
-#: elf32-v850.c:1900
+#: elf32-v850.c:1988
 msgid "v850 architecture"
 msgstr "v850 platformu"
 
-#: elf32-v850.c:1901
+#: elf32-v850.c:1989
 msgid "v850e architecture"
 msgstr "v850e platformu"
 
-#: elf32-v850.c:1902
-msgid "v850ea architecture"
-msgstr "v850ea platformu"
-
-#: elf32-vax.c:546
+#: elf32-vax.c:549
 msgid " [nonpic]"
 msgstr " [nonpic]"
 
-#: elf32-vax.c:549
+#: elf32-vax.c:552
 msgid " [d-float]"
 msgstr " [d-float]"
 
-#: elf32-vax.c:552
+#: elf32-vax.c:555
 msgid " [g-float]"
 msgstr " [g-float]"
 
-#: elf32-vax.c:674
+#: elf32-vax.c:663
 #, c-format
 msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
 msgstr "%1$s: uyarı: `%3$s'ye GOT %2$ld eklentisi bir önceki %4$ld GOT eklentisiyle eşleşmiyor"
 
-#: elf32-vax.c:1679
+#: elf32-vax.c:1667
 #, c-format
 msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
 msgstr "%1$s: uyarı: %4$s bölümünden `%3$s' sembolüne PLT eklentisi %2$d yok sayıldı"
 
-#: elf32-vax.c:1814
+#: elf32-vax.c:1802
 #, c-format
 msgid "%s: warning: %s relocation against symbol `%s' from %s section"
 msgstr "%1$s: uyarı: %4$s bölümünden `%3$s' sembolüne %2$s yer değişimi"
 
-#: elf32-vax.c:1820
+#: elf32-vax.c:1808
 #, c-format
 msgid "%s: warning: %s relocation to 0x%x from %s section"
 msgstr "%1$s: uyarı: %4$s bölümünden 0x%3$x'e %2$s yer değişimi"
 
-#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
+#: elf32-xstormy16.c:462 elf32-ia64.c:2450 elf64-ia64.c:2450
 msgid "non-zero addend in @fptr reloc"
 msgstr "@fptr yerdeğişiminde sıfır olmayan eklenti"
 
-#: elf64-alpha.c:1097
+#: elf64-alpha.c:1108
 msgid "GPDISP relocation did not find ldah and lda instructions"
 msgstr "GPDISP yerdeğişimi ldah ve lda işlemlerini bulamadı"
 
-#: elf64-alpha.c:3675
+#: elf64-alpha.c:3731
 #, c-format
 msgid "%s: .got subsegment exceeds 64K (size %d)"
 msgstr "%s: .got alt parçası 64K'yı aşıyor (boy %d)"
 
-#: elf64-alpha.c:4498 elf64-alpha.c:4510
+#: elf64-alpha.c:4602 elf64-alpha.c:4614
 #, c-format
 msgid "%s: gp-relative relocation against dynamic symbol %s"
 msgstr "%s: %s dinamik sembolüne gp göreceli yer değişimi"
 
-#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#: elf64-alpha.c:4640 elf64-alpha.c:4773
 #, c-format
 msgid "%s: pc-relative relocation against dynamic symbol %s"
 msgstr "%s: %s dinamik sembolüne pc göreceli yer değişimi"
 
-#: elf64-alpha.c:4564
+#: elf64-alpha.c:4668
 #, c-format
 msgid "%s: change in gp: BRSGP %s"
 msgstr "%s: gp içinde değişiklik: BRSGP %s"
 
-#: elf64-alpha.c:4589
+#: elf64-alpha.c:4693
 msgid "<unknown>"
 msgstr "<bilinmeyen>"
 
-#: elf64-alpha.c:4594
+#: elf64-alpha.c:4698
 #, c-format
 msgid "%s: !samegp reloc against symbol without .prologue: %s"
 msgstr "%s: .prologue olmaksızın sembole !samegp yerdeğişimi: %s"
 
-#: elf64-alpha.c:4639
+#: elf64-alpha.c:4749
 #, c-format
 msgid "%s: unhandled dynamic relocation against %s"
 msgstr "%s: %s'e desteklenmeyen dinamik yerdeğişim"
 
-#: elf64-alpha.c:4752
+#: elf64-alpha.c:4832
 #, c-format
 msgid "%s: dtp-relative relocation against dynamic symbol %s"
 msgstr "%s: %s dinamik sembolüne dtp göreceli yer değişimi"
 
-#: elf64-alpha.c:4775
+#: elf64-alpha.c:4855
 #, c-format
 msgid "%s: tp-relative relocation against dynamic symbol %s"
 msgstr "%s: %s dinamik sembolüne tp göreceli yer değişimi"
 
-#: elf64-hppa.c:2080
+#: elf64-hppa.c:2086
 #, c-format
 msgid "stub entry for %s cannot load .plt, dp offset = %ld"
 msgstr "%s için koçan girdisi .plt'yi yükleyemedi, dp görecesi = %ld"
 
-#: elf64-mmix.c:1002
+#: elf64-mmix.c:1032
 #, c-format
 msgid ""
 "%s: Internal inconsistency error for value for\n"
@@ -1380,50 +1575,50 @@ msgstr ""
 "%s: bağlayıcı tarafından ayrılmış global yazmaç değeri için iç tutarsızlık hatası:\n"
 " 0x%lx%08lx != gevşetilmiş: 0x%lx%08lx\n"
 
-#: elf64-mmix.c:1386
+#: elf64-mmix.c:1416
 #, c-format
 msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
 msgstr "%s: yazmaç sembolüne temel artı görece yerdeğişimi: %s içinde (bilinmeyen)"
 
-#: elf64-mmix.c:1391
+#: elf64-mmix.c:1421
 #, c-format
 msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
 msgstr "%1$s: yazmaç sembolüne temel artı görece yerdeğişimi: %3$s içinde %2$s"
 
-#: elf64-mmix.c:1435
+#: elf64-mmix.c:1465
 #, c-format
 msgid "%s: register relocation against non-register symbol: (unknown) in %s"
 msgstr "%s: yazmaç olmayan sembole yazmaç yerdeğişimi: %s içinde (bilinmeyen)"
 
-#: elf64-mmix.c:1440
+#: elf64-mmix.c:1470
 #, c-format
 msgid "%s: register relocation against non-register symbol: %s in %s"
 msgstr "%1$s: yazmaç olmayan sembole yazmaç yerdeğişimi: %3$s içinde %2$s"
 
-#: elf64-mmix.c:1477
+#: elf64-mmix.c:1507
 #, c-format
 msgid "%s: directive LOCAL valid only with a register or absolute value"
 msgstr "%s: YEREL (LOCAL) yönergesi yalnız bir yazmaç veya kesin değerle geçerlidir"
 
-#: elf64-mmix.c:1505
+#: elf64-mmix.c:1535
 #, c-format
 msgid "%s: LOCAL directive: Register $%ld is not a local register.  First global register is $%ld."
 msgstr ""
 "%s: YEREL (LOCAL) yönergesi: $%ld yazmacı yerel yazmaç değil.\n"
 "    İlk evrensel yazmaç: $%ld."
 
-#: elf64-mmix.c:1965
+#: elf64-mmix.c:1994
 #, c-format
 msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
 msgstr ""
 "%s: Hata: `%s' birden fazla defa tanımlanmış; %s'nin başlangıcı daha önce\n"
 "    bağlanan bir dosyada.\n"
 
-#: elf64-mmix.c:2024
+#: elf64-mmix.c:2053
 msgid "Register section has contents\n"
 msgstr "Yazmaç bölümünde içerik yok\n"
 
-#: elf64-mmix.c:2186
+#: elf64-mmix.c:2216
 #, c-format
 msgid ""
 "Internal inconsistency: remaining %u != max %u.\n"
@@ -1432,596 +1627,639 @@ msgstr ""
 "İç uyumsuzluk: kalan %u != maksimum %u. \n"
 "  Lütfen bu hatayı bildirin."
 
-#: elf64-ppc.c:1669 libbfd.c:1435
+#: elf64-ppc.c:2388 libbfd.c:831
 #, c-format
 msgid "%s: compiled for a big endian system and target is little endian"
 msgstr "%s: büyük sonlu sistem için derlenmiş ve hedef küçük sonlu"
 
-#: elf64-ppc.c:1671 libbfd.c:1437
+#: elf64-ppc.c:2391 libbfd.c:833
 #, c-format
 msgid "%s: compiled for a little endian system and target is big endian"
 msgstr "%s: küçük sonlu sistem için derlenmiş ve hedef büyük sonlu"
 
-#: elf64-ppc.c:3610
+#: elf64-ppc.c:4857
 #, c-format
 msgid "%s: unexpected reloc type %u in .opd section"
 msgstr "%s: opd bölümünde beklenmeyen yerdeğişim türü %u"
 
-#: elf64-ppc.c:3630
+#: elf64-ppc.c:4877
 #, c-format
 msgid "%s: .opd is not a regular array of opd entries"
 msgstr "%s: opd, opd girdilerinin düzenli dizisi değil"
 
-#: elf64-ppc.c:3672
+#: elf64-ppc.c:4897
 #, c-format
 msgid "%s: undefined sym `%s' in .opd section"
 msgstr "%s: opd bölümünde tanımlanmamış `%s' sembolü"
 
-#: elf64-ppc.c:4397
+#: elf64-ppc.c:6136
 #, c-format
 msgid "can't find branch stub `%s'"
 msgstr "`%s' dal koçanı bulunamadı"
 
-#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#: elf64-ppc.c:6175 elf64-ppc.c:6250
 #, c-format
 msgid "linkage table error against `%s'"
 msgstr "`%s'ye bağlama tablosu hatası"
 
-#: elf64-ppc.c:4573
+#: elf64-ppc.c:6340
 #, c-format
 msgid "can't build branch stub `%s'"
 msgstr "`%s' dal koçanı derlenemedi"
 
-#: elf64-ppc.c:5179
+#: elf64-ppc.c:7047
+msgid ".glink and .plt too far apart"
+msgstr " glink ve plt birbirine fazla uzak"
+
+#: elf64-ppc.c:7135
 msgid "stubs don't match calculated size"
 msgstr "koçanlar hesaplanan boyla eşleşmiyor"
 
-#: elf64-ppc.c:5828
+#: elf64-ppc.c:7147
 #, c-format
-msgid "%s: Relocation %s is not supported for symbol %s."
-msgstr "%s: %s yerdeğişimi %s sembolü için henüz desteklenmiyor."
+msgid ""
+"linker stubs in %u groups\n"
+"  branch       %lu\n"
+"  toc adjust   %lu\n"
+"  long branch  %lu\n"
+"  long toc adj %lu\n"
+"  plt call     %lu"
+msgstr ""
+"%u grupta bağlayıcı koçanları\n"
+"  dal          %lu\n"
+"  toc ayarlama %lu\n"
+"  uzun dal     %lu\n"
+"  uzun toc ayar%lu\n"
+"  plt çağrısı  %lu"
+
+#: elf64-ppc.c:7723
+#, c-format
+msgid "%s(%s+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc"
+msgstr "%s(%s+0x%lx): otomatik çoklu TOC sizin crt dosyalarınızı kullanarak desteklenmez; -mminimal-toc kullanarak yeniden derleyin veya gcc'de sürüm yükseltmesi yapın"
+
+#: elf64-ppc.c:7731
+#, c-format
+msgid "%s(%s+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern"
+msgstr "%s(%s+0x%lx): `%s'e kardeş çağrı iyileştirmesi otomatik çoklu TOCa izin vermez; -mminimal-toc veya -fno-optimize-sibling-calls ile yeniden derleyin, veya make `%s' extern"
+
+#: elf64-ppc.c:8329
+#, c-format
+msgid "%s: relocation %s is not supported for symbol %s."
+msgstr "%s: %s yerdeğişimi %s sembolü için desteklenmiyor."
 
-#: elf64-ppc.c:5872
+#: elf64-ppc.c:8408
 #, c-format
-msgid "%s: error: relocation %s not a multiple of 4"
-msgstr "%s: hata: %s yerdeğişimi 4'ün katı değil"
+msgid "%s: error: relocation %s not a multiple of %d"
+msgstr "%s: hata: %s yerdeğişimi %d'nin katı değil"
 
-#: elf64-sparc.c:1280
+#: elf64-sparc.c:1370
 #, c-format
 msgid "%s: check_relocs: unhandled reloc type %d"
 msgstr "%s: check_relocs: desteklenmeyen yerdeğişim türü %d"
 
-#: elf64-sparc.c:1317
+#: elf64-sparc.c:1407
 #, c-format
 msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
 msgstr "%s: Yalnız %%g[2367] yazmaçları STT_REGISTER ile bildirilebilir"
 
-#: elf64-sparc.c:1337
+#: elf64-sparc.c:1427
 #, c-format
 msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
 msgstr "%%g%1$d yazmacı uyumsuz kullanılmış: %3$s içinde %2$s, daha önce %5$s içinde %4$s idi"
 
-#: elf64-sparc.c:1360
+#: elf64-sparc.c:1450
 #, c-format
 msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
 msgstr "`%1$s' sembolünün farklı türleri var: %2$s içinde REGISTER (yazmaç), daha önce %4$s içinde %3$s"
 
-#: elf64-sparc.c:1406
+#: elf64-sparc.c:1496
 #, c-format
 msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
 msgstr ""
 "`%1$s' sembolünün farklı türleri var: %3$s içinde %2$s, \n"
 "  daha önce %4$s içinde REGISTER (yazmaç)"
 
-#: elf64-sparc.c:2970
+#: elf64-sparc.c:3053
 #, c-format
 msgid "%s: linking UltraSPARC specific with HAL specific code"
 msgstr "%s: UltraSPARC'a özel kod HAL'e özel kod ile bağlanıyor"
 
-#: elfcode.h:1198
+#: elf64-x86-64.c:739
+#, c-format
+msgid "%s: %s' accessed both as normal and thread local symbol"
+msgstr "%s: `%s'a hem normal, hem de iplikçik yerel sembolü olarak erişildi"
+
+#: elfcode.h:1113
 #, c-format
 msgid "%s: version count (%ld) does not match symbol count (%ld)"
 msgstr "%s: sürüm sayısı (%ld) sembol sayısı (%ld) ile eşleşmiyor"
 
-#: elflink.c:440
+#: elfcode.h:1342
+#, c-format
+msgid "%s(%s): relocation %d has invalid symbol index %ld"
+msgstr "%s(%s): %d yerdeğişimi geçersiz sembol indeksi %ld'ye sahip"
+
+#: elflink.c:1456
+#, c-format
+msgid "%s: warning: unexpected redefinition of indirect versioned symbol `%s'"
+msgstr "%s: uyarı: endirekt sürümlü sembol `%s' için beklenmeyen yeniden tanımlama"
+
+#: elflink.c:1807
 #, c-format
-msgid "%s: Section %s is too large to add hole of %ld bytes"
-msgstr "%s: %s bölümü içine %ld baytlık bir delik koymak için fazla büyük"
+msgid "%s: undefined versioned symbol name %s"
+msgstr "%s: sürümlü sembol ismi %s tanımlı değil"
+
+#: elflink.c:2142
+#, c-format
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr "%1$s: %3$s bölümünde %2$s içinde yerdeğişim boy uyuşmazlığı"
 
-#: elflink.h:1090
+#: elflink.c:2434
 #, c-format
-msgid "%s: warning: unexpected redefinition of `%s'"
-msgstr "%s: uyarı: `%s' için beklenmeyen yeniden tanımlama"
+msgid "warning: type and size of dynamic symbol `%s' are not defined"
+msgstr "uyarı: `%s' dinamik sembolünün türü ve boyu tanımlı değil"
 
-#: elflink.h:1727
+#: elflink.h:1022
 #, c-format
 msgid "%s: %s: invalid version %u (max %d)"
 msgstr "%s: %s: geçersiz sürüm %u (maksimum %d)"
 
-#: elflink.h:1768
+#: elflink.h:1063
 #, c-format
 msgid "%s: %s: invalid needed version %d"
 msgstr "%s: %s: geçersiz gerekli sürüm %d"
 
-#: elflink.h:1890
+#: elflink.h:1238
 #, c-format
-msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
-msgstr "Uyarı: `%s' sembolünün boyu %lu'dan %lu'ya %s içerisinde değişti"
+msgid "Warning: alignment %u of symbol `%s' in %s is smaller than %u in %s"
+msgstr "Uyarı: %3$s içinde `%2$s' sembolünün %1$u hizalaması %5$s içinde %4$u'dan daha küçük"
 
-#: elflink.h:3174
+#: elflink.h:1252
 #, c-format
-msgid "%s: .preinit_array section is not allowed in DSO"
-msgstr "%s: DSO içinde preinit_array'e izin verilmiyor"
+msgid "Warning: size of symbol `%s' changed from %lu in %s to %lu in %s"
+msgstr "Uyarı: `%1$s' sembolünün boyu %3$s içinde %2$lu'dan %5$s içinde %4$lu'ya değişti"
 
-#: elflink.h:4030
+#: elflink.h:2160
 #, c-format
-msgid "warning: type and size of dynamic symbol `%s' are not defined"
-msgstr "uyarı: `%s' dinamik sembolünün türü ve boyu tanımlı değil"
+msgid "%s: undefined version: %s"
+msgstr "%s: tanımsız sürüm: %s"
 
-#: elflink.h:4345
+#: elflink.h:2226
 #, c-format
-msgid "%s: undefined versioned symbol name %s"
-msgstr "%s: sürümlü sembol ismi %s tanımlı değil"
-
-#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
-msgid "Error: out of memory"
-msgstr "Hata: bellek tükendi"
+msgid "%s: .preinit_array section is not allowed in DSO"
+msgstr "%s: DSO içinde preinit_array'e izin verilmiyor"
 
-#: elflink.h:4781
+#: elflink.h:3078
 msgid "Not enough memory to sort relocations"
 msgstr "Yerdeğişimleri sıralamak için gerekli bellek yok"
 
-#: elflink.h:5682 elflink.h:5725
+#: elflink.h:3958 elflink.h:4001
 #, c-format
 msgid "%s: could not find output section %s"
 msgstr "%s: çıktı bölümü %s bulunamadı"
 
-#: elflink.h:5688
+#: elflink.h:3964
 #, c-format
 msgid "warning: %s section has zero size"
 msgstr "uyarı: %s bölümü sıfır boyunda"
 
-#: elflink.h:6275
+#: elflink.h:4483
+#, c-format
+msgid "%s: %s symbol `%s' in %s is referenced by DSO"
+msgstr "%1$s: %4$s içinde %2$s sembolü `%3$s' DSO tarafından referans ediliyor"
+
+#: elflink.h:4564
 #, c-format
 msgid "%s: could not find output section %s for input section %s"
 msgstr "%1$s: girdi bölümü %3$s için çıktı bölümü %2$s bulunamadı"
 
-#: elflink.h:6486
+#: elflink.h:4666
 #, c-format
-msgid "%s: relocation size mismatch in %s section %s"
-msgstr "%1$s: %3$s bölümünde %2$s içinde yerdeğişim boy uyuşmazlığı"
+msgid "%s: %s symbol `%s' isn't defined"
+msgstr "%s: %s sembol `%s' tanımlı değil"
 
-#: elflink.h:6849
-msgid "warning: relocation against removed section; zeroing"
-msgstr "uyarı: silinmiş bölüme yer değişim; sıfırlandı"
+#: elflink.h:5053 elflink.h:5095
+msgid "%T: discarded in section `%s' from %s\n"
+msgstr "%1$T: %3$s `%2$s' bölümünde atıldı\n"
 
-#: elflink.h:6879
-msgid "warning: relocation against removed section"
-msgstr "%1$s: silinmiş bölüme yerdeğişim"
-
-#: elflink.h:6892
-#, c-format
-msgid "local symbols in discarded section %s"
-msgstr "atılmış %s bölümünde yerel semboller"
-
-#: elfxx-mips.c:734
+#: elfxx-mips.c:887
 msgid "static procedure (no name)"
 msgstr "statik altyordam (isimsiz)"
 
-#: elfxx-mips.c:1601
+#: elfxx-mips.c:1897
 msgid "not enough GOT space for local GOT entries"
 msgstr "yerel GOT girdileri için yeterli GOT yeri yok"
 
-#: elfxx-mips.c:2750
+#: elfxx-mips.c:3691
 #, c-format
 msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
 msgstr "%s: %s+0x%lx: jal olmayan koçan yordamına sıçrama"
 
-#: elfxx-mips.c:4270
+#: elfxx-mips.c:5192
 #, c-format
 msgid "%s: Malformed reloc detected for section %s"
 msgstr "%s: %s bölümü için geçersiz yer değişim bulundu"
 
-#: elfxx-mips.c:4348
+#: elfxx-mips.c:5266
 #, c-format
 msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
 msgstr "%s: 0x%lx'deki CALL16 yerdeğişimi evrensel sembole göre değil"
 
-#: elfxx-mips.c:7301
+#: elfxx-mips.c:8692
 #, c-format
 msgid "%s: illegal section name `%s'"
 msgstr "%s: geçersiz bölüm adı `%s'"
 
-#: elfxx-mips.c:7615
+#: elfxx-mips.c:9025
 #, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s: PIC dosyaları PIC olmayan dosyalarla bağlanıyor"
+msgid "%s: endianness incompatible with that of the selected emulation"
+msgstr "%s: seçilen öykünüm ile sonluluk uyumlu değil"
 
-#: elfxx-mips.c:7625
+#: elfxx-mips.c:9037
 #, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
-msgstr "%s: abicalls dosyaları abicalls olmayan dosyalarla bağlanıyor"
+msgid "%s: ABI is incompatible with that of the selected emulation"
+msgstr "%s: ABI, seçilen öykünümle uyumlu değil"
 
-#: elfxx-mips.c:7654
+#: elfxx-mips.c:9104
 #, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%1$s: Önceki modüllerle (-mips%3$d) ile ISA uyumsuzluğu (-mips%2$d)"
+msgid "%s: warning: linking PIC files with non-PIC files"
+msgstr "%s: uyarı: PIC dosyaları PIC olmayan dosyalarla bağlanıyor"
 
-#: elfxx-mips.c:7676
+#: elfxx-mips.c:9121
 #, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%1$s: Önceki modüllerle (%3$d) ile ISA uyumsuzluğu (%2$d)"
+msgid "%s: linking 32-bit code with 64-bit code"
+msgstr "%s: 64 bitlik dosyalar 32 bitlik dosyalarla bağlanıyor"
 
-#: elfxx-mips.c:7699
+#: elfxx-mips.c:9149
+#, c-format
+msgid "%s: linking %s module with previous %s modules"
+msgstr "%s: %s modülü önceki %s modülle bağlanıyor"
+
+#: elfxx-mips.c:9172
 #, c-format
 msgid "%s: ABI mismatch: linking %s module with previous %s modules"
 msgstr "%s: ABI uyumsuzluğu: %s modülü önceki %s modülle bağlanıyor"
 
-#: elfxx-mips.c:7759
+#: elfxx-mips.c:9241
 msgid " [abi=O32]"
 msgstr " [abi=O32]"
 
-#: elfxx-mips.c:7761
+#: elfxx-mips.c:9243
 msgid " [abi=O64]"
 msgstr " [abi=O64]"
 
-#: elfxx-mips.c:7763
+#: elfxx-mips.c:9245
 msgid " [abi=EABI32]"
 msgstr " [abi=EABI32]"
 
-#: elfxx-mips.c:7765
+#: elfxx-mips.c:9247
 msgid " [abi=EABI64]"
 msgstr " [abi=EABI64]"
 
-#: elfxx-mips.c:7767
+#: elfxx-mips.c:9249
 msgid " [abi unknown]"
 msgstr " [abi bilinmiyor]"
 
-#: elfxx-mips.c:7769
+#: elfxx-mips.c:9251
 msgid " [abi=N32]"
 msgstr " [abi=N32]"
 
-#: elfxx-mips.c:7771
+#: elfxx-mips.c:9253
 msgid " [abi=64]"
 msgstr " [abi=64]"
 
-#: elfxx-mips.c:7773
+#: elfxx-mips.c:9255
 msgid " [no abi set]"
 msgstr " [abi atanmamış]"
 
-#: elfxx-mips.c:7776
+#: elfxx-mips.c:9258
 msgid " [mips1]"
 msgstr " [mips1]"
 
-#: elfxx-mips.c:7778
+#: elfxx-mips.c:9260
 msgid " [mips2]"
 msgstr " [mips2]"
 
-#: elfxx-mips.c:7780
+#: elfxx-mips.c:9262
 msgid " [mips3]"
 msgstr " [mips3]"
 
-#: elfxx-mips.c:7782
+#: elfxx-mips.c:9264
 msgid " [mips4]"
 msgstr " [mips4]"
 
-#: elfxx-mips.c:7784
+#: elfxx-mips.c:9266
 msgid " [mips5]"
 msgstr " [mips5]"
 
-#: elfxx-mips.c:7786
+#: elfxx-mips.c:9268
 msgid " [mips32]"
 msgstr " [mips32]"
 
-#: elfxx-mips.c:7788
+#: elfxx-mips.c:9270
 msgid " [mips64]"
 msgstr " [mips64]"
 
-#: elfxx-mips.c:7790
+#: elfxx-mips.c:9272
+msgid " [mips32r2]"
+msgstr " [mips32r2]"
+
+#: elfxx-mips.c:9274
 msgid " [unknown ISA]"
 msgstr " [bilinmeyen ISA]"
 
-#: elfxx-mips.c:7793
+#: elfxx-mips.c:9277
 msgid " [mdmx]"
 msgstr " [mdmx]"
 
-#: elfxx-mips.c:7796
+#: elfxx-mips.c:9280
 msgid " [mips16]"
 msgstr " [mips16]"
 
-#: elfxx-mips.c:7799
+#: elfxx-mips.c:9283
 msgid " [32bitmode]"
 msgstr " [32bitkipi]"
 
-#: elfxx-mips.c:7801
+#: elfxx-mips.c:9285
 msgid " [not 32bitmode]"
 msgstr " [32bitkipi değil]"
 
-#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
+#: i386linux.c:457 m68klinux.c:461 sparclinux.c:458
 #, c-format
 msgid "Output file requires shared library `%s'\n"
 msgstr "Çıktı dosyası için paylaşımlı kitaplık `%s' gerekli\n"
 
-#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
+#: i386linux.c:465 m68klinux.c:469 sparclinux.c:466
 #, c-format
 msgid "Output file requires shared library `%s.so.%s'\n"
 msgstr "Çıktı dosyası için paylaşımlı kitaplık `%s.so.%s' gerekli\n"
 
-#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
-#: sparclinux.c:657 sparclinux.c:707
+#: i386linux.c:654 i386linux.c:704 m68klinux.c:661 m68klinux.c:709
+#: sparclinux.c:656 sparclinux.c:706
 #, c-format
 msgid "Symbol %s not defined for fixups\n"
 msgstr "%s sembolü düzeltmeler için tanımlı değil\n"
 
-#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
+#: i386linux.c:728 m68klinux.c:733 sparclinux.c:730
 msgid "Warning: fixup count mismatch\n"
 msgstr "Uyarı: düzeltme sayı uyumsuzluğu\n"
 
-#: ieee.c:235
+#: ieee.c:293
 #, c-format
 msgid "%s: string too long (%d chars, max 65535)"
 msgstr "%s: dizge fazla uzun (%d karakter, en fazla 65535)"
 
-#: ieee.c:365
+#: ieee.c:428
 #, c-format
 msgid "%s: unrecognized symbol `%s' flags 0x%x"
 msgstr "%s: bilinmeyen `%s' sembol bayrakları 0x%x"
 
-#: ieee.c:877
+#: ieee.c:938
 #, c-format
 msgid "%s: unimplemented ATI record %u for symbol %u"
 msgstr "%1$s: %3$u sembolü için desteklenmeyen ATI kaydı %2$u"
 
-#: ieee.c:902
+#: ieee.c:963
 #, c-format
 msgid "%s: unexpected ATN type %d in external part"
 msgstr "%s: dış parçada beklenmeyen ATN türü %d"
 
-#: ieee.c:924
+#: ieee.c:985
 #, c-format
 msgid "%s: unexpected type after ATN"
 msgstr "%s: ATN'den sonra beklenmeyen tür"
 
-#: ihex.c:258
+#: ihex.c:264
 #, c-format
 msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
 msgstr "%s:%d: Intel Onaltılık dosyasında beklenmeyen `%s' karakteri\n"
 
-#: ihex.c:366
+#: ihex.c:372
 #, c-format
 msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
 msgstr ""
 "%s:%u: Intel Onaltılık dosyasında hatalı sağlama toplamı\n"
 "       (%u beklendi, %u bulundu)"
 
-#: ihex.c:420
+#: ihex.c:426
 #, c-format
 msgid "%s:%u: bad extended address record length in Intel Hex file"
 msgstr "%s:%u: Intel Onaltılık dosyasında hatalı uzun adres kaydı uzunluğu"
 
-#: ihex.c:437
+#: ihex.c:443
 #, c-format
 msgid "%s:%u: bad extended start address length in Intel Hex file"
 msgstr "%s:%u: Intel Onaltılık dosyasında hatalı uzun başlangıç adresi uzunluğu"
 
-#: ihex.c:454
+#: ihex.c:460
 #, c-format
 msgid "%s:%u: bad extended linear address record length in Intel Hex file"
 msgstr "%s:%u: Intel Onaltılık dosyasında hatalı uzun lineer adres kaydı uzunluğu"
 
-#: ihex.c:471
+#: ihex.c:477
 #, c-format
 msgid "%s:%u: bad extended linear start address length in Intel Hex file"
 msgstr "%s:%u: Intel Onaltılık dosyasında hatalı uzun lineer başlangıç adres uzunluğu"
 
-#: ihex.c:488
+#: ihex.c:494
 #, c-format
 msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
 msgstr "%s:%u: Intel Onaltılık dosyasında bilinmeyen onaltılık türü %u\n"
 
-#: ihex.c:607
+#: ihex.c:619
 #, c-format
 msgid "%s: internal error in ihex_read_section"
 msgstr "%s: ihex_read_section'da iç hata"
 
-#: ihex.c:642
+#: ihex.c:654
 #, c-format
 msgid "%s: bad section length in ihex_read_section"
 msgstr "%s: ihex_read_section'da hatalı bölüm uzunluğu"
 
-#: ihex.c:860
+#: ihex.c:872
 #, c-format
 msgid "%s: address 0x%s out of range for Intel Hex file"
 msgstr "%s: Intex Onaltılık dosyası için 0x%s adresi kapsamdışı"
 
-#: libbfd.c:492
-#, c-format
-msgid "not mapping: data=%lx mapped=%d\n"
-msgstr "eşlenmeyen: veri=%lx eşleşen=%d\n"
-
-#: libbfd.c:495
-msgid "not mapping: env var not set\n"
-msgstr "eşlenmeyen: çevre değişkeni atanmamış\n"
-
-#: libbfd.c:1466
+#: libbfd.c:861
 #, c-format
 msgid "Deprecated %s called at %s line %d in %s\n"
 msgstr "Geçersizleşmiş %s, %s'da, %d satırı, %s içerisinde çağrıldı\n"
 
-#: libbfd.c:1469
+#: libbfd.c:864
 #, c-format
 msgid "Deprecated %s called\n"
 msgstr "Geçerliliği kalkmış %s çağrıldı\n"
 
-#: linker.c:1873
+#: linker.c:1829
 #, c-format
 msgid "%s: indirect symbol `%s' to `%s' is a loop"
 msgstr "%1$s: `%3$s'den endirekt sembol `%2$s'e çevrim"
 
-#: linker.c:2776
+#: linker.c:2697
 #, c-format
-msgid "Attempt to do relocateable link with %s input and %s output"
+msgid "Attempt to do relocatable link with %s input and %s output"
 msgstr "%s girdi ve %s çıktısı ile yerdeğişimli bağ deneniyor"
 
-#: merge.c:892
+#: merge.c:896
 #, c-format
 msgid "%s: access beyond end of merged section (%ld + %ld)"
 msgstr "%s: karıştırılmış bölümün sonundan ileride erişim (%ld + %ld)"
 
-#: mmo.c:460
+#: mmo.c:503
 #, c-format
 msgid "%s: No core to allocate section name %s\n"
 msgstr "%s: %s bölüm adını ayıracak `core' yok\n"
 
-#: mmo.c:536
+#: mmo.c:579
 #, c-format
 msgid "%s: No core to allocate a symbol %d bytes long\n"
 msgstr "%s: %d bayt uzunluğunda bir sembole yer ayırmak için `core' yok\n"
 
-#: mmo.c:1245
+#: mmo.c:1287
 #, c-format
 msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
 msgstr "%s: geçersiz mmo dosyası: $255 için başlangıç değeri `Main' değil\n"
 
-#: mmo.c:1391
+#: mmo.c:1433
 #, c-format
 msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
 msgstr ""
 "%1$s: `%4$s' ile başlayan sembol adından sonra desteklenmeyen\n"
 "    geniş karakter dizisi 0x%2$02X 0x%3$02X\n"
 
-#: mmo.c:1633
+#: mmo.c:1674
 #, c-format
 msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
 msgstr "%s: geçersiz mmo dosyası: desteklenmeyen lopkod `%d'\n"
 
-#: mmo.c:1643
+#: mmo.c:1684
 #, c-format
 msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
 msgstr "%s: geçersiz mmo dosyası: YZ = 1 beklendi, lop_quote için YZ = %d bulundu\n"
 
-#: mmo.c:1679
+#: mmo.c:1720
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
 msgstr ""
 "%s: geçersiz mmo dosyası: z = 1 veya z = 2 beklendi, \n"
 "    lop_loc için z = %d bulundu\n"
 
-#: mmo.c:1725
+#: mmo.c:1766
 #, c-format
 msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
 msgstr "%s: geçersiz mmo dosyası: z = 1 veya z = 2 beklendi;     lop_fixo için z = %d bulundu\n"
 
-#: mmo.c:1764
+#: mmo.c:1805
 #, c-format
 msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
 msgstr "%s: geçersiz mmo dosyası: y = 0 beklendi; lop_fixrx için y = %d bulundu\n"
 
-#: mmo.c:1773
+#: mmo.c:1814
 #, c-format
 msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
 msgstr ""
 "%s: geçersiz mmo dosyası: z = 16 veya z = 24 beklendi;\n"
 "    lop_fixrx için z = %d bulundu\n"
 
-#: mmo.c:1796
+#: mmo.c:1837
 #, c-format
 msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
 msgstr ""
 "%s: geçersiz mmo dosyası: işlenen word'un ilk baytı 0 veya 1 olmalı; \n"
 "    lop_fixrx için %d bulundu\n"
 
-#: mmo.c:1819
+#: mmo.c:1860
 #, c-format
 msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
 msgstr "%s: %d sayılı dosya için dosya adı ayrılamadı, %d bayt\n"
 
-#: mmo.c:1839
+#: mmo.c:1880
 #, c-format
 msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
 msgstr "%s: geçersiz mmo dosyası: %d sayılı dosya, `%s', zaten `%s' olarak girilmiş\n"
 
-#: mmo.c:1852
+#: mmo.c:1893
 #, c-format
 msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
 msgstr ""
 "%s: geçersiz mmo dosyası: %d sayısı için dosya adı kullanımdan\n"
 "    önce belirtilmemiş\n"
 
-#: mmo.c:1958
+#: mmo.c:1999
 #, c-format
 msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
 msgstr ""
 "%s: geçersiz mmo dosyası: lop_stab'in y ve z alanları sıfır değil;\n"
 "    y: %d, z: %d\n"
 
-#: mmo.c:1994
+#: mmo.c:2035
 #, c-format
 msgid "%s: invalid mmo file: lop_end not last item in file\n"
 msgstr "%s: geçersiz mmo dosyası: lop_end dosyadaki son girdi değil\n"
 
-#: mmo.c:2007
+#: mmo.c:2048
 #, c-format
 msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
 msgstr ""
 "%s: geçersiz mmo dosyası: lop_end'in YZ'si (%ld); bir önceki \n"
 "    lop_stab'in (%ld) dörtlü sayısına eşit değil\n"
 
-#: mmo.c:2670
+#: mmo.c:2698
 #, c-format
 msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
 msgstr "%s: geçersiz sembol tablosu: tekrarlanmış sembol `%s'\n"
 
-#: mmo.c:2921
+#: mmo.c:2949
 #, c-format
 msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
 msgstr ""
 "%1$s: Hatalı sembol tanımı: `Main' başlangıç adresi %3$s yerine \n"
 "    %2$s olarak tanımlanmış\n"
 
-#: mmo.c:3011
+#: mmo.c:3039
 #, c-format
 msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d.  Only `Main' will be emitted.\n"
 msgstr ""
 "%s: uyarı: sembol tablosu mmo için fazla büyük, 65535 32-bit word'den\n"
 "    fazla: %d. Yalnız `Main' üretilecek. \n"
 
-#: mmo.c:3056
+#: mmo.c:3084
 #, c-format
 msgid "%s: internal error, symbol table changed size from %d to %d words\n"
 msgstr "%s: iç hata, sembol tablosu büyüklüğü %d'den %d word'e değişti\n"
 
-#: mmo.c:3111
+#: mmo.c:3139
 #, c-format
 msgid "%s: internal error, internal register section %s had contents\n"
 msgstr "%s: iç hata, %s iç yazmaç bölümü içerik taşıyor\n"
 
-#: mmo.c:3163
+#: mmo.c:3191
 #, c-format
 msgid "%s: no initialized registers; section length 0\n"
 msgstr "%s: ilklenen yazmaç yok; bölüm uzunluğu 0\n"
 
-#: mmo.c:3169
+#: mmo.c:3197
 #, c-format
 msgid "%s: too many initialized registers; section length %ld\n"
 msgstr "%s: çok fazla ilklenmiş yazmaç; bölüm uzunluğu %ld\n"
 
-#: mmo.c:3174
+#: mmo.c:3202
 #, c-format
 msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
 msgstr "%s: %ld uzunluğunda ilklenmiş yazmaçlar için hatalı başlangıç adresi: 0x%lx%08lx\n"
 
-#: oasys.c:1029
+#: oasys.c:1052
 #, c-format
 msgid "%s: can not represent section `%s' in oasys"
 msgstr "%s: oasys'de `%s' bölümü gösterilemiyor"
 
-#: osf-core.c:132
+#: osf-core.c:137
 #, c-format
 msgid "Unhandled OSF/1 core file section type %d\n"
 msgstr "Desteklenmeyen OSF/1 core dosyası bölüm türü %d\n"
 
-#: pe-mips.c:658
+#: pe-mips.c:659
 #, c-format
 msgid "%s: `ld -r' not supported with PE MIPS objects\n"
 msgstr "%s: `ld -r' PE MIPS nesneleri ile birlikte desteklenmiyor\n"
@@ -2031,53 +2269,53 @@ msgstr "%s: `ld -r' PE MIPS nesneleri ile birlikte desteklenmiyor\n"
 #. mem = pointer to memory we're fixing up
 #. val = VMA of what we need to refer to
 #.
-#: pe-mips.c:794
+#: pe-mips.c:795
 #, c-format
 msgid "%s: unimplemented %s\n"
 msgstr "%s: tamamlanmamış %s\n"
 
-#: pe-mips.c:820
+#: pe-mips.c:821
 #, c-format
 msgid "%s: jump too far away\n"
 msgstr "%s: sıçrama fazla uzak\n"
 
-#: pe-mips.c:847
+#: pe-mips.c:848
 #, c-format
 msgid "%s: bad pair/reflo after refhi\n"
 msgstr "%s: refhi'den sonra hatalı çift/reflo\n"
 
 #. XXX code yet to be written.
-#: peicode.h:785
+#: peicode.h:787
 #, c-format
 msgid "%s: Unhandled import type; %x"
 msgstr "%s: Desteklenmeyen ithal türü; %x"
 
-#: peicode.h:790
+#: peicode.h:792
 #, c-format
 msgid "%s: Unrecognised import type; %x"
 msgstr "%s: Tanınmayan ithal türü; %x"
 
-#: peicode.h:804
+#: peicode.h:806
 #, c-format
 msgid "%s: Unrecognised import name type; %x"
 msgstr "%s: Tanınmayan ithal isim türü; %x"
 
-#: peicode.h:1162
+#: peicode.h:1164
 #, c-format
 msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
 msgstr "%s: İthal Kitaplık Biçem (ILF) arşivinde tanınmayan makina türü (0x%x) "
 
-#: peicode.h:1174
+#: peicode.h:1176
 #, c-format
 msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
 msgstr "%s: İthal Kitaplık Biçem (ILF) arşivinde bilinen fakat desteklenmeyen makina türü (0x%x)"
 
-#: peicode.h:1191
+#: peicode.h:1193
 #, c-format
 msgid "%s: size field is zero in Import Library Format header"
 msgstr "%s: İthal Kitaplık Biçem (ILF) başlığında boy alanı sıfır"
 
-#: peicode.h:1219
+#: peicode.h:1224
 #, c-format
 msgid "%s: string not null terminated in ILF object file."
 msgstr "%s: ILF nesne dosyasında dizge boş değerle sonlanmamış."
@@ -2134,11 +2372,11 @@ msgstr "Bölüm[%d] sektörü = 0x%.8lx (%ld)\n"
 msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
 msgstr "Bölüm[%d] uzunluğu = 0x%.8lx (%ld)\n"
 
-#: som.c:5398
+#: som.c:5422
 msgid "som_sizeof_headers unimplemented"
 msgstr "som_sizeof_headers tamamlanmamış"
 
-#: srec.c:301
+#: srec.c:302
 #, c-format
 msgid "%s:%d: Unexpected character `%s' in S-record file\n"
 msgstr "%s:%d: S-kayıt dosyasında beklenmeyen `%s' karakteri\n"
@@ -2148,7 +2386,7 @@ msgstr "%s:%d: S-kayıt dosyasında beklenmeyen `%s' karakteri\n"
 msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
 msgstr "%s(%s+0x%lx): Stabs girdisinde geçersiz dizge indeksi."
 
-#: syms.c:1044
+#: syms.c:1019
 msgid "Unsupported .stab relocation"
 msgstr "Desteklenmeyen .stab yerdeğişimi"
 
@@ -2167,33 +2405,33 @@ msgstr "bfd_set_section_flags (%s, %x) başarısız"
 msgid "Size mismatch section %s=%lx, %s=%lx"
 msgstr "Boy uyumsuzluğu bölümü %s=%lx, %s=%lx"
 
-#: vms-gsd.c:702
+#: vms-gsd.c:704
 #, c-format
 msgid "unknown gsd/egsd subtype %d"
 msgstr "bilinmeyen gsd/egsd alt türü %d"
 
-#: vms-hdr.c:406
+#: vms-hdr.c:408
 msgid "Object module NOT error-free !\n"
 msgstr "Nesne modülü hatasız DEĞİL !\n"
 
-#: vms-misc.c:543
+#: vms-misc.c:541
 #, c-format
 msgid "Stack overflow (%d) in _bfd_vms_push"
 msgstr "_bfd_vms_push'da yığıt taşması (%d)"
 
-#: vms-misc.c:561
+#: vms-misc.c:559
 msgid "Stack underflow in _bfd_vms_pop"
 msgstr "_bfd_vms_pop'da yığıt alt taşması"
 
-#: vms-misc.c:919
+#: vms-misc.c:918
 msgid "_bfd_vms_output_counted called with zero bytes"
 msgstr "_bfd_vms_output_counted sıfır bayt ile çağrıldı"
 
-#: vms-misc.c:924
+#: vms-misc.c:923
 msgid "_bfd_vms_output_counted called with too many bytes"
 msgstr "_bfd_vms_output_counted fazla bayt ile çağrıldı"
 
-#: vms-misc.c:1055
+#: vms-misc.c:1054
 #, c-format
 msgid "Symbol %s replaced by %s\n"
 msgstr "%s sembolü %s ile değiştirildi\n"
@@ -2203,26 +2441,26 @@ msgstr "%s sembolü %s ile değiştirildi\n"
 msgid "failed to enter %s"
 msgstr "%s'e giriş başarısız"
 
-#: vms-tir.c:81
+#: vms-tir.c:102
 msgid "No Mem !"
 msgstr "Hafıza Yok !"
 
-#: vms-tir.c:362
+#: vms-tir.c:383
 #, c-format
 msgid "bad section index in %s"
 msgstr "%s içinde hatalı bölüm indeksi"
 
-#: vms-tir.c:375
+#: vms-tir.c:396
 #, c-format
 msgid "unsupported STA cmd %s"
 msgstr "Desteklenmeyen STA komutu %s"
 
-#: vms-tir.c:380 vms-tir.c:1240
+#: vms-tir.c:401 vms-tir.c:1261
 #, c-format
 msgid "reserved STA cmd %d"
 msgstr "Ayrılmış STA komutu %d"
 
-#: vms-tir.c:491 vms-tir.c:514
+#: vms-tir.c:512 vms-tir.c:535
 #, c-format
 msgid "%s: no symbol \"%s\""
 msgstr "%s: \"%s\" sembolü yok"
@@ -2231,39 +2469,39 @@ msgstr "%s: \"%s\" sembolü yok"
 #. rotate
 #. Redefine symbol to current location.
 #. Define a literal.
-#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
-#: vms-tir.c:838 vms-tir.c:1563
+#: vms-tir.c:602 vms-tir.c:714 vms-tir.c:824 vms-tir.c:842 vms-tir.c:850
+#: vms-tir.c:859 vms-tir.c:1584
 #, c-format
 msgid "%s: not supported"
 msgstr "%s: desteklenmiyor"
 
-#: vms-tir.c:586 vms-tir.c:1418
+#: vms-tir.c:607 vms-tir.c:1439
 #, c-format
 msgid "%s: not implemented"
 msgstr "%s: tamamlanmamış"
 
-#: vms-tir.c:590 vms-tir.c:1422
+#: vms-tir.c:611 vms-tir.c:1443
 #, c-format
 msgid "reserved STO cmd %d"
 msgstr "Ayrılmış STO komutu %d"
 
-#: vms-tir.c:708 vms-tir.c:1568
+#: vms-tir.c:729 vms-tir.c:1589
 #, c-format
 msgid "reserved OPR cmd %d"
 msgstr "Ayrılmış OPR komutu %d"
 
-#: vms-tir.c:776 vms-tir.c:1632
+#: vms-tir.c:797 vms-tir.c:1653
 #, c-format
 msgid "reserved CTL cmd %d"
 msgstr "Ayrılmış CTL komutu %d"
 
 #. stack byte from image
 #. arg: none.
-#: vms-tir.c:1148
+#: vms-tir.c:1169
 msgid "stack-from-image not implemented"
 msgstr "Görüntüden-yığıt tamamlanmamış"
 
-#: vms-tir.c:1166
+#: vms-tir.c:1187
 msgid "stack-entry-mask not fully implemented"
 msgstr "Yığın girdi maskı tamamlanmamış"
 
@@ -2274,261 +2512,271 @@ msgstr "Yığın girdi maskı tamamlanmamış"
 #.
 #. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
 #. and stack TRUE (args match) or FALSE (args dont match) value.
-#: vms-tir.c:1180
+#: vms-tir.c:1201
 msgid "PASSMECH not fully implemented"
 msgstr "PASSMECH tamamlanmamış"
 
-#: vms-tir.c:1199
+#: vms-tir.c:1220
 msgid "stack-local-symbol not fully implemented"
 msgstr "Yerel sembol yığıtı tamamlanmamış"
 
-#: vms-tir.c:1212
+#: vms-tir.c:1233
 msgid "stack-literal not fully implemented"
 msgstr "Yığıt sabiti tamamlanmamış"
 
-#: vms-tir.c:1233
+#: vms-tir.c:1254
 msgid "stack-local-symbol-entry-point-mask not fully implemented"
 msgstr "Yığın yerel sembol girdi noktası maskı tamamlanmamış"
 
-#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
-#: vms-tir.c:1619 vms-tir.c:1627
+#: vms-tir.c:1531 vms-tir.c:1543 vms-tir.c:1555 vms-tir.c:1567 vms-tir.c:1632
+#: vms-tir.c:1640 vms-tir.c:1648
 #, c-format
 msgid "%s: not fully implemented"
 msgstr "%s: tamamlanmamış"
 
-#: vms-tir.c:1684
+#: vms-tir.c:1705
 #, c-format
 msgid "obj code %d not found"
 msgstr "Nesne kodu %d bulunmadı"
 
-#: vms-tir.c:2019
+#: vms-tir.c:2043
 #, c-format
 msgid "SEC_RELOC with no relocs in section %s"
 msgstr "%s bölümünde yerdeğişim olmaksızın SEC_RELOC"
 
-#: vms-tir.c:2307
+#: vms-tir.c:2331
 #, c-format
 msgid "Unhandled relocation %s"
 msgstr "Desteklenmeyen yerdeğişim %s"
 
-#: xcofflink.c:1243
+#: xcofflink.c:1244
 #, c-format
 msgid "%s: `%s' has line numbers but no enclosing section"
 msgstr "%s: `%s' satır numaralarına sahip fakat onu içeren bölümü yok"
 
-#: xcofflink.c:1296
+#: xcofflink.c:1297
 #, c-format
 msgid "%s: class %d symbol `%s' has no aux entries"
 msgstr "%s: sınıf %d sembol `%s'un alternatif girdileri yok"
 
-#: xcofflink.c:1319
+#: xcofflink.c:1320
 #, c-format
 msgid "%s: symbol `%s' has unrecognized csect type %d"
 msgstr "%s: `%s' sembolünde bilinmeyen csect türü %d var"
 
-#: xcofflink.c:1331
+#: xcofflink.c:1332
 #, c-format
 msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
 msgstr "%s: hatalı XTY_ER sembolü `%s': sınıf %d scnum %d scnlen %d"
 
-#: xcofflink.c:1367
+#: xcofflink.c:1368
 #, c-format
 msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
 msgstr "%s: XMC_TC0 sembolü `%s': sınıf %d scnlen %d"
 
-#: xcofflink.c:1519
+#: xcofflink.c:1520
 #, c-format
 msgid "%s: csect `%s' not in enclosing section"
 msgstr "%s: csect `%s' onu içeren bölümde değil"
 
-#: xcofflink.c:1626
+#: xcofflink.c:1627
 #, c-format
 msgid "%s: misplaced XTY_LD `%s'"
 msgstr "%s: XTY_LD `%s'yanlış yerde"
 
-#: xcofflink.c:1957
+#: xcofflink.c:1958
 #, c-format
 msgid "%s: reloc %s:%d not in csect"
 msgstr "%s: yerdeğişim %s:%d csect içinde değil"
 
-#: xcofflink.c:2092
+#: xcofflink.c:2095
 #, c-format
 msgid "%s: XCOFF shared object when not producing XCOFF output"
 msgstr "%s: XCOFF çıktısı oluşturulmazken XCOFF paylaşımlı nesnesi"
 
-#: xcofflink.c:2113
+#: xcofflink.c:2116
 #, c-format
 msgid "%s: dynamic object with no .loader section"
 msgstr "%s: .loader bölümü olmayan dinamik nesne"
 
-#: xcofflink.c:2758
+#: xcofflink.c:2761
 #, c-format
 msgid "%s: no such symbol"
 msgstr "%s: böyle bir sembol yok"
 
-#: xcofflink.c:2891
+#: xcofflink.c:2894
 msgid "error: undefined symbol __rtinit"
 msgstr "hata: tanımlanmamış sembol __rtinit"
 
-#: xcofflink.c:3453
+#: xcofflink.c:3455
 #, c-format
 msgid "warning: attempt to export undefined symbol `%s'"
 msgstr "uyarı: tanımlanmamış `%s' sembolünü ihraç denemesi"
 
-#: xcofflink.c:4447
+#: xcofflink.c:4448
 #, c-format
 msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
 msgstr "TOC taşması: 0x%lx > 0x10000; -mminimal-toc ile derlemeyi deneyin"
 
-#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
+#: xcofflink.c:5288 xcofflink.c:5755 xcofflink.c:5817 xcofflink.c:6119
 #, c-format
 msgid "%s: loader reloc in unrecognized section `%s'"
 msgstr "%s: bilinmeyen `%s' bölümünde yükleyici yerdeğişimi"
 
-#: xcofflink.c:5309 xcofflink.c:6130
+#: xcofflink.c:5310 xcofflink.c:6130
 #, c-format
 msgid "%s: `%s' in loader reloc but not loader sym"
 msgstr "%s: `%s' yükleyici yerdeğişiminde fakat yükleyici sembolü değil"
 
-#: xcofflink.c:5324
+#: xcofflink.c:5325
 #, c-format
 msgid "%s: loader reloc in read-only section %s"
 msgstr "%s: %s salt-okunur bölümünde yükleyici yerdeğişimi"
 
-#: elf32-ia64.c:2222 elf64-ia64.c:2222
+#: elf32-ia64.c:2392 elf64-ia64.c:2392
 msgid "@pltoff reloc against local symbol"
 msgstr "yerel sembole @pltoff yerdegisimi"
 
-#: elf32-ia64.c:3562 elf64-ia64.c:3562
+#: elf32-ia64.c:3804 elf64-ia64.c:3804
 #, c-format
 msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
 msgstr "%s: kısa veri bölümünde taşma (0x%lx >= 0x400000)"
 
-#: elf32-ia64.c:3573 elf64-ia64.c:3573
+#: elf32-ia64.c:3815 elf64-ia64.c:3815
 #, c-format
 msgid "%s: __gp does not cover short data segment"
 msgstr "%s: __gp kısa veri bölümünü kapsamıyor"
 
-#: elf32-ia64.c:3858 elf64-ia64.c:3858
+#: elf32-ia64.c:4131 elf64-ia64.c:4131
 #, c-format
 msgid "%s: linking non-pic code in a shared library"
 msgstr "%s: pic olmayan kod paylaşmalı kitaplıkta bağlanıyor"
 
-#: elf32-ia64.c:3891 elf64-ia64.c:3891
+#: elf32-ia64.c:4164 elf64-ia64.c:4164
 #, c-format
 msgid "%s: @gprel relocation against dynamic symbol %s"
 msgstr "%s: %s dinamik sembolüne @gprel yerdeğişimi"
 
-#: elf32-ia64.c:4030 elf64-ia64.c:4030
+#: elf32-ia64.c:4224 elf64-ia64.c:4224
+#, c-format
+msgid "%s: linking non-pic code in a position independent executable"
+msgstr "%s: pic olmayan kod yer bağımsız uygulamaya bağlanıyor"
+
+#: elf32-ia64.c:4363 elf64-ia64.c:4363
 #, c-format
-msgid "%s: dynamic relocation against speculation fixup"
-msgstr "%s: kuşkulu düzeltmeye dinamik yerdeğişim"
+msgid "%s: @internal branch to dynamic symbol %s"
+msgstr "%s: %s dinamik sembolüne @internal dalı"
 
-#: elf32-ia64.c:4038 elf64-ia64.c:4038
+#: elf32-ia64.c:4365 elf64-ia64.c:4365
 #, c-format
-msgid "%s: speculation fixup against undefined weak symbol"
-msgstr "%s: tanımlanmamış gevşek sembole tartışmalı düzeltme"
+msgid "%s: speculation fixup to dynamic symbol %s"
+msgstr "%s: %s dinamik sembolüne spekülasyon düzeltmesi"
 
-#: elf32-ia64.c:4271 elf64-ia64.c:4271
+#: elf32-ia64.c:4367 elf64-ia64.c:4367
+#, c-format
+msgid "%s: @pcrel relocation against dynamic symbol %s"
+msgstr "%s: %s dinamik sembolüne @pcrel yerdeğişimi"
+
+#: elf32-ia64.c:4579 elf64-ia64.c:4579
 msgid "unsupported reloc"
 msgstr "desteklenmeyen yerdeğişim"
 
-#: elf32-ia64.c:4551 elf64-ia64.c:4551
+#: elf32-ia64.c:4858 elf64-ia64.c:4858
 #, c-format
 msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
 msgstr "%s: NULL-halinde-tuzakla karşı-başvurusu tuzaklamayan dosyalarla bağlandı"
 
-#: elf32-ia64.c:4560 elf64-ia64.c:4560
+#: elf32-ia64.c:4867 elf64-ia64.c:4867
 #, c-format
 msgid "%s: linking big-endian files with little-endian files"
 msgstr "%s: büyük sonlu dosyalar küçük sonlu dosyalarla bağlanıyor"
 
-#: elf32-ia64.c:4569 elf64-ia64.c:4569
+#: elf32-ia64.c:4876 elf64-ia64.c:4876
 #, c-format
 msgid "%s: linking 64-bit files with 32-bit files"
 msgstr "%s: 64 bitlik dosyalar 32 bitlik dosyalarla bağlanıyor"
 
-#: elf32-ia64.c:4578 elf64-ia64.c:4578
+#: elf32-ia64.c:4885 elf64-ia64.c:4885
 #, c-format
 msgid "%s: linking constant-gp files with non-constant-gp files"
 msgstr "%s: constant-gp dosyaları constant-gp olmayan dosyalarla bağlanıyor"
 
-#: elf32-ia64.c:4588 elf64-ia64.c:4588
+#: elf32-ia64.c:4895 elf64-ia64.c:4895
 #, c-format
 msgid "%s: linking auto-pic files with non-auto-pic files"
 msgstr "%s: auto-pic dosyaları auto-pic olmayan dosyalarla bağlanıyor"
 
-#: peigen.c:962 pepigen.c:962
+#: peigen.c:985 pepigen.c:985
 #, c-format
 msgid "%s: line number overflow: 0x%lx > 0xffff"
 msgstr "%s: satır numarası taşması: 0x%lx > 0xffff"
 
-#: peigen.c:979 pepigen.c:979
+#: peigen.c:1002 pepigen.c:1002
 #, c-format
 msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
 msgstr "%s: yerdeğişim taşması 1: 0x%lx > 0xffff"
 
-#: peigen.c:993 pepigen.c:993
+#: peigen.c:1016 pepigen.c:1016
 msgid "Export Directory [.edata (or where ever we found it)]"
 msgstr "İhraç Dizini [.edata (veya nerede bulundu ise)]"
 
-#: peigen.c:994 pepigen.c:994
+#: peigen.c:1017 pepigen.c:1017
 msgid "Import Directory [parts of .idata]"
 msgstr "İthal Dizini [.idata'nın parçaları]"
 
-#: peigen.c:995 pepigen.c:995
+#: peigen.c:1018 pepigen.c:1018
 msgid "Resource Directory [.rsrc]"
 msgstr "Kaynak Dizini [.rsrc]"
 
-#: peigen.c:996 pepigen.c:996
+#: peigen.c:1019 pepigen.c:1019
 msgid "Exception Directory [.pdata]"
 msgstr "İstisna Dizini [.pdata]"
 
-#: peigen.c:997 pepigen.c:997
+#: peigen.c:1020 pepigen.c:1020
 msgid "Security Directory"
 msgstr "Güvenlik Dizini"
 
-#: peigen.c:998 pepigen.c:998
+#: peigen.c:1021 pepigen.c:1021
 msgid "Base Relocation Directory [.reloc]"
 msgstr "Temel Yerdeğişim Dizini [.reloc]"
 
-#: peigen.c:999 pepigen.c:999
+#: peigen.c:1022 pepigen.c:1022
 msgid "Debug Directory"
 msgstr "Hata Ayıklama Dizini"
 
-#: peigen.c:1000 pepigen.c:1000
+#: peigen.c:1023 pepigen.c:1023
 msgid "Description Directory"
 msgstr "Açıklama Dizini"
 
-#: peigen.c:1001 pepigen.c:1001
+#: peigen.c:1024 pepigen.c:1024
 msgid "Special Directory"
 msgstr "Özel Dizin"
 
-#: peigen.c:1002 pepigen.c:1002
+#: peigen.c:1025 pepigen.c:1025
 msgid "Thread Storage Directory [.tls]"
 msgstr "Dal Saklama Dizini [.tls]"
 
-#: peigen.c:1003 pepigen.c:1003
+#: peigen.c:1026 pepigen.c:1026
 msgid "Load Configuration Directory"
 msgstr "Ayar Yükleme Dizini"
 
-#: peigen.c:1004 pepigen.c:1004
+#: peigen.c:1027 pepigen.c:1027
 msgid "Bound Import Directory"
 msgstr "Sınır İthal Dizini"
 
-#: peigen.c:1005 pepigen.c:1005
+#: peigen.c:1028 pepigen.c:1028
 msgid "Import Address Table Directory"
 msgstr "Adres Tablosu İthal Dizini"
 
-#: peigen.c:1006 pepigen.c:1006
+#: peigen.c:1029 pepigen.c:1029
 msgid "Delay Import Directory"
 msgstr "Gecikmeli İthal Dizini"
 
-#: peigen.c:1007 peigen.c:1008 pepigen.c:1007 pepigen.c:1008
+#: peigen.c:1030 peigen.c:1031 pepigen.c:1030 pepigen.c:1031
 msgid "Reserved"
 msgstr "Ayrılmış"
 
-#: peigen.c:1071 pepigen.c:1071
+#: peigen.c:1094 pepigen.c:1094
 msgid ""
 "\n"
 "There is an import table, but the section containing it could not be found\n"
@@ -2536,7 +2784,7 @@ msgstr ""
 "\n"
 "Bir ithal tablosu var, fakat onu içeren bölüm bulunamadı\n"
 
-#: peigen.c:1076 pepigen.c:1076
+#: peigen.c:1099 pepigen.c:1099
 #, c-format
 msgid ""
 "\n"
@@ -2545,7 +2793,7 @@ msgstr ""
 "\n"
 "%s içerisinde 0x%lx'de bir ithal tablosu var\n"
 
-#: peigen.c:1113 pepigen.c:1113
+#: peigen.c:1136 pepigen.c:1136
 #, c-format
 msgid ""
 "\n"
@@ -2554,12 +2802,12 @@ msgstr ""
 "\n"
 "Başlangıç adresinde işlev betimleyicisi bulundu: %04lx\n"
 
-#: peigen.c:1116 pepigen.c:1116
+#: peigen.c:1139 pepigen.c:1139
 #, c-format
 msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
 msgstr "\tkod temeli %08lx toc (yüklenebilir/gerçek) %08lx/%08lx\n"
 
-#: peigen.c:1122 pepigen.c:1122
+#: peigen.c:1145 pepigen.c:1145
 msgid ""
 "\n"
 "No reldata section! Function descriptor not decoded.\n"
@@ -2567,7 +2815,7 @@ msgstr ""
 "\n"
 "Reldata bölümü yok! İşlev betimleyicisi çözümlenemedi.\n"
 
-#: peigen.c:1127 pepigen.c:1127
+#: peigen.c:1150 pepigen.c:1150
 #, c-format
 msgid ""
 "\n"
@@ -2576,7 +2824,7 @@ msgstr ""
 "\n"
 "İthal Tabloları (%s bölüm içeriği çözümlendi)\n"
 
-#: peigen.c:1130 pepigen.c:1130
+#: peigen.c:1153 pepigen.c:1153
 msgid ""
 " vma:            Hint    Time      Forward  DLL       First\n"
 "                 Table   Stamp     Chain    Name      Thunk\n"
@@ -2584,7 +2832,7 @@ msgstr ""
 " vma:            İpucu   Zaman     İleri    DLL       İlk\n"
 "                 Tablo   Damga     Zincir   İsim      Parça\n"
 
-#: peigen.c:1181 pepigen.c:1181
+#: peigen.c:1204 pepigen.c:1204
 #, c-format
 msgid ""
 "\n"
@@ -2593,11 +2841,11 @@ msgstr ""
 "\n"
 "\tDLL Adı: %s\n"
 
-#: peigen.c:1192 pepigen.c:1192
+#: peigen.c:1215 pepigen.c:1215
 msgid "\tvma:  Hint/Ord Member-Name Bound-To\n"
 msgstr "\tvma:  İpucu/Sıra Üye-Adı Sınır\n"
 
-#: peigen.c:1217 pepigen.c:1217
+#: peigen.c:1240 pepigen.c:1240
 msgid ""
 "\n"
 "There is a first thunk, but the section containing it could not be found\n"
@@ -2605,7 +2853,7 @@ msgstr ""
 "\n"
 "Bir ilk parça var, fakat onu içeren bölüm bulunamadı\n"
 
-#: peigen.c:1357 pepigen.c:1357
+#: peigen.c:1380 pepigen.c:1380
 msgid ""
 "\n"
 "There is an export table, but the section containing it could not be found\n"
@@ -2613,7 +2861,7 @@ msgstr ""
 "\n"
 "Bir ihraç tablosu var, fakat onu içeren bölüm bulunamadı\n"
 
-#: peigen.c:1362 pepigen.c:1362
+#: peigen.c:1385 pepigen.c:1385
 #, c-format
 msgid ""
 "\n"
@@ -2622,7 +2870,7 @@ msgstr ""
 "\n"
 "%s içinde 0x%lx'de bir ihraç tablosu var\n"
 
-#: peigen.c:1393 pepigen.c:1393
+#: peigen.c:1416 pepigen.c:1416
 #, c-format
 msgid ""
 "\n"
@@ -2633,61 +2881,61 @@ msgstr ""
 "İhraç Tabloları (%s bölüm içeriği çözümlendi)\n"
 "\n"
 
-#: peigen.c:1397 pepigen.c:1397
+#: peigen.c:1420 pepigen.c:1420
 #, c-format
 msgid "Export Flags \t\t\t%lx\n"
 msgstr "İhraç Bayrakları \t\t\t%lx\n"
 
-#: peigen.c:1400 pepigen.c:1400
+#: peigen.c:1423 pepigen.c:1423
 #, c-format
 msgid "Time/Date stamp \t\t%lx\n"
 msgstr "Saat/Tarih damgası \t\t%lx\n"
 
-#: peigen.c:1403 pepigen.c:1403
+#: peigen.c:1426 pepigen.c:1426
 #, c-format
 msgid "Major/Minor \t\t\t%d/%d\n"
 msgstr "Majör/Minör \t\t\t%d/%d\n"
 
-#: peigen.c:1406 pepigen.c:1406
+#: peigen.c:1429 pepigen.c:1429
 msgid "Name \t\t\t\t"
 msgstr "İsim \t\t\t\t"
 
-#: peigen.c:1412 pepigen.c:1412
+#: peigen.c:1435 pepigen.c:1435
 #, c-format
 msgid "Ordinal Base \t\t\t%ld\n"
 msgstr "Onluk Sistem \t\t\t%ld\n"
 
-#: peigen.c:1415 pepigen.c:1415
+#: peigen.c:1438 pepigen.c:1438
 msgid "Number in:\n"
 msgstr "Sayı içinde:\n"
 
-#: peigen.c:1418 pepigen.c:1418
+#: peigen.c:1441 pepigen.c:1441
 #, c-format
 msgid "\tExport Address Table \t\t%08lx\n"
 msgstr "\tİhraç Adres Tablosu \t\t%08lx\n"
 
-#: peigen.c:1422 pepigen.c:1422
+#: peigen.c:1445 pepigen.c:1445
 #, c-format
 msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
 msgstr "\t[İsim Gösterge/Onluk] Tablo\t%08lx\n"
 
-#: peigen.c:1425 pepigen.c:1425
+#: peigen.c:1448 pepigen.c:1448
 msgid "Table Addresses\n"
 msgstr "Tablo Adresleri\n"
 
-#: peigen.c:1428 pepigen.c:1428
+#: peigen.c:1451 pepigen.c:1451
 msgid "\tExport Address Table \t\t"
 msgstr "\tİhraç Adres Tablosu \t\t"
 
-#: peigen.c:1433 pepigen.c:1433
+#: peigen.c:1456 pepigen.c:1456
 msgid "\tName Pointer Table \t\t"
 msgstr "\tİsim Gösterge Tablosu \t\t"
 
-#: peigen.c:1438 pepigen.c:1438
+#: peigen.c:1461 pepigen.c:1461
 msgid "\tOrdinal Table \t\t\t"
 msgstr "\tOnluk Tablo \t\t\t"
 
-#: peigen.c:1453 pepigen.c:1453
+#: peigen.c:1476 pepigen.c:1476
 #, c-format
 msgid ""
 "\n"
@@ -2696,15 +2944,15 @@ msgstr ""
 "\n"
 "İhraç Adres Tablosu -- Onluk Sistem %ld\n"
 
-#: peigen.c:1472 pepigen.c:1472
+#: peigen.c:1495 pepigen.c:1495
 msgid "Forwarder RVA"
 msgstr "RVA Yönlendiricisi"
 
-#: peigen.c:1483 pepigen.c:1483
+#: peigen.c:1506 pepigen.c:1506
 msgid "Export RVA"
 msgstr "RVA İhracı"
 
-#: peigen.c:1490 pepigen.c:1490
+#: peigen.c:1513 pepigen.c:1513
 msgid ""
 "\n"
 "[Ordinal/Name Pointer] Table\n"
@@ -2712,12 +2960,12 @@ msgstr ""
 "\n"
 "[Onluk/İsim Gösterge] Tablosu\n"
 
-#: peigen.c:1545 pepigen.c:1545
+#: peigen.c:1568 pepigen.c:1568
 #, c-format
 msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
 msgstr "Uyarı, .pdata bölüm boyu (%ld) %d'nin katı değil\n"
 
-#: peigen.c:1549 pepigen.c:1549
+#: peigen.c:1572 pepigen.c:1572
 msgid ""
 "\n"
 "The Function Table (interpreted .pdata section contents)\n"
@@ -2725,11 +2973,11 @@ msgstr ""
 "\n"
 "İşlev Tablosu (.pdata bölüm içeriği çözümlendi)\n"
 
-#: peigen.c:1552 pepigen.c:1552
+#: peigen.c:1575 pepigen.c:1575
 msgid " vma:\t\t\tBegin Address    End Address      Unwind Info\n"
 msgstr " vma:\t\t\tBaşlangıç Adresi Sonlanma Adresi  Geri Al Bilgisi\n"
 
-#: peigen.c:1554 pepigen.c:1554
+#: peigen.c:1577 pepigen.c:1577
 msgid ""
 " vma:\t\tBegin    End      EH       EH       PrologEnd  Exception\n"
 "     \t\tAddress  Address  Handler  Data     Address    Mask\n"
@@ -2737,19 +2985,19 @@ msgstr ""
 " vma:\t\tBaşl.    Son      EH       EH       PrologSon  İstisna\n"
 "     \t\tAdres    Adres    Yakalay  Veri     Adres      Maske\n"
 
-#: peigen.c:1624 pepigen.c:1624
+#: peigen.c:1647 pepigen.c:1647
 msgid " Register save millicode"
 msgstr " Yazma milikodunu kaydet"
 
-#: peigen.c:1627 pepigen.c:1627
+#: peigen.c:1650 pepigen.c:1650
 msgid " Register restore millicode"
 msgstr " Geri alma milikodunu kaydet"
 
-#: peigen.c:1630 pepigen.c:1630
+#: peigen.c:1653 pepigen.c:1653
 msgid " Glue code sequence"
 msgstr " Birleştirici kod dizisi"
 
-#: peigen.c:1682 pepigen.c:1682
+#: peigen.c:1705 pepigen.c:1705
 msgid ""
 "\n"
 "\n"
@@ -2759,7 +3007,7 @@ msgstr ""
 "\n"
 "PE Dosya Temel Yerdeğişimi (.reloc bölüm içeriği çözümlendi)\n"
 
-#: peigen.c:1712 pepigen.c:1712
+#: peigen.c:1735 pepigen.c:1735
 #, c-format
 msgid ""
 "\n"
@@ -2768,7 +3016,7 @@ msgstr ""
 "\n"
 "Sanal Adres: %08lx Parça boyu %ld (0x%lx) Düzeltme Sayısı %ld\n"
 
-#: peigen.c:1725 pepigen.c:1725
+#: peigen.c:1748 pepigen.c:1748
 #, c-format
 msgid "\treloc %4d offset %4x [%4lx] %s"
 msgstr "\tyer değişim %4d göreli konum %4x [%4lx] %s"
@@ -2776,7 +3024,7 @@ msgstr "\tyer değişim %4d göreli konum %4x [%4lx] %s"
 #. The MS dumpbin program reportedly ands with 0xff0f before
 #. printing the characteristics field.  Not sure why.  No reason to
 #. emulate it here.
-#: peigen.c:1765 pepigen.c:1765
+#: peigen.c:1788 pepigen.c:1788
 #, c-format
 msgid ""
 "\n"
@@ -2785,6 +3033,42 @@ msgstr ""
 "\n"
 "Özellikler 0x%x\n"
 
+#~ msgid "%s: Unknown special linker type %d"
+#~ msgstr "%s: Bilinmeyen özel bağlayıcı türü %d"
+
+#~ msgid "v850ea architecture"
+#~ msgstr "v850ea platformu"
+
+#~ msgid "%s: Section %s is too large to add hole of %ld bytes"
+#~ msgstr "%s: %s bölümü içine %ld baytlık bir delik koymak için fazla büyük"
+
+#~ msgid "Error: out of memory"
+#~ msgstr "Hata: bellek tükendi"
+
+#~ msgid "warning: relocation against removed section; zeroing"
+#~ msgstr "uyarı: silinmiş bölüme yer değişim; sıfırlandı"
+
+#~ msgid "warning: relocation against removed section"
+#~ msgstr "%1$s: silinmiş bölüme yerdeğişim"
+
+#~ msgid "local symbols in discarded section %s"
+#~ msgstr "atılmış %s bölümünde yerel semboller"
+
+#~ msgid "%s: linking abicalls files with non-abicalls files"
+#~ msgstr "%s: abicalls dosyaları abicalls olmayan dosyalarla bağlanıyor"
+
+#~ msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+#~ msgstr "%1$s: Önceki modüllerle (-mips%3$d) ile ISA uyumsuzluğu (-mips%2$d)"
+
+#~ msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+#~ msgstr "%1$s: Önceki modüllerle (%3$d) ile ISA uyumsuzluğu (%2$d)"
+
+#~ msgid "%s: dynamic relocation against speculation fixup"
+#~ msgstr "%s: kuşkulu düzeltmeye dinamik yerdeğişim"
+
+#~ msgid "%s: speculation fixup against undefined weak symbol"
+#~ msgstr "%s: tanımlanmamış gevşek sembole tartışmalı düzeltme"
+
 #~ msgid "GP relative relocation when GP not defined"
 #~ msgstr "GP tanımlanmamışken GP göreli yer değiştirmesi"
 
index 09155b2757e16308c284d7f22af8a9c70d94a3e2..58c9c517144dac07d1b58278ef1594972e0db90a 100644 (file)
@@ -321,8 +321,8 @@ CODE_FRAGMENT
 .     strange relocation methods to be accomodated (e.g., i960 callj
 .     instructions).  *}
 .  bfd_reloc_status_type (*special_function)
-.    PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
-.             bfd *, char **));
+.    (bfd *, arelent *, struct symbol_cache_entry *, void *, asection *,
+.     bfd *, char **);
 .
 .  {* The textual name of the relocation type.  *}
 .  char *name;
@@ -401,7 +401,7 @@ DESCRIPTION
 
 .#define HOWTO_PREPARE(relocation, symbol)               \
 .  {                                                     \
-.    if (symbol != (asymbol *) NULL)                     \
+.    if (symbol != NULL)                                 \
 .      {                                                 \
 .        if (bfd_is_com_section (symbol->section))       \
 .          {                                             \
@@ -429,8 +429,7 @@ DESCRIPTION
  */
 
 unsigned int
-bfd_get_reloc_size (howto)
-     reloc_howto_type *howto;
+bfd_get_reloc_size (reloc_howto_type *howto)
 {
   switch (howto->size)
     {
@@ -470,13 +469,12 @@ FUNCTION
        bfd_check_overflow
 
 SYNOPSIS
-       bfd_reloc_status_type
-               bfd_check_overflow
-                       (enum complain_overflow how,
-                        unsigned int bitsize,
-                        unsigned int rightshift,
-                        unsigned int addrsize,
-                        bfd_vma relocation);
+       bfd_reloc_status_type bfd_check_overflow
+         (enum complain_overflow how,
+          unsigned int bitsize,
+          unsigned int rightshift,
+          unsigned int addrsize,
+          bfd_vma relocation);
 
 DESCRIPTION
        Perform overflow checking on @var{relocation} which has
@@ -488,12 +486,11 @@ DESCRIPTION
 */
 
 bfd_reloc_status_type
-bfd_check_overflow (how, bitsize, rightshift, addrsize, relocation)
-     enum complain_overflow how;
-     unsigned int bitsize;
-     unsigned int rightshift;
-     unsigned int addrsize;
-     bfd_vma relocation;
+bfd_check_overflow (enum complain_overflow how,
+                   unsigned int bitsize,
+                   unsigned int rightshift,
+                   unsigned int addrsize,
+                   bfd_vma relocation)
 {
   bfd_vma fieldmask, addrmask, signmask, ss, a;
   bfd_reloc_status_type flag = bfd_reloc_ok;
@@ -553,14 +550,13 @@ FUNCTION
        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);
+       bfd_reloc_status_type bfd_perform_relocation
+          (bfd *abfd,
+           arelent *reloc_entry,
+           void *data,
+           asection *input_section,
+           bfd *output_bfd,
+          char **error_message);
 
 DESCRIPTION
        If @var{output_bfd} is supplied to this function, the
@@ -581,14 +577,12 @@ DESCRIPTION
 */
 
 bfd_reloc_status_type
-bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
-                       error_message)
-     bfd *abfd;
-     arelent *reloc_entry;
-     PTR data;
-     asection *input_section;
-     bfd *output_bfd;
-     char **error_message;
+bfd_perform_relocation (bfd *abfd,
+                       arelent *reloc_entry,
+                       void *data,
+                       asection *input_section,
+                       bfd *output_bfd,
+                       char **error_message)
 {
   bfd_vma relocation;
   bfd_reloc_status_type flag = bfd_reloc_ok;
@@ -600,7 +594,7 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
 
   symbol = *(reloc_entry->sym_ptr_ptr);
   if (bfd_is_abs_section (symbol->section)
-      && output_bfd != (bfd *) NULL)
+      && output_bfd != NULL)
     {
       reloc_entry->address += input_section->output_offset;
       return bfd_reloc_ok;
@@ -611,7 +605,7 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
      considered to have a value of zero (SVR4 ABI, p. 4-27).  */
   if (bfd_is_und_section (symbol->section)
       && (symbol->flags & BSF_WEAK) == 0
-      && output_bfd == (bfd *) NULL)
+      && output_bfd == NULL)
     flag = bfd_reloc_undefined;
 
   /* If there is a function supplied to handle this relocation type,
@@ -695,7 +689,7 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
        relocation -= reloc_entry->address;
     }
 
-  if (output_bfd != (bfd *) NULL)
+  if (output_bfd != NULL)
     {
       if (! howto->partial_inplace)
        {
@@ -958,13 +952,12 @@ FUNCTION
        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);
+       bfd_reloc_status_type bfd_install_relocation
+          (bfd *abfd,
+           arelent *reloc_entry,
+           void *data, bfd_vma data_start,
+           asection *input_section,
+          char **error_message);
 
 DESCRIPTION
        This looks remarkably like <<bfd_perform_relocation>>, except it
@@ -977,14 +970,12 @@ DESCRIPTION
 */
 
 bfd_reloc_status_type
-bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
-                       input_section, error_message)
-     bfd *abfd;
-     arelent *reloc_entry;
-     PTR data_start;
-     bfd_vma data_start_offset;
-     asection *input_section;
-     char **error_message;
+bfd_install_relocation (bfd *abfd,
+                       arelent *reloc_entry,
+                       void *data_start,
+                       bfd_vma data_start_offset,
+                       asection *input_section,
+                       char **error_message)
 {
   bfd_vma relocation;
   bfd_reloc_status_type flag = bfd_reloc_ok;
@@ -1277,32 +1268,32 @@ space consuming.  For each target:
     {
     case 0:
       {
-       char x = bfd_get_8 (abfd, (char *) data);
+       char x = bfd_get_8 (abfd, data);
        DOIT (x);
-       bfd_put_8 (abfd, x, (unsigned char *) data);
+       bfd_put_8 (abfd, x, data);
       }
       break;
 
     case 1:
       {
-       short x = bfd_get_16 (abfd, (bfd_byte *) data);
+       short x = bfd_get_16 (abfd, data);
        DOIT (x);
-       bfd_put_16 (abfd, (bfd_vma) x, (unsigned char *) data);
+       bfd_put_16 (abfd, (bfd_vma) x, data);
       }
       break;
     case 2:
       {
-       long x = bfd_get_32 (abfd, (bfd_byte *) data);
+       long x = bfd_get_32 (abfd, data);
        DOIT (x);
-       bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data);
+       bfd_put_32 (abfd, (bfd_vma) x, data);
       }
       break;
     case -2:
       {
-       long x = bfd_get_32 (abfd, (bfd_byte *) data);
+       long x = bfd_get_32 (abfd, data);
        relocation = -relocation;
        DOIT (x);
-       bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data);
+       bfd_put_32 (abfd, (bfd_vma) x, data);
       }
       break;
 
@@ -1312,9 +1303,9 @@ space consuming.  For each target:
 
     case 4:
       {
-       bfd_vma x = bfd_get_64 (abfd, (bfd_byte *) data);
+       bfd_vma x = bfd_get_64 (abfd, data);
        DOIT (x);
-       bfd_put_64 (abfd, x, (bfd_byte *) data);
+       bfd_put_64 (abfd, x, data);
       }
       break;
     default:
@@ -1347,15 +1338,13 @@ space consuming.  For each target:
    ADDEND is the addend of the reloc.  */
 
 bfd_reloc_status_type
-_bfd_final_link_relocate (howto, input_bfd, input_section, contents, address,
-                         value, addend)
-     reloc_howto_type *howto;
-     bfd *input_bfd;
-     asection *input_section;
-     bfd_byte *contents;
-     bfd_vma address;
-     bfd_vma value;
-     bfd_vma addend;
+_bfd_final_link_relocate (reloc_howto_type *howto,
+                         bfd *input_bfd,
+                         asection *input_section,
+                         bfd_byte *contents,
+                         bfd_vma address,
+                         bfd_vma value,
+                         bfd_vma addend)
 {
   bfd_vma relocation;
 
@@ -1394,11 +1383,10 @@ _bfd_final_link_relocate (howto, input_bfd, input_section, contents, address,
 /* Relocate a given location using a given value and howto.  */
 
 bfd_reloc_status_type
-_bfd_relocate_contents (howto, input_bfd, relocation, location)
-     reloc_howto_type *howto;
-     bfd *input_bfd;
-     bfd_vma relocation;
-     bfd_byte *location;
+_bfd_relocate_contents (reloc_howto_type *howto,
+                       bfd *input_bfd,
+                       bfd_vma relocation,
+                       bfd_byte *location)
 {
   int size;
   bfd_vma x = 0;
@@ -2155,6 +2143,42 @@ ENUMDOC
   MIPS ELF relocations.
 
 COMMENT
+ENUM
+  BFD_RELOC_MN10300_GOTOFF24
+ENUMDOC
+  This is a 24bit GOT-relative reloc for the mn10300.
+ENUM
+  BFD_RELOC_MN10300_GOT32
+ENUMDOC
+  This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes
+  in the instruction.
+ENUM
+  BFD_RELOC_MN10300_GOT24
+ENUMDOC
+  This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes
+  in the instruction.
+ENUM
+  BFD_RELOC_MN10300_GOT16
+ENUMDOC
+  This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes
+  in the instruction.
+ENUM
+  BFD_RELOC_MN10300_COPY
+ENUMDOC
+  Copy symbol at runtime.
+ENUM
+  BFD_RELOC_MN10300_GLOB_DAT
+ENUMDOC
+  Create GOT entry.
+ENUM
+  BFD_RELOC_MN10300_JMP_SLOT
+ENUMDOC
+  Create PLT entry.
+ENUM
+  BFD_RELOC_MN10300_RELATIVE
+ENUMDOC
+  Adjust by program base.
+COMMENT
 
 ENUM
   BFD_RELOC_386_GOT32
@@ -3384,6 +3408,17 @@ ENUMX
 ENUMDOC
   s390 tls relocations.
 
+ENUM
+  BFD_RELOC_390_20
+ENUMX
+  BFD_RELOC_390_GOT20
+ENUMX
+  BFD_RELOC_390_GOTPLT20
+ENUMX
+  BFD_RELOC_390_TLS_GOTIE20
+ENUMDOC
+  Long displacement extension.
+
 ENUM
   BFD_RELOC_IP2K_FR9
 ENUMDOC
@@ -3905,8 +3940,8 @@ FUNCTION
        bfd_reloc_type_lookup
 
 SYNOPSIS
-       reloc_howto_type *
-       bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code);
+       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
@@ -3916,9 +3951,7 @@ DESCRIPTION
 */
 
 reloc_howto_type *
-bfd_reloc_type_lookup (abfd, code)
-     bfd *abfd;
-     bfd_reloc_code_real_type code;
+bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
 {
   return BFD_SEND (abfd, reloc_type_lookup, (abfd, code));
 }
@@ -3932,7 +3965,7 @@ INTERNAL_FUNCTION
 
 SYNOPSIS
        reloc_howto_type *bfd_default_reloc_type_lookup
-       (bfd *abfd, bfd_reloc_code_real_type  code);
+         (bfd *abfd, bfd_reloc_code_real_type  code);
 
 DESCRIPTION
        Provides a default relocation lookup routine for any architecture.
@@ -3940,9 +3973,7 @@ DESCRIPTION
 */
 
 reloc_howto_type *
-bfd_default_reloc_type_lookup (abfd, code)
-     bfd *abfd;
-     bfd_reloc_code_real_type code;
+bfd_default_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
 {
   switch (code)
     {
@@ -3963,7 +3994,7 @@ bfd_default_reloc_type_lookup (abfd, code)
     default:
       BFD_FAIL ();
     }
-  return (reloc_howto_type *) NULL;
+  return NULL;
 }
 
 /*
@@ -3979,12 +4010,11 @@ DESCRIPTION
 */
 
 const char *
-bfd_get_reloc_code_name (code)
-     bfd_reloc_code_real_type code;
+bfd_get_reloc_code_name (bfd_reloc_code_real_type code)
 {
-  if ((int) code > (int) BFD_RELOC_UNUSED)
+  if (code > BFD_RELOC_UNUSED)
     return 0;
-  return bfd_reloc_code_real_names[(int)code];
+  return bfd_reloc_code_real_names[code];
 }
 
 /*
@@ -3993,10 +4023,10 @@ INTERNAL_FUNCTION
 
 SYNOPSIS
        bfd_boolean bfd_generic_relax_section
-        (bfd *abfd,
-         asection *section,
-         struct bfd_link_info *,
-         bfd_boolean *);
+         (bfd *abfd,
+          asection *section,
+          struct bfd_link_info *,
+          bfd_boolean *);
 
 DESCRIPTION
        Provides default handling for relaxing for back ends which
@@ -4004,11 +4034,10 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_generic_relax_section (abfd, section, link_info, again)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *section ATTRIBUTE_UNUSED;
-     struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
-     bfd_boolean *again;
+bfd_generic_relax_section (bfd *abfd ATTRIBUTE_UNUSED,
+                          asection *section ATTRIBUTE_UNUSED,
+                          struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+                          bfd_boolean *again)
 {
   *again = FALSE;
   return TRUE;
@@ -4020,7 +4049,7 @@ INTERNAL_FUNCTION
 
 SYNOPSIS
        bfd_boolean bfd_generic_gc_sections
-        (bfd *, struct bfd_link_info *);
+         (bfd *, struct bfd_link_info *);
 
 DESCRIPTION
        Provides default handling for relaxing for back ends which
@@ -4028,9 +4057,8 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_generic_gc_sections (abfd, link_info)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+bfd_generic_gc_sections (bfd *abfd ATTRIBUTE_UNUSED,
+                        struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
 {
   return TRUE;
 }
@@ -4041,7 +4069,7 @@ INTERNAL_FUNCTION
 
 SYNOPSIS
        bfd_boolean bfd_generic_merge_sections
-        (bfd *, struct bfd_link_info *);
+         (bfd *, struct bfd_link_info *);
 
 DESCRIPTION
        Provides default handling for SEC_MERGE section merging for back ends
@@ -4049,9 +4077,8 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_generic_merge_sections (abfd, link_info)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+bfd_generic_merge_sections (bfd *abfd ATTRIBUTE_UNUSED,
+                           struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
 {
   return TRUE;
 }
@@ -4061,13 +4088,13 @@ INTERNAL_FUNCTION
        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,
-            bfd_boolean relocatable,
-            asymbol **symbols);
+       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,
+          bfd_boolean relocatable,
+          asymbol **symbols);
 
 DESCRIPTION
        Provides default handling of relocation effort for back ends
@@ -4076,14 +4103,12 @@ DESCRIPTION
 */
 
 bfd_byte *
-bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
-                                           relocatable, symbols)
-     bfd *abfd;
-     struct bfd_link_info *link_info;
-     struct bfd_link_order *link_order;
-     bfd_byte *data;
-     bfd_boolean relocatable;
-     asymbol **symbols;
+bfd_generic_get_relocated_section_contents (bfd *abfd,
+                                           struct bfd_link_info *link_info,
+                                           struct bfd_link_order *link_order,
+                                           bfd_byte *data,
+                                           bfd_boolean relocatable,
+                                           asymbol **symbols)
 {
   /* Get enough memory to hold the stuff.  */
   bfd *input_bfd = link_order->u.indirect.section->owner;
@@ -4096,15 +4121,15 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
   if (reloc_size < 0)
     goto error_return;
 
-  reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
+  reloc_vector = bfd_malloc (reloc_size);
   if (reloc_vector == NULL && reloc_size != 0)
     goto error_return;
 
   /* Read in the section.  */
   if (!bfd_get_section_contents (input_bfd,
                                 input_section,
-                                (PTR) data,
-                                (bfd_vma) 0,
+                                data,
+                                0,
                                 input_section->_raw_size))
     goto error_return;
 
@@ -4122,16 +4147,15 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
   if (reloc_count > 0)
     {
       arelent **parent;
-      for (parent = reloc_vector; *parent != (arelent *) NULL;
-          parent++)
+      for (parent = reloc_vector; *parent != NULL; parent++)
        {
-         char *error_message = (char *) NULL;
+         char *error_message = NULL;
          bfd_reloc_status_type r =
            bfd_perform_relocation (input_bfd,
                                    *parent,
-                                   (PTR) data,
+                                   data,
                                    input_section,
-                                   relocatable ? abfd : (bfd *) NULL,
+                                   relocatable ? abfd : NULL,
                                    &error_message);
 
          if (relocatable)
@@ -4155,7 +4179,7 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
                    goto error_return;
                  break;
                case bfd_reloc_dangerous:
-                 BFD_ASSERT (error_message != (char *) NULL);
+                 BFD_ASSERT (error_message != NULL);
                  if (!((*link_info->callbacks->reloc_dangerous)
                        (link_info, error_message, input_bfd, input_section,
                         (*parent)->address)))
index 44edb073caa5deda4fe15fd314b655824b51e7b6..5347c2b3f8549c39eb14f9f6232547c2ae7c647f 100644 (file)
@@ -475,7 +475,7 @@ CODE_FRAGMENT
 .  file_ptr line_filepos;
 .
 .  {* Pointer to data for applications.  *}
-.  PTR userdata;
+.  void *userdata;
 .
 .  {* If the SEC_IN_MEMORY flag is set, this points to the actual
 .     contents.  *}
@@ -504,7 +504,7 @@ CODE_FRAGMENT
 .  {* What the section number is in the target world.  *}
 .  int target_index;
 .
-.  PTR used_by_bfd;
+.  void *used_by_bfd;
 .
 .  {* If this is a constructor section then here is a list of the
 .     relocations created to relocate items within it.  *}
@@ -532,18 +532,18 @@ CODE_FRAGMENT
 .#define BFD_IND_SECTION_NAME "*IND*"
 .
 .{* The absolute section.  *}
-.extern const asection bfd_abs_section;
+.extern 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;
+.extern 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;
+.extern asection bfd_com_section;
 .#define bfd_com_section_ptr ((asection *) &bfd_com_section)
 .{* Pointer to the indirect section.  *}
-.extern const asection bfd_ind_section;
+.extern asection bfd_ind_section;
 .#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
 .#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
 .
@@ -616,7 +616,7 @@ static const asymbol global_syms[] =
 
 #define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX)                                \
   const asymbol * const SYM = (asymbol *) &global_syms[IDX];           \
-  const asection SEC =                                                         \
+  asection SEC =                                                       \
     /* name, id,  index, next, flags, user_set_vma, reloc_done,      */        \
     { NAME,  IDX, 0,     NULL, FLAGS, 0,            0,                 \
                                                                        \
@@ -676,10 +676,9 @@ struct section_hash_entry
 /* Initialize an entry in the section hash table.  */
 
 struct bfd_hash_entry *
-bfd_section_hash_newfunc (entry, table, string)
-     struct bfd_hash_entry *entry;
-     struct bfd_hash_table *table;
-     const char *string;
+bfd_section_hash_newfunc (struct bfd_hash_entry *entry,
+                         struct bfd_hash_table *table,
+                         const char *string)
 {
   /* Allocate the structure if it has not already been allocated by a
      subclass.  */
@@ -694,10 +693,8 @@ bfd_section_hash_newfunc (entry, table, string)
   /* Call the allocation method of the superclass.  */
   entry = bfd_hash_newfunc (entry, table, string);
   if (entry != NULL)
-    {
-      memset ((PTR) &((struct section_hash_entry *) entry)->section,
-             0, sizeof (asection));
-    }
+    memset (&((struct section_hash_entry *) entry)->section, 0,
+           sizeof (asection));
 
   return entry;
 }
@@ -708,12 +705,8 @@ bfd_section_hash_newfunc (entry, table, string)
 
 /* Initializes a new section.  NEWSECT->NAME is already set.  */
 
-static asection *bfd_section_init PARAMS ((bfd *, asection *));
-
 static asection *
-bfd_section_init (abfd, newsect)
-     bfd *abfd;
-     asection *newsect;
+bfd_section_init (bfd *abfd, asection *newsect)
 {
   static int section_id = 0x10;  /* id 0 to 3 used by STD_SECTION.  */
 
@@ -768,13 +761,12 @@ DESCRIPTION
 */
 
 void
-bfd_section_list_clear (abfd)
-     bfd *abfd;
+bfd_section_list_clear (bfd *abfd)
 {
   abfd->sections = NULL;
   abfd->section_tail = &abfd->sections;
   abfd->section_count = 0;
-  memset ((PTR) abfd->section_htab.table, 0,
+  memset (abfd->section_htab.table, 0,
          abfd->section_htab.size * sizeof (struct bfd_hash_entry *));
 }
 
@@ -783,7 +775,7 @@ FUNCTION
        bfd_get_section_by_name
 
 SYNOPSIS
-       asection *bfd_get_section_by_name(bfd *abfd, const char *name);
+       asection *bfd_get_section_by_name (bfd *abfd, const char *name);
 
 DESCRIPTION
        Run through @var{abfd} and return the one of the
@@ -797,9 +789,7 @@ DESCRIPTION
 */
 
 asection *
-bfd_get_section_by_name (abfd, name)
-     bfd *abfd;
-     const char *name;
+bfd_get_section_by_name (bfd *abfd, const char *name)
 {
   struct section_hash_entry *sh;
 
@@ -815,9 +805,8 @@ FUNCTION
        bfd_get_unique_section_name
 
 SYNOPSIS
-       char *bfd_get_unique_section_name(bfd *abfd,
-                                         const char *templat,
-                                         int *count);
+       char *bfd_get_unique_section_name
+         (bfd *abfd, const char *templat, int *count);
 
 DESCRIPTION
        Invent a section name that is unique in @var{abfd} by tacking
@@ -828,17 +817,14 @@ DESCRIPTION
 */
 
 char *
-bfd_get_unique_section_name (abfd, templat, count)
-     bfd *abfd;
-     const char *templat;
-     int *count;
+bfd_get_unique_section_name (bfd *abfd, const char *templat, int *count)
 {
   int num;
   unsigned int len;
   char *sname;
 
   len = strlen (templat);
-  sname = bfd_malloc ((bfd_size_type) len + 8);
+  sname = bfd_malloc (len + 8);
   if (sname == NULL)
     return NULL;
   memcpy (sname, templat, len);
@@ -865,7 +851,7 @@ FUNCTION
        bfd_make_section_old_way
 
 SYNOPSIS
-       asection *bfd_make_section_old_way(bfd *abfd, const char *name);
+       asection *bfd_make_section_old_way (bfd *abfd, const char *name);
 
 DESCRIPTION
        Create a new empty section called @var{name}
@@ -886,9 +872,7 @@ DESCRIPTION
 */
 
 asection *
-bfd_make_section_old_way (abfd, name)
-     bfd *abfd;
-     const char *name;
+bfd_make_section_old_way (bfd *abfd, const char *name)
 {
   struct section_hash_entry *sh;
   asection *newsect;
@@ -931,7 +915,7 @@ FUNCTION
        bfd_make_section_anyway
 
 SYNOPSIS
-       asection *bfd_make_section_anyway(bfd *abfd, const char *name);
+       asection *bfd_make_section_anyway (bfd *abfd, const char *name);
 
 DESCRIPTION
    Create a new empty section called @var{name} and attach it to the end of
@@ -944,9 +928,7 @@ DESCRIPTION
 */
 
 sec_ptr
-bfd_make_section_anyway (abfd, name)
-     bfd *abfd;
-     const char *name;
+bfd_make_section_anyway (bfd *abfd, const char *name)
 {
   struct section_hash_entry *sh;
   asection *newsect;
@@ -968,7 +950,7 @@ bfd_make_section_anyway (abfd, name)
         section_htab without generating a unique section name and
         that would be pointless;  We don't need to traverse the
         hash table.  */
-      newsect = (asection *) bfd_zalloc (abfd, sizeof (asection));
+      newsect = bfd_zalloc (abfd, sizeof (asection));
       if (newsect == NULL)
        return NULL;
     }
@@ -982,7 +964,7 @@ FUNCTION
        bfd_make_section
 
 SYNOPSIS
-       asection *bfd_make_section(bfd *, const char *name);
+       asection *bfd_make_section (bfd *, const char *name);
 
 DESCRIPTION
    Like <<bfd_make_section_anyway>>, but return <<NULL>> (without calling
@@ -992,9 +974,7 @@ DESCRIPTION
 */
 
 asection *
-bfd_make_section (abfd, name)
-     bfd *abfd;
-     const char *name;
+bfd_make_section (bfd *abfd, const char *name)
 {
   struct section_hash_entry *sh;
   asection *newsect;
@@ -1019,7 +999,7 @@ bfd_make_section (abfd, name)
   if (newsect->name != NULL)
     {
       /* Section already exists.  */
-      return newsect;
+      return NULL;
     }
 
   newsect->name = name;
@@ -1031,7 +1011,8 @@ FUNCTION
        bfd_set_section_flags
 
 SYNOPSIS
-       bfd_boolean bfd_set_section_flags (bfd *abfd, asection *sec, flagword flags);
+       bfd_boolean bfd_set_section_flags
+         (bfd *abfd, asection *sec, flagword flags);
 
 DESCRIPTION
        Set the attributes of the section @var{sec} in the BFD
@@ -1047,10 +1028,9 @@ DESCRIPTION
 
 /*ARGSUSED*/
 bfd_boolean
-bfd_set_section_flags (abfd, section, flags)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     sec_ptr section;
-     flagword flags;
+bfd_set_section_flags (bfd *abfd ATTRIBUTE_UNUSED,
+                      sec_ptr section,
+                      flagword flags)
 {
 #if 0
   /* If you try to copy a text section from an input file (where it
@@ -1074,34 +1054,32 @@ FUNCTION
        bfd_map_over_sections
 
 SYNOPSIS
-       void bfd_map_over_sections(bfd *abfd,
-                                  void (*func) (bfd *abfd,
-                                               asection *sect,
-                                               PTR obj),
-                                  PTR obj);
+       void bfd_map_over_sections
+         (bfd *abfd,
+          void (*func) (bfd *abfd, asection *sect, void *obj),
+          void *obj);
 
 DESCRIPTION
        Call the provided function @var{func} for each section
        attached to the BFD @var{abfd}, passing @var{obj} as an
        argument. The function will be called as if by
 
-|      func(abfd, the_section, obj);
+|      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, ...)
+|            func (abfd, p, ...)
 
 */
 
 /*VARARGS2*/
 void
-bfd_map_over_sections (abfd, operation, user_storage)
-     bfd *abfd;
-     void (*operation) PARAMS ((bfd * abfd, asection * sect, PTR obj));
-     PTR user_storage;
+bfd_map_over_sections (bfd *abfd,
+                      void (*operation) (bfd *, asection *, void *),
+                      void *user_storage)
 {
   asection *sect;
   unsigned int i = 0;
@@ -1118,7 +1096,8 @@ FUNCTION
        bfd_set_section_size
 
 SYNOPSIS
-       bfd_boolean bfd_set_section_size (bfd *abfd, asection *sec, bfd_size_type val);
+       bfd_boolean bfd_set_section_size
+         (bfd *abfd, asection *sec, bfd_size_type val);
 
 DESCRIPTION
        Set @var{sec} to the size @var{val}. If the operation is
@@ -1131,10 +1110,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_set_section_size (abfd, ptr, val)
-     bfd *abfd;
-     sec_ptr ptr;
-     bfd_size_type val;
+bfd_set_section_size (bfd *abfd, sec_ptr ptr, bfd_size_type val)
 {
   /* Once you've started writing to any section you cannot create or change
      the size of any others.  */
@@ -1156,9 +1132,9 @@ FUNCTION
        bfd_set_section_contents
 
 SYNOPSIS
-       bfd_boolean bfd_set_section_contents (bfd *abfd, asection *section,
-                                             PTR data, file_ptr offset,
-                                             bfd_size_type count);
+       bfd_boolean bfd_set_section_contents
+         (bfd *abfd, asection *section, void *data, file_ptr offset,
+          bfd_size_type count);
 
 DESCRIPTION
        Sets the contents of the section @var{section} in BFD
@@ -1178,18 +1154,17 @@ DESCRIPTION
 
 */
 
-#define bfd_get_section_size_now(abfd,sec) \
-(sec->reloc_done \
- ? bfd_get_section_size_after_reloc (sec) \
- : bfd_get_section_size_before_reloc (sec))
+#define bfd_get_section_size_now(abfd, sec) \
+  (sec->reloc_done \
  ? bfd_get_section_size_after_reloc (sec) \
  : bfd_get_section_size_before_reloc (sec))
 
 bfd_boolean
-bfd_set_section_contents (abfd, section, location, offset, count)
-     bfd *abfd;
-     sec_ptr section;
-     PTR location;
-     file_ptr offset;
-     bfd_size_type count;
+bfd_set_section_contents (bfd *abfd,
+                         sec_ptr section,
+                         void *location,
+                         file_ptr offset,
+                         bfd_size_type count)
 {
   bfd_size_type sz;
 
@@ -1229,7 +1204,7 @@ bfd_set_section_contents (abfd, section, location, offset, count)
 
   /* Record a copy of the data in memory if desired.  */
   if (section->contents
-      && location != (PTR) (section->contents + offset))
+      && location != section->contents + offset)
     memcpy (section->contents + offset, location, (size_t) count);
 
   if (BFD_SEND (abfd, _bfd_set_section_contents,
@@ -1247,9 +1222,9 @@ FUNCTION
        bfd_get_section_contents
 
 SYNOPSIS
-       bfd_boolean bfd_get_section_contents (bfd *abfd, asection *section,
-                                             PTR location, file_ptr offset,
-                                             bfd_size_type count);
+       bfd_boolean bfd_get_section_contents
+         (bfd *abfd, asection *section, void *location, file_ptr offset,
+          bfd_size_type count);
 
 DESCRIPTION
        Read data from @var{section} in BFD @var{abfd}
@@ -1265,12 +1240,11 @@ DESCRIPTION
 
 */
 bfd_boolean
-bfd_get_section_contents (abfd, section, location, offset, count)
-     bfd *abfd;
-     sec_ptr section;
-     PTR location;
-     file_ptr offset;
-     bfd_size_type count;
+bfd_get_section_contents (bfd *abfd,
+                         sec_ptr section,
+                         void *location,
+                         file_ptr offset,
+                         bfd_size_type count)
 {
   bfd_size_type sz;
 
@@ -1317,8 +1291,8 @@ FUNCTION
        bfd_copy_private_section_data
 
 SYNOPSIS
-       bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec,
-                                                  bfd *obfd, asection *osec);
+       bfd_boolean bfd_copy_private_section_data
+         (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
 
 DESCRIPTION
        Copy private section information from @var{isec} in the BFD
@@ -1340,7 +1314,7 @@ FUNCTION
 
 SYNOPSIS
        void _bfd_strip_section_from_output
-       (struct bfd_link_info *info, asection *section);
+         (struct bfd_link_info *info, asection *section);
 
 DESCRIPTION
        Remove @var{section} from the output.  If the output section
@@ -1351,9 +1325,7 @@ DESCRIPTION
        to remove sections.
 */
 void
-_bfd_strip_section_from_output (info, s)
-     struct bfd_link_info *info;
-     asection *s;
+_bfd_strip_section_from_output (struct bfd_link_info *info, asection *s)
 {
   asection *os;
   asection *is;
@@ -1392,9 +1364,8 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_generic_discard_group (abfd, group)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *group ATTRIBUTE_UNUSED;
+bfd_generic_discard_group (bfd *abfd ATTRIBUTE_UNUSED,
+                          asection *group ATTRIBUTE_UNUSED)
 {
   return TRUE;
 }
index 0042e60a3f5608d331f54c4f17faf38468d26c7f..256fd913b851715afccf703b93a835ae80351502 100644 (file)
 #include "libbfd.h"
 #include "bfdlink.h"
 
-static bfd_boolean simple_dummy_warning
-  PARAMS ((struct bfd_link_info *, const char *, const char *, bfd *,
-          asection *, bfd_vma));
-
-static bfd_boolean simple_dummy_undefined_symbol
-  PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *,
-          bfd_vma, bfd_boolean));
-
-static bfd_boolean simple_dummy_reloc_overflow
-  PARAMS ((struct bfd_link_info *, const char *, const char *, bfd_vma,
-          bfd *, asection *, bfd_vma));
-
-static bfd_boolean simple_dummy_reloc_dangerous
-  PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma));
-
-static bfd_boolean simple_dummy_unattached_reloc
-  PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma));
-
-static void simple_save_output_info
-  PARAMS ((bfd *, asection *, PTR));
-
-static void simple_restore_output_info
-  PARAMS ((bfd *, asection *, PTR));
-
-bfd_byte * bfd_simple_get_relocated_section_contents
-  PARAMS ((bfd *, asection *, bfd_byte *, asymbol **));
-
 static bfd_boolean
-simple_dummy_warning (link_info, warning, symbol, abfd, section, address)
-     struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
-     const char *warning ATTRIBUTE_UNUSED;
-     const char *symbol ATTRIBUTE_UNUSED;
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *section ATTRIBUTE_UNUSED;
-     bfd_vma address ATTRIBUTE_UNUSED;
+simple_dummy_warning (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+                     const char *warning ATTRIBUTE_UNUSED,
+                     const char *symbol ATTRIBUTE_UNUSED,
+                     bfd *abfd ATTRIBUTE_UNUSED,
+                     asection *section ATTRIBUTE_UNUSED,
+                     bfd_vma address ATTRIBUTE_UNUSED)
 {
   return TRUE;
 }
 
 static bfd_boolean
-simple_dummy_undefined_symbol (link_info, name, abfd, section, address, fatal)
-     struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
-     const char *name ATTRIBUTE_UNUSED;
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *section ATTRIBUTE_UNUSED;
-     bfd_vma address ATTRIBUTE_UNUSED;
-     bfd_boolean fatal ATTRIBUTE_UNUSED;
+simple_dummy_undefined_symbol (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+                              const char *name ATTRIBUTE_UNUSED,
+                              bfd *abfd ATTRIBUTE_UNUSED,
+                              asection *section ATTRIBUTE_UNUSED,
+                              bfd_vma address ATTRIBUTE_UNUSED,
+                              bfd_boolean fatal ATTRIBUTE_UNUSED)
 {
   return TRUE;
 }
 
 static bfd_boolean
-simple_dummy_reloc_overflow (link_info, name, reloc_name, addend, abfd,
-                            section, address)
-     struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
-     const char *name ATTRIBUTE_UNUSED;
-     const char *reloc_name ATTRIBUTE_UNUSED;
-     bfd_vma addend ATTRIBUTE_UNUSED;
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *section ATTRIBUTE_UNUSED;
-     bfd_vma address ATTRIBUTE_UNUSED;
+simple_dummy_reloc_overflow (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+                            const char *name ATTRIBUTE_UNUSED,
+                            const char *reloc_name ATTRIBUTE_UNUSED,
+                            bfd_vma addend ATTRIBUTE_UNUSED,
+                            bfd *abfd ATTRIBUTE_UNUSED,
+                            asection *section ATTRIBUTE_UNUSED,
+                            bfd_vma address ATTRIBUTE_UNUSED)
 {
   return TRUE;
 }
 
 static bfd_boolean
-simple_dummy_reloc_dangerous (link_info, message, abfd, section, address)
-     struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
-     const char *message ATTRIBUTE_UNUSED;
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *section ATTRIBUTE_UNUSED;
-     bfd_vma address ATTRIBUTE_UNUSED;
+simple_dummy_reloc_dangerous (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+                             const char *message ATTRIBUTE_UNUSED,
+                             bfd *abfd ATTRIBUTE_UNUSED,
+                             asection *section ATTRIBUTE_UNUSED,
+                             bfd_vma address ATTRIBUTE_UNUSED)
 {
   return TRUE;
 }
 
 static bfd_boolean
-simple_dummy_unattached_reloc (link_info, name, abfd, section, address)
-     struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
-     const char *name ATTRIBUTE_UNUSED;
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *section ATTRIBUTE_UNUSED;
-     bfd_vma address ATTRIBUTE_UNUSED;
+simple_dummy_unattached_reloc (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+                              const char *name ATTRIBUTE_UNUSED,
+                              bfd *abfd ATTRIBUTE_UNUSED,
+                              asection *section ATTRIBUTE_UNUSED,
+                              bfd_vma address ATTRIBUTE_UNUSED)
 {
   return TRUE;
 }
@@ -118,12 +85,11 @@ struct saved_output_info
 };
 
 static void
-simple_save_output_info (abfd, section, ptr)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *section;
-     PTR ptr;
+simple_save_output_info (bfd *abfd ATTRIBUTE_UNUSED,
+                        asection *section,
+                        void *ptr)
 {
-  struct saved_output_info *output_info = (struct saved_output_info *) ptr;
+  struct saved_output_info *output_info = ptr;
   output_info[section->index].offset = section->output_offset;
   output_info[section->index].section = section->output_section;
   section->output_offset = 0;
@@ -131,12 +97,11 @@ simple_save_output_info (abfd, section, ptr)
 }
 
 static void
-simple_restore_output_info (abfd, section, ptr)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     asection *section;
-     PTR ptr;
+simple_restore_output_info (bfd *abfd ATTRIBUTE_UNUSED,
+                           asection *section,
+                           void *ptr)
 {
-  struct saved_output_info *output_info = (struct saved_output_info *) ptr;
+  struct saved_output_info *output_info = ptr;
   section->output_offset = output_info[section->index].offset;
   section->output_section = output_info[section->index].section;
 }
@@ -146,7 +111,8 @@ FUNCTION
        bfd_simple_relocate_secton
 
 SYNOPSIS
-       bfd_byte *bfd_simple_get_relocated_section_contents (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
+       bfd_byte *bfd_simple_get_relocated_section_contents
+         (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
 
 DESCRIPTION
        Returns the relocated contents of section @var{sec}.  The symbols in
@@ -163,18 +129,17 @@ DESCRIPTION
 */
 
 bfd_byte *
-bfd_simple_get_relocated_section_contents (abfd, sec, outbuf, symbol_table)
-     bfd *abfd;
-     asection *sec;
-     bfd_byte *outbuf;
-     asymbol **symbol_table;
+bfd_simple_get_relocated_section_contents (bfd *abfd,
+                                          asection *sec,
+                                          bfd_byte *outbuf,
+                                          asymbol **symbol_table)
 {
   struct bfd_link_info link_info;
   struct bfd_link_order link_order;
   struct bfd_link_callbacks callbacks;
   bfd_byte *contents, *data;
   int storage_needed;
-  PTR saved_offsets;
+  void *saved_offsets;
 
   if (! (sec->flags & SEC_RELOC))
     {
@@ -246,7 +211,7 @@ bfd_simple_get_relocated_section_contents (abfd, sec, outbuf, symbol_table)
       _bfd_generic_link_add_symbols (abfd, &link_info);
 
       storage_needed = bfd_get_symtab_upper_bound (abfd);
-      symbol_table = (asymbol **) bfd_malloc (storage_needed);
+      symbol_table = bfd_malloc (storage_needed);
       bfd_canonicalize_symtab (abfd, symbol_table);
     }
   else
index d0ffcc727e3e674cd8c430084c3602a01ec2efa1..33fd9fdfd2e2be4791200b95f148c3ccb9a5c45e 100644 (file)
@@ -77,7 +77,7 @@ SUBSECTION
 |        if (storage_needed == 0)
 |          return;
 |        
-|        symbol_table = (asymbol **) xmalloc (storage_needed);
+|        symbol_table = xmalloc (storage_needed);
 |          ...
 |        number_of_symbols =
 |           bfd_canonicalize_symtab (abfd, symbol_table);
@@ -122,7 +122,7 @@ SUBSECTION
 |        new->value = 0x12345;
 |
 |        ptrs[0] = new;
-|        ptrs[1] = (asymbol *)0;
+|        ptrs[1] = 0;
 |
 |        bfd_set_symtab (abfd, ptrs, 1);
 |        bfd_close (abfd);
@@ -298,7 +298,7 @@ CODE_FRAGMENT
 .  {* Back end special data.  *}
 .  union
 .    {
-.      PTR p;
+.      void *p;
 .      bfd_vma i;
 .    }
 .  udata;
@@ -314,10 +314,6 @@ CODE_FRAGMENT
 #include "bfdlink.h"
 #include "aout/stab_gnu.h"
 
-static char coff_section_type PARAMS ((const char *));
-static char decode_section_type PARAMS ((const struct sec *));
-static int cmpindexentry PARAMS ((const PTR, const PTR));
-
 /*
 DOCDD
 INODE
@@ -354,9 +350,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_is_local_label (abfd, sym)
-     bfd *abfd;
-     asymbol *sym;
+bfd_is_local_label (bfd *abfd, asymbol *sym)
 {
   /* The BSF_SECTION_SYM check is needed for IA-64, where every label that
      starts with '.' is local.  This would accidentally catch section names
@@ -382,7 +376,7 @@ DESCRIPTION
        local label.
 
 .#define bfd_is_local_label_name(abfd, name) \
-.     BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
+.  BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
 .
 */
 
@@ -398,8 +392,7 @@ DESCRIPTION
        including the NULL.
 
 .#define bfd_canonicalize_symtab(abfd, location) \
-.     BFD_SEND (abfd, _bfd_canonicalize_symtab,\
-.                  (abfd, location))
+.  BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
 .
 */
 
@@ -408,7 +401,8 @@ FUNCTION
        bfd_set_symtab
 
 SYNOPSIS
-       bfd_boolean bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count);
+       bfd_boolean bfd_set_symtab
+         (bfd *abfd, asymbol **location, unsigned int count);
 
 DESCRIPTION
        Arrange that when the output BFD @var{abfd} is closed,
@@ -417,12 +411,9 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_set_symtab (abfd, location, symcount)
-     bfd *abfd;
-     asymbol **location;
-     unsigned int symcount;
+bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int symcount)
 {
-  if ((abfd->format != bfd_object) || (bfd_read_p (abfd)))
+  if (abfd->format != bfd_object || bfd_read_p (abfd))
     {
       bfd_set_error (bfd_error_invalid_operation);
       return FALSE;
@@ -438,25 +429,21 @@ FUNCTION
        bfd_print_symbol_vandf
 
 SYNOPSIS
-       void bfd_print_symbol_vandf (bfd *abfd, PTR file, asymbol *symbol);
+       void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
 
 DESCRIPTION
        Print the value and flags of the @var{symbol} supplied to the
        stream @var{file}.
 */
 void
-bfd_print_symbol_vandf (abfd, arg, symbol)
-     bfd *abfd;
-     PTR arg;
-     asymbol *symbol;
+bfd_print_symbol_vandf (bfd *abfd, void *arg, asymbol *symbol)
 {
-  FILE *file = (FILE *) arg;
+  FILE *file = arg;
 
   flagword type = symbol->flags;
 
-  if (symbol->section != (asection *) NULL)
-    bfd_fprintf_vma (abfd, file,
-                    symbol->value + symbol->section->vma);
+  if (symbol->section != NULL)
+    bfd_fprintf_vma (abfd, file, symbol->value + symbol->section->vma);
   else
     bfd_fprintf_vma (abfd, file, symbol->value);
 
@@ -493,7 +480,7 @@ DESCRIPTION
        information, and will cause problems later on.
 
 .#define bfd_make_empty_symbol(abfd) \
-.     BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
+.  BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
 .
 */
 
@@ -502,7 +489,7 @@ FUNCTION
        _bfd_generic_make_empty_symbol
 
 SYNOPSIS
-       asymbol * _bfd_generic_make_empty_symbol (bfd *);
+       asymbol *_bfd_generic_make_empty_symbol (bfd *);
 
 DESCRIPTION
        Create a new <<asymbol>> structure for the BFD @var{abfd}
@@ -512,11 +499,10 @@ DESCRIPTION
 */
 
 asymbol *
-_bfd_generic_make_empty_symbol (abfd)
-     bfd *abfd;
+_bfd_generic_make_empty_symbol (bfd *abfd)
 {
   bfd_size_type amt = sizeof (asymbol);
-  asymbol *new = (asymbol *) bfd_zalloc (abfd, amt);
+  asymbol *new = bfd_zalloc (abfd, amt);
   if (new)
     new->the_bfd = abfd;
   return new;
@@ -532,7 +518,7 @@ DESCRIPTION
        yet to be worked out.
 
 .#define bfd_make_debug_symbol(abfd,ptr,size) \
-.        BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
+.  BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
 .
 */
 
@@ -576,8 +562,7 @@ static const struct section_to_type stt[] =
    't' as well as .text */
 
 static char
-coff_section_type (s)
-     const char *s;
+coff_section_type (const char *s)
 {
   const struct section_to_type *t;
 
@@ -596,8 +581,7 @@ coff_section_type (s)
    we could perhaps obsolete coff_section_type.  */
 
 static char
-decode_section_type (section)
-     const struct sec *section;
+decode_section_type (const struct sec *section)
 {
   if (section->flags & SEC_CODE)
     return 't';
@@ -619,8 +603,7 @@ decode_section_type (section)
     }
   if (section->flags & SEC_DEBUGGING)
     return 'N';
-  if ((section->flags & SEC_HAS_CONTENTS) &&
-      (section->flags & SEC_READONLY))
+  if ((section->flags & SEC_HAS_CONTENTS) && (section->flags & SEC_READONLY))
     return 'n';
 
   return '?';
@@ -638,8 +621,7 @@ SYNOPSIS
        int bfd_decode_symclass (asymbol *symbol);
 */
 int
-bfd_decode_symclass (symbol)
-     asymbol *symbol;
+bfd_decode_symclass (asymbol *symbol)
 {
   char c;
 
@@ -711,8 +693,7 @@ SYNOPSIS
 */
 
 bfd_boolean
-bfd_is_undefined_symclass (symclass)
-     int symclass;
+bfd_is_undefined_symclass (int symclass)
 {
   return symclass == 'U' || symclass == 'w' || symclass == 'v';
 }
@@ -731,9 +712,7 @@ SYNOPSIS
 */
 
 void
-bfd_symbol_info (symbol, ret)
-     asymbol *symbol;
-     symbol_info *ret;
+bfd_symbol_info (asymbol *symbol, symbol_info *ret)
 {
   ret->type = bfd_decode_symclass (symbol);
 
@@ -750,7 +729,8 @@ FUNCTION
        bfd_copy_private_symbol_data
 
 SYNOPSIS
-       bfd_boolean bfd_copy_private_symbol_data (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
+       bfd_boolean bfd_copy_private_symbol_data
+         (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
 
 DESCRIPTION
        Copy private symbol information from @var{isym} in the BFD
@@ -762,8 +742,8 @@ DESCRIPTION
        Not enough memory exists to create private data for @var{osec}.
 
 .#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
-.     BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
-.              (ibfd, isymbol, obfd, osymbol))
+.  BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
+.            (ibfd, isymbol, obfd, osymbol))
 .
 */
 
@@ -772,11 +752,10 @@ DESCRIPTION
    version.  It just uses BFD asymbol structures as mini symbols.  */
 
 long
-_bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep)
-     bfd *abfd;
-     bfd_boolean dynamic;
-     PTR *minisymsp;
-     unsigned int *sizep;
+_bfd_generic_read_minisymbols (bfd *abfd,
+                              bfd_boolean dynamic,
+                              void **minisymsp,
+                              unsigned int *sizep)
 {
   long storage;
   asymbol **syms = NULL;
@@ -791,7 +770,7 @@ _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep)
   if (storage == 0)
     return 0;
 
-  syms = (asymbol **) bfd_malloc ((bfd_size_type) storage);
+  syms = bfd_malloc (storage);
   if (syms == NULL)
     goto error_return;
 
@@ -802,7 +781,7 @@ _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep)
   if (symcount < 0)
     goto error_return;
 
-  *minisymsp = (PTR) syms;
+  *minisymsp = syms;
   *sizep = sizeof (asymbol *);
   return symcount;
 
@@ -818,11 +797,10 @@ _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep)
    we just return the asymbol the minisymbol points to.  */
 
 asymbol *
-_bfd_generic_minisymbol_to_symbol (abfd, dynamic, minisym, sym)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_boolean dynamic ATTRIBUTE_UNUSED;
-     const PTR minisym;
-     asymbol *sym ATTRIBUTE_UNUSED;
+_bfd_generic_minisymbol_to_symbol (bfd *abfd ATTRIBUTE_UNUSED,
+                                  bfd_boolean dynamic ATTRIBUTE_UNUSED,
+                                  const void *minisym,
+                                  asymbol *sym ATTRIBUTE_UNUSED)
 {
   return *(asymbol **) minisym;
 }
@@ -857,12 +835,10 @@ struct indexentry
 /* Compare two indexentry structures.  This is called via qsort.  */
 
 static int
-cmpindexentry (a, b)
-     const PTR a;
-     const PTR b;
+cmpindexentry (const void *a, const void *b)
 {
-  const struct indexentry *contestantA = (const struct indexentry *) a;
-  const struct indexentry *contestantB = (const struct indexentry *) b;
+  const struct indexentry *contestantA = a;
+  const struct indexentry *contestantB = b;
 
   if (contestantA->val < contestantB->val)
     return -1;
@@ -903,17 +879,15 @@ struct stab_find_info
 };
 
 bfd_boolean
-_bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
-                                    pfilename, pfnname, pline, pinfo)
-     bfd *abfd;
-     asymbol **symbols;
-     asection *section;
-     bfd_vma offset;
-     bfd_boolean *pfound;
-     const char **pfilename;
-     const char **pfnname;
-     unsigned int *pline;
-     PTR *pinfo;
+_bfd_stab_section_find_nearest_line (bfd *abfd,
+                                    asymbol **symbols,
+                                    asection *section,
+                                    bfd_vma offset,
+                                    bfd_boolean *pfound,
+                                    const char **pfilename,
+                                    const char **pfnname,
+                                    unsigned int *pline,
+                                    void **pinfo)
 {
   struct stab_find_info *info;
   bfd_size_type stabsize, strsize;
@@ -951,7 +925,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
 #define VALOFF (8)
 #define STABSIZE (12)
 
-  info = (struct stab_find_info *) *pinfo;
+  info = *pinfo;
   if (info != NULL)
     {
       if (info->stabsec == NULL || info->strsec == NULL)
@@ -972,7 +946,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
       char *function_name;
       bfd_size_type amt = sizeof *info;
 
-      info = (struct stab_find_info *) bfd_zalloc (abfd, amt);
+      info = bfd_zalloc (abfd, amt);
       if (info == NULL)
        return FALSE;
 
@@ -987,15 +961,15 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
        {
          /* No stabs debugging information.  Set *pinfo so that we
              can return quickly in the info != NULL case above.  */
-         *pinfo = (PTR) info;
+         *pinfo = info;
          return TRUE;
        }
 
       stabsize = info->stabsec->_raw_size;
       strsize = info->strsec->_raw_size;
 
-      info->stabs = (bfd_byte *) bfd_alloc (abfd, stabsize);
-      info->strs = (bfd_byte *) bfd_alloc (abfd, strsize);
+      info->stabs = bfd_alloc (abfd, stabsize);
+      info->strs = bfd_alloc (abfd, strsize);
       if (info->stabs == NULL || info->strs == NULL)
        return FALSE;
 
@@ -1012,7 +986,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
       reloc_size = bfd_get_reloc_upper_bound (abfd, info->stabsec);
       if (reloc_size < 0)
        return FALSE;
-      reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
+      reloc_vector = bfd_malloc (reloc_size);
       if (reloc_vector == NULL && reloc_size != 0)
        return FALSE;
       reloc_count = bfd_canonicalize_reloc (abfd, info->stabsec, reloc_vector,
@@ -1105,7 +1079,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
 
       amt = info->indextablesize;
       amt *= sizeof (struct indexentry);
-      info->indextable = (struct indexentry *) bfd_alloc (abfd, amt);
+      info->indextable = bfd_alloc (abfd, amt);
       if (info->indextable == NULL)
        return FALSE;
 
@@ -1226,7 +1200,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
       qsort (info->indextable, (size_t) i, sizeof (struct indexentry),
             cmpindexentry);
 
-      *pinfo = (PTR) info;
+      *pinfo = info;
     }
 
   /* We are passed a section relative offset.  The offsets in the
@@ -1360,7 +1334,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
          if (info->filename != NULL)
            free (info->filename);
          len = strlen (file_name) + 1;
-         info->filename = (char *) bfd_malloc ((bfd_size_type) dirlen + len);
+         info->filename = bfd_malloc (dirlen + len);
          if (info->filename == NULL)
            return FALSE;
          memcpy (info->filename, directory_name, dirlen);
index 5ccae2a9928fce88c655cef36dc1753e7947532c..0ce77a935bc23c0380333583398901cb12c1f376 100644 (file)
@@ -103,7 +103,7 @@ DESCRIPTION
        someone wants to fix this and not break the above, please do.
 
 .#define BFD_SEND(bfd, message, arglist) \
-.               ((*((bfd)->xvec->message)) arglist)
+.  ((*((bfd)->xvec->message)) arglist)
 .
 .#ifdef DEBUG_BFD_SEND
 .#undef BFD_SEND
@@ -116,7 +116,7 @@ DESCRIPTION
        For operations which index on the BFD format:
 
 .#define BFD_SEND_FMT(bfd, message, arglist) \
-.            (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
+.  (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
 .
 .#ifdef DEBUG_BFD_SEND
 .#undef BFD_SEND_FMT
@@ -203,264 +203,266 @@ DESCRIPTION
 .  {* 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 *));
+.  bfd_vma        (*bfd_getx64) (const bfd_byte *);
+.  bfd_signed_vma (*bfd_getx_signed_64) (const bfd_byte *);
+.  void           (*bfd_putx64) (bfd_vma, bfd_byte *);
+.  bfd_vma        (*bfd_getx32) (const bfd_byte *);
+.  bfd_signed_vma (*bfd_getx_signed_32) (const bfd_byte *);
+.  void           (*bfd_putx32) (bfd_vma, bfd_byte *);
+.  bfd_vma        (*bfd_getx16) (const bfd_byte *);
+.  bfd_signed_vma (*bfd_getx_signed_16) (const bfd_byte *);
+.  void           (*bfd_putx16) (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 *));
+.  bfd_vma        (*bfd_h_getx64) (const bfd_byte *);
+.  bfd_signed_vma (*bfd_h_getx_signed_64) (const bfd_byte *);
+.  void           (*bfd_h_putx64) (bfd_vma, bfd_byte *);
+.  bfd_vma        (*bfd_h_getx32) (const bfd_byte *);
+.  bfd_signed_vma (*bfd_h_getx_signed_32) (const bfd_byte *);
+.  void           (*bfd_h_putx32) (bfd_vma, bfd_byte *);
+.  bfd_vma        (*bfd_h_getx16) (const bfd_byte *);
+.  bfd_signed_vma (*bfd_h_getx_signed_16) (const bfd_byte *);
+.  void           (*bfd_h_putx16) (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 *));
+.  const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *);
 .
 .  {* Set the format of a file being written.  *}
-.  bfd_boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
+.  bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
 .
 .  {* Write cached information into a file being written, at <<bfd_close>>.  *}
-.  bfd_boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
+.  bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
 .
 The general target vector.  These vectors are initialized using the
 BFD_JUMP_TABLE macros.
 .
 .  {* Generic entry points.  *}
-Do not "beautify" the CONCAT* macro args.  Traditional C will not
-remove whitespace added here, and thus will fail to concatenate
-the tokens.
 .#define BFD_JUMP_TABLE_GENERIC(NAME) \
-.CONCAT2 (NAME,_close_and_cleanup), \
-.CONCAT2 (NAME,_bfd_free_cached_info), \
-.CONCAT2 (NAME,_new_section_hook), \
-.CONCAT2 (NAME,_get_section_contents), \
-.CONCAT2 (NAME,_get_section_contents_in_window)
+.  NAME##_close_and_cleanup, \
+.  NAME##_bfd_free_cached_info, \
+.  NAME##_new_section_hook, \
+.  NAME##_get_section_contents, \
+.  NAME##_get_section_contents_in_window
 .
 .  {* Called when the BFD is being closed to do any necessary cleanup.  *}
-.  bfd_boolean (*_close_and_cleanup) PARAMS ((bfd *));
+.  bfd_boolean (*_close_and_cleanup) (bfd *);
 .  {* Ask the BFD to free all cached information.  *}
-.  bfd_boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
+.  bfd_boolean (*_bfd_free_cached_info) (bfd *);
 .  {* Called when a new section is created.  *}
-.  bfd_boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
+.  bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
 .  {* Read the contents of a section.  *}
 .  bfd_boolean (*_bfd_get_section_contents)
-.    PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+.    (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
 .  bfd_boolean (*_bfd_get_section_contents_in_window)
-.    PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type));
+.    (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type);
 .
 .  {* Entry points to copy private data.  *}
 .#define BFD_JUMP_TABLE_COPY(NAME) \
-.CONCAT2 (NAME,_bfd_copy_private_bfd_data), \
-.CONCAT2 (NAME,_bfd_merge_private_bfd_data), \
-.CONCAT2 (NAME,_bfd_copy_private_section_data), \
-.CONCAT2 (NAME,_bfd_copy_private_symbol_data), \
-.CONCAT2 (NAME,_bfd_set_private_flags), \
-.CONCAT2 (NAME,_bfd_print_private_bfd_data) \
+.  NAME##_bfd_copy_private_bfd_data, \
+.  NAME##_bfd_merge_private_bfd_data, \
+.  NAME##_bfd_copy_private_section_data, \
+.  NAME##_bfd_copy_private_symbol_data, \
+.  NAME##_bfd_set_private_flags, \
+.  NAME##_bfd_print_private_bfd_data
+.
 .  {* Called to copy BFD general private data from one object file
 .     to another.  *}
-.  bfd_boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
+.  bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
 .  {* Called to merge BFD general private data from one object file
 .     to a common output file when linking.  *}
-.  bfd_boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
+.  bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
 .  {* Called to copy BFD private section data from one object file
 .     to another.  *}
 .  bfd_boolean (*_bfd_copy_private_section_data)
-.    PARAMS ((bfd *, sec_ptr, bfd *, sec_ptr));
+.    (bfd *, sec_ptr, bfd *, sec_ptr);
 .  {* Called to copy BFD private symbol data from one symbol
 .     to another.  *}
 .  bfd_boolean (*_bfd_copy_private_symbol_data)
-.    PARAMS ((bfd *, asymbol *, bfd *, asymbol *));
+.    (bfd *, asymbol *, bfd *, asymbol *);
 .  {* Called to set private backend flags.  *}
-.  bfd_boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
+.  bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
 .
 .  {* Called to print private BFD data.  *}
-.  bfd_boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
+.  bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
 .
 .  {* Core file entry points.  *}
 .#define BFD_JUMP_TABLE_CORE(NAME) \
-.CONCAT2 (NAME,_core_file_failing_command), \
-.CONCAT2 (NAME,_core_file_failing_signal), \
-.CONCAT2 (NAME,_core_file_matches_executable_p)
-.  char *      (*_core_file_failing_command) PARAMS ((bfd *));
-.  int         (*_core_file_failing_signal) PARAMS ((bfd *));
-.  bfd_boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
+.  NAME##_core_file_failing_command, \
+.  NAME##_core_file_failing_signal, \
+.  NAME##_core_file_matches_executable_p
+.
+.  char *      (*_core_file_failing_command) (bfd *);
+.  int         (*_core_file_failing_signal) (bfd *);
+.  bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
 .
 .  {* Archive entry points.  *}
 .#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
-.CONCAT2 (NAME,_slurp_armap), \
-.CONCAT2 (NAME,_slurp_extended_name_table), \
-.CONCAT2 (NAME,_construct_extended_name_table), \
-.CONCAT2 (NAME,_truncate_arname), \
-.CONCAT2 (NAME,_write_armap), \
-.CONCAT2 (NAME,_read_ar_hdr), \
-.CONCAT2 (NAME,_openr_next_archived_file), \
-.CONCAT2 (NAME,_get_elt_at_index), \
-.CONCAT2 (NAME,_generic_stat_arch_elt), \
-.CONCAT2 (NAME,_update_armap_timestamp)
-.  bfd_boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
-.  bfd_boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
+.  NAME##_slurp_armap, \
+.  NAME##_slurp_extended_name_table, \
+.  NAME##_construct_extended_name_table, \
+.  NAME##_truncate_arname, \
+.  NAME##_write_armap, \
+.  NAME##_read_ar_hdr, \
+.  NAME##_openr_next_archived_file, \
+.  NAME##_get_elt_at_index, \
+.  NAME##_generic_stat_arch_elt, \
+.  NAME##_update_armap_timestamp
+.
+.  bfd_boolean (*_bfd_slurp_armap) (bfd *);
+.  bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
 .  bfd_boolean (*_bfd_construct_extended_name_table)
-.    PARAMS ((bfd *, char **, bfd_size_type *, const char **));
-.  void        (*_bfd_truncate_arname) PARAMS ((bfd *, const char *, char *));
+.    (bfd *, char **, bfd_size_type *, const char **);
+.  void        (*_bfd_truncate_arname) (bfd *, const char *, char *);
 .  bfd_boolean (*write_armap)
-.    PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
-.  PTR         (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
-.  bfd *       (*openr_next_archived_file) PARAMS ((bfd *, bfd *));
-.#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 *));
-.  bfd_boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
+.    (bfd *, unsigned int, struct orl *, unsigned int, int);
+.  void *      (*_bfd_read_ar_hdr_fn) (bfd *);
+.  bfd *       (*openr_next_archived_file) (bfd *, bfd *);
+.#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
+.  bfd *       (*_bfd_get_elt_at_index) (bfd *, symindex);
+.  int         (*_bfd_stat_arch_elt) (bfd *, struct stat *);
+.  bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
 .
 .  {* Entry points used for symbols.  *}
 .#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
-.CONCAT2 (NAME,_get_symtab_upper_bound), \
-.CONCAT2 (NAME,_get_symtab), \
-.CONCAT2 (NAME,_make_empty_symbol), \
-.CONCAT2 (NAME,_print_symbol), \
-.CONCAT2 (NAME,_get_symbol_info), \
-.CONCAT2 (NAME,_bfd_is_local_label_name), \
-.CONCAT2 (NAME,_get_lineno), \
-.CONCAT2 (NAME,_find_nearest_line), \
-.CONCAT2 (NAME,_bfd_make_debug_symbol), \
-.CONCAT2 (NAME,_read_minisymbols), \
-.CONCAT2 (NAME,_minisymbol_to_symbol)
-.  long        (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
-.  long        (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
-.                                                struct symbol_cache_entry **));
+.  NAME##_get_symtab_upper_bound, \
+.  NAME##_get_symtab, \
+.  NAME##_make_empty_symbol, \
+.  NAME##_print_symbol, \
+.  NAME##_get_symbol_info, \
+.  NAME##_bfd_is_local_label_name, \
+.  NAME##_get_lineno, \
+.  NAME##_find_nearest_line, \
+.  NAME##_bfd_make_debug_symbol, \
+.  NAME##_read_minisymbols, \
+.  NAME##_minisymbol_to_symbol
+.
+.  long        (*_bfd_get_symtab_upper_bound) (bfd *);
+.  long        (*_bfd_canonicalize_symtab)
+.    (bfd *, struct symbol_cache_entry **);
 .  struct symbol_cache_entry *
-.              (*_bfd_make_empty_symbol) PARAMS ((bfd *));
+.              (*_bfd_make_empty_symbol) (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))
+.    (bfd *, void *, 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))
-.  bfd_boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
+.    (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))
+.  bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
 .
-.  alent *     (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
+.  alent *     (*_get_lineno) (bfd *, struct symbol_cache_entry *);
 .  bfd_boolean (*_bfd_find_nearest_line)
-.    PARAMS ((bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
-.             const char **, const char **, unsigned int *));
+.    (bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
+.     const char **, const char **, unsigned int *);
 . {* 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 *, void *, unsigned long size));
+.    (bfd *, void *, 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 *, bfd_boolean, PTR *, unsigned int *));
+.    (bfd *, bfd_boolean, void **, 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 *, bfd_boolean, const PTR, asymbol *));
+.    (bfd *, bfd_boolean, const void *, asymbol *);
 .
 .  {* Routines for relocs.  *}
 .#define BFD_JUMP_TABLE_RELOCS(NAME) \
-.CONCAT2 (NAME,_get_reloc_upper_bound), \
-.CONCAT2 (NAME,_canonicalize_reloc), \
-.CONCAT2 (NAME,_bfd_reloc_type_lookup)
-.  long        (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
+.  NAME##_get_reloc_upper_bound, \
+.  NAME##_canonicalize_reloc, \
+.  NAME##_bfd_reloc_type_lookup
+.
+.  long        (*_get_reloc_upper_bound) (bfd *, sec_ptr);
 .  long        (*_bfd_canonicalize_reloc)
-.    PARAMS ((bfd *, sec_ptr, arelent **, struct symbol_cache_entry **));
+.    (bfd *, sec_ptr, arelent **, struct symbol_cache_entry **);
 .  {* See documentation on reloc types.  *}
 .  reloc_howto_type *
-.              (*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type));
+.              (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
 .
 .  {* Routines used when writing an object file.  *}
 .#define BFD_JUMP_TABLE_WRITE(NAME) \
-.CONCAT2 (NAME,_set_arch_mach), \
-.CONCAT2 (NAME,_set_section_contents)
+.  NAME##_set_arch_mach, \
+.  NAME##_set_section_contents
+.
 .  bfd_boolean (*_bfd_set_arch_mach)
-.    PARAMS ((bfd *, enum bfd_architecture, unsigned long));
+.    (bfd *, enum bfd_architecture, unsigned long);
 .  bfd_boolean (*_bfd_set_section_contents)
-.    PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+.    (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
 .
 .  {* Routines used by the linker.  *}
 .#define BFD_JUMP_TABLE_LINK(NAME) \
-.CONCAT2 (NAME,_sizeof_headers), \
-.CONCAT2 (NAME,_bfd_get_relocated_section_contents), \
-.CONCAT2 (NAME,_bfd_relax_section), \
-.CONCAT2 (NAME,_bfd_link_hash_table_create), \
-.CONCAT2 (NAME,_bfd_link_hash_table_free), \
-.CONCAT2 (NAME,_bfd_link_add_symbols), \
-.CONCAT2 (NAME,_bfd_link_just_syms), \
-.CONCAT2 (NAME,_bfd_final_link), \
-.CONCAT2 (NAME,_bfd_link_split_section), \
-.CONCAT2 (NAME,_bfd_gc_sections), \
-.CONCAT2 (NAME,_bfd_merge_sections), \
-.CONCAT2 (NAME,_bfd_discard_group)
-.  int         (*_bfd_sizeof_headers) PARAMS ((bfd *, bfd_boolean));
+.  NAME##_sizeof_headers, \
+.  NAME##_bfd_get_relocated_section_contents, \
+.  NAME##_bfd_relax_section, \
+.  NAME##_bfd_link_hash_table_create, \
+.  NAME##_bfd_link_hash_table_free, \
+.  NAME##_bfd_link_add_symbols, \
+.  NAME##_bfd_link_just_syms, \
+.  NAME##_bfd_final_link, \
+.  NAME##_bfd_link_split_section, \
+.  NAME##_bfd_gc_sections, \
+.  NAME##_bfd_merge_sections, \
+.  NAME##_bfd_discard_group
+.
+.  int         (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
 .  bfd_byte *  (*_bfd_get_relocated_section_contents)
-.    PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
-.             bfd_byte *, bfd_boolean, struct symbol_cache_entry **));
+.    (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+.     bfd_byte *, bfd_boolean, struct symbol_cache_entry **);
 .
 .  bfd_boolean (*_bfd_relax_section)
-.    PARAMS ((bfd *, struct sec *, struct bfd_link_info *, bfd_boolean *));
+.    (bfd *, struct sec *, struct bfd_link_info *, bfd_boolean *);
 .
 .  {* 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 *));
+.              (*_bfd_link_hash_table_create) (bfd *);
 .
 .  {* Release the memory associated with the linker hash table.  *}
-.  void        (*_bfd_link_hash_table_free)
-.    PARAMS ((struct bfd_link_hash_table *));
+.  void        (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *);
 .
 .  {* Add symbols from this object file into the hash table.  *}
-.  bfd_boolean (*_bfd_link_add_symbols)
-.    PARAMS ((bfd *, struct bfd_link_info *));
+.  bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
 .
 .  {* Indicate that we are only retrieving symbol values from this section.  *}
-.  void        (*_bfd_link_just_syms)
-.    PARAMS ((asection *, struct bfd_link_info *));
+.  void        (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
 .
 .  {* Do a link based on the link_order structures attached to each
 .     section of the BFD.  *}
-.  bfd_boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
+.  bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
 .
 .  {* Should this section be split up into smaller pieces during linking.  *}
-.  bfd_boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
+.  bfd_boolean (*_bfd_link_split_section) (bfd *, struct sec *);
 .
 .  {* Remove sections that are not referenced from the output.  *}
-.  bfd_boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
+.  bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
 .
 .  {* Attempt to merge SEC_MERGE sections.  *}
-.  bfd_boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
+.  bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
 .
 .  {* Discard members of a group.  *}
-.  bfd_boolean (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
+.  bfd_boolean (*_bfd_discard_group) (bfd *, struct sec *);
 .
 .  {* Routines to handle dynamic symbols and relocs.  *}
 .#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
-.CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
-.CONCAT2 (NAME,_canonicalize_dynamic_symtab), \
-.CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \
-.CONCAT2 (NAME,_canonicalize_dynamic_reloc)
+.  NAME##_get_dynamic_symtab_upper_bound, \
+.  NAME##_canonicalize_dynamic_symtab, \
+.  NAME##_get_dynamic_reloc_upper_bound, \
+.  NAME##_canonicalize_dynamic_reloc
+.
 .  {* Get the amount of memory required to hold the dynamic symbols.  *}
-.  long        (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
+.  long        (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
 .  {* Read in the dynamic symbols.  *}
 .  long        (*_bfd_canonicalize_dynamic_symtab)
-.    PARAMS ((bfd *, struct symbol_cache_entry **));
+.    (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 *));
+.  long        (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
 .  {* Read in the dynamic relocs.  *}
 .  long        (*_bfd_canonicalize_dynamic_reloc)
-.    PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
+.    (bfd *, arelent **, struct symbol_cache_entry **);
 .
 
 A pointer to an alternative bfd_target in case the current one is not
@@ -475,7 +477,7 @@ to find an alternative output format that is suitable.
 
 .  {* Data for use by back-end routines, which isn't
 .     generic enough to belong in this structure.  *}
-.  PTR backend_data;
+.  void *backend_data;
 .
 .} bfd_target;
 .
@@ -587,8 +589,6 @@ extern const bfd_target bfd_elf64_big_generic_vec;
 extern const bfd_target bfd_elf64_bigmips_vec;
 extern const bfd_target bfd_elf64_hppa_linux_vec;
 extern const bfd_target bfd_elf64_hppa_vec;
-extern const bfd_target bfd_elf64_ia64_aix_big_vec;
-extern const bfd_target bfd_elf64_ia64_aix_little_vec;
 extern const bfd_target bfd_elf64_ia64_big_vec;
 extern const bfd_target bfd_elf64_ia64_hpux_big_vec;
 extern const bfd_target bfd_elf64_ia64_little_vec;
@@ -741,6 +741,7 @@ extern const bfd_target ptrace_core_vec;
 extern const bfd_target sco5_core_vec;
 extern const bfd_target trad_core_vec;
 
+extern const bfd_target bfd_elf32_am33lin_vec;
 static const bfd_target * const _bfd_target_vector[] = {
 
 #ifdef SELECT_VECS
@@ -882,8 +883,6 @@ static const bfd_target * const _bfd_target_vector[] = {
        &bfd_elf64_bigmips_vec,
        &bfd_elf64_hppa_linux_vec,
        &bfd_elf64_hppa_vec,
-       &bfd_elf64_ia64_aix_big_vec,
-       &bfd_elf64_ia64_aix_little_vec,
        &bfd_elf64_ia64_big_vec,
        &bfd_elf64_ia64_hpux_big_vec,
        &bfd_elf64_ia64_little_vec,
@@ -1059,6 +1058,7 @@ static const bfd_target * const _bfd_target_vector[] = {
        &w65_vec,
        &we32kcoff_vec,
        &z8kcoff_vec,
+       &bfd_elf32_am33lin_vec,
 #endif /* not SELECT_VECS */
 
 /* Always support S-records, for convenience.  */
@@ -1156,13 +1156,10 @@ static const struct targmatch bfd_target_match[] = {
   { NULL, NULL }
 };
 
-static const bfd_target *find_target PARAMS ((const char *));
-
 /* Find a target vector, given a name or configuration triplet.  */
 
 static const bfd_target *
-find_target (name)
-     const char *name;
+find_target (const char *name)
 {
   const bfd_target * const *target;
   const struct targmatch *match;
@@ -1203,8 +1200,7 @@ DESCRIPTION
 */
 
 bfd_boolean
-bfd_set_default_target (name)
-     const char *name;
+bfd_set_default_target (const char *name)
 {
   const bfd_target *target;
 
@@ -1240,9 +1236,7 @@ DESCRIPTION
 */
 
 const bfd_target *
-bfd_find_target (target_name, abfd)
-     const char *target_name;
-     bfd *abfd;
+bfd_find_target (const char *target_name, bfd *abfd)
 {
   const char *targname;
   const bfd_target *target;
@@ -1288,9 +1282,9 @@ DESCRIPTION
 */
 
 const char **
-bfd_target_list ()
+bfd_target_list (void)
 {
-  int vec_length= 0;
+  int vec_length = 0;
   bfd_size_type amt;
 #if defined (HOST_HPPAHPUX) && ! defined (__STDC__)
   /* The native compiler on the HP9000/700 has a bug which causes it
@@ -1304,7 +1298,7 @@ bfd_target_list ()
     vec_length++;
 
   amt = (vec_length + 1) * sizeof (char **);
-  name_ptr = name_list = (const char **) bfd_malloc (amt);
+  name_ptr = name_list = bfd_malloc (amt);
 
   if (name_list == NULL)
     return NULL;
@@ -1323,9 +1317,9 @@ FUNCTION
        bfd_seach_for_target
 
 SYNOPSIS
-       const bfd_target * bfd_search_for_target (int (* search_func)
-                                                 (const bfd_target *, void *),
-                                                 void *);
+       const bfd_target *bfd_search_for_target
+         (int (*search_func) (const bfd_target *, void *),
+          void *);
 
 DESCRIPTION
        Return a pointer to the first transfer vector in the list of
@@ -1336,15 +1330,14 @@ DESCRIPTION
 */
 
 const bfd_target *
-bfd_search_for_target (search_func, data)
-     int (* search_func) PARAMS ((const bfd_target * target, void * data));
-     void * data;
+bfd_search_for_target (int (*search_func) (const bfd_target *, void *),
+                      void *data)
 {
-  const bfd_target * const * target;
+  const bfd_target * const *target;
 
-  for (target = bfd_target_vector; * target != NULL; target ++)
-    if (search_func (* target, data))
-      return * target;
+  for (target = bfd_target_vector; *target != NULL; target ++)
+    if (search_func (*target, data))
+      return *target;
 
   return NULL;
 }
index ae8bcf18aaf632fe6542bdd58c27fada87bd379e..20f1686ec5a3e140aa669dd5b5abb9cd5a12fc0a 100644 (file)
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20030627
+#define BFD_VERSION_DATE 20030805
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING @bfd_version_string@
index e227500c4a048e3b9bcd21578951bf21f85ddf5b..0a2f103d3fba52740cad8bdda35ac71962e2b799 100644 (file)
@@ -500,7 +500,7 @@ multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ]
 
 cat > Multi.tem <<\EOF
 
-PWD=$${PWDCMD-pwd}
+PWD_COMMAND=$${PWDCMD-pwd}
 
 # FIXME: There should be an @-sign in front of the `if'.
 # Leave out until this is tested a bit more.
@@ -508,8 +508,8 @@ multi-do:
        if [ -z "$(MULTIDIRS)" ]; then \
          true; \
        else \
-         rootpre=`${PWD}`/; export rootpre; \
-         srcrootpre=`cd $(srcdir); ${PWD}`/; export srcrootpre; \
+         rootpre=`${PWD_COMMAND}`/; export rootpre; \
+         srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \
          lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \
          compiler="$(CC)"; \
          for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \
@@ -546,7 +546,7 @@ multi-clean:
        if [ -z "$(MULTIDIRS)" ]; then \
          true; \
        else \
-         lib=`${PWD} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
+         lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
          for dir in Makefile $(MULTIDIRS); do \
            if [ -f ../$${dir}/$${lib}/Makefile ]; then \
              if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \
index c38b59c841e7a4493da268e1efe2393a302846b0..2655bc3b56ab3744a04f85c723d21da6beec26af 100644 (file)
--- a/config.if
+++ b/config.if
@@ -3,7 +3,6 @@
 # determine:
 #
 #      1. libstcxx_incdir: the interface name for libstdc++.
-#      2. libc_interface: the interface name for libc.
 #
 
 # Get the top level src dir.
@@ -36,53 +35,3 @@ if test -z "$gcc_version"; then
 fi
 libstdcxx_incdir=c++/${gcc_version}
 
-# The trickiest part is libc_interface.
-if [ -z "${libc_interface}" ]
-then
-  case ${target_os} in
-  *linux*libc1*|*linux*libc5*)
-    case ${target_alias} in
-    *alpha*|*powerpc*)
-      libc_interface=-libc5.9-
-      ;;
-    *)
-      libc_interface=-libc5-
-      ;;
-    esac
-    ;;
-  *linux*gnu*)
-    # We have to work harder to figure it out.
-    if [ ${target_alias} = ${build_alias} ]
-    then
-      dummy=if$$
-      cat >$dummy.c <<EOF
-#include <features.h>                      
-main(argc, argv)
-     int argc;          
-     char *argv[];
-{
-  printf("%d\n", __GLIBC_MINOR__);
-  return 0;
-}
-EOF
-      ${CC-cc} $dummy.c -o $dummy 2>/dev/null
-      if [ "$?" = 0 ]
-      then
-       libc_interface=-libc6.`./$dummy`-
-       rm -f $dummy.c $dummy
-      else
-       # It should never happen.
-       echo "Cannot find the GNU C library minor version number." >&2
-       rm -f $dummy.c $dummy
-       exit 1
-      fi
-    else
-      # Cross compiling. Assume glibc 2.1.
-      libc_interface=-libc6.1-
-    fi
-    ;;
-  *)
-    libc_interface=-
-    ;;
-  esac
-fi
index 13d3c8868cae363009abd75b92aba544d1293a3a..7a7605bc46760723b4425a7c9f33a3aab16729ea 100644 (file)
@@ -1,3 +1,14 @@
+2003-07-07  Zack Weinberg  <zack@codesourcery.com>
+
+       * gettext.m4: Delete all former contents.
+       (ZW_GNU_GETTEXT_SISTER_DIR): New macro.
+       * progtest.m4: New file.
+
+2003-07-04  Zack Weinberg  <zack@codesourcery.com>
+
+       * gettext.m4: New file - copy of gettext.m4 from binutils
+       CVS, with added AC_ISC_POSIX macro from gcc/aclocal.m4.
+
 2003-05-14  Kelley Cook  <kelleycook@wideopenwest.com>
 
        * acinclude.m4: Accept i[3456789]86 for machine type.
@@ -15,7 +26,7 @@
 2002-12-28  Alexandre Oliva  <aoliva@redhat.com>
 
        * acx.m4: Name cache variables properly.
-       (NCN_STRICT_CHECK_TOOL): If program is not found and 
+       (NCN_STRICT_CHECK_TOOL): If program is not found and
        value-if-not-found is empty, use ${ncn_tool_prefix}$2 or $2,
        depending on whether build != host or not.
        (NCN_STRICT_CHECK_TARGET_TOOL): Ditto, with the target prefix.
 2000-07-21  Andrew Haley  <aph@cygnus.com>
 
        * mh-ia64pic: New file.
-       * mt-ia64pic: New file. 
+       * mt-ia64pic: New file.
 
 2001-02-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
 
@@ -207,8 +218,8 @@ Wed Nov 18 20:29:46 1998  Christopher Faylor <cgf@cygnus.com>
 
 Mon Nov  2 15:15:33 1998  Geoffrey Noer  <noer@cygnus.com>
 
-        * mh-cygwin32: delete
-        * mh-cygwin: was mh-cygwin32
+       * mh-cygwin32: delete
+       * mh-cygwin: was mh-cygwin32
 
 1998-10-26  Syd Polk  <spolk@cygnus.com>
 
@@ -235,7 +246,7 @@ Mon Aug 10 00:15:47 1998  HJ Lu (hjl@gnu.org)
 1998-05-29  Rob Savoye  <rob@chinadoll.cygnus.com>
 
        * acinclude.m4: New collection of generic autoconf macros.
-       
+
 Wed Apr 22 12:24:28 1998  Michael Meissner  <meissner@cygnus.com>
 
        * mt-ospace: New file, support using -Os instead of -O2 to compile
@@ -278,8 +289,8 @@ Tue Mar 25 18:16:43 1997  Geoffrey Noer  <noer@cygnus.com>
 
 Wed Jan  8 19:56:43 1997  Geoffrey Noer  <noer@cygnus.com>
 
-        * mh-cygwin32: override CFLAGS so debug info isn't included
-        in cygwin32-hosted tools by default
+       * mh-cygwin32: override CFLAGS so debug info isn't included
+       in cygwin32-hosted tools by default
 
 Tue Dec 31 16:04:26 1996  Ian Lance Taylor  <ian@cygnus.com>
 
@@ -377,7 +388,7 @@ Tue Nov  7 15:41:30 1995  Stan Shebs  <shebs@andros.cygnus.com>
        (CC_MWCPPC): Add -mpw_chars, disable warnings, add comments
        explaining reasons for various flags.
        (EXTRALIBS_PPC, EXTRALIBS_MWCPPC ): Put runtime library first.
-       
+
 Fri Oct 13 14:44:25 1995  Jason Molenda  (crash@phydeaux.cygnus.com)
 
        * mh-aix, mh-sun:  Removed.
@@ -386,7 +397,7 @@ Fri Oct 13 14:44:25 1995  Jason Molenda  (crash@phydeaux.cygnus.com)
 
        * mh-sco, mh-solaris, mh-sysv4 (X11_EXTRA_LIBS): Define.
 
-        * mh-hp300, mh-hpux, mh-hpux8, mh-solaris, mh-sun3, mh-sysv4: Don't 
+       * mh-hp300, mh-hpux, mh-hpux8, mh-solaris, mh-sun3, mh-sysv4: Don't
        hardcode location of X stuff here.
 
 Thu Sep 28 13:14:56 1995  Stan Shebs  <shebs@andros.cygnus.com>
@@ -412,7 +423,7 @@ Thu Jun 22 17:47:24 1995  Stan Shebs  <shebs@andros.cygnus.com>
 Mon Apr 10 12:29:48 1995  Stan Shebs  <shebs@andros.cygnus.com>
 
        * mpw-mh-mpw (EXTRALIBS): Always link in Math.o, CSANELIB.o,
-        and ToolLibs.o.
+       and ToolLibs.o.
 
        * mpw-mh-mpw (CC): Define ALMOST_STDC.
        (CFLAGS): Remove ALMOST_STDC, -mc68881.
index 1d28c641877bb7a4023fec4c98e99d61690228b7..55d562a706f2c6777af1d4801cd2fdde19d82ef6 100755 (executable)
--- a/configure
+++ b/configure
@@ -658,6 +658,72 @@ test "$program_suffix" != NONE &&
 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 
 
+# Get 'install' or 'install-sh' and its variants.
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/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:675: 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=":"
+  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/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+         if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         else
+           ac_cv_path_install="$ac_dir/$ac_prog -c"
+           break 2
+         fi
+       fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# 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'
+
+
 # Autoconf M4 include file defining utility macros for complex Canadian
 # cross builds.
 
@@ -854,7 +920,7 @@ else
   is_cross_compiler=yes
 fi     
 
-# Find the build and target subdirs.
+# Find the build and target subdir names.
  case ${build_alias} in
   "") build_noncanonical=${build} ;;
   *) build_noncanonical=${build_alias} ;;
@@ -878,24 +944,6 @@ host_subdir=.
 target_subdir=${target_noncanonical}
    
 
-if test ! -d ${target_subdir} ; then
-  if mkdir ${target_subdir} ; then true
-  else
-    echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
-    exit 1
-  fi
-fi
-
-if test x"${build_alias}" != x"${host}" ; then
-  if test ! -d ${build_subdir} ; then
-    if mkdir ${build_subdir} ; then true
-    else
-      echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
-      exit 1
-    fi
-  fi
-fi
-
 # Skipdirs are removed silently.
 skipdirs=
 # Noconfigdirs are removed loudly.
@@ -1022,7 +1070,7 @@ case "${target}" in
     ;;
   *-*-darwin*)
     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
-    noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libobjc"
     ;;
   *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
@@ -1082,6 +1130,9 @@ case "${target}" in
     # newlib is not 64 bit ready
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
+  am33_2.0-*-linux*)
+    noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+    ;;
   sh-*-linux*)
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
     ;;    
@@ -1260,7 +1311,7 @@ case "${target}" in
     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
     ;;
   m32r-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj} gdb"
+    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
@@ -1395,6 +1446,9 @@ case "${target}" in
   vax-*-*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
+  xtensa-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
   ip2k-*-*)
     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
     ;;
@@ -1441,24 +1495,24 @@ enable_languages=`echo "${enable_languages}" | sed -e 's/[      ,][     ,]*/,/g' -e 's/
 # First scan to see if an enabled language requires some other language.
 # We assume that a given config-lang.in will list all the language
 # front ends it requires, even if some are required indirectly.
-for lang in ${srcdir}/gcc/*/config-lang.in ..
-do
-  case $lang in
+for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
+  case ${lang_frag} in
     ..) ;;
     # The odd quoting in the next line works around
     # an apparent bug in bash 1.12 on linux.
     ${srcdir}/gcc/[*]/config-lang.in) ;;
     *)
-      lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^      ]*\).*$,\1,p' $lang`
-      this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^    ]*\).*$,\1,p' $lang`
-      for other in $this_lang_requires
-      do
+      # From the config-lang.in, get $language, $lang_requires
+      language=
+      lang_requires=
+      . ${lang_frag}
+      for other in ${lang_requires} ; do
         case ,${enable_languages}, in
          *,$other,*) ;;
          *,all,*) ;;
-         *,$lang_alias,*)
-           echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2
-           enable_languages="$enable_languages,$other"
+         *,$language,*)
+           echo " \`$other' language required by \`$language'; enabling" 1>&2
+           enable_languages="${enable_languages},${other}"
            ;;
        esac
       done
@@ -1466,35 +1520,44 @@ do
   esac
 done
 
-subdirs=
-for lang in ${srcdir}/gcc/*/config-lang.in ..
-do
-  case $lang in
+for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
+  case ${lang_frag} in
     ..) ;;
     # The odd quoting in the next line works around
     # an apparent bug in bash 1.12 on linux.
     ${srcdir}/gcc/[*]/config-lang.in) ;;
     *)
-      lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^      ]*\).*$,\1,p' $lang`
-      this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^    ]*\).*$,\1,p' $lang`
-      this_lang_dirs=`sed -n -e 's,^lang_dirs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_dirs=\([^        ]*\).*$,\1,p' $lang`
-      build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^        ]*\).*$,\1,p' $lang`
-      if test "x$lang_alias" = x
-         then
-        echo "$lang doesn't set \$language." 1>&2
+      # From the config-lang.in, get $language, $target_libs, 
+      # $lang_dirs, and $build_by_default
+      language=
+      target_libs=
+      lang_dirs=
+      build_by_default=
+      . ${lang_frag}
+      if test "x$language" = x ; then
+        echo "${lang_frag} doesn't set \$language." 1>&2
         exit 1
       fi
-      case ${build_by_default},${enable_languages}, in
-        *,$lang_alias,*) add_this_lang=yes ;;
-        no,*) add_this_lang=no ;;
-        *,all,*) add_this_lang=yes ;;
+      case ,${enable_languages}, in
+        *,${language},*)
+          # Language was explicitly selected; include it.
+          add_this_lang=yes
+          ;;
+        *,all,*)
+          # 'all' was selected; include 'default' languages.
+          case ${build_by_default} in
+            no) add_this_lang=no ;;
+            *) add_this_lang=yes ;;
+          esac 
+          ;;
         *) add_this_lang=no ;;
       esac
-      if test x"${add_this_lang}" = xyes; then
-        :
-      else
-        eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
-      fi
+      case ${add_this_lang} in
+        no)
+          # Remove language-dependent dirs.
+          eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
+          ;;
+      esac
       ;;
   esac
 done
@@ -2699,7 +2762,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
   # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2703: checking for $ac_word" >&5
+echo "configure:2766: 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
@@ -2732,7 +2795,7 @@ if test -z "$ac_cv_prog_AR" ; then
     # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2736: checking for $ac_word" >&5
+echo "configure:2799: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2771,7 +2834,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}as; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2775: checking for $ac_word" >&5
+echo "configure:2838: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2804,7 +2867,7 @@ if test -z "$ac_cv_prog_AS" ; then
     # Extract the first word of "as", so it can be a program name with args.
 set dummy as; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2808: checking for $ac_word" >&5
+echo "configure:2871: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2843,7 +2906,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2847: checking for $ac_word" >&5
+echo "configure:2910: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2876,7 +2939,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then
     # Extract the first word of "dlltool", so it can be a program name with args.
 set dummy dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2880: checking for $ac_word" >&5
+echo "configure:2943: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2915,7 +2978,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}ld; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2919: checking for $ac_word" >&5
+echo "configure:2982: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2948,7 +3011,7 @@ if test -z "$ac_cv_prog_LD" ; then
     # Extract the first word of "ld", so it can be a program name with args.
 set dummy ld; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2952: checking for $ac_word" >&5
+echo "configure:3015: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2987,7 +3050,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}nm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2991: checking for $ac_word" >&5
+echo "configure:3054: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3020,7 +3083,7 @@ if test -z "$ac_cv_prog_NM" ; then
     # Extract the first word of "nm", so it can be a program name with args.
 set dummy nm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3024: checking for $ac_word" >&5
+echo "configure:3087: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3059,7 +3122,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3063: checking for $ac_word" >&5
+echo "configure:3126: 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
@@ -3092,7 +3155,7 @@ if test -z "$ac_cv_prog_RANLIB" ; 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:3096: checking for $ac_word" >&5
+echo "configure:3159: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3131,7 +3194,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3135: checking for $ac_word" >&5
+echo "configure:3198: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3164,7 +3227,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then
     # Extract the first word of "windres", so it can be a program name with args.
 set dummy windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3168: checking for $ac_word" >&5
+echo "configure:3231: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3203,7 +3266,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3207: checking for $ac_word" >&5
+echo "configure:3270: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3236,7 +3299,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then
     # Extract the first word of "objcopy", so it can be a program name with args.
 set dummy objcopy; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3240: checking for $ac_word" >&5
+echo "configure:3303: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3275,7 +3338,7 @@ fi
   # Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
 set dummy ${ncn_tool_prefix}objdump; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3279: checking for $ac_word" >&5
+echo "configure:3342: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3308,7 +3371,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then
     # Extract the first word of "objdump", so it can be a program name with args.
 set dummy objdump; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3312: checking for $ac_word" >&5
+echo "configure:3375: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3356,7 +3419,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3360: checking for $ac_word" >&5
+echo "configure:3423: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3389,7 +3452,7 @@ if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
     # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3393: checking for $ac_word" >&5
+echo "configure:3456: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3428,7 +3491,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}as; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3432: checking for $ac_word" >&5
+echo "configure:3495: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3461,7 +3524,7 @@ if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
     # Extract the first word of "as", so it can be a program name with args.
 set dummy as; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3465: checking for $ac_word" >&5
+echo "configure:3528: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3500,7 +3563,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3504: checking for $ac_word" >&5
+echo "configure:3567: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3533,7 +3596,7 @@ if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
     # Extract the first word of "dlltool", so it can be a program name with args.
 set dummy dlltool; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3537: checking for $ac_word" >&5
+echo "configure:3600: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3572,7 +3635,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3576: checking for $ac_word" >&5
+echo "configure:3639: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3605,7 +3668,7 @@ if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
     # Extract the first word of "ld", so it can be a program name with args.
 set dummy ld; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3609: checking for $ac_word" >&5
+echo "configure:3672: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3644,7 +3707,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3648: checking for $ac_word" >&5
+echo "configure:3711: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3677,7 +3740,7 @@ if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
     # Extract the first word of "nm", so it can be a program name with args.
 set dummy nm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3681: checking for $ac_word" >&5
+echo "configure:3744: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3716,7 +3779,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3720: checking for $ac_word" >&5
+echo "configure:3783: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3749,7 +3812,7 @@ if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; 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:3753: checking for $ac_word" >&5
+echo "configure:3816: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3788,7 +3851,7 @@ fi
   # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
 set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3792: checking for $ac_word" >&5
+echo "configure:3855: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3821,7 +3884,7 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
     # Extract the first word of "windres", so it can be a program name with args.
 set dummy windres; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3825: checking for $ac_word" >&5
+echo "configure:3888: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3888,7 +3951,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
 NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:3892: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:3955: 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"
@@ -4020,6 +4083,7 @@ do
 done
 
 ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
 
 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
@@ -4068,6 +4132,9 @@ 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%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
 s%@build_subdir@%$build_subdir%g
 s%@host_subdir@%$host_subdir%g
@@ -4233,6 +4300,10 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
     top_srcdir="$ac_dots$ac_given_srcdir" ;;
   esac
 
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
 
   echo creating "$ac_file"
   rm -f "$ac_file"
@@ -4248,6 +4319,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
 s%@configure_input@%$configure_input%g
 s%@srcdir@%$srcdir%g
 s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
 fi; done
 rm -f conftest.s*
index 463db7a9cea5da7a8697bf07372af95ab565ed03..d1a2e1ac0213330abad72519ca529127afd5b228 100644 (file)
@@ -23,6 +23,9 @@ AC_PREREQ(2.13)
 AC_CANONICAL_SYSTEM
 AC_ARG_PROGRAM
 
+# Get 'install' or 'install-sh' and its variants.
+AC_PROG_INSTALL
+
 sinclude(config/acx.m4)
 
 ### we might need to use some other shell than /bin/sh for running subshells
@@ -189,27 +192,9 @@ else
   is_cross_compiler=yes
 fi     
 
-# Find the build and target subdirs.
+# Find the build and target subdir names.
 GCC_TOPLEV_SUBDIRS
 
-if test ! -d ${target_subdir} ; then
-  if mkdir ${target_subdir} ; then true
-  else
-    echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
-    exit 1
-  fi
-fi
-
-if test x"${build_alias}" != x"${host}" ; then
-  if test ! -d ${build_subdir} ; then
-    if mkdir ${build_subdir} ; then true
-    else
-      echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
-      exit 1
-    fi
-  fi
-fi
-
 # Skipdirs are removed silently.
 skipdirs=
 # Noconfigdirs are removed loudly.
@@ -336,7 +321,7 @@ case "${target}" in
     ;;
   *-*-darwin*)
     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
-    noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libobjc"
     ;;
   *-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
@@ -396,6 +381,9 @@ case "${target}" in
     # newlib is not 64 bit ready
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
+  am33_2.0-*-linux*)
+    noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+    ;;
   sh-*-linux*)
     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
     ;;    
@@ -574,7 +562,7 @@ case "${target}" in
     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
     ;;
   m32r-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj} gdb"
+    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
@@ -709,6 +697,9 @@ case "${target}" in
   vax-*-*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
+  xtensa-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
   ip2k-*-*)
     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
     ;;
@@ -755,24 +746,24 @@ enable_languages=`echo "${enable_languages}" | sed -e 's/[[       ,]][[   ,]]*/,/g' -e
 # First scan to see if an enabled language requires some other language.
 # We assume that a given config-lang.in will list all the language
 # front ends it requires, even if some are required indirectly.
-for lang in ${srcdir}/gcc/*/config-lang.in ..
-do
-  case $lang in
+for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
+  case ${lang_frag} in
     ..) ;;
     # The odd quoting in the next line works around
     # an apparent bug in bash 1.12 on linux.
     ${srcdir}/gcc/[[*]]/config-lang.in) ;;
     *)
-      lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^         ]]*\).*$,\1,p' $lang`
-      this_lang_requires=`sed -n -e 's,^lang_requires=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_requires=\([[^       ]]*\).*$,\1,p' $lang`
-      for other in $this_lang_requires
-      do
+      # From the config-lang.in, get $language, $lang_requires
+      language=
+      lang_requires=
+      . ${lang_frag}
+      for other in ${lang_requires} ; do
         case ,${enable_languages}, in
          *,$other,*) ;;
          *,all,*) ;;
-         *,$lang_alias,*)
-           echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2
-           enable_languages="$enable_languages,$other"
+         *,$language,*)
+           echo " \`$other' language required by \`$language'; enabling" 1>&2
+           enable_languages="${enable_languages},${other}"
            ;;
        esac
       done
@@ -780,35 +771,44 @@ do
   esac
 done
 
-subdirs=
-for lang in ${srcdir}/gcc/*/config-lang.in ..
-do
-  case $lang in
+for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
+  case ${lang_frag} in
     ..) ;;
     # The odd quoting in the next line works around
     # an apparent bug in bash 1.12 on linux.
     ${srcdir}/gcc/[[*]]/config-lang.in) ;;
     *)
-      lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^         ]]*\).*$,\1,p' $lang`
-      this_lang_libs=`sed -n -e 's,^target_libs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^target_libs=\([[^       ]]*\).*$,\1,p' $lang`
-      this_lang_dirs=`sed -n -e 's,^lang_dirs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_dirs=\([[^   ]]*\).*$,\1,p' $lang`
-      build_by_default=`sed -n -e 's,^build_by_default=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^build_by_default=\([[^   ]]*\).*$,\1,p' $lang`
-      if test "x$lang_alias" = x
-         then
-        echo "$lang doesn't set \$language." 1>&2
+      # From the config-lang.in, get $language, $target_libs, 
+      # $lang_dirs, and $build_by_default
+      language=
+      target_libs=
+      lang_dirs=
+      build_by_default=
+      . ${lang_frag}
+      if test "x$language" = x ; then
+        echo "${lang_frag} doesn't set \$language." 1>&2
         exit 1
       fi
-      case ${build_by_default},${enable_languages}, in
-        *,$lang_alias,*) add_this_lang=yes ;;
-        no,*) add_this_lang=no ;;
-        *,all,*) add_this_lang=yes ;;
+      case ,${enable_languages}, in
+        *,${language},*)
+          # Language was explicitly selected; include it.
+          add_this_lang=yes
+          ;;
+        *,all,*)
+          # 'all' was selected; include 'default' languages.
+          case ${build_by_default} in
+            no) add_this_lang=no ;;
+            *) add_this_lang=yes ;;
+          esac 
+          ;;
         *) add_this_lang=no ;;
       esac
-      if test x"${add_this_lang}" = xyes; then
-        :
-      else
-        eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
-      fi
+      case ${add_this_lang} in
+        no)
+          # Remove language-dependent dirs.
+          eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
+          ;;
+      esac
       ;;
   esac
 done
index 3ea0a168fb6d7b7ff5b747249c00da17f61b4550..b29edfb881d5e24b8e177e8c1bb8fe23ad92a1bb 100644 (file)
+2003-08-05  David Carlton  <carlton@kealia.com>
+
+       * configure.in (build_warnings): Delete -Wformat-nonliteral.
+       * configure (build_warnings): Ditto.
+
+       * Merge with mainline; tag is carlton_dictionary-20030805-merge.
+
+2003-08-04  Andrew Cagney  <cagney@redhat.com>
+
+       * monitor.h (monitor_dump_reg_block): Remove ATTR_FORMAT.
+       * cli/cli-script.c (define_command): Call query directly, instead
+       of passing it a buffer.
+       * ocd.c (ocd_error): Pass error a constant format string.
+       * remote-mips.c (mips_error): Use fputs_filtered.
+
+       * solib-svr4.c (_initialize_svr4_solib): Update
+       register_gdbarch_data call.
+       * mips-linux-tdep.c (_initialize_mips_linux_tdep): Ditto.
+
+       * gdbarch.sh (gdbarch_data_free_ftype): Delete declaration.
+       (register_gdbarch_data): Delete "free" parameter.  Update
+       comments.
+       * gdbarch.h, gdbarch.c: Re-generate.
+       * reggroups.c (_initialize_reggroup): Update.
+       * gnu-v3-abi.c (init_gnuv3_ops): Update.
+       * frame-base.c (_initialize_frame_base): Update.
+       * frame-unwind.c (_initialize_frame_unwind): Update.
+       * user-regs.c (_initialize_user_regs): Update.
+       * remote.c (_initialize_remote): Update.
+       * regcache.c (_initialize_regcache): Update.
+
+       * regcache.c (xfree_regcache_descr): Delete function.
+       (_initialize_regcache): Update call to register_gdbarch_data.
+       (init_regcache_descr, init_legacy_regcache_descr): Use
+       GDBARCH_OBSTACK_XALLOC and GDBARCH_OBSTACK_CALLOC.
+
+       * remote.c (free_remote_state): Delete function.
+       (_initialize_remote): Update register_gdbarch_data.
+       (init_remote_state): Use GDBARCH_OBSTACK_XALLOC and
+       GDBARCH_OBSTACK_CALLOC instead of xmalloc / xcalloc.
+
+2003-08-04  Andrew Cagney  <cagney@redhat.com>
+
+       * reggroups.c (struct reggroup_el): Define.
+       (struct reggroups): Delete field "nr_group".  Replace array
+       "group" with a "first" to "last" linked list.
+       (reggroups_init): Update.  Allocate using gdbarch's obstack.
+       (reggroups_free): Delete function.
+       (add_group): Update.  Add "el" parameter.
+       (reggroup_add): Pass gdbarch obstack allocated space to add_group.
+       (default_groups): Update.
+       (reggroup_next): Replace reggroups.
+       (reggroups_dump): Update.
+       (_initialize_reggroup): Pass XMALLOC allocated space to add_group.
+       * regcache.c (regcache_dump): Use reggroup_next instead of reggroups.
+       * infcmd.c (registers_info): Use reggroup_next instead of reggroups.
+
+2003-08-04  Daniel Jacobowitz  <drow@mvista.com>
+
+       * Makefile.in (tui-interp.o): Update dependencies.
+
+2003-08-04  David Carlton  <carlton@kealia.com>
+
+       * charset.c (cached_iconv_convert): Add __FILE__ and __LINE__ args
+       to internal_error call.
+       * source.c (forward_search_command): Add "%s" format argument.
+       (reverse_search_command): Ditto.
+       * top.c (quit_confirm): Ditto.
+       * cli/cli-setshow.c (do_setshow_command): Ditto.
+       * cp-valprint.c (cp_print_class_method): Replace
+       {f,}printf_{un,}filtered by {f,}puts_{un,}filtered.
+       (cp_print_class_member): Ditto.
+       * event-top.c (command_line_handler): Ditto.
+       * linux-proc.c (linux_info_proc_cmd): Ditto.
+       * p-typeprint.c (pascal_type_print_base): Ditto.
+       * p-valprint.c (pascal_object_print_class_method): Ditto.
+       (pascal_object_print_class_member): Ditto.
+       * printcmd.c (print_scalar_formatted,printf_command): Ditto.
+       * remote.c (remote_cisco_section_offsets): Ditto.
+       * top.c (command_line_input): Ditto.
+       * utils.c (vwarning,error_stream,quit): Ditto.
+       * valprint.c (print_floating,print_binary_chars)
+       (print_octal_chars,print_decimal_chars,print_hex_chars): Ditto.
+
+2003-08-04  Andrew Cagney  <cagney@redhat.com>
+
+       * frame.c (frame_func_unwind): Use frame_unwind_address_in_block.
+
+2003-08-02  Andrew Cagney  <cagney@redhat.com>
+
+       * config/djgpp/fnchange.lst: Fix up testsuite/gdb.c++/annota3.cc,
+       gdb/testsuite/gdb.c++/annota3.exp, amd64fbsd-tdep.c and
+       amd64fbsd-nat.c.
+
+2003-08-02  Andrew Cagney  <cagney@redhat.com>
+
+       * Makefile.in: Update all dependencies and definitions.
+
+2003-08-02  Adam Fedor  <fedor@gnu.org>
+
+       * linespec.c (is_objc_method_format): New function
+       (decode_line_1, locate_first_half): Use it.
+       Fixes PR objc/1298
+
+2003-08-01  Andrew Cagney  <cagney@redhat.com>
+
+       * NEWS: Mention that m32r is multi-arch.
+       From 2003-07-28 Kei Sakamoto <sakamoto.kei@renesas.com>:
+       * configure.tgt: Recognize m32r-*-*.
+       * config/m32r/tm-m32r.h: Delete file.
+       * config/m32r/m32r.mt: New file.
+       * m32r-rom.c (m32r_upload_command): Use hostent only when 
+        gethostname succeeds, in order to avoid a compilation
+        warning.
+       * m32r-tdep.c (m32r_store_return_value): Add a cast to remove a
+       compiler warning.
+
+2003-08-01  Michael Snyder  <msnyder@redhat.com>
+
+       * sh-tdep.c (sh_frame_align): New gdbarch method.
+       (sh_gdbarch_init): Set up frame_align method.
+
+2003-07-31  Michael Snyder  <msnyder@redhat.com>
+
+       * value.h, values.c, infcall.c, infcmd.c: Revert 07-30 change,
+       which is already covered by the new frames infrastructure.
+
+2003-07-31  Andrew Cagney  <cagney@redhat.com>
+
+       * user-regs.c (struct user_reg): Add "next" link.
+       (struct user_regs): Replace "user" with "first" and "last" links.
+       (append_user_reg): Add pre-allocated "reg" parameter.
+       (builtin_user_regs): Provide initial value for "last".
+       (user_reg_add_builtin): XMALLOC memory for append_user_reg.
+       (user_regs_init): Allocate memory from the gdbarch obstack.
+       (user_reg_add): GDBARCH_OBSTACK_ZALLOC memory for append_user_reg.
+       (user_reg_map_name_to_regnum): Rewrite to search the user_reg
+       linked list.
+       (usernum_to_user_reg): New function.
+       (user_reg_map_regnum_to_name): Use usernum_to_user_reg.
+       (value_of_user_reg): Use usernum_to_user_reg.
+       (user_regs_free): Delete function.
+       (_initialize_user_regs): Update register_gdbarch_data call.
+
+2003-07-31  Daniel Jacobowitz  <drow@mvista.com>
+
+       * dwarf2read.c (new_symbol): Use var_decode_location for parameters.
+
+2003-07-30  Michael Snyder  <msnyder@redhat.com>
+
+       * value.h (value_being_returned): Add a struct_addr argument.
+       * infcall.c (call_function_by_hand): Pass struct_addr to 
+       value_being_returned.
+       * infcmd.c (print_return_value): Pass zero as struct_addr.
+       * values.c (value_being_returned): If struct_addr is passed,
+       use it instead of trying to recover it from the inferior.
+
+2003-07-30  Kevin Buettner  <kevinb@redhat.com>
+
+       * mn10300-tdep.c (analyze_dummy_frame): Pass ``pc'' so that
+       the prologue analyzer won't need to attempt to extract the pc
+       value from the woefully incomplete dummy frame.
+       (mn10300_analyze_prologue): Avoid calls to get_frame_pc() when
+       possible.  Disable code which modifies the frame.
+
+2003-07-28  Andrew Cagney  <cagney@redhat.com>
+
+       * annotate.c (annotate_breakpoints_headers): Restrict annotation
+       to level 2.
+       (annotate_breakpoints_table, annotate_record): Ditto.
+       (annotate_breakpoints_table_end, annotate_field_begin): Ditto.
+       (annotate_field_name_end, annotate_field_value): Ditto.
+       (annotate_field_end, annotate_frame_source_begin): Ditto.
+       (annotate_frame_source_file, annotate_frame_source_file_end): Ditto.
+       (annotate_frame_source_line, annotate_frame_source_end): Ditto.
+       (annotate_frame_begin, annotate_frame_function_name): Ditto.
+       (annotate_frame_address_end, annotate_frame_address): Ditto.
+       (annotate_frame_args, annotate_frame_end): Ditto.
+       (annotate_frame_where, annotate_arg_begin): Ditto.
+       (annotate_arg_name_end, annotate_arg_value): Ditto.
+       (annotate_arg_end, annotate_signal_handler_caller): Ditto.
+       (annotate_function_call, annotate_signal_name): Ditto.
+       (annotate_signal_string, annotate_signal_name_end): Ditto.
+       (annotate_signal_string_end, annotate_value_history_begin): Ditto.
+       (annotate_value_begin, annotate_value_history_value): Ditto.
+       (annotate_value_history_end, annotate_value_end): Ditto.
+       (annotate_display_begin, annotate_display_number_end): Ditto.
+       (annotate_display_format, annotate_display_expression): Ditto.
+       (annotate_display_expression_end, annotate_display_value): Ditto.
+       (annotate_display_end, annotate_array_section_begin): Ditto.
+       (annotate_elt_rep, annotate_elt_rep_end): Ditto.
+       (annotate_elt, annotate_array_section_end): Ditto.
+
+2003-07-28  Andrew Cagney  <cagney@redhat.com>
+
+       * regcache.c (struct regcache_descr): Update comments on
+       nr_raw_registers.
+       (init_legacy_regcache_descr): Don't set nr_raw_registers or
+       sizeof_raw_register_valid_p.
+       (init_regcache_descr): Set nr_raw_registers and
+       sizeof_raw_register_valid_p before calling
+       init_legacy_regcache_descr.
+
+2003-07-28  Andrew Cagney  <cagney@redhat.com>
+
+       * mips-tdep.c (print_gp_register_row): Print the GPR's register
+       MOD NUM_REGS.
+
+2003-07-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       * thread.c (info_threads_command): Use get_selected_frame ().
+       Check that there is at least one non-sentinel frame.
+
+2003-07-27  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * m68hc11-tdep.c (struct frame_extra_info): Remove.
+       (m68hc11_pop_frame): Remove.
+       (m68hc11_frame_saved_pc): Remove.
+       (m68hc11_frame_chain): Remove.
+       (m68hc11_frame_init_saved_regs): Remove.
+       (m68hc11_init_extra_frame_info): Remove.
+       (m68hc11_store_struct_return): Remove.
+       (m68hc11_saved_pc_after_call): Remove.
+
+2003-07-27  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * m68hc11-tdep.c (struct m68hc11_unwind_cache): New struct to hold
+       frame unwind information.
+       (m68hc11_scan_prologue): New function from m68hc11_guess_from_prologue
+       and adapted for frame unwinding.
+       (m68hc11_skip_prologue): Update to scan prologue in temporary object.
+       (m68hc11_unwind_pc): New function.
+       (m68hc11_frame_unwind_cache): New function to analyze frames.
+       (m68hc11_frame_this_id): New function to create new frame struct.
+       (m68hc11_frame_prev_register): New function to unwind a register from
+       the frame.
+       (m68hc11_frame_unwind): Default 68hc11/68hc12 unwinder.
+       (m68hc11_frame_p): New function for the above.
+       (m68hc11_frame_base_address): New function to return fp of frame.
+       (m68hc11_frame_args_address): Update for frame.
+       (m68hc11_frame_base): Default 68hc11/68hc12 frame.
+       (m68hc11_unwind_sp): New function.
+       (m68hc11_unwind_dummy_id): New function.
+       (m68hc11_gdbarch_init): Install the above frames; remove deprecated
+       calls.
+
+2003-07-27  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * m68hc11-tdep.c (m68hc11_analyze_instruction): Don't advance the pc.
+       (m68hc11_guess_from_prologue): Advance the pc and frame size only
+       when we are beyond the current pc.
+
+2003-07-27  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * m68hc11-tdep.c (m68hc11_push_dummy_call): New function adapted
+       from m68hc11_push_arguments.
+       (m68hc11_push_arguments): Remove.
+       (m68hc11_push_return_address): Remove.
+       (m68hc11_gdbarch_init): Install the above; remove above deprecated
+       handlers; remove deprecated_extra_stack_alignment_needed.
+
+2003-07-27  Andrew Cagney  <cagney@redhat.com>
+
+       * config/pa/tm-hppa.h (init_frame_pc_default): Declare.
+       * infcall.c (legacy_push_dummy_code) [GDB_TARGET_IS_HPPA]: Update
+       REAL_PC and not the pointer.
+       * hppa-hpux-tdep.c: Include frame.h
+
+2003-07-27  Andrew Cagney  <cagney@redhat.com>
+
+       * config/pa/tm-hppa64.h (GDB_MULTI_ARCH): Set to
+       GDB_MULTI_ACH_PARTIAL.
+
+2003-07-27  Andrew Cagney  <cagney@redhat.com>
+
+       Patch from 2003-07-22 Kei Sakamoto <sakamoto.kei@renesas.com>:
+       * m32r-tdep.c (m32r_memory_insert_breakpoint): Fix code style -
+       operator at start and not end of line.
+       (decode_prologue): Ditto.
+       (m32r_frame_unwind_cache, m32r_unwind_sp, m32r_unwind_pc): Use
+       frame_unwind_register_unsigned instead of
+       frame_unwind_unsigned_register.
+       (m32r_read_pc): Use regcache_cooked_read_unsigned instead of
+       read_register.
+       (m32r_push_dummy_call): Use register_size instead of
+       REGISTER_RAW_SIZE.
+       (m32r_frame_sniffer): Replace m32r_frame_p.
+       (m32r_gdbarch_init): Call frame_unwind_append_sniffer.
+       * m32r-rom.c (report_transfer_performance): Delete extern
+       declaration.
+       (m32r_load, m32r_upload_command): Use print_transfer_performance
+       instead of report_transfer_performance.
+       (_initialize_m32r_rom): Use add_setshow_cmd instead of add_set_cmd
+       / add_show_from_set.
+
+2003-07-26  Andrew Cagney  <cagney@redhat.com>
+
+       * m68hc11-tdep.c (m68hc11_gdbarch_init): Set non-deprecated
+       store_return_value and extract_struct_value_address.
+
+2003-07-26  Daniel Jacobowitz  <drow@mvista.com>
+
+       PR c++/1267
+       * minsyms.c (lookup_minimal_symbol_by_pc_section): If SECTION is
+       NULL, default to the section containing PC.
+
+2003-07-24  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * NEWS: Mention "regs" deprecated for m68hc11 too.
+
+       * m68hc11-tdep.c (_initialize_m68hc11_tdep): Deprecate "regs" command.
+       (m68hc11_print_register): New function to print out one register.
+       (m68hc11_print_registers_info): New function to print registers.
+       (show_regs): Deprecate and use the above.
+       (m68hc11_gdbarch_init): Install the print_registers_info.
+
+2003-07-24  Jeff Johnston  <jjohnstn@redhat.com>
+
+       * ia64-linux-nat.c (ia64_linux_stopped_by_watchpoint): Verify
+       that we have a SIGTRAP before returning non-zero.
+
+2003-07-23  Michal Ludvig  <mludvig@suse.cz>
+           Elena Zannoni  <ezannoni@redhat.com>
+
+       * linespec.c (decode_line_2): Avoid crash if 
+       find_function_start_sal() returns empty record.
+
+2003-07-23  Andreas Schwab  <schwab@suse.de>
+
+       * ia64-tdep.c (ia64_print_insn): New function.
+       (ia64_gdbarch_init): Set print_insn to it.
+       (_initialize_ia64_tdep): Don't set deprecated_tm_print_insn and
+       deprecated_tm_print_insn_info.
+
+2003-07-22  Michael Snyder  <msnyder@redhat.com>
+
+       * h8300-tdep.c (h8300_extract_return_value): Teach it how to
+       handle 8-bit returns (long long).
+       (h8300h_extract_return_value): Ditto.
+       (h8300_gdbarch_init): Long long is 8 bytes, char is unsigned.
+
+2003-07-22  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbarch.c Include "gdb_obstack.h".
+       (struct gdbarch): Add an "obstack".
+       (alloc_gdbarch_data): Allocate the gdbarch data using
+       GDBARCH_OBSTACK_CALLOC.
+       (free_gdbarch_data): Delete function.
+       (gdbarch_obstack_zalloc): New function.
+       (gdbarch_free): Free the obstack, do not call free_gdbarch_data.
+       Assert that the architecture is not initialized.
+       (gdbarch_alloc): Allocate an obstack, allocate the architecture
+       vector from the obstack.
+       (alloc_gdbarch_data, init_gdbarch_swap): Allocate memory using the
+       architecture obstack.
+       (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Define.
+       (set_gdbarch_data): Assert that the data is not initialized.
+       (struct gdbarch_data): Delete member "free".
+       (register_gdbarch_data): Do not initialize "free".
+       * gdbarch.h, gdbarch.c: Re-generate.
+       
+2003-07-22  Andrew Cagney  <cagney@redhat.com>
+
+       * configure.in (build_warnings): Add -Wformat-nonliteral.
+       * configure: Re-generate.
+
+2003-07-22  Elena Zannoni  <ezannoni@redhat.com>
+
+       * dwarf2loc.c (locexpr_describe_location): Fix typos.
+
+2003-07-22  Elena Zannoni  <ezannoni@redhat.com>
+
+       * findvar.c (read_var_value): Remove case for thread local storage
+       variables.  It is now entirely handled by the dwarf2 location
+       expression code.
+       * printcmd.c (address_info): Ditto.
+       * symtab.h (address_class): Remove LOC_THREAD_LOCAL_STATIC
+       enumeration value.
+       (struct symbol): Remove objfile field, which was used by
+       LOC_THREAD_LOCAL_STATIC only.
+       * dwarf2read.c (decode_locdesc): Remove is_thread_local variable.
+       * dwarf2loc.h (struct dwarf2_loclist_baton): Add comment about
+       usage of objfile pointer.
+       * dwarf2loc.c (locexpr_describe_location): Add case to handle
+       thread local variables.
+       Add include of objfiles.h.
+       * dwarf2expr.c (execute_stack_op): Add comments about thread local
+       storage variables.
+       * Makefile.in (dwarf2loc.o): Update dependencies.
+
+2003-07-22  Andrew Cagney  <cagney@redhat.com>
+
+       * config/pa/tm-hppa64.h (FRAME_SAVED_PC_IN_SIGTRAMP): Use
+       get_frame_base.
+       (FRAME_BASE_BEFORE_SIGTRAMP): Ditto.
+       (FRAME_FIND_SAVED_REGS_IN_SIGTRAMP): Ditto.
+       (struct value): Add opaque declaration.
+       (DEPRECATED_FRAME_ARGS_ADDRESS): Delete.
+
+2003-07-21  Andrew Cagney  <cagney@redhat.com>
+
+       From 2003-07-04 Kei Sakamoto <sakamoto.kei@renesas.com>:
+       * m32r-tdep.c, m32r-stub.c, m32r-tdep.c: Rewrite.
+
+2003-07-20  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * m68hc11-tdep.c (m68hc11_pseudo_register_read): Use 
+       regcache_cooked_read_unsigned instead of read_register.
+       (m68hc11_saved_pc_after_call): Likewise.
+       (m68hc11_pseudo_register_write): Use regcache_cooked_write_unsigned
+       instead of write_register.
+       (m68hc11_register_type): New function.
+       (m68hc11_register_virtual_type): Remove.
+       (m68hc11_store_return_value): Convert to use the regcache.
+       (m68hc11_extract_struct_value_address): Likewise.
+       (m68hc11_gdbarch_init): Remove deprecated ops for register to use
+       m68hc11_register_type; undeprecate store_return_value and
+       extract_struct_value_address.
+
+2003-07-20  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * m68hc11-tdep.c (m68hc11_extract_return_value): Use regcache_raw_read
+       and translate to use regcache.
+       (m68hc11_gdbarch_init): Undeprecate extract_return_value.
+
+2003-07-18  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbarch.sh (DWARF2_BUILD_FRAME_INFO): Delete method.
+       * gdbarch.h, gdbarch.c: Re-generate.
+       * i386-tdep.c (i386_gdbarch_init): Do not set
+       DWARF2_BUILD_FRAME_INFO.
+       * elfread.c (elf_symfile_read): Call dwarf2_build_frame_info
+       unconditionally.
+       * alpha-tdep.c (alpha_dwarf2_init_abi): Do not set
+       DWARF2_BUILD_FRAME_INFO.
+
+2003-07-18  Andrew Cagney  <cagney@redhat.com>
+
+       From 2003-07-04 Kei Sakamoto <sakamoto.kei@renesas.com>:
+        * disasm.c (gdb_disassemble_info): Initilize di.arch.
+
+2003-07-18  Andrew Cagney  <cagney@redhat.com>
+
+       * dwarf2-frame.c (dwarf2_frame_sniffer): Use
+       frame_unwind_address_in_block, instead of frame_pc_unwind.
+       (dwarf2_frame_cache): Ditto.
+
+2003-07-18  Andrew Cagney  <cagney@redhat.com>
+
+       * user-regs.h (struct gdbarch): Declare opaque.
+       * ui-out.h (struct ui_file): Declare opaque.
+       * dwarf2-frame.h (struct frame_info): Declare opaque.
+
+2003-07-18  Kris Warkentin  <kewarken@qnx.com>
+
+       * nto-procfs.c: Clean ARI hits.  Change #include <..> to
+       #include "...".
+       (procfs_meminfo): Change strerror to safe_strerror.
+       (procfs_can_run): Remove K&R badness.
+
+2003-07-17  Michael Snyder  <msnyder@redhat.com>
+
+       * remote-sim.c: Comment typo fix.
+
+2003-07-17  Andrew Cagney  <cagney@redhat.com>
+
+       * defs.h (GDB_MULTI_ARCH): Delete conditional define.  Handled by
+       configure.
+       * sparc-tdep.c (sparc_intreg_size): Make non-static.
+       * config/sparc/tm-sparc.h (GDB_MULTI_ARCH): Define to
+       GDB_MULTI_ARCH_PARTIAL.
+
+2003-07-17  Elena Zannoni  <ezannoni@redhat.com>
+
+       * Makefile.in (x86-64-linux-nat.o): Update dependencies.
+       * x86-64-linux-nat.c (ps_get_thread_area): New function.  Add
+       include of asm/prctl.h, asm/ptrace.h, and gdb_proc_service.h.
+
+2003-07-16  Theodore A. Roth  <troth@openavr.org>
+
+       * avr-tdep.c (avr_skip_prologue): Return PC unchanged if no prologue
+       found.
+       (avr_frame_unwind_cache): Don't unwind FP for main.
+       Update a comment.
+       Save the computed prev_sp.
+       (avr_saved_regs_unwinder): Remove function.
+       (avr_frame_prev_register): Use PC unwind logic from 
+       avr_saved_regs_unwinder(), otherwise use trad_frame_prev_register().
+
+2003-07-16  Andrew Cagney  <cagney@redhat.com>
+
+       * frame-base.h (frame_base_p_ftype): Delete definition.
+       (frame_base_append_predicate): Delete declaration.
+       * frame-unwind.h (frame_unwind_p_ftype): Delete definition.
+       (frame_unwind_append_predicate): Delete declaration.
+       * frame-unwind.c (struct frame_unwind_table): Delete field "p".
+       (append_predicate): Delete parameter "p".
+       (frame_unwind_append_predicate): Delete function.
+       (frame_unwind_append_sniffer): Update call to append_predicate.
+       (frame_unwind_free): Delete function.
+       (_initialize_frame_unwind): Pass NULL as "free" to
+       register_gdbarch_data.
+       (frame_unwind_init): Append the dummy_frame_sniffer.
+       (frame_unwind_find_by_frame): Simplify.
+       * frame-base.c (struct frame_base_table): Delete field "p".
+       (append_predicate): Delete parameter "p".
+       (frame_base_append_predicate): Delete function.
+       (frame_base_append_sniffer): Update call to append_predicate.
+       (frame_base_free): Delete function.
+       (frame_base_find_by_frame): Simplify.
+       (_initialize_frame_base): Pass NULL as "free" to
+       register_gdbarch_data.
+       * x86-64-tdep.c (x86_64_frame_sniffer): Replace "x86_64_frame_p".
+       (x86_64_sigtramp_frame_sniffer): Replace
+       "x86_64_sigtramp_frame_p".
+       (x86_64_init_abi): Set the frame unwind sniffers.
+       * m68k-tdep.c (m68k_frame_sniffer): Replace "m68k_frame_p".
+       (m68k_sigtramp_frame_sniffer): Replace "m68k_sigtramp_frame_p"
+       (m68k_gdbarch_init): Set the frame unwind sniffers.
+       * i386-tdep.c (i386_sigtramp_frame_sniffer): Replace
+       "i386_sigtramp_frame_p".
+       (i386_frame_sniffer): Replace "i386_frame_p".
+       (i386_gdbarch_init): Set the frame unwind sniffers.
+       * avr-tdep.c (avr_frame_sniffer): Replace "avr_frame_sniffer".
+       (avr_gdbarch_init): Set the frame unwind sniffers.
+       * alpha-tdep.c (alpha_sigtramp_frame_sniffer): Replace
+       "alpha_sigtramp_frame_p"
+       (alpha_heuristic_frame_sniffer): Replace
+       "alpha_heuristic_frame_p".
+       (alpha_gdbarch_init): Set the frame unwind sniffers.
+       (alpha_dwarf2_init_abi): Ditto.
+       * alpha-mdebug-tdep.c (alpha_mdebug_frame_sniffer): Replace
+       "alpha_debug_frame_p".
+       (alpha_mdebug_frame_base_sniffer): Replace
+       "alpha_mdebug_frame_base_p".
+       (alpha_mdebug_init_abi): Set the frame unwind sniffers.
+       * d10v-tdep.c (d10v_frame_sniffer): Replace "d10v_frame_p".
+       (d10v_gdbarch_init): Set the frame unwind sniffer.
+       * dwarf2-frame.c (dwarf2_frame_sniffer): Replace "dwarf2_frame_p".
+       (dwarf2_frame_base_sniffer): Replace "dwarf2_frame_base_p".
+       * dwarf2-frame.h (dwarf2_frame_sniffer): Replace "dwarf2_frame_p".
+       (dwarf2_frame_base_sniffer): Replace "dwarf2_frame_base_p".
+       * dummy-frame.c (dummy_frame_sniffer): Replace "dummy_frame_p".
+       * dummy-frame.h (dummy_frame_sniffer): Replace "dummy_frame_p".
+
+2003-07-16  Michael Snyder  <msnyder@redhat.com>
+
+       * sh-tdep.c (sh_gdbarch_init): Fetch_registers for the sh3-dsp
+       should go thru sh_dsp_register_sim_regno, else the dsp regs
+       will not get the right values.
+
+2003-07-16  Corinna Vinschen  <vinschen@redhat.com>
+
+       * sh-tdep.c (sh_sh4_register_convert_to_virtual): Substitute call to
+       deprecated_store_floating by call to store_typed_floating.
+       (sh_sh4_register_convert_to_raw): Substitute call to
+       deprecated_extract_floating by call to extract_typed_floating.
+
+2003-07-16  Corinna Vinschen  <vinschen@redhat.com>
+
+       * sh-tdep.c (sh_gdbarch_init): Set double to 4 byte on sh2e and sh3e.
+
+2003-07-16  Corinna Vinschen  <vinschen@redhat.com>
+
+       * sh-tdep.c: Substitute calls to REGISTER_RAW_SIZE by calls to
+       register_size and calls to REGISTER_VIRTUAL_TYPE by calls to
+       gdbarch_register_type in 32 bit code throughout.  Avoid current_gdbarch
+       as possible.
+       (do_pseudo_register): Remove.
+       (sh_push_dummy_code): New function.
+       (sh64_store_struct_return): Rename from sh_store_struct_return.
+       Only called for sh64 now.
+       (sh_extract_struct_value_address): Regcache'ify.
+       (sh_push_dummy_call): Rename from sh_push_arguments.  Regcache'ify
+       and accomodate new tasks.
+       (sh64_push_return_address): Rename from sh_push_return_address.
+       Only called for sh64 now.
+       (sh_default_extract_return_value): Rename from sh_extract_return_value.
+       Regcache'ify.
+       (sh3e_sh4_extract_return_value): Regcache'ify.
+       (sh_default_store_return_value): Ditto.
+       (sh3e_sh4_store_return_value): Ditto.
+       (sh_default_register_byte): Remove.
+       (sh_sh4_register_byte): Remove.
+       (sh_default_register_raw_size): Remove.
+       (sh_sh4_register_raw_size): Remove.
+       (sh_register_virtual_size): Remove.
+       (sh_sh3e_register_virtual_type): Remove.
+       (sh_sh3e_register_type): New function.
+       (sh_sh4_register_virtual_type): Remove.
+       (sh_sh4_register_type): New function.
+       (sh_default_register_virtual_type): Remove.
+       (sh_default_register_type): New function.
+       (do_fv_register_info): Add parameters to accomodate call from
+       sh_print_registers_info.
+       (do_dr_register_info): Ditto.
+       (sh_print_pseudo_register): Rename from sh_do_pseudo_register.
+       Add parameters to accomodate call from sh_print_registers_info.
+       (sh_do_fp_register): Ditto.
+       (sh64_do_pseudo_register): Call do_dr_register_info,
+       do_fv_register_info and sh_do_fp_register with default parameters.
+       (sh_do_register): Add parameters to accomodate call from
+       sh_print_registers_info.
+       (sh_print_register): Ditto.
+       (sh_print_registers_info): Rename from sh_do_registers_info.
+       Add parameters to be used as gdbarch_print_registers_info
+       implementation.  Accomodate removed do_pseudo_register function
+       pointer.
+       (sh_compact_do_registers_info): Accomodate removed do_pseudo_register
+       function pointer. Call sh_print_register with default parameters.
+       (sh64_do_registers_info): Call sh_print_registers_info instead of
+       sh_do_registers_info.
+       (sh_gdbarch_init): Rearrange to cleanup and to allow easier
+       detection of deprecated vs. non-deprecated functionality.
+       Rename sh_call_dummy_words to sh64_call_dummy_words.  Remove
+       function pointer assignments by direct function calls.
+
+2003-07-15  Andrew Cagney  <cagney@redhat.com>
+
+       * frame.c (get_frame_id): Use frame_unwind_find_by_frame.
+       (frame_register_unwind, create_new_frame): Ditto.
+       (legacy_get_prev_frame, get_frame_type): Ditto.
+       (get_frame_base_address): Use frame_base_find_by_frame.
+       (get_frame_locals_address): Use frame_base_find_by_frame.
+       (get_frame_args_address): Use frame_base_find_by_frame.
+       * frame-base.h (frame_base_sniffer_ftype): Declare.
+       (frame_base_append_sniffer): Declare.
+       (frame_base_find_by_frame): Replace frame_base_find_by_pc.
+       * frame-base.c (append_predicate): Add a "sniffer" parameter.
+       (frame_base_append_sniffer): New function.
+       (frame_base_append_predicate): Add a NULL sniffer.
+       (frame_base_find_by_frame): Replace "frame_base_find_by_pc".
+       (struct frame_base_table): Add "sniffer".
+       (frame_base_free): Free the "sniffer" table.
+       * frame-unwind.h (frame_unwind_sniffer_ftype): Define.
+       (frame_unwind_append_sniffer): Declare.
+       (frame_unwind_find_by_frame): Replace frame_unwind_find_by_pc.
+       * frame-unwind.c (frame_unwind_free): Free the "sniffer" table.
+       (struct frame_unwind_table): Add "sniffer", delete "middle".
+       (append_predicate): Add "sniffer" parameter, append the sniffer.
+       (frame_unwind_init): Update append_predicate call.
+       (frame_unwind_append_sniffer): New function.
+       (frame_unwind_append_predicate): Update append_predicate call.
+       (frame_unwind_find_by_frame): Replace frame_unwind_find_by_pc.
+
+2003-07-15  Andrew Cagney  <cagney@redhat.com>
+
+       * frame.c (get_prev_frame): Move disabled inside_entry_func to
+       before code inhibiting repeated unwind attempts.  Add to
+       commentary on that test's problems.
+       * blockframe.c (inside_main_func): Look for "main" in the minimal
+       symbol table.
+       * d10v-tdep.c (d10v_frame_this_id): Delete check that frames are
+       identical.
+
+2003-07-15  Andrew Cagney  <cagney@redhat.com>
+
+       * complaints.c (struct explanation): Define.
+       (struct complaints): Change type of "explanation" to "struct
+       explanation".
+       (symfile_explanations): Convert to a "struct explanation" table.
+       (vcomplaint): Update.
+
+2003-07-15  Michal Ludvig  <mludvig@suse.cz>
+
+       * x86-64-linux-nat.c (regmap): Removed.
+       (supply_gregset, fill_gregset): Call 
+       x86_64_linux_(fill,supply)_gregset functions.
+       * x86-64-linux-tdep.c (USER_*): New defines.
+       (user_to_gdb_regmap, x86_64_core_fns): New structure.
+       (x86_64_linux_supply_gregset, x86_64_linux_fill_gregset):
+       New functions.
+       (fetch_core_registers): Ditto.
+       (_initialize_x86_64_linux_tdep): Call add_core_fns().
+       * x86-64-linux-tdep.h: New file.
+       * config/i386/x86-64linux.mh (NATDEPFILES): Remove corelow.o
+       and core-regset.o.
+       * config/i386/x86-64linux.mt (TDEPFILES): Add corelow.o.
+
+2003-07-13  Mark Kettenis  <kettenis@gnu.org>
+
+       * x86-64-tdep.c (x86_64_store_return_value): Use
+       regcache_cooked_write_part instead of regcache_cooked_write.
+
+       * configure.host: Add x86_64-*-freebsd*.
+       * configure.tgt: Add x86_64-*-freebsd*.
+       * Makefile.in (amd64fbsd-nat.o, amd64fbsd-tdep.o): New targets.
+       * amd64fbsd-nat.c: New file.
+       * amd64fbsd-tdep.c: New file.
+       * config/i386/nm-fbsd64.h: New file.
+       * config/i386/fbsd64.mh: New file.
+       * config/i386/fbsd64.mt: New file.
+
+2003-07-11  Mark Kettenis  <kettenis@gnu.org>
+
+       * alpha-tdep.h (struct gdbarch_tdep): Add members `sc_pc_offset',
+       `sc_regs_offset' and `sc_fpregs_offset'.
+       * alpha-tdep.c (SIGFRAME_PC_OFF, SIGFRAME_REGSAVE_OFF,
+       SIGFRAME_FPREGSAVE_OFF): Remove defines.
+       (alpha_sigtramp_register_address): Rewrite to use new members of
+       `struct gdbarch_tdep'.
+       (alpha_gdbarch_init): Initialize new members of struct
+       gdbarch_tdep'.
+       * alphafbsd-tdep.c (alphafbsd_use_struct_convention): Use
+       ALPHA_REGISTER_SIZE instead of DEPRECATED_REGISTER_SIZE.
+       (alphafbsd_sigtramp_start, alphafbsd_sigtramp_end): Nre variables.
+       (alphafbsd_pc_in_sigtramp): Implement.
+       (alphafbsd_sigtramp_offset): New function.
+       (alphafbsd_sigcontext_addr): New function.
+       (alphafbsd_init_abi): Initialize signal trampoline related members
+       of `struct gdbarch_tdep'.
+       (_initialize_alphafbsd_tdep): Add prototype.
+
+2003-07-11  Theodore A. Roth  <troth@openavr.org>
+
+       * Makefile.in (install-only): Quote sed expression when generating
+       transformed_name.
+
+2003-07-11  Richard Henderson  <rth@redhat.com>
+
+       * Makefile.in (dwarf2-frame.o): Add complaints_h.
+       * dwarf2-frame.c: Include complaints.h.
+       (decode_frame_entry_1): Rename from decode_frame_entry; tidy
+       variable initialization; return NULL on error.
+       (decode_frame_entry): New.
+
+2003-07-11  Andrew Cagney  <cagney@redhat.com>
+
+       * frame.h (frame_address_in_block): Delete declaration.
+       * blockframe.c (frame_address_in_block): Delete function.
+       (get_frame_block): Use get_frame_address_in_block.
+       (block_innermost_frame): Ditto.
+       * stack.c (print_frame, backtrace_command_1): Ditto.
+
+       * frame.h (get_frame_address_in_block): Declare.
+       (frame_unwind_address_in_block): Declare.
+       * frame.c (frame_unwind_address_in_block): New function.
+       (get_frame_address_in_block): New function.
+
+2003-07-10  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbarch.sh: Simplify predicate methods.  Remove need to provide
+       pre-default.   Note: re-generate has no effect.
+       
+2003-07-10  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbarch.sh: When a variable, but not a function, compare against
+       0.  Fix problem in previous patch.
+       * gdbarch.c: Re-generate.
+       
+2003-07-10  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbarch.sh: Use gdb_assert instead of internal_error.  Compare
+       functions against NULL, not 0.
+       * gdbarch.c: Re-generate.
+       
+2003-07-10  Fred Fish  <fnf@ninemoons.com>
+
+       * coff-solib.h (SOLIB_LOADED_LIBRARY_PATHNAME): Default to a
+       null string instead of a null pointer.
+       * solib.h (SOLIB_LOADED_LIBRARY_PATHNAME): Ditto.
+
+2003-07-09  Michael Snyder  <msnyder@redhat.com>
+
+       * sh-tdep.c (sh_dsp_register_sim_regno): Off-by-one error.
+
+2003-07-09  Mark Kettenis  <kettenis@gnu.org>
+
+       * x86-64-tdep.h (X86_64_RAX_REGNUM, X86_64_RDX_REGNUM,
+       X86_64_RDI_REGNUM, X86_64_RBP_REGNUM, X86_64_RSP_REGNUM,
+       X86_64_RIP_REGNUM, X86_64_EFLAGS_REGNUM, X86_64_ST0_REGNUM,
+       X86_64_XMM0_REGNUM, X86_64_XMM1_REGNUM): Moved here ...
+       * x86-64-tdep.c: ... from here.
+
+2003-07-09  Andreas Schwab  <schwab@suse.de>
+
+       * m68k-tdep.h (enum struct_return): Define.
+       (struct gdbarch_tdep): Add struct_return.
+       * m68k-tdep.c (m68k_push_dummy_call): Non-scalars bigger than 4
+       bytes are padded to the right, not to the left.  Pass struct value
+       address in register %a1, not on stack.
+       (m68k_use_struct_convention): New function.
+       (m68k_gdbarch_init): Set use_struct_convention.  Initialize
+       struct_return in tdep to pcc_struct_return.
+       * m68klinux-tdep.c (m68k_linux_init_abi): Set struct_return to
+       reg_struct_return.
+
+2003-07-09  Joel Brobecker  <brobecker@gnat.com>      
+
+       * somread.c (som_symfile_offsets): Fix compilation error.   
+
+2003-07-09  Andrew Cagney  <cagney@redhat.com>
+
+       * regcache.c (register_size): Only check REGISTER_RAW_SIZE once.
+       Add comments about the checks.
+
+2003-07-08  Andrew Cagney  <cagney@redhat.com>
+
+       * Makefile.in: Make dependency section headers consistent.
+       (config_h): Move to $BUILD headers section.
+       (exc_request_U_h, exc_request_S_h, msg_reply_S_h): Ditto.
+       (msg_U_h, notify_S_h, process_reply_S_h): Ditto.
+       (ada-exp.tab.c): Move to YACC/LEX section.
+       (ada-lex.c, c-exp.tab.c, f-exp.tab.c): Ditto.
+       (jv-exp.tab.c, m2-exp.tab.c, objc-exp.tab.c, p-exp.tab.c): Ditto.
+
+2003-07-08  Kris Warkentin  <kewarken@qnx.com>
+
+       * nto-procfs.c: Cleaned up a bunch of ARI hits.
+       Include "gdb_dirent.h" instead of <dirent.h>, replace all instances
+       of strerror with safe_strerror, use ISO C function definitions,
+       and replace instances of sprintf with snprintf.
+
+2003-07-07  Andrew Cagney  <cagney@redhat.com>
+
+       * frame.c (get_prev_frame): Enable check for identical frames.
+       Update comments.  Update error messages.
+
+2003-07-07  Joel Brobecker  <brobecker@gnat.com>
+
+        * hpread.c (hpread_psymtab_to_symtab_1): Fix compilation failure.
+
+2003-07-07  Joel Brobecker  <brobecker@gnat.com>
+
+        * xcoffread.c (xcoff_psymtab_to_symtab_1): Remove call to
+        sort_symtab_syms, no longer necessary.
+
+2003-07-07  Joel Brobecker  <brobecker@gnat.com>
+
+       * config/mips/tm-irix6.h (MIPS_REGISTER_TYPE): Add comment.
+
+2003-07-07  Joel Brobecker  <brobecker@gnat.com>
+
+       * mips-tdep.c (mips_register_raw_size): Fix compilation failure.
+       (mips_register_byte): Likewise.
+
+2003-07-07  Daniel Jacobowitz  <drow@mvista.com>
+
+       * Makefile.in (sparc_tdep_h): New.
+       (sparc-linux-nat.o, sparc-nat.o, sparc-tdep.o, sparc64nbsd-nat.o)
+       (sparcnbsd-nat.o, sparcnbsd-tdep.o): Depend on $(sparc_tdep_h).
+       * sparc-linux-nat.c: Include "sparc-tdep.h".
+       * sparc-nat.c: Likewise.
+       * sparc-tdep.c: Likewise.
+       * sparc64nbsd-nat.c: Likewise.
+       * sparcnbsd-nat.c: Likewise.
+       * sparcnbsd-tdep.c: Likewise.
+       * sparc-tdep.h: New file.
+       * config/sparc/tm-sparc.h: Remove prototypes for sparc_y_regnum
+       and sparc_npc_regnum.
+
+2003-07-07  Daniel Jacobowitz  <drow@mvista.com>
+
+       * mips-linux-nat.c (mips_linux_cannot_fetch_register)
+       (mips_linux_cannot_store_register): List supported instead of
+       unsupported registers.
+
+2003-07-07  Daniel Jacobowitz  <drow@mvista.com>
+
+       * disasm.c (dump_insns): Separate instructions from addresses.
+
+2003-07-07  Andreas Schwab  <schwab@suse.de>
+
+       * Makefile.in (m68k-tdep.o, m68klinux-tdep.o): Update
+       dependencies.
+       * m68k-tdep.c (NUM_FREGS): Delete.
+       (SIG_PC_FP_OFFSET): Delete.
+       (TARGET_M68K): Delete.
+       (P_MOVEAL_SP_FP, P_ADDAW_SP, P_ADDAL_SP, P_SUBQW_SP,
+       P_SUBQL_SP, P_LEA_SP_SP, P_LEA_PC_A5, P_FMOVEMX_SP,
+       P_MOVEL_SP, P_MOVEML_SP): Define.
+       (P_MOVL_SP_FP, P_MOVL, P_JSR, P_BSR, P_LEAL, P_MOVML, P_FMOVM,
+       P_TRAP): Delete.
+        (m68k_register_raw_size): Delete.
+       (m68k_register_virtual_size): Delete.
+       (m68k_register_type): Renamed from m68k_register_virtual_type and
+       add gdbarch argument.
+       (m68k_store_struct_return): Delete.
+       (m68k_deprecated_extract_return_value): Delete.
+       (m68k_deprecated_extract_struct_value_address): Delete.
+       (m68k_frame_chain): Delete.
+       (m68k_frame_saved_pc): Delete.
+       (m68k_fix_call_dummy): Delete.
+       (m68k_push_dummy_frame): Delete.
+       (m68k_pop_frame): Delete.
+       (m68k_extract_return_value): New function.
+       (m68k_store_return_value): Rewrite using regcache.
+       (m68k_extract_struct_value_address): Rewrite using regcache.
+       (m68k_push_dummy_call): New function.
+       (struct m68k_frame_cache): Define.
+       (m68k_alloc_frame_cache): New function.
+       (m68k_analyze_frame_setup): New function.
+       (m68k_analyze_register_saves): New function.
+       (m68k_analyze_prologue): New function.
+       (m68k_skip_prologue): Rewrite using above functions.
+       (m68k_unwind_pc): New function.
+       (m68k_frame_cache): New function.
+       (m68k_frame_this_id): New function.
+       (m68k_frame_prev_register): New function.
+       (m68k_frame_unwind): New variable.
+       (m68k_frame_p): New function.
+       (m68k_sigtramp_frame_cache): New function.
+       (m68k_sigtramp_frame_this_id): New function.
+       (m68k_sigtramp_frame_prev_register): New function.
+       (m68k_sigtramp_frame_unwind): New variable.
+       (m68k_sigtramp_frame_p): New function.
+       (m68k_frame_base_address): New function.
+       (m68k_frame_base): New function.
+       (m68k_unwind_dummy_id): New function.
+       (fill_gregset): Use regcache_collect.
+       (fill_fpregset): Likewise.
+       (m68k_saved_pc_after_call): Only define if SYSCALL_TRAP is
+       defined.
+       (m68k_gdbarch_init): Don't define call_dummy_words.  Don't set
+       deprecated_init_frame_pc, deprecated_store_struct_return,
+       deprecated_extract_return_value, deprecated_store_return_value,
+       deprecated_frame_chain, deprecated_frame_saved_pc,
+       deprecated_frame_init_saved_regs, deprecated_register_raw_size,
+       deprecated_register_virtual_size,
+       deprecated_max_register_raw_size,
+       deprecated_max_register_virtual_size,
+       deprecated_register_virtual_type, deprecated_register_size,
+       deprecated_register_byte, deprecated_register_bytes,
+       deprecated_fp_regnum, deprecated_use_generic_dummy_frames,
+       call_dummy_location, deprecated_call_dummy_breakpoint_offset,
+       deprecated_pc_in_call_dummy, deprecated_call_dummy_length,
+       deprecated_call_dummy_start_offset, deprecated_call_dummy_words,
+       deprecated_sizeof_call_dummy_words, deprecated_fix_call_dummy,
+       deprecated_push_dummy_frame, deprecated_pop_frame,
+       deprecated_dummy_write_sp.  Set deprecated_saved_pc_after_call
+       only if SYSCALL_TRAP is defined.  Set extract_return_value,
+       store_return_value, extract_struct_value_address, register_type,
+       push_dummy_call, unwind_dummy_id, unwind_pc.  Add two frame unwind
+       predicates.
+       * m68k-tdep.h (M68K_D1_REGNUM, M68K_NUM_REGS,
+       M68K_MAX_REGISTER_SIZE): Define.
+       (struct m68k_sigtramp_info): Define.
+       (struct gdbarch_tdep): Add get_sigtramp_info.
+       * m68klinux-nat.c (fetch_register): Use register_size instead of
+       REGISTER_RAW_SIZE.  Don't put assignment in if.
+       (store_register): Likewise.
+       (fetch_inferior_registers): Likewise.
+       (store_inferior_registers): Likewise.
+       * m68klinux-tdep.c (m68k_linux_sigtramp_saved_pc): Delete.
+       (m68k_linux_frame_saved_pc): Delete.
+       (m68k_linux_sigcontext_reg_offset,
+       m68k_linux_ucontext_reg_offset): Define.
+       (m68k_linux_get_sigtramp_info): New function.
+       (m68k_linux_extract_return_value): Rewrite using regcache.
+       (m68k_linux_store_return_value): Likewise.
+       (m68k_linux_extract_struct_value_address): Likewise.
+       (m68k_linux_init_abi): Set get_sigtramp_info in tdep structure.
+       Don't set deprecated_frame_saved_pc,
+       deprecated_extract_return_value, deprecated_store_return_value,
+       deprecated_extract_struct_value_address.  Set
+       extract_return_value, store_return_value,
+       extract_struct_value_address.
+
+2003-07-07  Andrew Cagney  <cagney@redhat.com>
+
+       * expprint.c: Include "user-regs.h" instead of "frame.h".
+       (print_subexp): Use user_reg_map_regnum_to_name, instead of
+       frame_map_regnum_to_name.
+       * frame.c: Include "user-regs.h" instead of "builtin-regs.h".
+       (frame_map_name_to_regnum): Simplify, call
+       user_reg_map_name_to_regnum.
+       (frame_map_regnum_to_name): Simplify, call
+       user_reg_map_regnum_to_name.
+       (frame_register_unwind): Update.
+       * std-regs.c: Include "user-regs.h" instead of "builtin-regs.h".
+       (_initialize_frame_reg): Call user_reg_add_builtin.
+       * findvar.c: Include "user-regs.h" instead of "builtin-regs.h".
+       (value_of_register): Use value_of_user_reg.
+       * eval.c (evaluate_subexp_standard): Update.
+       * parse.c (write_dollar_variable): Update.
+       * d10v-tdep.c (d10v_print_registers_info): Update.
+       * infcmd.c (registers_info): Update.
+       * Makefile.in (SFILES): Delete "builtin-regs.c", add "user-regs.c".
+       (builtin_regs_h): Delete macro.
+       (user_regs_h): Define.
+       (COMMON_OBS): Delete "builtin-regs.o", add "user-regs.o".
+       (builtin-regs.o): Delete target.
+       (user-regs.o): Specify dependencies.
+       (expprint.o): Update dependencies.
+       (findvar.o): Update dependencies.
+       (frame.o): Update dependencies.
+       (std-regs.o): Update dependencies.
+
+2003-07-06  Christopher Faylor  <cgf@redhat.com>
+
+       * win32-nat.c (solib_symbols_add): Use one variable for all section
+       address stuff.  Pass variable rather than address of variable to
+       safe_symbol_file_add.
+
+2003-07-06  Andreas Schwab  <schwab@suse.de>
+
+       * m68klinux-nat.c (fill_fpregset): Fix use of loop index.
+
+2003-07-04  Joel Brobecker  <brobecker@gnat.com>
+
+       * rs6000-nat.c (vmap_symtab): Fix compilation error.
+
+2003-07-04  Kris Warkentin  <kewarken@qnx.com>
+
+       * config/i386/nto.mh: Set XM_FILE to xm-i386.h
+
+2003-07-04  Kris Warkentin  <kewarken@qnx.com>
+
+       * nto-procfs.c: New file.  Native procfs support for QNX Neutrino.
+       * config/i386/nto.mh: New file.
+       * config/i386/nm-nto.h: New file.
+       * configure.host: Add i[3456]86-*-nto*.
+
+2003-07-03  Joel Brobecker  <brobecker@gnat.com>
+
+       * remote-vx.c (vx_add_symbols): Fix compilation error.
+
+2003-07-03  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbarch.sh (REGISTER_NAME): Do not supply a default.
+       * gdbarch.h, gdbarch.c: Re-generate.
+       * config/sparc/tm-sparc.h (REGISTER_NAME): Define.
+       (legacy_register_name): Declare.
+       * config/sparc/tm-sp64.h (legacy_register_name): Declare.
+       (REGISTER_NAME): Define.
+       * sparc-tdep.c (legacy_register_name): New function.
+       * config/pa/tm-hppa64.h (REGISTER_NAMES): Delete macro.
+       (REGISTER_NAME): Define.
+       (hppa64_register_name): Declare.
+       * config/pa/tm-hppa.h (REGISTER_NAMES): Delete macro.
+       * hppa-tdep.c (hppa_gdbarch_init): Set hppa_register_name.
+       (hppa64_register_name): New function.
+       (hppa_register_name): New function.
+       * arch-utils.c (legacy_register_name): Delete.
+       * arch-utils.h (legacy_register_name): Delete.
+
+2003-07-03  Daniel Jacobowitz  <drow@mvista.com>
+
+       * cli/cli-interp.c (cli_interpreter_resume): Update the
+       cli_uiout's stream to gdb_stdout.
+
+2003-07-03  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbarch.sh (REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE): Add
+       predicate.
+       * gdbarch.h, gdbarch.c: Re-generate.
+       * regcache.c (init_regcache_descr): Use legacy code when either
+       REGISTER_BYTE or REGISTER_RAW_SIZE is set.
+
+2003-07-02  Daniel Jacobowitz  <drow@mvista.com>
+
+       * NEWS: Move "set logging" entry into GDB 6.0 section.
+
+2003-07-02  Jim Blandy  <jimb@redhat.com>
+
+       * s390-tdep.c (struct frame_extra_info): new member:
+       'stack_bought_valid'.
+       (s390_get_frame_info): Set fextra_info->stack_bought_valid if we
+       initialize fextra_info->stack_bought.
+       (s390_frameless_function_invocation): Don't trust the value of
+       fextra_info_ptr->stack_bought unless
+       fextra_info->stack_bought_valid is set.
+
+       New S390 prologue analyzer.
+       * s390-tdep.c (struct prologue_value, enum pv_boolean): New types.
+       (pv_set_to_unknown, pv_set_to_constant, pv_set_to_register,
+       pv_constant_last, pv_add, pv_add_constant, pv_subtract,
+       pv_logical_and, pv_is_identical, pv_is_register, pv_is_array_ref,
+       compute_x_addr, s390_on_stack, s390_store,
+       s390_get_signal_frame_info): New functions.
+       (S390_NUM_SPILL_SLOTS): New macro.
+       (s390_get_frame_info): Rewritten.
+       (is_arg_reg): Deleted.
+
+        Break out the decoding of S/390 instructions into separate
+        functions, to make it more legible, and easier to check
+        against the spec.
+        * s390-tdep.c (is_ri, is_ril, is_rr, is_rre, is_rs, is_rse,
+       is_rx, is_rxe): New functions.
+       (op1_aghi, op2_aghi, op1_ahi, op2_ahi, op_ar, op_basr, op1_bras,
+       op2_bras, op_l, op_la, op1_larl, op2_larl, op_lgr, op1_lghi,
+       op2_lghi, op1_lhi, op2_lhi, op_lr, op_nr, op_ngr, op_s, op_st,
+       op_std, op1_stg, op2_stg, op_stm, op1_stmg, op2_stmg, op_svc): New
+       enums for opcode values.  (Is this an improvement?)
+
+2003-07-02  Andrew Cagney  <cagney@redhat.com>
+
+       * i386-tdep.c: Revert change committed as part of trad-frame code
+       below.
+
+2003-07-02  Daniel Jacobowitz  <drow@mvista.com>
+
+       * breakpoint.c (insert_catchpoint): Make static.
+
+2003-07-02  Andreas Schwab  <schwab@suse.de>
+
+       * ia64-tdep.c (ia64_push_dummy_call): Define as combination of
+       former ia64_push_arguments and ia64_push_return_address, and use
+       regcache functions instead of read/write_register.
+       (ia64_gdbarch_init): Set push_dummy_call instead of
+       deprecated_push_arguments and deprecated_push_return_address.
+
+2003-07-01  Andreas Jaeger  <aj@suse.de>
+
+       * x86-64-tdep.c (x86_64_push_arguments): Align stack to 16-byte
+       before the call.
+       Set %rax only to number of SSE registers used.
+
+2003-07-01  Andrew Cagney  <cagney@redhat.com>
+
+       * trad-frame.h: Update comments, a -1 .addr is reserved.
+       (trad_frame_value_p, trad_frame_addr_p): Declare.
+       (trad_frame_reg_p): Declare.
+       (trad_frame_set_value): Rename trad_frame_register_value.
+       (trad_frame_set_unknown): Declare.
+       * trad-frame.c (trad_frame_realreg_p): New function.
+       (trad_frame_addr_p, trad_frame_value_p): New function.
+       (trad_frame_set_unknown): New function.
+       (trad_frame_alloc_saved_regs): Initialize .addr to -1, not zero.
+       (trad_frame_prev_register): Use trad_frame_realreg_p,
+       trad_frame_addr_p and trad_frame_value_p.
+       (trad_frame_set_value): Rename trad_frame_register_value.
+       * d10v-tdep.c (d10v_frame_unwind_cache): Use trad_frame_addr_p
+       and trad_frame_set_value.
+
+2003-06-30  Jim Blandy  <jimb@redhat.com>
+
+       Patch from IBM (authors unspecified, probably Ulrich Weigand and
+       Gerhard Tonn) for argument passing on the S/390 and S/390x:
+       * s390-tdep.c (S390_STACK_FRAME_OVERHEAD): This is always space
+       for 16 registers, and then 32 more bytes.
+       (S390_STACK_PARAMETER_ALIGNMENT, S390_NUM_FP_PARAMETER_REGISTERS):
+       New macros.
+       (is_double_arg): The s390x doesn't handle DOUBLE_ARGS specially.
+       Move up in the file, since it's now used by is_simple_arg.
+       (is_simple_arg): Don't assume registers are four bytes long.
+       Exclude all double arguments.  Extended floats are not simple
+       args.
+       (is_power_of_two): New function.
+       (pass_by_copy_ref): Call is_power_of_two, and check that the
+       length fits in a register, rather than listing all the acceptable
+       sizes.  Extended floats are not passed by reference.
+       (s390_push_arguments): Don't assume registers are four bytes long.
+       Reserve an argument register to point to the buffer for structures
+       returned by value.  Use S390_NUM_FP_PARAMETER_REGISTERS and
+       S390_STACK_FRAME_OVERHEAD.
+
+2003-06-30  Andreas Schwab  <schwab@suse.de>
+
+       * utils.c (internal_vproblem): Use xvasprintf, not xasprintf, to
+       format error message.
+
+2003-06-30  Joel Brobecker  <brobecker@gnat.com>
+
+       * sparc-tdep.c (stop_after_trap): Remove declaration, not used.
+
+2003-06-30  David Carlton  <carlton@kealia.com>
+
+       Band-aid for PR c++/1245.
+       * Makefile.in (cp-support.o): Depend on complaints_h.
+       * cp-support.c: Include complaints.h.  Add declaration for
+       find_last_component.
+       (cp_find_first_component): Separate code into
+       cp_find_first_component_aux.
+       (cp_find_first_component_aux): Call demangled_name_complaint.
+       (demangled_name_complaint): New.
+
+2003-06-30  Andrew Cagney  <cagney@redhat.com>
+
+       * remote.c (remote_write_bytes): Explicitly compute and then use
+       the payload size.  Update comments to reflect.  Fixes problem of
+       GDB not sending small packets as found by Fred Fish.
+
+2003-06-30  Andrew Cagney  <cagney@redhat.com>
+
+       * remote.c (remote_async_wait): Fix -Wformat problem.
+
+2003-06-29  Andrew Cagney  <cagney@redhat.com>
+
+       * remote.c (remote_wait): Call error, and not warning, when the
+       packet is corrupt.
+       (remote_async_wait): Ditto.
+
+2003-06-29  Daniel Jacobowitz  <drow@mvista.com>
+
+       * sparc-tdep.c (sparc_y_regnum): Make external again.
+
+2003-06-29  Daniel Jacobowitz  <drow@mvista.com>
+
+       * cli/cli-logging.c (pop_output_files): Add void to function
+       definition.
+
+2003-06-29  Andrew Cagney  <cagney@redhat.com>
+
+       * frame.c (frame_register_unwind): Use unsigned char when dumping
+       the buffer contents.
+
+2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       * cli/cli-logging.c: New file.
+       * cli-out.c (struct ui_out_data): Add original_stream.
+       (cli_redirect): New function.
+       (cli_ui_out_impl): Add cli_redirect.
+       (cli_out_new): Initialize original_stream.
+       * ui-out.c (default_ui_out_impl): Add NULL for redirect member.
+       (uo_redirect, ui_out_redirect): New.
+       * ui-out.h (struct ui_out_impl): Add redirect member.
+       (redirect_ftype): New.
+       (ui_out_redirect): Add prototype.
+       * Makefile.in: Add rules for cli-logging.c.
+       * NEWS: Mention "set logging".
+
+2003-06-27  Elena Zannoni  <ezannoni@redhat.com>
+
+       * config/powerpc/ppc64-linux.mh (NATDEPFILES): Add linux-nat.o.
+
+2003-06-27  Andrew Cagney  <cagney@redhat.com>
+
+       * m68hc11-tdep.c (m68hc11_call_dummy_address): Delete function.
+       (m68hc11_gdbarch_init): Do not set call_dummy_address.
+       * avr-tdep.c (avr_call_dummy_address): Delete function.
+       (avr_gdbarch_init): Do not set call_dummy_address.
+
 2003-06-27  David Carlton  <carlton@kealia.com>
 
        * dwarf2read.c (add_partial_symbol): Add 'objfile' argument to
index bd09ea57b377a3b8757372357dfebec96d176ca5..04431e9e0f41cdcf911680018ce1a647dd8d557c 100644 (file)
@@ -146,10 +146,12 @@ TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
 SUBDIR_CLI_OBS = \
        cli-dump.o \
        cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o \
+       cli-logging.o \
        cli-interp.o
 SUBDIR_CLI_SRCS = \
        cli/cli-dump.c \
        cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \
+       cli/cli-logging.c \
        cli/cli-interp.c \
        cli/cli-utils.c
 SUBDIR_CLI_DEPS =
@@ -508,7 +510,7 @@ TARGET_FLAGS_TO_PASS = \
 
 SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
        ax-general.c ax-gdb.c \
-       bcache.c block.c blockframe.c breakpoint.c buildsym.c builtin-regs.c \
+       bcache.c block.c blockframe.c breakpoint.c buildsym.c \
        c-exp.y c-lang.c c-typeprint.c c-valprint.c \
        charset.c cli-out.c coffread.c coff-pe-read.c \
        complaints.c completer.c corefile.c \
@@ -552,6 +554,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
        tui/tuiStack.c tui/tuiStack.h tui/tuiWin.c tui/tuiWin.h \
        tui/tui-file.h tui/tui-file.c tui/tui-out.c tui/tui-hooks.c \
        ui-out.c utils.c ui-file.h ui-file.c \
+       user-regs.c \
        valarith.c valops.c valprint.c values.c varobj.c \
        wrapper.c
 
@@ -596,17 +599,33 @@ readline_headers = \
        $(READLINE_SRC)/keymaps.h \
        $(READLINE_SRC)/readline.h
 
+#
+# $BUILD/ headers
+#
+
+config_h = config.h
+exc_request_U_h = exc_request_U.h
+exc_request_S_h = exc_request_S.h
+msg_reply_S_h = msg_reply_S.h
+msg_U_h = msg_U.h
+notify_S_h = notify_S.h
+process_reply_S_h = process_reply_S.h
+
+#
+# config/ headers
+#
+
 xm_h =         @xm_h@
 tm_h =         @tm_h@
 nm_h =         @nm_h@
 
 #
-# gdb/ header files
+# gdb/ headers
 #
 
 ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h)
-alpha_tdep_h = alpha-tdep.h
 alphabsd_tdep_h = alphabsd-tdep.h
+alpha_tdep_h = alpha-tdep.h
 annotate_h = annotate.h $(symtab_h) $(gdbtypes_h)
 arch_utils_h = arch-utils.h
 arm_tdep_h = arm-tdep.h
@@ -616,70 +635,65 @@ bcache_h = bcache.h
 block_h = block.h
 breakpoint_h = breakpoint.h $(frame_h) $(value_h) $(gdb_events_h)
 buildsym_h = buildsym.h
-builtin_regs_h = builtin-regs.h
-c_lang_h = c-lang.h $(value_h) $(macroexp_h)
 call_cmds_h = call-cmds.h
-ch_lang_h = ch-lang.h
+charset_h = charset.h
+c_lang_h = c-lang.h $(value_h) $(macroexp_h)
 cli_out_h = cli-out.h
-coff_solib_h = coff-solib.h
 coff_pe_read_h = coff-pe-read.h
+coff_solib_h = coff-solib.h
 command_h = command.h
 complaints_h = complaints.h
 completer_h = completer.h
-config_h = config.h
 cp_abi_h = cp-abi.h
 cp_support_h = cp-support.h $(symtab_h)
 dcache_h = dcache.h
-defs_h = defs.h $(config_h) $(gdb_locale_h) $(gdb_signals_h) $(ansidecl_h) \
+defs_h = defs.h $(config_h) $(ansidecl_h) $(gdb_locale_h) $(gdb_signals_h) \
        $(libiberty_h) $(progress_h) $(bfd_h) $(tui_h) $(ui_file_h) $(xm_h) \
        $(nm_h) $(tm_h) $(fopen_same_h) $(gdbarch_h) $(arch_utils_h)
 dictionary_h = dictionary.h
 disasm_h = disasm.h
 doublest_h = doublest.h $(floatformat_h)
-dst_h = dst.h
 dummy_frame_h = dummy-frame.h
-dwarf2cfi_h = dwarf2cfi.h
 dwarf2expr_h = dwarf2expr.h
-dwarf2loc_h = dwarf2loc.h
 dwarf2_frame_h = dwarf2-frame.h
+dwarf2loc_h = dwarf2loc.h
 environ_h = environ.h
 event_loop_h = event-loop.h
 event_top_h = event-top.h
-exc_request_U_h = exc_request_U.h
-exc_request_S_h = exc_request_S.h
 expression_h = expression.h $(symtab_h) $(doublest_h)
 f_lang_h = f-lang.h
+frame_base_h = frame-base.h
 frame_h = frame.h
 frame_unwind_h = frame-unwind.h $(frame_h)
-frame_base_h = frame-base.h
-gdb_events_h = gdb-events.h
-gdb_stabs_h = gdb-stabs.h
-gdb_h = gdb.h
+gdbarch_h = gdbarch.h $(dis_asm_h) $(inferior_h) $(symfile_h)
 gdb_assert_h = gdb_assert.h
+gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h)
+gdbcore_h = gdbcore.h $(bfd_h)
 gdb_dirent_h = gdb_dirent.h
+gdb_events_h = gdb-events.h
+gdb_h = gdb.h
 gdb_locale_h = gdb_locale.h
 gdb_obstack_h = gdb_obstack.h $(obstack_h)
 gdb_proc_service_h = gdb_proc_service.h $(gregset_h)
 gdb_regex_h = gdb_regex.h $(xregex_h)
+gdb_stabs_h = gdb-stabs.h
 gdb_stat_h = gdb_stat.h
 gdb_string_h = gdb_string.h
 gdb_thread_db_h = gdb_thread_db.h
-gdb_vfork_h = gdb_vfork.h
-gdb_wait_h = gdb_wait.h
-gdbarch_h = gdbarch.h $(dis_asm_h) $(inferior_h)
-gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h)
-gdbcore_h = gdbcore.h $(bfd_h)
 gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h)
 gdbtypes_h = gdbtypes.h
+gdb_vfork_h = gdb_vfork.h
+gdb_wait_h = gdb_wait.h
 gnu_nat_h = gnu-nat.h
 gregset_h = gregset.h
 i386_linux_tdep_h = i386-linux-tdep.h
 i386_tdep_h = i386-tdep.h
 i387_tdep_h = i387-tdep.h
-inf_loop_h = inf-loop.h
 infcall_h = infcall.h
 inferior_h = inferior.h $(breakpoint_h) $(target_h) $(frame_h)
+inf_loop_h = inf-loop.h
 inflow_h = inflow.h $(terminal_h)
+infttrace_h = infttrace.h
 interps_h = interps.h
 jv_lang_h = jv-lang.h
 kod_h = kod.h
@@ -694,45 +708,43 @@ macrotab_h = macrotab.h
 main_h = main.h
 memattr_h = memattr.h
 minimon_h = minimon.h
-mips_tdep_h = mips-tdep.h
 mipsnbsd_tdep_h = mipsnbsd-tdep.h
+mips_tdep_h = mips-tdep.h
 monitor_h = monitor.h
-msg_reply_S_h = msg_reply_S.h
-msg_U_h = msg_U.h
 nbsd_tdep_h = nbsd-tdep.h
-notify_S_h = notify_S.h
 ns32k_tdep_h = ns32k-tdep.h
+nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h)
 objc_lang_h = objc-lang.h
 objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
 observer_h = observer.h
 ocd_h = ocd.h
 osabi_h = osabi.h
-p_lang_h = p-lang.h
 pa64solib_h = pa64solib.h
 parser_defs_h = parser-defs.h $(doublest_h)
-ppc_tdep_h = ppc-tdep.h
+p_lang_h = p-lang.h
 ppcnbsd_tdep_h = ppcnbsd-tdep.h
+ppc_tdep_h = ppc-tdep.h
 proc_utils_h = proc-utils.h
-process_reply_S_h = process_reply_S.h
 regcache_h = regcache.h
 reggroups_h = reggroups.h
-remote_utils_h = remote-utils.h $(target_h)
-remote_h = remote.h
 remote_fileio_h = remote-fileio.h
+remote_h = remote.h
+remote_utils_h = remote-utils.h $(target_h)
 scm_lang_h = scm-lang.h $(scm_tags_h)
 scm_tags_h = scm-tags.h
 sentinel_frame_h = sentinel-frame.h
-ser_unix_h = ser-unix.h
 serial_h = serial.h
-sh_tdep_h = sh-tdep.h
+ser_unix_h = ser-unix.h
 shnbsd_tdep_h = shnbsd-tdep.h
+sh_tdep_h = sh-tdep.h
 sim_regno_h = sim-regno.h
-solib_svr4_h = solib-svr4.h
 solib_h = solib.h
+solib_svr4_h = solib-svr4.h
 solist_h = solist.h
 somsolib_h = somsolib.h
 source_h = source.h
 sparcnbsd_tdep_h = sparcnbsd-tdep.h
+sparc_tdep_h = sparc-tdep.h
 srec_h = srec.h
 stabsread_h = stabsread.h
 stack_h = stack.h
@@ -741,19 +753,21 @@ symtab_h = symtab.h
 target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h)
 terminal_h = terminal.h
 top_h = top.h
-trad_frame_h = trad-frame.h
-infttrace_h = infttrace.h
 tracepoint_h = tracepoint.h
+trad_frame_h = trad-frame.h
 typeprint_h = typeprint.h
 ui_file_h = ui-file.h
 ui_out_h = ui-out.h
+user_regs_h = user-regs.h
 valprint_h = valprint.h
-value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) $(expression_h)
+value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
+       $(expression_h)
 varobj_h = varobj.h $(symtab_h) $(gdbtypes_h)
 vax_tdep_h = vax-tdep.h
 version_h = version.h
 wince_stub_h = wince-stub.h
 wrapper_h = wrapper.h $(gdb_h)
+x86_64_linux_tdep_h = x86-64-linux-tdep.h
 x86_64_tdep_h = x86-64-tdep.h $(i386_tdep_h)
 xcoffsolib_h = xcoffsolib.h
 xmodem_h = xmodem.h
@@ -784,22 +798,20 @@ mi_parse_h = $(srcdir)/mi/mi-parse.h
 # gdb/tui/ headers
 #
 
-tui_file_h = $(srcdir)/tui/tui-file.h
-tui_h = $(srcdir)/tui/tui.h $(ansidecl_h)
 tuiCommand_h = $(srcdir)/tui/tuiCommand.h
-tuiData_h = $(srcdir)/tui/tuiData.h
 tuiDataWin_h = $(srcdir)/tui/tuiDataWin.h
+tuiData_h = $(srcdir)/tui/tuiData.h
 tuiDisassem_h = $(srcdir)/tui/tuiDisassem.h
 tuiGeneralWin_h = $(srcdir)/tui/tuiGeneralWin.h
 tuiIO_h = $(srcdir)/tui/tuiIO.h
 tuiLayout_h = $(srcdir)/tui/tuiLayout.h
 tuiRegs_h = $(srcdir)/tui/tuiRegs.h
-tuiSource_h = $(srcdir)/tui/tuiSource.h $(defs_h)
 tuiSourceWin_h = $(srcdir)/tui/tuiSourceWin.h
+tuiSource_h = $(srcdir)/tui/tuiSource.h $(defs_h)
 tuiStack_h = $(srcdir)/tui/tuiStack.h
 tuiWin_h = $(srcdir)/tui/tuiWin.h
-
-charset_h =    charset.h
+tui_file_h = $(srcdir)/tui/tui-file.h
+tui_h = $(srcdir)/tui/tui.h $(ansidecl_h)
 
 # Header files that need to have srcdir added.  Note that in the cases
 # where we use a macro like $(gdbcmd_h), things are carefully arranged
@@ -860,7 +872,7 @@ COMMON_OBS = version.o block.o blockframe.o breakpoint.o findvar.o regcache.o \
        event-loop.o event-top.o inf-loop.o completer.o \
        gdbarch.o arch-utils.o gdbtypes.o osabi.o copying.o $(DEPFILES) \
        memattr.o mem-break.o target.o parse.o language.o $(YYOBJ) buildsym.o \
-       builtin-regs.o std-regs.o \
+       std-regs.o \
        signals.o \
        kod.o kod-cisco.o \
        gdb-events.o \
@@ -880,6 +892,7 @@ COMMON_OBS = version.o block.o blockframe.o breakpoint.o findvar.o regcache.o \
        c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \
        nlmread.o serial.o mdebugread.o top.o utils.o \
        ui-file.o \
+       user-regs.o \
        frame.o frame-unwind.o doublest.o \
        frame-base.o \
        gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \
@@ -944,7 +957,7 @@ gdb.z:gdb.1
 install: all install-only
 install-only: $(CONFIG_INSTALL)
        transformed_name=`t='$(program_transform_name)'; \
-                         echo gdb | sed -e $$t` ; \
+                         echo gdb | sed -e "$$t"` ; \
                if test "x$$transformed_name" = x; then \
                  transformed_name=gdb ; \
                else \
@@ -1211,141 +1224,6 @@ version.c: Makefile version.in
 version.o: version.c $(version_h)
 
 
-# LANG-exp.tab.c is generated in objdir from LANG-exp.y if it doesn't
-# exist in srcdir, then compiled in objdir to LANG-exp.tab.o.
-
-# If we said LANG-exp.tab.c rather than ./c-exp.tab.c some makes would
-# sometimes re-write it into $(srcdir)/c-exp.tab.c.
-
-# Remove bogus decls for malloc/realloc/free which conflict with
-# everything else.  Strictly speaking c-exp.tab.c should therefore
-# depend on Makefile.in, but that was a pretty big annoyance.
-
-# See comments above ...
-.PRECIOUS: c-exp.tab.c
-c-exp.tab.o: c-exp.tab.c
-c-exp.tab.c: c-exp.y
-       $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/c-exp.y  y.tab.c c-exp.tmp -- $(YFLAGS) 
-       -sed -e '/extern.*malloc/d' \
-            -e '/extern.*realloc/d' \
-            -e '/extern.*free/d' \
-            -e '/include.*malloc.h/d' \
-            -e 's/malloc/xmalloc/g' \
-            -e 's/realloc/xrealloc/g' \
-            -e '/^#line.*y.tab.c/d' \
-         < c-exp.tmp > c-exp.new
-       -rm c-exp.tmp
-       mv c-exp.new ./c-exp.tab.c
-
-# See comments above ...
-.PRECIOUS: objc-exp.tab.c
-objc-exp.tab.o: objc-exp.tab.c
-objc-exp.tab.c: objc-exp.y
-       $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/objc-exp.y y.tab.c objc-exp.tmp -- $(YFLAGS) 
-       -sed -e '/extern.*malloc/d' \
-            -e '/extern.*realloc/d' \
-            -e '/extern.*free/d' \
-            -e '/include.*malloc.h/d' \
-            -e 's/malloc/xmalloc/g' \
-            -e 's/realloc/xrealloc/g' \
-            -e '/^#line.*y.tab.c/d' \
-         < objc-exp.tmp > objc-exp.new
-       -rm objc-exp.tmp
-       mv objc-exp.new ./objc-exp.tab.c
-
-# See comments above ...
-.PRECIOUS: jv-exp.tab.c
-jv-exp.tab.o: jv-exp.tab.c
-jv-exp.tab.c: jv-exp.y
-       $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/jv-exp.y  y.tab.c jv-exp.tmp -- $(YFLAGS) 
-       -sed -e '/extern.*malloc/d' \
-            -e '/extern.*realloc/d' \
-            -e '/extern.*free/d' \
-            -e '/include.*malloc.h/d' \
-            -e 's/malloc/xmalloc/g' \
-            -e 's/realloc/xrealloc/g' \
-            -e '/^#line.*y.tab.c/d' \
-         < jv-exp.tmp > jv-exp.new
-       -rm jv-exp.tmp
-       mv jv-exp.new ./jv-exp.tab.c
-
-# See comments above ...
-.PRECIOUS: f-exp.tab.c
-f-exp.tab.o: f-exp.tab.c
-f-exp.tab.c: f-exp.y
-       $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/f-exp.y  y.tab.c f-exp.tmp -- $(YFLAGS) 
-       -sed -e '/extern.*malloc/d' \
-            -e '/extern.*realloc/d' \
-            -e '/extern.*free/d' \
-            -e '/include.*malloc.h/d' \
-            -e 's/malloc/xmalloc/g' \
-            -e 's/realloc/xrealloc/g' \
-            -e '/^#line.*y.tab.c/d' \
-         < f-exp.tmp > f-exp.new
-       -rm f-exp.tmp
-       mv f-exp.new ./f-exp.tab.c
-
-# See comments above ...
-.PRECIOUS: m2-exp.tab.c
-m2-exp.tab.o: m2-exp.tab.c
-m2-exp.tab.c: m2-exp.y
-       $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/m2-exp.y  y.tab.c m2-exp.tmp -- $(YFLAGS) 
-       -sed -e '/extern.*malloc/d' \
-            -e '/extern.*realloc/d' \
-            -e '/extern.*free/d' \
-            -e '/include.*malloc.h/d' \
-            -e 's/malloc/xmalloc/g' \
-            -e 's/realloc/xrealloc/g' \
-            -e '/^#line.*y.tab.c/d' \
-         < m2-exp.tmp > m2-exp.new
-       -rm m2-exp.tmp
-       mv m2-exp.new ./m2-exp.tab.c
-
-# See comments above ...
-.PRECIOUS: ada-exp.tab.c
-ada-exp.tab.o: ada-exp.tab.c
-ada-exp.tab.c: ada-exp.y 
-       $(YACC) $(YFLAGS) $(srcdir)/ada-exp.y
-       -sed -e '/extern.*malloc/d' \
-       -e '/extern.*realloc/d' \
-       -e '/extern.*free/d' \
-       -e '/include.*malloc.h/d' \
-       -e 's/malloc/xmalloc/g' \
-       -e 's/realloc/xrealloc/g' \
-       < y.tab.c > ada-exp.new
-       -rm y.tab.c
-       mv ada-exp.new ./ada-exp.tab.c
-
-# See comments above ...
-.PRECIOUS: ada-lex.c
-ada-lex.o: ada-lex.c
-ada-lex.c: ada-lex.l
-       @if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
-           echo $(FLEX) -Isit $(srcdir)/ada-lex.l ">" ada-lex.c; \
-           $(FLEX) -Isit $(srcdir)/ada-lex.l > ada-lex.c; \
-       elif [ ! -f ada-lex.c -a ! -f $(srcdir)/ada-lex.c ]; then \
-           echo "ada-lex.c missing and flex not available."; \
-           false; \
-       elif [ ! -f ada-lex.c ]; then \
-           echo "Warning: ada-lex.c older than ada-lex.l and flex not available."; \
-       fi
-
-# See comments above ...
-.PRECIOUS: p-exp.tab.c
-p-exp.tab.o: p-exp.tab.c
-p-exp.tab.c: p-exp.y
-       $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/p-exp.y  y.tab.c p-exp.tmp -- $(YFLAGS)
-       -sed -e '/extern.*malloc/d' \
-            -e '/extern.*realloc/d' \
-            -e '/extern.*free/d' \
-            -e '/include.*malloc.h/d' \
-            -e 's/malloc/xmalloc/g' \
-            -e 's/realloc/xrealloc/g' \
-            -e '/^#line.*y.tab.c/d' \
-         < p-exp.tmp > p-exp.new
-       -rm p-exp.tmp
-       mv p-exp.new ./p-exp.tab.c
-
 lint: $(LINTFILES)
        $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \
           `echo $(DEPFILES) | sed 's/\.o /\.c /g'`
@@ -1466,41 +1344,151 @@ z8k-tdep.o: $(srcdir)/z8k-tdep.c
                $(srcdir)/z8k-tdep.c
 
 #
-# Generated YACC/LEX dependencies
+# YACC/LEX dependencies
 #
+# LANG-exp.tab.c is generated in objdir from LANG-exp.y if it doesn't
+# exist in srcdir, then compiled in objdir to LANG-exp.tab.o.  If we
+# said LANG-exp.tab.c rather than ./c-exp.tab.c some makes would
+# sometimes re-write it into $(srcdir)/c-exp.tab.c.  Remove bogus
+# decls for malloc/realloc/free which conflict with everything else.
+# Strictly speaking c-exp.tab.c should therefore depend on
+# Makefile.in, but that was a pretty big annoyance.
 
+.PRECIOUS: ada-exp.tab.c
+ada-exp.tab.o: ada-exp.tab.c $(defs_h) $(expression_h) $(value_h) \
+       $(parser_defs_h) $(language_h) $(ada_lang_h) $(bfd_h) $(symfile_h) \
+       $(objfiles_h) $(frame_h) $(block_h) $(ada_lex_c)
+ada-exp.tab.c: ada-exp.y
+       $(SHELL) $(YLWRAP) "$(YACC)" \
+           $(srcdir)/ada-exp.y  y.tab.c ada-exp.tmp -- $(YFLAGS) 
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+            -e '/include.*malloc.h/d' \
+            -e 's/malloc/xmalloc/g' \
+            -e 's/realloc/xrealloc/g' \
+            -e '/^#line.*y.tab.c/d' \
+         < ada-exp.tmp > ada-exp.new
+       -rm ada-exp.tmp
+       mv ada-exp.new ./ada-exp.tab.c
+.PRECIOUS: ada-lex.c
+ada-lex.o: ada-lex.c
+ada-lex.c: ada-lex.l
+       @if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
+           echo $(FLEX) -Isit $(srcdir)/ada-lex.l ">" ada-lex.c; \
+           $(FLEX) -Isit $(srcdir)/ada-lex.l > ada-lex.c; \
+       elif [ ! -f ada-lex.c -a ! -f $(srcdir)/ada-lex.c ]; then \
+           echo "ada-lex.c missing and flex not available."; \
+           false; \
+       elif [ ! -f ada-lex.c ]; then \
+           echo "Warning: ada-lex.c older than ada-lex.l and flex not available."; \
+       fi
+.PRECIOUS: c-exp.tab.c
 c-exp.tab.o: c-exp.tab.c $(defs_h) $(gdb_string_h) $(expression_h) \
        $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) \
-       $(charset_h) \
+       $(symfile_h) $(objfiles_h) $(charset_h) $(block_h)
+c-exp.tab.c: c-exp.y
+       $(SHELL) $(YLWRAP) "$(YACC)" \
+           $(srcdir)/c-exp.y  y.tab.c c-exp.tmp -- $(YFLAGS) 
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+            -e '/include.*malloc.h/d' \
+            -e 's/malloc/xmalloc/g' \
+            -e 's/realloc/xrealloc/g' \
+            -e '/^#line.*y.tab.c/d' \
+         < c-exp.tmp > c-exp.new
+       -rm c-exp.tmp
+       mv c-exp.new ./c-exp.tab.c
+.PRECIOUS: f-exp.tab.c
+f-exp.tab.o: f-exp.tab.c $(defs_h) $(gdb_string_h) $(expression_h) \
+       $(value_h) $(parser_defs_h) $(language_h) $(f_lang_h) $(bfd_h) \
        $(symfile_h) $(objfiles_h) $(block_h)
-
-objc-exp.tab.o: objc-exp.tab.c $(objc_lang_h) $(defs_h) $(expression_h) \
-       $(gdbtypes_h) $(language_h) $(parser_defs_h) $(symtab_h) $(value_h) \
-       $(bfd_h) $(objfiles_h) $(symfile_h) $(block_h)
-
-jv-exp.tab.o: jv-exp.tab.c jv-lang.h $(defs_h) $(expression_h) \
-       $(gdbtypes_h) $(language_h) $(parser_defs_h) $(symtab_h) $(value_h) \
-       $(bfd_h) $(objfiles_h) $(symfile_h) $(block_h)
-
-f-exp.tab.o: f-exp.tab.c f-lang.h $(defs_h) $(expression_h) \
-       $(language_h) $(parser_defs_h) $(value_h) $(bfd_h) $(objfiles_h) \
-       $(symfile_h) $(block_h)
-
-m2-exp.tab.o: m2-exp.tab.c $(defs_h) $(expression_h) $(gdbtypes_h) \
-       $(language_h) m2-lang.h $(parser_defs_h) $(symtab_h) $(value_h) \
-       $(bfd_h) $(objfiles_h) $(symfile_h) $(block_h)
-
-p-exp.tab.o: p-exp.tab.c $(defs_h) $(expression_h) $(gdbtypes_h) \
-       $(language_h) p-lang.h $(parser_defs_h) $(symtab_h) $(value_h) \
-       $(bfd_h) $(objfiles_h) $(symfile_h) $(block_h)
-
-ada-exp.tab.o: ada-exp.tab.c ada-lex.c ada-lang.h \
-       $(defs_h) $(expression_h) \
-       $(gdbtypes_h) language.h parser-defs.h $(symtab_h) $(value_h) \
-       $(bfd_h) objfiles.h symfile.h $(block_h)
+f-exp.tab.c: f-exp.y
+       $(SHELL) $(YLWRAP) "$(YACC)" \
+           $(srcdir)/f-exp.y  y.tab.c f-exp.tmp -- $(YFLAGS) 
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+            -e '/include.*malloc.h/d' \
+            -e 's/malloc/xmalloc/g' \
+            -e 's/realloc/xrealloc/g' \
+            -e '/^#line.*y.tab.c/d' \
+         < f-exp.tmp > f-exp.new
+       -rm f-exp.tmp
+       mv f-exp.new ./f-exp.tab.c
+.PRECIOUS: jv-exp.tab.c
+jv-exp.tab.o: jv-exp.tab.c $(defs_h) $(gdb_string_h) $(expression_h) \
+       $(value_h) $(parser_defs_h) $(language_h) $(jv_lang_h) $(bfd_h) \
+       $(symfile_h) $(objfiles_h) $(block_h)
+jv-exp.tab.c: jv-exp.y
+       $(SHELL) $(YLWRAP) "$(YACC)" \
+           $(srcdir)/jv-exp.y  y.tab.c jv-exp.tmp -- $(YFLAGS) 
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+            -e '/include.*malloc.h/d' \
+            -e 's/malloc/xmalloc/g' \
+            -e 's/realloc/xrealloc/g' \
+            -e '/^#line.*y.tab.c/d' \
+         < jv-exp.tmp > jv-exp.new
+       -rm jv-exp.tmp
+       mv jv-exp.new ./jv-exp.tab.c
+.PRECIOUS: m2-exp.tab.c
+m2-exp.tab.o: m2-exp.tab.c $(defs_h) $(gdb_string_h) $(expression_h) \
+       $(language_h) $(value_h) $(parser_defs_h) $(m2_lang_h) $(bfd_h) \
+       $(symfile_h) $(objfiles_h) $(block_h)
+m2-exp.tab.c: m2-exp.y
+       $(SHELL) $(YLWRAP) "$(YACC)" \
+           $(srcdir)/m2-exp.y  y.tab.c m2-exp.tmp -- $(YFLAGS) 
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+            -e '/include.*malloc.h/d' \
+            -e 's/malloc/xmalloc/g' \
+            -e 's/realloc/xrealloc/g' \
+            -e '/^#line.*y.tab.c/d' \
+         < m2-exp.tmp > m2-exp.new
+       -rm m2-exp.tmp
+       mv m2-exp.new ./m2-exp.tab.c
+.PRECIOUS: objc-exp.tab.c
+objc-exp.tab.o: objc-exp.tab.c $(defs_h) $(gdb_string_h) $(expression_h) \
+       $(objc_lang_h) $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) \
+       $(bfd_h) $(symfile_h) $(objfiles_h) $(top_h) $(completer_h) \
+       $(block_h)
+objc-exp.tab.c: objc-exp.y
+       $(SHELL) $(YLWRAP) "$(YACC)" \
+           $(srcdir)/objc-exp.y  y.tab.c objc-exp.tmp -- $(YFLAGS) 
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+            -e '/include.*malloc.h/d' \
+            -e 's/malloc/xmalloc/g' \
+            -e 's/realloc/xrealloc/g' \
+            -e '/^#line.*y.tab.c/d' \
+         < objc-exp.tmp > objc-exp.new
+       -rm objc-exp.tmp
+       mv objc-exp.new ./objc-exp.tab.c
+.PRECIOUS: p-exp.tab.c
+p-exp.tab.o: p-exp.tab.c $(defs_h) $(gdb_string_h) $(expression_h) \
+       $(value_h) $(parser_defs_h) $(language_h) $(p_lang_h) $(bfd_h) \
+       $(symfile_h) $(objfiles_h) $(block_h)
+p-exp.tab.c: p-exp.y
+       $(SHELL) $(YLWRAP) "$(YACC)" \
+           $(srcdir)/p-exp.y  y.tab.c p-exp.tmp -- $(YFLAGS) 
+       -sed -e '/extern.*malloc/d' \
+            -e '/extern.*realloc/d' \
+            -e '/extern.*free/d' \
+            -e '/include.*malloc.h/d' \
+            -e 's/malloc/xmalloc/g' \
+            -e 's/realloc/xrealloc/g' \
+            -e '/^#line.*y.tab.c/d' \
+         < p-exp.tmp > p-exp.new
+       -rm p-exp.tmp
+       mv p-exp.new ./p-exp.tab.c
 
 #
-# The dependencies.  In aphabetic order.
+# gdb/ dependencies
 #
 
 abug-rom.o: abug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
@@ -1511,8 +1499,8 @@ ada-lang.o: ada-lang.c $(gdb_string_h) $(demangle_h) $(defs_h) $(symtab_h) \
        $(breakpoint_h) $(gdbcore_h) $(ada_lang_h) $(ui_out_h) $(block_h) \
        $(infcall_h) $(dictionary_h)
 ada-tasks.o: ada-tasks.c $(defs_h) $(command_h) $(value_h) $(language_h) \
-       $(inferior_h) $(symtab_h) $(target_h) $(gdbcore_h) $(gregset_h) \
-       $(ada_lang_h)
+       $(inferior_h) $(symtab_h) $(target_h) $(regcache_h) $(gdbcore_h) \
+       $(gregset_h) $(ada_lang_h)
 ada-typeprint.o: ada-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \
        $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \
        $(target_h) $(command_h) $(gdbcmd_h) $(language_h) $(demangle_h) \
@@ -1523,30 +1511,35 @@ ada-valprint.o: ada-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
 aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \
        $(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(language_h) \
        $(ppc_tdep_h)
+alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+       $(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h)
+alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(alpha_tdep_h) \
+       $(alphabsd_tdep_h)
+alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(osabi_h) \
+       $(alpha_tdep_h)
 alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdb_assert_h) \
-       $(osabi_h) $(alpha_tdep_h) 
-alpha-nat.o: alpha-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \
-       $(target_h) $(regcache_h) $(alpha_tdep_h) $(gregset_h) 
-alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
-       $(value_h) $(osabi_h) $(gdb_string_h) $(alpha_tdep_h) $(objfiles_h)
-alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \
-       $(frame_unwind_h) $(frame_base_h) $(inferior_h) $(symtab_h) \
-       $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) $(symfile_h) \
-       $(objfiles_h) $(gdb_string_h) $(linespec_h) $(regcache_h) \
-       $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) $(gdb_assert_h) \
-       $(elf_bfd_h) $(alpha_tdep_h) $(dwarf2_frame_h)
+       $(osabi_h) $(alpha_tdep_h)
 alpha-mdebug-tdep.o: alpha-mdebug-tdep.c $(defs_h) $(frame_h) \
        $(frame_unwind_h) $(frame_base_h) $(symtab_h) $(gdbcore_h) \
        $(block_h) $(gdb_assert_h) $(alpha_tdep_h)
-alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
-       $(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h)
-alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(regcache_h) $(alpha_tdep_h) \
-       $(alphabsd_tdep_h)
-alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(alpha_tdep_h) \
-       $(osabi_h)
+alpha-nat.o: alpha-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \
+       $(gdbcore_h) $(target_h) $(regcache_h) $(alpha_tdep_h) $(gregset_h)
 alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
-       $(regcache_h) $(value_h) $(solib_svr4_h) $(alpha_tdep_h) \
-       $(alphabsd_tdep_h) $(nbsd_tdep_h) $(osabi_h)
+       $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) $(alpha_tdep_h) \
+       $(alphabsd_tdep_h) $(nbsd_tdep_h)
+alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
+       $(value_h) $(osabi_h) $(gdb_string_h) $(objfiles_h) $(alpha_tdep_h)
+alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \
+       $(frame_unwind_h) $(frame_base_h) $(dwarf2_frame_h) $(inferior_h) \
+       $(symtab_h) $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) \
+       $(symfile_h) $(objfiles_h) $(gdb_string_h) $(linespec_h) \
+       $(regcache_h) $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) \
+       $(elf_bfd_h) $(alpha_tdep_h)
+amd64fbsd-nat.o: amd64fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+       $(gdb_assert_h) $(gregset_h) $(x86_64_tdep_h)
+amd64fbsd-tdep.o: amd64fbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
+       $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \
+       $(x86_64_tdep_h)
 annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \
        $(gdbtypes_h) $(breakpoint_h)
 arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) \
@@ -1558,19 +1551,21 @@ arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
        $(gdb_string_h) $(regcache_h) $(arm_tdep_h) $(gregset_h)
 arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \
        $(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \
-       $(doublest_h) $(arm_tdep_h) $(symtab_h) $(symfile_h) $(objfiles_h) \
-       $(solib_svr4_h) $(osabi_h)
-arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \
-       $(gdbcore_h) $(symfile_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \
-       $(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) \
-       $(arm_tdep_h) $(sim_arm_h) $(elf_bfd_h) $(coff_internal_h) \
-       $(elf_arm_h) $(gdb_assert_h)
+       $(doublest_h) $(solib_svr4_h) $(osabi_h) $(arm_tdep_h) $(symtab_h) \
+       $(symfile_h) $(objfiles_h)
 armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \
        $(regcache_h) $(gdbcore_h)
-armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(arm_tdep_h) $(nbsd_tdep_h) \
-       $(solib_svr4_h) $(osabi_h)
-avr-tdep.o: avr-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
-       $(symfile_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h)
+armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(osabi_h) $(arm_tdep_h) \
+       $(nbsd_tdep_h) $(solib_svr4_h)
+arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \
+       $(gdbcore_h) $(symfile_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \
+       $(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) $(arm_tdep_h) \
+       $(gdb_sim_arm_h) $(elf_bfd_h) $(coff_internal_h) $(elf_arm_h) \
+       $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h)
+avr-tdep.o: avr-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
+       $(frame_base_h) $(trad_frame_h) $(gdbcmd_h) $(gdbcore_h) \
+       $(inferior_h) $(symfile_h) $(arch_utils_h) $(regcache_h) \
+       $(gdb_string_h)
 ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \
        $(value_h) $(expression_h) $(command_h) $(gdbcmd_h) $(frame_h) \
        $(target_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h) $(block_h) \
@@ -1587,82 +1582,80 @@ breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \
        $(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \
        $(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \
        $(gdb_string_h) $(demangle_h) $(annotate_h) $(symfile_h) \
-       $(objfiles_h) $(linespec_h) $(completer_h) $(gdb_h) $(ui_out_h) \
-       $(cli_script_h) $(gdb_events_h) $(source_h) $(gdb_assert_h) \
-       $(block_h) $(dictionary_h)
+       $(objfiles_h) $(source_h) $(linespec_h) $(completer_h) $(gdb_h) \
+       $(ui_out_h) $(cli_script_h) $(gdb_assert_h) $(block_h) \
+       $(gdb_events_h)
 buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \
        $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(gdb_assert_h) \
        $(complaints_h) $(gdb_string_h) $(expression_h) $(language_h) \
-       $(bcache_h) $(filenames_h) $(macrotab_h) $(demangle_h) $(buildsym_h) \
-       $(stabsread_h) $(block_h) $(cp_support_h) $(dictionary_h)
-builtin-regs.o: builtin-regs.c $(defs_h) $(builtin_regs_h) $(gdbtypes_h) \
-       $(gdb_string_h) $(gdb_assert_h)
+       $(bcache_h) $(filenames_h) $(macrotab_h) $(demangle_h) $(block_h) \
+       $(cp_support_h) $(dictionary_h) $(buildsym_h) $(stabsread_h)
+charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) $(gdb_assert_h) \
+       $(gdb_string_h)
 c-lang.o: c-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
        $(parser_defs_h) $(language_h) $(c_lang_h) $(valprint_h) \
        $(macroscope_h) $(gdb_assert_h) $(charset_h) $(gdb_string_h) \
-       $(demangle_h)
-c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
-       $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
-       $(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \
-       $(gdb_string_h)
-c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
-       $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
-       $(c_lang_h) $(cp_abi_h)
-charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) $(gdb_assert_h) \
-       $(gdb_string_h)
+       $(demangle_h) $(cp_support_h)
 cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(gdb_string_h) \
        $(gdb_assert_h)
-coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \
-       $(symtab_h) $(symfile_h) $(objfiles_h)
+coff-pe-read.o: coff-pe-read.c $(coff_pe_read_h) $(bfd_h) $(defs_h) \
+       $(gdbtypes_h) $(symtab_h) $(symfile_h) $(objfiles_h)
 coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \
        $(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \
        $(coff_internal_h) $(libcoff_h) $(symfile_h) $(objfiles_h) \
        $(buildsym_h) $(gdb_stabs_h) $(stabsread_h) $(complaints_h) \
        $(target_h) $(gdb_assert_h) $(block_h) $(dictionary_h) \
        $(coff_pe_read_h)
-coff-pe-read.o: coff-pe-read.c $(bfd_h) $(defs_h) $(symtab_h) \
-       $(gdbtypes_h) $(symfile_h) $(objfiles_h) $(coff_pe_read_h)
+coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \
+       $(symtab_h) $(symfile_h) $(objfiles_h)
 complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdb_assert_h) \
        $(command_h) $(gdbcmd_h)
 completer.o: completer.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
-       $(filenames_h) $(cli_decode_h) $(gdbcmd_h) $(completer_h) $(readline_h)
+       $(filenames_h) $(cli_decode_h) $(gdbcmd_h) $(completer_h)
 copying.o: copying.c $(defs_h) $(command_h) $(gdbcmd_h)
 core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(regcache_h) \
        $(gdb_dirent_h) $(gdb_stat_h)
-core-regset.o: core-regset.c $(defs_h) $(gdb_string_h) $(inferior_h) \
-       $(target_h) $(command_h) $(gdbcore_h) $(gregset_h)
-core-sol2.o: core-sol2.c $(defs_h) $(gdb_string_h) $(regcache_h) \
-       $(inferior_h) $(target_h) $(command_h) $(gdbcore_h) $(gregset_h)
 corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \
        $(command_h) $(gdbcmd_h) $(bfd_h) $(target_h) $(gdbcore_h) \
        $(dis_asm_h) $(gdb_stat_h) $(completer_h)
 corelow.o: corelow.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
        $(symtab_h) $(command_h) $(bfd_h) $(target_h) $(gdbcore_h) \
-       $(gdbthread_h) $(regcache_h) $(symfile_h) $(readline_h)
-cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) \
-       $(gdbcmd_h) $(ui_out_h) $(gdb_string_h)
+       $(gdbthread_h) $(regcache_h) $(symfile_h)
+core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \
+       $(inferior_h) $(target_h) $(gdb_string_h) $(gregset_h)
+core-sol2.o: core-sol2.c $(defs_h) $(gdb_string_h) $(regcache_h) \
+       $(inferior_h) $(target_h) $(command_h) $(gdbcore_h) $(gregset_h)
+cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \
+       $(ui_out_h) $(gdb_string_h)
 cp-namespace.o: cp-namespace.c $(defs_h) $(cp_support_h) $(gdb_obstack_h) \
        $(symtab_h) $(symfile_h) $(gdb_assert_h) $(block_h) $(objfiles_h) \
        $(gdbtypes_h) $(dictionary_h) $(command_h) $(frame_h)
 cp-support.o: cp-support.c $(defs_h) $(cp_support_h) $(gdb_string_h) \
        $(demangle_h) $(gdb_assert_h) $(gdbcmd_h) $(dictionary_h) \
-       $(objfiles_h) $(frame_h) $(block_h)
+       $(objfiles_h) $(frame_h) $(symtab_h) $(block_h) $(complaints_h)
+cpu32bug-rom.o: cpu32bug-rom.c $(defs_h) $(gdbcore_h) $(target_h) \
+       $(monitor_h) $(serial_h) $(regcache_h) $(m68k_tdep_h)
 cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
        $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
        $(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \
        $(cp_abi_h) $(valprint_h)
-cpu32bug-rom.o: cpu32bug-rom.c $(defs_h) $(gdbcore_h) $(target_h) \
-       $(monitor_h) $(serial_h) $(regcache_h) $(m68k_tdep_h)
 cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(inferior_h) \
        $(gdbtypes_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(value_h) \
        $(opcode_cris_h) $(arch_utils_h) $(regcache_h) $(symfile_h) \
        $(solib_h) $(solib_svr4_h) $(gdb_string_h)
+c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+       $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
+       $(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \
+       $(gdb_string_h)
+c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
+       $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
+       $(c_lang_h) $(cp_abi_h)
 d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
        $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \
        $(gdb_string_h) $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) \
-       $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) $(remote_h) \
-       $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) $(disasm_h) \
-       $(trad_frame_h) $(gdb_assert_h)
+       $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) \
+       $(remote_h) $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) \
+       $(disasm_h) $(trad_frame_h) $(gdb_assert_h)
 dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
        $(serial_h) $(regcache_h) $(m68k_tdep_h)
 dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \
@@ -1679,8 +1672,8 @@ dictionary.o: dictionary.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
        $(buildsym_h) $(gdb_assert_h) $(dictionary_h)
 dink32-rom.o: dink32-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
        $(serial_h) $(symfile_h) $(inferior_h) $(regcache_h)
-disasm.o: disasm.c $(defs_h) $(gdb_string_h) $(target_h) $(value_h) \
-       $(disasm_h) $(ui_out_h) $(gdbcore_h)
+disasm.o: disasm.c $(defs_h) $(target_h) $(value_h) $(ui_out_h) \
+       $(gdb_string_h) $(disasm_h) $(gdbcore_h)
 doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) \
        $(gdb_assert_h) $(gdb_string_h) $(gdbtypes_h)
 dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h)
@@ -1690,18 +1683,16 @@ dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \
        $(command_h) $(gdbcmd_h)
 dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
        $(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h)
-dwarf2cfi.o: dwarf2cfi.c $(defs_h) $(gdbcore_h) $(symtab_h) $(symfile_h) \
-       $(objfiles_h) $(target_h) $(elf_dwarf2_h) $(inferior_h) \
-       $(regcache_h) $(dwarf2cfi_h) $(gdb_assert_h)
 dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \
-        $(gdbcore_h) $(dwarf2expr_h)
+       $(gdbcore_h) $(elf_dwarf2_h) $(dwarf2expr_h)
+dwarf2-frame.o: dwarf2-frame.c $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) \
+       $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \
+       $(gdbtypes_h) $(symtab_h) $(objfiles_h) $(regcache_h) \
+       $(gdb_assert_h) $(gdb_string_h) $(complaints_h) $(dwarf2_frame_h)
 dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \
-       $(gdbcore_h) $(target_h) $(inferior_h) $(dwarf2expr_h) \
-       $(dwarf2loc_h) $(ax_h) $(ax_gdb_h) $(regcache_h) $(gdb_string_h)
-dwarf2-frame.o: $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) $(frame_h) \
-       $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \
-       $(symtab_h) $(objfiles_h) $(regcache_h) $(gdb_assert_h) \
-       $(gdb_string_h) $(dwarf2_frame_h)
+       $(gdbcore_h) $(target_h) $(inferior_h) $(ax_h) $(ax_gdb_h) \
+       $(regcache_h) $(objfiles_h) $(elf_dwarf2_h) $(dwarf2expr_h) \
+       $(dwarf2loc_h) $(gdb_string_h)
 dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \
        $(symfile_h) $(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) \
        $(demangle_h) $(expression_h) $(filenames_h) $(macrotab_h) \
@@ -1716,7 +1707,7 @@ elfread.o: elfread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(elf_bfd_h) \
 environ.o: environ.c $(defs_h) $(environ_h) $(gdb_string_h)
 eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
        $(value_h) $(expression_h) $(target_h) $(frame_h) $(language_h) \
-       $(f_lang_h) $(cp_abi_h) $(infcall_h) $(objc-lang.h) $(block_h)
+       $(f_lang_h) $(cp_abi_h) $(infcall_h) $(objc_lang_h) $(block_h)
 event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \
        $(gdb_string_h)
 event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \
@@ -1724,58 +1715,57 @@ event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \
        $(gdbcmd_h)
 exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \
        $(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \
-       $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) $(xcoffsolib_h) \
-       $(readline_h)
+       $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) $(xcoffsolib_h)
 expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
-       $(value_h) $(language_h) $(parser_defs_h) $(target_h) $(gdb_string_h) \
-       $(block_h)
-f-lang.o: f-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
-       $(expression_h) $(parser_defs_h) $(language_h) $(f_lang_h) \
-       $(valprint_h) $(value_h)
-f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
-       $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
-       $(f_lang_h) $(gdb_string_h)
-f-valprint.o: f-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
-       $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
-       $(f_lang_h) $(frame_h) $(gdbcore_h) $(command_h) $(block_h)
+       $(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \
+       $(gdb_string_h) $(block_h)
 fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) \
        $(gdb_string_h) $(elf_bfd_h) $(gregset_h)
 findvar.o: findvar.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(frame_h) \
        $(value_h) $(gdbcore_h) $(inferior_h) $(target_h) $(gdb_string_h) \
        $(gdb_assert_h) $(floatformat_h) $(symfile_h) $(regcache_h) \
-       $(builtin_regs_h) $(block_h)
+       $(user_regs_h) $(block_h)
+f-lang.o: f-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+       $(expression_h) $(parser_defs_h) $(language_h) $(f_lang_h) \
+       $(valprint_h) $(value_h)
 fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \
        $(inferior_h) $(target_h) $(gdb_wait_h) $(gdb_vfork_h) $(gdbcore_h) \
        $(terminal_h) $(gdbthread_h) $(command_h)
+frame-base.o: frame-base.c $(defs_h) $(frame_base_h) $(frame_h)
 frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \
-       $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(builtin_regs_h) \
+       $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(user_regs_h) \
        $(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \
        $(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \
        $(command_h) $(gdbcmd_h)
-frame-base.o: frame-base.c $(defs_h) $(frame_base_h) $(frame_h)
 frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \
-       $(gdb_assert_h) $(dummy_frame_h) $(legacy_frame_h)
+       $(gdb_assert_h) $(dummy_frame_h)
 frv-tdep.o: frv-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
        $(arch_utils_h) $(regcache_h)
+f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+       $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
+       $(f_lang_h) $(gdb_string_h)
+f-valprint.o: f-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
+       $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
+       $(f_lang_h) $(frame_h) $(gdbcore_h) $(command_h) $(block_h)
 gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \
        $(elf_bfd_h) $(symfile_h) $(objfiles_h) $(infcall_h)
-gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h) $(interps_h)
-gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h)
 gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \
        $(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
        $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(gdbthread_h) \
        $(annotate_h) $(symfile_h) $(value_h) $(symcat_h) $(floatformat_h) \
        $(gdb_assert_h) $(gdb_string_h) $(gdb_events_h) $(reggroups_h) \
-       $(osabi_h)
+       $(osabi_h) $(symfile_h) $(gdb_obstack_h)
+gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h) $(interps_h)
+gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h)
 gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
        $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \
        $(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \
        $(gdbcmd_h) $(wrapper_h) $(cp_abi_h) $(gdb_assert_h)
 gnu-nat.o: gnu-nat.c $(gdb_string_h) $(defs_h) $(inferior_h) $(symtab_h) \
        $(value_h) $(language_h) $(target_h) $(gdb_wait_h) $(gdbcmd_h) \
-       $(gdbcore_h) $(gdbthread_h) $(gdb_assert_h) $(gnu_nat_h) \
-       $(exc_request_S_h) $(notify_S_h) $(process_reply_S_h) \
-       $(msg_reply_S_h) $(exc_request_U_h) $(msg_U_h) $(gdb_obstack_h)
+       $(gdbcore_h) $(gdbthread_h) $(gdb_assert_h) $(gdb_obstack_h) \
+       $(gnu_nat_h) $(exc_request_S_h) $(notify_S_h) $(process_reply_S_h) \
+       $(msg_reply_S_h) $(exc_request_U_h) $(msg_U_h)
 gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \
        $(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h)
 gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(demangle_h) \
@@ -1784,41 +1774,70 @@ go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \
        $(command_h) $(gdbcmd_h) $(floatformat_h) $(buildsym_h) \
        $(i387_tdep_h) $(i386_tdep_h) $(value_h) $(regcache_h) \
        $(gdb_string_h)
-h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(dis_asm_h) \
-       $(gdbcmd_h) $(gdbtypes_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
-       $(regcache_h)
-h8500-tdep.o: h8500-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
-       $(gdbcmd_h) $(value_h) $(dis_asm_h) $(gdbcore_h) $(regcache_h)
+h8300-tdep.o: h8300-tdep.c $(defs_h) $(value_h) $(inferior_h) $(symfile_h) \
+       $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) $(gdbcmd_h) \
+       $(gdb_assert_h)
+# OBSOLETE h8500-tdep.o: h8500-tdep.c
 hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \
        $(gdbtypes_h) $(gdbcore_h) $(cp_abi_h)
+hppab-nat.o: hppab-nat.c $(defs_h) $(inferior_h) $(target_h) $(regcache_h)
+hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
+       $(gdb_wait_h) $(regcache_h) $(gdb_string_h)
+hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
+       $(osabi_h) $(gdb_string_h) $(frame_h)
+hppam3-nat.o: hppam3-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
+       $(regcache_h)
 hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \
        $(value_h) $(regcache_h) $(completer_h) $(language_h) $(osabi_h) \
        $(gdb_assert_h) $(infttrace_h) $(symtab_h) $(infcall_h) \
        $(a_out_encap_h) $(gdb_stat_h) $(gdb_wait_h) $(gdbcore_h) \
        $(gdbcmd_h) $(target_h) $(symfile_h) $(objfiles_h)
-hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
-       $(osabi_h) $(gdb_string_h)
-hppab-nat.o: hppab-nat.c $(defs_h) $(inferior_h) $(target_h) $(regcache_h)
-hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
-       $(gdb_wait_h) $(regcache_h)
-hppam3-nat.o: hppam3-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
-       $(regcache_h)
 hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \
        $(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \
        $(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \
        $(somsolib_h) $(gdb_assert_h) $(gdb_string_h)
 hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
        $(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h)
+i386b-nat.o: i386b-nat.c $(defs_h)
+i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+       $(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h)
+i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
+       $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) $(i386_tdep_h)
+i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \
+       $(i386_tdep_h)
+i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h)
+i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
+       $(regcache_h) $(gdb_assert_h) $(i386_tdep_h) $(gnu_nat_h) \
+       $(i387_tdep_h) $(gregset_h)
+i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(osabi_h) $(i386_tdep_h)
+i386-interix-nat.o: i386-interix-nat.c $(defs_h) $(gdb_string_h) \
+       $(gdbcore_h) $(gregset_h) $(regcache_h)
+i386-interix-tdep.o: i386-interix-tdep.c $(defs_h) $(arch_utils_h) \
+       $(frame_h) $(gdb_string_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \
+       $(i386_tdep_h) $(inferior_h) $(libbfd_h) $(objfiles_h) $(osabi_h) \
+       $(regcache_h)
 i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
        $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(gregset_h) \
-       $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h)
+       $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h) \
+       $(gdb_proc_service_h)
 i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
-       $(value_h) $(regcache_h) $(inferior_h) $(symtab_h) $(symfile_h) \
-       $(objfiles_h) $(solib_svr4_h) $(i386_tdep_h) $(i386_linux_tdep_h) \
-       $(osabi_h)
+       $(value_h) $(regcache_h) $(inferior_h) $(reggroups_h) $(symtab_h) \
+       $(symfile_h) $(objfiles_h) $(solib_svr4_h) $(osabi_h) $(i386_tdep_h) \
+       $(i386_linux_tdep_h)
+i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
+       $(regcache_h) $(target_h) $(osabi_h) $(i386_tdep_h)
 i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h)
-i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(i386_tdep_h) \
-       $(osabi_h)
+i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(gdbtypes_h) $(gdbcore_h) \
+       $(regcache_h) $(arch_utils_h) $(osabi_h) $(i386_tdep_h) \
+       $(i387_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h)
+i386-nto-tdep.o: i386-nto-tdep.c $(gdb_string_h) $(gdb_assert_h) $(defs_h) \
+       $(frame_h) $(target_h) $(regcache_h) $(solib_svr4_h) $(i386_tdep_h) \
+       $(nto_tdep_h) $(osabi_h) $(i387_tdep_h)
+i386obsd-nat.o: i386obsd-nat.c $(defs_h)
+i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
+       $(regcache_h) $(osabi_h) $(i386_tdep_h) $(i387_tdep_h)
+i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(osabi_h) \
+       $(i386_tdep_h)
 i386-stub.o: i386-stub.c
 i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \
        $(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \
@@ -1826,35 +1845,14 @@ i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \
        $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(osabi_h) $(regcache_h) \
        $(reggroups_h) $(symfile_h) $(symtab_h) $(target_h) $(value_h) \
        $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h)
-i386b-nat.o: i386b-nat.c $(defs_h)
-i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
-       $(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h) \
-       $(osabi_h)
-i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
-       $(gdbcore_h) $(regcache_h) $(gdb_string_h) $(i386_tdep_h)
-i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h)
-i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
-       $(regcache_h) $(gdb_assert_h) $(i386_tdep_h) $(gnu_nat_h) \
-       $(i387_tdep_h)
-i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(i386_tdep_h) $(osabi_h)
-i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
-       $(regcache_h) $(target_h) $(i386_tdep_h) $(osabi_h)
-i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(gdb_string_h) \
-       $(i386_tdep_h) $(osabi_h)
-i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(gdbtypes_h) $(gdbcore_h) \
-       $(regcache_h) $(arch_utils_h) $(i386_tdep_h) $(i387_tdep_h) \
-       $(nbsd_tdep_h) $(solib_svr4_h) $(osabi_h)
-i386obsd-nat.o: i386obsd-nat.c $(defs_h)
-i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
-       $(regcache_h) $(i386_tdep_h) $(i387_tdep_h) $(osabi_h)
-i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
-       $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h) $(i386_tdep_h)
 i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \
        $(i386_tdep_h) $(i387_tdep_h) $(gregset_h)
-i387-tdep.o: i387-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
-       $(value_h) $(gdbcore_h) $(floatformat_h) $(regcache_h) \
-       $(gdb_assert_h) $(gdb_string_h) $(doublest_h) $(i386_tdep_h) \
-       $(i387_tdep_h)
+i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
+       $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \
+       $(i386_tdep_h)
+i387-tdep.o: i387-tdep.c $(defs_h) $(doublest_h) $(floatformat_h) $(frame_h) \
+       $(gdbcore_h) $(inferior_h) $(language_h) $(regcache_h) $(value_h) \
+       $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h)
 ia64-aix-nat.o: ia64-aix-nat.c $(defs_h) $(inferior_h) $(target_h) \
        $(gdbcore_h) $(regcache_h) $(symtab_h) $(bfd_h) $(symfile_h) \
        $(objfiles_h) $(gdb_stat_h)
@@ -1864,17 +1862,18 @@ ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \
 ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(arch_utils_h)
 ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
        $(arch_utils_h) $(floatformat_h) $(regcache_h) $(doublest_h) \
-       $(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) $(elf_bfd_h)
-inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \
-       $(event_top_h) $(inf_loop_h) $(remote_h)
+       $(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) \
+       $(elf_bfd_h)
 infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \
        $(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \
-       $(symfile_h) $(gdbcmd_h) $(command_h) $(gdb_string_h)
+       $(symfile_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h)
 infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
        $(frame_h) $(inferior_h) $(environ_h) $(value_h) $(gdbcmd_h) \
        $(symfile_h) $(gdbcore_h) $(target_h) $(language_h) $(symfile_h) \
        $(objfiles_h) $(completer_h) $(ui_out_h) $(event_top_h) \
-       $(parser_defs_h) $(regcache_h) $(block_h)
+       $(parser_defs_h) $(regcache_h) $(reggroups_h) $(block_h)
+inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \
+       $(event_top_h) $(inf_loop_h) $(remote_h)
 inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \
        $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \
        $(inflow_h)
@@ -1889,7 +1888,8 @@ infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \
 inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
        $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) $(inflow_h)
 infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
-       $(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbthread_h) $(gdbcore_h)
+       $(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbthread_h) \
+       $(gdbcore_h)
 interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \
        $(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \
        $(gdb_events_h) $(gdb_assert_h) $(top_h)
@@ -1907,23 +1907,23 @@ jv-typeprint.o: jv-typeprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
 jv-valprint.o: jv-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
        $(gdbcore_h) $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \
        $(language_h) $(jv_lang_h) $(c_lang_h) $(annotate_h) $(gdb_string_h)
-kod-cisco.o: kod-cisco.c $(defs_h) $(gdb_string_h) $(kod_h)
 kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) $(target_h) $(gdb_string_h) \
        $(kod_h)
+kod-cisco.o: kod-cisco.c $(defs_h) $(gdb_string_h) $(kod_h)
 language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
        $(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \
        $(parser_defs_h) $(jv_lang_h) $(demangle_h)
+linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
+       $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \
+       $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) \
+       $(objc_lang_h) $(linespec_h) $(cp_support_h)
 lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \
        $(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h) \
        $(linux_nat_h)
-linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
-       $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \
-       $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) $(objc_lang_h) \
-       $(cp_support_h)
 linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdb_wait_h) \
        $(linux_nat_h)
-linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) \
-       $(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \
+linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(gdb_stat_h) \
+       $(regcache_h) $(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \
        $(cli_decode_h) $(gdb_string_h) $(linux_nat_h)
 lynx-nat.o: lynx-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
        $(gdbcore_h) $(regcache_h)
@@ -1934,40 +1934,44 @@ m2-typeprint.o: m2-typeprint.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \
        $(expression_h) $(value_h) $(gdbcore_h) $(target_h) $(m2_lang_h)
 m2-valprint.o: m2-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
        $(m2_lang_h)
-m3-nat.o: m3-nat.c $(defs_h) $(inferior_h) $(symtab_h) $(value_h) \
-       $(language_h) $(target_h) $(gdb_wait_h) $(gdbcmd_h) $(gdbcore_h) \
-       $(regcache_h)
 m32r-rom.o: m32r-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
        $(serial_h) $(symtab_h) $(command_h) $(gdbcmd_h) $(symfile_h) \
        $(gdb_string_h) $(objfiles_h) $(inferior_h) $(regcache_h)
 m32r-stub.o: m32r-stub.c $(syscall_h)
-m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
-       $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
-       $(regcache_h)
-m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(symtab_h) \
+m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
+       $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \
+       $(gdb_string_h) $(value_h) $(inferior_h) $(symfile_h) $(objfiles_h) \
+       $(language_h) $(arch_utils_h) $(regcache_h) $(trad_frame_h) \
+       $(gdb_assert_h)
+# OBSOLETE m3-nat.o: m3-nat.c
+m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
+       $(frame_base_h) $(dwarf2_frame_h) $(trad_frame_h) $(symtab_h) \
        $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
        $(inferior_h) $(dis_asm_h) $(symfile_h) $(objfiles_h) \
-       $(arch_utils_h) $(regcache_h) $(target_h) $(opcode_m68hc11_h) \
-       $(elf_m68hc11_h) $(elf_bfd_h)
-m68k-stub.o: m68k-stub.c
-m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcore_h) \
-       $(value_h) $(gdb_string_h) $(inferior_h) $(regcache_h) \
-       $(arch_utils_h) $(gregset_h) $(osabi_h) $(m68k_tdep_h)
+       $(arch_utils_h) $(regcache_h) $(reggroups_h) $(target_h) \
+       $(opcode_m68hc11_h) $(elf_m68hc11_h) $(elf_bfd_h)
 m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
        $(language_h) $(gdbcore_h) $(gdb_string_h) $(regcache_h) \
-       $(m68k_tdep_h) $(gdb_stat_h) $(floatformat_h) $(target_h)
-m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
-       $(target_h) $(gdb_string_h) $(gdbtypes_h) $(osabi_h) $(regcache_h) \
-       $(objfiles_h) $(symtab_h) $(m68k_tdep_t)
+       $(m68k_tdep_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \
+       $(gregset_h)
+m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(doublest_h) \
+       $(floatformat_h) $(frame_h) $(target_h) $(gdb_string_h) \
+       $(gdbtypes_h) $(osabi_h) $(regcache_h) $(objfiles_h) $(symtab_h) \
+       $(m68k_tdep_h)
 m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
        $(regcache_h)
 m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h)
+m68k-stub.o: m68k-stub.c
+m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \
+       $(frame_unwind_h) $(symtab_h) $(gdbcore_h) $(value_h) \
+       $(gdb_string_h) $(gdb_assert_h) $(inferior_h) $(regcache_h) \
+       $(arch_utils_h) $(osabi_h) $(m68k_tdep_h) $(gregset_h)
 macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) $(macroscope_h) \
        $(command_h) $(gdbcmd_h)
 macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \
        $(macroexp_h) $(gdb_assert_h)
-macroscope.o: macroscope.c $(defs_h) $(macroscope_h) $(symtab_h) $(target_h) \
-       $(frame_h) $(inferior_h) $(source_h) $(complaints_h)
+macroscope.o: macroscope.c $(defs_h) $(macroscope_h) $(symtab_h) $(source_h) \
+       $(target_h) $(frame_h) $(inferior_h) $(complaints_h)
 macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \
        $(symtab_h) $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) \
        $(bcache_h) $(complaints_h)
@@ -1985,87 +1989,80 @@ mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
 mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
        $(symfile_h) $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) \
        $(stabsread_h) $(complaints_h) $(demangle_h) $(gdb_assert_h) \
-       $(block_h) $(dictionary_h) \
-       $(coff_sym_h) $(coff_symconst_h) $(gdb_stat_h) $(gdb_string_h) \
-       $(bfd_h) $(coff_ecoff_h) $(libaout_h) $(aout_aout64_h) \
-       $(aout_stab_gnu_h) $(expression_h) $(language_h) $(dictionary_h) \
-       $(block_h)
-mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \
-       $(target_h)
+       $(block_h) $(dictionary_h) $(coff_sym_h) $(coff_symconst_h) \
+       $(gdb_stat_h) $(gdb_string_h) $(bfd_h) $(coff_ecoff_h) $(libaout_h) \
+       $(aout_aout64_h) $(aout_stab_gnu_h) $(expression_h) $(language_h)
 memattr.o: memattr.c $(defs_h) $(command_h) $(gdbcmd_h) $(memattr_h) \
        $(target_h) $(value_h) $(language_h) $(gdb_string_h)
+mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \
+       $(target_h)
 minsyms.o: minsyms.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
        $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(cp_abi_h)
 mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h)
 mips-linux-nat.o: mips-linux-nat.c $(defs_h)
 mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \
-       $(solib_svr4_h) $(osabi_h) $(gdb_string_h) $(mips_tdep_h) \
+       $(solib_svr4_h) $(osabi_h) $(mips_tdep_h) $(gdb_string_h) \
        $(gdb_assert_h)
+# OBSOLETE mipsm3-nat.o: mipsm3-nat.c
 mips-nat.o: mips-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h)
-mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \
-       $(frame_h) $(inferior_h) $(symtab_h) $(value_h) $(gdbcmd_h) \
-       $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) $(gdbtypes_h) \
-       $(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \
-       $(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \
-       $(elf_bfd_h) $(symcat_h)
-mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
 mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
        $(mipsnbsd_tdep_h)
 mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
-       $(target_h) $(value_h) $(osabi_h) $(mipsnbsd_tdep_h) $(solib_svr4_h) \
-       $(nbsd_tdep_h)
+       $(target_h) $(value_h) $(osabi_h) $(nbsd_tdep_h) $(mipsnbsd_tdep_h) \
+       $(solib_svr4_h)
 mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
        $(symfile_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \
        $(coff_sym_h) $(coff_internal_h) $(coff_ecoff_h) $(libcoff_h) \
        $(libecoff_h) $(elf_common_h) $(elf_mips_h)
+mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \
+       $(frame_h) $(inferior_h) $(symtab_h) $(value_h) $(gdbcmd_h) \
+       $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) $(gdbtypes_h) \
+       $(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \
+       $(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \
+       $(elf_bfd_h) $(symcat_h) $(sim_regno_h)
 mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
        $(regcache_h) $(gregset_h)
-mn10200-tdep.o: mn10200-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
+# OBSOLETE mn10200-tdep.o: mn10200-tdep.c
+mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
        $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \
-       $(symfile_h) $(regcache_h)
-mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
-       $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
-       $(regcache_h) $(arch_utils_h) $(gdb_assert_h)
+       $(symfile_h) $(regcache_h) $(arch_utils_h) $(gdb_assert_h)
 monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \
        $(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \
        $(gdb_regex_h) $(srec_h) $(regcache_h)
 nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h)
 nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
        $(objfiles_h) $(buildsym_h) $(stabsread_h) $(block_h)
-ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \
-       $(inferior_h) $(regcache_h) $(target_h) $(arch_utils_h) \
-       $(ns32k_tdep_h) $(gdb_string_h) $(osabi_h)
 ns32knbsd-nat.o: ns32knbsd-nat.c $(defs_h) $(inferior_h) $(target_h) \
        $(gdbcore_h) $(regcache_h)
-ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(ns32k_tdep_h) $(gdb_string_h) \
-       $(osabi_h)
+ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(osabi_h) $(ns32k_tdep_h) \
+       $(gdb_string_h)
+ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \
+       $(inferior_h) $(regcache_h) $(target_h) $(arch_utils_h) $(osabi_h) \
+       $(ns32k_tdep_h) $(gdb_string_h)
+nto-procfs.o: nto-procfs.c $(defs_h) $(gdb_dirent_h) $(gdb_string_h) \
+       $(gdbcore_h) $(inferior_h) $(target_h) $(objfiles_h) $(gdbthread_h) \
+       $(nto_tdep_h) $(command_h) $(regcache_h)
+nto-tdep.o: nto-tdep.c $(gdb_stat_h) $(gdb_string_h) $(nto_tdep_h) $(top_h) \
+       $(cli_decode_h) $(cli_cmds_h) $(inferior_h) $(gdbarch_h) $(bfd_h) \
+       $(elf_bfd_h) $(solib_svr4_h) $(gdbcore_h)
 objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
        $(parser_defs_h) $(language_h) $(c_lang_h) $(objc_lang_h) \
-       $(complaints_h) $(value_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \
-       $(target_h) $(gdbcore_h) $(gdbcmd_h) $(frame_h) $(gdb_regex_h) \
-       $(regcache_h) $(block_h) $(infcall_h) $(valprint_h) $(gdb_assert_h)
+       $(complaints_h) $(value_h) $(symfile_h) $(objfiles_h) \
+       $(gdb_string_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(frame_h) \
+       $(gdb_regex_h) $(regcache_h) $(block_h) $(infcall_h) $(valprint_h) \
+       $(gdb_assert_h)
 objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
        $(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_stat_h) \
-       $(gdb_obstack_h) $(gdb_string_h) $(breakpoint_h) $(mmalloc_h) \
-       $(block_h) $(dictionary_h)
-observer.o: observer.c $(observer_h) $(defs_h)
+       $(gdb_obstack_h) $(gdb_string_h) $(hashtab_h) $(breakpoint_h) \
+       $(block_h) $(dictionary_h) $(mmalloc_h)
+observer.o: observer.c $(defs_h) $(observer_h)
 ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
        $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \
        $(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h)
 op50-rom.o: op50-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
        $(serial_h)
-osabi.o: osabi.c $(defs_h) $(gdb_string_h) $(osabi_h) $(elf_bfd_h) \
-       $(gdbcmd_h) $(command_h) $(arch_utils_h)
-p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
-       $(expression_h) $(parser_defs_h) $(language_h) $(p_lang_h) \
-       $(valprint_h) $(value_h)
-p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
-       $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
-       $(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h)
-p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
-       $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
-       $(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) \
-       $(language_h) $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h)
+osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \
+       $(arch_utils_h) $(gdbcmd_h) $(command_h) $(elf_bfd_h)
 pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \
        $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \
        $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \
@@ -2073,27 +2070,30 @@ pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \
 parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
        $(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \
        $(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \
-       $(doublest_h) $(builtin_regs_h) $(gdb_assert_h) $(block_h)
+       $(doublest_h) $(gdb_assert_h) $(block_h)
+p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+       $(expression_h) $(parser_defs_h) $(language_h) $(p_lang_h) \
+       $(valprint_h) $(value_h)
 ppc-bdm.o: ppc-bdm.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) \
        $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \
        $(objfiles_h) $(gdb_stabs_h) $(serial_h) $(ocd_h) $(ppc_tdep_h) \
        $(regcache_h)
+ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+       $(serial_h) $(regcache_h)
 ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdb_string_h) $(frame_h) \
        $(inferior_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) \
        $(ppc_tdep_h)
 ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
        $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
-       $(objfiles_h) $(regcache_h) $(value_h) $(solib_svr4_h) $(ppc_tdep_h) \
-       $(osabi_h)
-ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
-       $(regcache_h) $(value_h) $(gdb_string_h) $(ppc_tdep_h)
-ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
-       $(serial_h) $(regcache_h)
+       $(objfiles_h) $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) \
+       $(ppc_tdep_h)
 ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \
        $(ppcnbsd_tdep_h)
 ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
-       $(target_h) $(breakpoint_h) $(value_h) $(ppc_tdep_h) \
-       $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) $(osabi_h)
+       $(target_h) $(breakpoint_h) $(value_h) $(osabi_h) $(ppc_tdep_h) \
+       $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h)
+ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
+       $(regcache_h) $(value_h) $(gdb_string_h) $(ppc_tdep_h)
 printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \
        $(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \
        $(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \
@@ -2103,23 +2103,38 @@ proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(gdb_wait_h) \
        $(proc_utils_h)
 proc-events.o: proc-events.c $(defs_h)
 proc-flags.o: proc-flags.c $(defs_h)
+procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
+       $(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(gdb_wait_h) \
+       $(gdb_assert_h) $(inflow_h) $(gdb_dirent_h) $(X_OK) $(gdb_stat_h) \
+       $(proc_utils_h) $(gregset_h)
 proc-service.o: proc-service.c $(defs_h) $(gdb_proc_service_h) $(inferior_h) \
        $(symtab_h) $(target_h) $(gregset_h)
 proc-why.o: proc-why.c $(defs_h) $(proc_utils_h)
-procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
-       $(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(gdb_wait_h) $(gdb_assert_h) \
-       $(inflow_h) $(gdb_dirent_h) $(X_OK) $(gdb_stat_h) $(proc_utils_h) \
-       $(gregset_h)
+p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+       $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
+       $(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h)
+p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
+       $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
+       $(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) \
+       $(language_h) $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h)
 regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
        $(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_h) \
        $(gdb_string_h) $(gdbcmd_h)
 reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \
        $(gdb_assert_h) $(regcache_h) $(command_h) $(gdbcmd_h)
+remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \
+       $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \
+       $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \
+       $(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \
+       $(gdbcore_h) $(remote_fileio_h)
 remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \
        $(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \
        $(gdbcmd_h) $(serial_h) $(remote_utils_h) $(symfile_h) $(regcache_h)
 remote-est.o: remote-est.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
        $(serial_h) $(regcache_h) $(m68k_tdep_h)
+remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \
+       $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h) \
+       $(remote_fileio_h)
 remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
        $(serial_h) $(regcache_h)
 remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \
@@ -2146,16 +2161,16 @@ remote-st.o: remote-st.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \
 remote-utils.o: remote-utils.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \
        $(target_h) $(serial_h) $(gdbcore_h) $(inferior_h) $(remote_utils_h) \
        $(regcache_h)
-remote-vx.o: remote-vx.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
-       $(gdbcore_h) $(command_h) $(symtab_h) $(complaints_h) $(gdbcmd_h) \
-       $(bfd_h) $(symfile_h) $(objfiles_h) $(gdb_stabs_h) $(regcache_h) \
-       $(gdb_string_h) $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) \
-       $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h)
 remote-vx68.o: remote-vx68.c $(defs_h) $(vx_share_regPacket_h) $(frame_h) \
        $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) $(symtab_h) \
        $(symfile_h) $(regcache_h) $(gdb_string_h) $(vx_share_ptrace_h) \
        $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) \
        $(vx_share_dbgRpcLib_h)
+remote-vx.o: remote-vx.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+       $(gdbcore_h) $(command_h) $(symtab_h) $(complaints_h) $(gdbcmd_h) \
+       $(bfd_h) $(symfile_h) $(objfiles_h) $(gdb_stabs_h) $(regcache_h) \
+       $(gdb_string_h) $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) \
+       $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h)
 remote-vxmips.o: remote-vxmips.c $(defs_h) $(vx_share_regPacket_h) \
        $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) \
        $(symtab_h) $(symfile_h) $(regcache_h) $(gdb_string_h) \
@@ -2166,14 +2181,6 @@ remote-vxsparc.o: remote-vxsparc.c $(defs_h) $(vx_share_regPacket_h) \
        $(symtab_h) $(symfile_h) $(regcache_h) $(gdb_string_h) \
        $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) \
        $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h)
-remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \
-       $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \
-       $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \
-       $(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \
-       $(gdbcore_h) $(solib_h) $(remote-fileio_h)
-remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \
-       $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h) \
-       $(remote_fileio_h)
 rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
        $(serial_h) $(regcache_h) $(value_h) $(m68k_tdep_h)
 rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
@@ -2183,9 +2190,9 @@ rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
 rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
        $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) $(objfiles_h) \
        $(arch_utils_h) $(regcache_h) $(doublest_h) $(value_h) \
-       $(parser_defs_h) $(libbfd_h) $(coff_internal_h) $(libcoff_h) \
-       $(coff_xcoff_h) $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) \
-       $(ppc_tdep_h) $(osabi_h)
+       $(parser_defs_h) $(osabi_h) $(libbfd_h) $(coff_internal_h) \
+       $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) $(elf_bfd_h) \
+       $(solib_svr4_h) $(ppc_tdep_h) $(gdb_assert_h)
 s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h)
 s390-tdep.o: s390-tdep.c $(arch_utils_h) $(frame_h) $(inferior_h) \
        $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \
@@ -2204,31 +2211,34 @@ sentinel-frame.o: sentinel-frame.c $(defs_h) $(regcache_h) \
        $(sentinel_frame_h) $(inferior_h) $(frame_unwind_h)
 ser-e7kpc.o: ser-e7kpc.c $(defs_h) $(serial_h) $(gdb_string_h)
 ser-go32.o: ser-go32.c $(defs_h) $(gdbcmd_h) $(serial_h) $(gdb_string_h)
+serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h) $(gdbcmd_h)
 ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_vfork_h) \
        $(gdb_string_h)
 ser-tcp.o: ser-tcp.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_string_h)
 ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_unix_h) $(terminal_h) \
        $(gdb_string_h) $(event_loop_h)
-serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h) $(gdbcmd_h)
-sh-stub.o: sh-stub.c
-sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \
-       $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \
-       $(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \
-       $(regcache_h) $(doublest_h) $(sh_tdep_h) $(elf_bfd_h) \
-       $(solib_svr4_h) $(elf_sh_h) $(gdb_sim_sh_h) $(osabi_h)
 sh3-rom.o: sh3-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
        $(serial_h) $(srec_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h) \
        $(sh_tdep_h)
-shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(shnbsd_tdep_h)
+shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(sh_tdep_h) \
+       $(shnbsd_tdep_h)
 shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \
-       $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) $(shnbsd_tdep_h) $(osabi_h)
-sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \
-       $(gdb_stat_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) $(symfile_h) \
-       $(gregset_h)
+       $(osabi_h) $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) \
+       $(shnbsd_tdep_h)
+sh-stub.o: sh-stub.c
+sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \
+       $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \
+       $(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \
+       $(regcache_h) $(doublest_h) $(osabi_h) $(sh_tdep_h) $(elf_bfd_h) \
+       $(solib_svr4_h) $(elf_sh_h) $(gdb_sim_sh_h)
 solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \
        $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(gdbcore_h) \
        $(command_h) $(target_h) $(frame_h) $(gdb_regex_h) $(inferior_h) \
        $(environ_h) $(language_h) $(gdbcmd_h) $(solist_h)
+solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \
+       $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \
+       $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \
+       $(completer_h) $(filenames_h) $(solist_h)
 solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
        $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h)
 solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h)
@@ -2240,10 +2250,9 @@ solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
 solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \
        $(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
        $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) $(solib_svr4_h)
-solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \
-       $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \
-       $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \
-       $(completer_h) $(filenames_h) $(solist_h) $(readline_h)
+sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
+       $(inferior_h) $(gdb_stat_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) \
+       $(symfile_h) $(gregset_h)
 somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
        $(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \
        $(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_h)
@@ -2255,33 +2264,32 @@ source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \
        $(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \
        $(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \
        $(symfile_h) $(objfiles_h) $(annotate_h) $(gdbtypes_h) $(linespec_h) \
-       $(filenames_h) $(completer_h) $(ui_out_h) $(readline_h)
-sparc-linux-nat.o: sparc-linux-nat.c $(defs_h) $(regcache_h) $(gregset_h)
-sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
-       $(regcache_h) $(gdb_wait_h)
-sparc-stub.o: sparc-stub.c
-sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
-       $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(regcache_h) \
-       $(osabi_h) $(gregset_h) $(gdbcore_h) $(gdb_assert_h) $(symfile_h)
+       $(filenames_h) $(completer_h) $(ui_out_h)
 sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
-       $(sparcnbsd_tdep_h)
-sparcl-stub.o: sparcl-stub.c
-sparcl-tdep.o: sparcl-tdep.c $(defs_h) $(gdbcore_h) $(breakpoint_h) \
-       $(target_h) $(serial_h) $(regcache_h)
-sparclet-rom.o: sparclet-rom.c $(defs_h) $(gdbcore_h) $(target_h) \
-       $(monitor_h) $(serial_h) $(srec_h) $(symtab_h) $(symfile_h) \
-       $(regcache_h)
-sparclet-stub.o: sparclet-stub.c
+       $(sparc_tdep_h) $(sparcnbsd_tdep_h)
+# OBSOLETE sparclet-rom.o: sparclet-rom.c
+# OBSOLETE sparclet-stub.o: sparclet-stub.c
+sparc-linux-nat.o: sparc-linux-nat.c $(defs_h) $(regcache_h) $(sparc_tdep_h) \
+       $(gregset_h)
+# OBSOLETE sparcl-stub.o: sparcl-stub.c
+# OBSOLETE sparcl-tdep.o: sparcl-tdep.c
+sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
+       $(regcache_h) $(sparc_tdep_h) $(gdb_wait_h)
 sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
-       $(sparcnbsd_tdep_h)
+       $(sparc_tdep_h) $(sparcnbsd_tdep_h)
 sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
-       $(target_h) $(value_h) $(osabi_h) $(sparcnbsd_tdep_h) $(nbsd_tdep_h) \
-       $(solib_svr4_h)
+       $(target_h) $(value_h) $(osabi_h) $(gdb_string_h) $(sparc_tdep_h) \
+       $(sparcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h)
+sparc-stub.o: sparc-stub.c
+sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
+       $(inferior_h) $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) \
+       $(regcache_h) $(osabi_h) $(sparc_tdep_h) $(gregset_h) $(gdbcore_h) \
+       $(gdb_assert_h) $(symfile_h)
 stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \
        $(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \
        $(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \
        $(buildsym_h) $(complaints_h) $(demangle_h) $(language_h) \
-       $(doublest_h) $(stabsread_h) $(cp_abi_h) $(cp_support_h)
+       $(doublest_h) $(cp_abi_h) $(cp_support_h) $(stabsread_h)
 stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \
        $(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \
        $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \
@@ -2289,54 +2297,53 @@ stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \
        $(gdb_assert_h) $(dictionary_h)
 standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \
        $(inferior_h) $(gdb_wait_h)
-std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) $(gdbtypes_h) \
+std-regs.o: std-regs.c $(defs_h) $(user_regs_h) $(frame_h) $(gdbtypes_h) \
        $(value_h) $(gdb_string_h)
 stop-gdb.o: stop-gdb.c $(defs_h)
 sun3-nat.o: sun3-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h)
-symfile.o: symfile.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
-       $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
-       $(gdbcmd_h) $(breakpoint_h) $(language_h) $(complaints_h) \
-       $(demangle_h) $(inferior_h) $(gdb_stabs_h) $(gdb_obstack_h) \
-       $(completer_h) $(bcache_h) $(gdb_string_h) $(gdb_stat_h) $(source_h) \
-       $(gdb_assert_h) $(readline_h) $(filenames_h) $(block_h)
-symm-nat.o: symm-nat.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
-       $(target_h) $(regcache_h) $(gdb_wait_h) $(gdb_stat_h) $(gdbcore_h) \
-       $(gdbcore_h)
-symm-tdep.o: symm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
-       $(gdb_stat_h) $(gdbcore_h)
+symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \
+       $(gdbcore_h) $(frame_h) $(target_h) $(value_h) $(symfile_h) \
+       $(objfiles_h) $(source_h) $(gdbcmd_h) $(breakpoint_h) $(language_h) \
+       $(complaints_h) $(demangle_h) $(inferior_h) $(filenames_h) \
+       $(gdb_stabs_h) $(gdb_obstack_h) $(completer_h) $(bcache_h) \
+       $(hashtab_h) $(gdb_assert_h) $(block_h) $(gdb_string_h) \
+       $(gdb_stat_h)
 symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \
        $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \
-       $(gdb_obstack_h) $(language_h) $(bcache_h) $(gdb_string_h) \
-       $(readline_h) $(block_h) $(gdb_regex_h) $(dictionary_h)
+       $(gdb_obstack_h) $(language_h) $(bcache_h) $(block_h) $(gdb_regex_h) \
+       $(dictionary_h) $(gdb_string_h)
+# OBSOLETE symm-nat.o: symm-nat.c
+# OBSOLETE symm-tdep.o: symm-tdep.c
 symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
        $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h)      \
        $(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \
-       $(language_h) $(demangle_h) $(inferior_h) $(linespec_h) \
-       $(filenames_h) $(gdb_obstack_h) $(gdb_string_h) $(gdb_stat_h) \
-       $(cp_abi_h) $(source_h) $(block_h) $(objc_lang_h) $(dictionary_h) \
+       $(language_h) $(demangle_h) $(inferior_h) $(linespec_h) $(source_h) \
+       $(filenames_h) $(objc_lang_h) $(hashtab_h) $(gdb_obstack_h) \
+       $(block_h) $(dictionary_h) $(gdb_string_h) $(gdb_stat_h) $(cp_abi_h) \
        $(cp_support_h)
 target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \
        $(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
        $(gdb_wait_h) $(dcache_h) $(regcache_h)
-thread-db.o: thread-db.c $(defs_h) $(gdb_assert_h) $(gdb_proc_service_h) \
-       $(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) $(inferior_h) \
-       $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h)
 thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \
        $(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(command_h) \
        $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) $(ui_out_h)
+thread-db.o: thread-db.c $(defs_h) $(gdb_assert_h) $(gdb_proc_service_h) \
+       $(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) $(inferior_h) \
+       $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) $(solib_svr4_h)
 top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \
        $(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \
        $(inferior_h) $(target_h) $(breakpoint_h) $(gdbtypes_h) \
        $(expression_h) $(value_h) $(language_h) $(terminal_h) $(annotate_h) \
        $(completer_h) $(top_h) $(version_h) $(serial_h) $(doublest_h) \
        $(gdb_assert_h) $(event_top_h) $(gdb_string_h) $(gdb_stat_h) \
-       $(ui_out_h) $(cli_out_h) $(readline_h)
+       $(ui_out_h) $(cli_out_h)
 tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \
        $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \
        $(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \
        $(linespec_h) $(regcache_h) $(completer_h) $(gdb_events_h) \
-       $(block_h) $(ax_h) $(ax_gdb_h) $(readline_h) $(dictionary_h)
-trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) $(regcache_h)
+       $(block_h) $(dictionary_h) $(ax_h) $(ax_gdb_h)
+trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) \
+       $(regcache_h)
 typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
        $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \
        $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \
@@ -2344,25 +2351,27 @@ typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
 ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h)
 ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \
        $(ui_out_h) $(gdb_assert_h)
-utils.o: utils.c $(config_h) $(defs_h) $(gdb_assert_h) $(gdb_string_h) \
-       $(event_top_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) \
-       $(demangle_h) $(expression_h) $(language_h) $(annotate_h) \
-       $(filenames_h) $(inferior_h) $(mmalloc_h) $(charset_h) $(readline_h)
+user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \
+       $(gdb_string_h) $(gdb_assert_h) $(frame_h)
+utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \
+       $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \
+       $(expression_h) $(language_h) $(charset_h) $(annotate_h) \
+       $(filenames_h) $(inferior_h) $(mmalloc_h)
 uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \
        $(regcache_h) $(gregset_h)
-v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
-       $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
-       $(arch_utils_h) $(regcache_h) $(symtab_h)
 v850ice.o: v850ice.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \
        $(inferior_h) $(breakpoint_h) $(symfile_h) $(target_h) $(objfiles_h) \
        $(gdbcore_h) $(value_h) $(command_h) $(regcache_h)
+v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+       $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+       $(arch_utils_h) $(regcache_h) $(symtab_h)
 valarith.o: valarith.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \
        $(expression_h) $(target_h) $(language_h) $(gdb_string_h) \
        $(doublest_h) $(infcall_h)
 valops.o: valops.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) $(frame_h) \
        $(inferior_h) $(gdbcore_h) $(target_h) $(demangle_h) $(language_h) \
-       $(gdbcmd_h) $(regcache_h) $(cp_abi_h) $(gdb_string_h) \
-       $(gdb_assert_h) $(block_h) $(dictionary_h) $(cp_support_h)
+       $(gdbcmd_h) $(regcache_h) $(cp_abi_h) $(block_h) $(infcall_h) \
+       $(dictionary_h) $(cp_support_h) $(gdb_string_h) $(gdb_assert_h)
 valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
        $(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(language_h) \
        $(annotate_h) $(valprint_h) $(floatformat_h) $(doublest_h)
@@ -2374,27 +2383,28 @@ varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \
        $(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h)
 vax-tdep.o: vax-tdep.c $(defs_h) $(symtab_h) $(opcode_vax_h) $(gdbcore_h) \
        $(inferior_h) $(regcache_h) $(frame_h) $(value_h) $(arch_utils_h) \
-       $(gdb_string_h) $(vax_tdep_h) $(osabi_h)
+       $(gdb_string_h) $(osabi_h) $(vax_tdep_h)
 w89k-rom.o: w89k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
        $(serial_h) $(xmodem_h) $(regcache_h)
 win32-nat.o: win32-nat.c $(defs_h) $(tm_h) $(frame_h) $(inferior_h) \
        $(target_h) $(gdbcore_h) $(command_h) $(completer_h) $(regcache_h) \
        $(top_h) $(i386_tdep_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
        $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h)
-wince-stub.o: wince-stub.c $(wince_stub_h)
 wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \
-       $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \
-       $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) $(regcache_h) $(mips_tdep_h)
+       $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
+       $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \
+       $(regcache_h) $(mips_tdep_h)
+wince-stub.o: wince-stub.c $(wince_stub_h)
 wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h)
 x86-64-linux-nat.o: x86-64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
-       $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(gregset_h) \
-       $(x86_64_tdep_h)
-x86-64-linux-tdep.o: x86-64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
-       $(regcache_h) $(osabi_h) $(gdb_string_h) $(x86_64_tdep_h) 
-x86-64-tdep.o: x86-64-tdep.c $(defs_h) \
-       $(inferior_h) $(gdbcore_h) $(arch_utils_h) $(block_h) \
+       $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_proc_service_h) \
+       $(gregset_h) $(x86_64_tdep_h) $(x86_64_linux_tdep_h)
+x86-64-linux-tdep.o: x86-64-linux-tdep.c $(defs_h) $(inferior_h) \
+       $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \
+       $(x86_64_tdep_h) $(x86_64_linux_tdep_h)
+x86-64-tdep.o: x86-64-tdep.c $(defs_h) $(arch_utils_h) $(block_h) \
        $(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
-       $(inferior_h) $(gdbcmd_h) $(gdbcode_h) $(objfiles_h) $(regcache_h) \
+       $(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \
        $(symfile_h) $(gdb_assert_h) $(x86_64_tdep_h) $(i387_tdep_h)
 xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \
        $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \
@@ -2407,20 +2417,20 @@ xmodem.o: xmodem.c $(defs_h) $(serial_h) $(target_h) $(xmodem_h)
 xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \
        $(symfile_h) $(arch_utils_h) $(regcache_h) $(gdbcore_h) \
        $(objfiles_h)
-z8k-tdep.o: z8k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcmd_h) \
-       $(gdbtypes_h) $(dis_asm_h) $(gdbcore_h) $(regcache_h) $(value_h)
+# OBSOLETE z8k-tdep.o: z8k-tdep.c
 
 #
 # gdb/cli/ dependencies
 #
 # Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the mi directory.
+# or try to compile the object file into the sub-directory.
 
 cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(completer_h) $(target_h) \
-       $(gdb_wait_h) $(gdb_regex_h) $(gdb_string_h) $(filenames_h) \
-       $(ui_out_h) $(top_h) $(cli_decode_h) $(cli_script_h) \
-       $(cli_setshow_h) $(cli_cmds_h) $(source_h) $(linespec_h) \
-       $(expression_h) $(language_h) $(objfiles_h) $(gdb_vfork_h)
+       $(gdb_wait_h) $(gdb_regex_h) $(gdb_string_h) $(gdb_vfork_h) \
+       $(linespec_h) $(expression_h) $(frame_h) $(value_h) $(language_h) \
+       $(filenames_h) $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) \
+       $(top_h) $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) \
+       $(cli_cmds_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
 cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
        $(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \
@@ -2428,11 +2438,14 @@ cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c
 cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \
        $(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \
-       $(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h)
+       $(cli_dump_h) $(gdb_assert_h) $(target_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c
 cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \
        $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c
+cli-logging.o: $(srcdir)/cli/cli-logging.c $(defs_h) $(gdbcmd_h) $(ui_out_h) \
+       $(gdb_string_h)
+       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-logging.c
 cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \
        $(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \
        $(cli_script_h)
@@ -2598,33 +2611,33 @@ gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \
 # gdb/mi/ dependencies
 #
 # Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the mi directory.
+# or try to compile the object file into the sub-directory.
 
 mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \
        $(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \
        $(mi_getopt_h) $(gdb_events_h) $(gdb_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c
-mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c $(defs_h) $(mi_cmds_h) \
-       $(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \
-       $(mi_getopt_h) $(gdb_events_h) $(gdb_h)
-       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-file.c
 mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \
-       $(mi_cmds_h) $(mi_getopt_h) $(ui_out_h) $(gdb_string_h) $(disasm_h)
+       $(mi_cmds_h) $(mi_getopt_h) $(gdb_string_h) $(ui_out_h) $(disasm_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c
 mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \
        $(mi_out_h) $(mi_cmds_h) $(mi_getopt_h) $(symtab_h) $(target_h) \
-       $(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h)
+       $(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h) \
+       $(gdb_stat_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c
+mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c $(defs_h) $(mi_cmds_h) \
+       $(mi_getopt_h) $(ui_out_h) $(symtab_h) $(source_h)
+       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-file.c
+mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \
+       $(gdb_string_h)
+       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c
 mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \
-       $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) $(stack_h) \
-       $(dictionary_h)
+       $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) \
+       $(stack_h) $(dictionary_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c
 mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
        $(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c
-mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \
-       $(gdb_string_h)
-       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c
 mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \
        $(gdb_string_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-console.c
@@ -2639,15 +2652,15 @@ mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \
        $(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \
        $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) $(interps_h) \
        $(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \
-       $(gdb_h) $(frame_h)
+       $(gdb_h) $(frame_h) $(mi_main_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c
 mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c
 mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_cmds_h) $(mi_parse_h) \
        $(gdb_string_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c
-mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c $(defs_h) \
-       $(mi_cmds_h) $(ui_out_h) $(symtab_h)
+mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c $(defs_h) $(mi_cmds_h) \
+       $(symtab_h) $(ui_out_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-symbol-cmds.c
 
 #
@@ -2667,93 +2680,94 @@ rdi-share/libangsd.a:   force
        fi
 
 #
-# Signals sub-directory
+# gdb/signals/ dependencies
 #
 # Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the mi directory.
+# or try to compile the object file into the sub-directory.
 
-signals.o: $(srcdir)/signals/signals.c $(defs_h) $(target_h) $(gdb_string_h)
+signals.o: $(srcdir)/signals/signals.c $(server_h) $(defs_h) $(target_h) \
+       $(gdb_string_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/signals/signals.c
 
 #
-# TUI dependencies
+# gdb/tui/ dependencies
 #
 # Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the mi directory.
+# or try to compile the object file into the sub-directory.
 
-tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \
-       $(tui_tuiIO_h) $(tui_h)
-       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c
-tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(config_h) $(defs_h) $(symtab_h) \
-       $(inferior_h) $(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
-       $(target_h) $(gdbcore_h) $(event_loop_h) $(frame_h) $(breakpoint_h) \
-       $(gdb_events_h) $(tui_h) $(tuiData_h) $(tuiLayout_h) $(tuiIO_h) \
-       $(tuiRegs_h) $(tuiWin_h) $(tuiStack_h) $(tuiDataWin_h) \
-       $(tuiSourceWin_h) $(readline_h)
-       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c
-tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \
-       $(event_top_h) $(event_loop_h) $(ui_out_h) $(tui_tuiData_h) \
-       $(readline_h) $(tui_tuiWin_h) $(tui_h) $(tui_tuiIO_h)
-       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c
-tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \
-       $(gdb_string_h) $(gdb_assert_h)
-       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-out.c
-tui.o: $(srcdir)/tui/tui.c $(config_h) $(defs_h) $(gdbcmd_h) $(tui_h) \
-       $(tuiData_h) $(tuiLayout_h) $(tuiIO_h) $(tuiRegs_h) $(tuiStack_h) \
-       $(tuiWin_h) $(tuiSourceWin_h) $(readline_h) $(target_h) $(frame_h) \
-       $(breakpoint_h) $(inferior_h)
-       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c
-tuiCommand.o: $(srcdir)/tui/tuiCommand.c $(config_h) $(defs_h) $(tui_h) \
-       $(tuiData_h) $(tuiWin_h) $(tuiIO_h)
+tuiCommand.o: $(srcdir)/tui/tuiCommand.c $(defs_h) $(tui_h) $(tuiData_h) \
+       $(tuiWin_h) $(tuiIO_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiCommand.c
-tuiData.o: $(srcdir)/tui/tuiData.c $(config_h) $(defs_h) $(tui_h) \
+tuiDataWin.o: $(srcdir)/tui/tuiDataWin.c $(defs_h) $(tui_h) $(tuiData_h) \
+       $(tuiGeneralWin_h) $(tuiRegs_h)
+       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiDataWin.c
+tuiData.o: $(srcdir)/tui/tuiData.c $(defs_h) $(symtab_h) $(tui_h) \
        $(tuiData_h) $(tuiGeneralWin_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiData.c
-tuiDataWin.o: $(srcdir)/tui/tuiDataWin.c $(config_h) $(defs_h) $(tui_h) \
-       $(tuiData_h) $(tuiGeneralWin_h) $(tuiRegs_h)
-       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiDataWin.c
-tuiDisassem.o: $(srcdir)/tui/tuiDisassem.c $(config_h) $(defs_h) $(symtab_h) \
-       $(breakpoint_h) $(frame_h) $(value_h) $(tui_h) $(tuiData_h) \
-       $(tuiWin_h) $(tuiLayout_h) $(tuiSourceWin_h) $(tuiStack_h) \
-       $(tui_file_h) $(disasm_h)
+tuiDisassem.o: $(srcdir)/tui/tuiDisassem.c $(defs_h) $(symtab_h) \
+       $(breakpoint_h) $(frame_h) $(value_h) $(source_h) $(disasm_h) \
+       $(tui_h) $(tuiData_h) $(tuiWin_h) $(tuiLayout_h) $(tuiSourceWin_h) \
+       $(tuiStack_h) $(tui_file_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiDisassem.c
-tuiGeneralWin.o: $(srcdir)/tui/tuiGeneralWin.c $(config_h) $(defs_h) \
-       $(tui_h) $(tuiData_h) $(tuiGeneralWin_h) $(tuiWin_h)
+tuiGeneralWin.o: $(srcdir)/tui/tuiGeneralWin.c $(defs_h) $(tui_h) \
+       $(tuiData_h) $(tuiGeneralWin_h) $(tuiWin_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiGeneralWin.c
-tuiIO.o: $(srcdir)/tui/tuiIO.c $(config_h) $(defs_h) $(terminal_h) \
-       $(target_h) $(event_loop_h) $(command_h) $(top_h) $(readline_h) \
+tuiIO.o: $(srcdir)/tui/tuiIO.c $(defs_h) $(terminal_h) $(target_h) \
+       $(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(readline_h) \
        $(tui_h) $(tuiData_h) $(tuiIO_h) $(tuiCommand_h) $(tuiWin_h) \
        $(tuiGeneralWin_h) $(tui_file_h) $(ui_out_h) $(cli_out_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiIO.c
-tuiLayout.o: $(srcdir)/tui/tuiLayout.c $(config_h) $(defs_h) $(command_h) \
-       $(symtab_h) $(frame_h) $(tui_h) $(tuiData_h) $(tuiDataWin_h) \
+tuiLayout.o: $(srcdir)/tui/tuiLayout.c $(defs_h) $(command_h) $(symtab_h) \
+       $(frame_h) $(source_h) $(tui_h) $(tuiData_h) $(tuiDataWin_h) \
        $(tuiGeneralWin_h) $(tuiStack_h) $(tuiRegs_h) $(tuiWin_h) \
        $(tuiSourceWin_h) $(tuiDisassem_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiLayout.c
-tuiRegs.o: $(srcdir)/tui/tuiRegs.c $(config_h) $(defs_h) $(tui_h) \
-       $(tuiData_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) \
+tuiRegs.o: $(srcdir)/tui/tuiRegs.c $(defs_h) $(tui_h) $(tuiData_h) \
+       $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) $(regcache_h) \
        $(inferior_h) $(target_h) $(tuiLayout_h) $(tuiWin_h) $(tuiDataWin_h) \
        $(tuiGeneralWin_h) $(tui_file_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiRegs.c
-tuiSource.o: $(srcdir)/tui/tuiSource.c $(config_h) $(defs_h) $(symtab_h) \
-       $(frame_h) $(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) \
-       $(tuiData_h) $(tuiStack_h) $(tuiSourceWin_h) $(tuiSource_h)
-       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiSource.c
-tuiSourceWin.o: $(srcdir)/tui/tuiSourceWin.c $(config_h) $(defs_h) \
-       $(symtab_h) $(frame_h) $(breakpoint_h) $(value_h) $(tui_h) \
+tuiSourceWin.o: $(srcdir)/tui/tuiSourceWin.c $(defs_h) $(symtab_h) \
+       $(frame_h) $(breakpoint_h) $(value_h) $(source_h) $(tui_h) \
        $(tuiData_h) $(tuiStack_h) $(tuiWin_h) $(tuiGeneralWin_h) \
        $(tuiSourceWin_h) $(tuiSource_h) $(tuiDisassem_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiSourceWin.c
-tuiStack.o: $(srcdir)/tui/tuiStack.c $(config_h) $(defs_h) $(symtab_h) \
-       $(breakpoint_h) $(frame_h) $(command_h) $(tui_h) $(tuiData_h) \
-       $(tuiStack_h) $(tuiGeneralWin_h) $(tuiSource_h) $(tuiSourceWin_h)
+tuiSource.o: $(srcdir)/tui/tuiSource.c $(defs_h) $(symtab_h) $(frame_h) \
+       $(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) $(tuiData_h) \
+       $(tuiStack_h) $(tuiSourceWin_h) $(tuiSource_h)
+       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiSource.c
+tuiStack.o: $(srcdir)/tui/tuiStack.c $(defs_h) $(symtab_h) $(breakpoint_h) \
+       $(frame_h) $(command_h) $(inferior_h) $(target_h) $(top_h) $(tui_h) \
+       $(tuiData_h) $(tuiStack_h) $(tuiGeneralWin_h) $(tuiSource_h) \
+       $(tuiSourceWin_h) $(tui_file_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiStack.c
-tuiWin.o: $(srcdir)/tui/tuiWin.c $(config_h) $(defs_h) $(command_h) \
-       $(symtab_h) $(breakpoint_h) $(frame_h) $(cli_cmds_h) $(tui_h) \
-       $(tuiData_h) $(tuiGeneralWin_h) $(tuiStack_h) $(tuiRegs_h) \
-       $(tuiDisassem_h) $(tuiSource_h) $(tuiSourceWin_h) $(tuiDataWin_h) \
-       $(readline_h)
+tuiWin.o: $(srcdir)/tui/tuiWin.c $(defs_h) $(command_h) $(symtab_h) \
+       $(breakpoint_h) $(frame_h) $(cli_cmds_h) $(top_h) $(source_h) \
+       $(tui_h) $(tuiData_h) $(tuiGeneralWin_h) $(tuiStack_h) $(tuiRegs_h) \
+       $(tuiDisassem_h) $(tuiSource_h) $(tuiSourceWin_h) $(tuiDataWin_h)
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiWin.c
+tui.o: $(srcdir)/tui/tui.c $(defs_h) $(gdbcmd_h) $(tui_h) $(tuiData_h) \
+       $(tuiLayout_h) $(tuiIO_h) $(tuiRegs_h) $(tuiStack_h) $(tuiWin_h) \
+       $(tuiSourceWin_h) $(tuiDataWin_h) $(readline_h) $(target_h) \
+       $(frame_h) $(breakpoint_h) $(inferior_h) $(symtab_h) $(source_h)
+       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c
+tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \
+       $(tui_tuiIO_h) $(tui_h)
+       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c
+tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(defs_h) $(symtab_h) $(inferior_h) \
+       $(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) \
+       $(gdbcore_h) $(event_loop_h) $(event_top_h) $(frame_h) \
+       $(breakpoint_h) $(gdb_events_h) $(ui_out_h) $(top_h) $(tui_h) \
+       $(tuiData_h) $(tuiLayout_h) $(tuiIO_h) $(tuiRegs_h) $(tuiWin_h) \
+       $(tuiStack_h) $(tuiDataWin_h) $(tuiSourceWin_h)
+       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c
+tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \
+       $(event_top_h) $(event_loop_h) $(ui_out_h) $(tui_tuiData_h) \
+       $(readline_h) $(tui_tuiWin_h) $(tui_h) $(tui_tuiIO_h) $(cli_out_h)
+       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c
+tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \
+       $(gdb_string_h) $(gdb_assert_h)
+       $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-out.c
 
 #
 # vx-share sub-directory
index 604f085cc9d34cf4b0bece50ae5e0a2d6247c772..77e6931e3400acfbaf12e47e4d5365e173162272 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,16 +3,20 @@
 
 *** Changes since GDB 6.0:
 
-
 *** Changes in GDB 6.0:
 
+* GDB supports logging output to a file
+
+There are two new commands, "set logging" and "show logging", which can be
+used to capture GDB's output to a file.
+
 * The meaning of "detach" has changed for gdbserver
 
 The "detach" command will now resume the application, as documented.  To
 disconnect from gdbserver and leave it stopped, use the new "disconnect"
 command.
 
-* d10v `regs' command deprecated
+* d10v, m68hc11 `regs' command deprecated
 
 The `info registers' command has been updated so that it displays the
 registers using a format identical to the old `regs' command.
@@ -42,6 +46,7 @@ Fix for gdb/702: a -var-assign that updates the value now shows up
 * Multi-arched targets.
 
 HP/PA HPUX11, 32bit ABI (partial)      hppa*-*-hpux* except hppa*64*-*-hpux11*
+Mitsubishi M32R/D w/simulator                  m32r-*-elf*
 
 * OBSOLETE configurations and files
 
@@ -50,7 +55,6 @@ been commented out.  Unless there is activity to revive these
 configurations, the next release of GDB will have their sources
 permanently REMOVED.
 
-Mitsubishi M32R/D w/simulator                  m32r-*-elf*
 Z8000 simulator                                z8k-zilog-none    or z8ksim
 Matsushita MN10200 w/simulator                 mn10200-*-*
 H8/500 simulator                       h8500-hitachi-hms or h8500hms
index 9eb9c62c7da7d7ac8331a13b32a36e30096516d9..153ed11ce7d212eaf6e49211c355228e4204dcae 100644 (file)
@@ -304,8 +304,9 @@ static const struct frame_unwind alpha_mdebug_frame_unwind = {
 };
 
 const struct frame_unwind *
-alpha_mdebug_frame_p (CORE_ADDR pc)
+alpha_mdebug_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   alpha_extra_func_info_t proc_desc;
 
   /* If this PC does not map to a PDR, then clearly this isn't an
@@ -360,8 +361,9 @@ static const struct frame_base alpha_mdebug_frame_base = {
 };
 
 static const struct frame_base *
-alpha_mdebug_frame_base_p (CORE_ADDR pc)
+alpha_mdebug_frame_base_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   alpha_extra_func_info_t proc_desc;
 
   /* If this PC does not map to a PDR, then clearly this isn't an
@@ -379,6 +381,6 @@ alpha_mdebug_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
-  frame_unwind_append_predicate (gdbarch, alpha_mdebug_frame_p);
-  frame_base_append_predicate (gdbarch, alpha_mdebug_frame_base_p);
+  frame_unwind_append_sniffer (gdbarch, alpha_mdebug_frame_sniffer);
+  frame_base_append_sniffer (gdbarch, alpha_mdebug_frame_base_sniffer);
 }
index fb2ca1851b5cf518ab5d58077b9fc60b5524c786..d6e95ca6b86a47ea491bcde15ddffb73eb3f4f10 100644 (file)
@@ -753,24 +753,20 @@ alpha_sigtramp_frame_unwind_cache (struct frame_info *next_frame,
   return info;
 }
 
-/* Return the address of REGNO in a sigtramp frame.  Since this is all
-   arithmetic, it doesn't seem worthwhile to cache it.  */
-
-#ifndef SIGFRAME_PC_OFF
-#define SIGFRAME_PC_OFF                (2 * 8)
-#define SIGFRAME_REGSAVE_OFF   (4 * 8)
-#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_REGSAVE_OFF + 32 * 8 + 8)
-#endif
+/* Return the address of REGNUM in a sigtramp frame.  Since this is
+   all arithmetic, it doesn't seem worthwhile to cache it.  */
 
 static CORE_ADDR
-alpha_sigtramp_register_address (CORE_ADDR sigcontext_addr, unsigned int regno)
+alpha_sigtramp_register_address (CORE_ADDR sigcontext_addr, int regnum)
 { 
-  if (regno < 32)
-    return sigcontext_addr + SIGFRAME_REGSAVE_OFF + regno * 8;
-  if (regno >= ALPHA_FP0_REGNUM && regno < ALPHA_FP0_REGNUM + 32)
-    return sigcontext_addr + SIGFRAME_FPREGSAVE_OFF + regno * 8;
-  if (regno == ALPHA_PC_REGNUM)
-    return sigcontext_addr + SIGFRAME_PC_OFF; 
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+  if (regnum >= 0 && regnum < 32)
+    return sigcontext_addr + tdep->sc_regs_offset + regnum * 8;
+  else if (regnum >= ALPHA_FP0_REGNUM && regnum < ALPHA_FP0_REGNUM + 32)
+    return sigcontext_addr + tdep->sc_fpregs_offset + regnum * 8;
+  else if (regnum == ALPHA_PC_REGNUM)
+    return sigcontext_addr + tdep->sc_pc_offset; 
 
   return 0;
 }
@@ -862,8 +858,9 @@ static const struct frame_unwind alpha_sigtramp_frame_unwind = {
 };
 
 static const struct frame_unwind *
-alpha_sigtramp_frame_p (CORE_ADDR pc)
+alpha_sigtramp_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   char *name;
 
   /* We shouldn't even bother to try if the OSABI didn't register
@@ -1203,7 +1200,7 @@ static const struct frame_unwind alpha_heuristic_frame_unwind = {
 };
 
 static const struct frame_unwind *
-alpha_heuristic_frame_p (CORE_ADDR pc)
+alpha_heuristic_frame_sniffer (struct frame_info *next_frame)
 {
   return &alpha_heuristic_frame_unwind;
 }
@@ -1495,6 +1492,9 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   tdep->dynamic_sigtramp_offset = NULL;
   tdep->sigcontext_addr = NULL;
+  tdep->sc_pc_offset = 2 * 8;
+  tdep->sc_regs_offset = 4 * 8;
+  tdep->sc_fpregs_offset = tdep->sc_regs_offset + 32 * 8 + 8;
 
   tdep->jb_pc = -1;    /* longjmp support not enabled by default  */
 
@@ -1572,8 +1572,8 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   if (tdep->jb_pc >= 0)
     set_gdbarch_get_longjmp_target (gdbarch, alpha_get_longjmp_target);
 
-  frame_unwind_append_predicate (gdbarch, alpha_sigtramp_frame_p);
-  frame_unwind_append_predicate (gdbarch, alpha_heuristic_frame_p);
+  frame_unwind_append_sniffer (gdbarch, alpha_sigtramp_frame_sniffer);
+  frame_unwind_append_sniffer (gdbarch, alpha_heuristic_frame_sniffer);
 
   frame_base_set_default (gdbarch, &alpha_heuristic_frame_base);
 
@@ -1583,9 +1583,8 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 void
 alpha_dwarf2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  frame_unwind_append_predicate (gdbarch, dwarf2_frame_p);
-  frame_base_append_predicate (gdbarch, dwarf2_frame_base_p);
-  set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
+  frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
+  frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer);
 }
 
 extern initialize_file_ftype _initialize_alpha_tdep; /* -Wmissing-prototypes */
index c0e28e65772ffd0c556124877e10c1e34be7b175..9afe7be5f53dbe813b03e8038bc15dbfc7969d7c 100644 (file)
@@ -82,6 +82,11 @@ struct gdbarch_tdep
      the sigcontext structure for that signal handler.  */
   CORE_ADDR (*sigcontext_addr) (struct frame_info *);
 
+  /* Offset of registers in `struct sigcontext'.  */
+  int sc_pc_offset;
+  int sc_regs_offset;
+  int sc_fpregs_offset;
+
   int jb_pc;                   /* Offset to PC value in jump buffer.
                                   If htis is negative, longjmp support
                                   will be disabled.  */
index 680e303f58775b715f14e6be21ea819deb1c2b95..d8f4fa039c31dd15dcde50f5e6cb2b30e4337e5d 100644 (file)
@@ -32,7 +32,7 @@ alphafbsd_use_struct_convention (int gcc_p, struct type *type)
 
   /* All aggregate types that won't fit in a register must be returned
      in memory.  */
-  if (TYPE_LENGTH (type) > DEPRECATED_REGISTER_SIZE)
+  if (TYPE_LENGTH (type) > ALPHA_REGISTER_SIZE)
     return 1;
 
   /* The only aggregate types that can be returned in a register are
@@ -54,14 +54,41 @@ alphafbsd_use_struct_convention (int gcc_p, struct type *type)
 
   return 0;
 }
+\f
+
+/* Support for signal handlers.  */
+
+/* Return whether PC is in a BSD sigtramp routine.  */
+
+CORE_ADDR alphafbsd_sigtramp_start = 0x11ffff68;
+CORE_ADDR alphafbsd_sigtramp_end = 0x11ffffe0;
 
 static int
 alphafbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
 {
-  /* FIXME */
-  return 0;
+  return (pc >= alphafbsd_sigtramp_start && pc < alphafbsd_sigtramp_end);
 }
 
+static LONGEST
+alphafbsd_sigtramp_offset (CORE_ADDR pc)
+{
+  return pc - alphafbsd_sigtramp_start;
+}
+
+/* Assuming NEXT_FRAME is for a frame following a BSD sigtramp
+   routine, return the address of the associated sigcontext structure.  */
+
+static CORE_ADDR
+alphafbsd_sigcontext_addr (struct frame_info *next_frame)
+{
+  ULONGEST sp;
+
+  frame_unwind_unsigned_register (next_frame, ALPHA_SP_REGNUM, &sp);
+  return sp + 24;
+}
+
+/* FreeBSD 5.0-RELEASE or later.  */
+
 static void
 alphafbsd_init_abi (struct gdbarch_info info,
                     struct gdbarch *gdbarch)
@@ -74,13 +101,23 @@ alphafbsd_init_abi (struct gdbarch_info info,
   /* Hook into the MDEBUG frame unwinder.  */
   alpha_mdebug_init_abi (info, gdbarch);
 
+  set_gdbarch_use_struct_convention (gdbarch, alphafbsd_use_struct_convention);
+
   set_gdbarch_pc_in_sigtramp (gdbarch, alphafbsd_pc_in_sigtramp);
 
-  set_gdbarch_use_struct_convention (gdbarch, alphafbsd_use_struct_convention);
+  tdep->dynamic_sigtramp_offset = alphafbsd_sigtramp_offset;
+  tdep->sigcontext_addr = alphafbsd_sigcontext_addr;
+  tdep->sc_pc_offset = 288;
+  tdep->sc_regs_offset = 24;
+  tdep->sc_fpregs_offset = 320;
 
   tdep->jb_pc = 2;
   tdep->jb_elt_size = 8;
 }
+\f
+
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+void _initialize_alphafbsd_tdep (void);
 
 void
 _initialize_alphafbsd_tdep (void)
index 66211e91f364957657e2bae5c020d7e55474357e..0ba9b42f6cd9185fed39802bc98a94d8ae3e2cb8 100644 (file)
@@ -155,28 +155,28 @@ annotate_signalled (void)
 void
 annotate_signal_name (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032signal-name\n");
 }
 
 void
 annotate_signal_name_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032signal-name-end\n");
 }
 
 void
 annotate_signal_string (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032signal-string\n");
 }
 
 void
 annotate_signal_string_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032signal-string-end\n");
 }
 
@@ -193,35 +193,35 @@ annotate_signal (void)
 void
 annotate_breakpoints_headers (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032breakpoints-headers\n");
 }
 
 void
 annotate_field (int num)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032field %d\n", num);
 }
 
 void
 annotate_breakpoints_table (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032breakpoints-table\n");
 }
 
 void
 annotate_record (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032record\n");
 }
 
 void
 annotate_breakpoints_table_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032breakpoints-table-end\n");
 }
 
@@ -238,7 +238,7 @@ annotate_frames_invalid (void)
 void
 annotate_field_begin (struct type *type)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     {
       printf_filtered ("\n\032\032field-begin ");
       print_value_flags (type);
@@ -249,21 +249,21 @@ annotate_field_begin (struct type *type)
 void
 annotate_field_name_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032field-name-end\n");
 }
 
 void
 annotate_field_value (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032field-value\n");
 }
 
 void
 annotate_field_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032field-end\n");
 }
 \f
@@ -291,7 +291,7 @@ annotate_error_begin (void)
 void
 annotate_value_history_begin (int histindex, struct type *type)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     {
       printf_filtered ("\n\032\032value-history-begin %d ", histindex);
       print_value_flags (type);
@@ -302,7 +302,7 @@ annotate_value_history_begin (int histindex, struct type *type)
 void
 annotate_value_begin (struct type *type)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     {
       printf_filtered ("\n\032\032value-begin ");
       print_value_flags (type);
@@ -313,91 +313,91 @@ annotate_value_begin (struct type *type)
 void
 annotate_value_history_value (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032value-history-value\n");
 }
 
 void
 annotate_value_history_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032value-history-end\n");
 }
 
 void
 annotate_value_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032value-end\n");
 }
 
 void
 annotate_display_begin (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032display-begin\n");
 }
 
 void
 annotate_display_number_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032display-number-end\n");
 }
 
 void
 annotate_display_format (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032display-format\n");
 }
 
 void
 annotate_display_expression (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032display-expression\n");
 }
 
 void
 annotate_display_expression_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032display-expression-end\n");
 }
 
 void
 annotate_display_value (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032display-value\n");
 }
 
 void
 annotate_display_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032display-end\n");
 }
 
 void
 annotate_arg_begin (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032arg-begin\n");
 }
 
 void
 annotate_arg_name_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032arg-name-end\n");
 }
 
 void
 annotate_arg_value (struct type *type)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     {
       printf_filtered ("\n\032\032arg-value ");
       print_value_flags (type);
@@ -408,7 +408,7 @@ annotate_arg_value (struct type *type)
 void
 annotate_arg_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032arg-end\n");
 }
 
@@ -430,7 +430,7 @@ annotate_source (char *filename, int line, int character, int mid, CORE_ADDR pc)
 void
 annotate_frame_begin (int level, CORE_ADDR pc)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     {
       printf_filtered ("\n\032\032frame-begin %d 0x", level);
       print_address_numeric (pc, 0, gdb_stdout);
@@ -441,98 +441,98 @@ annotate_frame_begin (int level, CORE_ADDR pc)
 void
 annotate_function_call (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032function-call\n");
 }
 
 void
 annotate_signal_handler_caller (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032signal-handler-caller\n");
 }
 
 void
 annotate_frame_address (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032frame-address\n");
 }
 
 void
 annotate_frame_address_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032frame-address-end\n");
 }
 
 void
 annotate_frame_function_name (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032frame-function-name\n");
 }
 
 void
 annotate_frame_args (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032frame-args\n");
 }
 
 void
 annotate_frame_source_begin (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032frame-source-begin\n");
 }
 
 void
 annotate_frame_source_file (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032frame-source-file\n");
 }
 
 void
 annotate_frame_source_file_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032frame-source-file-end\n");
 }
 
 void
 annotate_frame_source_line (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032frame-source-line\n");
 }
 
 void
 annotate_frame_source_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032frame-source-end\n");
 }
 
 void
 annotate_frame_where (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032frame-where\n");
 }
 
 void
 annotate_frame_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032frame-end\n");
 }
 \f
 void
 annotate_array_section_begin (int index, struct type *elttype)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     {
       printf_filtered ("\n\032\032array-section-begin %d ", index);
       print_value_flags (elttype);
@@ -543,28 +543,28 @@ annotate_array_section_begin (int index, struct type *elttype)
 void
 annotate_elt_rep (unsigned int repcount)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032elt-rep %u\n", repcount);
 }
 
 void
 annotate_elt_rep_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032elt-rep-end\n");
 }
 
 void
 annotate_elt (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032elt\n");
 }
 
 void
 annotate_array_section_end (void)
 {
-  if (annotation_level > 1)
+  if (annotation_level == 2)
     printf_filtered ("\n\032\032array-section-end\n");
 }
 
index 043600e98483ba6b694ad4bd059b98fc16e12025..40a863b26f81a2eaca942ccd73d38329ec4177e9 100644 (file)
@@ -131,22 +131,6 @@ generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
   return 0;
 }
 
-const char *
-legacy_register_name (int i)
-{
-#ifdef REGISTER_NAMES
-  static char *names[] = REGISTER_NAMES;
-  if (i < 0 || i >= (sizeof (names) / sizeof (*names)))
-    return NULL;
-  else
-    return names[i];
-#else
-  internal_error (__FILE__, __LINE__,
-                 "legacy_register_name: called.");
-  return NULL;
-#endif
-}
-
 #if defined (CALL_DUMMY)
 LONGEST legacy_call_dummy_words[] = CALL_DUMMY;
 #else
index 234257d97b2510d62a642eca15c72f0a670944dc..fcea5310b250aff7565553a2cd75c505b28fcf66 100644 (file)
@@ -55,9 +55,6 @@ extern gdbarch_frameless_function_invocation_ftype generic_frameless_function_in
    language family, so that case is irrelevant for C.  */
 extern gdbarch_return_value_on_stack_ftype generic_return_value_on_stack_not;
 
-/* Map onto old REGISTER_NAMES. */
-extern const char *legacy_register_name (int i);
-
 /* Accessor for old global function pointer for disassembly. */
 extern int legacy_print_insn (bfd_vma vma, disassemble_info *info);
 
index c5d6ffe769d49b7469d008a3a13286d5f5ef6407..477aa82cb83f7556088c8545181d0c75eaf914bd 100644 (file)
@@ -774,14 +774,6 @@ avr_scan_prologue (CORE_ADDR pc, struct avr_unwind_cache *info)
   return pc + avr_scan_arg_moves (vpc, prologue);;
 }
 
-/* Returns the return address for a dummy. */
-
-static CORE_ADDR
-avr_call_dummy_address (void)
-{
-  return entry_point_address ();
-}
-
 static CORE_ADDR
 avr_skip_prologue (CORE_ADDR pc)
 {
@@ -804,7 +796,9 @@ avr_skip_prologue (CORE_ADDR pc)
 
       prologue_end = avr_scan_prologue (pc, &info);
 
-      if (info.prologue_type != AVR_PROLOGUE_NONE)
+      if (info.prologue_type == AVR_PROLOGUE_NONE)
+        return pc;
+      else
         {
           sal = find_pc_line (func_addr, 0);
 
@@ -864,76 +858,6 @@ avr_extract_return_value (struct type *type, struct regcache *regcache,
     }
 }
 
-static void
-avr_saved_regs_unwinder (struct frame_info *next_frame,
-                         struct trad_frame_saved_reg *this_saved_regs,
-                         int regnum, int *optimizedp,
-                         enum lval_type *lvalp, CORE_ADDR *addrp,
-                         int *realnump, void *bufferp)
-{
-  if (this_saved_regs[regnum].addr != 0)
-    {
-      *optimizedp = 0;
-      *lvalp = lval_memory;
-      *addrp = this_saved_regs[regnum].addr;
-      *realnump = -1;
-      if (bufferp != NULL)
-        {
-          /* Read the value in from memory.  */
-
-          if (regnum == AVR_PC_REGNUM)
-            {
-              /* Reading the return PC from the PC register is slightly
-                 abnormal.  register_size(AVR_PC_REGNUM) says it is 4 bytes,
-                 but in reality, only two bytes (3 in upcoming mega256) are
-                 stored on the stack.
-
-                 Also, note that the value on the stack is an addr to a word
-                 not a byte, so we will need to multiply it by two at some
-                 point. 
-
-                 And to confuse matters even more, the return address stored
-                 on the stack is in big endian byte order, even though most
-                 everything else about the avr is little endian. Ick!  */
-
-              /* FIXME: number of bytes read here will need updated for the
-                 mega256 when it is available.  */
-
-              ULONGEST pc;
-              unsigned char tmp;
-              unsigned char buf[2];
-
-              read_memory (this_saved_regs[regnum].addr, buf, 2);
-
-              /* Convert the PC read from memory as a big-endian to
-                 little-endian order. */
-              tmp = buf[0];
-              buf[0] = buf[1];
-              buf[1] = tmp;
-
-              pc = (extract_unsigned_integer (buf, 2) * 2);
-              store_unsigned_integer (bufferp,
-                                      register_size (current_gdbarch, regnum),
-                                      pc);
-            }
-          else
-            {
-              read_memory (this_saved_regs[regnum].addr, bufferp,
-                           register_size (current_gdbarch, regnum));
-            }
-        }
-
-      return;
-    }
-
-  /* No luck, assume this and the next frame have the same register
-     value.  If a value is needed, pass the request on down the chain;
-     otherwise just return an indication that the value is in the same
-     register as the next frame.  */
-  frame_register_unwind (next_frame, regnum, optimizedp, lvalp, addrp,
-                        realnump, bufferp);
-}
-
 /* Put here the code to store, into fi->saved_regs, the addresses of
    the saved registers of frame described by FRAME_INFO.  This
    includes special registers such as pc and fp saved in special ways
@@ -965,7 +889,8 @@ avr_frame_unwind_cache (struct frame_info *next_frame,
   if ((pc > 0) && (pc < frame_pc_unwind (next_frame)))
     avr_scan_prologue (pc, info);
 
-  if (info->prologue_type != AVR_PROLOGUE_NONE)
+  if ((info->prologue_type != AVR_PROLOGUE_NONE)
+      && (info->prologue_type != AVR_PROLOGUE_MAIN))
     {
       ULONGEST high_base;       /* High byte of FP */
 
@@ -995,8 +920,7 @@ avr_frame_unwind_cache (struct frame_info *next_frame,
   info->base = avr_make_saddr (this_base);
 
   /* Adjust all the saved registers so that they contain addresses and not
-     offsets.  We need to add one to the addresses since push ops are post
-     decrement on the avr.  */
+     offsets.  */
   for (i = 0; i < NUM_REGS - 1; i++)
     if (info->saved_regs[i].addr)
       {
@@ -1011,6 +935,10 @@ avr_frame_unwind_cache (struct frame_info *next_frame,
       info->saved_regs[AVR_PC_REGNUM].addr = info->prev_sp;
     }  
 
+  /* The previous frame's SP needed to be computed.  Save the computed
+     value.  */
+  trad_frame_set_value (info->saved_regs, AVR_SP_REGNUM, info->prev_sp+1);
+
   return info;
 }
 
@@ -1077,8 +1005,54 @@ avr_frame_prev_register (struct frame_info *next_frame,
   struct avr_unwind_cache *info
     = avr_frame_unwind_cache (next_frame, this_prologue_cache);
 
-  avr_saved_regs_unwinder (next_frame, info->saved_regs, regnum, optimizedp,
-                           lvalp, addrp, realnump, bufferp);
+  if (regnum == AVR_PC_REGNUM)
+    {
+      if (trad_frame_addr_p (info->saved_regs, regnum))
+        {
+          *optimizedp = 0;
+          *lvalp = lval_memory;
+          *addrp = info->saved_regs[regnum].addr;
+          *realnump = -1;
+          if (bufferp != NULL)
+            {
+              /* Reading the return PC from the PC register is slightly
+                 abnormal.  register_size(AVR_PC_REGNUM) says it is 4 bytes,
+                 but in reality, only two bytes (3 in upcoming mega256) are
+                 stored on the stack.
+
+                 Also, note that the value on the stack is an addr to a word
+                 not a byte, so we will need to multiply it by two at some
+                 point. 
+
+                 And to confuse matters even more, the return address stored
+                 on the stack is in big endian byte order, even though most
+                 everything else about the avr is little endian. Ick!  */
+
+              /* FIXME: number of bytes read here will need updated for the
+                 mega256 when it is available.  */
+
+              ULONGEST pc;
+              unsigned char tmp;
+              unsigned char buf[2];
+
+              read_memory (info->saved_regs[regnum].addr, buf, 2);
+
+              /* Convert the PC read from memory as a big-endian to
+                 little-endian order. */
+              tmp = buf[0];
+              buf[0] = buf[1];
+              buf[1] = tmp;
+
+              pc = (extract_unsigned_integer (buf, 2) * 2);
+              store_unsigned_integer (bufferp,
+                                      register_size (current_gdbarch, regnum),
+                                      pc);
+            }
+        }
+    }
+  else
+    trad_frame_prev_register (next_frame, info->saved_regs, regnum,
+                              optimizedp, lvalp, addrp, realnump, bufferp);
 }
 
 static const struct frame_unwind avr_frame_unwind = {
@@ -1088,7 +1062,7 @@ static const struct frame_unwind avr_frame_unwind = {
 };
 
 const struct frame_unwind *
-avr_frame_p (CORE_ADDR pc)
+avr_frame_sniffer (struct frame_info *next_frame)
 {
   return &avr_frame_unwind;
 }
@@ -1339,7 +1313,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_extract_return_value (gdbarch, avr_extract_return_value);
   set_gdbarch_print_insn (gdbarch, print_insn_avr);
 
-  set_gdbarch_call_dummy_address (gdbarch, avr_call_dummy_address);
   set_gdbarch_push_dummy_call (gdbarch, avr_push_dummy_call);
 
   set_gdbarch_address_to_pointer (gdbarch, avr_address_to_pointer);
@@ -1359,7 +1332,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_frameless_function_invocation (gdbarch,
                                              frameless_look_for_prologue);
 
-  frame_unwind_append_predicate (gdbarch, avr_frame_p);
+  frame_unwind_append_sniffer (gdbarch, avr_frame_sniffer);
   frame_base_set_default (gdbarch, &avr_frame_base);
 
   set_gdbarch_unwind_dummy_id (gdbarch, avr_unwind_dummy_id);
index 37debe0a95235f9decc5ace253222350992d50f9..9eb5b7e00d749cd789bc6c74ed6cfeae91f90a6b 100644 (file)
@@ -106,6 +106,47 @@ inside_main_func (CORE_ADDR pc)
            BLOCK_END (SYMBOL_BLOCK_VALUE (mainsym));
        }
     }
+
+  /* Not in the normal symbol tables, see if "main" is in the partial
+     symbol table.  If it's not, then give up.  */
+  {
+    struct minimal_symbol *msymbol
+      = lookup_minimal_symbol (main_name (), NULL, symfile_objfile);
+    if (msymbol != NULL && MSYMBOL_TYPE (msymbol) == mst_text)
+      {
+       struct obj_section *osect
+         = find_pc_sect_section (SYMBOL_VALUE_ADDRESS (msymbol),
+                                 msymbol->ginfo.bfd_section);
+       if (osect != NULL)
+         {
+           int i;
+           /* Step over other symbols at this same address, and
+              symbols in other sections, to find the next symbol in
+              this section with a different address.  */
+           for (i = 1; SYMBOL_LINKAGE_NAME (msymbol + i) != NULL; i++)
+             {
+               if (SYMBOL_VALUE_ADDRESS (msymbol + i) != SYMBOL_VALUE_ADDRESS (msymbol)
+                   && SYMBOL_BFD_SECTION (msymbol + i) == SYMBOL_BFD_SECTION (msymbol))
+                 break;
+             }
+
+           symfile_objfile->ei.main_func_lowpc = SYMBOL_VALUE_ADDRESS (msymbol);
+
+           /* Use the lesser of the next minimal symbol in the same
+              section, or the end of the section, as the end of the
+              function.  */
+           if (SYMBOL_LINKAGE_NAME (msymbol + i) != NULL
+               && SYMBOL_VALUE_ADDRESS (msymbol + i) < osect->endaddr)
+             symfile_objfile->ei.main_func_highpc = SYMBOL_VALUE_ADDRESS (msymbol + i);
+           else
+             /* We got the start address from the last msymbol in the
+                objfile.  So the end address is the end of the
+                section.  */
+             symfile_objfile->ei.main_func_highpc = osect->endaddr;
+         }
+      }
+  }
+
   return (symfile_objfile->ei.main_func_lowpc <= pc &&
          symfile_objfile->ei.main_func_highpc > pc);
 }
@@ -168,31 +209,6 @@ frameless_look_for_prologue (struct frame_info *frame)
     return 0;
 }
 
-/* return the address of the PC for the given FRAME, ie the current PC value
-   if FRAME is the innermost frame, or the address adjusted to point to the
-   call instruction if not.  */
-
-CORE_ADDR
-frame_address_in_block (struct frame_info *frame)
-{
-  CORE_ADDR pc = get_frame_pc (frame);
-
-  /* If we are not in the innermost frame, and we are not interrupted
-     by a signal, frame->pc points to the instruction following the
-     call. As a consequence, we need to get the address of the previous
-     instruction. Unfortunately, this is not straightforward to do, so
-     we just use the address minus one, which is a good enough
-     approximation.  */
-  /* FIXME: cagney/2002-11-10: Should this instead test for
-     NORMAL_FRAME?  A dummy frame (in fact all the abnormal frames)
-     save the PC value in the block.  */
-  if (get_next_frame (frame) != 0
-      && get_frame_type (get_next_frame (frame)) != SIGTRAMP_FRAME)
-    --pc;
-
-  return pc;
-}
-
 /* Return the innermost lexical block in execution
    in a specified stack frame.  The frame address is assumed valid.
 
@@ -212,7 +228,7 @@ frame_address_in_block (struct frame_info *frame)
 struct block *
 get_frame_block (struct frame_info *frame, CORE_ADDR *addr_in_block)
 {
-  const CORE_ADDR pc = frame_address_in_block (frame);
+  const CORE_ADDR pc = get_frame_address_in_block (frame);
 
   if (addr_in_block)
     *addr_in_block = pc;
@@ -512,7 +528,7 @@ block_innermost_frame (const struct block *block)
       frame = get_prev_frame (frame);
       if (frame == NULL)
        return NULL;
-      calling_pc = frame_address_in_block (frame);
+      calling_pc = get_frame_address_in_block (frame);
       if (calling_pc >= start && calling_pc < end)
        return frame;
     }
index 79f0071700a18629e7f714896d16ba435baa4411..c75da6cbf6622b467083ef7876f21f6bd9368cb0 100644 (file)
@@ -47,7 +47,6 @@
 #include "gdb.h"
 #include "ui-out.h"
 #include "cli/cli-script.h"
-#include "dictionary.h"
 #include "gdb_assert.h"
 #include "block.h"
 
@@ -705,7 +704,7 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
 \f
 
 /* A wrapper function for inserting catchpoints.  */
-int
+static int
 insert_catchpoint (struct ui_out *uo, void *args)
 {
   struct breakpoint *b = (struct breakpoint *) args;
diff --git a/gdb/builtin-regs.c b/gdb/builtin-regs.c
deleted file mode 100644 (file)
index 07e5fcc..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Builtin registers, for GDB, the GNU debugger.
-
-   Copyright 2002 Free Software Foundation, Inc.
-
-   Contributed by Red Hat.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#include "defs.h"
-#include "builtin-regs.h"
-#include "gdbtypes.h"
-#include "gdb_string.h"
-#include "gdb_assert.h"
-
-/* Implement builtin register types.  Builtin registers have regnum's
-   that live above of the range [0 .. NUM_REGS + NUM_PSEUDO_REGS)
-   (which is controlled by the target).  The target should never see a
-   builtin register's regnum value.  */
-
-/* An array of builtin registers.  Always append, never delete.  By
-   doing this, the relative regnum (offset from NUM_REGS +
-   NUM_PSEUDO_REGS) assigned to each builtin register never changes.  */
-
-struct builtin_reg
-{
-  const char *name;
-  struct value *(*value) (struct frame_info * frame);
-};
-
-static struct builtin_reg *builtin_regs;
-int nr_builtin_regs;
-
-void
-add_builtin_reg (const char *name, struct value *(*value) (struct frame_info * frame))
-{
-  nr_builtin_regs++;
-  builtin_regs = xrealloc (builtin_regs,
-                          nr_builtin_regs * sizeof (builtin_regs[0]));
-  builtin_regs[nr_builtin_regs - 1].name = name;
-  builtin_regs[nr_builtin_regs - 1].value = value;
-}
-
-int
-builtin_reg_map_name_to_regnum (const char *name, int len)
-{
-  int reg;
-  for (reg = 0; reg < nr_builtin_regs; reg++)
-    {
-      if (len == strlen (builtin_regs[reg].name)
-         && strncmp (builtin_regs[reg].name, name, len) == 0)
-       return NUM_REGS + NUM_PSEUDO_REGS + reg;
-    }
-  return -1;
-}
-
-const char *
-builtin_reg_map_regnum_to_name (int regnum)
-{
-  int reg = regnum - (NUM_REGS + NUM_PSEUDO_REGS);
-  if (reg < 0 || reg >= nr_builtin_regs)
-    return NULL;
-  return builtin_regs[reg].name;
-}
-
-struct value *
-value_of_builtin_reg (int regnum, struct frame_info *frame)
-{
-  int reg = regnum - (NUM_REGS + NUM_PSEUDO_REGS);
-  gdb_assert (reg >= 0 && reg < nr_builtin_regs);
-  return builtin_regs[reg].value (frame);
-}
diff --git a/gdb/builtin-regs.h b/gdb/builtin-regs.h
deleted file mode 100644 (file)
index 631903a..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Builtin registers, for GDB, the GNU debugger.
-
-   Copyright 2002 Free Software Foundation, Inc.
-
-   Contributed by Red Hat.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#ifndef BUILTIN_REGS_H
-#define BUILTIN_REGS_H
-
-struct frame_info;
-
-extern int builtin_reg_map_name_to_regnum (const char *str, int len);
-
-extern const char *builtin_reg_map_regnum_to_name (int regnum);
-
-extern struct value *value_of_builtin_reg (int regnum,
-                                          struct frame_info *frame);
-
-extern void add_builtin_reg (const char *name,
-                            struct value *(value) (struct frame_info * frame));
-
-#endif
index c311447ea4415bd85581a17da306df5fa3a0010e..fa683743cb7becdc63c477edac8c15c536b457d1 100644 (file)
@@ -443,7 +443,8 @@ cached_iconv_convert (struct cached_iconv *ci, int from_char, int *to_char)
         return 0;
 
       /* Anything else is mysterious.  */
-      internal_error ("Error converting character `%d' from `%s' to `%s' "
+      internal_error (__FILE__, __LINE__,
+                     "Error converting character `%d' from `%s' to `%s' "
                       "character set: %s",
                       from_char, ci->from->name, ci->to->name,
                       safe_strerror (errno));
index 38bf36ffaf21858662899051e8e5ed5746d349af..2e5a3c16b1668d1590946fa8c5b87bf0f62849f0 100644 (file)
@@ -31,6 +31,7 @@
 struct ui_out_data
   {
     struct ui_file *stream;
+    struct ui_file *original_stream;
     int suppress_output;
   };
 typedef struct ui_out_data cli_out_data;
@@ -64,6 +65,7 @@ static void cli_message (struct ui_out *uiout, int verbosity,
                         const char *format, va_list args);
 static void cli_wrap_hint (struct ui_out *uiout, char *identstring);
 static void cli_flush (struct ui_out *uiout);
+static int cli_redirect (struct ui_out *uiout, struct ui_file *outstream);
 
 /* This is the CLI ui-out implementation functions vector */
 
@@ -87,6 +89,7 @@ static struct ui_out_impl cli_ui_out_impl =
   cli_message,
   cli_wrap_hint,
   cli_flush,
+  cli_redirect,
   0, /* Does not need MI hacks (i.e. needs CLI hacks).  */
 };
 
@@ -324,6 +327,24 @@ cli_flush (struct ui_out *uiout)
   gdb_flush (data->stream);
 }
 
+int
+cli_redirect (struct ui_out *uiout, struct ui_file *outstream)
+{
+  struct ui_out_data *data = ui_out_data (uiout);
+  if (outstream != NULL)
+    {
+      data->original_stream = data->stream;
+      data->stream = outstream;
+    }
+  else if (data->original_stream != NULL)
+    {
+      data->stream = data->original_stream;
+      data->original_stream = NULL;
+    }
+
+  return 0;
+}
+
 /* local functions */
 
 /* Like cli_field_fmt, but takes a variable number of args
@@ -362,6 +383,7 @@ cli_out_new (struct ui_file *stream)
 
   cli_out_data *data = XMALLOC (cli_out_data);
   data->stream = stream;
+  data->original_stream = NULL;
   data->suppress_output = 0;
   return ui_out_new (&cli_ui_out_impl, data, flags);
 }
index 45679f07b980090ac1994a1f04d5337fbd9fbaa3..6abb24ddffe100c7147a4d7fd7065829c111eaf2 100644 (file)
@@ -53,8 +53,25 @@ cli_interpreter_init (void)
 static int
 cli_interpreter_resume (void *data)
 {
+  struct ui_file *stream;
+
   /*sync_execution = 1; */
+
+  /* gdb_setup_readline will change gdb_stdout.  If the CLI was previously
+     writing to gdb_stdout, then set it to the new gdb_stdout afterwards.  */
+
+  stream = cli_out_set_stream (cli_uiout, gdb_stdout);
+  if (stream != gdb_stdout)
+    {
+      cli_out_set_stream (cli_uiout, stream);
+      stream = NULL;
+    }
+
   gdb_setup_readline ();
+
+  if (stream != NULL)
+    cli_out_set_stream (cli_uiout, gdb_stdout);
+
   return 1;
 }
 
index 0f789bb1627d17582a0873abab738dafcca3293f..ab69ca4998045547fae9c16b4bc0069eb54dc28f 100644 (file)
@@ -1092,11 +1092,12 @@ define_command (char *comname, int from_tty)
 
   if (c)
     {
+      int q;
       if (c->class == class_user || c->class == class_alias)
-       tem = "Redefine command \"%s\"? ";
+       q = query ("Redefine command \"%s\"? ", c->name);
       else
-       tem = "Really redefine built-in command \"%s\"? ";
-      if (!query (tem, c->name))
+       q = query ("Really redefine built-in command \"%s\"? ", c->name);
+      if (!q)
        error ("Command \"%s\" not redefined.", c->name);
     }
 
index 1d68ae4aa1a69e2266838f118f5f1db15a279ed0..64a0d7353a2c9d7e7b904c1f84f75e0efe529cf8 100644 (file)
@@ -213,7 +213,7 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
                    strcat (msg, c->enums[i]);
                  }
                strcat (msg, ".");
-               error (msg);
+               error ("%s", msg);
              }
 
            p = strchr (arg, ' ');
index 144f36df70009686e5f6c15844ad0560997f5d2a..d29f96a0981e2df8e19564101cde7ce55a08453d 100644 (file)
@@ -1,5 +1,5 @@
 /* COFF (SVR3) Shared library declarations for GDB, the GNU Debugger.
-   Copyright 1992, 1993, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright 1992, 1993, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -109,7 +109,7 @@ extern void coff_solib_create_inferior_hook (void); /* solib.c */
  */
 
 #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
-(0)
+""
 
 /* This function returns TRUE if the dynamic linker has just reported
    an unload of a library.
index 47580086dd21dbf011a603692a8a8030bc3cd2b8..252e654a9930f956f34c947ead395134594d1ab1 100644 (file)
@@ -60,6 +60,15 @@ struct complain
   struct complain *next;
 };
 
+/* The explanatory message that should accompany the complaint.  The
+   message is in two parts - pre and post - that are printed around
+   the complaint text.  */
+struct explanation
+{
+  const char *prefix;
+  const char *postfix;
+};
+
 struct complaints
 {
   struct complain *root;
@@ -75,20 +84,21 @@ struct complaints
   /* The explanatory messages that should accompany the complaint.
      NOTE: cagney/2002-08-14: In a desperate attempt at being vaguely
      i18n friendly, this is an array of two messages.  When present,
-     EXPLANATION[SERIES] is used to wrap the message.  */
-  const char **explanation;
+     the PRE and POST EXPLANATION[SERIES] are used to wrap the
+     message.  */
+  const struct explanation *explanation;
 };
 
 static struct complain complaint_sentinel;
 
 /* The symbol table complaint table.  */
 
-static const char *symfile_explanations[] = {
-  "During symbol reading, %s.",
-  "During symbol reading...%s...",
-  "%s...",
-  "%s...",
-  NULL
+static struct explanation symfile_explanations[] = {
+  { "During symbol reading, ", "." },
+  { "During symbol reading...", "..."},
+  { "", "..."},
+  { "", "..."},
+  { NULL, NULL }
 };
 
 static struct complaints symfile_complaint_book = {
@@ -192,9 +202,9 @@ vcomplaint (struct complaints **c, const char *file, int line, const char *fmt,
          wrap_here ("");
          if (series != SUBSEQUENT_MESSAGE)
            begin_line ();
-         fprintf_filtered (gdb_stderr,
-                           complaints->explanation[series],
-                           msg);
+         fprintf_filtered (gdb_stderr, "%s%s%s",
+                           complaints->explanation[series].prefix, msg,
+                           complaints->explanation[series].postfix);
          /* Force a line-break after any isolated message.  For the
              other cases, clear_complaints() takes care of any missing
              trailing newline, the wrap_here() is just a hint.  */
index 96b0c431e45d5ddae67c249fd7e80a2855535a6d..39aeaacafef180ab9ec7f270a3a4786357699e7a 100644 (file)
@@ -70,6 +70,8 @@
 @V@/gdb/ChangeLog-2002 @V@/gdb/ChangeLog.002
 @V@/gdb/ChangeLog-3.x @V@/gdb/ChangeLog.3-x
 @V@/gdb/ada-exp.tab.c @V@/gdb/ada-exp_tab.c
+@V@/gdb/amd64fbsd-tdep.c @V@/gdb/x86fb-tdep.c
+@V@/gdb/amd64fbsd-nat.c @V@/gdb/x86fb-nat.c
 @V@/gdb/alphabsd-nat.c @V@/gdb/alphb-nat.c
 @V@/gdb/alphabsd-tdep.c @V@/gdb/alphb-tdep.c
 @V@/gdb/alphanbsd-nat.c @V@/gdb/alphnb-nat.c
 @V@/gdb/testsuite/gdb.c++/ambiguous.exp @V@/gdb/testsuite/gdb.cxx/ambiguous.exp
 @V@/gdb/testsuite/gdb.c++/annota2.cc @V@/gdb/testsuite/gdb.cxx/annota2.cc
 @V@/gdb/testsuite/gdb.c++/annota2.exp @V@/gdb/testsuite/gdb.cxx/annota2.exp
+@V@/gdb/testsuite/gdb.c++/annota3.cc @V@/gdb/testsuite/gdb.cxx/annota3.cc
+@V@/gdb/testsuite/gdb.c++/annota3.exp @V@/gdb/testsuite/gdb.cxx/annota3.exp
 @V@/gdb/testsuite/gdb.c++/anon-union.cc @V@/gdb/testsuite/gdb.cxx/anon-union.cc
 @V@/gdb/testsuite/gdb.c++/anon-union.exp @V@/gdb/testsuite/gdb.cxx/anon-union.exp
 @V@/gdb/testsuite/gdb.c++/casts.cc @V@/gdb/testsuite/gdb.cxx/casts.cc
index 0c3c855e0183ed0a6a4cae55a6961a469c3b1d90..32e7a8e0a856f5893903b452a6bd4326f6f1388e 100644 (file)
@@ -3,8 +3,8 @@
 XM_FILE= xm-i386.h
 
 NAT_FILE= nm-x86-64linux.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \
-       core-regset.o i386-nat.o x86-64-linux-nat.o \
+NATDEPFILES= infptrace.o inftarg.o fork-child.o \
+       i386-nat.o x86-64-linux-nat.o \
        linux-nat.o \
        proc-service.o thread-db.o lin-lwp.o linux-proc.o gcore.o 
 
index d448452322766d5fc313ef67e279cc565eba596f..bb33978de3f5a27667f3dac8eadfe4cd21deef3a 100644 (file)
@@ -1,7 +1,7 @@
 # Target: AMD x86-64 running GNU/Linux
 TDEPFILES= x86-64-tdep.o x86-64-linux-tdep.o \
        i386-tdep.o i387-tdep.o i386-linux-tdep.o \
-       solib.o solib-svr4.o solib-legacy.o
+       solib.o solib-svr4.o solib-legacy.o corelow.o
 
 GDB_MULTI_ARCH=GDB_MULTI_ARCH_TM
 
index a2816084290a896535efa26941a3f72700389211..6d578c880facd5605898b6f5c68bb72b58302aff 100644 (file)
@@ -1,5 +1,4 @@
-# OBSOLETE # Target: Mitsubishi m32r processor
-# OBSOLETE TDEPFILES= m32r-tdep.o monitor.o m32r-rom.o dsrec.o
-# OBSOLETE TM_FILE= tm-m32r.h
-# OBSOLETE SIM_OBS = remote-sim.o
-# OBSOLETE SIM = ../sim/m32r/libsim.a
+# Target: Renesas m32r processor
+TDEPFILES= m32r-tdep.o monitor.o m32r-rom.o dsrec.o
+SIM_OBS = remote-sim.o
+SIM = ../sim/m32r/libsim.a
diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h
deleted file mode 100644 (file)
index 89af4e3..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-// OBSOLETE /* Parameters for execution on a Mitsubishi m32r processor.
-// OBSOLETE    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-// OBSOLETE    Free Software Foundation, Inc. 
-// OBSOLETE 
-// OBSOLETE    This file is part of GDB.
-// OBSOLETE 
-// OBSOLETE    This program is free software; you can redistribute it and/or modify
-// OBSOLETE    it under the terms of the GNU General Public License as published by
-// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE    (at your option) any later version.
-// OBSOLETE 
-// OBSOLETE    This program is distributed in the hope that it will be useful,
-// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// OBSOLETE    GNU General Public License for more details.
-// OBSOLETE 
-// OBSOLETE    You should have received a copy of the GNU General Public License
-// OBSOLETE    along with this program; if not, write to the Free Software
-// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE    Boston, MA 02111-1307, USA.  */
-// OBSOLETE 
-// OBSOLETE #include "regcache.h"
-// OBSOLETE 
-// OBSOLETE /* Used by mswin.  */
-// OBSOLETE #define TARGET_M32R 1
-// OBSOLETE 
-// OBSOLETE /* mvs_check REGISTER_NAMES */
-// OBSOLETE #define REGISTER_NAMES \
-// OBSOLETE { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
-// OBSOLETE   "r8", "r9", "r10", "r11", "r12", "fp", "lr", "sp", \
-// OBSOLETE   "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch", \
-// OBSOLETE     /*  "cond", "sm", "bsm", "ie", "bie", "bcarry",  */ \
-// OBSOLETE }
-// OBSOLETE /* mvs_check  NUM_REGS */
-// OBSOLETE #define NUM_REGS                   24
-// OBSOLETE 
-// OBSOLETE /* mvs_check  REGISTER_SIZE */
-// OBSOLETE #define REGISTER_SIZE                      4
-// OBSOLETE /* mvs_check  MAX_REGISTER_RAW_SIZE */
-// OBSOLETE #define MAX_REGISTER_RAW_SIZE              4
-// OBSOLETE 
-// OBSOLETE /* mvs_check  *_REGNUM */
-// OBSOLETE #define R0_REGNUM  0
-// OBSOLETE #define STRUCT_RETURN_REGNUM 0
-// OBSOLETE #define ARG0_REGNUM        0
-// OBSOLETE #define ARGLAST_REGNUM     3
-// OBSOLETE #define V0_REGNUM  0
-// OBSOLETE #define V1_REGNUM  1
-// OBSOLETE #define FP_REGNUM  13
-// OBSOLETE #define RP_REGNUM  14
-// OBSOLETE #define SP_REGNUM  15
-// OBSOLETE #define PSW_REGNUM 16
-// OBSOLETE #define CBR_REGNUM 17
-// OBSOLETE #define SPI_REGNUM 18
-// OBSOLETE #define SPU_REGNUM 19
-// OBSOLETE #define BPC_REGNUM 20
-// OBSOLETE #define PC_REGNUM  21
-// OBSOLETE #define ACCL_REGNUM        22
-// OBSOLETE #define ACCH_REGNUM        23
-// OBSOLETE 
-// OBSOLETE /* mvs_check  REGISTER_BYTES */
-// OBSOLETE #define REGISTER_BYTES                     (NUM_REGS * 4)
-// OBSOLETE 
-// OBSOLETE /* mvs_check  REGISTER_VIRTUAL_TYPE */
-// OBSOLETE #define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
-// OBSOLETE 
-// OBSOLETE /* mvs_check  REGISTER_BYTE */
-// OBSOLETE #define REGISTER_BYTE(REG)                 ((REG) * 4)
-// OBSOLETE /* mvs_check  REGISTER_VIRTUAL_SIZE */
-// OBSOLETE #define REGISTER_VIRTUAL_SIZE(REG)         4
-// OBSOLETE /* mvs_check  REGISTER_RAW_SIZE */
-// OBSOLETE #define REGISTER_RAW_SIZE(REG)             4
-// OBSOLETE 
-// OBSOLETE /* mvs_check  MAX_REGISTER_VIRTUAL_SIZE */
-// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE  4
-// OBSOLETE 
-// OBSOLETE /* mvs_check  BREAKPOINT */
-// OBSOLETE #define BREAKPOINT {0x10, 0xf1}
-// OBSOLETE 
-// OBSOLETE /* mvs_no_check  FUNCTION_START_OFFSET */
-// OBSOLETE #define FUNCTION_START_OFFSET 0
-// OBSOLETE 
-// OBSOLETE /* mvs_check  DECR_PC_AFTER_BREAK */
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE 
-// OBSOLETE /* mvs_check  INNER_THAN */
-// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-// OBSOLETE 
-// OBSOLETE /* mvs_check  SAVED_PC_AFTER_CALL */
-// OBSOLETE #define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
-// OBSOLETE 
-// OBSOLETE struct frame_info;
-// OBSOLETE struct frame_saved_regs;
-// OBSOLETE struct type;
-// OBSOLETE struct value;
-// OBSOLETE 
-// OBSOLETE /* Define other aspects of the stack frame. 
-// OBSOLETE    We keep the offsets of all saved registers, 'cause we need 'em a lot!
-// OBSOLETE    We also keep the current size of the stack frame, and whether 
-// OBSOLETE    the frame pointer is valid (for frameless functions, and when we're
-// OBSOLETE    still in the prologue of a function with a frame) */
-// OBSOLETE 
-// OBSOLETE /* mvs_check  EXTRA_FRAME_INFO */
-// OBSOLETE #define EXTRA_FRAME_INFO   \
-// OBSOLETE   struct frame_saved_regs fsr;     \
-// OBSOLETE   int framesize;           \
-// OBSOLETE   int using_frame_pointer;
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE extern void m32r_init_extra_frame_info (struct frame_info *fi);
-// OBSOLETE /* mvs_check  INIT_EXTRA_FRAME_INFO */
-// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) m32r_init_extra_frame_info (fi)
-// OBSOLETE /* mvs_no_check  DEPRECATED_INIT_FRAME_PC */
-// OBSOLETE #define DEPRECATED_INIT_FRAME_PC           init_frame_pc_noop
-// OBSOLETE 
-// OBSOLETE extern void
-// OBSOLETE m32r_frame_find_saved_regs (struct frame_info *fi,
-// OBSOLETE                        struct frame_saved_regs *regaddr);
-// OBSOLETE 
-// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
-// OBSOLETE    the addresses of the saved registers of frame described by FRAME_INFO.
-// OBSOLETE    This includes special registers such as pc and fp saved in special
-// OBSOLETE    ways in the stack frame.  sp is even more special:
-// OBSOLETE    the address we return for it IS the sp for the next frame.  */
-// OBSOLETE 
-// OBSOLETE /* mvs_check  FRAME_FIND_SAVED_REGS */
-// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs)            \
-// OBSOLETE    m32r_frame_find_saved_regs(frame_info, &(frame_saved_regs))
-// OBSOLETE 
-// OBSOLETE extern CORE_ADDR m32r_frame_chain (struct frame_info *fi);
-// OBSOLETE /* mvs_check  FRAME_CHAIN */
-// OBSOLETE #define FRAME_CHAIN(fi)            m32r_frame_chain (fi)
-// OBSOLETE 
-// OBSOLETE extern CORE_ADDR m32r_find_callers_reg (struct frame_info *fi, int regnum);
-// OBSOLETE extern CORE_ADDR m32r_frame_saved_pc (struct frame_info *);
-// OBSOLETE /* mvs_check  FRAME_SAVED_PC */
-// OBSOLETE #define FRAME_SAVED_PC(fi)         m32r_frame_saved_pc (fi)
-// OBSOLETE 
-// OBSOLETE /* mvs_check  DEPRECATED_EXTRACT_RETURN_VALUE */
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
-// OBSOLETE   memcpy ((VALBUF), \
-// OBSOLETE      (char *)(REGBUF) + REGISTER_BYTE (V0_REGNUM) + \
-// OBSOLETE      ((TYPE_LENGTH (TYPE) > 4 ? 8 : 4) - TYPE_LENGTH (TYPE)), \
-// OBSOLETE      TYPE_LENGTH (TYPE))
-// OBSOLETE 
-// OBSOLETE /* mvs_check  DEPRECATED_STORE_RETURN_VALUE */
-// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
-// OBSOLETE   deprecated_write_register_bytes(REGISTER_BYTE (V0_REGNUM) + \
-// OBSOLETE                   ((TYPE_LENGTH (TYPE) > 4 ? 8:4) - TYPE_LENGTH (TYPE)),\
-// OBSOLETE                   (VALBUF), TYPE_LENGTH (TYPE));
-// OBSOLETE 
-// OBSOLETE extern CORE_ADDR m32r_skip_prologue (CORE_ADDR pc);
-// OBSOLETE /* mvs_check  SKIP_PROLOGUE */
-// OBSOLETE #define SKIP_PROLOGUE(pc) (m32r_skip_prologue (pc))
-// OBSOLETE 
-// OBSOLETE /* mvs_no_check  FRAME_ARGS_SKIP */
-// OBSOLETE #define FRAME_ARGS_SKIP 0
-// OBSOLETE 
-// OBSOLETE /* mvs_no_check  FRAME_ARGS_ADDRESS */
-// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-// OBSOLETE /* mvs_no_check  FRAME_LOCALS_ADDRESS */
-// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-// OBSOLETE /* mvs_no_check  FRAME_NUM_ARGS */
-// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
-// OBSOLETE 
-// OBSOLETE extern void m32r_write_sp (CORE_ADDR val);
-// OBSOLETE #define TARGET_WRITE_SP m32r_write_sp
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE /* struct passing and returning stuff */
-// OBSOLETE #define STORE_STRUCT_RETURN(STRUCT_ADDR, SP)       \
-// OBSOLETE    write_register (0, STRUCT_ADDR)
-// OBSOLETE 
-// OBSOLETE extern use_struct_convention_fn m32r_use_struct_convention;
-// OBSOLETE #define USE_STRUCT_CONVENTION(GCC_P, TYPE) m32r_use_struct_convention (GCC_P, TYPE)
-// OBSOLETE 
-// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
-// OBSOLETE   extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \
-// OBSOLETE               REGISTER_RAW_SIZE (V0_REGNUM))
-// OBSOLETE 
-// OBSOLETE #define REG_STRUCT_HAS_ADDR(gcc_p,type)     (TYPE_LENGTH (type) > 8)
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE /* generic dummy frame stuff */
-// OBSOLETE 
-// OBSOLETE #define PUSH_DUMMY_FRAME             generic_push_dummy_frame ()
-// OBSOLETE #define DEPRECATED_PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE /* target-specific dummy_frame stuff */
-// OBSOLETE 
-// OBSOLETE extern struct frame_info *m32r_pop_frame (struct frame_info *frame);
-// OBSOLETE /* mvs_check  POP_FRAME */
-// OBSOLETE #define POP_FRAME m32r_pop_frame (get_current_frame ())
-// OBSOLETE 
-// OBSOLETE /* mvs_no_check  STACK_ALIGN */
-// OBSOLETE /* #define STACK_ALIGN(x) ((x + 3) & ~3) */
-// OBSOLETE 
-// OBSOLETE extern CORE_ADDR m32r_push_return_address (CORE_ADDR, CORE_ADDR);
-// OBSOLETE extern CORE_ADDR m32r_push_arguments (int nargs,
-// OBSOLETE                                  struct value **args,
-// OBSOLETE                                  CORE_ADDR sp,
-// OBSOLETE                                  unsigned char struct_return,
-// OBSOLETE                                  CORE_ADDR struct_addr);
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE /* mvs_no_check  PUSH_ARGUMENTS */
-// OBSOLETE #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-// OBSOLETE   (m32r_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
-// OBSOLETE 
-// OBSOLETE #define PUSH_RETURN_ADDRESS(PC, SP)      m32r_push_return_address (PC, SP)
-// OBSOLETE 
-// OBSOLETE /* override the standard get_saved_register function with 
-// OBSOLETE    one that takes account of generic CALL_DUMMY frames */
-// OBSOLETE #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
-// OBSOLETE      deprecated_generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 1
-// OBSOLETE #define CALL_DUMMY                   {0}
-// OBSOLETE #define CALL_DUMMY_LENGTH            (0)
-// OBSOLETE #define CALL_DUMMY_START_OFFSET      (0)
-// OBSOLETE #define CALL_DUMMY_BREAKPOINT_OFFSET (0)
-// OBSOLETE #define FIX_CALL_DUMMY(DUMMY1, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP)
-// OBSOLETE #define CALL_DUMMY_LOCATION          AT_ENTRY_POINT
-// OBSOLETE #define CALL_DUMMY_ADDRESS()         entry_point_address ()
index e6395ae6ef942bf9da18749eb80c2ee56042052c..0d4fc0c2a35c2009b08dfecf66a92b6dde9a2012 100644 (file)
@@ -94,4 +94,8 @@
 #define SIGFRAME_REG_SIZE      8
 
 /* Undefine those methods which have been multiarched.  */
+
+/* Undefine MIPS_REGISTER_TYPE, so that GDB uses real C code in
+   mips_register_type() to return the register type, instead of
+   relying on this macro.  */
 #undef MIPS_REGISTER_TYPE
index 1ec91d453f6e8c083384d5ed532340380289fa67..7729518cc6e23e8f5852f96c7f4f4f16877f70cc 100644 (file)
@@ -35,6 +35,9 @@
 #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 0
 #define CALL_DUMMY_LOCATION ON_STACK
 #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
+/* Hack, get around problem with including "arch-utils.h".  */
+struct frame_info;
+extern CORE_ADDR init_frame_pc_default (int fromleaf, struct frame_info *prev);
 #define DEPRECATED_INIT_FRAME_PC(l,f) (init_frame_pc_default (l, f))
 
 /* Forward declarations of some types we use in prototypes */
@@ -54,28 +57,6 @@ const unsigned char *hppa_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr);
 extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
 #define PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (pc)
 
-/* Initializer for an array of names of registers.
-   There should be NUM_REGS strings in this initializer.
-   They are in rows of eight entries  */
-
-#define REGISTER_NAMES \
- {"flags",  "r1",      "rp",      "r3",    "r4",     "r5",      "r6",     "r7",    \
-  "r8",     "r9",      "r10",     "r11",   "r12",    "r13",     "r14",    "r15",   \
-  "r16",    "r17",     "r18",     "r19",   "r20",    "r21",     "r22",    "r23",   \
-  "r24",    "r25",     "r26",     "dp",    "ret0",   "ret1",    "sp",     "r31",   \
-  "sar",    "pcoqh",   "pcsqh",   "pcoqt", "pcsqt",  "eiem",    "iir",    "isr",   \
-  "ior",    "ipsw",    "goto",    "sr4",   "sr0",    "sr1",     "sr2",    "sr3",   \
-  "sr5",    "sr6",     "sr7",     "cr0",   "cr8",    "cr9",     "ccr",    "cr12",  \
-  "cr13",   "cr24",    "cr25",    "cr26",  "mpsfu_high","mpsfu_low","mpsfu_ovflo","pad",\
-  "fpsr",    "fpe1",   "fpe2",    "fpe3",  "fpe4",   "fpe5",    "fpe6",   "fpe7",  \
-  "fr4",     "fr4R",   "fr5",     "fr5R",  "fr6",    "fr6R",    "fr7",    "fr7R",  \
-  "fr8",     "fr8R",   "fr9",     "fr9R",  "fr10",   "fr10R",   "fr11",   "fr11R", \
-  "fr12",    "fr12R",  "fr13",    "fr13R", "fr14",   "fr14R",   "fr15",   "fr15R", \
-  "fr16",    "fr16R",  "fr17",    "fr17R", "fr18",   "fr18R",   "fr19",   "fr19R", \
-  "fr20",    "fr20R",  "fr21",    "fr21R", "fr22",   "fr22R",   "fr23",   "fr23R", \
-  "fr24",    "fr24R",  "fr25",    "fr25R", "fr26",   "fr26R",   "fr27",   "fr27R", \
-  "fr28",    "fr28R",  "fr29",    "fr29R", "fr30",   "fr30R",   "fr31",   "fr31R"}
-
 /* Register numbers of various important registers.
    Note that some of these values are "real" register numbers,
    and correspond to the general registers of the machine,
index 2e5e039d7f35969cdd54f51c8824b1509a7b35c1..8d19a45cb6f00d74b14c042f53c4876ba8701968 100644 (file)
@@ -22,6 +22,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 struct type;
+struct value;
 struct frame_info;
 
 /* PA 64-bit specific definitions.  Override those which are in
@@ -31,9 +32,14 @@ struct frame_info;
    gotten working yet.  */
 #define GDB_TARGET_IS_HPPA_20W
 
-/* FIXME: brobecker 2003-04-21: Although 32bit hppa is partially multiarched,
-   the conversion for hppa64 hasn't been completed yet.  */
-#define GDB_MULTI_ARCH 0
+/* NOTE: cagney/2003-07-27: Using CC='cc +DA2.0W -Ae' configure
+   hppa64-hp-hpux11.00; GDB managed to build / start / break main /
+   run with multi-arch enabled.  Not sure about much else as there
+   appears to be an unrelated problem in the SOM symbol table reader
+   causing GDB to loose line number information.  Since prior to this
+   switch and a other recent tweaks, 64 bit PA hadn't been building
+   for some months, this is probably the lesser of several evils.  */
+#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
 
 /* FIXME: brobecker 2003-05-22: All the definition from this point until
    the include of pa/tm-hppah.h are extracted from tm-hppa.h and tm-hppah.h.
@@ -281,11 +287,6 @@ extern CORE_ADDR hppa_frame_saved_pc (struct frame_info *frame);
 #define DEPRECATED_FRAME_SAVED_PC(FRAME) hppa_frame_saved_pc (FRAME)
 #endif
 
-#if !GDB_MULTI_ARCH
-extern CORE_ADDR hppa_frame_args_address (struct frame_info *fi);
-#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) hppa_frame_args_address (fi)
-#endif
-
 #if !GDB_MULTI_ARCH
 extern CORE_ADDR hppa_frame_locals_address (struct frame_info *fi);
 #define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) hppa_frame_locals_address (fi)
@@ -398,20 +399,8 @@ extern CORE_ADDR hppa_target_read_fp (void);
 /* Initializer for an array of names of registers.
    There should be NUM_REGS strings in this initializer.
    They are in rows of eight entries  */
-#undef REGISTER_NAMES
-#define REGISTER_NAMES \
- {"flags",  "r1",      "rp",      "r3",    "r4",     "r5",      "r6",     "r7",    \
-  "r8",     "r9",      "r10",     "r11",   "r12",    "r13",     "r14",    "r15",   \
-  "r16",    "r17",     "r18",     "r19",   "r20",    "r21",     "r22",    "r23",   \
-  "r24",    "r25",     "r26",     "dp",    "ret0",   "ret1",    "sp",     "r31",   \
-  "sar",    "pcoqh",   "pcsqh",   "pcoqt", "pcsqt",  "eiem",    "iir",    "isr",   \
-  "ior",    "ipsw",    "goto",    "sr4",   "sr0",    "sr1",     "sr2",    "sr3",   \
-  "sr5",    "sr6",     "sr7",     "cr0",   "cr8",    "cr9",     "ccr",    "cr12",  \
-  "cr13",   "cr24",    "cr25",    "cr26",  "mpsfu_high","mpsfu_low","mpsfu_ovflo","pad",\
-  "fpsr",    "fpe1",   "fpe2",    "fpe3",  "fr4",    "fr5",     "fr6",    "fr7", \
-  "fr8",     "fr9",    "fr10",    "fr11",  "fr12",   "fr13",    "fr14",   "fr15", \
-  "fr16",    "fr17",   "fr18",    "fr19",  "fr20",   "fr21",    "fr22",   "fr23", \
-  "fr24",    "fr25",   "fr26",    "fr27",   "fr28",  "fr29",    "fr30",   "fr31"}
+extern const char *hppa64_register_name (int i);
+#define REGISTER_NAME hppa64_register_name
 
 #undef FP0_REGNUM
 #undef FP4_REGNUM
@@ -446,7 +435,7 @@ extern CORE_ADDR hppa_target_read_fp (void);
    alloca; for those, we may need to consult unwind tables.
    jimb: FIXME.  */
 #undef DEPRECATED_FRAME_LOCALS_ADDRESS
-#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
 
 /* For a number of horrible reasons we may have to adjust the location
    of variables on the stack.  Ugh.  jimb: why? */
@@ -613,13 +602,13 @@ call_dummy
 #undef FRAME_SAVED_PC_IN_SIGTRAMP
 #define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
 { \
-  *(TMP) = read_memory_integer ((FRAME)->frame + (24 * 4) + 640 + (33 * 8), 8); \
+  *(TMP) = read_memory_integer (get_frame_base (FRAME) + (24 * 4) + 640 + (33 * 8), 8); \
 }
 
 #undef FRAME_BASE_BEFORE_SIGTRAMP
 #define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
 { \
-  *(TMP) = read_memory_integer ((FRAME)->frame + (24 * 4) + 640 + (30 * 8), 8); \
+  *(TMP) = read_memory_integer (get_frame_base (FRAME) + (24 * 4) + 640 + (30 * 8), 8); \
 }
 
 #undef FRAME_FIND_SAVED_REGS_IN_SIGTRAMP
@@ -627,8 +616,8 @@ call_dummy
 { \
   int i; \
   CORE_ADDR TMP1, TMP2; \
-  TMP1 = (FRAME)->frame + (24 * 4) + 640; \
-  TMP2 = (FRAME)->frame + (24 * 4) + 256; \
+  TMP1 = get_frame_base (FRAME) + (24 * 4) + 640; \
+  TMP2 = get_frame_base (FRAME) + (24 * 4) + 256; \
   for (i = 0; i < NUM_REGS; i++) \
     { \
       if (i == SP_REGNUM) \
index c7a69ea073cc0ba1e1775988e5b2e78a37d3d556..dd815863f64fefbc2348147b5368fb13cdad723d 100644 (file)
@@ -6,7 +6,7 @@ XM_CLIBS=
 NAT_FILE= nm-ppc64-linux.h
 NATDEPFILES= infptrace.o inftarg.o fork-child.o linux-proc.o \
        ppc-linux-nat.o proc-service.o thread-db.o lin-lwp.o \
-       gcore.o
+       gcore.o linux-nat.o
 
 # The PowerPC has severe limitations on TOC size, and uses them even
 # for non-PIC code.  GDB overflows those tables when compiling with
index 8baa66a2193a40989bbcedcbea06f1a5605c3597..f2507d2bf7568681af3a64255df47aa3549215b2 100644 (file)
@@ -260,6 +260,8 @@ CORE_ADDR sparc64_push_arguments (int,
   /* These are here at the end to simplify removing them if we have to.  */ \
   "icc", "xcc", "fcc0", "fcc1", "fcc2", "fcc3"                 \
 }
+extern const char *legacy_register_name (int i);
+#define REGISTER_NAME legacy_register_name
 
 #undef REG_STRUCT_HAS_ADDR
 #define REG_STRUCT_HAS_ADDR(gcc_p,type) (TYPE_LENGTH (type) > 32)
index 64ce5c72cbdf8fd7886ae7be65bbdbbaa3edae9b..29267ed665e834759314214beb340a7f840711c9 100644 (file)
@@ -22,6 +22,8 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
+
 #include "regcache.h"
 
 struct type;
@@ -158,6 +160,8 @@ extern int sparc_intreg_size (void);
                                                                 \
   "y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr"        \
 }
+extern const char *legacy_register_name (int i);
+#define REGISTER_NAME legacy_register_name
 
 /* Offset from address of function to start of its code.
    Zero on most machines.  */
@@ -314,8 +318,6 @@ extern int sparc_prologue_frameless_p (CORE_ADDR);
 
 /* Multi-arch the nPC and Y registers.  */
 #define Y_REGNUM              (sparc_y_regnum ())
-extern int sparc_npc_regnum (void);
-extern int sparc_y_regnum (void);
 
 #endif /* GDB_MULTI_ARCH */
 
index 0c88533f785fc382c4f395f84d7d983b7a2c1cb4..b801589a7da376915fff3598814b328db42d54d8 100644 (file)
@@ -63,6 +63,7 @@ i[34567]86-*-msdosdjgpp*) gdb_host=go32 ;;
 i[34567]86-*-linux*)   gdb_host=linux ;;
 i[34567]86-*-lynxos*)  gdb_host=i386lynx ;;
 i[34567]86-*-gnu*)     gdb_host=i386gnu ;;
+i[3456]86-*-nto*)      gdb_host=nto ;;
 i[34567]86-*-openbsd*) gdb_host=obsd ;;
 i[34567]86-*-sco3.2v5*)        gdb_host=i386sco5 ;;
 i[34567]86-*-sco3.2v4*)        gdb_host=i386sco4 ;;
@@ -150,5 +151,6 @@ vax-*-ultrix2*)             gdb_host=vaxult2 ;;
 vax-*-ultrix*)         gdb_host=vaxult ;;
 
 x86_64-*-linux*)       gdb_host=x86-64linux ;;
+x86_64-*-freebsd*)     gdb_host=fbsd64 ;;
 
 esac
index 21945c5f314bd2ed45911ef757d29849abba4f84..f11f0eeb6672c4ee2bec03b82ec9bb9cc76328a9 100644 (file)
@@ -37,6 +37,7 @@ esac
 
 case "${target}" in
 
+x86_64-*-freebsd*)     gdb_target=fbsd64 ;;
 *-*-freebsd*)          gdb_target=fbsd
                        ;;
 
@@ -113,7 +114,7 @@ ia64-*-linux*)              gdb_target=linux
                        ;;
 ia64*-*-*)             gdb_target=ia64 ;;
 
-# OBSOLETE m32r-*-elf*)                gdb_target=m32r ;;
+m32r-*-*)              gdb_target=m32r ;;
 
 m68hc11*-*-*|m6811*-*-*)       gdb_target=m68hc11 ;;
 
@@ -264,6 +265,8 @@ esac
 
 case "${gdb_target}" in
 d10v)          gdb_multi_arch=yes ;;
+fbsd64)                gdb_multi_arch=yes ;;
+m32r)          gdb_multi_arch=yes ;;
 m68hc11)       gdb_multi_arch=yes ;;
 mn10300)       gdb_multi_arch=yes ;;
 x86-64linux)    gdb_multi_arch=yes ;;
index 14374f34ebb791b57200c523472209918bba979b..795470312757329dbdceec1299844320f7bff5f6 100644 (file)
 #include "frame.h"
 #include "symtab.h"
 #include "block.h"
+#include "complaints.h"
+
+/* Functions related to demangled name parsing.  */
+
+static const char *find_last_component (const char *name);
+
+static unsigned int cp_find_first_component_aux (const char *name,
+                                                int permissive);
+
+static void demangled_name_complaint (const char *name);
 
 /* Functions/variables related to overload resolution.  */
 
@@ -209,21 +219,32 @@ method_name_from_physname (const char *physname)
    boundary of the first component: so, given 'A::foo' or 'A::B::foo'
    it returns the 1, and given 'foo', it returns 0.  */
 
-/* Well, that's what it should do when called externally, but to make
-   the recursion easier, it also stops if it reaches an unexpected ')'
-   or '>'.  */
+/* The character in NAME indexed by the return value is guaranteed to
+   always be either ':' or '\0'.  */
 
 /* NOTE: carlton/2003-03-13: This function is currently only intended
    for internal use: it's probably not entirely safe when called on
-   user-generated input, because some of the 'index += 2' lines might
-   go past the end of malformed input.  */
+   user-generated input, because some of the 'index += 2' lines in
+   cp_find_first_component_aux might go past the end of malformed
+   input.  */
+
+unsigned int
+cp_find_first_component (const char *name)
+{
+  return cp_find_first_component_aux (name, 0);
+}
+
+/* Helper function for cp_find_first_component.  Like that function,
+   it returns the length of the first component of NAME, but to make
+   the recursion easier, it also stops if it reaches an unexpected ')'
+   or '>' if the value of PERMISSIVE is nonzero.  */
 
 /* Let's optimize away calls to strlen("operator").  */
 
 #define LENGTH_OF_OPERATOR 8
 
-unsigned int
-cp_find_first_component (const char *name)
+static unsigned int
+cp_find_first_component_aux (const char *name, int permissive)
 {
   unsigned int index = 0;
   /* Operator names can show up in unexpected places.  Since these can
@@ -244,11 +265,15 @@ cp_find_first_component (const char *name)
             terminating the component or a '::' between two
             components.  (Hence the '+ 2'.)  */
          index += 1;
-         for (index += cp_find_first_component (name + index);
+         for (index += cp_find_first_component_aux (name + index, 1);
               name[index] != '>';
-              index += cp_find_first_component (name + index))
+              index += cp_find_first_component_aux (name + index, 1))
            {
-             gdb_assert (name[index] == ':');
+             if (name[index] != ':')
+               {
+                 demangled_name_complaint (name);
+                 return strlen (name);
+               }
              index += 2;
            }
          operator_possible = 1;
@@ -256,17 +281,28 @@ cp_find_first_component (const char *name)
        case '(':
          /* Similar comment as to '<'.  */
          index += 1;
-         for (index += cp_find_first_component (name + index);
+         for (index += cp_find_first_component_aux (name + index, 1);
               name[index] != ')';
-              index += cp_find_first_component (name + index))
+              index += cp_find_first_component_aux (name + index, 1))
            {
-             gdb_assert (name[index] == ':');
+             if (name[index] != ':')
+               {
+                 demangled_name_complaint (name);
+                 return strlen (name);
+               }
              index += 2;
            }
          operator_possible = 1;
          break;
        case '>':
        case ')':
+         if (permissive)
+           return index;
+         else
+           {
+             demangled_name_complaint (name);
+             return strlen (name);
+           }
        case '\0':
        case ':':
          return index;
@@ -325,6 +361,16 @@ cp_find_first_component (const char *name)
     }
 }
 
+/* Complain about a demangled name that we don't know how to parse.
+   NAME is the demangled name in question.  */
+
+static void
+demangled_name_complaint (const char *name)
+{
+  complaint (&symfile_complaints,
+            "unexpected demangled name '%s'", name);
+}
+
 /* If NAME is the fully-qualified name of a C++
    function/variable/method/etc., this returns the length of its
    entire prefix: all of the namespaces and classes that make up its
index e5984b4e86b74ba9ab9c8bbe6211cb088edc5c89..d00fe148ce33505223f2ca62ea867e598bf12fa9 100644 (file)
@@ -143,7 +143,7 @@ cp_print_class_method (char *valaddr,
       char *demangled_name;
 
       fprintf_filtered (stream, "&");
-      fprintf_filtered (stream, kind);
+      fputs_filtered (kind, stream);
       demangled_name = cplus_demangle (TYPE_FN_FIELD_PHYSNAME (f, j),
                                       DMGL_ANSI | DMGL_PARAMS);
       if (demangled_name == NULL)
@@ -720,7 +720,7 @@ cp_print_class_member (char *valaddr, struct type *domain,
   if (i < len)
     {
       const char *name;
-      fprintf_filtered (stream, prefix);
+      fputs_filtered (prefix, stream);
       name = type_name_no_tag (domain);
       if (name)
        fputs_filtered (name, stream);
index d522580c76ce124d1a873e634a8f34ccca9172cf..ac52ab615f98c76bf5587acd4053e8010a3c0d91 100644 (file)
@@ -763,7 +763,7 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
   /* Adjust all the saved registers so that they contain addresses and
      not offsets.  */
   for (i = 0; i < NUM_REGS - 1; i++)
-    if (info->saved_regs[i].addr)
+    if (trad_frame_addr_p (info->saved_regs, i))
       {
        info->saved_regs[i].addr = (info->prev_sp + info->saved_regs[i].addr);
       }
@@ -776,8 +776,8 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
 
   /* The previous frame's SP needed to be computed.  Save the computed
      value.  */
-  trad_frame_register_value (info->saved_regs, D10V_SP_REGNUM,
-                            d10v_make_daddr (prev_sp));
+  trad_frame_set_value (info->saved_regs, D10V_SP_REGNUM,
+                       d10v_make_daddr (prev_sp));
 
   return info;
 }
@@ -797,9 +797,9 @@ d10v_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
     ULONGEST pc, psw, rpt_s, rpt_e, rpt_c;
     frame_read_unsigned_register (frame, D10V_PC_REGNUM, &pc);
     frame_read_unsigned_register (frame, PSW_REGNUM, &psw);
-    frame_read_unsigned_register (frame, frame_map_name_to_regnum ("rpt_s", -1), &rpt_s);
-    frame_read_unsigned_register (frame, frame_map_name_to_regnum ("rpt_e", -1), &rpt_e);
-    frame_read_unsigned_register (frame, frame_map_name_to_regnum ("rpt_c", -1), &rpt_c);
+    frame_read_unsigned_register (frame, frame_map_name_to_regnum (frame, "rpt_s", -1), &rpt_s);
+    frame_read_unsigned_register (frame, frame_map_name_to_regnum (frame, "rpt_e", -1), &rpt_e);
+    frame_read_unsigned_register (frame, frame_map_name_to_regnum (frame, "rpt_c", -1), &rpt_c);
     fprintf_filtered (file, "PC=%04lx (0x%lx) PSW=%04lx RPT_S=%04lx RPT_E=%04lx RPT_C=%04lx\n",
                     (long) pc, (long) d10v_make_iaddr (pc), (long) psw,
                     (long) rpt_s, (long) rpt_e, (long) rpt_c);
@@ -1417,15 +1417,6 @@ d10v_frame_this_id (struct frame_info *next_frame,
 
   id = frame_id_build (base, func);
 
-  /* Check that we're not going round in circles with the same frame
-     ID (but avoid applying the test to sentinel frames which do go
-     round in circles).  Can't use frame_id_eq() as that doesn't yet
-     compare the frame's PC value.  */
-  if (frame_relative_level (next_frame) >= 0
-      && get_frame_type (next_frame) != DUMMY_FRAME
-      && frame_id_eq (get_frame_id (next_frame), id))
-    return;
-
   (*this_id) = id;
 }
 
@@ -1449,7 +1440,7 @@ static const struct frame_unwind d10v_frame_unwind = {
 };
 
 static const struct frame_unwind *
-d10v_frame_p (CORE_ADDR pc)
+d10v_frame_sniffer (struct frame_info *next_frame)
 {
   return &d10v_frame_unwind;
 }
@@ -1589,7 +1580,7 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_print_registers_info (gdbarch, d10v_print_registers_info);
 
-  frame_unwind_append_predicate (gdbarch, d10v_frame_p);
+  frame_unwind_append_sniffer (gdbarch, d10v_frame_sniffer);
   frame_base_set_default (gdbarch, &d10v_frame_base);
 
   /* Methods for saving / extracting a dummy frame's ID.  The ID's
index a3895407847628f9fdb86e5bc1c4921400279ed2..0f8650d77115e3d77fadbdfc9df38cdd37abe0b9 100644 (file)
@@ -780,16 +780,6 @@ typedef struct ptid ptid_t;
 #include "tm.h"
 #endif
 
-/* GDB_MULTI_ARCH is normally set by configure.in using information
-   from configure.tgt or the config/%/%.mt Makefile fragment.  Since
-   some targets have defined it in their "tm.h" file, delay providing
-   a default definition until after "tm.h" has been included.. */
-
-#ifndef GDB_MULTI_ARCH
-#define GDB_MULTI_ARCH 0
-#endif
-
-
 /* If the xm.h file did not define the mode string used to open the
    files, assume that binary files are opened the same way as text
    files */
index 553ca1cfc00097f415dc4908baf570ee7d05ad32..f86ec3f5058b7b4a98a0fe065cef590c4d9f3b3c 100644 (file)
@@ -123,6 +123,9 @@ dump_insns (struct ui_out *uiout, disassemble_info * di,
          ui_out_field_int (uiout, "offset", offset);
          ui_out_text (uiout, ">:\t");
        }
+      else
+       ui_out_text (uiout, ":\t");
+
       if (filename != NULL)
        xfree (filename);
       if (name != NULL)
@@ -328,6 +331,7 @@ gdb_disassemble_info (struct gdbarch *gdbarch, struct ui_file *file)
      Further, it has been supperseeded by trust-read-only-sections
      (although that should be superseeded by target_trust..._p()).  */
   di.read_memory_func = dis_asm_read_memory;
+  di.arch = gdbarch_bfd_arch_info (gdbarch)->arch;
   di.mach = gdbarch_bfd_arch_info (gdbarch)->mach;
   di.endian = gdbarch_byte_order (gdbarch);
   return di;
index 3d396013241900558b0408febe765e268d49e687..3de06db8bf08f7c9742433eb1ed3930187894d9c 100644 (file)
@@ -1,3 +1,49 @@
+2003-08-04  Andrew Cagney  <cagney@redhat.com>
+
+       * agentexpr.texi: Delete @bye.
+       * Makefile.in (STABS_DOC_SOURCE_INCLUDES): Add "fdl.texi"
+       (stabs.info): Add $(srcdir) to include search path.
+       (html): Depend on "annotate_toc.html", and not "annotate.html".
+       * stabs.texinfo: Ditto.  Include "fdl.texi".
+       * gdbint.texinfo: Update copyright statement's list of invariant
+       sections.
+
+2003-07-28  Andrew Cagney  <cagney@redhat.com>
+
+       * Makefile.in (INFO_DEPS): Add annotate.info.
+       (dvi, ps, html, pdf): Add annotate.
+       (ANNOTATE_DOC_SOURCE_INCLUDES): New macro.
+       (ANNOTATE_DOC_BUILD_INCLUDES): New macro.
+       (ANNOTATE_DOC_FILES): New macro.
+       (ANNOTATE_TEX_TMPS): New macro.
+       (annotate.info, annotate_toc.html): Specify dependencies.
+       (annotate.ps, annotate.pdf, annotate.dvi): Ditto.
+       * annotate.texinfo: Rename annotate.texi.  Get building.  Add
+       "Migrating to GDB/MI" and "Limitations of the Annotation
+       Interface" chapters.  Mention why it is not part of the user
+       guide.  Update copyright notice.  Include "fdl.texi".
+
+2003-07-26  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * gdb.texinfo (TUI Keys): Document C-x o key to switch active window.
+
+2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
+
+       * gdbint.texinfo (libgdb components): Correct a GDB to GDBN.
+
+2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
+
+       * gdb.texinfo (Server): Mention pidof.
+
+2003-07-22  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbint.texinfo (Coding): Add -Wformat-nonliteral to -Werror
+       list.
+
+2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       * gdb.texinfo (Logging output): New chapter.
+
 2003-06-24  Joel Brobecker  <brobecker@gnat.com>
 
        * gdb.texinfo (Unsupported languages): New section.
index eda637cf19df962ac1fac3946d6e43d616933f2b..4e8c64ea81772522edca54b856d7107273212cb1 100644 (file)
@@ -67,7 +67,7 @@ SET_TEXINPUTS = \
    TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$(GDBMI_DIR):$$TEXINPUTS
 
 # Files which should be generated via 'info' and installed by 'install-info'
-INFO_DEPS = gdb.info gdbint.info stabs.info
+INFO_DEPS = gdb.info gdbint.info stabs.info annotate.info
 
 # There may be alternate predefined collections of switches to configure
 # the GDB manual.  Normally this is not done in synch with the software
@@ -124,23 +124,34 @@ GDBINT_DOC_FILES = \
        $(GDBINT_DOC_BUILD_INCLUDES)
 
 # Stabs manual: All files
-STABS_DOC_SOURCE_INCLUDES =
+STABS_DOC_SOURCE_INCLUDES = \
+       $(srcdir)/fdl.texi
 STABS_DOC_BUILD_INCLUDES =
 STABS_DOC_FILES = \
        $(srcdir)/stabs.texinfo \
        $(STABS_DOC_SOURCE_INCLUDES) \
        $(STABS_DOC_BUILD_INCLUDES)
 
+# Annotate migration document
+ANNOTATE_DOC_SOURCE_INCLUDES = \
+       $(srcdir)/fdl.texi
+ANNOTATE_DOC_BUILD_INCLUDES = \
+       gdb-cfg.texi
+ANNOTATE_DOC_FILES = \
+       $(srcdir)/annotate.texinfo \
+       $(ANNOTATE_DOC_SOURCE_INCLUDES) \
+       $(ANNOTATE_DOC_BUILD_INCLUDES)
+
 #### Host, target, and site specific Makefile fragments come in here.
 ###
 
 all:
 
 info: $(INFO_DEPS)
-dvi: gdb.dvi gdbint.dvi stabs.dvi refcard.dvi
-ps: gdb.ps gdbint.ps stabs.ps refcard.ps
-html: gdb_toc.html gdbint_toc.html stabs_toc.html
-pdf: gdb.pdf gdbint.pdf stabs.pdf
+dvi: gdb.dvi gdbint.dvi stabs.dvi refcard.dvi annotate.dvi
+ps: gdb.ps gdbint.ps stabs.ps refcard.ps annotate.ps
+html: gdb_toc.html gdbint_toc.html stabs_toc.html annotate_toc.html
+pdf: gdb.pdf gdbint.pdf stabs.pdf annotate.pdf
 all-doc: info dvi ps # pdf
 diststuff: info
 
@@ -395,7 +406,7 @@ gdbint_toc.html: $(GDBINT_DOC_FILES)
        $(MAKEHTML) $(MAKEHTMLFLAGS) $(srcdir)/gdbint.texinfo
 
 stabs.info: $(STABS_DOC_FILES)
-       $(MAKEINFO) -o stabs.info $(srcdir)/stabs.texinfo
+       $(MAKEINFO) -I $(srcdir) -o stabs.info $(srcdir)/stabs.texinfo
 
 # STABS DOCUMENTATION: HTML file
 
@@ -420,6 +431,30 @@ stabs.pdf: $(STABS_DOC_FILES)
        rm -f $(STABS_TEX_TMPS)
        $(SET_TEXINPUTS) $(TEXI2DVI) --pdf $(srcdir)/stabs.texinfo
 
+# Clean these up before each run.  Avoids a catch 22 with not being
+# able to re-generate these files (to fix a corruption) because these
+# files contain a corruption.
+ANNOTATE_TEX_TMPS = annotate.aux annotate.cp* annotate.fn* annotate.ky* \
+       annotate.log annotate.pg* annotate.toc annotate.tp* annotate.vr*
+
+# ANNOTATE DOCUMENTATION: TeX dvi file
+annotate.dvi : $(ANNOTATE_DOC_FILES)
+       rm -f $(ANNOTATE_TEX_TMPS)
+       $(SET_TEXINPUTS) $(TEXI2DVI) $(srcdir)/annotate.texinfo
+
+annotate.ps: annotate.dvi
+       $(DVIPS) -o $@ $?
+
+annotate.pdf: $(ANNOTATE_DOC_FILES)
+       rm -f $(ANNOTATE_TEX_TMPS)
+       $(SET_TEXINPUTS) $(TEXI2DVI) --pdf $(srcdir)/annotate.texinfo
+
+annotate.info: $(ANNOTATE_DOC_FILES)
+       $(MAKEINFO)  -I $(srcdir) -o annotate.info $(srcdir)/annotate.texinfo
+
+annotate_toc.html: $(ANNOTATE_DOC_FILES)
+       $(MAKEHTML) $(MAKEHTMLFLAGS) $(srcdir)/annotate.texinfo
+
 force:
 
 Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag) config.status
@@ -434,6 +469,7 @@ mostlyclean:
        rm -f $(GDB_TEX_TMPS)
        rm -f $(GDBINT_TEX_TMPS)
        rm -f $(STABS_TEX_TMPS)
+       rm -f $(ANNOTATE_TEX_TMPS)
        rm -f sedref.dvi sedref.tex tmp.sed
 
 clean: mostlyclean
index 79985b7a0ecd0c5011d170263187b1f0584fe62c..c40259d1bac25e894e5bd90b85a5ad2208e4b1cc 100644 (file)
@@ -835,5 +835,3 @@ opcode 0x30 reserved, to remain compatible with the customer who added
 it.
 
 @end table
-
-@bye
diff --git a/gdb/doc/annotate.texi b/gdb/doc/annotate.texi
deleted file mode 100644 (file)
index fc26924..0000000
+++ /dev/null
@@ -1,741 +0,0 @@
-@c  \input texinfo   @c -*-texinfo-*-
-@c  @c %**start of header
-@c  @setfilename annotate.info
-@c  @settitle GDB Annotations
-@c  @setchapternewpage off
-@c  @c %**end of header
-
-@c  @set EDITION 0.5
-@c  @set DATE May 1994
-
-@c @ifinfo
-@c This file documents GDB annotations.
-
-@c This is Edition @value{EDITION}, @value{DATE}, of @cite{GDB
-@c Annotations}.  Copyright 1994,1995,2000,2001 Free Software Foundation, Inc.
-
-@c Permission is granted to copy, distribute and/or modify this document
-@c under the terms of the GNU Free Documentation License, Version 1.1 or
-@c any later version published by the Free Software Foundation; with no
-@c Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-@c and with the Back-Cover Texts as in (a) below.
-
-@c (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
-@c this GNU Manual, like GNU software.  Copies published by the Free
-@c Software Foundation raise funds for GNU development.''
-@c @end ifinfo
-
-@c  @titlepage
-@c  @title GDB Annotations
-@c  @subtitle Edition @value{EDITION}
-@c  @subtitle @value{DATE}
-@c  @author Cygnus Support
-@c  @page
-@c  @vskip 0pt plus 1filll
-@c  Permission is granted to make and distribute verbatim copies of
-@c  this manual provided the copyright notice and this permission notice
-@c  are preserved on all copies.
-
-@c  Copyright @copyright{} 1994,1995,2000,2001 Free Software Foundation
-@c  @end titlepage
-
-@c  @ifinfo
-@c  @node Top
-@c  @top GDB Annotations
-
-@c  @syncodeindex fn cp
-
-@node Annotations
-@chapter @value{GDBN} Annotations
-
-This chapter describes annotations in @value{GDBN}.  Annotations are
-designed to interface @value{GDBN} to graphical user interfaces or
-other similar programs which want to interact with @value{GDBN} at a
-relatively high level.
-
-@ignore
-This is Edition @value{EDITION}, @value{DATE}.
-@end ignore
-
-@menu
-* Annotations Overview::  What annotations are; the general syntax.
-* Server Prefix::       Issuing a command without affecting user state.
-* Value Annotations::   Values are marked as such.
-* Frame Annotations::   Stack frames are annotated.
-* Displays::            @value{GDBN} can be told to display something periodically.
-* Prompting::           Annotations marking @value{GDBN}'s need for input.
-* Errors::              Annotations for error messages.
-* Breakpoint Info::     Information on breakpoints.
-* Invalidation::        Some annotations describe things now invalid.
-* Annotations for Running::
-                        Whether the program is running, how it stopped, etc.
-* Source Annotations::  Annotations describing source code.
-* TODO::                Annotations which might be added in the future.
-@end menu
-
-@node Annotations Overview
-@section What is an Annotation?
-@cindex annotations
-
-To produce annotations, start @value{GDBN} with the @code{--annotate=2} option.
-
-Annotations start with a newline character, two @samp{control-z}
-characters, and the name of the annotation.  If there is no additional
-information associated with this annotation, the name of the annotation
-is followed immediately by a newline.  If there is additional
-information, the name of the annotation is followed by a space, the
-additional information, and a newline.  The additional information
-cannot contain newline characters.
-
-Any output not beginning with a newline and two @samp{control-z}
-characters denotes literal output from @value{GDBN}.  Currently there is
-no need for @value{GDBN} to output a newline followed by two
-@samp{control-z} characters, but if there was such a need, the
-annotations could be extended with an @samp{escape} annotation which
-means those three characters as output.
-
-A simple example of starting up @value{GDBN} with annotations is:
-
-@smallexample
-$ gdb --annotate=2
-GNU GDB 5.0
-Copyright 2000 Free Software Foundation, Inc.
-GDB is free software, covered by the GNU General Public License,
-and you are welcome to change it and/or distribute copies of it
-under certain conditions.
-Type "show copying" to see the conditions.
-There is absolutely no warranty for GDB.  Type "show warranty"
-for details.
-This GDB was configured as "sparc-sun-sunos4.1.3"
-
-^Z^Zpre-prompt
-(gdb) 
-^Z^Zprompt
-quit
-
-^Z^Zpost-prompt
-$ 
-@end smallexample
-
-Here @samp{quit} is input to @value{GDBN}; the rest is output from
-@value{GDBN}.  The three lines beginning @samp{^Z^Z} (where @samp{^Z}
-denotes a @samp{control-z} character) are annotations; the rest is
-output from @value{GDBN}.
-
-@node Server Prefix
-@section The Server Prefix
-@cindex server prefix for annotations
-
-To issue a command to @value{GDBN} without affecting certain aspects of
-the state which is seen by users, prefix it with @samp{server }.  This
-means that this command will not affect the command history, nor will it
-affect @value{GDBN}'s notion of which command to repeat if @key{RET} is
-pressed on a line by itself.
-
-The server prefix does not affect the recording of values into the value
-history; to print a value without recording it into the value history,
-use the @code{output} command instead of the @code{print} command.
-
-@node Value Annotations
-@section Values
-
-@cindex annotations for values
-When a value is printed in various contexts, @value{GDBN} uses
-annotations to delimit the value from the surrounding text.
-
-@findex value-history-begin
-@findex value-history-value
-@findex value-history-end
-If a value is printed using @code{print} and added to the value history,
-the annotation looks like
-
-@smallexample
-^Z^Zvalue-history-begin @var{history-number} @var{value-flags}
-@var{history-string}
-^Z^Zvalue-history-value
-@var{the-value}
-^Z^Zvalue-history-end
-@end smallexample
-
-@noindent
-where @var{history-number} is the number it is getting in the value
-history, @var{history-string} is a string, such as @samp{$5 = }, which
-introduces the value to the user, @var{the-value} is the output
-corresponding to the value itself, and @var{value-flags} is @samp{*} for
-a value which can be dereferenced and @samp{-} for a value which cannot.
-
-@findex value-begin
-@findex value-end
-If the value is not added to the value history (it is an invalid float
-or it is printed with the @code{output} command), the annotation is similar:
-
-@smallexample
-^Z^Zvalue-begin @var{value-flags}
-@var{the-value}
-^Z^Zvalue-end
-@end smallexample
-
-@findex arg-begin
-@findex arg-name-end
-@findex arg-value
-@findex arg-end
-When @value{GDBN} prints an argument to a function (for example, in the output
-from the @code{backtrace} command), it annotates it as follows:
-
-@smallexample
-^Z^Zarg-begin
-@var{argument-name}
-^Z^Zarg-name-end
-@var{separator-string}
-^Z^Zarg-value @var{value-flags}
-@var{the-value}
-^Z^Zarg-end
-@end smallexample
-
-@noindent
-where @var{argument-name} is the name of the argument,
-@var{separator-string} is text which separates the name from the value
-for the user's benefit (such as @samp{=}), and @var{value-flags} and
-@var{the-value} have the same meanings as in a
-@code{value-history-begin} annotation.
-
-@findex field-begin
-@findex field-name-end
-@findex field-value
-@findex field-end
-When printing a structure, @value{GDBN} annotates it as follows:
-
-@smallexample
-^Z^Zfield-begin @var{value-flags}
-@var{field-name}
-^Z^Zfield-name-end
-@var{separator-string}
-^Z^Zfield-value
-@var{the-value}
-^Z^Zfield-end
-@end smallexample
-
-@noindent
-where @var{field-name} is the name of the field, @var{separator-string}
-is text which separates the name from the value for the user's benefit
-(such as @samp{=}), and @var{value-flags} and @var{the-value} have the
-same meanings as in a @code{value-history-begin} annotation.
-
-When printing an array, @value{GDBN} annotates it as follows:
-
-@smallexample
-^Z^Zarray-section-begin @var{array-index} @var{value-flags}
-@end smallexample
-
-@noindent
-where @var{array-index} is the index of the first element being
-annotated and @var{value-flags} has the same meaning as in a
-@code{value-history-begin} annotation.  This is followed by any number
-of elements, where is element can be either a single element:
-
-@findex elt
-@smallexample
-@samp{,} @var{whitespace}         ; @r{omitted for the first element}
-@var{the-value}
-^Z^Zelt
-@end smallexample
-
-or a repeated element
-
-@findex elt-rep
-@findex elt-rep-end
-@smallexample
-@samp{,} @var{whitespace}         ; @r{omitted for the first element}
-@var{the-value}
-^Z^Zelt-rep @var{number-of-repetitions}
-@var{repetition-string}
-^Z^Zelt-rep-end
-@end smallexample
-
-In both cases, @var{the-value} is the output for the value of the
-element and @var{whitespace} can contain spaces, tabs, and newlines.  In
-the repeated case, @var{number-of-repetitions} is the number of
-consecutive array elements which contain that value, and
-@var{repetition-string} is a string which is designed to convey to the
-user that repetition is being depicted.
-
-@findex array-section-end
-Once all the array elements have been output, the array annotation is
-ended with
-
-@smallexample
-^Z^Zarray-section-end
-@end smallexample
-
-@node Frame Annotations
-@section Frames
-
-@cindex annotations for frames
-Whenever @value{GDBN} prints a frame, it annotates it.  For example, this applies
-to frames printed when @value{GDBN} stops, output from commands such as
-@code{backtrace} or @code{up}, etc.
-
-@findex frame-begin
-The frame annotation begins with
-
-@smallexample
-^Z^Zframe-begin @var{level} @var{address}
-@var{level-string}
-@end smallexample
-
-@noindent
-where @var{level} is the number of the frame (0 is the innermost frame,
-and other frames have positive numbers), @var{address} is the address of
-the code executing in that frame, and @var{level-string} is a string
-designed to convey the level to the user.  @var{address} is in the form
-@samp{0x} followed by one or more lowercase hex digits (note that this
-does not depend on the language).  The frame ends with
-
-@findex frame-end
-@smallexample
-^Z^Zframe-end
-@end smallexample
-
-Between these annotations is the main body of the frame, which can
-consist of
-
-@itemize @bullet
-@item
-@findex function-call
-@smallexample
-^Z^Zfunction-call
-@var{function-call-string}
-@end smallexample
-
-where @var{function-call-string} is text designed to convey to the user
-that this frame is associated with a function call made by @value{GDBN} to a
-function in the program being debugged.
-
-@item
-@findex signal-handler-caller
-@smallexample
-^Z^Zsignal-handler-caller
-@var{signal-handler-caller-string}
-@end smallexample
-
-where @var{signal-handler-caller-string} is text designed to convey to
-the user that this frame is associated with whatever mechanism is used
-by this operating system to call a signal handler (it is the frame which
-calls the signal handler, not the frame for the signal handler itself).
-
-@item
-A normal frame.
-
-@findex frame-address
-@findex frame-address-end
-This can optionally (depending on whether this is thought of as
-interesting information for the user to see) begin with
-
-@smallexample
-^Z^Zframe-address
-@var{address}
-^Z^Zframe-address-end
-@var{separator-string}
-@end smallexample
-
-where @var{address} is the address executing in the frame (the same
-address as in the @code{frame-begin} annotation, but printed in a form
-which is intended for user consumption---in particular, the syntax varies
-depending on the language), and @var{separator-string} is a string
-intended to separate this address from what follows for the user's
-benefit.
-
-@findex frame-function-name
-@findex frame-args
-Then comes
-
-@smallexample
-^Z^Zframe-function-name
-@var{function-name}
-^Z^Zframe-args
-@var{arguments}
-@end smallexample
-
-where @var{function-name} is the name of the function executing in the
-frame, or @samp{??} if not known, and @var{arguments} are the arguments
-to the frame, with parentheses around them (each argument is annotated
-individually as well, @pxref{Value Annotations}).
-
-@findex frame-source-begin
-@findex frame-source-file
-@findex frame-source-file-end
-@findex frame-source-line
-@findex frame-source-end
-If source information is available, a reference to it is then printed:
-
-@smallexample
-^Z^Zframe-source-begin
-@var{source-intro-string}
-^Z^Zframe-source-file
-@var{filename}
-^Z^Zframe-source-file-end
-:
-^Z^Zframe-source-line
-@var{line-number}
-^Z^Zframe-source-end
-@end smallexample
-
-where @var{source-intro-string} separates for the user's benefit the
-reference from the text which precedes it, @var{filename} is the name of
-the source file, and @var{line-number} is the line number within that
-file (the first line is line 1).
-
-@findex frame-where
-If @value{GDBN} prints some information about where the frame is from (which
-library, which load segment, etc.; currently only done on the RS/6000),
-it is annotated with
-
-@smallexample
-^Z^Zframe-where
-@var{information}
-@end smallexample
-
-Then, if source is to actually be displayed for this frame (for example,
-this is not true for output from the @code{backtrace} command), then a
-@code{source} annotation (@pxref{Source Annotations}) is displayed.  Unlike
-most annotations, this is output instead of the normal text which would be
-output, not in addition.
-@end itemize
-
-@node Displays
-@section Displays
-
-@findex display-begin
-@findex display-number-end
-@findex display-format
-@findex display-expression
-@findex display-expression-end
-@findex display-value
-@findex display-end
-@cindex annotations for display
-When @value{GDBN} is told to display something using the @code{display} command,
-the results of the display are annotated:
-
-@smallexample
-^Z^Zdisplay-begin
-@var{number}
-^Z^Zdisplay-number-end
-@var{number-separator}
-^Z^Zdisplay-format
-@var{format}
-^Z^Zdisplay-expression
-@var{expression}
-^Z^Zdisplay-expression-end
-@var{expression-separator}
-^Z^Zdisplay-value
-@var{value}
-^Z^Zdisplay-end
-@end smallexample
-
-@noindent
-where @var{number} is the number of the display, @var{number-separator}
-is intended to separate the number from what follows for the user,
-@var{format} includes information such as the size, format, or other
-information about how the value is being displayed, @var{expression} is
-the expression being displayed, @var{expression-separator} is intended
-to separate the expression from the text that follows for the user,
-and @var{value} is the actual value being displayed.
-
-@node Prompting
-@section Annotation for @value{GDBN} Input
-
-@cindex annotations for prompts
-When @value{GDBN} prompts for input, it annotates this fact so it is possible
-to know when to send output, when the output from a given command is
-over, etc.
-
-Different kinds of input each have a different @dfn{input type}.  Each
-input type has three annotations: a @code{pre-} annotation, which
-denotes the beginning of any prompt which is being output, a plain
-annotation, which denotes the end of the prompt, and then a @code{post-}
-annotation which denotes the end of any echo which may (or may not) be
-associated with the input.  For example, the @code{prompt} input type
-features the following annotations:
-
-@smallexample
-^Z^Zpre-prompt
-^Z^Zprompt
-^Z^Zpost-prompt
-@end smallexample
-
-The input types are
-
-@table @code
-@findex pre-prompt
-@findex prompt
-@findex post-prompt
-@item prompt
-When @value{GDBN} is prompting for a command (the main @value{GDBN} prompt).
-
-@findex pre-commands
-@findex commands
-@findex post-commands
-@item commands
-When @value{GDBN} prompts for a set of commands, like in the @code{commands}
-command.  The annotations are repeated for each command which is input.
-
-@findex pre-overload-choice
-@findex overload-choice
-@findex post-overload-choice
-@item overload-choice
-When @value{GDBN} wants the user to select between various overloaded functions.
-
-@findex pre-query
-@findex query
-@findex post-query
-@item query
-When @value{GDBN} wants the user to confirm a potentially dangerous operation.
-
-@findex pre-prompt-for-continue
-@findex prompt-for-continue
-@findex post-prompt-for-continue
-@item prompt-for-continue
-When @value{GDBN} is asking the user to press return to continue.  Note: Don't
-expect this to work well; instead use @code{set height 0} to disable
-prompting.  This is because the counting of lines is buggy in the
-presence of annotations.
-@end table
-
-@node Errors
-@section Errors
-@cindex annotations for errors, warnings and interrupts
-
-@findex quit
-@smallexample
-^Z^Zquit
-@end smallexample
-
-This annotation occurs right before @value{GDBN} responds to an interrupt.
-
-@findex error
-@smallexample
-^Z^Zerror
-@end smallexample
-
-This annotation occurs right before @value{GDBN} responds to an error.
-
-Quit and error annotations indicate that any annotations which @value{GDBN} was
-in the middle of may end abruptly.  For example, if a
-@code{value-history-begin} annotation is followed by a @code{error}, one
-cannot expect to receive the matching @code{value-history-end}.  One
-cannot expect not to receive it either, however; an error annotation
-does not necessarily mean that @value{GDBN} is immediately returning all the way
-to the top level.
-
-@findex error-begin
-A quit or error annotation may be preceded by
-
-@smallexample
-^Z^Zerror-begin
-@end smallexample
-
-Any output between that and the quit or error annotation is the error
-message.
-
-Warning messages are not yet annotated.
-@c If we want to change that, need to fix warning(), type_error(),
-@c range_error(), and possibly other places.
-
-@node Breakpoint Info
-@section Information on Breakpoints
-
-@cindex annotations for breakpoints
-The output from the @code{info breakpoints} command is annotated as follows:
-
-@findex breakpoints-headers
-@findex breakpoints-table
-@smallexample
-^Z^Zbreakpoints-headers
-@var{header-entry}
-^Z^Zbreakpoints-table
-@end smallexample
-
-@noindent
-where @var{header-entry} has the same syntax as an entry (see below) but
-instead of containing data, it contains strings which are intended to
-convey the meaning of each field to the user.  This is followed by any
-number of entries.  If a field does not apply for this entry, it is
-omitted.  Fields may contain trailing whitespace.  Each entry consists
-of:
-
-@findex record
-@findex field
-@smallexample
-^Z^Zrecord
-^Z^Zfield 0
-@var{number}
-^Z^Zfield 1
-@var{type}
-^Z^Zfield 2
-@var{disposition}
-^Z^Zfield 3
-@var{enable}
-^Z^Zfield 4
-@var{address}
-^Z^Zfield 5
-@var{what}
-^Z^Zfield 6
-@var{frame}
-^Z^Zfield 7
-@var{condition}
-^Z^Zfield 8
-@var{ignore-count}
-^Z^Zfield 9
-@var{commands}
-@end smallexample
-
-Note that @var{address} is intended for user consumption---the syntax
-varies depending on the language.
-
-The output ends with
-
-@findex breakpoints-table-end
-@smallexample
-^Z^Zbreakpoints-table-end
-@end smallexample
-
-@node Invalidation
-@section Invalidation Notices
-
-@cindex annotations for invalidation messages
-The following annotations say that certain pieces of state may have
-changed.
-
-@table @code
-@findex frames-invalid
-@item ^Z^Zframes-invalid
-
-The frames (for example, output from the @code{backtrace} command) may
-have changed.
-
-@findex breakpoints-invalid
-@item ^Z^Zbreakpoints-invalid
-
-The breakpoints may have changed.  For example, the user just added or
-deleted a breakpoint.
-@end table
-
-@node Annotations for Running
-@section Running the Program
-@cindex annotations for running programs
-
-@findex starting
-@findex stopping
-When the program starts executing due to a @value{GDBN} command such as
-@code{step} or @code{continue}, 
-
-@smallexample
-^Z^Zstarting
-@end smallexample
-
-is output.  When the program stops, 
-
-@smallexample
-^Z^Zstopped
-@end smallexample
-
-is output.  Before the @code{stopped} annotation, a variety of
-annotations describe how the program stopped.
-
-@table @code
-@findex exited
-@item ^Z^Zexited @var{exit-status}
-The program exited, and @var{exit-status} is the exit status (zero for
-successful exit, otherwise nonzero).
-
-@findex signalled
-@findex signal-name
-@findex signal-name-end
-@findex signal-string
-@findex signal-string-end
-@item ^Z^Zsignalled
-The program exited with a signal.  After the @code{^Z^Zsignalled}, the
-annotation continues:
-
-@smallexample
-@var{intro-text}
-^Z^Zsignal-name
-@var{name}
-^Z^Zsignal-name-end
-@var{middle-text}
-^Z^Zsignal-string
-@var{string}
-^Z^Zsignal-string-end
-@var{end-text}
-@end smallexample
-
-@noindent
-where @var{name} is the name of the signal, such as @code{SIGILL} or
-@code{SIGSEGV}, and @var{string} is the explanation of the signal, such
-as @code{Illegal Instruction} or @code{Segmentation fault}.
-@var{intro-text}, @var{middle-text}, and @var{end-text} are for the
-user's benefit and have no particular format.
-
-@findex signal
-@item ^Z^Zsignal
-The syntax of this annotation is just like @code{signalled}, but @value{GDBN} is
-just saying that the program received the signal, not that it was
-terminated with it.
-
-@findex breakpoint
-@item ^Z^Zbreakpoint @var{number}
-The program hit breakpoint number @var{number}.
-
-@findex watchpoint
-@item ^Z^Zwatchpoint @var{number}
-The program hit watchpoint number @var{number}.
-@end table
-
-@node Source Annotations
-@section Displaying Source
-@cindex annotations for source display
-
-@findex source
-The following annotation is used instead of displaying source code:
-
-@smallexample
-^Z^Zsource @var{filename}:@var{line}:@var{character}:@var{middle}:@var{addr}
-@end smallexample
-
-where @var{filename} is an absolute file name indicating which source
-file, @var{line} is the line number within that file (where 1 is the
-first line in the file), @var{character} is the character position
-within the file (where 0 is the first character in the file) (for most
-debug formats this will necessarily point to the beginning of a line),
-@var{middle} is @samp{middle} if @var{addr} is in the middle of the
-line, or @samp{beg} if @var{addr} is at the beginning of the line, and
-@var{addr} is the address in the target program associated with the
-source which is being displayed.  @var{addr} is in the form @samp{0x}
-followed by one or more lowercase hex digits (note that this does not
-depend on the language).
-
-@node TODO
-@section Annotations We Might Want in the Future
-
-@format
-    - target-invalid
-      the target might have changed (registers, heap contents, or
-      execution status).  For performance, we might eventually want
-      to hit `registers-invalid' and `all-registers-invalid' with
-      greater precision
-
-    - systematic annotation for set/show parameters (including
-      invalidation notices).
-
-    - similarly, `info' returns a list of candidates for invalidation
-      notices.
-@end format
-
-@ignore
-@node Index
-@unnumbered Index
-
-@printindex fn
-@end ignore
-
-@c @bye
index 05715e137df11ac4aa6e1f20ba19ea2b585403a3..022b34dcd0fbf003dc195dd81b9ceba16926ea56 100644 (file)
@@ -757,6 +757,7 @@ type @kbd{quit} or @kbd{C-d} to exit.
 * Invoking GDB::                How to start @value{GDBN}
 * Quitting GDB::                How to quit @value{GDBN}
 * Shell Commands::              How to use shell commands inside @value{GDBN}
+* Logging output::              How to log @value{GDBN}'s output to a file
 @end menu
 
 @node Invoking GDB
@@ -1210,6 +1211,32 @@ Execute the @code{make} program with the specified
 arguments.  This is equivalent to @samp{shell make @var{make-args}}.
 @end table
 
+@node Logging output
+@section Logging output
+@cindex logging @value{GDBN} output
+
+You may want to save the output of @value{GDBN} commands to a file.
+There are several commands to control @value{GDBN}'s logging.
+
+@table @code
+@kindex set logging
+@item set logging on
+Enable logging.
+@item set logging off
+Disable logging.
+@item set logging file @var{file}
+Change the name of the current logfile.  The default logfile is @file{gdb.txt}.
+@item set logging overwrite [on|off]
+By default, @value{GDBN} will append to the logfile.  Set @code{overwrite} if
+you want @code{set logging on} to overwrite the logfile instead.
+@item set logging redirect [on|off]
+By default, @value{GDBN} output will go to both the terminal and the logfile.
+Set @code{redirect} if you want output to go only to the log file.
+@kindex show logging
+@item show logging
+Show the current values of the logging settings.
+@end table
+
 @node Commands
 @chapter @value{GDBN} Commands
 
@@ -10719,6 +10746,19 @@ target> gdbserver @var{comm} --attach @var{pid}
 @var{pid} is the process ID of a currently running process.  It isn't necessary
 to point @code{gdbserver} at a binary for the running process.
 
+@pindex pidof
+@cindex attach to a program by name
+You can debug processes by name instead of process ID if your target has the
+@code{pidof} utility:
+
+@smallexample
+target> gdbserver @var{comm} --attach `pidof @var{PROGRAM}`
+@end smallexample
+
+In case more than one copy of @var{PROGRAM} is running, or @var{PROGRAM}
+has multiple threads, most versions of @code{pidof} support the
+@code{-s} option to only return the first process ID.
+
 @item On the host machine,
 connect to your target (@pxref{Connecting,,Connecting to a remote target}).
 For TCP connections, you must start up @code{gdbserver} prior to using
@@ -13817,6 +13857,14 @@ previous layout and the new one.
 
 Think of it as the Emacs @kbd{C-x 2} binding.
 
+@kindex C-x o
+@item C-x o
+Change the active window.  The TUI associates several key bindings
+(like scrolling and arrow keys) to the active window. This command
+gives the focus to the next TUI window.
+
+Think of it as the Emacs @kbd{C-x o} binding.
+
 @kindex C-x s
 @item C-x s
 Use the TUI @emph{SingleKey} keymap that binds single key to gdb commands
@@ -13858,9 +13906,10 @@ Refresh the screen.
 @end table
 
 In the TUI mode, the arrow keys are used by the active window
-for scrolling.  This means they are not available for readline.  It is
-necessary to use other readline key bindings such as @key{C-p}, @key{C-n},
-@key{C-b} and @key{C-f}.
+for scrolling.  This means they are available for readline when the
+active window is the command window.  When the command window
+does not have the focus, it is necessary to use other readline
+key bindings such as @key{C-p}, @key{C-n}, @key{C-b} and @key{C-f}.
 
 @node TUI Single Key Mode
 @section TUI Single Key Mode
index 4f031e0f6b1565155cfc4f66692c52d8caad900a..00c6283744794eec24370adddc2764d7cd5555ce 100644 (file)
@@ -16,12 +16,9 @@ Second Edition by Stan Shebs.
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
 any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.
-
-(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
-this GNU Manual, like GNU software.  Copies published by the Free
-Software Foundation raise funds for GNU development.''
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the section entitled ``GNU
+Free Documentation License''.
 @end ifinfo
 
 @setchapternewpage off
@@ -56,12 +53,9 @@ Copyright @copyright{} 1990,1991,1992,1993,1994,1996,1998,1999,2000,2001,
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
 any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.
-
-(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
-this GNU Manual, like GNU software.  Copies published by the Free
-Software Foundation raise funds for GNU development.''
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the section entitled ``GNU
+Free Documentation License''.
 @end titlepage
 
 @contents
@@ -1505,7 +1499,7 @@ loop.  A client would need to either plug its self into this loop or,
 implement a new event-loop that GDB would use.
 
 The event-loop will eventually be made re-entrant.  This is so that
-@value{GDB} can better handle the problem of some commands blocking
+@value{GDBN} can better handle the problem of some commands blocking
 instead of returning.
 
 @subheading Library - @file{gdb.h}
@@ -5009,8 +5003,9 @@ that use register windows.
 @item -Wtrigraphs
 
 @item -Wformat
+@itemx -Wformat-nonliteral
 Since @value{GDBN} uses the @code{format printf} attribute on all
-@code{printf} like functions this checks not just @code{printf} calls
+@code{printf} like functions these check not just @code{printf} calls
 but also calls to functions such as @code{fprintf_unfiltered}.
 
 @item -Wparentheses
index 33c835b67c091005dfb180995f7c2d9cb3c16af5..bd59116665f9a5e2d3430060efeed0432d29219d 100644 (file)
@@ -22,12 +22,9 @@ and David MacKenzie.
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
 any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.
-
-(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
-this GNU Manual, like GNU software.  Copies published by the Free
-Software Foundation raise funds for GNU development.''
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the section entitled ``GNU
+Free Documentation License''.
 @end ifinfo
 
 @setchapternewpage odd
@@ -54,13 +51,9 @@ Contributed by Cygnus Support.
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
 any later version published by the Free Software Foundation; with no
-Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
-and with the Back-Cover Texts as in (a) below.
-
-(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
-this GNU Manual, like GNU software.  Copies published by the Free
-Software Foundation raise funds for GNU development.''
-
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts.  A copy of the license is included in the section entitled ``GNU
+Free Documentation License''.
 @end titlepage
 
 @ifinfo
@@ -85,6 +78,7 @@ This document describes the stabs debugging format.
 * Stab Sections::              In some object file formats, stabs are
                                 in sections.
 * Symbol Types Index::          Index of symbolic stab symbol type names.
+* GNU Free Documentation License::  The license for this documentation
 @end menu
 @end ifinfo
 
@@ -4033,6 +4027,8 @@ is no more work than having the linker relocate ELF symbols, and it
 solves the problem of having to associate the ELF and stab symbols.
 However, no one has yet designed or implemented such a scheme.
 
+@include fdl.texi
+
 @node Symbol Types Index
 @unnumbered Symbol Types Index
 
index 9870433c3e153b18909dbf231082fac7db6a5ac3..36c7dbb690aa7e1e7bd32b3ec7e3a4ec36cd847b 100644 (file)
@@ -408,8 +408,9 @@ static struct frame_unwind dummy_frame_unwind =
 };
 
 const struct frame_unwind *
-dummy_frame_p (CORE_ADDR pc)
+dummy_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   if (DEPRECATED_PC_IN_CALL_DUMMY_P ()
       ? DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0)
       : pc_in_dummy_frame (pc))
index ae090e3598d151be0a4e479bb97d8f737535a07f..cde9eb7f12f95759db89ee1d63ad1d357a06c10e 100644 (file)
@@ -48,7 +48,7 @@ struct frame_id;
 /* If the PC falls in a dummy frame, return a dummy frame
    unwinder.  */
 
-extern const struct frame_unwind *dummy_frame_p (CORE_ADDR pc);
+extern const struct frame_unwind *dummy_frame_sniffer (struct frame_info *next_frame);
 
 /* Does the PC fall in a dummy frame?
 
index 999cef7e6cdb6114d8d16ef88145d9f9c1b23ba4..6a40df5e32560938e635221e09d3ff867a7b2446 100644 (file)
@@ -36,6 +36,7 @@
 #include "gdb_assert.h"
 #include "gdb_string.h"
 
+#include "complaints.h"
 #include "dwarf2-frame.h"
 
 /* Call Frame Information (CFI).  */
@@ -490,15 +491,12 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
      done for "normal" frames and not for resume-type frames (signal
      handlers, sentinel frames, dummy frames).
 
-     We don't do what GCC's does here (yet).  It's not clear how
-     reliable the method is.  There's also a problem with finding the
-     right FDE; see the comment in dwarf_frame_p.  If dwarf_frame_p
-     selected this frame unwinder because it found the FDE for the
-     next function, using the adjusted return address might not yield
-     a FDE at all.  The problem isn't specific to DWARF CFI; other
-     unwinders loose in similar ways.  Therefore it's probably
-     acceptable to leave things slightly broken for now.  */
-  fs->pc = frame_pc_unwind (next_frame);
+     frame_unwind_address_in_block does just this.
+
+     It's not clear how reliable the method is though - there is the
+     potential for the register state pre-call being different to that
+     on return.  */
+  fs->pc = frame_unwind_address_in_block (next_frame);
 
   /* Find the correct FDE.  */
   fde = dwarf2_frame_find_fde (&fs->pc);
@@ -707,16 +705,13 @@ static const struct frame_unwind dwarf2_frame_unwind =
 };
 
 const struct frame_unwind *
-dwarf2_frame_p (CORE_ADDR pc)
+dwarf2_frame_sniffer (struct frame_info *next_frame)
 {
-  /* The way GDB works, this function can be called with PC just after
-     the last instruction of the function we're supposed to return the
-     unwind methods for.  In that case we won't find the correct FDE;
-     instead we find the FDE for the next function, or we won't find
-     an FDE at all.  There is a possible solution (see the comment in
-     dwarf2_frame_cache), GDB doesn't pass us enough information to
-     implement it.  */
-  if (dwarf2_frame_find_fde (&pc))
+  /* Grab an address that is guarenteed to reside somewhere within the
+     function.  frame_pc_unwind(), for a no-return next function, can
+     end up returning something past the end of this function's body.  */
+  CORE_ADDR block_addr = frame_unwind_address_in_block (next_frame);
+  if (dwarf2_frame_find_fde (&block_addr))
     return &dwarf2_frame_unwind;
 
   return NULL;
@@ -747,8 +742,9 @@ static const struct frame_base dwarf2_frame_base =
 };
 
 const struct frame_base *
-dwarf2_frame_base_p (CORE_ADDR pc)
+dwarf2_frame_base_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   if (dwarf2_frame_find_fde (&pc))
     return &dwarf2_frame_base;
 
@@ -1058,35 +1054,44 @@ add_fde (struct comp_unit *unit, struct dwarf2_fde *fde)
 #define DW64_CIE_ID ~0
 #endif
 
-/* Read a CIE or FDE in BUF and decode it.  */
+static char *decode_frame_entry (struct comp_unit *unit, char *start,
+                                int eh_frame_p);
 
+/* Decode the next CIE or FDE.  Return NULL if invalid input, otherwise
+   the next byte to be processed.  */
 static char *
-decode_frame_entry (struct comp_unit *unit, char *buf, int eh_frame_p)
+decode_frame_entry_1 (struct comp_unit *unit, char *start, int eh_frame_p)
 {
+  char *buf;
   LONGEST length;
   unsigned int bytes_read;
-  int dwarf64_p = 0;
-  ULONGEST cie_id = DW_CIE_ID;
+  int dwarf64_p;
+  ULONGEST cie_id;
   ULONGEST cie_pointer;
-  char *start = buf;
   char *end;
 
+  buf = start;
   length = read_initial_length (unit->abfd, buf, &bytes_read);
   buf += bytes_read;
   end = buf + length;
 
+  /* Are we still within the section? */
+  if (end > unit->dwarf_frame_buffer + unit->dwarf_frame_size)
+    return NULL;
+
   if (length == 0)
     return end;
 
-  if (bytes_read == 12)
-    dwarf64_p = 1;
+  /* Distinguish between 32 and 64-bit encoded frame info.  */
+  dwarf64_p = (bytes_read == 12);
 
-  /* In a .eh_frame section, zero is used to distinguish CIEs from
-     FDEs.  */
+  /* In a .eh_frame section, zero is used to distinguish CIEs from FDEs.  */
   if (eh_frame_p)
     cie_id = 0;
   else if (dwarf64_p)
     cie_id = DW64_CIE_ID;
+  else
+    cie_id = DW_CIE_ID;
 
   if (dwarf64_p)
     {
@@ -1124,7 +1129,8 @@ decode_frame_entry (struct comp_unit *unit, char *buf, int eh_frame_p)
       cie->encoding = encoding_for_size (unit->addr_size);
 
       /* Check version number.  */
-      gdb_assert (read_1_byte (unit->abfd, buf) == DW_CIE_VERSION);
+      if (read_1_byte (unit->abfd, buf) != DW_CIE_VERSION)
+       return NULL;
       buf += 1;
 
       /* Interpret the interesting bits of the augmentation.  */
@@ -1159,6 +1165,8 @@ decode_frame_entry (struct comp_unit *unit, char *buf, int eh_frame_p)
 
          length = read_unsigned_leb128 (unit->abfd, buf, &bytes_read);
          buf += bytes_read;
+         if (buf > end)
+           return NULL;
          cie->initial_instructions = buf + length;
          augmentation++;
        }
@@ -1211,16 +1219,20 @@ decode_frame_entry (struct comp_unit *unit, char *buf, int eh_frame_p)
       /* This is a FDE.  */
       struct dwarf2_fde *fde;
 
+      /* In an .eh_frame section, the CIE pointer is the delta between the
+        address within the FDE where the CIE pointer is stored and the
+        address of the CIE.  Convert it to an offset into the .eh_frame
+        section.  */
       if (eh_frame_p)
        {
-         /* In an .eh_frame section, the CIE pointer is the delta
-             between the address within the FDE where the CIE pointer
-             is stored and the address of the CIE.  Convert it to an
-             offset into the .eh_frame section.  */
          cie_pointer = buf - unit->dwarf_frame_buffer - cie_pointer;
          cie_pointer -= (dwarf64_p ? 8 : 4);
        }
 
+      /* In either case, validate the result is still within the section.  */
+      if (cie_pointer >= unit->dwarf_frame_size)
+       return NULL;
+
       fde = (struct dwarf2_fde *)
        obstack_alloc (&unit->objfile->psymbol_obstack,
                       sizeof (struct dwarf2_fde));
@@ -1252,6 +1264,8 @@ decode_frame_entry (struct comp_unit *unit, char *buf, int eh_frame_p)
 
          length = read_unsigned_leb128 (unit->abfd, buf, &bytes_read);
          buf += bytes_read + length;
+         if (buf > end)
+           return NULL;
        }
 
       fde->instructions = buf;
@@ -1262,6 +1276,99 @@ decode_frame_entry (struct comp_unit *unit, char *buf, int eh_frame_p)
 
   return end;
 }
+
+/* Read a CIE or FDE in BUF and decode it.  */
+static char *
+decode_frame_entry (struct comp_unit *unit, char *start, int eh_frame_p)
+{
+  enum { NONE, ALIGN4, ALIGN8, FAIL } workaround = NONE;
+  char *ret;
+  const char *msg;
+  ptrdiff_t start_offset;
+
+  while (1)
+    {
+      ret = decode_frame_entry_1 (unit, start, eh_frame_p);
+      if (ret != NULL)
+       break;
+
+      /* We have corrupt input data of some form.  */
+
+      /* ??? Try, weakly, to work around compiler/assembler/linker bugs
+        and mismatches wrt padding and alignment of debug sections.  */
+      /* Note that there is no requirement in the standard for any
+        alignment at all in the frame unwind sections.  Testing for
+        alignment before trying to interpret data would be incorrect.
+
+        However, GCC traditionally arranged for frame sections to be
+        sized such that the FDE length and CIE fields happen to be
+        aligned (in theory, for performance).  This, unfortunately,
+        was done with .align directives, which had the side effect of
+        forcing the section to be aligned by the linker.
+
+        This becomes a problem when you have some other producer that
+        creates frame sections that are not as strictly aligned.  That
+        produces a hole in the frame info that gets filled by the 
+        linker with zeros.
+
+        The GCC behaviour is arguably a bug, but it's effectively now
+        part of the ABI, so we're now stuck with it, at least at the
+        object file level.  A smart linker may decide, in the process
+        of compressing duplicate CIE information, that it can rewrite
+        the entire output section without this extra padding.  */
+
+      start_offset = start - unit->dwarf_frame_buffer;
+      if (workaround < ALIGN4 && (start_offset & 3) != 0)
+       {
+         start += 4 - (start_offset & 3);
+         workaround = ALIGN4;
+         continue;
+       }
+      if (workaround < ALIGN8 && (start_offset & 7) != 0)
+       {
+         start += 8 - (start_offset & 7);
+         workaround = ALIGN8;
+         continue;
+       }
+
+      /* Nothing left to try.  Arrange to return as if we've consumed
+        the entire input section.  Hopefully we'll get valid info from
+        the other of .debug_frame/.eh_frame.  */
+      workaround = FAIL;
+      ret = unit->dwarf_frame_buffer + unit->dwarf_frame_size;
+      break;
+    }
+
+  switch (workaround)
+    {
+    case NONE:
+      break;
+
+    case ALIGN4:
+      complaint (&symfile_complaints,
+                "Corrupt data in %s:%s; align 4 workaround apparently succeeded",
+                unit->dwarf_frame_section->owner->filename,
+                unit->dwarf_frame_section->name);
+      break;
+
+    case ALIGN8:
+      complaint (&symfile_complaints,
+                "Corrupt data in %s:%s; align 8 workaround apparently succeeded",
+                unit->dwarf_frame_section->owner->filename,
+                unit->dwarf_frame_section->name);
+      break;
+
+    default:
+      complaint (&symfile_complaints,
+                "Corrupt data in %s:%s",
+                unit->dwarf_frame_section->owner->filename,
+                unit->dwarf_frame_section->name);
+      break;
+    }
+
+  return ret;
+}
+
 \f
 
 /* FIXME: kettenis/20030504: This still needs to be integrated with
@@ -1307,9 +1414,9 @@ dwarf2_build_frame_info (struct objfile *objfile)
       unit.dwarf_frame_section = dwarf_eh_frame_section;
 
       /* FIXME: kettenis/20030602: This is the DW_EH_PE_datarel base
-         that for the i386/amd64 target, which currently is the only
-         target in GCC that supports/uses the DW_EH_PE_datarel
-         encoding.  */
+        that for the i386/amd64 target, which currently is the only
+        target in GCC that supports/uses the DW_EH_PE_datarel
+        encoding.  */
       got = bfd_get_section_by_name (unit.abfd, ".got");
       if (got)
        unit.dbase = got->vma;
index 4b4c1a5ab2f4ca4cc9700b4b18f9cc2320de25ba..c9c106ff0a9735afe97b9d6f15b178f2527b0c8c 100644 (file)
 #define DWARF2_FRAME_H 1
 
 struct objfile;
+struct frame_info;
 
 /* Return the frame unwind methods for the function that contains PC,
    or NULL if it can't be handled by DWARF CFI frame unwinder.  */
 
-const struct frame_unwind *dwarf2_frame_p (CORE_ADDR pc);
+const struct frame_unwind *dwarf2_frame_sniffer (struct frame_info *next_frame);
 
 /* Return the frame base methods for the function that contains PC, or
    NULL if it can't be handled by the DWARF CFI frame unwinder.  */
 
-const struct frame_base *dwarf2_frame_base_p (CORE_ADDR pc);
+const struct frame_base *dwarf2_frame_base_sniffer (struct frame_info *next_frame);
 
 /* Register the DWARF CFI for OBJFILE.  */
 
index aa391ebd6a5e0b698ee7e808351fdb16daaeec2d..3d1523b601009508f8b0d1a3e6d956b0eeb5b469 100644 (file)
@@ -641,6 +641,14 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr,
          break;
 
        case DW_OP_GNU_push_tls_address:
+         /* Variable is at a constant offset in the thread-local
+         storage block into the objfile for the current thread and
+         the dynamic linker module containing this expression. Here
+         we return returns the offset from that base.  The top of the
+         stack has the offset from the beginning of the thread
+         control block at which the variable is located.  Nothing
+         should follow this operator, so the top of stack would be
+         returned.  */
          result = dwarf_expr_fetch (ctx, 0);
          dwarf_expr_pop (ctx);
          result = (ctx->get_tls_address) (ctx->baton, result);
index bd0f2b90164b0ca35e36e0b5787138cb93fce1f1..782e6283c805cc73f4f8a5edefa1df0eb5fc2499 100644 (file)
@@ -29,6 +29,7 @@
 #include "ax.h"
 #include "ax-gdb.h"
 #include "regcache.h"
+#include "objfiles.h"
 
 #include "elf/dwarf2.h"
 #include "dwarf2expr.h"
@@ -185,6 +186,8 @@ dwarf_expr_tls_address (void *baton, CORE_ADDR offset)
     addr = target_get_thread_local_address (inferior_ptid,
                                            debaton->objfile,
                                            offset);
+  /* It wouldn't be wrong here to try a gdbarch method, too; finding
+     TLS is an ABI-specific thing.  But we don't do that yet.  */
   else
     error ("Cannot find thread-local variables on this target");
 
@@ -407,6 +410,34 @@ locexpr_describe_location (const struct symbol *symbol, struct ui_file *stream)
       return 1;
     }
 
+  /* The location expression for a TLS variable looks like this (on a
+     64-bit LE machine):
+
+     DW_AT_location    : 10 byte block: 3 4 0 0 0 0 0 0 0 e0
+                        (DW_OP_addr: 4; DW_OP_GNU_push_tls_address)
+     
+     0x3 is the encoding for DW_OP_addr, which has an operand as long
+     as the size of an address on the target machine (here is 8
+     bytes).  0xe0 is the encoding for DW_OP_GNU_push_tls_address.
+     The operand represents the offset at which the variable is within
+     the thread local storage.  */
+
+  if (dlbaton->size > 1 
+      && dlbaton->data[dlbaton->size - 1] == DW_OP_GNU_push_tls_address)
+    if (dlbaton->data[0] == DW_OP_addr)
+      {
+       int bytes_read;
+       CORE_ADDR offset = dwarf2_read_address (&dlbaton->data[1],
+                                               &dlbaton->data[dlbaton->size - 1],
+                                               &bytes_read);
+       fprintf_filtered (stream, 
+                         "a thread-local variable at offset %s in the "
+                         "thread-local storage for `%s'",
+                         paddr_nz (offset), dlbaton->objfile->name);
+       return 1;
+      }
+  
+
   fprintf_filtered (stream,
                    "a variable with complex or multiple locations (DWARF2)");
   return 1;
index b6b4d3325e1a9cc53fd2033bb51c0f565b954e74..321cb037528019e85e3ba03a3a5861e42c6cd018 100644 (file)
@@ -55,6 +55,10 @@ struct dwarf2_loclist_baton
   unsigned short size;
 
   /* The objfile containing the symbol whose location we're computing.  */
+  /* Used (only???) by thread local variables.  The objfile in which
+     this symbol is defined.  To find a thread-local variable (e.g., a
+     variable declared with the `__thread' storage class), we may need
+     to know which object file it's in.  */
   struct objfile *objfile;
 };
 
index 4f7f55581e8885c796e1d011a4ea520fba81aca7..ac94ebc91fe1339d1b6fe64dd1a263ac7426893e 100644 (file)
@@ -439,12 +439,6 @@ static int islocal;                /* Variable is at the returned offset
                                   this function, so we can't say
                                   which register it's relative to;
                                   use LOC_LOCAL.  */
-static int is_thread_local;     /* Variable is at a constant offset in the
-                                   thread-local storage block for the
-                                   current thread and the dynamic linker
-                                   module containing this expression.
-                                   decode_locdesc returns the offset from
-                                   that base.  */
 
 /* DW_AT_frame_base values for the current function.
    frame_base_reg is -1 if DW_AT_frame_base is missing, otherwise it
@@ -5629,32 +5623,10 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile,
          attr = dwarf_attr (die, DW_AT_location);
          if (attr)
            {
-             SYMBOL_VALUE (sym) =
-               decode_locdesc (DW_BLOCK (attr), objfile, cu_header);
-             if (isreg)
-               {
-                 SYMBOL_CLASS (sym) = LOC_REGPARM;
-                 SYMBOL_VALUE (sym) = 
-                   DWARF2_REG_TO_REGNUM (SYMBOL_VALUE (sym));
-               }
-             else if (offreg)
-               {
-                 if (isderef)
-                   {
-                     if (basereg != frame_base_reg)
-                       dwarf2_complex_location_expr_complaint ();
-                     SYMBOL_CLASS (sym) = LOC_REF_ARG;
-                   }
-                 else
-                   {
-                     SYMBOL_CLASS (sym) = LOC_BASEREG_ARG;
-                     SYMBOL_BASEREG (sym) = DWARF2_REG_TO_REGNUM (basereg);
-                   }
-               }
-             else
-               {
-                 SYMBOL_CLASS (sym) = LOC_ARG;
-               }
+             var_decode_location (attr, sym, objfile, cu_header);
+             /* FIXME drow/2003-07-31: Is LOC_COMPUTED_ARG necessary?  */
+             if (SYMBOL_CLASS (sym) == LOC_COMPUTED)
+               SYMBOL_CLASS (sym) = LOC_COMPUTED_ARG;
            }
          attr = dwarf_attr (die, DW_AT_const_value);
          if (attr)
@@ -7358,7 +7330,6 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
   offreg = 0;
   isderef = 0;
   islocal = 0;
-  is_thread_local = 0;
   optimized_out = 1;
 
   while (i < size)
@@ -7584,7 +7555,6 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
          break;
 
         case DW_OP_GNU_push_tls_address:
-          is_thread_local = 1;
          /* The top of the stack has the offset from the beginning
             of the thread control block at which the variable is located.  */
          /* Nothing should follow this operator, so the top of stack would
index ff766fb7c26da1fa1abffdf1685d398e4cafe389..a655797484fadfc40cb3a0817037b15b975439d2 100644 (file)
@@ -610,8 +610,9 @@ elf_symfile_read (struct objfile *objfile, int mainline)
                            ei.lnoffset, ei.lnsize);
     }
 
-  if (DWARF2_BUILD_FRAME_INFO_P ())
-    DWARF2_BUILD_FRAME_INFO(objfile);
+  /* FIXME: kettenis/20030504: This still needs to be integrated with
+     dwarf2read.c in a better way.  */
+  dwarf2_build_frame_info (objfile);
 }
 
 /* This cleans up the objfile's sym_stab_info pointer, and the chain of
index 56c2206ed9990ae02e9656e2e3e8d77076a64755..29610fbb5914294b76e35b7c10a0ad8cbb6b4154 100644 (file)
@@ -454,7 +454,7 @@ evaluate_subexp_standard (struct type *expect_type,
        (*pos) += 2;
        if (val == NULL)
          error ("Value of register %s not available.",
-                frame_map_regnum_to_name (regno));
+                frame_map_regnum_to_name (get_selected_frame (), regno));
        else
          return val;
       }
index 5ab324df758839b04c34b8f5284f51d22d2ac172..9db28fb38be4c768c946dc54ae241a05b68ac993 100644 (file)
@@ -612,7 +612,7 @@ command_line_handler (char *rl)
   if (annotation_level > 1 && instream == stdin)
     {
       printf_unfiltered ("\n\032\032post-");
-      printf_unfiltered (async_annotation_suffix);
+      puts_unfiltered (async_annotation_suffix);
       printf_unfiltered ("\n");
     }
 
index c2426110f7822876f67f1d158be4dc28ee0897b2..a5e8dccee55150d43ccfb7cac3fd5ecfa554de9b 100644 (file)
@@ -27,7 +27,7 @@
 #include "value.h"
 #include "language.h"
 #include "parser-defs.h"
-#include "frame.h"             /* For frame_map_regnum_to_name.  */
+#include "user-regs.h"         /* For user_reg_map_regnum_to_name.  */
 #include "target.h"
 #include "gdb_string.h"
 #include "block.h"
@@ -126,8 +126,10 @@ print_subexp (register struct expression *exp, register int *pos,
     case OP_REGISTER:
       {
        int regnum = longest_to_int (exp->elts[pc + 1].longconst);
+       const char *name = user_reg_map_regnum_to_name (current_gdbarch,
+                                                       regnum);
        (*pos) += 2;
-       fprintf_filtered (stream, "$%s", frame_map_regnum_to_name (regnum));
+       fprintf_filtered (stream, "$%s", name);
        return;
       }
 
index d379f424c700bd5df38bab89d06904f0326c601a..d776bfe4e58d6f5e316723d6844ea8d77832a7f4 100644 (file)
@@ -34,7 +34,7 @@
 #include "floatformat.h"
 #include "symfile.h"           /* for overlay functions */
 #include "regcache.h"
-#include "builtin-regs.h"
+#include "user-regs.h"
 #include "block.h"
 
 /* Basic byte-swapping routines.  GDB has needed these for a long time...
@@ -263,10 +263,10 @@ value_of_register (int regnum, struct frame_info *frame)
   char raw_buffer[MAX_REGISTER_SIZE];
   enum lval_type lval;
 
-  /* Builtin registers lie completly outside of the range of normal
+  /* User registers lie completly outside of the range of normal
      registers.  Catch them early so that the target never sees them.  */
   if (regnum >= NUM_REGS + NUM_PSEUDO_REGS)
-    return value_of_builtin_reg (regnum, frame);
+    return value_of_user_reg (regnum, frame);
 
   frame_register (frame, regnum, &optim, &lval, &addr, &realnum, raw_buffer);
 
@@ -512,20 +512,6 @@ addresses have not been bound by the dynamic loader. Try again when executable i
        break;
       }
 
-    case LOC_THREAD_LOCAL_STATIC:
-      {
-        if (target_get_thread_local_address_p ())
-          addr = target_get_thread_local_address (inferior_ptid,
-                                                  SYMBOL_OBJFILE (var),
-                                                  SYMBOL_VALUE_ADDRESS (var));
-        /* It wouldn't be wrong here to try a gdbarch method, too;
-           finding TLS is an ABI-specific thing.  But we don't do that
-           yet.  */
-        else
-          error ("Cannot find thread-local variables on this target");
-        break;
-      }
-
     case LOC_TYPEDEF:
       error ("Cannot look up value of a typedef");
       break;
index 0865a0ce6c9460d1a78e333afa46894a71aaec27..66a0106aa0b83b1cbf149cccb868429a4c1be122 100644 (file)
@@ -70,7 +70,7 @@ static struct gdbarch_data *frame_base_data;
 
 struct frame_base_table
 {
-  frame_base_p_ftype **p;
+  frame_base_sniffer_ftype **sniffer;
   const struct frame_base *default_base;
   int nr;
 };
@@ -83,15 +83,6 @@ frame_base_init (struct gdbarch *gdbarch)
   return table;
 }
 
-static void
-frame_base_free (struct gdbarch *gdbarch, void *data)
-{
-  struct frame_base_table *table =
-    gdbarch_data (gdbarch, frame_base_data);
-  xfree (table->p);
-  xfree (table);
-}
-
 static struct frame_base_table *
 frame_base_table (struct gdbarch *gdbarch)
 {
@@ -108,20 +99,22 @@ frame_base_table (struct gdbarch *gdbarch)
 
 /* Append a predicate to the end of the table.  */
 static void
-append_predicate (struct frame_base_table *table, frame_base_p_ftype *p)
+append_predicate (struct frame_base_table *table,
+                 frame_base_sniffer_ftype *sniffer)
 {
-  table->p = xrealloc (table->p, ((table->nr + 1)
-                                 * sizeof (frame_base_p_ftype *)));
-  table->p[table->nr] = p;
+  table->sniffer = xrealloc (table->sniffer,
+                            ((table->nr + 1)
+                             * sizeof (frame_base_sniffer_ftype *)));
+  table->sniffer[table->nr] = sniffer;
   table->nr++;
 }
 
 void
-frame_base_append_predicate (struct gdbarch *gdbarch,
-                            frame_base_p_ftype *p)
+frame_base_append_sniffer (struct gdbarch *gdbarch,
+                          frame_base_sniffer_ftype *sniffer)
 {
   struct frame_base_table *table = frame_base_table (gdbarch);
-  append_predicate (table, p);
+  append_predicate (table, sniffer);
 }
 
 void
@@ -133,13 +126,15 @@ frame_base_set_default (struct gdbarch *gdbarch,
 }
 
 const struct frame_base *
-frame_base_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
+frame_base_find_by_frame (struct frame_info *next_frame)
 {
-  int i;
+  struct gdbarch *gdbarch = get_frame_arch (next_frame);
   struct frame_base_table *table = frame_base_table (gdbarch);
+  int i;
   for (i = 0; i < table->nr; i++)
     {
-      const struct frame_base *desc = table->p[i] (pc);
+      const struct frame_base *desc = NULL;
+      desc = table->sniffer[i] (next_frame);
       if (desc != NULL)
        return desc;
     }
@@ -151,6 +146,5 @@ extern initialize_file_ftype _initialize_frame_base; /* -Wmissing-prototypes */
 void
 _initialize_frame_base (void)
 {
-  frame_base_data = register_gdbarch_data (frame_base_init,
-                                          frame_base_free);
+  frame_base_data = register_gdbarch_data (frame_base_init);
 }
index 5e0d5db2e25635712641dba06c040af803eb7d41..680e9d59ffb9b12d44579fdbf87a57d117facd5a 100644 (file)
@@ -29,30 +29,6 @@ struct frame_base;
 struct gdbarch;
 struct regcache;
 
-/* Return the frame base methods for the function that contains PC, or
-   NULL if it can't handle this frame.  */
-
-typedef const struct frame_base *(frame_base_p_ftype) (CORE_ADDR pc);
-
-/* Add a frame base handler to the list.  The predicates are polled in
-   the order that they are appended.  */
-
-extern void frame_base_append_predicate (struct gdbarch *gdbarch,
-                                        frame_base_p_ftype *p);
-
-/* Set the default frame base.  If all else fails, this one is
-   returned.  If this isn't set, the default is to use legacy code
-   that uses things like the frame ID's base (ulgh!).  */
-
-extern void frame_base_set_default (struct gdbarch *gdbarch,
-                                   const struct frame_base *def);
-
-/* Iterate through the list of frame base handlers until one returns
-   an implementation.  */
-
-extern const struct frame_base *frame_base_find_by_pc (struct gdbarch *gdbarch,
-                                                      CORE_ADDR pc);
-
 /* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
    and that this is a `normal frame'; use the NEXT frame, and its
    register unwind method, to determine the address of THIS frame's
@@ -91,4 +67,27 @@ struct frame_base
   frame_this_args_ftype *this_args;
 };
 
+/* Given the NEXT frame, return the frame base methods for THIS frame,
+   or NULL if it can't handle THIS frame.  */
+
+typedef const struct frame_base *(frame_base_sniffer_ftype) (struct frame_info *next_frame);
+
+/* Append a frame base sniffer to the list.  The sniffers are polled
+   in the order that they are appended.  */
+
+extern void frame_base_append_sniffer (struct gdbarch *gdbarch,
+                                      frame_base_sniffer_ftype *sniffer);
+
+/* Set the default frame base.  If all else fails, this one is
+   returned.  If this isn't set, the default is to use legacy code
+   that uses things like the frame ID's base (ulgh!).  */
+
+extern void frame_base_set_default (struct gdbarch *gdbarch,
+                                   const struct frame_base *def);
+
+/* Iterate through the list of frame base handlers until one returns
+   an implementation.  */
+
+extern const struct frame_base *frame_base_find_by_frame (struct frame_info *next_frame);
+
 #endif
index 921d30b31d5dad23bb4e0af68de51be14756c122..fc5a82122e4a9d0dd6a1a2354f897dd5e7c9707b 100644 (file)
@@ -29,18 +29,18 @@ static struct gdbarch_data *frame_unwind_data;
 
 struct frame_unwind_table
 {
-  frame_unwind_p_ftype **p;
-  int middle;
+  frame_unwind_sniffer_ftype **sniffer;
   int nr;
 };
 
 /* Append a predicate to the end of the table.  */
 static void
-append_predicate (struct frame_unwind_table *table, frame_unwind_p_ftype *p)
+append_predicate (struct frame_unwind_table *table,
+                 frame_unwind_sniffer_ftype *sniffer)
 {
-  table->p = xrealloc (table->p, ((table->nr + 1)
-                                 * sizeof (frame_unwind_p_ftype *)));
-  table->p[table->nr] = p;
+  table->sniffer = xrealloc (table->sniffer, ((table->nr + 1)
+                                             * sizeof (frame_unwind_sniffer_ftype *)));
+  table->sniffer[table->nr] = sniffer;
   table->nr++;
 }
 
@@ -48,22 +48,13 @@ static void *
 frame_unwind_init (struct gdbarch *gdbarch)
 {
   struct frame_unwind_table *table = XCALLOC (1, struct frame_unwind_table);
-  append_predicate (table, dummy_frame_p);
+  append_predicate (table, dummy_frame_sniffer);
   return table;
 }
 
-static void
-frame_unwind_free (struct gdbarch *gdbarch, void *data)
-{
-  struct frame_unwind_table *table =
-    gdbarch_data (gdbarch, frame_unwind_data);
-  xfree (table->p);
-  xfree (table);
-}
-
 void
-frame_unwind_append_predicate (struct gdbarch *gdbarch,
-                              frame_unwind_p_ftype *p)
+frame_unwind_append_sniffer (struct gdbarch *gdbarch,
+                            frame_unwind_sniffer_ftype *sniffer)
 {
   struct frame_unwind_table *table =
     gdbarch_data (gdbarch, frame_unwind_data);
@@ -74,15 +65,15 @@ frame_unwind_append_predicate (struct gdbarch *gdbarch,
       table = frame_unwind_init (gdbarch);
       set_gdbarch_data (gdbarch, frame_unwind_data, table);
     }
-  append_predicate (table, p);
+  append_predicate (table, sniffer);
 }
 
 const struct frame_unwind *
-frame_unwind_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
+frame_unwind_find_by_frame (struct frame_info *next_frame)
 {
   int i;
-  struct frame_unwind_table *table =
-    gdbarch_data (gdbarch, frame_unwind_data);
+  struct gdbarch *gdbarch = get_frame_arch (next_frame);
+  struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
   if (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
     /* Seriously old code.  Don't even try to use this new mechanism.
        (Note: The variable USE_GENERIC_DUMMY_FRAMES is deprecated, not
@@ -91,7 +82,8 @@ frame_unwind_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
     return legacy_saved_regs_unwind;
   for (i = 0; i < table->nr; i++)
     {
-      const struct frame_unwind *desc = table->p[i] (pc);
+      const struct frame_unwind *desc;
+      desc = table->sniffer[i] (next_frame);
       if (desc != NULL)
        return desc;
     }
@@ -103,6 +95,5 @@ extern initialize_file_ftype _initialize_frame_unwind; /* -Wmissing-prototypes *
 void
 _initialize_frame_unwind (void)
 {
-  frame_unwind_data = register_gdbarch_data (frame_unwind_init,
-                                            frame_unwind_free);
+  frame_unwind_data = register_gdbarch_data (frame_unwind_init);
 }
index ad1efdf353b3d548f44d4e8e44d1de3d95fc2f2c..8d17280fc9afa630293885479d324e299d9bb3ec 100644 (file)
@@ -30,25 +30,6 @@ struct regcache;
 
 #include "frame.h"             /* For enum frame_type.  */
 
-/* Return the frame unwind methods for the function that contains PC,
-   or NULL if this this unwinder can't handle this frame.  */
-
-typedef const struct frame_unwind *(frame_unwind_p_ftype) (CORE_ADDR pc);
-
-/* Add a frame unwinder to the list.  The predicates are polled in the
-   order that they are appended.  The initial list contains the dummy
-   frame's predicate.  */
-
-extern void frame_unwind_append_predicate (struct gdbarch *gdbarch,
-                                          frame_unwind_p_ftype *p);
-
-/* Iterate through the list of frame unwinders until one returns an
-   implementation.  */
-
-extern const struct frame_unwind *frame_unwind_find_by_pc (struct gdbarch
-                                                          *gdbarch,
-                                                          CORE_ADDR pc);
-
 /* The following unwind functions assume a chain of frames forming the
    sequence: (outer) prev <-> this <-> next (inner).  All the
    functions are called with called with the next frame's `struct
@@ -139,4 +120,22 @@ struct frame_unwind
   frame_prev_register_ftype *prev_register;
 };
 
+/* Given the NEXT frame, take a wiff of THIS frame's registers (namely
+   the PC and attributes) and if it is the applicable unwinder return
+   the unwind methods, or NULL if it is not.  */
+
+typedef const struct frame_unwind *(frame_unwind_sniffer_ftype) (struct frame_info *next_frame);
+
+/* Add a frame sniffer to the list.  The predicates are polled in the
+   order that they are appended.  The initial list contains the dummy
+   frame sniffer.  */
+
+extern void frame_unwind_append_sniffer (struct gdbarch *gdbarch,
+                                        frame_unwind_sniffer_ftype *sniffer);
+
+/* Iterate through the next frame's sniffers until one returns with an
+   unwinder implementation.  */
+
+extern const struct frame_unwind *frame_unwind_find_by_frame (struct frame_info *next_frame);
+
 #endif
index eadb77de4c433d2bc807ec82def29194d85f87dd..2b54ed78d5a16a9e743f71d47a9d9fc1e7e2f161 100644 (file)
@@ -28,7 +28,7 @@
 #include "regcache.h"
 #include "gdb_assert.h"
 #include "gdb_string.h"
-#include "builtin-regs.h"
+#include "user-regs.h"
 #include "gdb_obstack.h"
 #include "dummy-frame.h"
 #include "sentinel-frame.h"
@@ -229,8 +229,7 @@ get_frame_id (struct frame_info *fi)
       /* Find the unwinder.  */
       if (fi->unwind == NULL)
        {
-         fi->unwind = frame_unwind_find_by_pc (current_gdbarch,
-                                               get_frame_pc (fi));
+         fi->unwind = frame_unwind_find_by_frame (fi->next);
          /* FIXME: cagney/2003-04-02: Rather than storing the frame's
             type in the frame, the unwinder's type should be returned
             directly.  Unfortunatly, legacy code, called by
@@ -422,8 +421,11 @@ frame_func_unwind (struct frame_info *fi)
 {
   if (!fi->prev_func.p)
     {
+      /* Make certain that this, and not the adjacent, function is
+         found.  */
+      CORE_ADDR addr_in_block = frame_unwind_address_in_block (fi);
       fi->prev_func.p = 1;
-      fi->prev_func.addr = get_pc_function_start (frame_pc_unwind (fi));
+      fi->prev_func.addr = get_pc_function_start (addr_in_block);
       if (frame_debug)
        fprintf_unfiltered (gdb_stdlog,
                            "{ frame_func_unwind (fi=%d) -> 0x%s }\n",
@@ -497,7 +499,7 @@ frame_register_unwind (struct frame_info *frame, int regnum,
     {
       fprintf_unfiltered (gdb_stdlog,
                          "{ frame_register_unwind (frame=%d,regnum=\"%s\",...) ",
-                         frame->level, frame_map_regnum_to_name (regnum));
+                         frame->level, frame_map_regnum_to_name (frame, regnum));
     }
 
   /* Require all but BUFFERP to be valid.  A NULL BUFFERP indicates
@@ -517,8 +519,7 @@ frame_register_unwind (struct frame_info *frame, int regnum,
   /* Find the unwinder.  */
   if (frame->unwind == NULL)
     {
-      frame->unwind = frame_unwind_find_by_pc (current_gdbarch,
-                                              get_frame_pc (frame));
+      frame->unwind = frame_unwind_find_by_frame (frame->next);
       /* FIXME: cagney/2003-04-02: Rather than storing the frame's
         type in the frame, the unwinder's type should be returned
         directly.  Unfortunatly, legacy code, called by
@@ -546,7 +547,7 @@ frame_register_unwind (struct frame_info *frame, int regnum,
       else
        {
          int i;
-         const char *buf = bufferp;
+         const unsigned char *buf = bufferp;
          fprintf_unfiltered (gdb_stdlog, "[");
          for (i = 0; i < register_size (current_gdbarch, regnum); i++)
            fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
@@ -773,42 +774,15 @@ frame_register_read (struct frame_info *frame, int regnum, void *myaddr)
    includes builtin registers.  */
 
 int
-frame_map_name_to_regnum (const char *name, int len)
+frame_map_name_to_regnum (struct frame_info *frame, const char *name, int len)
 {
-  int i;
-
-  if (len < 0)
-    len = strlen (name);
-
-  /* Search register name space. */
-  for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
-    if (REGISTER_NAME (i) && len == strlen (REGISTER_NAME (i))
-       && strncmp (name, REGISTER_NAME (i), len) == 0)
-      {
-       return i;
-      }
-
-  /* Try builtin registers.  */
-  i = builtin_reg_map_name_to_regnum (name, len);
-  if (i >= 0)
-    {
-      /* A builtin register doesn't fall into the architecture's
-         register range.  */
-      gdb_assert (i >= NUM_REGS + NUM_PSEUDO_REGS);
-      return i;
-    }
-
-  return -1;
+  return user_reg_map_name_to_regnum (get_frame_arch (frame), name, len);
 }
 
 const char *
-frame_map_regnum_to_name (int regnum)
+frame_map_regnum_to_name (struct frame_info *frame, int regnum)
 {
-  if (regnum < 0)
-    return NULL;
-  if (regnum < NUM_REGS + NUM_PSEUDO_REGS)
-    return REGISTER_NAME (regnum);
-  return builtin_reg_map_regnum_to_name (regnum);
+  return user_reg_map_regnum_to_name (get_frame_arch (frame), regnum);
 }
 
 /* Create a sentinel frame.  */
@@ -1233,7 +1207,7 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
 
   /* Select/initialize both the unwind function and the frame's type
      based on the PC.  */
-  fi->unwind = frame_unwind_find_by_pc (current_gdbarch, pc);
+  fi->unwind = frame_unwind_find_by_frame (fi->next);
   if (fi->unwind->type != UNKNOWN_FRAME)
     fi->type = fi->unwind->type;
   else
@@ -1392,8 +1366,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
 
       /* Set the unwind functions based on that identified PC.  Ditto
          for the "type" but strongly prefer the unwinder's frame type.  */
-      prev->unwind = frame_unwind_find_by_pc (current_gdbarch,
-                                             get_frame_pc (prev));
+      prev->unwind = frame_unwind_find_by_frame (prev->next);
       if (prev->unwind->type == UNKNOWN_FRAME)
        prev->type = frame_type_from_pc (get_frame_pc (prev));
       else
@@ -1541,8 +1514,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
              to the new frame code.  Implement FRAME_CHAIN the way the
              new frame will.  */
          /* Find PREV frame's unwinder.  */
-         prev->unwind = frame_unwind_find_by_pc (current_gdbarch,
-                                                 frame_pc_unwind (this_frame));
+         prev->unwind = frame_unwind_find_by_frame (this_frame->next);
          /* FIXME: cagney/2003-04-02: Rather than storing the frame's
             type in the frame, the unwinder's type should be returned
             directly.  Unfortunatly, legacy code, called by
@@ -1703,8 +1675,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
      If there isn't a FRAME_CHAIN, the code above will have already
      done this.  */
   if (prev->unwind == NULL)
-    prev->unwind = frame_unwind_find_by_pc (current_gdbarch,
-                                           get_frame_pc (prev));
+    prev->unwind = frame_unwind_find_by_frame (prev->next);
 
   /* If the unwinder provides a frame type, use it.  Otherwize
      continue on to that heuristic mess.  */
@@ -1843,6 +1814,44 @@ get_prev_frame (struct frame_info *this_frame)
       return NULL;
     }
 
+  /* If we're already inside the entry function for the main objfile,
+     then it isn't valid.  Don't apply this test to a dummy frame -
+     dummy frame PC's typically land in the entry func.  Don't apply
+     this test to the sentinel frame.  Sentinel frames should always
+     be allowed to unwind.  */
+  /* NOTE: cagney/2003-02-25: Don't enable until someone has found
+     hard evidence that this is needed.  */
+  /* NOTE: cagney/2003-07-07: Fixed a bug in inside_main_func - wasn't
+     checking for "main" in the minimal symbols.  With that fixed
+     asm-source tests now stop in "main" instead of halting the
+     backtrace in wierd and wonderful ways somewhere inside the entry
+     file.  Suspect that inside_entry_file and inside_entry_func tests
+     were added to work around that (now fixed) case.  */
+  /* NOTE: cagney/2003-07-15: danielj (if I'm reading it right)
+     suggested having the inside_entry_func test use the
+     inside_main_func msymbol trick (along with entry_point_address I
+     guess) to determine the address range of the start function.
+     That should provide a far better stopper than the current
+     heuristics.  */
+  /* NOTE: cagney/2003-07-15: Need to add a "set backtrace
+     beyond-entry-func" command so that this can be selectively
+     disabled.  */
+  if (0
+#if 0
+      && backtrace_beyond_entry_func
+#endif
+      && this_frame->type != DUMMY_FRAME && this_frame->level >= 0
+      && inside_entry_func (get_frame_pc (this_frame)))
+    {
+      if (frame_debug)
+       {
+         fprintf_unfiltered (gdb_stdlog, "-> ");
+         fprint_frame (gdb_stdlog, NULL);
+         fprintf_unfiltered (gdb_stdlog, "// inside entry func }\n");
+       }
+      return NULL;
+    }
+
   /* Only try to do the unwind once.  */
   if (this_frame->prev_p)
     {
@@ -1890,26 +1899,6 @@ get_prev_frame (struct frame_info *this_frame)
     }
 #endif
 
-  /* If we're already inside the entry function for the main objfile,
-     then it isn't valid.  Don't apply this test to a dummy frame -
-     dummy frame PC's typically land in the entry func.  Don't apply
-     this test to the sentinel frame.  Sentinel frames should always
-     be allowed to unwind.  */
-  /* NOTE: cagney/2003-02-25: Don't enable until someone has found
-     hard evidence that this is needed.  */
-  if (0
-      && this_frame->type != DUMMY_FRAME && this_frame->level >= 0
-      && inside_entry_func (get_frame_pc (this_frame)))
-    {
-      if (frame_debug)
-       {
-         fprintf_unfiltered (gdb_stdlog, "-> ");
-         fprint_frame (gdb_stdlog, NULL);
-         fprintf_unfiltered (gdb_stdlog, "// inside entry func }\n");
-       }
-      return NULL;
-    }
-
   /* If any of the old frame initialization methods are around, use
      the legacy get_prev_frame method.  */
   if (legacy_frame_p (current_gdbarch))
@@ -1933,25 +1922,21 @@ get_prev_frame (struct frame_info *this_frame)
     }
 
   /* Check that this frame's ID isn't inner to (younger, below, next)
-     the next frame.  This happens when frame unwind goes backwards.
-     Since the sentinel frame isn't valid, don't apply this if this
-     frame is entier the inner-most or sentinel frame.  */
+     the next frame.  This happens when frame unwind goes backwards.
+     Since the sentinel frame doesn't really exist, don't compare the
+     inner-most against that sentinel.  */
   if (this_frame->level > 0
       && frame_id_inner (get_frame_id (this_frame),
                         get_frame_id (this_frame->next)))
-    error ("This frame inner-to next frame (corrupt stack?)");
-
-  /* Check that this and the next frame are different.  If they are
-     not, there is most likely a stack cycle.  As with the inner-than
-     test, avoid the inner-most and sentinel frames.  */
-  /* FIXME: cagney/2003-03-17: Can't yet enable this this check. The
-     frame_id_eq() method doesn't yet use function addresses when
-     comparing frame IDs.  */
-  if (0
-      && this_frame->level > 0
+    error ("Previous frame inner to this frame (corrupt stack?)");
+
+  /* Check that this and the next frame are not identical.  If they
+     are, there is most likely a stack cycle.  As with the inner-than
+     test above, avoid comparing the inner-most and sentinel frames.  */
+  if (this_frame->level > 0
       && frame_id_eq (get_frame_id (this_frame),
                      get_frame_id (this_frame->next)))
-    error ("This frame identical to next frame (corrupt stack?)");
+    error ("Previous frame identical to this frame (corrupt stack?)");
 
   /* Allocate the new frame but do not wire it in to the frame chain.
      Some (bad) code in INIT_FRAME_EXTRA_INFO tries to look along
@@ -2037,6 +2022,33 @@ get_frame_pc (struct frame_info *frame)
   return frame_pc_unwind (frame->next);
 }
 
+/* Return an address of that falls within the frame's code block.  */
+
+CORE_ADDR
+frame_unwind_address_in_block (struct frame_info *next_frame)
+{
+  /* A draft address.  */
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
+
+  /* If THIS frame is not inner most (i.e., NEXT isn't the sentinel),
+     and NEXT is `normal' (i.e., not a sigtramp, dummy, ....) THIS
+     frame's PC ends up pointing at the instruction fallowing the
+     "call".  Adjust that PC value so that it falls on the call
+     instruction (which, hopefully, falls within THIS frame's code
+     block.  So far it's proved to be a very good approximation.  See
+     get_frame_type for why ->type can't be used.  */
+  if (next_frame->level >= 0
+      && get_frame_type (next_frame) == NORMAL_FRAME)
+    --pc;
+  return pc;
+}
+
+CORE_ADDR
+get_frame_address_in_block (struct frame_info *this_frame)
+{
+  return frame_unwind_address_in_block (this_frame->next);
+}
+
 static int
 pc_notcurrent (struct frame_info *frame)
 {
@@ -2076,7 +2088,7 @@ get_frame_base_address (struct frame_info *fi)
   if (get_frame_type (fi) != NORMAL_FRAME)
     return 0;
   if (fi->base == NULL)
-    fi->base = frame_base_find_by_pc (current_gdbarch, get_frame_pc (fi));
+    fi->base = frame_base_find_by_frame (fi->next);
   /* Sneaky: If the low-level unwind and high-level base code share a
      common unwinder, let them share the prologue cache.  */
   if (fi->base->unwind == fi->unwind)
@@ -2092,7 +2104,7 @@ get_frame_locals_address (struct frame_info *fi)
     return 0;
   /* If there isn't a frame address method, find it.  */
   if (fi->base == NULL)
-    fi->base = frame_base_find_by_pc (current_gdbarch, get_frame_pc (fi));
+    fi->base = frame_base_find_by_frame (fi->next);
   /* Sneaky: If the low-level unwind and high-level base code share a
      common unwinder, let them share the prologue cache.  */
   if (fi->base->unwind == fi->unwind)
@@ -2110,7 +2122,7 @@ get_frame_args_address (struct frame_info *fi)
     return 0;
   /* If there isn't a frame address method, find it.  */
   if (fi->base == NULL)
-    fi->base = frame_base_find_by_pc (current_gdbarch, get_frame_pc (fi));
+    fi->base = frame_base_find_by_frame (fi->next);
   /* Sneaky: If the low-level unwind and high-level base code share a
      common unwinder, let them share the prologue cache.  */
   if (fi->base->unwind == fi->unwind)
@@ -2149,8 +2161,7 @@ get_frame_type (struct frame_info *frame)
     {
       /* Initialize the frame's unwinder because it is that which
          provides the frame's type.  */
-      frame->unwind = frame_unwind_find_by_pc (current_gdbarch,
-                                              get_frame_pc (frame));
+      frame->unwind = frame_unwind_find_by_frame (frame->next);
       /* FIXME: cagney/2003-04-02: Rather than storing the frame's
         type in the frame, the unwinder's type should be returned
         directly.  Unfortunatly, legacy code, called by
index 2208a3f767cb4159d8040702eded99dcb7d288f4..27a13dc6e01f42f906e581bc8c8f8a33c1bcc18b 100644 (file)
@@ -214,6 +214,22 @@ extern struct frame_info *frame_find_by_id (struct frame_id id);
    This replaced: frame->pc; */
 extern CORE_ADDR get_frame_pc (struct frame_info *);
 
+/* An address (not necessarily alligned to an instruction boundary)
+   that falls within THIS frame's code block.
+
+   When a function call is the last statement in a block, the return
+   address for the call may land at the start of the next block.
+   Similarly, if a no-return function call is the last statement in
+   the function, the return address may end up pointing beyond the
+   function, and possibly at the start of the next function.
+
+   These methods make an allowance for this.  For call frames, this
+   function returns the frame's PC-1 which "should" be an address in
+   the frame's block.  */
+
+extern CORE_ADDR get_frame_address_in_block (struct frame_info *this_frame);
+extern CORE_ADDR frame_unwind_address_in_block (struct frame_info *next_frame);
+
 /* The frame's inner-most bound.  AKA the stack-pointer.  Confusingly
    known as top-of-stack.  */
 
@@ -409,8 +425,10 @@ extern void put_frame_register (struct frame_info *frame, int regnum,
    includes builtin registers.  If NAMELEN is negative, use the NAME's
    length when doing the comparison.  */
 
-extern int frame_map_name_to_regnum (const char *name, int namelen);
-extern const char *frame_map_regnum_to_name (int regnum);
+extern int frame_map_name_to_regnum (struct frame_info *frame,
+                                    const char *name, int namelen);
+extern const char *frame_map_regnum_to_name (struct frame_info *frame,
+                                            int regnum);
 
 /* Unwind the PC.  Strictly speaking return the resume address of the
    calling frame.  For GDB, `pc' is the resume address and not a
@@ -524,8 +542,6 @@ extern struct block *get_selected_block (CORE_ADDR *addr_in_block);
 
 extern struct symbol *get_frame_function (struct frame_info *);
 
-extern CORE_ADDR frame_address_in_block (struct frame_info *);
-
 extern CORE_ADDR get_pc_function_start (CORE_ADDR);
 
 extern int frameless_look_for_prologue (struct frame_info *);
index 87585dd42c66625af50b1194b37fb548fbf1ae4c..b9aea09b8478aa27618e0abbf296158c77f5892c 100644 (file)
 #include "reggroups.h"
 #include "osabi.h"
 #include "symfile.h"           /* For entry_point_address.  */
+#include "gdb_obstack.h"
 
 /* Static function declarations */
 
 static void verify_gdbarch (struct gdbarch *gdbarch);
 static void alloc_gdbarch_data (struct gdbarch *);
-static void free_gdbarch_data (struct gdbarch *);
 static void init_gdbarch_swap (struct gdbarch *);
 static void clear_gdbarch_swap (struct gdbarch *);
 static void swapout_gdbarch_swap (struct gdbarch *);
@@ -92,6 +92,10 @@ struct gdbarch
 {
   /* Has this architecture been fully initialized?  */
   int initialized_p;
+
+  /* An obstack bound to the lifetime of the architecture.  */
+  struct obstack *obstack;
+
   /* basic architectural information */
   const struct bfd_arch_info * bfd_arch_info;
   int byte_order;
@@ -270,7 +274,6 @@ struct gdbarch
   gdbarch_sigtramp_end_ftype *sigtramp_end;
   gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
   gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
-  gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
   gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
   gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
   const char * name_of_malloc;
@@ -292,6 +295,7 @@ extern const struct bfd_arch_info bfd_default_arch_struct;
 struct gdbarch startup_gdbarch =
 {
   1, /* Always initialized.  */
+  NULL, /* The obstack.  */
   /* basic architecture information */
   &bfd_default_arch_struct,  /* bfd_arch_info */
   BFD_ENDIAN_BIG,  /* byte_order */
@@ -437,7 +441,6 @@ struct gdbarch startup_gdbarch =
   0,  /* sigtramp_end */
   generic_in_function_epilogue_p,  /* in_function_epilogue_p */
   construct_inferior_arguments,  /* construct_inferior_arguments */
-  0,  /* dwarf2_build_frame_info */
   0,  /* elf_make_msymbol_special */
   0,  /* coff_make_msymbol_special */
   "malloc",  /* name_of_malloc */
@@ -479,8 +482,15 @@ gdbarch_alloc (const struct gdbarch_info *info,
      architecture.  This ensures that the new architectures initial
      values are not influenced by the previous architecture.  Once
      everything is parameterised with gdbarch, this will go away.  */
-  struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
+  struct gdbarch *current_gdbarch;
+
+  /* Create an obstack for allocating all the per-architecture memory,
+     then use that to allocate the architecture vector.  */
+  struct obstack *obstack = XMALLOC (struct obstack);
+  obstack_init (obstack);
+  current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
   memset (current_gdbarch, 0, sizeof (*current_gdbarch));
+  current_gdbarch->obstack = obstack;
 
   alloc_gdbarch_data (current_gdbarch);
 
@@ -514,7 +524,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
   current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
   current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
   current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
-  current_gdbarch->register_name = legacy_register_name;
   current_gdbarch->deprecated_register_byte = generic_register_byte;
   current_gdbarch->deprecated_register_raw_size = generic_register_size;
   current_gdbarch->deprecated_register_virtual_size = generic_register_size;
@@ -569,6 +578,17 @@ gdbarch_alloc (const struct gdbarch_info *info,
 }
 
 
+/* Allocate extra space using the per-architecture obstack.  */
+
+void *
+gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
+{
+  void *data = obstack_alloc (arch->obstack, size);
+  memset (data, 0, size);
+  return data;
+}
+
+
 /* Free a gdbarch struct.  This should never happen in normal
    operation --- once you've created a gdbarch, you keep it around.
    However, if an architecture's init function encounters an error
@@ -578,9 +598,12 @@ gdbarch_alloc (const struct gdbarch_info *info,
 void
 gdbarch_free (struct gdbarch *arch)
 {
+  struct obstack *obstack;
   gdb_assert (arch != NULL);
-  free_gdbarch_data (arch);
-  xfree (arch);
+  gdb_assert (!arch->initialized_p);
+  obstack = arch->obstack;
+  obstack_free (obstack, 0); /* Includes the ARCH.  */
+  xfree (obstack);
 }
 
 
@@ -637,12 +660,11 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
   /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
   /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
-  /* Skip verify of register_name, invalid_p == 0 */
   /* Skip verify of register_type, has predicate */
   /* Skip verify of deprecated_register_virtual_type, has predicate */
   /* Skip verify of deprecated_register_byte, has predicate */
-  /* Skip verify of deprecated_register_raw_size, invalid_p == 0 */
-  /* Skip verify of deprecated_register_virtual_size, invalid_p == 0 */
+  /* Skip verify of deprecated_register_raw_size, has predicate */
+  /* Skip verify of deprecated_register_virtual_size, has predicate */
   /* Skip verify of deprecated_max_register_raw_size, has predicate */
   /* Skip verify of deprecated_max_register_virtual_size, has predicate */
   /* Skip verify of unwind_dummy_id, has predicate */
@@ -749,7 +771,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* Skip verify of sigtramp_end, has predicate */
   /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
   /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
-  /* Skip verify of dwarf2_build_frame_info, has predicate */
   /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
   /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
   /* Skip verify of name_of_malloc, invalid_p == 0 */
@@ -1689,29 +1710,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                       "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
                       DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
 #endif
-#ifdef DWARF2_BUILD_FRAME_INFO_P
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "DWARF2_BUILD_FRAME_INFO_P()",
-                      XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
-                      DWARF2_BUILD_FRAME_INFO_P ());
-#endif
-#ifdef DWARF2_BUILD_FRAME_INFO
-#if GDB_MULTI_ARCH
-  /* Macro might contain `[{}]' when not multi-arch */
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "DWARF2_BUILD_FRAME_INFO(objfile)",
-                      XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
-#endif
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
-                        (long) current_gdbarch->dwarf2_build_frame_info
-                        /*DWARF2_BUILD_FRAME_INFO ()*/);
-#endif
 #ifdef DWARF2_REG_TO_REGNUM
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -2147,6 +2145,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                         (long) current_gdbarch->register_name
                         /*REGISTER_NAME ()*/);
 #endif
+#ifdef REGISTER_RAW_SIZE_P
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "REGISTER_RAW_SIZE_P()",
+                      XSTRING (REGISTER_RAW_SIZE_P ()));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: REGISTER_RAW_SIZE_P() = %d\n",
+                      REGISTER_RAW_SIZE_P ());
+#endif
 #ifdef REGISTER_RAW_SIZE
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -2191,6 +2198,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
     fprintf_unfiltered (file,
                         "gdbarch_dump: register_type = 0x%08lx\n",
                         (long) current_gdbarch->register_type);
+#ifdef REGISTER_VIRTUAL_SIZE_P
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: %s # %s\n",
+                      "REGISTER_VIRTUAL_SIZE_P()",
+                      XSTRING (REGISTER_VIRTUAL_SIZE_P ()));
+  fprintf_unfiltered (file,
+                      "gdbarch_dump: REGISTER_VIRTUAL_SIZE_P() = %d\n",
+                      REGISTER_VIRTUAL_SIZE_P ());
+#endif
 #ifdef REGISTER_VIRTUAL_SIZE
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -2862,9 +2878,8 @@ int
 gdbarch_addr_bit (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->addr_bit == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_addr_bit invalid");
+  /* Check variable changed from pre-default.  */
+  gdb_assert (gdbarch->addr_bit != 0);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
   return gdbarch->addr_bit;
@@ -2898,9 +2913,8 @@ int
 gdbarch_char_signed (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->char_signed == -1)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_char_signed invalid");
+  /* Check variable changed from pre-default.  */
+  gdb_assert (gdbarch->char_signed != -1);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
   return gdbarch->char_signed;
@@ -2917,16 +2931,14 @@ int
 gdbarch_read_pc_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->read_pc != 0;
+  return gdbarch->read_pc != NULL;
 }
 
 CORE_ADDR
 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->read_pc == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_read_pc invalid");
+  gdb_assert (gdbarch->read_pc != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
   return gdbarch->read_pc (ptid);
@@ -2943,9 +2955,7 @@ void
 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->write_pc == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_write_pc invalid");
+  gdb_assert (gdbarch->write_pc != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
   gdbarch->write_pc (val, ptid);
@@ -2962,16 +2972,14 @@ int
 gdbarch_read_sp_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->read_sp != 0;
+  return gdbarch->read_sp != NULL;
 }
 
 CORE_ADDR
 gdbarch_read_sp (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->read_sp == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_read_sp invalid");
+  gdb_assert (gdbarch->read_sp != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
   return gdbarch->read_sp ();
@@ -2988,9 +2996,7 @@ void
 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->virtual_frame_pointer == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_virtual_frame_pointer invalid");
+  gdb_assert (gdbarch->virtual_frame_pointer != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
   gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
@@ -3007,16 +3013,14 @@ int
 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->pseudo_register_read != 0;
+  return gdbarch->pseudo_register_read != NULL;
 }
 
 void
 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->pseudo_register_read == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_pseudo_register_read invalid");
+  gdb_assert (gdbarch->pseudo_register_read != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
   gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
@@ -3033,16 +3037,14 @@ int
 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->pseudo_register_write != 0;
+  return gdbarch->pseudo_register_write != NULL;
 }
 
 void
 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->pseudo_register_write == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_pseudo_register_write invalid");
+  gdb_assert (gdbarch->pseudo_register_write != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
   gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
@@ -3059,9 +3061,8 @@ int
 gdbarch_num_regs (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->num_regs == -1)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_num_regs invalid");
+  /* Check variable changed from pre-default.  */
+  gdb_assert (gdbarch->num_regs != -1);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
   return gdbarch->num_regs;
@@ -3180,9 +3181,7 @@ int
 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->stab_reg_to_regnum == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_stab_reg_to_regnum invalid");
+  gdb_assert (gdbarch->stab_reg_to_regnum != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
   return gdbarch->stab_reg_to_regnum (stab_regnr);
@@ -3199,9 +3198,7 @@ int
 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->ecoff_reg_to_regnum == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
+  gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
   return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
@@ -3218,9 +3215,7 @@ int
 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->dwarf_reg_to_regnum == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
+  gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
   return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
@@ -3237,9 +3232,7 @@ int
 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->sdb_reg_to_regnum == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
+  gdb_assert (gdbarch->sdb_reg_to_regnum != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
   return gdbarch->sdb_reg_to_regnum (sdb_regnr);
@@ -3256,9 +3249,7 @@ int
 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->dwarf2_reg_to_regnum == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
+  gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
   return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
@@ -3275,9 +3266,7 @@ const char *
 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->register_name == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_register_name invalid");
+  gdb_assert (gdbarch->register_name != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
   return gdbarch->register_name (regnr);
@@ -3294,16 +3283,14 @@ int
 gdbarch_register_type_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->register_type != 0;
+  return gdbarch->register_type != NULL;
 }
 
 struct type *
 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->register_type == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_register_type invalid");
+  gdb_assert (gdbarch->register_type != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
   return gdbarch->register_type (gdbarch, reg_nr);
@@ -3320,16 +3307,14 @@ int
 gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_register_virtual_type != 0;
+  return gdbarch->deprecated_register_virtual_type != NULL;
 }
 
 struct type *
 gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_register_virtual_type == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_register_virtual_type invalid");
+  gdb_assert (gdbarch->deprecated_register_virtual_type != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
   return gdbarch->deprecated_register_virtual_type (reg_nr);
@@ -3369,10 +3354,8 @@ int
 gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_register_byte == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_register_byte invalid");
-  /* Ignore predicate (gdbarch->deprecated_register_byte != generic_register_byte).  */
+  gdb_assert (gdbarch->deprecated_register_byte != NULL);
+  /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call.  */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
   return gdbarch->deprecated_register_byte (reg_nr);
@@ -3385,13 +3368,19 @@ set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
   gdbarch->deprecated_register_byte = deprecated_register_byte;
 }
 
+int
+gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->deprecated_register_raw_size != generic_register_size;
+}
+
 int
 gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_register_raw_size == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_register_raw_size invalid");
+  gdb_assert (gdbarch->deprecated_register_raw_size != NULL);
+  /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call.  */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
   return gdbarch->deprecated_register_raw_size (reg_nr);
@@ -3404,13 +3393,19 @@ set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
   gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
 }
 
+int
+gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch)
+{
+  gdb_assert (gdbarch != NULL);
+  return gdbarch->deprecated_register_virtual_size != generic_register_size;
+}
+
 int
 gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_register_virtual_size == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_register_virtual_size invalid");
+  gdb_assert (gdbarch->deprecated_register_virtual_size != NULL);
+  /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call.  */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
   return gdbarch->deprecated_register_virtual_size (reg_nr);
@@ -3473,16 +3468,14 @@ int
 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->unwind_dummy_id != 0;
+  return gdbarch->unwind_dummy_id != NULL;
 }
 
 struct frame_id
 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->unwind_dummy_id == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_unwind_dummy_id invalid");
+  gdb_assert (gdbarch->unwind_dummy_id != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
   return gdbarch->unwind_dummy_id (gdbarch, info);
@@ -3499,16 +3492,14 @@ int
 gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_save_dummy_frame_tos != 0;
+  return gdbarch->deprecated_save_dummy_frame_tos != NULL;
 }
 
 void
 gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_save_dummy_frame_tos == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_save_dummy_frame_tos invalid");
+  gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
   gdbarch->deprecated_save_dummy_frame_tos (sp);
@@ -3542,16 +3533,14 @@ int
 gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_target_read_fp != 0;
+  return gdbarch->deprecated_target_read_fp != NULL;
 }
 
 CORE_ADDR
 gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_target_read_fp == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_target_read_fp invalid");
+  gdb_assert (gdbarch->deprecated_target_read_fp != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
   return gdbarch->deprecated_target_read_fp ();
@@ -3568,16 +3557,14 @@ int
 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->push_dummy_call != 0;
+  return gdbarch->push_dummy_call != NULL;
 }
 
 CORE_ADDR
 gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->push_dummy_call == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_push_dummy_call invalid");
+  gdb_assert (gdbarch->push_dummy_call != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
   return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
@@ -3594,16 +3581,14 @@ int
 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_push_arguments != 0;
+  return gdbarch->deprecated_push_arguments != NULL;
 }
 
 CORE_ADDR
 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_push_arguments == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_push_arguments invalid");
+  gdb_assert (gdbarch->deprecated_push_arguments != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
   return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
@@ -3637,16 +3622,14 @@ int
 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_push_return_address != 0;
+  return gdbarch->deprecated_push_return_address != NULL;
 }
 
 CORE_ADDR
 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_push_return_address == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_push_return_address invalid");
+  gdb_assert (gdbarch->deprecated_push_return_address != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
   return gdbarch->deprecated_push_return_address (pc, sp);
@@ -3663,16 +3646,14 @@ int
 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_dummy_write_sp != 0;
+  return gdbarch->deprecated_dummy_write_sp != NULL;
 }
 
 void
 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_dummy_write_sp == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
+  gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
   gdbarch->deprecated_dummy_write_sp (val);
@@ -3722,9 +3703,7 @@ CORE_ADDR
 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->call_dummy_address == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_call_dummy_address invalid");
+  gdb_assert (gdbarch->call_dummy_address != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
   return gdbarch->call_dummy_address ();
@@ -3846,16 +3825,14 @@ int
 gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_fix_call_dummy != 0;
+  return gdbarch->deprecated_fix_call_dummy != NULL;
 }
 
 void
 gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_fix_call_dummy == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_fix_call_dummy invalid");
+  gdb_assert (gdbarch->deprecated_fix_call_dummy != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n");
   gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
@@ -3872,16 +3849,14 @@ int
 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->push_dummy_code != 0;
+  return gdbarch->push_dummy_code != NULL;
 }
 
 CORE_ADDR
 gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->push_dummy_code == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_push_dummy_code invalid");
+  gdb_assert (gdbarch->push_dummy_code != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n");
   return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr);
@@ -3898,16 +3873,14 @@ int
 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_push_dummy_frame != 0;
+  return gdbarch->deprecated_push_dummy_frame != NULL;
 }
 
 void
 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_push_dummy_frame == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
+  gdb_assert (gdbarch->deprecated_push_dummy_frame != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
   gdbarch->deprecated_push_dummy_frame ();
@@ -3941,16 +3914,14 @@ int
 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_do_registers_info != 0;
+  return gdbarch->deprecated_do_registers_info != NULL;
 }
 
 void
 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_do_registers_info == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_do_registers_info invalid");
+  gdb_assert (gdbarch->deprecated_do_registers_info != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
   gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
@@ -3967,9 +3938,7 @@ void
 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->print_registers_info == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_print_registers_info invalid");
+  gdb_assert (gdbarch->print_registers_info != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
   gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
@@ -3986,16 +3955,14 @@ int
 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->print_float_info != 0;
+  return gdbarch->print_float_info != NULL;
 }
 
 void
 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->print_float_info == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_print_float_info invalid");
+  gdb_assert (gdbarch->print_float_info != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
   gdbarch->print_float_info (gdbarch, file, frame, args);
@@ -4012,16 +3979,14 @@ int
 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->print_vector_info != 0;
+  return gdbarch->print_vector_info != NULL;
 }
 
 void
 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->print_vector_info == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_print_vector_info invalid");
+  gdb_assert (gdbarch->print_vector_info != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
   gdbarch->print_vector_info (gdbarch, file, frame, args);
@@ -4038,9 +4003,7 @@ int
 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->register_sim_regno == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_register_sim_regno invalid");
+  gdb_assert (gdbarch->register_sim_regno != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
   return gdbarch->register_sim_regno (reg_nr);
@@ -4057,16 +4020,14 @@ int
 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->register_bytes_ok != 0;
+  return gdbarch->register_bytes_ok != NULL;
 }
 
 int
 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->register_bytes_ok == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_register_bytes_ok invalid");
+  gdb_assert (gdbarch->register_bytes_ok != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
   return gdbarch->register_bytes_ok (nr_bytes);
@@ -4083,9 +4044,7 @@ int
 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->cannot_fetch_register == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_cannot_fetch_register invalid");
+  gdb_assert (gdbarch->cannot_fetch_register != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
   return gdbarch->cannot_fetch_register (regnum);
@@ -4102,9 +4061,7 @@ int
 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->cannot_store_register == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_cannot_store_register invalid");
+  gdb_assert (gdbarch->cannot_store_register != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
   return gdbarch->cannot_store_register (regnum);
@@ -4121,16 +4078,14 @@ int
 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->get_longjmp_target != 0;
+  return gdbarch->get_longjmp_target != NULL;
 }
 
 int
 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->get_longjmp_target == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_get_longjmp_target invalid");
+  gdb_assert (gdbarch->get_longjmp_target != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
   return gdbarch->get_longjmp_target (pc);
@@ -4154,10 +4109,8 @@ int
 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_pc_in_call_dummy == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
-  /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy).  */
+  gdb_assert (gdbarch->deprecated_pc_in_call_dummy != NULL);
+  /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy, allow call.  */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
   return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
@@ -4174,16 +4127,14 @@ int
 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_init_frame_pc_first != 0;
+  return gdbarch->deprecated_init_frame_pc_first != NULL;
 }
 
 CORE_ADDR
 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_init_frame_pc_first == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
+  gdb_assert (gdbarch->deprecated_init_frame_pc_first != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
   return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
@@ -4200,16 +4151,14 @@ int
 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_init_frame_pc != 0;
+  return gdbarch->deprecated_init_frame_pc != NULL;
 }
 
 CORE_ADDR
 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_init_frame_pc == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
+  gdb_assert (gdbarch->deprecated_init_frame_pc != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
   return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
@@ -4258,16 +4207,14 @@ int
 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_get_saved_register != 0;
+  return gdbarch->deprecated_get_saved_register != NULL;
 }
 
 void
 gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_get_saved_register == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_get_saved_register invalid");
+  gdb_assert (gdbarch->deprecated_get_saved_register != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
   gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
@@ -4284,9 +4231,7 @@ int
 gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_register_convertible == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_register_convertible invalid");
+  gdb_assert (gdbarch->deprecated_register_convertible != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n");
   return gdbarch->deprecated_register_convertible (nr);
@@ -4303,9 +4248,7 @@ void
 gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_register_convert_to_virtual == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_register_convert_to_virtual invalid");
+  gdb_assert (gdbarch->deprecated_register_convert_to_virtual != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n");
   gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to);
@@ -4322,9 +4265,7 @@ void
 gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_register_convert_to_raw == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_register_convert_to_raw invalid");
+  gdb_assert (gdbarch->deprecated_register_convert_to_raw != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n");
   gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to);
@@ -4341,9 +4282,7 @@ int
 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->convert_register_p == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_convert_register_p invalid");
+  gdb_assert (gdbarch->convert_register_p != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
   return gdbarch->convert_register_p (regnum, type);
@@ -4360,9 +4299,7 @@ void
 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->register_to_value == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_register_to_value invalid");
+  gdb_assert (gdbarch->register_to_value != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
   gdbarch->register_to_value (frame, regnum, type, buf);
@@ -4379,9 +4316,7 @@ void
 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->value_to_register == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_value_to_register invalid");
+  gdb_assert (gdbarch->value_to_register != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
   gdbarch->value_to_register (frame, regnum, type, buf);
@@ -4398,9 +4333,7 @@ CORE_ADDR
 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->pointer_to_address == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_pointer_to_address invalid");
+  gdb_assert (gdbarch->pointer_to_address != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
   return gdbarch->pointer_to_address (type, buf);
@@ -4417,9 +4350,7 @@ void
 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->address_to_pointer == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_address_to_pointer invalid");
+  gdb_assert (gdbarch->address_to_pointer != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
   gdbarch->address_to_pointer (type, buf, addr);
@@ -4436,16 +4367,14 @@ int
 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->integer_to_address != 0;
+  return gdbarch->integer_to_address != NULL;
 }
 
 CORE_ADDR
 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->integer_to_address == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_integer_to_address invalid");
+  gdb_assert (gdbarch->integer_to_address != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
   return gdbarch->integer_to_address (type, buf);
@@ -4462,9 +4391,7 @@ int
 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->return_value_on_stack == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_return_value_on_stack invalid");
+  gdb_assert (gdbarch->return_value_on_stack != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
   return gdbarch->return_value_on_stack (type);
@@ -4481,16 +4408,14 @@ int
 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_pop_frame != 0;
+  return gdbarch->deprecated_pop_frame != NULL;
 }
 
 void
 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_pop_frame == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_pop_frame invalid");
+  gdb_assert (gdbarch->deprecated_pop_frame != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
   gdbarch->deprecated_pop_frame ();
@@ -4507,16 +4432,14 @@ int
 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_store_struct_return != 0;
+  return gdbarch->deprecated_store_struct_return != NULL;
 }
 
 void
 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_store_struct_return == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_store_struct_return invalid");
+  gdb_assert (gdbarch->deprecated_store_struct_return != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
   gdbarch->deprecated_store_struct_return (addr, sp);
@@ -4533,9 +4456,7 @@ void
 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->extract_return_value == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_extract_return_value invalid");
+  gdb_assert (gdbarch->extract_return_value != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
   gdbarch->extract_return_value (type, regcache, valbuf);
@@ -4552,9 +4473,7 @@ void
 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->store_return_value == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_store_return_value invalid");
+  gdb_assert (gdbarch->store_return_value != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
   gdbarch->store_return_value (type, regcache, valbuf);
@@ -4571,9 +4490,7 @@ void
 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_extract_return_value == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_extract_return_value invalid");
+  gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
   gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
@@ -4590,9 +4507,7 @@ void
 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_store_return_value == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_store_return_value invalid");
+  gdb_assert (gdbarch->deprecated_store_return_value != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
   gdbarch->deprecated_store_return_value (type, valbuf);
@@ -4609,16 +4524,14 @@ int
 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->extract_struct_value_address != 0;
+  return gdbarch->extract_struct_value_address != NULL;
 }
 
 CORE_ADDR
 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->extract_struct_value_address == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_extract_struct_value_address invalid");
+  gdb_assert (gdbarch->extract_struct_value_address != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
   return gdbarch->extract_struct_value_address (regcache);
@@ -4635,16 +4548,14 @@ int
 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_extract_struct_value_address != 0;
+  return gdbarch->deprecated_extract_struct_value_address != NULL;
 }
 
 CORE_ADDR
 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_extract_struct_value_address == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
+  gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
   return gdbarch->deprecated_extract_struct_value_address (regbuf);
@@ -4661,9 +4572,7 @@ int
 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->use_struct_convention == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_use_struct_convention invalid");
+  gdb_assert (gdbarch->use_struct_convention != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
   return gdbarch->use_struct_convention (gcc_p, value_type);
@@ -4680,16 +4589,14 @@ int
 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_frame_init_saved_regs != 0;
+  return gdbarch->deprecated_frame_init_saved_regs != NULL;
 }
 
 void
 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_frame_init_saved_regs == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
+  gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
   gdbarch->deprecated_frame_init_saved_regs (frame);
@@ -4706,16 +4613,14 @@ int
 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_init_extra_frame_info != 0;
+  return gdbarch->deprecated_init_extra_frame_info != NULL;
 }
 
 void
 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_init_extra_frame_info == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
+  gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
   gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
@@ -4732,9 +4637,7 @@ CORE_ADDR
 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->skip_prologue == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_skip_prologue invalid");
+  gdb_assert (gdbarch->skip_prologue != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
   return gdbarch->skip_prologue (ip);
@@ -4751,9 +4654,7 @@ int
 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->prologue_frameless_p == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_prologue_frameless_p invalid");
+  gdb_assert (gdbarch->prologue_frameless_p != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
   return gdbarch->prologue_frameless_p (ip);
@@ -4770,9 +4671,7 @@ int
 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->inner_than == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_inner_than invalid");
+  gdb_assert (gdbarch->inner_than != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
   return gdbarch->inner_than (lhs, rhs);
@@ -4789,9 +4688,7 @@ const unsigned char *
 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->breakpoint_from_pc == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_breakpoint_from_pc invalid");
+  gdb_assert (gdbarch->breakpoint_from_pc != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
   return gdbarch->breakpoint_from_pc (pcptr, lenptr);
@@ -4808,9 +4705,7 @@ int
 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->memory_insert_breakpoint == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_memory_insert_breakpoint invalid");
+  gdb_assert (gdbarch->memory_insert_breakpoint != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
   return gdbarch->memory_insert_breakpoint (addr, contents_cache);
@@ -4827,9 +4722,7 @@ int
 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->memory_remove_breakpoint == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_memory_remove_breakpoint invalid");
+  gdb_assert (gdbarch->memory_remove_breakpoint != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
   return gdbarch->memory_remove_breakpoint (addr, contents_cache);
@@ -4846,9 +4739,8 @@ CORE_ADDR
 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->decr_pc_after_break == -1)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_decr_pc_after_break invalid");
+  /* Check variable changed from pre-default.  */
+  gdb_assert (gdbarch->decr_pc_after_break != -1);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
   return gdbarch->decr_pc_after_break;
@@ -4865,9 +4757,8 @@ CORE_ADDR
 gdbarch_function_start_offset (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->function_start_offset == -1)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_function_start_offset invalid");
+  /* Check variable changed from pre-default.  */
+  gdb_assert (gdbarch->function_start_offset != -1);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
   return gdbarch->function_start_offset;
@@ -4884,9 +4775,7 @@ void
 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->remote_translate_xfer_address == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_remote_translate_xfer_address invalid");
+  gdb_assert (gdbarch->remote_translate_xfer_address != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
   gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
@@ -4903,9 +4792,8 @@ CORE_ADDR
 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->frame_args_skip == -1)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_frame_args_skip invalid");
+  /* Check variable changed from pre-default.  */
+  gdb_assert (gdbarch->frame_args_skip != -1);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
   return gdbarch->frame_args_skip;
@@ -4922,9 +4810,7 @@ int
 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->frameless_function_invocation == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_frameless_function_invocation invalid");
+  gdb_assert (gdbarch->frameless_function_invocation != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
   return gdbarch->frameless_function_invocation (fi);
@@ -4941,16 +4827,14 @@ int
 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_frame_chain != 0;
+  return gdbarch->deprecated_frame_chain != NULL;
 }
 
 CORE_ADDR
 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_frame_chain == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_frame_chain invalid");
+  gdb_assert (gdbarch->deprecated_frame_chain != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
   return gdbarch->deprecated_frame_chain (frame);
@@ -4967,16 +4851,14 @@ int
 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_frame_chain_valid != 0;
+  return gdbarch->deprecated_frame_chain_valid != NULL;
 }
 
 int
 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_frame_chain_valid == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
+  gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
   return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
@@ -4993,16 +4875,14 @@ int
 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_frame_saved_pc != 0;
+  return gdbarch->deprecated_frame_saved_pc != NULL;
 }
 
 CORE_ADDR
 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_frame_saved_pc == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
+  gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
   return gdbarch->deprecated_frame_saved_pc (fi);
@@ -5019,16 +4899,14 @@ int
 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->unwind_pc != 0;
+  return gdbarch->unwind_pc != NULL;
 }
 
 CORE_ADDR
 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->unwind_pc == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_unwind_pc invalid");
+  gdb_assert (gdbarch->unwind_pc != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
   return gdbarch->unwind_pc (gdbarch, next_frame);
@@ -5045,16 +4923,14 @@ int
 gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->unwind_sp != 0;
+  return gdbarch->unwind_sp != NULL;
 }
 
 CORE_ADDR
 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->unwind_sp == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_unwind_sp invalid");
+  gdb_assert (gdbarch->unwind_sp != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
   return gdbarch->unwind_sp (gdbarch, next_frame);
@@ -5078,10 +4954,8 @@ CORE_ADDR
 gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_frame_args_address == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_frame_args_address invalid");
-  /* Ignore predicate (gdbarch->deprecated_frame_args_address != get_frame_base).  */
+  gdb_assert (gdbarch->deprecated_frame_args_address != NULL);
+  /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call.  */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
   return gdbarch->deprecated_frame_args_address (fi);
@@ -5105,10 +4979,8 @@ CORE_ADDR
 gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_frame_locals_address == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_frame_locals_address invalid");
-  /* Ignore predicate (gdbarch->deprecated_frame_locals_address != get_frame_base).  */
+  gdb_assert (gdbarch->deprecated_frame_locals_address != NULL);
+  /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call.  */
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
   return gdbarch->deprecated_frame_locals_address (fi);
@@ -5125,16 +4997,14 @@ int
 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_saved_pc_after_call != 0;
+  return gdbarch->deprecated_saved_pc_after_call != NULL;
 }
 
 CORE_ADDR
 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->deprecated_saved_pc_after_call == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
+  gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
   return gdbarch->deprecated_saved_pc_after_call (frame);
@@ -5151,16 +5021,14 @@ int
 gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->frame_num_args != 0;
+  return gdbarch->frame_num_args != NULL;
 }
 
 int
 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->frame_num_args == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_frame_num_args invalid");
+  gdb_assert (gdbarch->frame_num_args != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
   return gdbarch->frame_num_args (frame);
@@ -5177,16 +5045,14 @@ int
 gdbarch_stack_align_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->stack_align != 0;
+  return gdbarch->stack_align != NULL;
 }
 
 CORE_ADDR
 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->stack_align == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_stack_align invalid");
+  gdb_assert (gdbarch->stack_align != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
   return gdbarch->stack_align (sp);
@@ -5203,16 +5069,14 @@ int
 gdbarch_frame_align_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->frame_align != 0;
+  return gdbarch->frame_align != NULL;
 }
 
 CORE_ADDR
 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->frame_align == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_frame_align invalid");
+  gdb_assert (gdbarch->frame_align != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
   return gdbarch->frame_align (gdbarch, address);
@@ -5229,16 +5093,14 @@ int
 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->reg_struct_has_addr != 0;
+  return gdbarch->reg_struct_has_addr != NULL;
 }
 
 int
 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->reg_struct_has_addr == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_reg_struct_has_addr invalid");
+  gdb_assert (gdbarch->reg_struct_has_addr != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
   return gdbarch->reg_struct_has_addr (gcc_p, type);
@@ -5319,9 +5181,7 @@ CORE_ADDR
 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->convert_from_func_ptr_addr == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
+  gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
   return gdbarch->convert_from_func_ptr_addr (addr);
@@ -5338,9 +5198,7 @@ CORE_ADDR
 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->addr_bits_remove == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_addr_bits_remove invalid");
+  gdb_assert (gdbarch->addr_bits_remove != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
   return gdbarch->addr_bits_remove (addr);
@@ -5357,9 +5215,7 @@ CORE_ADDR
 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->smash_text_address == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_smash_text_address invalid");
+  gdb_assert (gdbarch->smash_text_address != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
   return gdbarch->smash_text_address (addr);
@@ -5376,16 +5232,14 @@ int
 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->software_single_step != 0;
+  return gdbarch->software_single_step != NULL;
 }
 
 void
 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->software_single_step == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_software_single_step invalid");
+  gdb_assert (gdbarch->software_single_step != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
   gdbarch->software_single_step (sig, insert_breakpoints_p);
@@ -5402,9 +5256,7 @@ int
 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->print_insn == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_print_insn invalid");
+  gdb_assert (gdbarch->print_insn != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
   return gdbarch->print_insn (vma, info);
@@ -5421,9 +5273,7 @@ CORE_ADDR
 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->skip_trampoline_code == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_skip_trampoline_code invalid");
+  gdb_assert (gdbarch->skip_trampoline_code != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
   return gdbarch->skip_trampoline_code (pc);
@@ -5440,9 +5290,7 @@ int
 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->in_solib_call_trampoline == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_in_solib_call_trampoline invalid");
+  gdb_assert (gdbarch->in_solib_call_trampoline != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
   return gdbarch->in_solib_call_trampoline (pc, name);
@@ -5459,9 +5307,7 @@ int
 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->in_solib_return_trampoline == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_in_solib_return_trampoline invalid");
+  gdb_assert (gdbarch->in_solib_return_trampoline != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
   return gdbarch->in_solib_return_trampoline (pc, name);
@@ -5478,9 +5324,7 @@ int
 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->pc_in_sigtramp == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_pc_in_sigtramp invalid");
+  gdb_assert (gdbarch->pc_in_sigtramp != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
   return gdbarch->pc_in_sigtramp (pc, name);
@@ -5497,16 +5341,14 @@ int
 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->sigtramp_start != 0;
+  return gdbarch->sigtramp_start != NULL;
 }
 
 CORE_ADDR
 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->sigtramp_start == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_sigtramp_start invalid");
+  gdb_assert (gdbarch->sigtramp_start != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
   return gdbarch->sigtramp_start (pc);
@@ -5523,16 +5365,14 @@ int
 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->sigtramp_end != 0;
+  return gdbarch->sigtramp_end != NULL;
 }
 
 CORE_ADDR
 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->sigtramp_end == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_sigtramp_end invalid");
+  gdb_assert (gdbarch->sigtramp_end != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
   return gdbarch->sigtramp_end (pc);
@@ -5549,9 +5389,7 @@ int
 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->in_function_epilogue_p == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_in_function_epilogue_p invalid");
+  gdb_assert (gdbarch->in_function_epilogue_p != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
   return gdbarch->in_function_epilogue_p (gdbarch, addr);
@@ -5568,9 +5406,7 @@ char *
 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->construct_inferior_arguments == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_construct_inferior_arguments invalid");
+  gdb_assert (gdbarch->construct_inferior_arguments != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
   return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
@@ -5583,39 +5419,11 @@ set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
   gdbarch->construct_inferior_arguments = construct_inferior_arguments;
 }
 
-int
-gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
-{
-  gdb_assert (gdbarch != NULL);
-  return gdbarch->dwarf2_build_frame_info != 0;
-}
-
-void
-gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
-{
-  gdb_assert (gdbarch != NULL);
-  if (gdbarch->dwarf2_build_frame_info == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
-  gdbarch->dwarf2_build_frame_info (objfile);
-}
-
-void
-set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
-                                     gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
-{
-  gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
-}
-
 void
 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->elf_make_msymbol_special == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_elf_make_msymbol_special invalid");
+  gdb_assert (gdbarch->elf_make_msymbol_special != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
   gdbarch->elf_make_msymbol_special (sym, msym);
@@ -5632,9 +5440,7 @@ void
 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->coff_make_msymbol_special == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_coff_make_msymbol_special invalid");
+  gdb_assert (gdbarch->coff_make_msymbol_special != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
   gdbarch->coff_make_msymbol_special (val, msym);
@@ -5702,16 +5508,14 @@ int
 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->address_class_type_flags != 0;
+  return gdbarch->address_class_type_flags != NULL;
 }
 
 int
 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->address_class_type_flags == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_address_class_type_flags invalid");
+  gdb_assert (gdbarch->address_class_type_flags != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
   return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
@@ -5728,16 +5532,14 @@ int
 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->address_class_type_flags_to_name != 0;
+  return gdbarch->address_class_type_flags_to_name != NULL;
 }
 
 const char *
 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->address_class_type_flags_to_name == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
+  gdb_assert (gdbarch->address_class_type_flags_to_name != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
   return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
@@ -5754,16 +5556,14 @@ int
 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->address_class_name_to_type_flags != 0;
+  return gdbarch->address_class_name_to_type_flags != NULL;
 }
 
 int
 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->address_class_name_to_type_flags == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
+  gdb_assert (gdbarch->address_class_name_to_type_flags != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
   return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
@@ -5780,9 +5580,7 @@ int
 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->register_reggroup_p == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_register_reggroup_p invalid");
+  gdb_assert (gdbarch->register_reggroup_p != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
   return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
@@ -5799,16 +5597,14 @@ int
 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
-  return gdbarch->fetch_pointer_argument != 0;
+  return gdbarch->fetch_pointer_argument != NULL;
 }
 
 CORE_ADDR
 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
 {
   gdb_assert (gdbarch != NULL);
-  if (gdbarch->fetch_pointer_argument == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_fetch_pointer_argument invalid");
+  gdb_assert (gdbarch->fetch_pointer_argument != NULL);
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
   return gdbarch->fetch_pointer_argument (frame, argi, type);
@@ -5830,7 +5626,6 @@ struct gdbarch_data
   unsigned index;
   int init_p;
   gdbarch_data_init_ftype *init;
-  gdbarch_data_free_ftype *free;
 };
 
 struct gdbarch_data_registration
@@ -5851,8 +5646,7 @@ struct gdbarch_data_registry gdbarch_data_registry =
 };
 
 struct gdbarch_data *
-register_gdbarch_data (gdbarch_data_init_ftype *init,
-                       gdbarch_data_free_ftype *free)
+register_gdbarch_data (gdbarch_data_init_ftype *init)
 {
   struct gdbarch_data_registration **curr;
   /* Append the new registraration.  */
@@ -5865,7 +5659,6 @@ register_gdbarch_data (gdbarch_data_init_ftype *init,
   (*curr)->data->index = gdbarch_data_registry.nr++;
   (*curr)->data->init = init;
   (*curr)->data->init_p = 1;
-  (*curr)->data->free = free;
   return (*curr)->data;
 }
 
@@ -5877,31 +5670,9 @@ alloc_gdbarch_data (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch->data == NULL);
   gdbarch->nr_data = gdbarch_data_registry.nr;
-  gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
+  gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
 }
 
-static void
-free_gdbarch_data (struct gdbarch *gdbarch)
-{
-  struct gdbarch_data_registration *rego;
-  gdb_assert (gdbarch->data != NULL);
-  for (rego = gdbarch_data_registry.registrations;
-       rego != NULL;
-       rego = rego->next)
-    {
-      struct gdbarch_data *data = rego->data;
-      gdb_assert (data->index < gdbarch->nr_data);
-      if (data->free != NULL && gdbarch->data[data->index] != NULL)
-        {
-          data->free (gdbarch, gdbarch->data[data->index]);
-          gdbarch->data[data->index] = NULL;
-        }
-    }
-  xfree (gdbarch->data);
-  gdbarch->data = NULL;
-}
-
-
 /* Initialize the current value of the specified per-architecture
    data-pointer. */
 
@@ -5911,11 +5682,7 @@ set_gdbarch_data (struct gdbarch *gdbarch,
                   void *pointer)
 {
   gdb_assert (data->index < gdbarch->nr_data);
-  if (gdbarch->data[data->index] != NULL)
-    {
-      gdb_assert (data->free != NULL);
-      data->free (gdbarch, gdbarch->data[data->index]);
-    }
+  gdb_assert (gdbarch->data[data->index] == NULL);
   gdbarch->data[data->index] = pointer;
 }
 
@@ -6012,9 +5779,9 @@ init_gdbarch_swap (struct gdbarch *gdbarch)
     {
       if (rego->data != NULL)
        {
-         (*curr) = XMALLOC (struct gdbarch_swap);
+         (*curr) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct gdbarch_swap);
          (*curr)->source = rego;
-         (*curr)->swap = xmalloc (rego->sizeof_data);
+         (*curr)->swap = gdbarch_obstack_zalloc (gdbarch, rego->sizeof_data);
          (*curr)->next = NULL;
          curr = &(*curr)->next;
        }
index 4dd7cfa9d7fa255894dae05e1355b98d1c0f0d79..3850c4b045516f4d85ba3b19b99142cd89cb4ffd 100644 (file)
@@ -589,11 +589,6 @@ extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_d
 #define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
 #endif
 
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME)
-#define REGISTER_NAME(regnr) (legacy_register_name (regnr))
-#endif
-
 typedef const char * (gdbarch_register_name_ftype) (int regnr);
 extern const char * gdbarch_register_name (struct gdbarch *gdbarch, int regnr);
 extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register_name_ftype *register_name);
@@ -709,6 +704,26 @@ extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbar
    DEPRECATED_REGISTER_RAW_SIZE can be deleted.  See: maint print
    registers. */
 
+#if defined (REGISTER_RAW_SIZE)
+/* Legacy for systems yet to multi-arch REGISTER_RAW_SIZE */
+#if !defined (REGISTER_RAW_SIZE_P)
+#define REGISTER_RAW_SIZE_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE_P)
+#define REGISTER_RAW_SIZE_P() (0)
+#endif
+
+extern int gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE_P)
+#error "Non multi-arch definition of REGISTER_RAW_SIZE"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_RAW_SIZE_P)
+#define REGISTER_RAW_SIZE_P() (gdbarch_deprecated_register_raw_size_p (current_gdbarch))
+#endif
+
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE)
 #define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr))
@@ -729,6 +744,26 @@ extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, g
    DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted.  See: maint print
    registers. */
 
+#if defined (REGISTER_VIRTUAL_SIZE)
+/* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_SIZE */
+#if !defined (REGISTER_VIRTUAL_SIZE_P)
+#define REGISTER_VIRTUAL_SIZE_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE_P)
+#define REGISTER_VIRTUAL_SIZE_P() (0)
+#endif
+
+extern int gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE_P)
+#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_SIZE_P)
+#define REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_register_virtual_size_p (current_gdbarch))
+#endif
+
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
 #define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr))
@@ -2904,41 +2939,6 @@ typedef char * (gdbarch_construct_inferior_arguments_ftype) (struct gdbarch *gdb
 extern char * gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv);
 extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments);
 
-#if defined (DWARF2_BUILD_FRAME_INFO)
-/* Legacy for systems yet to multi-arch DWARF2_BUILD_FRAME_INFO */
-#if !defined (DWARF2_BUILD_FRAME_INFO_P)
-#define DWARF2_BUILD_FRAME_INFO_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO_P)
-#define DWARF2_BUILD_FRAME_INFO_P() (0)
-#endif
-
-extern int gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO_P)
-#error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO_P)
-#define DWARF2_BUILD_FRAME_INFO_P() (gdbarch_dwarf2_build_frame_info_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DWARF2_BUILD_FRAME_INFO)
-#define DWARF2_BUILD_FRAME_INFO(objfile) (internal_error (__FILE__, __LINE__, "DWARF2_BUILD_FRAME_INFO"), 0)
-#endif
-
-typedef void (gdbarch_dwarf2_build_frame_info_ftype) (struct objfile *objfile);
-extern void gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile);
-extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO)
-#error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
-#endif
-#if !defined (DWARF2_BUILD_FRAME_INFO)
-#define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile))
-#endif
-
 /* Default (function) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL)
 #define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (default_elf_make_msymbol_special (sym, msym))
@@ -3227,6 +3227,15 @@ extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gd
 extern void gdbarch_free (struct gdbarch *);
 
 
+/* Helper function.  Allocate memory from the ``struct gdbarch''
+   obstack.  The memory is freed when the corresponding architecture
+   is also freed.  */
+
+extern void *gdbarch_obstack_zalloc (struct gdbarch *gdbarch, long size);
+#define GDBARCH_OBSTACK_CALLOC(GDBARCH, NR, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), (NR) * sizeof (TYPE)))
+#define GDBARCH_OBSTACK_ZALLOC(GDBARCH, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), sizeof (TYPE)))
+
+
 /* Helper function. Force an update of the current architecture.
 
    The actual architecture selected is determined by INFO, ``(gdb) set
@@ -3248,9 +3257,11 @@ extern int gdbarch_update_p (struct gdbarch_info info);
 
    The per-architecture data-pointer is either initialized explicitly
    (set_gdbarch_data()) or implicitly (by INIT() via a call to
-   gdbarch_data()).  FREE() is called to delete either an existing
-   data-pointer overridden by set_gdbarch_data() or when the
-   architecture object is being deleted.
+   gdbarch_data()).
+
+   Memory for the per-architecture data shall be allocated using
+   gdbarch_obstack_zalloc.  That memory will be deleted when the
+   corresponding architecture object is deleted.
 
    When a previously created architecture is re-selected, the
    per-architecture data-pointer for that previous architecture is
@@ -3262,10 +3273,7 @@ extern int gdbarch_update_p (struct gdbarch_info info);
 struct gdbarch_data;
 
 typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
-typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch,
-                                       void *pointer);
-extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
-                                                  gdbarch_data_free_ftype *free);
+extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init);
 extern void set_gdbarch_data (struct gdbarch *gdbarch,
                              struct gdbarch_data *data,
                              void *pointer);
index 494b916ffe4ce5901ef42a2742e6ef19670fba08..9a633482a087e2f4b46c69226763a7cc803ab14b 100755 (executable)
@@ -94,9 +94,6 @@ EOF
                M ) staticdefault="0" ;;
                * ) test "${staticdefault}" || staticdefault=0 ;;
            esac
-           # NOT YET: Breaks BELIEVE_PCC_PROMOTION and confuses non-
-           # multi-arch defaults.
-           # test "${predefault}" || predefault=0
 
            # come up with a format, use a few guesses for variables
            case ":${class}:${fmt}:${print}:" in
@@ -119,13 +116,16 @@ EOF
            F | V | M )
                case "${invalid_p}" in
                "" )
-                   if test -n "${predefault}" -a "${predefault}" != "0"
+                   if test -n "${predefault}"
                    then
                        #invalid_p="gdbarch->${function} == ${predefault}"
                        predicate="gdbarch->${function} != ${predefault}"
-                   else
-                       # filled in later
-                       predicate=""
+                   elif class_is_variable_p
+                   then
+                       predicate="gdbarch->${function} != 0"
+                   elif class_is_function_p
+                   then
+                       predicate="gdbarch->${function} != NULL"
                    fi
                    ;;
                * )
@@ -435,8 +435,8 @@ F:2:TARGET_READ_SP:CORE_ADDR:read_sp:void
 # serious shakedown.
 f:2:TARGET_VIRTUAL_FRAME_POINTER:void:virtual_frame_pointer:CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset:pc, frame_regnum, frame_offset::0:legacy_virtual_frame_pointer::0
 #
-M:::void:pseudo_register_read:struct regcache *regcache, int cookednum, void *buf:regcache, cookednum, buf:
-M:::void:pseudo_register_write:struct regcache *regcache, int cookednum, const void *buf:regcache, cookednum, buf:
+M:::void:pseudo_register_read:struct regcache *regcache, int cookednum, void *buf:regcache, cookednum, buf
+M:::void:pseudo_register_write:struct regcache *regcache, int cookednum, const void *buf:regcache, cookednum, buf
 #
 v:2:NUM_REGS:int:num_regs::::0:-1
 # This macro gives the number of pseudo-registers that live in the
@@ -465,12 +465,12 @@ f:2:DWARF_REG_TO_REGNUM:int:dwarf_reg_to_regnum:int dwarf_regnr:dwarf_regnr:::no
 # to map one to one onto the sdb register numbers.
 f:2:SDB_REG_TO_REGNUM:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr:::no_op_reg_to_regnum::0
 f:2:DWARF2_REG_TO_REGNUM:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr:::no_op_reg_to_regnum::0
-f:2:REGISTER_NAME:const char *:register_name:int regnr:regnr:::legacy_register_name::0
+f::REGISTER_NAME:const char *:register_name:int regnr:regnr
 
 # REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE.
-M:2:REGISTER_TYPE:struct type *:register_type:int reg_nr:reg_nr::0:
+M:2:REGISTER_TYPE:struct type *:register_type:int reg_nr:reg_nr
 # REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE.
-F:2:REGISTER_VIRTUAL_TYPE:struct type *:deprecated_register_virtual_type:int reg_nr:reg_nr::0:0
+F:2:REGISTER_VIRTUAL_TYPE:struct type *:deprecated_register_virtual_type:int reg_nr:reg_nr
 # DEPRECATED_REGISTER_BYTES can be deleted.  The value is computed
 # from REGISTER_TYPE.
 v::DEPRECATED_REGISTER_BYTES:int:deprecated_register_bytes
@@ -486,12 +486,12 @@ F::REGISTER_BYTE:int:deprecated_register_byte:int reg_nr:reg_nr::generic_registe
 # sizes agree with the value computed from REGISTER_TYPE,
 # DEPRECATED_REGISTER_RAW_SIZE can be deleted.  See: maint print
 # registers.
-f:2:REGISTER_RAW_SIZE:int:deprecated_register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
+F:2:REGISTER_RAW_SIZE:int:deprecated_register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size
 # If all registers have identical raw and virtual sizes and those
 # sizes agree with the value computed from REGISTER_TYPE,
 # DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted.  See: maint print
 # registers.
-f:2:REGISTER_VIRTUAL_SIZE:int:deprecated_register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
+F:2:REGISTER_VIRTUAL_SIZE:int:deprecated_register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size
 # DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted.  It has been
 # replaced by the constant MAX_REGISTER_SIZE.
 V:2:DEPRECATED_MAX_REGISTER_RAW_SIZE:int:deprecated_max_register_raw_size
@@ -500,7 +500,7 @@ V:2:DEPRECATED_MAX_REGISTER_RAW_SIZE:int:deprecated_max_register_raw_size
 V:2:DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE:int:deprecated_max_register_virtual_size
 
 # See gdbint.texinfo, and PUSH_DUMMY_CALL.
-M::UNWIND_DUMMY_ID:struct frame_id:unwind_dummy_id:struct frame_info *info:info::0:0
+M::UNWIND_DUMMY_ID:struct frame_id:unwind_dummy_id:struct frame_info *info:info
 # Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
 # SAVE_DUMMY_FRAME_TOS.
 F:2:DEPRECATED_SAVE_DUMMY_FRAME_TOS:void:deprecated_save_dummy_frame_tos:CORE_ADDR sp:sp
@@ -520,7 +520,7 @@ F:2:DEPRECATED_PUSH_ARGUMENTS:CORE_ADDR:deprecated_push_arguments:int nargs, str
 v::DEPRECATED_USE_GENERIC_DUMMY_FRAMES:int:deprecated_use_generic_dummy_frames:::::1::0
 # Implement PUSH_RETURN_ADDRESS, and then merge in
 # DEPRECATED_PUSH_RETURN_ADDRESS.
-F:2:DEPRECATED_PUSH_RETURN_ADDRESS:CORE_ADDR:deprecated_push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
+F:2:DEPRECATED_PUSH_RETURN_ADDRESS:CORE_ADDR:deprecated_push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp
 # Implement PUSH_DUMMY_CALL, then merge in DEPRECATED_DUMMY_WRITE_SP.
 F:2:DEPRECATED_DUMMY_WRITE_SP:void:deprecated_dummy_write_sp:CORE_ADDR val:val
 # DEPRECATED_REGISTER_SIZE can be deleted.
@@ -538,14 +538,14 @@ v::DEPRECATED_CALL_DUMMY_WORDS:LONGEST *:deprecated_call_dummy_words::::0:legacy
 # Implement PUSH_DUMMY_CALL, then delete DEPRECATED_SIZEOF_CALL_DUMMY_WORDS.
 v::DEPRECATED_SIZEOF_CALL_DUMMY_WORDS:int:deprecated_sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0
 # Implement PUSH_DUMMY_CALL, then delete DEPRECATED_CALL_DUMMY_STACK_ADJUST.
-V:2:DEPRECATED_CALL_DUMMY_STACK_ADJUST:int:deprecated_call_dummy_stack_adjust::::0
+V:2:DEPRECATED_CALL_DUMMY_STACK_ADJUST:int:deprecated_call_dummy_stack_adjust
 # DEPRECATED_FIX_CALL_DUMMY can be deleted.  For the SPARC, implement
 # PUSH_DUMMY_CODE and set CALL_DUMMY_LOCATION to ON_STACK.
 F::DEPRECATED_FIX_CALL_DUMMY:void:deprecated_fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p
 # This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al.
-M::PUSH_DUMMY_CODE:CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr:
+M::PUSH_DUMMY_CODE:CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr
 # Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME.
-F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-:::0
+F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-
 # Implement PUSH_DUMMY_CALL, then delete
 # DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED.
 v:2:DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED:int:deprecated_extra_stack_alignment_needed::::0:0::0:::
@@ -557,11 +557,11 @@ M:2:PRINT_VECTOR_INFO:void:print_vector_info:struct ui_file *file, struct frame_
 # MAP a GDB RAW register number onto a simulator register number.  See
 # also include/...-sim.h.
 f:2:REGISTER_SIM_REGNO:int:register_sim_regno:int reg_nr:reg_nr:::legacy_register_sim_regno::0
-F:2:REGISTER_BYTES_OK:int:register_bytes_ok:long nr_bytes:nr_bytes::0:0
+F:2:REGISTER_BYTES_OK:int:register_bytes_ok:long nr_bytes:nr_bytes
 f:2:CANNOT_FETCH_REGISTER:int:cannot_fetch_register:int regnum:regnum:::cannot_register_not::0
 f:2:CANNOT_STORE_REGISTER:int:cannot_store_register:int regnum:regnum:::cannot_register_not::0
 # setjmp/longjmp support.
-F:2:GET_LONGJMP_TARGET:int:get_longjmp_target:CORE_ADDR *pc:pc::0:0
+F:2:GET_LONGJMP_TARGET:int:get_longjmp_target:CORE_ADDR *pc:pc
 # NOTE: cagney/2002-11-24: This function with predicate has a valid
 # (callable) initial value.  As a consequence, even when the predicate
 # is false, the corresponding function works.  This simplifies the
@@ -594,21 +594,21 @@ f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, COR
 F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf
 #
 f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0
-F:2:DEPRECATED_POP_FRAME:void:deprecated_pop_frame:void:-:::0
+F:2:DEPRECATED_POP_FRAME:void:deprecated_pop_frame:void:-
 # NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS.
-F:2:DEPRECATED_STORE_STRUCT_RETURN:void:deprecated_store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
+F:2:DEPRECATED_STORE_STRUCT_RETURN:void:deprecated_store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp
 #
 f:2:EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, struct regcache *regcache, void *valbuf:type, regcache, valbuf:::legacy_extract_return_value::0
 f:2:STORE_RETURN_VALUE:void:store_return_value:struct type *type, struct regcache *regcache, const void *valbuf:type, regcache, valbuf:::legacy_store_return_value::0
 f:2:DEPRECATED_EXTRACT_RETURN_VALUE:void:deprecated_extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf
 f:2:DEPRECATED_STORE_RETURN_VALUE:void:deprecated_store_return_value:struct type *type, char *valbuf:type, valbuf
 #
-F:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:struct regcache *regcache:regcache:::0
-F:2:DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:deprecated_extract_struct_value_address:char *regbuf:regbuf:::0
+F:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:struct regcache *regcache:regcache
+F:2:DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:deprecated_extract_struct_value_address:char *regbuf:regbuf
 f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type:::generic_use_struct_convention::0
 #
-F:2:DEPRECATED_FRAME_INIT_SAVED_REGS:void:deprecated_frame_init_saved_regs:struct frame_info *frame:frame:::0
-F:2:DEPRECATED_INIT_EXTRA_FRAME_INFO:void:deprecated_init_extra_frame_info:int fromleaf, struct frame_info *frame:fromleaf, frame:::0
+F:2:DEPRECATED_FRAME_INIT_SAVED_REGS:void:deprecated_frame_init_saved_regs:struct frame_info *frame:frame
+F:2:DEPRECATED_INIT_EXTRA_FRAME_INFO:void:deprecated_init_extra_frame_info:int fromleaf, struct frame_info *frame:fromleaf, frame
 #
 f:2:SKIP_PROLOGUE:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip::0:0
 f:2:PROLOGUE_FRAMELESS_P:int:prologue_frameless_p:CORE_ADDR ip:ip::0:generic_prologue_frameless_p::0
@@ -623,14 +623,14 @@ m::REMOTE_TRANSLATE_XFER_ADDRESS:void:remote_translate_xfer_address:struct regca
 #
 v:2:FRAME_ARGS_SKIP:CORE_ADDR:frame_args_skip::::0:-1
 f:2:FRAMELESS_FUNCTION_INVOCATION:int:frameless_function_invocation:struct frame_info *fi:fi:::generic_frameless_function_invocation_not::0
-F:2:DEPRECATED_FRAME_CHAIN:CORE_ADDR:deprecated_frame_chain:struct frame_info *frame:frame::0:0
-F:2:DEPRECATED_FRAME_CHAIN_VALID:int:deprecated_frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe::0:0
+F:2:DEPRECATED_FRAME_CHAIN:CORE_ADDR:deprecated_frame_chain:struct frame_info *frame:frame
+F:2:DEPRECATED_FRAME_CHAIN_VALID:int:deprecated_frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe
 # DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC.  Please
 # note, per UNWIND_PC's doco, that while the two have similar
 # interfaces they have very different underlying implementations.
-F:2:DEPRECATED_FRAME_SAVED_PC:CORE_ADDR:deprecated_frame_saved_pc:struct frame_info *fi:fi::0:0
-M::UNWIND_PC:CORE_ADDR:unwind_pc:struct frame_info *next_frame:next_frame:
-M::UNWIND_SP:CORE_ADDR:unwind_sp:struct frame_info *next_frame:next_frame:
+F:2:DEPRECATED_FRAME_SAVED_PC:CORE_ADDR:deprecated_frame_saved_pc:struct frame_info *fi:fi
+M::UNWIND_PC:CORE_ADDR:unwind_pc:struct frame_info *next_frame:next_frame
+M::UNWIND_SP:CORE_ADDR:unwind_sp:struct frame_info *next_frame:next_frame
 # DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame
 # frame-base.  Enable frame-base before frame-unwind.
 F::DEPRECATED_FRAME_ARGS_ADDRESS:CORE_ADDR:deprecated_frame_args_address:struct frame_info *fi:fi::get_frame_base:get_frame_base
@@ -640,9 +640,9 @@ F::DEPRECATED_FRAME_LOCALS_ADDRESS:CORE_ADDR:deprecated_frame_locals_address:str
 F::DEPRECATED_SAVED_PC_AFTER_CALL:CORE_ADDR:deprecated_saved_pc_after_call:struct frame_info *frame:frame
 F:2:FRAME_NUM_ARGS:int:frame_num_args:struct frame_info *frame:frame
 #
-F:2:STACK_ALIGN:CORE_ADDR:stack_align:CORE_ADDR sp:sp::0:0
+F:2:STACK_ALIGN:CORE_ADDR:stack_align:CORE_ADDR sp:sp
 M:::CORE_ADDR:frame_align:CORE_ADDR address:address
-F:2:REG_STRUCT_HAS_ADDR:int:reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type::0:0
+F:2:REG_STRUCT_HAS_ADDR:int:reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type
 v:2:PARM_BOUNDARY:int:parm_boundary
 #
 v:2:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (gdbarch)::%s:(TARGET_FLOAT_FORMAT)->name
@@ -670,7 +670,7 @@ f:2:SMASH_TEXT_ADDRESS:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr:::core_a
 #
 # FIXME/cagney/2001-01-18: The logic is backwards.  It should be asking if the target can
 # single step.  If not, then implement single step using breakpoints.
-F:2:SOFTWARE_SINGLE_STEP:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p::0:0
+F:2:SOFTWARE_SINGLE_STEP:void:software_single_step:enum target_signal sig, int insert_breakpoints_p:sig, insert_breakpoints_p
 f:2:TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, disassemble_info *info:vma, info:::legacy_print_insn::0
 f:2:SKIP_TRAMPOLINE_CODE:CORE_ADDR:skip_trampoline_code:CORE_ADDR pc:pc:::generic_skip_trampoline_code::0
 
@@ -725,19 +725,18 @@ m:::int:in_function_epilogue_p:CORE_ADDR addr:addr::0:generic_in_function_epilog
 # ARGC is the number of elements in the vector.
 # ARGV is an array of strings, one per argument.
 m::CONSTRUCT_INFERIOR_ARGUMENTS:char *:construct_inferior_arguments:int argc, char **argv:argc, argv:::construct_inferior_arguments::0
-F:2:DWARF2_BUILD_FRAME_INFO:void:dwarf2_build_frame_info:struct objfile *objfile:objfile:::0
 f:2:ELF_MAKE_MSYMBOL_SPECIAL:void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym:::default_elf_make_msymbol_special::0
 f:2:COFF_MAKE_MSYMBOL_SPECIAL:void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym:::default_coff_make_msymbol_special::0
 v:2:NAME_OF_MALLOC:const char *:name_of_malloc::::"malloc":"malloc"::0:%s:NAME_OF_MALLOC
 v:2:CANNOT_STEP_BREAKPOINT:int:cannot_step_breakpoint::::0:0::0
 v:2:HAVE_NONSTEPPABLE_WATCHPOINT:int:have_nonsteppable_watchpoint::::0:0::0
 F:2:ADDRESS_CLASS_TYPE_FLAGS:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class
-M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:const char *:address_class_type_flags_to_name:int type_flags:type_flags:
+M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:const char *:address_class_type_flags_to_name:int type_flags:type_flags
 M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags:const char *name, int *type_flags_ptr:name, type_flags_ptr
 # Is a register in a group
 m:::int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup:::default_register_reggroup_p::0
 # Fetch the pointer to the ith function argument.  
-F::FETCH_POINTER_ARGUMENT:CORE_ADDR:fetch_pointer_argument:struct frame_info *frame, int argi, struct type *type:frame, argi, type:::::::::
+F::FETCH_POINTER_ARGUMENT:CORE_ADDR:fetch_pointer_argument:struct frame_info *frame, int argi, struct type *type:frame, argi, type
 EOF
 }
 
@@ -1146,6 +1145,15 @@ extern struct gdbarch *gdbarch_alloc (const struct gdbarch_info *info, struct gd
 extern void gdbarch_free (struct gdbarch *);
 
 
+/* Helper function.  Allocate memory from the \`\`struct gdbarch''
+   obstack.  The memory is freed when the corresponding architecture
+   is also freed.  */
+
+extern void *gdbarch_obstack_zalloc (struct gdbarch *gdbarch, long size);
+#define GDBARCH_OBSTACK_CALLOC(GDBARCH, NR, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), (NR) * sizeof (TYPE)))
+#define GDBARCH_OBSTACK_ZALLOC(GDBARCH, TYPE) ((TYPE *) gdbarch_obstack_zalloc ((GDBARCH), sizeof (TYPE)))
+
+
 /* Helper function. Force an update of the current architecture.
 
    The actual architecture selected is determined by INFO, \`\`(gdb) set
@@ -1167,9 +1175,11 @@ extern int gdbarch_update_p (struct gdbarch_info info);
 
    The per-architecture data-pointer is either initialized explicitly
    (set_gdbarch_data()) or implicitly (by INIT() via a call to
-   gdbarch_data()).  FREE() is called to delete either an existing
-   data-pointer overridden by set_gdbarch_data() or when the
-   architecture object is being deleted.
+   gdbarch_data()).
+
+   Memory for the per-architecture data shall be allocated using
+   gdbarch_obstack_zalloc.  That memory will be deleted when the
+   corresponding architecture object is deleted.
 
    When a previously created architecture is re-selected, the
    per-architecture data-pointer for that previous architecture is
@@ -1181,10 +1191,7 @@ extern int gdbarch_update_p (struct gdbarch_info info);
 struct gdbarch_data;
 
 typedef void *(gdbarch_data_init_ftype) (struct gdbarch *gdbarch);
-typedef void (gdbarch_data_free_ftype) (struct gdbarch *gdbarch,
-                                       void *pointer);
-extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init,
-                                                  gdbarch_data_free_ftype *free);
+extern struct gdbarch_data *register_gdbarch_data (gdbarch_data_init_ftype *init);
 extern void set_gdbarch_data (struct gdbarch *gdbarch,
                              struct gdbarch_data *data,
                              void *pointer);
@@ -1315,12 +1322,12 @@ cat <<EOF
 #include "reggroups.h"
 #include "osabi.h"
 #include "symfile.h"           /* For entry_point_address.  */
+#include "gdb_obstack.h"
 
 /* Static function declarations */
 
 static void verify_gdbarch (struct gdbarch *gdbarch);
 static void alloc_gdbarch_data (struct gdbarch *);
-static void free_gdbarch_data (struct gdbarch *);
 static void init_gdbarch_swap (struct gdbarch *);
 static void clear_gdbarch_swap (struct gdbarch *);
 static void swapout_gdbarch_swap (struct gdbarch *);
@@ -1343,6 +1350,10 @@ printf "struct gdbarch\n"
 printf "{\n"
 printf "  /* Has this architecture been fully initialized?  */\n"
 printf "  int initialized_p;\n"
+printf "\n"
+printf "  /* An obstack bound to the lifetime of the architecture.  */\n"
+printf "  struct obstack *obstack;\n"
+printf "\n"
 printf "  /* basic architectural information */\n"
 function_list | while do_read
 do
@@ -1416,6 +1427,7 @@ printf "\n"
 printf "struct gdbarch startup_gdbarch =\n"
 printf "{\n"
 printf "  1, /* Always initialized.  */\n"
+printf "  NULL, /* The obstack.  */\n"
 printf "  /* basic architecture information */\n"
 function_list | while do_read
 do
@@ -1476,8 +1488,15 @@ gdbarch_alloc (const struct gdbarch_info *info,
      architecture.  This ensures that the new architectures initial
      values are not influenced by the previous architecture.  Once
      everything is parameterised with gdbarch, this will go away.  */
-  struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
+  struct gdbarch *current_gdbarch;
+
+  /* Create an obstack for allocating all the per-architecture memory,
+     then use that to allocate the architecture vector.  */
+  struct obstack *obstack = XMALLOC (struct obstack);
+  obstack_init (obstack);
+  current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch));
   memset (current_gdbarch, 0, sizeof (*current_gdbarch));
+  current_gdbarch->obstack = obstack;
 
   alloc_gdbarch_data (current_gdbarch);
 
@@ -1514,6 +1533,17 @@ EOF
 printf "\n"
 printf "\n"
 cat <<EOF
+/* Allocate extra space using the per-architecture obstack.  */
+
+void *
+gdbarch_obstack_zalloc (struct gdbarch *arch, long size)
+{
+  void *data = obstack_alloc (arch->obstack, size);
+  memset (data, 0, size);
+  return data;
+}
+
+
 /* Free a gdbarch struct.  This should never happen in normal
    operation --- once you've created a gdbarch, you keep it around.
    However, if an architecture's init function encounters an error
@@ -1523,9 +1553,12 @@ cat <<EOF
 void
 gdbarch_free (struct gdbarch *arch)
 {
+  struct obstack *obstack;
   gdb_assert (arch != NULL);
-  free_gdbarch_data (arch);
-  xfree (arch);
+  gdb_assert (!arch->initialized_p);
+  obstack = arch->obstack;
+  obstack_free (obstack, 0); /* Includes the ARCH.  */
+  xfree (obstack);
 }
 EOF
 
@@ -1729,12 +1762,7 @@ do
        printf "gdbarch_${function}_p (struct gdbarch *gdbarch)\n"
        printf "{\n"
         printf "  gdb_assert (gdbarch != NULL);\n"
-       if [ -n "${predicate}" ]
-       then
-           printf "  return ${predicate};\n"
-       else
-           printf "  return gdbarch->${function} != 0;\n"
-       fi
+       printf "  return ${predicate};\n"
        printf "}\n"
     fi
     if class_is_function_p
@@ -1749,13 +1777,11 @@ do
        fi
        printf "{\n"
         printf "  gdb_assert (gdbarch != NULL);\n"
-        printf "  if (gdbarch->${function} == 0)\n"
-        printf "    internal_error (__FILE__, __LINE__,\n"
-       printf "                    \"gdbarch: gdbarch_${function} invalid\");\n"
-       if class_is_predicate_p && test -n "${predicate}"
+       printf "  gdb_assert (gdbarch->${function} != NULL);\n"
+       if class_is_predicate_p && test -n "${predefault}"
        then
            # Allow a call to a function with a predicate.
-           printf "  /* Ignore predicate (${predicate}).  */\n"
+           printf "  /* Do not check predicate: ${predicate}, allow call.  */\n"
        fi
        printf "  if (gdbarch_debug >= 2)\n"
        printf "    fprintf_unfiltered (gdb_stdlog, \"gdbarch_${function} called\\\\n\");\n"
@@ -1801,14 +1827,12 @@ do
            printf "  /* Skip verify of ${function}, invalid_p == 0 */\n"
        elif [ -n "${invalid_p}" ]
        then
-         printf "  if (${invalid_p})\n"
-         printf "    internal_error (__FILE__, __LINE__,\n"
-         printf "                    \"gdbarch: gdbarch_${function} invalid\");\n"
+           printf "  /* Check variable is valid.  */\n"
+           printf "  gdb_assert (!(${invalid_p}));\n"
        elif [ -n "${predefault}" ]
        then
-         printf "  if (gdbarch->${function} == ${predefault})\n"
-         printf "    internal_error (__FILE__, __LINE__,\n"
-         printf "                    \"gdbarch: gdbarch_${function} invalid\");\n"
+           printf "  /* Check variable changed from pre-default.  */\n"
+           printf "  gdb_assert (gdbarch->${function} != ${predefault});\n"
        fi
        printf "  if (gdbarch_debug >= 2)\n"
        printf "    fprintf_unfiltered (gdb_stdlog, \"gdbarch_${function} called\\\\n\");\n"
@@ -1847,7 +1871,6 @@ struct gdbarch_data
   unsigned index;
   int init_p;
   gdbarch_data_init_ftype *init;
-  gdbarch_data_free_ftype *free;
 };
 
 struct gdbarch_data_registration
@@ -1868,8 +1891,7 @@ struct gdbarch_data_registry gdbarch_data_registry =
 };
 
 struct gdbarch_data *
-register_gdbarch_data (gdbarch_data_init_ftype *init,
-                       gdbarch_data_free_ftype *free)
+register_gdbarch_data (gdbarch_data_init_ftype *init)
 {
   struct gdbarch_data_registration **curr;
   /* Append the new registraration.  */
@@ -1882,7 +1904,6 @@ register_gdbarch_data (gdbarch_data_init_ftype *init,
   (*curr)->data->index = gdbarch_data_registry.nr++;
   (*curr)->data->init = init;
   (*curr)->data->init_p = 1;
-  (*curr)->data->free = free;
   return (*curr)->data;
 }
 
@@ -1894,31 +1915,9 @@ alloc_gdbarch_data (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch->data == NULL);
   gdbarch->nr_data = gdbarch_data_registry.nr;
-  gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
-}
-
-static void
-free_gdbarch_data (struct gdbarch *gdbarch)
-{
-  struct gdbarch_data_registration *rego;
-  gdb_assert (gdbarch->data != NULL);
-  for (rego = gdbarch_data_registry.registrations;
-       rego != NULL;
-       rego = rego->next)
-    {
-      struct gdbarch_data *data = rego->data;
-      gdb_assert (data->index < gdbarch->nr_data);
-      if (data->free != NULL && gdbarch->data[data->index] != NULL)
-        {
-          data->free (gdbarch, gdbarch->data[data->index]);
-          gdbarch->data[data->index] = NULL;
-        }
-    }
-  xfree (gdbarch->data);
-  gdbarch->data = NULL;
+  gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *);
 }
 
-
 /* Initialize the current value of the specified per-architecture
    data-pointer. */
 
@@ -1928,11 +1927,7 @@ set_gdbarch_data (struct gdbarch *gdbarch,
                   void *pointer)
 {
   gdb_assert (data->index < gdbarch->nr_data);
-  if (gdbarch->data[data->index] != NULL)
-    {
-      gdb_assert (data->free != NULL);
-      data->free (gdbarch, gdbarch->data[data->index]);
-    }
+  gdb_assert (gdbarch->data[data->index] == NULL);
   gdbarch->data[data->index] = pointer;
 }
 
@@ -2029,9 +2024,9 @@ init_gdbarch_swap (struct gdbarch *gdbarch)
     {
       if (rego->data != NULL)
        {
-         (*curr) = XMALLOC (struct gdbarch_swap);
+         (*curr) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct gdbarch_swap);
          (*curr)->source = rego;
-         (*curr)->swap = xmalloc (rego->sizeof_data);
+         (*curr)->swap = gdbarch_obstack_zalloc (gdbarch, rego->sizeof_data);
          (*curr)->next = NULL;
          curr = &(*curr)->next;
        }
index 636b13b2e51c75ea05a626350e3f53d6ab83a85e..1a3a7dc27fc66adc488219977e0020e4ea30eab0 100644 (file)
@@ -1,3 +1,26 @@
+2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
+
+       * linux-arm-low.c (arm_reinsert_addr): New function.
+       (the_low_target): Add arm_reinsert_addr.
+
+2003-07-08  Mark Kettenis  <kettenis@gnu.org>
+
+       * mem-break.c: Remove whitespace at end of file.
+
+2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       * configure.in: Check whether we need to prototype strerror.
+       * server.h: Optionally prototype strerror.
+       * gdbreplay.c (perror_with_name): Use strerror.
+       * linux-low.c (linux_attach_lwp): Use strerror.
+       * utils.c (perror_with_name): Use strerror.
+       * config.in, configure: Regenerated.
+
+2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
+       SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
+
 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
 
        * Makefile.in (SFILES): Update.
index 5141263f4c6fa9d09aaa9acdac2bf1b8d4905d89..e9d21c81039e9c714461c3e5617356a544906e30 100644 (file)
@@ -49,6 +49,9 @@
 /* Define if you have the <unistd.h> header file.  */
 #undef HAVE_UNISTD_H
 
+/* Define if strerror is not declared in system header files. */
+#undef NEED_DECLARATION_STRERROR
+
 /* Define if <sys/procfs.h> has lwpid_t. */
 #undef HAVE_LWPID_T
 
index 0b9bee47a3ce7bd89f2f53912672a31f83bcb683..62d3785f4ab78f7d7d9ff7b85eb9deff3cfa52e9 100755 (executable)
@@ -1146,6 +1146,54 @@ fi
 done
 
 
+echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
+echo "configure:1151: checking whether strerror must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1156 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main() {
+char *(*pfn) = (char *(*)) strerror
+; return 0; }
+EOF
+if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_decl_needed_strerror=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bfd_cv_decl_needed_strerror=yes
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
+if test $bfd_cv_decl_needed_strerror = yes; then
+  cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_STRERROR 1
+EOF
+
+fi
+
+
 . ${srcdir}/configure.srv
 
 if test "${srv_linux_usrregs}" = "yes"; then
@@ -1157,19 +1205,19 @@ fi
 
 if test "${srv_linux_regsets}" = "yes"; then
   echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:1161: checking for PTRACE_GETREGS" >&5
+echo "configure:1209: checking for PTRACE_GETREGS" >&5
   if eval "test \"`echo '$''{'gdbsrv_cv_have_ptrace_getregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1166 "configure"
+#line 1214 "configure"
 #include "confdefs.h"
 #include <sys/ptrace.h>
 int main() {
 PTRACE_GETREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:1173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdbsrv_cv_have_ptrace_getregs=yes
 else
@@ -1190,19 +1238,19 @@ EOF
   fi
 
   echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:1194: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:1242: checking for PTRACE_GETFPXREGS" >&5
   if eval "test \"`echo '$''{'gdbsrv_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1199 "configure"
+#line 1247 "configure"
 #include "confdefs.h"
 #include <sys/ptrace.h>
 int main() {
 PTRACE_GETFPXREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:1206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdbsrv_cv_have_ptrace_getfpxregs=yes
 else
@@ -1225,12 +1273,12 @@ fi
 
 if test "$ac_cv_header_sys_procfs_h" = yes; then
   echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:1229: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:1277: checking for lwpid_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1234 "configure"
+#line 1282 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -1239,7 +1287,7 @@ int main() {
 lwpid_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:1243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_lwpid_t=yes
 else
@@ -1261,12 +1309,12 @@ EOF
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
 
   echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:1265: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:1313: checking for psaddr_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1270 "configure"
+#line 1318 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -1275,7 +1323,7 @@ int main() {
 psaddr_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:1279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_psaddr_t=yes
 else
@@ -1297,12 +1345,12 @@ EOF
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
 
   echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:1301: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:1349: checking for prgregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1306 "configure"
+#line 1354 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -1311,7 +1359,7 @@ int main() {
 prgregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:1315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prgregset_t=yes
 else
@@ -1333,12 +1381,12 @@ EOF
  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
 
   echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:1337: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:1385: checking for prfpregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1342 "configure"
+#line 1390 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -1347,7 +1395,7 @@ int main() {
 prfpregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:1351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
 else
@@ -1373,7 +1421,7 @@ EOF
         
   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
     echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:1377: checking whether prfpregset_t type is broken" >&5
+echo "configure:1425: checking whether prfpregset_t type is broken" >&5
     if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1381,7 +1429,7 @@ else
   gdb_cv_prfpregset_t_broken=yes
 else
   cat > conftest.$ac_ext <<EOF
-#line 1385 "configure"
+#line 1433 "configure"
 #include "confdefs.h"
 #include <sys/procfs.h>
        int main ()
@@ -1391,7 +1439,7 @@ else
          return 0;
        }
 EOF
-if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   gdb_cv_prfpregset_t_broken=no
 else
@@ -1415,12 +1463,12 @@ EOF
   fi
 
   echo $ac_n "checking for elf_fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:1419: checking for elf_fpregset_t in sys/procfs.h" >&5
+echo "configure:1467: checking for elf_fpregset_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_elf_fpregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1424 "configure"
+#line 1472 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
@@ -1429,7 +1477,7 @@ int main() {
 elf_fpregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:1433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
 else
@@ -1458,14 +1506,14 @@ USE_THREAD_DB=
 
 if test "$srv_linux_thread_db" = "yes"; then
   echo $ac_n "checking for libthread_db""... $ac_c" 1>&6
-echo "configure:1462: checking for libthread_db" >&5
+echo "configure:1510: checking for libthread_db" >&5
 if eval "test \"`echo '$''{'srv_cv_thread_db'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   old_LIBS="$LIBS"
   LIBS="$LIBS -lthread_db"
   cat > conftest.$ac_ext <<EOF
-#line 1469 "configure"
+#line 1517 "configure"
 #include "confdefs.h"
 void ps_pglobal_lookup() {}
    void ps_pdread() {}
@@ -1479,7 +1527,7 @@ int main() {
 td_ta_new();
 ; return 0; }
 EOF
-if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   srv_cv_thread_db="-lthread_db"
 else
@@ -1495,7 +1543,7 @@ else
  fi
  LIBS="$old_LIBS `eval echo "$thread_db"`"
  cat > conftest.$ac_ext <<EOF
-#line 1499 "configure"
+#line 1547 "configure"
 #include "confdefs.h"
 void ps_pglobal_lookup() {}
    void ps_pdread() {}
@@ -1509,7 +1557,7 @@ int main() {
 td_ta_new();
 ; return 0; }
 EOF
-if { (eval echo configure:1513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   srv_cv_thread_db="$thread_db"
 else
index 9c3106da616eb5d0238fe0879c575254721fc7dc..a5a34dfbda0208c7a54c260bc6c40e43ad24724a 100644 (file)
@@ -34,6 +34,8 @@ AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
                 proc_service.h sys/procfs.h thread_db.h linux/elf.h dnl
                 stdlib.h unistd.h)
 
+BFD_NEED_DECLARATION(strerror)
+
 . ${srcdir}/configure.srv
 
 if test "${srv_linux_usrregs}" = "yes"; then
index 45242749a972b39b433b22fb14c0716b29223326..ec7a2b851faa36624a40714fdf25fcb9eaeec462 100644 (file)
@@ -54,14 +54,15 @@ static void
 perror_with_name (char *string)
 {
 #ifndef STDC_HEADERS
-  extern int sys_nerr;
-  extern char *sys_errlist[];
   extern int errno;
 #endif
   const char *err;
   char *combined;
 
-  err = (errno < sys_nerr) ? sys_errlist[errno] : "unknown error";
+  err = strerror (errno);
+  if (err == NULL)
+    err = "unknown error";
+
   combined = (char *) alloca (strlen (err) + strlen (string) + 3);
   strcpy (combined, string);
   strcat (combined, ": ");
index cd075b2df8d3f8e213923e6dc434722652084c5f..2e8bb981b520a08b57fe718754778f64adca0736 100644 (file)
@@ -80,6 +80,17 @@ arm_breakpoint_at (CORE_ADDR where)
   return 0;
 }
 
+/* We only place breakpoints in empty marker functions, and thread locking
+   is outside of the function.  So rather than importing software single-step,
+   we can just run until exit.  */
+static CORE_ADDR
+arm_reinsert_addr ()
+{
+  unsigned long pc;
+  collect_register_by_name ("lr", &pc);
+  return pc;
+}
+
 struct linux_target_ops the_low_target = {
   arm_num_regs,
   arm_regmap,
@@ -89,7 +100,7 @@ struct linux_target_ops the_low_target = {
   arm_set_pc,
   (const char *) &arm_breakpoint,
   arm_breakpoint_len,
-  NULL,
+  arm_reinsert_addr,
   0,
   arm_breakpoint_at,
 };
index c700d40ba3ac160f2e28d324cd354b53917229f5..55c187c1bd53c53d0d00e60ebb32657b56475142 100644 (file)
@@ -175,8 +175,7 @@ linux_attach_lwp (int pid, int tid)
   if (ptrace (PTRACE_ATTACH, pid, 0, 0) != 0)
     {
       fprintf (stderr, "Cannot attach to process %d: %s (%d)\n", pid,
-              errno < sys_nerr ? sys_errlist[errno] : "unknown error",
-              errno);
+              strerror (errno), errno);
       fflush (stderr);
 
       /* If we fail to attach to an LWP, just return.  */
index ee84561f17cfd73f506c0d67984cd15a4f58b032..cbe2f95c47ebe6e0b8d72f5d91ef7578f36999cd 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU/Linux/SH specific low level interface, for the remote server for GDB.
-   Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002
+   Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -39,10 +39,10 @@ static int sh_regmap[] = {
  REG_MACH*4, REG_MACL*4, REG_SR*4,
  REG_FPUL*4, REG_FPSCR*4,
 
- REG_FPREG0+0,   REG_FPREG0+4,   REG_FPREG0+8,   REG_FPREG0+12,
- REG_FPREG0+16,  REG_FPREG0+20,  REG_FPREG0+24,  REG_FPREG0+28,
- REG_FPREG0+32,  REG_FPREG0+36,  REG_FPREG0+40,  REG_FPREG0+44,
- REG_FPREG0+48,  REG_FPREG0+52,  REG_FPREG0+56,  REG_FPREG0+60,
+ REG_FPREG0*4+0,   REG_FPREG0*4+4,   REG_FPREG0*4+8,   REG_FPREG0*4+12,
+ REG_FPREG0*4+16,  REG_FPREG0*4+20,  REG_FPREG0*4+24,  REG_FPREG0*4+28,
+ REG_FPREG0*4+32,  REG_FPREG0*4+36,  REG_FPREG0*4+40,  REG_FPREG0*4+44,
+ REG_FPREG0*4+48,  REG_FPREG0*4+52,  REG_FPREG0*4+56,  REG_FPREG0*4+60,
 };
 
 static int
index 6edc88327e9716fddd7259d8df6a131346100095..977b0e3f3d3a2d3fa4903e143224379d8c9b3d8c 100644 (file)
@@ -276,5 +276,3 @@ check_mem_write (CORE_ADDR mem_addr, char *buf, int mem_len)
        memcpy (buf + buf_offset, breakpoint_data + copy_offset, copy_len);
     }
 }
-
-
index 746502b3d632afcffde7d6c3dccc60e1e49b6f7a..5212deb2c4a077183ddcb727d03f395b5cabc9fb 100644 (file)
 #include <string.h>
 #endif
 
+#ifdef NEED_DECLARATION_STRERROR
+#ifndef strerror
+extern char *strerror (int);   /* X3.159-1989  4.11.6.2 */
+#endif
+#endif
+
 #ifndef ATTR_NORETURN
 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
 #define ATTR_NORETURN __attribute__ ((noreturn))
index e13eda80d46157496a8f57b367d726b21a3d184b..20244d6cf833bef7590ae00a58d2893b9d534ffa 100644 (file)
@@ -33,16 +33,13 @@ void
 perror_with_name (char *string)
 {
 #ifndef STDC_HEADERS
-  extern int sys_nerr;
-  extern char *sys_errlist[];
   extern int errno;
 #endif
   const char *err;
   char *combined;
 
-  if (errno < sys_nerr)
-    err = sys_errlist[errno];
-  else
+  err = strerror (errno);
+  if (err == NULL)
     err = "unknown error";
 
   combined = (char *) alloca (strlen (err) + strlen (string) + 3);
index bbfd118520119b5fd9ff3e5d36a4853cd8b6efdb..d9947f9f87da70c837f5b4a7b40fdb1ef59f4dbe 100644 (file)
@@ -433,7 +433,7 @@ gnuv3_baseclass_offset (struct type *type, int index, char *valaddr,
 static void
 init_gnuv3_ops (void)
 {
-  vtable_type_gdbarch_data = register_gdbarch_data (build_gdb_vtable_type, 0);
+  vtable_type_gdbarch_data = register_gdbarch_data (build_gdb_vtable_type);
 
   gnu_v3_abi_ops.shortname = "gnu-v3";
   gnu_v3_abi_ops.longname = "GNU G++ Version 3 ABI";
index 1253b4d6ca15f0da935c04fb82fb8840f5f29b29..c60c299f20d6118439cd458d2be7af4dbe3f5b1f 100644 (file)
@@ -771,7 +771,7 @@ h8300_extract_return_value (struct type *type, struct regcache *regcache,
                            void *valbuf)
 {
   int len = TYPE_LENGTH (type);
-  ULONGEST c;
+  ULONGEST c, addr;
 
   switch (len)
     {
@@ -786,9 +786,17 @@ h8300_extract_return_value (struct type *type, struct regcache *regcache,
        regcache_cooked_read_unsigned (regcache, E_RET1_REGNUM, &c);
        store_unsigned_integer ((void*)((char *)valbuf + 2), 2, c);
        break;
-      case 8:          /* long long, double and long double are all defined
-                          as 4 byte types so far so this shouldn't happen. */
-       error ("I don't know how a 8 byte value is returned.");
+      case 8:  /* long long is now 8 bytes.  */
+       if (TYPE_CODE (type) == TYPE_CODE_INT)
+         {
+           regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &addr);
+           c = read_memory_unsigned_integer ((CORE_ADDR) addr, len);
+           store_unsigned_integer (valbuf, len, c);
+         }
+       else
+         {
+           error ("I don't know how this 8 byte value is returned.");
+         }
        break;
     }
 }
@@ -798,7 +806,7 @@ h8300h_extract_return_value (struct type *type, struct regcache *regcache,
                            void *valbuf)
 {
   int len = TYPE_LENGTH (type);
-  ULONGEST c;
+  ULONGEST c, addr;
 
   switch (len)
     {
@@ -808,9 +816,17 @@ h8300h_extract_return_value (struct type *type, struct regcache *regcache,
        regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
        store_unsigned_integer (valbuf, len, c);
        break;
-      case 8:          /* long long, double and long double are all defined
-                          as 4 byte types so far so this shouldn't happen. */
-       error ("I don't know how a 8 byte value is returned.");
+      case 8:  /* long long is now 8 bytes.  */
+       if (TYPE_CODE (type) == TYPE_CODE_INT)
+         {
+           regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &addr);
+           c = read_memory_unsigned_integer ((CORE_ADDR) addr, len);
+           store_unsigned_integer (valbuf, len, c);
+         }
+       else
+         {
+           error ("I don't know how this 8 byte value is returned.");
+         }
        break;
     }
 }
@@ -830,19 +846,19 @@ h8300_store_return_value (struct type *type, struct regcache *regcache,
   switch (len)
     {
       case 1:
-      case 2:
+    case 2:    /* short... */
        val = extract_unsigned_integer (valbuf, len);
        regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM, val);
        break;
-      case 4:                  /* long, float */
+      case 4:  /* long, float */
        val = extract_unsigned_integer (valbuf, len);
        regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM,
                                        (val >> 16) &0xffff);
        regcache_cooked_write_unsigned (regcache, E_RET1_REGNUM, val & 0xffff);
        break;
-      case 8:          /* long long, double and long double are all defined
-                            as 4 byte types so far so this shouldn't happen. */
-       error ("I don't know how to return a 8 byte value.");
+      case 8:  /* long long, double and long double are all defined
+                  as 4 byte types so far so this shouldn't happen.  */
+       error ("I don't know how to return an 8 byte value.");
        break;
     }
 }
@@ -858,13 +874,13 @@ h8300h_store_return_value (struct type *type, struct regcache *regcache,
     {
       case 1:
       case 2:
-      case 4:                  /* long, float */
+      case 4:  /* long, float */
        val = extract_unsigned_integer (valbuf, len);
        regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM, val);
        break;
-      case 8:          /* long long, double and long double are all defined
-                            as 4 byte types so far so this shouldn't happen. */
-       error ("I don't know how to return a 8 byte value.");
+      case 8:  /* long long, double and long double are all defined
+                  as 4 byte types so far so this shouldn't happen.  */
+       error ("I don't know how to return an 8 byte value.");
        break;
     }
 }
@@ -1310,13 +1326,16 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_int_bit (gdbarch, 2 * TARGET_CHAR_BIT);
   set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
-  set_gdbarch_long_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+  set_gdbarch_long_long_bit (gdbarch, 8 * TARGET_CHAR_BIT);
   set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
   set_gdbarch_long_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
 
   /* set_gdbarch_stack_align (gdbarch, SOME_stack_align); */
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
 
+  /* Char is unsigned.  */
+  set_gdbarch_char_signed (gdbarch, 0);
+
   return gdbarch;
 }
 
index 0fb7c8f879d307bb5785dce3e00e580c5a0c8554..5d26c7c5442b570f562bf21f508266774f7b7243 100644 (file)
@@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "gdbcore.h"
 #include "osabi.h"
 #include "gdb_string.h"
+#include "frame.h"
 
 /* Forward declarations.  */
 extern void _initialize_hppa_hpux_tdep (void);
index 2a8ddc7dc3122fb200585467c941cb09de2199cc..a20a3c677e239ff56e61b73a8d9eadf13ae96218 100644 (file)
@@ -678,6 +678,88 @@ hppa_breakpoint_from_pc (CORE_ADDR *pc, int *len)
   return breakpoint;
 }
 
+/* Return the name of a register.  */
+
+const char *
+hppa_register_name (int i)
+{
+  static char *names[] = {
+    "flags",  "r1",      "rp",     "r3",
+    "r4",     "r5",      "r6",     "r7",
+    "r8",     "r9",      "r10",    "r11",
+    "r12",    "r13",     "r14",    "r15",
+    "r16",    "r17",     "r18",    "r19",
+    "r20",    "r21",     "r22",    "r23",
+    "r24",    "r25",     "r26",    "dp",
+    "ret0",   "ret1",    "sp",     "r31",
+    "sar",    "pcoqh",   "pcsqh",  "pcoqt",
+    "pcsqt",  "eiem",    "iir",    "isr",
+    "ior",    "ipsw",    "goto",   "sr4",
+    "sr0",    "sr1",     "sr2",    "sr3",
+    "sr5",    "sr6",     "sr7",    "cr0",
+    "cr8",    "cr9",     "ccr",    "cr12",
+    "cr13",   "cr24",    "cr25",   "cr26",
+    "mpsfu_high","mpsfu_low","mpsfu_ovflo","pad",
+    "fpsr",    "fpe1",   "fpe2",   "fpe3",
+    "fpe4",   "fpe5",    "fpe6",   "fpe7",
+    "fr4",     "fr4R",   "fr5",    "fr5R",
+    "fr6",    "fr6R",    "fr7",    "fr7R",
+    "fr8",     "fr8R",   "fr9",    "fr9R",
+    "fr10",   "fr10R",   "fr11",   "fr11R",
+    "fr12",    "fr12R",  "fr13",   "fr13R",
+    "fr14",   "fr14R",   "fr15",   "fr15R",
+    "fr16",    "fr16R",  "fr17",   "fr17R",
+    "fr18",   "fr18R",   "fr19",   "fr19R",
+    "fr20",    "fr20R",  "fr21",   "fr21R",
+    "fr22",   "fr22R",   "fr23",   "fr23R",
+    "fr24",    "fr24R",  "fr25",   "fr25R",
+    "fr26",   "fr26R",   "fr27",   "fr27R",
+    "fr28",    "fr28R",  "fr29",   "fr29R",
+    "fr30",   "fr30R",   "fr31",   "fr31R"
+  };
+  if (i < 0 || i >= (sizeof (names) / sizeof (*names)))
+    return NULL;
+  else
+    return names[i];
+}
+
+const char *
+hppa64_register_name (int i)
+{
+  static char *names[] = {
+    "flags",  "r1",      "rp",     "r3",
+    "r4",     "r5",      "r6",     "r7",
+    "r8",     "r9",      "r10",    "r11",
+    "r12",    "r13",     "r14",    "r15",
+    "r16",    "r17",     "r18",    "r19",
+    "r20",    "r21",     "r22",    "r23",
+    "r24",    "r25",     "r26",    "dp",
+    "ret0",   "ret1",    "sp",     "r31",
+    "sar",    "pcoqh",   "pcsqh",  "pcoqt",
+    "pcsqt",  "eiem",    "iir",    "isr",
+    "ior",    "ipsw",    "goto",   "sr4",
+    "sr0",    "sr1",     "sr2",    "sr3",
+    "sr5",    "sr6",     "sr7",    "cr0",
+    "cr8",    "cr9",     "ccr",    "cr12",
+    "cr13",   "cr24",    "cr25",   "cr26",
+    "mpsfu_high","mpsfu_low","mpsfu_ovflo","pad",
+    "fpsr",    "fpe1",   "fpe2",   "fpe3",
+    "fr4",    "fr5",     "fr6",    "fr7",
+    "fr8",     "fr9",    "fr10",   "fr11",
+    "fr12",   "fr13",    "fr14",   "fr15",
+    "fr16",    "fr17",   "fr18",   "fr19",
+    "fr20",   "fr21",    "fr22",   "fr23",
+    "fr24",    "fr25",   "fr26",   "fr27",
+    "fr28",  "fr29",    "fr30",   "fr31"
+  };
+  if (i < 0 || i >= (sizeof (names) / sizeof (*names)))
+    return NULL;
+  else
+    return names[i];
+}
+
+
+
 /* Return the adjustment necessary to make for addresses on the stack
    as presented by hpread.c.
 
@@ -4940,6 +5022,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
   set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
   set_gdbarch_deprecated_register_virtual_type (gdbarch, hppa_register_virtual_type);
+  set_gdbarch_register_name (gdbarch, hppa_register_name);
   set_gdbarch_deprecated_store_struct_return (gdbarch, hppa_store_struct_return);
   set_gdbarch_deprecated_extract_return_value (gdbarch,
                                                hppa_extract_return_value);
index 3b981806dc2677d6e56e17d8a0d3750abc05c6bf..328dff29f3a8d8f0bcf1e357887128af1751d153 100644 (file)
@@ -851,7 +851,7 @@ static const struct frame_unwind i386_frame_unwind =
 };
 
 static const struct frame_unwind *
-i386_frame_p (CORE_ADDR pc)
+i386_frame_sniffer (struct frame_info *next_frame)
 {
   return &i386_frame_unwind;
 }
@@ -929,8 +929,9 @@ static const struct frame_unwind i386_sigtramp_frame_unwind =
 };
 
 static const struct frame_unwind *
-i386_sigtramp_frame_p (CORE_ADDR pc)
+i386_sigtramp_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   char *name;
 
   /* We shouldn't even bother to try if the OSABI didn't register
@@ -1811,16 +1812,15 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_fetch_pointer_argument (gdbarch, i386_fetch_pointer_argument);
 
   /* Hook in the DWARF CFI frame unwinder.  */
-  frame_unwind_append_predicate (gdbarch, dwarf2_frame_p);
-  set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
+  frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
 
   frame_base_set_default (gdbarch, &i386_frame_base);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
-  frame_unwind_append_predicate (gdbarch, i386_sigtramp_frame_p);
-  frame_unwind_append_predicate (gdbarch, i386_frame_p);
+  frame_unwind_append_sniffer (gdbarch, i386_sigtramp_frame_sniffer);
+  frame_unwind_append_sniffer (gdbarch, i386_frame_sniffer);
 
   return gdbarch;
 }
index 7d4cc43072aefb142ff236328ff294d9e7ce8a71..dacb6720bd4694675e0b0ac83190af4935bc57d3 100644 (file)
@@ -634,7 +634,8 @@ ia64_linux_stopped_by_watchpoint (ptid_t ptid)
   errno = 0;
   ptrace (PTRACE_GETSIGINFO, tid, (PTRACE_ARG3_TYPE) 0, &siginfo);
 
-  if (errno != 0 || (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
+  if (errno != 0 || siginfo.si_signo != SIGTRAP || 
+      (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */)
     return 0;
 
   psr = read_register_pid (IA64_PSR_REGNUM, ptid);
index 0bc4dea01828017477514a1a747980a8e5dc9e34..b6992d90f53393f3e4f820d24ec265b4025823e2 100644 (file)
@@ -1520,7 +1520,7 @@ static void
 ia64_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
 {
   /* FIXME: See above. */
-  /* Note that most of the work was done in ia64_push_arguments() */
+  /* Note that most of the work was done in ia64_push_dummy_call() */
   struct_return_address = addr;
 }
 
@@ -1853,8 +1853,10 @@ find_func_descr (CORE_ADDR faddr, CORE_ADDR *fdaptr)
 }
 
 static CORE_ADDR
-ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
-                   int struct_return, CORE_ADDR struct_addr)
+ia64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+                     struct regcache *regcache, CORE_ADDR bp_addr,
+                     int nargs, struct value **args, CORE_ADDR sp,
+                     int struct_return, CORE_ADDR struct_addr)
 {
   int argno;
   struct value *arg;
@@ -1862,7 +1864,9 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
   int len, argoffset;
   int nslots, rseslots, memslots, slotnum, nfuncargs;
   int floatreg;
-  CORE_ADDR bsp, cfm, pfs, new_bsp, funcdescaddr;
+  ULONGEST bsp, cfm, pfs, new_bsp;
+  CORE_ADDR funcdescaddr;
+  ULONGEST global_pointer = FIND_GLOBAL_POINTER (func_addr);
 
   nslots = 0;
   nfuncargs = 0;
@@ -1887,21 +1891,21 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
   memslots = nslots - rseslots;
 
   /* Allocate a new RSE frame */
-  cfm = read_register (IA64_CFM_REGNUM);
+  regcache_cooked_read_unsigned (regcache, IA64_CFM_REGNUM, &cfm);
 
-  bsp = read_register (IA64_BSP_REGNUM);
+  regcache_cooked_read_unsigned (regcache, IA64_BSP_REGNUM, &bsp);
   bsp = rse_address_add (bsp, cfm & 0x7f);
   new_bsp = rse_address_add (bsp, rseslots);
-  write_register (IA64_BSP_REGNUM, new_bsp);
+  regcache_cooked_write_unsigned (regcache, IA64_BSP_REGNUM, new_bsp);
 
-  pfs = read_register (IA64_PFS_REGNUM);
+  regcache_cooked_read_unsigned (regcache, IA64_PFS_REGNUM, &pfs);
   pfs &= 0xc000000000000000LL;
   pfs |= (cfm & 0xffffffffffffLL);
-  write_register (IA64_PFS_REGNUM, pfs);
+  regcache_cooked_write_unsigned (regcache, IA64_PFS_REGNUM, pfs);
 
   cfm &= 0xc000000000000000LL;
   cfm |= rseslots;
-  write_register (IA64_CFM_REGNUM, cfm);
+  regcache_cooked_write_unsigned (regcache, IA64_CFM_REGNUM, cfm);
   
   /* We will attempt to find function descriptors in the .opd segment,
      but if we can't we'll construct them ourselves.  That being the
@@ -1979,11 +1983,12 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
          len = TYPE_LENGTH (type);
          while (len > 0 && floatreg < IA64_FR16_REGNUM)
            {
-             ia64_register_convert_to_raw (
-               float_elt_type,
-               floatreg,
-               VALUE_CONTENTS (arg) + argoffset,
-               &deprecated_registers[REGISTER_BYTE (floatreg)]);
+             char buf[MAX_REGISTER_SIZE];
+             ia64_register_convert_to_raw (float_elt_type,
+                                           floatreg,
+                                           VALUE_CONTENTS (arg) + argoffset,
+                                           buf);
+             regcache_raw_write (regcache, floatreg, buf);
              floatreg++;
              argoffset += TYPE_LENGTH (float_elt_type);
              len -= TYPE_LENGTH (float_elt_type);
@@ -1994,11 +1999,14 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
   /* Store the struct return value in r8 if necessary. */
   if (struct_return)
     {
-      store_unsigned_integer (&deprecated_registers[REGISTER_BYTE (IA64_GR8_REGNUM)],
-                             REGISTER_RAW_SIZE (IA64_GR8_REGNUM),
-                             struct_addr);
+      regcache_cooked_write_unsigned (regcache, IA64_GR8_REGNUM, struct_addr);
     }
 
+  if (global_pointer != 0)
+    regcache_cooked_write_unsigned (regcache, IA64_GR1_REGNUM, global_pointer);
+
+  regcache_cooked_write_unsigned (regcache, IA64_BR0_REGNUM, bp_addr);
+
   /* Sync gdb's idea of what the registers are with the target. */
   target_store_registers (-1);
 
@@ -2018,18 +2026,6 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
   return sp;
 }
 
-static CORE_ADDR
-ia64_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
-  CORE_ADDR global_pointer = FIND_GLOBAL_POINTER (pc);
-
-  if (global_pointer != 0)
-    write_register (IA64_GR1_REGNUM, global_pointer);
-
-  write_register (IA64_BR0_REGNUM, CALL_DUMMY_ADDRESS ());
-  return sp;
-}
-
 static void
 ia64_store_return_value (struct type *type, char *valbuf)
 {
@@ -2164,6 +2160,13 @@ process_note_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
     }
 }
 
+static int
+ia64_print_insn (bfd_vma memaddr, struct disassemble_info *info)
+{
+  info->bytes_per_line = SLOT_MULTIPLIER;
+  return print_insn_ia64 (memaddr, info);
+}
+
 static struct gdbarch *
 ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
@@ -2289,8 +2292,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_write_pc (gdbarch, ia64_write_pc);
 
   /* Settings for calling functions in the inferior.  */
-  set_gdbarch_deprecated_push_arguments (gdbarch, ia64_push_arguments);
-  set_gdbarch_deprecated_push_return_address (gdbarch, ia64_push_return_address);
+  set_gdbarch_push_dummy_call (gdbarch, ia64_push_dummy_call);
   set_gdbarch_deprecated_pop_frame (gdbarch, ia64_pop_frame);
 
   set_gdbarch_deprecated_call_dummy_words (gdbarch, ia64_call_dummy_words);
@@ -2318,6 +2320,8 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_remote_translate_xfer_address (
     gdbarch, ia64_remote_translate_xfer_address);
 
+  set_gdbarch_print_insn (gdbarch, ia64_print_insn);
+
   return gdbarch;
 }
 
@@ -2327,7 +2331,4 @@ void
 _initialize_ia64_tdep (void)
 {
   register_gdbarch_init (bfd_arch_ia64, ia64_gdbarch_init);
-
-  deprecated_tm_print_insn = print_insn_ia64;
-  deprecated_tm_print_insn_info.bytes_per_line = SLOT_MULTIPLIER;
 }
index 123fba067cf5974d20ccde0ca29564d2797dd8e9..4fd97ae5652d97822f2aaa144063c3b3cb184ae6 100644 (file)
@@ -274,8 +274,8 @@ legacy_push_dummy_code (struct gdbarch *gdbarch,
      with the values.  Instead a DEPRECATED_FIX_CALL_DUMMY replacement
      (PUSH_DUMMY_BREAKPOINT?) should just do everything.  */
 #ifdef GDB_TARGET_IS_HPPA
-  real_pc = DEPRECATED_FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,
-                                      value_type, using_gcc);
+  (*real_pc) = DEPRECATED_FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs,
+                                         args, value_type, using_gcc);
 #else
   if (DEPRECATED_FIX_CALL_DUMMY_P ())
     {
@@ -421,7 +421,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
       vector.  Hence this direct call.
 
       A follow-on change is to modify this interface so that it takes
-      thread OR frame OR tpid as a parameter, and returns a dummy
+      thread OR frame OR ptid as a parameter, and returns a dummy
       frame handle.  The handle can then be used further down as a
       parameter to generic_save_dummy_frame_tos().  Hmm, thinking
       about it, since everything is ment to be using generic dummy
@@ -445,7 +445,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
           On a RISC architecture, a void parameterless generic dummy
           frame (i.e., no parameters, no result) typically does not
           need to push anything the stack and hence can leave SP and
-          FP.  Similarly, a framelss (possibly leaf) function does
+          FP.  Similarly, a frameless (possibly leaf) function does
           not push anything on the stack and, hence, that too can
           leave FP and SP unchanged.  As a consequence, a sequence of
           void parameterless generic dummy frame calls to frameless
index 911e865cf4e845d86142ee8777edef12956a5482..6831d6be8f93504118d9c9d9a8b1bd4a444fe550 100644 (file)
@@ -1651,7 +1651,8 @@ registers_info (char *addr_exp, int fpregs)
 
       /* A register name?  */
       {
-       int regnum = frame_map_name_to_regnum (start, end - start);
+       int regnum = frame_map_name_to_regnum (deprecated_selected_frame,
+                                              start, end - start);
        if (regnum >= 0)
          {
            gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
@@ -1676,24 +1677,24 @@ registers_info (char *addr_exp, int fpregs)
 
       /* A register group?  */
       {
-       struct reggroup *const *group;
-       for (group = reggroups (current_gdbarch);
-            (*group) != NULL;
-            group++)
+       struct reggroup *group;
+       for (group = reggroup_next (current_gdbarch, NULL);
+            group != NULL;
+            group = reggroup_next (current_gdbarch, group))
          {
            /* Don't bother with a length check.  Should the user
               enter a short register group name, go with the first
               group that matches.  */
-           if (strncmp (start, reggroup_name ((*group)), end - start) == 0)
+           if (strncmp (start, reggroup_name (group), end - start) == 0)
              break;
          }
-       if ((*group) != NULL)
+       if (group != NULL)
          {
            int regnum;
            for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
              {
                if (gdbarch_register_reggroup_p (current_gdbarch, regnum,
-                                                (*group)))
+                                                group))
                  gdbarch_print_registers_info (current_gdbarch,
                                                gdb_stdout, deprecated_selected_frame,
                                                regnum, fpregs);
index e4ea747008b80d9329f79aad501329b55cf18f31..282a3ec33fb09c67bdc98904e42c6cfe536628ab 100644 (file)
@@ -446,7 +446,7 @@ linux_info_proc_cmd (char *args, int from_tty)
       if ((procfile = fopen (fname1, "r")) > 0)
        {
          while (fgets (buffer, sizeof (buffer), procfile) != NULL)
-           printf_filtered (buffer);
+           puts_filtered (buffer);
          fclose (procfile);
        }
       else
index f8ac1542409a363e41a1cba2e56b13e03451dc18..970a8e64a84e01e20803071fea2947590971721a 100644 (file)
-// OBSOLETE /* Remote debugging interface to m32r and mon2000 ROM monitors for GDB, 
-// OBSOLETE    the GNU debugger.
-// OBSOLETE    Copyright 1996, 1997, 1998, 1999, 2000, 2001
-// OBSOLETE    Free Software Foundation, Inc.
-// OBSOLETE 
-// OBSOLETE    Adapted by Michael Snyder of Cygnus Support.
-// OBSOLETE 
-// OBSOLETE    This file is part of GDB.
-// OBSOLETE 
-// OBSOLETE    This program is free software; you can redistribute it and/or modify
-// OBSOLETE    it under the terms of the GNU General Public License as published by
-// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE    (at your option) any later version.
-// OBSOLETE 
-// OBSOLETE    This program is distributed in the hope that it will be useful,
-// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// OBSOLETE    GNU General Public License for more details.
-// OBSOLETE 
-// OBSOLETE    You should have received a copy of the GNU General Public License
-// OBSOLETE    along with this program; if not, write to the Free Software
-// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE    Boston, MA 02111-1307, USA.  */
-// OBSOLETE 
-// OBSOLETE /* This module defines communication with the Mitsubishi m32r monitor */
-// OBSOLETE 
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include "target.h"
-// OBSOLETE #include "monitor.h"
-// OBSOLETE #include "serial.h"
-// OBSOLETE #include "symtab.h"
-// OBSOLETE #include "command.h"
-// OBSOLETE #include "gdbcmd.h"
-// OBSOLETE #include "symfile.h"               /* for generic load */
-// OBSOLETE #include <time.h>          /* for time_t */
-// OBSOLETE #include "gdb_string.h"
-// OBSOLETE #include "objfiles.h"              /* for ALL_OBJFILES etc. */
-// OBSOLETE #include "inferior.h"              /* for write_pc() */
-// OBSOLETE #include <ctype.h>
-// OBSOLETE #include "regcache.h"
-// OBSOLETE 
-// OBSOLETE extern void report_transfer_performance (unsigned long, time_t, time_t);
-// OBSOLETE 
-// OBSOLETE /*
-// OBSOLETE  * All this stuff just to get my host computer's IP address!
-// OBSOLETE  */
-// OBSOLETE #include <sys/types.h>
-// OBSOLETE #include <netdb.h>         /* for hostent */
-// OBSOLETE #include <netinet/in.h>            /* for struct in_addr */
-// OBSOLETE #if 1
-// OBSOLETE #include <arpa/inet.h>             /* for inet_ntoa */
-// OBSOLETE #endif
-// OBSOLETE 
-// OBSOLETE static char *board_addr;   /* user-settable IP address for M32R-EVA */
-// OBSOLETE static char *server_addr;  /* user-settable IP address for gdb host */
-// OBSOLETE static char *download_path;        /* user-settable path for SREC files     */
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE /* 
-// OBSOLETE  * Function: m32r_load_1 (helper function)
-// OBSOLETE  */
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE m32r_load_section (bfd *abfd, asection *s, void *obj)
-// OBSOLETE {
-// OBSOLETE   unsigned int *data_count = obj;
-// OBSOLETE   if (s->flags & SEC_LOAD)
-// OBSOLETE     {
-// OBSOLETE       bfd_size_type section_size = bfd_section_size (abfd, s);
-// OBSOLETE       bfd_vma section_base = bfd_section_lma (abfd, s);
-// OBSOLETE       unsigned int buffer, i;
-// OBSOLETE 
-// OBSOLETE       *data_count += section_size;
-// OBSOLETE 
-// OBSOLETE       printf_filtered ("Loading section %s, size 0x%lx lma ",
-// OBSOLETE                   bfd_section_name (abfd, s), section_size);
-// OBSOLETE       print_address_numeric (section_base, 1, gdb_stdout);
-// OBSOLETE       printf_filtered ("\n");
-// OBSOLETE       gdb_flush (gdb_stdout);
-// OBSOLETE       monitor_printf ("%s mw\r", paddr_nz (section_base));
-// OBSOLETE       for (i = 0; i < section_size; i += 4)
-// OBSOLETE    {
-// OBSOLETE      QUIT;
-// OBSOLETE      monitor_expect (" -> ", NULL, 0);
-// OBSOLETE      bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4);
-// OBSOLETE      monitor_printf ("%x\n", buffer);
-// OBSOLETE    }
-// OBSOLETE       monitor_expect (" -> ", NULL, 0);
-// OBSOLETE       monitor_printf ("q\n");
-// OBSOLETE       monitor_expect_prompt (NULL, 0);
-// OBSOLETE     }
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static int
-// OBSOLETE m32r_load_1 (void *dummy)
-// OBSOLETE {
-// OBSOLETE   int data_count = 0;
-// OBSOLETE 
-// OBSOLETE   bfd_map_over_sections ((bfd *) dummy, m32r_load_section, &data_count);
-// OBSOLETE   return data_count;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* 
-// OBSOLETE  * Function: m32r_load (an alternate way to load) 
-// OBSOLETE  */
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE m32r_load (char *filename, int from_tty)
-// OBSOLETE {
-// OBSOLETE   bfd *abfd;
-// OBSOLETE   asection *s;
-// OBSOLETE   unsigned int i, data_count = 0;
-// OBSOLETE   time_t start_time, end_time;     /* for timing of download */
-// OBSOLETE 
-// OBSOLETE   if (filename == NULL || filename[0] == 0)
-// OBSOLETE     filename = get_exec_file (1);
-// OBSOLETE 
-// OBSOLETE   abfd = bfd_openr (filename, 0);
-// OBSOLETE   if (!abfd)
-// OBSOLETE     error ("Unable to open file %s\n", filename);
-// OBSOLETE   if (bfd_check_format (abfd, bfd_object) == 0)
-// OBSOLETE     error ("File is not an object file\n");
-// OBSOLETE   start_time = time (NULL);
-// OBSOLETE #if 0
-// OBSOLETE   for (s = abfd->sections; s; s = s->next)
-// OBSOLETE     if (s->flags & SEC_LOAD)
-// OBSOLETE       {
-// OBSOLETE    bfd_size_type section_size = bfd_section_size (abfd, s);
-// OBSOLETE    bfd_vma section_base = bfd_section_vma (abfd, s);
-// OBSOLETE    unsigned int buffer;
-// OBSOLETE 
-// OBSOLETE    data_count += section_size;
-// OBSOLETE 
-// OBSOLETE    printf_filtered ("Loading section %s, size 0x%lx vma ",
-// OBSOLETE                     bfd_section_name (abfd, s), section_size);
-// OBSOLETE    print_address_numeric (section_base, 1, gdb_stdout);
-// OBSOLETE    printf_filtered ("\n");
-// OBSOLETE    gdb_flush (gdb_stdout);
-// OBSOLETE    monitor_printf ("%x mw\r", section_base);
-// OBSOLETE    for (i = 0; i < section_size; i += 4)
-// OBSOLETE      {
-// OBSOLETE        monitor_expect (" -> ", NULL, 0);
-// OBSOLETE        bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4);
-// OBSOLETE        monitor_printf ("%x\n", buffer);
-// OBSOLETE      }
-// OBSOLETE    monitor_expect (" -> ", NULL, 0);
-// OBSOLETE    monitor_printf ("q\n");
-// OBSOLETE    monitor_expect_prompt (NULL, 0);
-// OBSOLETE       }
-// OBSOLETE #else
-// OBSOLETE   if (!(catch_errors (m32r_load_1, abfd, "Load aborted!\n", RETURN_MASK_ALL)))
-// OBSOLETE     {
-// OBSOLETE       monitor_printf ("q\n");
-// OBSOLETE       return;
-// OBSOLETE     }
-// OBSOLETE #endif
-// OBSOLETE   end_time = time (NULL);
-// OBSOLETE   printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd));
-// OBSOLETE   report_transfer_performance (data_count, start_time, end_time);
-// OBSOLETE 
-// OBSOLETE   /* Finally, make the PC point at the start address */
-// OBSOLETE   if (exec_bfd)
-// OBSOLETE     write_pc (bfd_get_start_address (exec_bfd));
-// OBSOLETE 
-// OBSOLETE   inferior_ptid = null_ptid;       /* No process now */
-// OBSOLETE 
-// OBSOLETE   /* This is necessary because many things were based on the PC at the
-// OBSOLETE      time that we attached to the monitor, which is no longer valid
-// OBSOLETE      now that we have loaded new code (and just changed the PC).
-// OBSOLETE      Another way to do this might be to call normal_stop, except that
-// OBSOLETE      the stack may not be valid, and things would get horribly
-// OBSOLETE      confused... */
-// OBSOLETE 
-// OBSOLETE   clear_symtab_users ();
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE m32r_load_gen (char *filename, int from_tty)
-// OBSOLETE {
-// OBSOLETE   generic_load (filename, from_tty);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static void m32r_open (char *args, int from_tty);
-// OBSOLETE static void mon2000_open (char *args, int from_tty);
-// OBSOLETE 
-// OBSOLETE /* This array of registers needs to match the indexes used by GDB. The
-// OBSOLETE    whole reason this exists is because the various ROM monitors use
-// OBSOLETE    different names than GDB does, and don't support all the registers
-// OBSOLETE    either. So, typing "info reg sp" becomes an "A7". */
-// OBSOLETE 
-// OBSOLETE static char *m32r_regnames[] =
-// OBSOLETE {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
-// OBSOLETE  "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
-// OBSOLETE  "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch",
-// OBSOLETE };
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE m32r_supply_register (char *regname, int regnamelen, char *val, int vallen)
-// OBSOLETE {
-// OBSOLETE   int regno;
-// OBSOLETE   int num_regs = sizeof (m32r_regnames) / sizeof (m32r_regnames[0]);
-// OBSOLETE 
-// OBSOLETE   for (regno = 0; regno < num_regs; regno++)
-// OBSOLETE     if (strncmp (regname, m32r_regnames[regno], regnamelen) == 0)
-// OBSOLETE       break;
-// OBSOLETE 
-// OBSOLETE   if (regno >= num_regs)
-// OBSOLETE     return;                        /* no match */
-// OBSOLETE 
-// OBSOLETE   if (regno == ACCL_REGNUM)
-// OBSOLETE     {                              /* special handling for 64-bit acc reg */
-// OBSOLETE       monitor_supply_register (ACCH_REGNUM, val);
-// OBSOLETE       val = strchr (val, ':');     /* skip past ':' to get 2nd word */
-// OBSOLETE       if (val != NULL)
-// OBSOLETE    monitor_supply_register (ACCL_REGNUM, val + 1);
-// OBSOLETE     }
-// OBSOLETE   else
-// OBSOLETE     {
-// OBSOLETE       monitor_supply_register (regno, val);
-// OBSOLETE       if (regno == PSW_REGNUM)
-// OBSOLETE    {
-// OBSOLETE      unsigned long psw = strtoul (val, NULL, 16);
-// OBSOLETE      char *zero = "00000000", *one = "00000001";
-// OBSOLETE 
-// OBSOLETE #ifdef SM_REGNUM
-// OBSOLETE      /* Stack mode bit */
-// OBSOLETE      monitor_supply_register (SM_REGNUM, (psw & 0x80) ? one : zero);
-// OBSOLETE #endif
-// OBSOLETE #ifdef BSM_REGNUM
-// OBSOLETE      /* Backup stack mode bit */
-// OBSOLETE      monitor_supply_register (BSM_REGNUM, (psw & 0x8000) ? one : zero);
-// OBSOLETE #endif
-// OBSOLETE #ifdef IE_REGNUM
-// OBSOLETE      /* Interrupt enable bit */
-// OBSOLETE      monitor_supply_register (IE_REGNUM, (psw & 0x40) ? one : zero);
-// OBSOLETE #endif
-// OBSOLETE #ifdef BIE_REGNUM
-// OBSOLETE      /* Backup interrupt enable bit */
-// OBSOLETE      monitor_supply_register (BIE_REGNUM, (psw & 0x4000) ? one : zero);
-// OBSOLETE #endif
-// OBSOLETE #ifdef COND_REGNUM
-// OBSOLETE      /* Condition bit (carry etc.) */
-// OBSOLETE      monitor_supply_register (COND_REGNUM, (psw & 0x1) ? one : zero);
-// OBSOLETE #endif
-// OBSOLETE #ifdef CBR_REGNUM
-// OBSOLETE      monitor_supply_register (CBR_REGNUM, (psw & 0x1) ? one : zero);
-// OBSOLETE #endif
-// OBSOLETE #ifdef BPC_REGNUM
-// OBSOLETE      monitor_supply_register (BPC_REGNUM, zero);   /* KLUDGE:   (???????) */
-// OBSOLETE #endif
-// OBSOLETE #ifdef BCARRY_REGNUM
-// OBSOLETE      monitor_supply_register (BCARRY_REGNUM, zero);        /* KLUDGE: (??????) */
-// OBSOLETE #endif
-// OBSOLETE    }
-// OBSOLETE 
-// OBSOLETE       if (regno == SPI_REGNUM || regno == SPU_REGNUM)
-// OBSOLETE    {                       /* special handling for stack pointer (spu or spi) */
-// OBSOLETE      unsigned long stackmode = read_register (PSW_REGNUM) & 0x80;
-// OBSOLETE 
-// OBSOLETE      if (regno == SPI_REGNUM && !stackmode)        /* SP == SPI */
-// OBSOLETE        monitor_supply_register (SP_REGNUM, val);
-// OBSOLETE      else if (regno == SPU_REGNUM && stackmode)    /* SP == SPU */
-// OBSOLETE        monitor_supply_register (SP_REGNUM, val);
-// OBSOLETE    }
-// OBSOLETE     }
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* m32r RevC board monitor */
-// OBSOLETE 
-// OBSOLETE static struct target_ops m32r_ops;
-// OBSOLETE 
-// OBSOLETE static char *m32r_inits[] =
-// OBSOLETE {"\r", NULL};
-// OBSOLETE 
-// OBSOLETE static struct monitor_ops m32r_cmds;
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE init_m32r_cmds (void)
-// OBSOLETE {
-// OBSOLETE   m32r_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST;
-// OBSOLETE   m32r_cmds.init = m32r_inits;     /* Init strings */
-// OBSOLETE   m32r_cmds.cont = "go\r"; /* continue command */
-// OBSOLETE   m32r_cmds.step = "step\r";       /* single step */
-// OBSOLETE   m32r_cmds.stop = NULL;   /* interrupt command */
-// OBSOLETE   m32r_cmds.set_break = "%x +bp\r";        /* set a breakpoint */
-// OBSOLETE   m32r_cmds.clr_break = "%x -bp\r";        /* clear a breakpoint */
-// OBSOLETE   m32r_cmds.clr_all_break = "bpoff\r";     /* clear all breakpoints */
-// OBSOLETE   m32r_cmds.fill = "%x %x %x fill\r";      /* fill (start length val) */
-// OBSOLETE   m32r_cmds.setmem.cmdb = "%x 1 %x fill\r";        /* setmem.cmdb (addr, value) */
-// OBSOLETE   m32r_cmds.setmem.cmdw = "%x 1 %x fillh\r";       /* setmem.cmdw (addr, value) */
-// OBSOLETE   m32r_cmds.setmem.cmdl = "%x 1 %x fillw\r";       /* setmem.cmdl (addr, value) */
-// OBSOLETE   m32r_cmds.setmem.cmdll = NULL;   /* setmem.cmdll (addr, value) */
-// OBSOLETE   m32r_cmds.setmem.resp_delim = NULL;      /* setmem.resp_delim */
-// OBSOLETE   m32r_cmds.setmem.term = NULL;    /* setmem.term */
-// OBSOLETE   m32r_cmds.setmem.term_cmd = NULL;        /* setmem.term_cmd */
-// OBSOLETE   m32r_cmds.getmem.cmdb = "%x %x dump\r";  /* getmem.cmdb (addr, len) */
-// OBSOLETE   m32r_cmds.getmem.cmdw = NULL;    /* getmem.cmdw (addr, len) */
-// OBSOLETE   m32r_cmds.getmem.cmdl = NULL;    /* getmem.cmdl (addr, len) */
-// OBSOLETE   m32r_cmds.getmem.cmdll = NULL;   /* getmem.cmdll (addr, len) */
-// OBSOLETE   m32r_cmds.getmem.resp_delim = ": ";      /* getmem.resp_delim */
-// OBSOLETE   m32r_cmds.getmem.term = NULL;    /* getmem.term */
-// OBSOLETE   m32r_cmds.getmem.term_cmd = NULL;        /* getmem.term_cmd */
-// OBSOLETE   m32r_cmds.setreg.cmd = "%x to %%%s\r";   /* setreg.cmd (name, value) */
-// OBSOLETE   m32r_cmds.setreg.resp_delim = NULL;      /* setreg.resp_delim */
-// OBSOLETE   m32r_cmds.setreg.term = NULL;    /* setreg.term */
-// OBSOLETE   m32r_cmds.setreg.term_cmd = NULL;        /* setreg.term_cmd */
-// OBSOLETE   m32r_cmds.getreg.cmd = NULL;     /* getreg.cmd (name) */
-// OBSOLETE   m32r_cmds.getreg.resp_delim = NULL;      /* getreg.resp_delim */
-// OBSOLETE   m32r_cmds.getreg.term = NULL;    /* getreg.term */
-// OBSOLETE   m32r_cmds.getreg.term_cmd = NULL;        /* getreg.term_cmd */
-// OBSOLETE   m32r_cmds.dump_registers = ".reg\r";     /* dump_registers */
-// OBSOLETE   m32r_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)";      /* register_pattern */
-// OBSOLETE   m32r_cmds.supply_register = m32r_supply_register;        /* supply_register */
-// OBSOLETE   m32r_cmds.load_routine = NULL;   /* load_routine (defaults to SRECs) */
-// OBSOLETE   m32r_cmds.load = NULL;   /* download command */
-// OBSOLETE   m32r_cmds.loadresp = NULL;       /* load response */
-// OBSOLETE   m32r_cmds.prompt = "ok ";        /* monitor command prompt */
-// OBSOLETE   m32r_cmds.line_term = "\r";      /* end-of-line terminator */
-// OBSOLETE   m32r_cmds.cmd_end = NULL;        /* optional command terminator */
-// OBSOLETE   m32r_cmds.target = &m32r_ops;    /* target operations */
-// OBSOLETE   m32r_cmds.stopbits = SERIAL_1_STOPBITS;  /* number of stop bits */
-// OBSOLETE   m32r_cmds.regnames = m32r_regnames;      /* registers names */
-// OBSOLETE   m32r_cmds.magic = MONITOR_OPS_MAGIC;     /* magic */
-// OBSOLETE }                          /* init_m32r_cmds */
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE m32r_open (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE   monitor_open (args, &m32r_cmds, from_tty);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Mon2000 monitor (MSA2000 board) */
-// OBSOLETE 
-// OBSOLETE static struct target_ops mon2000_ops;
-// OBSOLETE static struct monitor_ops mon2000_cmds;
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE init_mon2000_cmds (void)
-// OBSOLETE {
-// OBSOLETE   mon2000_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST;
-// OBSOLETE   mon2000_cmds.init = m32r_inits;  /* Init strings */
-// OBSOLETE   mon2000_cmds.cont = "go\r";      /* continue command */
-// OBSOLETE   mon2000_cmds.step = "step\r";    /* single step */
-// OBSOLETE   mon2000_cmds.stop = NULL;        /* interrupt command */
-// OBSOLETE   mon2000_cmds.set_break = "%x +bp\r";     /* set a breakpoint */
-// OBSOLETE   mon2000_cmds.clr_break = "%x -bp\r";     /* clear a breakpoint */
-// OBSOLETE   mon2000_cmds.clr_all_break = "bpoff\r";  /* clear all breakpoints */
-// OBSOLETE   mon2000_cmds.fill = "%x %x %x fill\r";   /* fill (start length val) */
-// OBSOLETE   mon2000_cmds.setmem.cmdb = "%x 1 %x fill\r";     /* setmem.cmdb (addr, value) */
-// OBSOLETE   mon2000_cmds.setmem.cmdw = "%x 1 %x fillh\r";            /* setmem.cmdw (addr, value) */
-// OBSOLETE   mon2000_cmds.setmem.cmdl = "%x 1 %x fillw\r";            /* setmem.cmdl (addr, value) */
-// OBSOLETE   mon2000_cmds.setmem.cmdll = NULL;        /* setmem.cmdll (addr, value) */
-// OBSOLETE   mon2000_cmds.setmem.resp_delim = NULL;   /* setmem.resp_delim */
-// OBSOLETE   mon2000_cmds.setmem.term = NULL; /* setmem.term */
-// OBSOLETE   mon2000_cmds.setmem.term_cmd = NULL;     /* setmem.term_cmd */
-// OBSOLETE   mon2000_cmds.getmem.cmdb = "%x %x dump\r";       /* getmem.cmdb (addr, len) */
-// OBSOLETE   mon2000_cmds.getmem.cmdw = NULL; /* getmem.cmdw (addr, len) */
-// OBSOLETE   mon2000_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, len) */
-// OBSOLETE   mon2000_cmds.getmem.cmdll = NULL;        /* getmem.cmdll (addr, len) */
-// OBSOLETE   mon2000_cmds.getmem.resp_delim = ": ";   /* getmem.resp_delim */
-// OBSOLETE   mon2000_cmds.getmem.term = NULL; /* getmem.term */
-// OBSOLETE   mon2000_cmds.getmem.term_cmd = NULL;     /* getmem.term_cmd */
-// OBSOLETE   mon2000_cmds.setreg.cmd = "%x to %%%s\r";        /* setreg.cmd (name, value) */
-// OBSOLETE   mon2000_cmds.setreg.resp_delim = NULL;   /* setreg.resp_delim */
-// OBSOLETE   mon2000_cmds.setreg.term = NULL; /* setreg.term */
-// OBSOLETE   mon2000_cmds.setreg.term_cmd = NULL;     /* setreg.term_cmd */
-// OBSOLETE   mon2000_cmds.getreg.cmd = NULL;  /* getreg.cmd (name) */
-// OBSOLETE   mon2000_cmds.getreg.resp_delim = NULL;   /* getreg.resp_delim */
-// OBSOLETE   mon2000_cmds.getreg.term = NULL; /* getreg.term */
-// OBSOLETE   mon2000_cmds.getreg.term_cmd = NULL;     /* getreg.term_cmd */
-// OBSOLETE   mon2000_cmds.dump_registers = ".reg\r";  /* dump_registers */
-// OBSOLETE   mon2000_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)";   /* register_pattern */
-// OBSOLETE   mon2000_cmds.supply_register = m32r_supply_register;     /* supply_register */
-// OBSOLETE   mon2000_cmds.load_routine = NULL;        /* load_routine (defaults to SRECs) */
-// OBSOLETE   mon2000_cmds.load = NULL;        /* download command */
-// OBSOLETE   mon2000_cmds.loadresp = NULL;    /* load response */
-// OBSOLETE   mon2000_cmds.prompt = "Mon2000>";        /* monitor command prompt */
-// OBSOLETE   mon2000_cmds.line_term = "\r";   /* end-of-line terminator */
-// OBSOLETE   mon2000_cmds.cmd_end = NULL;     /* optional command terminator */
-// OBSOLETE   mon2000_cmds.target = &mon2000_ops;      /* target operations */
-// OBSOLETE   mon2000_cmds.stopbits = SERIAL_1_STOPBITS;       /* number of stop bits */
-// OBSOLETE   mon2000_cmds.regnames = m32r_regnames;   /* registers names */
-// OBSOLETE   mon2000_cmds.magic = MONITOR_OPS_MAGIC;  /* magic */
-// OBSOLETE }                          /* init_mon2000_cmds */
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE mon2000_open (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE   monitor_open (args, &mon2000_cmds, from_tty);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: set_board_address
-// OBSOLETE    Tell the BootOne monitor what it's ethernet IP address is. */
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE m32r_set_board_address (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE   int resp_len;
-// OBSOLETE   char buf[1024];
-// OBSOLETE 
-// OBSOLETE   if (args && *args)
-// OBSOLETE     {
-// OBSOLETE       monitor_printf ("ulip %s\n", args);
-// OBSOLETE       resp_len = monitor_expect_prompt (buf, sizeof (buf));
-// OBSOLETE       /* now parse the result for success */
-// OBSOLETE     }
-// OBSOLETE   else
-// OBSOLETE     error ("Requires argument (IP address for M32R-EVA board)");
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: set_server_address
-// OBSOLETE    Tell the BootOne monitor what gdb's ethernet IP address is. */
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE m32r_set_server_address (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE   int resp_len;
-// OBSOLETE   char buf[1024];
-// OBSOLETE 
-// OBSOLETE   if (args && *args)
-// OBSOLETE     {
-// OBSOLETE       monitor_printf ("uhip %s\n", args);
-// OBSOLETE       resp_len = monitor_expect_prompt (buf, sizeof (buf));
-// OBSOLETE       /* now parse the result for success */
-// OBSOLETE     }
-// OBSOLETE   else
-// OBSOLETE     error ("Requires argument (IP address of GDB's host computer)");
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: set_download_path
-// OBSOLETE    Tell the BootOne monitor the default path for downloadable SREC files. */
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE m32r_set_download_path (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE   int resp_len;
-// OBSOLETE   char buf[1024];
-// OBSOLETE 
-// OBSOLETE   if (args && *args)
-// OBSOLETE     {
-// OBSOLETE       monitor_printf ("up %s\n", args);
-// OBSOLETE       resp_len = monitor_expect_prompt (buf, sizeof (buf));
-// OBSOLETE       /* now parse the result for success */
-// OBSOLETE     }
-// OBSOLETE   else
-// OBSOLETE     error ("Requires argument (default path for downloadable SREC files)");
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE m32r_upload_command (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE   bfd *abfd;
-// OBSOLETE   asection *s;
-// OBSOLETE   time_t start_time, end_time;     /* for timing of download */
-// OBSOLETE   int resp_len, data_count = 0;
-// OBSOLETE   char buf[1024];
-// OBSOLETE   struct hostent *hostent;
-// OBSOLETE   struct in_addr inet_addr;
-// OBSOLETE 
-// OBSOLETE   /* first check to see if there's an ethernet port! */
-// OBSOLETE   monitor_printf ("ust\r");
-// OBSOLETE   resp_len = monitor_expect_prompt (buf, sizeof (buf));
-// OBSOLETE   if (!strchr (buf, ':'))
-// OBSOLETE     error ("No ethernet connection!");
-// OBSOLETE 
-// OBSOLETE   if (board_addr == 0)
-// OBSOLETE     {
-// OBSOLETE       /* scan second colon in the output from the "ust" command */
-// OBSOLETE       char *myIPaddress = strchr (strchr (buf, ':') + 1, ':') + 1;
-// OBSOLETE 
-// OBSOLETE       while (isspace (*myIPaddress))
-// OBSOLETE    myIPaddress++;
-// OBSOLETE 
-// OBSOLETE       if (!strncmp (myIPaddress, "0.0.", 4))       /* empty */
-// OBSOLETE    error ("Please use 'set board-address' to set the M32R-EVA board's IP address.");
-// OBSOLETE       if (strchr (myIPaddress, '('))
-// OBSOLETE    *(strchr (myIPaddress, '(')) = '\0';    /* delete trailing junk */
-// OBSOLETE       board_addr = xstrdup (myIPaddress);
-// OBSOLETE     }
-// OBSOLETE   if (server_addr == 0)
-// OBSOLETE     {
-// OBSOLETE       buf[0] = 0;
-// OBSOLETE       gethostname (buf, sizeof (buf));
-// OBSOLETE       if (buf[0] != 0)
-// OBSOLETE    hostent = gethostbyname (buf);
-// OBSOLETE       if (hostent != 0)
-// OBSOLETE    {
-// OBSOLETE #if 1
-// OBSOLETE      memcpy (&inet_addr.s_addr, hostent->h_addr,
-// OBSOLETE              sizeof (inet_addr.s_addr));
-// OBSOLETE      server_addr = (char *) inet_ntoa (inet_addr);
-// OBSOLETE #else
-// OBSOLETE      server_addr = (char *) inet_ntoa (hostent->h_addr);
-// OBSOLETE #endif
-// OBSOLETE    }
-// OBSOLETE       if (server_addr == 0)        /* failed? */
-// OBSOLETE    error ("Need to know gdb host computer's IP address (use 'set server-address')");
-// OBSOLETE     }
-// OBSOLETE 
-// OBSOLETE   if (args == 0 || args[0] == 0)   /* no args: upload the current file */
-// OBSOLETE     args = get_exec_file (1);
-// OBSOLETE 
-// OBSOLETE   if (args[0] != '/' && download_path == 0)
-// OBSOLETE     {
-// OBSOLETE       if (current_directory)
-// OBSOLETE    download_path = xstrdup (current_directory);
-// OBSOLETE       else
-// OBSOLETE    error ("Need to know default download path (use 'set download-path')");
-// OBSOLETE     }
-// OBSOLETE 
-// OBSOLETE   start_time = time (NULL);
-// OBSOLETE   monitor_printf ("uhip %s\r", server_addr);
-// OBSOLETE   resp_len = monitor_expect_prompt (buf, sizeof (buf));            /* parse result? */
-// OBSOLETE   monitor_printf ("ulip %s\r", board_addr);
-// OBSOLETE   resp_len = monitor_expect_prompt (buf, sizeof (buf));            /* parse result? */
-// OBSOLETE   if (args[0] != '/')
-// OBSOLETE     monitor_printf ("up %s\r", download_path);     /* use default path */
-// OBSOLETE   else
-// OBSOLETE     monitor_printf ("up\r");       /* rooted filename/path */
-// OBSOLETE   resp_len = monitor_expect_prompt (buf, sizeof (buf));            /* parse result? */
-// OBSOLETE 
-// OBSOLETE   if (strrchr (args, '.') && !strcmp (strrchr (args, '.'), ".srec"))
-// OBSOLETE     monitor_printf ("ul %s\r", args);
-// OBSOLETE   else                             /* add ".srec" suffix */
-// OBSOLETE     monitor_printf ("ul %s.srec\r", args);
-// OBSOLETE   resp_len = monitor_expect_prompt (buf, sizeof (buf));            /* parse result? */
-// OBSOLETE 
-// OBSOLETE   if (buf[0] == 0 || strstr (buf, "complete") == 0)
-// OBSOLETE     error ("Upload file not found: %s.srec\nCheck IP addresses and download path.", args);
-// OBSOLETE   else
-// OBSOLETE     printf_filtered (" -- Ethernet load complete.\n");
-// OBSOLETE 
-// OBSOLETE   end_time = time (NULL);
-// OBSOLETE   abfd = bfd_openr (args, 0);
-// OBSOLETE   if (abfd != NULL)
-// OBSOLETE     {                              /* Download is done -- print section statistics */
-// OBSOLETE       if (bfd_check_format (abfd, bfd_object) == 0)
-// OBSOLETE    {
-// OBSOLETE      printf_filtered ("File is not an object file\n");
-// OBSOLETE    }
-// OBSOLETE       for (s = abfd->sections; s; s = s->next)
-// OBSOLETE    if (s->flags & SEC_LOAD)
-// OBSOLETE      {
-// OBSOLETE        bfd_size_type section_size = bfd_section_size (abfd, s);
-// OBSOLETE        bfd_vma section_base = bfd_section_lma (abfd, s);
-// OBSOLETE        unsigned int buffer;
-// OBSOLETE 
-// OBSOLETE        data_count += section_size;
-// OBSOLETE 
-// OBSOLETE        printf_filtered ("Loading section %s, size 0x%lx lma ",
-// OBSOLETE                         bfd_section_name (abfd, s), section_size);
-// OBSOLETE        print_address_numeric (section_base, 1, gdb_stdout);
-// OBSOLETE        printf_filtered ("\n");
-// OBSOLETE        gdb_flush (gdb_stdout);
-// OBSOLETE      }
-// OBSOLETE       /* Finally, make the PC point at the start address */
-// OBSOLETE       write_pc (bfd_get_start_address (abfd));
-// OBSOLETE       report_transfer_performance (data_count, start_time, end_time);
-// OBSOLETE       printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd));
-// OBSOLETE     }
-// OBSOLETE   inferior_ptid = null_ptid;       /* No process now */
-// OBSOLETE 
-// OBSOLETE   /* This is necessary because many things were based on the PC at the
-// OBSOLETE      time that we attached to the monitor, which is no longer valid
-// OBSOLETE      now that we have loaded new code (and just changed the PC).
-// OBSOLETE      Another way to do this might be to call normal_stop, except that
-// OBSOLETE      the stack may not be valid, and things would get horribly
-// OBSOLETE      confused... */
-// OBSOLETE 
-// OBSOLETE   clear_symtab_users ();
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE void
-// OBSOLETE _initialize_m32r_rom (void)
-// OBSOLETE {
-// OBSOLETE   /* Initialize m32r RevC monitor target */
-// OBSOLETE   init_m32r_cmds ();
-// OBSOLETE   init_monitor_ops (&m32r_ops);
-// OBSOLETE 
-// OBSOLETE   m32r_ops.to_shortname = "m32r";
-// OBSOLETE   m32r_ops.to_longname = "m32r monitor";
-// OBSOLETE   m32r_ops.to_load = m32r_load_gen;        /* monitor lacks a download command */
-// OBSOLETE   m32r_ops.to_doc = "Debug via the m32r monitor.\n\
-// OBSOLETE Specify the serial device it is connected to (e.g. /dev/ttya).";
-// OBSOLETE   m32r_ops.to_open = m32r_open;
-// OBSOLETE   add_target (&m32r_ops);
-// OBSOLETE 
-// OBSOLETE   /* Initialize mon2000 monitor target */
-// OBSOLETE   init_mon2000_cmds ();
-// OBSOLETE   init_monitor_ops (&mon2000_ops);
-// OBSOLETE 
-// OBSOLETE   mon2000_ops.to_shortname = "mon2000";
-// OBSOLETE   mon2000_ops.to_longname = "Mon2000 monitor";
-// OBSOLETE   mon2000_ops.to_load = m32r_load_gen;     /* monitor lacks a download command */
-// OBSOLETE   mon2000_ops.to_doc = "Debug via the Mon2000 monitor.\n\
-// OBSOLETE Specify the serial device it is connected to (e.g. /dev/ttya).";
-// OBSOLETE   mon2000_ops.to_open = mon2000_open;
-// OBSOLETE   add_target (&mon2000_ops);
-// OBSOLETE 
-// OBSOLETE   add_show_from_set
-// OBSOLETE     (add_set_cmd ("download-path", class_obscure, var_string,
-// OBSOLETE              (char *) &download_path,
-// OBSOLETE              "Set the default path for downloadable SREC files.",
-// OBSOLETE              &setlist),
-// OBSOLETE      &showlist);
-// OBSOLETE 
-// OBSOLETE   add_show_from_set
-// OBSOLETE     (add_set_cmd ("board-address", class_obscure, var_string,
-// OBSOLETE              (char *) &board_addr,
-// OBSOLETE              "Set IP address for M32R-EVA target board.",
-// OBSOLETE              &setlist),
-// OBSOLETE      &showlist);
-// OBSOLETE 
-// OBSOLETE   add_show_from_set
-// OBSOLETE     (add_set_cmd ("server-address", class_obscure, var_string,
-// OBSOLETE              (char *) &server_addr,
-// OBSOLETE            "Set IP address for download server (GDB's host computer).",
-// OBSOLETE              &setlist),
-// OBSOLETE      &showlist);
-// OBSOLETE 
-// OBSOLETE   add_com ("upload", class_obscure, m32r_upload_command,
-// OBSOLETE       "Upload the srec file via the monitor's Ethernet upload capability.");
-// OBSOLETE 
-// OBSOLETE   add_com ("tload", class_obscure, m32r_load, "test upload command.");
-// OBSOLETE }
+/* Remote debugging interface to m32r and mon2000 ROM monitors for GDB, 
+   the GNU debugger.
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
+
+   Adapted by Michael Snyder of Cygnus Support.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* This module defines communication with the Renesas m32r monitor */
+
+#include "defs.h"
+#include "gdbcore.h"
+#include "target.h"
+#include "monitor.h"
+#include "serial.h"
+#include "symtab.h"
+#include "command.h"
+#include "gdbcmd.h"
+#include "symfile.h"           /* for generic load */
+#include <time.h>              /* for time_t */
+#include "gdb_string.h"
+#include "objfiles.h"          /* for ALL_OBJFILES etc. */
+#include "inferior.h"          /* for write_pc() */
+#include <ctype.h>
+#include "regcache.h"
+
+/*
+ * All this stuff just to get my host computer's IP address!
+ */
+#include <sys/types.h>
+#include <netdb.h>             /* for hostent */
+#include <netinet/in.h>                /* for struct in_addr */
+#if 1
+#include <arpa/inet.h>         /* for inet_ntoa */
+#endif
+
+static char *board_addr;       /* user-settable IP address for M32R-EVA */
+static char *server_addr;      /* user-settable IP address for gdb host */
+static char *download_path;    /* user-settable path for SREC files     */
+
+
+/* REGNUM */
+#define PSW_REGNUM      16
+#define SPI_REGNUM      18
+#define SPU_REGNUM      19
+#define ACCL_REGNUM     22
+#define ACCH_REGNUM     23
+
+
+/* 
+ * Function: m32r_load_1 (helper function)
+ */
+
+static void
+m32r_load_section (bfd *abfd, asection *s, void *obj)
+{
+  unsigned int *data_count = obj;
+  if (s->flags & SEC_LOAD)
+    {
+      bfd_size_type section_size = bfd_section_size (abfd, s);
+      bfd_vma section_base = bfd_section_lma (abfd, s);
+      unsigned int buffer, i;
+
+      *data_count += section_size;
+
+      printf_filtered ("Loading section %s, size 0x%lx lma ",
+                      bfd_section_name (abfd, s), section_size);
+      print_address_numeric (section_base, 1, gdb_stdout);
+      printf_filtered ("\n");
+      gdb_flush (gdb_stdout);
+      monitor_printf ("%s mw\r", paddr_nz (section_base));
+      for (i = 0; i < section_size; i += 4)
+       {
+         QUIT;
+         monitor_expect (" -> ", NULL, 0);
+         bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4);
+         monitor_printf ("%x\n", buffer);
+       }
+      monitor_expect (" -> ", NULL, 0);
+      monitor_printf ("q\n");
+      monitor_expect_prompt (NULL, 0);
+    }
+}
+
+static int
+m32r_load_1 (void *dummy)
+{
+  int data_count = 0;
+
+  bfd_map_over_sections ((bfd *) dummy, m32r_load_section, &data_count);
+  return data_count;
+}
+
+/* 
+ * Function: m32r_load (an alternate way to load) 
+ */
+
+static void
+m32r_load (char *filename, int from_tty)
+{
+  bfd *abfd;
+  asection *s;
+  unsigned int i, data_count = 0;
+  time_t start_time, end_time; /* for timing of download */
+
+  if (filename == NULL || filename[0] == 0)
+    filename = get_exec_file (1);
+
+  abfd = bfd_openr (filename, 0);
+  if (!abfd)
+    error ("Unable to open file %s\n", filename);
+  if (bfd_check_format (abfd, bfd_object) == 0)
+    error ("File is not an object file\n");
+  start_time = time (NULL);
+#if 0
+  for (s = abfd->sections; s; s = s->next)
+    if (s->flags & SEC_LOAD)
+      {
+       bfd_size_type section_size = bfd_section_size (abfd, s);
+       bfd_vma section_base = bfd_section_vma (abfd, s);
+       unsigned int buffer;
+
+       data_count += section_size;
+
+       printf_filtered ("Loading section %s, size 0x%lx vma ",
+                        bfd_section_name (abfd, s), section_size);
+       print_address_numeric (section_base, 1, gdb_stdout);
+       printf_filtered ("\n");
+       gdb_flush (gdb_stdout);
+       monitor_printf ("%x mw\r", section_base);
+       for (i = 0; i < section_size; i += 4)
+         {
+           monitor_expect (" -> ", NULL, 0);
+           bfd_get_section_contents (abfd, s, (char *) &buffer, i, 4);
+           monitor_printf ("%x\n", buffer);
+         }
+       monitor_expect (" -> ", NULL, 0);
+       monitor_printf ("q\n");
+       monitor_expect_prompt (NULL, 0);
+      }
+#else
+  if (!(catch_errors (m32r_load_1, abfd, "Load aborted!\n", RETURN_MASK_ALL)))
+    {
+      monitor_printf ("q\n");
+      return;
+    }
+#endif
+  end_time = time (NULL);
+  printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd));
+  print_transfer_performance (gdb_stdout, data_count, 0,
+                             end_time - start_time);
+
+  /* Finally, make the PC point at the start address */
+  if (exec_bfd)
+    write_pc (bfd_get_start_address (exec_bfd));
+
+  inferior_ptid = null_ptid;   /* No process now */
+
+  /* This is necessary because many things were based on the PC at the
+     time that we attached to the monitor, which is no longer valid
+     now that we have loaded new code (and just changed the PC).
+     Another way to do this might be to call normal_stop, except that
+     the stack may not be valid, and things would get horribly
+     confused... */
+
+  clear_symtab_users ();
+}
+
+static void
+m32r_load_gen (char *filename, int from_tty)
+{
+  generic_load (filename, from_tty);
+}
+
+static void m32r_open (char *args, int from_tty);
+static void mon2000_open (char *args, int from_tty);
+
+/* This array of registers needs to match the indexes used by GDB. The
+   whole reason this exists is because the various ROM monitors use
+   different names than GDB does, and don't support all the registers
+   either. So, typing "info reg sp" becomes an "A7". */
+
+static char *m32r_regnames[] =
+  { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+  "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+  "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch",
+};
+
+static void
+m32r_supply_register (char *regname, int regnamelen, char *val, int vallen)
+{
+  int regno;
+  int num_regs = sizeof (m32r_regnames) / sizeof (m32r_regnames[0]);
+
+  for (regno = 0; regno < num_regs; regno++)
+    if (strncmp (regname, m32r_regnames[regno], regnamelen) == 0)
+      break;
+
+  if (regno >= num_regs)
+    return;                    /* no match */
+
+  if (regno == ACCL_REGNUM)
+    {                          /* special handling for 64-bit acc reg */
+      monitor_supply_register (ACCH_REGNUM, val);
+      val = strchr (val, ':'); /* skip past ':' to get 2nd word */
+      if (val != NULL)
+       monitor_supply_register (ACCL_REGNUM, val + 1);
+    }
+  else
+    {
+      monitor_supply_register (regno, val);
+      if (regno == PSW_REGNUM)
+       {
+         unsigned long psw = strtoul (val, NULL, 16);
+         char *zero = "00000000", *one = "00000001";
+
+#ifdef SM_REGNUM
+         /* Stack mode bit */
+         monitor_supply_register (SM_REGNUM, (psw & 0x80) ? one : zero);
+#endif
+#ifdef BSM_REGNUM
+         /* Backup stack mode bit */
+         monitor_supply_register (BSM_REGNUM, (psw & 0x8000) ? one : zero);
+#endif
+#ifdef IE_REGNUM
+         /* Interrupt enable bit */
+         monitor_supply_register (IE_REGNUM, (psw & 0x40) ? one : zero);
+#endif
+#ifdef BIE_REGNUM
+         /* Backup interrupt enable bit */
+         monitor_supply_register (BIE_REGNUM, (psw & 0x4000) ? one : zero);
+#endif
+#ifdef COND_REGNUM
+         /* Condition bit (carry etc.) */
+         monitor_supply_register (COND_REGNUM, (psw & 0x1) ? one : zero);
+#endif
+#ifdef CBR_REGNUM
+         monitor_supply_register (CBR_REGNUM, (psw & 0x1) ? one : zero);
+#endif
+#ifdef BPC_REGNUM
+         monitor_supply_register (BPC_REGNUM, zero);   /* KLUDGE:   (???????) */
+#endif
+#ifdef BCARRY_REGNUM
+         monitor_supply_register (BCARRY_REGNUM, zero);        /* KLUDGE: (??????) */
+#endif
+       }
+
+      if (regno == SPI_REGNUM || regno == SPU_REGNUM)
+       {                       /* special handling for stack pointer (spu or spi) */
+         ULONGEST stackmode, psw;
+         regcache_cooked_read_unsigned (current_regcache, PSW_REGNUM, &psw);
+         stackmode = psw & 0x80;
+
+         if (regno == SPI_REGNUM && !stackmode)        /* SP == SPI */
+           monitor_supply_register (SP_REGNUM, val);
+         else if (regno == SPU_REGNUM && stackmode)    /* SP == SPU */
+           monitor_supply_register (SP_REGNUM, val);
+       }
+    }
+}
+
+/* m32r RevC board monitor */
+
+static struct target_ops m32r_ops;
+
+static char *m32r_inits[] = { "\r", NULL };
+
+static struct monitor_ops m32r_cmds;
+
+static void
+init_m32r_cmds (void)
+{
+  m32r_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST;
+  m32r_cmds.init = m32r_inits; /* Init strings */
+  m32r_cmds.cont = "go\r";     /* continue command */
+  m32r_cmds.step = "step\r";   /* single step */
+  m32r_cmds.stop = NULL;       /* interrupt command */
+  m32r_cmds.set_break = "%x +bp\r";    /* set a breakpoint */
+  m32r_cmds.clr_break = "%x -bp\r";    /* clear a breakpoint */
+  m32r_cmds.clr_all_break = "bpoff\r"; /* clear all breakpoints */
+  m32r_cmds.fill = "%x %x %x fill\r";  /* fill (start length val) */
+  m32r_cmds.setmem.cmdb = "%x 1 %x fill\r";    /* setmem.cmdb (addr, value) */
+  m32r_cmds.setmem.cmdw = "%x 1 %x fillh\r";   /* setmem.cmdw (addr, value) */
+  m32r_cmds.setmem.cmdl = "%x 1 %x fillw\r";   /* setmem.cmdl (addr, value) */
+  m32r_cmds.setmem.cmdll = NULL;       /* setmem.cmdll (addr, value) */
+  m32r_cmds.setmem.resp_delim = NULL;  /* setmem.resp_delim */
+  m32r_cmds.setmem.term = NULL;        /* setmem.term */
+  m32r_cmds.setmem.term_cmd = NULL;    /* setmem.term_cmd */
+  m32r_cmds.getmem.cmdb = "%x %x dump\r";      /* getmem.cmdb (addr, len) */
+  m32r_cmds.getmem.cmdw = NULL;        /* getmem.cmdw (addr, len) */
+  m32r_cmds.getmem.cmdl = NULL;        /* getmem.cmdl (addr, len) */
+  m32r_cmds.getmem.cmdll = NULL;       /* getmem.cmdll (addr, len) */
+  m32r_cmds.getmem.resp_delim = ": ";  /* getmem.resp_delim */
+  m32r_cmds.getmem.term = NULL;        /* getmem.term */
+  m32r_cmds.getmem.term_cmd = NULL;    /* getmem.term_cmd */
+  m32r_cmds.setreg.cmd = "%x to %%%s\r";       /* setreg.cmd (name, value) */
+  m32r_cmds.setreg.resp_delim = NULL;  /* setreg.resp_delim */
+  m32r_cmds.setreg.term = NULL;        /* setreg.term */
+  m32r_cmds.setreg.term_cmd = NULL;    /* setreg.term_cmd */
+  m32r_cmds.getreg.cmd = NULL; /* getreg.cmd (name) */
+  m32r_cmds.getreg.resp_delim = NULL;  /* getreg.resp_delim */
+  m32r_cmds.getreg.term = NULL;        /* getreg.term */
+  m32r_cmds.getreg.term_cmd = NULL;    /* getreg.term_cmd */
+  m32r_cmds.dump_registers = ".reg\r"; /* dump_registers */
+  m32r_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)";  /* register_pattern */
+  m32r_cmds.supply_register = m32r_supply_register;    /* supply_register */
+  m32r_cmds.load_routine = NULL;       /* load_routine (defaults to SRECs) */
+  m32r_cmds.load = NULL;       /* download command */
+  m32r_cmds.loadresp = NULL;   /* load response */
+  m32r_cmds.prompt = "ok ";    /* monitor command prompt */
+  m32r_cmds.line_term = "\r";  /* end-of-line terminator */
+  m32r_cmds.cmd_end = NULL;    /* optional command terminator */
+  m32r_cmds.target = &m32r_ops;        /* target operations */
+  m32r_cmds.stopbits = SERIAL_1_STOPBITS;      /* number of stop bits */
+  m32r_cmds.regnames = m32r_regnames;  /* registers names */
+  m32r_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
+}                              /* init_m32r_cmds */
+
+static void
+m32r_open (char *args, int from_tty)
+{
+  monitor_open (args, &m32r_cmds, from_tty);
+}
+
+/* Mon2000 monitor (MSA2000 board) */
+
+static struct target_ops mon2000_ops;
+static struct monitor_ops mon2000_cmds;
+
+static void
+init_mon2000_cmds (void)
+{
+  mon2000_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_REGISTER_VALUE_FIRST;
+  mon2000_cmds.init = m32r_inits;      /* Init strings */
+  mon2000_cmds.cont = "go\r";  /* continue command */
+  mon2000_cmds.step = "step\r";        /* single step */
+  mon2000_cmds.stop = NULL;    /* interrupt command */
+  mon2000_cmds.set_break = "%x +bp\r"; /* set a breakpoint */
+  mon2000_cmds.clr_break = "%x -bp\r"; /* clear a breakpoint */
+  mon2000_cmds.clr_all_break = "bpoff\r";      /* clear all breakpoints */
+  mon2000_cmds.fill = "%x %x %x fill\r";       /* fill (start length val) */
+  mon2000_cmds.setmem.cmdb = "%x 1 %x fill\r"; /* setmem.cmdb (addr, value) */
+  mon2000_cmds.setmem.cmdw = "%x 1 %x fillh\r";        /* setmem.cmdw (addr, value) */
+  mon2000_cmds.setmem.cmdl = "%x 1 %x fillw\r";        /* setmem.cmdl (addr, value) */
+  mon2000_cmds.setmem.cmdll = NULL;    /* setmem.cmdll (addr, value) */
+  mon2000_cmds.setmem.resp_delim = NULL;       /* setmem.resp_delim */
+  mon2000_cmds.setmem.term = NULL;     /* setmem.term */
+  mon2000_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */
+  mon2000_cmds.getmem.cmdb = "%x %x dump\r";   /* getmem.cmdb (addr, len) */
+  mon2000_cmds.getmem.cmdw = NULL;     /* getmem.cmdw (addr, len) */
+  mon2000_cmds.getmem.cmdl = NULL;     /* getmem.cmdl (addr, len) */
+  mon2000_cmds.getmem.cmdll = NULL;    /* getmem.cmdll (addr, len) */
+  mon2000_cmds.getmem.resp_delim = ": ";       /* getmem.resp_delim */
+  mon2000_cmds.getmem.term = NULL;     /* getmem.term */
+  mon2000_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
+  mon2000_cmds.setreg.cmd = "%x to %%%s\r";    /* setreg.cmd (name, value) */
+  mon2000_cmds.setreg.resp_delim = NULL;       /* setreg.resp_delim */
+  mon2000_cmds.setreg.term = NULL;     /* setreg.term */
+  mon2000_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
+  mon2000_cmds.getreg.cmd = NULL;      /* getreg.cmd (name) */
+  mon2000_cmds.getreg.resp_delim = NULL;       /* getreg.resp_delim */
+  mon2000_cmds.getreg.term = NULL;     /* getreg.term */
+  mon2000_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
+  mon2000_cmds.dump_registers = ".reg\r";      /* dump_registers */
+  mon2000_cmds.register_pattern = "\\(\\w+\\) += \\([0-9a-fA-F]+\\b\\)";       /* register_pattern */
+  mon2000_cmds.supply_register = m32r_supply_register; /* supply_register */
+  mon2000_cmds.load_routine = NULL;    /* load_routine (defaults to SRECs) */
+  mon2000_cmds.load = NULL;    /* download command */
+  mon2000_cmds.loadresp = NULL;        /* load response */
+  mon2000_cmds.prompt = "Mon2000>";    /* monitor command prompt */
+  mon2000_cmds.line_term = "\r";       /* end-of-line terminator */
+  mon2000_cmds.cmd_end = NULL; /* optional command terminator */
+  mon2000_cmds.target = &mon2000_ops;  /* target operations */
+  mon2000_cmds.stopbits = SERIAL_1_STOPBITS;   /* number of stop bits */
+  mon2000_cmds.regnames = m32r_regnames;       /* registers names */
+  mon2000_cmds.magic = MONITOR_OPS_MAGIC;      /* magic */
+}                              /* init_mon2000_cmds */
+
+static void
+mon2000_open (char *args, int from_tty)
+{
+  monitor_open (args, &mon2000_cmds, from_tty);
+}
+
+/* Function: set_board_address
+   Tell the BootOne monitor what it's ethernet IP address is. */
+
+static void
+m32r_set_board_address (char *args, int from_tty)
+{
+  int resp_len;
+  char buf[1024];
+
+  if (args && *args)
+    {
+      monitor_printf ("ulip %s\n", args);
+      resp_len = monitor_expect_prompt (buf, sizeof (buf));
+      /* now parse the result for success */
+    }
+  else
+    error ("Requires argument (IP address for M32R-EVA board)");
+}
+
+/* Function: set_server_address
+   Tell the BootOne monitor what gdb's ethernet IP address is. */
+
+static void
+m32r_set_server_address (char *args, int from_tty)
+{
+  int resp_len;
+  char buf[1024];
+
+  if (args && *args)
+    {
+      monitor_printf ("uhip %s\n", args);
+      resp_len = monitor_expect_prompt (buf, sizeof (buf));
+      /* now parse the result for success */
+    }
+  else
+    error ("Requires argument (IP address of GDB's host computer)");
+}
+
+/* Function: set_download_path
+   Tell the BootOne monitor the default path for downloadable SREC files. */
+
+static void
+m32r_set_download_path (char *args, int from_tty)
+{
+  int resp_len;
+  char buf[1024];
+
+  if (args && *args)
+    {
+      monitor_printf ("up %s\n", args);
+      resp_len = monitor_expect_prompt (buf, sizeof (buf));
+      /* now parse the result for success */
+    }
+  else
+    error ("Requires argument (default path for downloadable SREC files)");
+}
+
+static void
+m32r_upload_command (char *args, int from_tty)
+{
+  bfd *abfd;
+  asection *s;
+  time_t start_time, end_time; /* for timing of download */
+  int resp_len, data_count = 0;
+  char buf[1024];
+  struct hostent *hostent;
+  struct in_addr inet_addr;
+
+  /* first check to see if there's an ethernet port! */
+  monitor_printf ("ust\r");
+  resp_len = monitor_expect_prompt (buf, sizeof (buf));
+  if (!strchr (buf, ':'))
+    error ("No ethernet connection!");
+
+  if (board_addr == 0)
+    {
+      /* scan second colon in the output from the "ust" command */
+      char *myIPaddress = strchr (strchr (buf, ':') + 1, ':') + 1;
+
+      while (isspace (*myIPaddress))
+       myIPaddress++;
+
+      if (!strncmp (myIPaddress, "0.0.", 4))   /* empty */
+       error
+         ("Please use 'set board-address' to set the M32R-EVA board's IP address.");
+      if (strchr (myIPaddress, '('))
+       *(strchr (myIPaddress, '(')) = '\0';    /* delete trailing junk */
+      board_addr = xstrdup (myIPaddress);
+    }
+  if (server_addr == 0)
+    {
+      buf[0] = 0;
+      gethostname (buf, sizeof (buf));
+      if (buf[0] != 0)
+       {
+         hostent = gethostbyname (buf);
+         if (hostent != 0)
+           {
+#if 1
+             memcpy (&inet_addr.s_addr, hostent->h_addr,
+                     sizeof (inet_addr.s_addr));
+             server_addr = (char *) inet_ntoa (inet_addr);
+#else
+             server_addr = (char *) inet_ntoa (hostent->h_addr);
+#endif
+           }
+       }
+      if (server_addr == 0)    /* failed? */
+       error
+         ("Need to know gdb host computer's IP address (use 'set server-address')");
+    }
+
+  if (args == 0 || args[0] == 0)       /* no args: upload the current file */
+    args = get_exec_file (1);
+
+  if (args[0] != '/' && download_path == 0)
+    {
+      if (current_directory)
+       download_path = xstrdup (current_directory);
+      else
+       error
+         ("Need to know default download path (use 'set download-path')");
+    }
+
+  start_time = time (NULL);
+  monitor_printf ("uhip %s\r", server_addr);
+  resp_len = monitor_expect_prompt (buf, sizeof (buf));        /* parse result? */
+  monitor_printf ("ulip %s\r", board_addr);
+  resp_len = monitor_expect_prompt (buf, sizeof (buf));        /* parse result? */
+  if (args[0] != '/')
+    monitor_printf ("up %s\r", download_path); /* use default path */
+  else
+    monitor_printf ("up\r");   /* rooted filename/path */
+  resp_len = monitor_expect_prompt (buf, sizeof (buf));        /* parse result? */
+
+  if (strrchr (args, '.') && !strcmp (strrchr (args, '.'), ".srec"))
+    monitor_printf ("ul %s\r", args);
+  else                         /* add ".srec" suffix */
+    monitor_printf ("ul %s.srec\r", args);
+  resp_len = monitor_expect_prompt (buf, sizeof (buf));        /* parse result? */
+
+  if (buf[0] == 0 || strstr (buf, "complete") == 0)
+    error
+      ("Upload file not found: %s.srec\nCheck IP addresses and download path.",
+       args);
+  else
+    printf_filtered (" -- Ethernet load complete.\n");
+
+  end_time = time (NULL);
+  abfd = bfd_openr (args, 0);
+  if (abfd != NULL)
+    {                          /* Download is done -- print section statistics */
+      if (bfd_check_format (abfd, bfd_object) == 0)
+       {
+         printf_filtered ("File is not an object file\n");
+       }
+      for (s = abfd->sections; s; s = s->next)
+       if (s->flags & SEC_LOAD)
+         {
+           bfd_size_type section_size = bfd_section_size (abfd, s);
+           bfd_vma section_base = bfd_section_lma (abfd, s);
+           unsigned int buffer;
+
+           data_count += section_size;
+
+           printf_filtered ("Loading section %s, size 0x%lx lma ",
+                            bfd_section_name (abfd, s), section_size);
+           print_address_numeric (section_base, 1, gdb_stdout);
+           printf_filtered ("\n");
+           gdb_flush (gdb_stdout);
+         }
+      /* Finally, make the PC point at the start address */
+      write_pc (bfd_get_start_address (abfd));
+      printf_filtered ("Start address 0x%lx\n", bfd_get_start_address (abfd));
+      print_transfer_performance (gdb_stdout, data_count, 0,
+                                 end_time - start_time);
+    }
+  inferior_ptid = null_ptid;   /* No process now */
+
+  /* This is necessary because many things were based on the PC at the
+     time that we attached to the monitor, which is no longer valid
+     now that we have loaded new code (and just changed the PC).
+     Another way to do this might be to call normal_stop, except that
+     the stack may not be valid, and things would get horribly
+     confused... */
+
+  clear_symtab_users ();
+}
+
+void
+_initialize_m32r_rom (void)
+{
+  /* Initialize m32r RevC monitor target */
+  init_m32r_cmds ();
+  init_monitor_ops (&m32r_ops);
+
+  m32r_ops.to_shortname = "m32r";
+  m32r_ops.to_longname = "m32r monitor";
+  m32r_ops.to_load = m32r_load_gen;    /* monitor lacks a download command */
+  m32r_ops.to_doc = "Debug via the m32r monitor.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya).";
+  m32r_ops.to_open = m32r_open;
+  add_target (&m32r_ops);
+
+  /* Initialize mon2000 monitor target */
+  init_mon2000_cmds ();
+  init_monitor_ops (&mon2000_ops);
+
+  mon2000_ops.to_shortname = "mon2000";
+  mon2000_ops.to_longname = "Mon2000 monitor";
+  mon2000_ops.to_load = m32r_load_gen; /* monitor lacks a download command */
+  mon2000_ops.to_doc = "Debug via the Mon2000 monitor.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya).";
+  mon2000_ops.to_open = mon2000_open;
+  add_target (&mon2000_ops);
+
+  add_setshow_cmd ("download-path", class_obscure,
+                  var_string, &download_path,
+                  "Set the default path for downloadable SREC files.",
+                  "Show the default path for downloadable SREC files.",
+                  NULL, NULL, &setlist, &showlist);
+
+  add_setshow_cmd ("board-address", class_obscure,
+                  var_string, &board_addr,
+                  "Set IP address for M32R-EVA target board.",
+                  "Show IP address for M32R-EVA target board.",
+                  NULL, NULL, &setlist, &showlist);
+
+  add_setshow_cmd ("server-address", class_obscure,
+                  var_string, &server_addr,
+                  "Set IP address for download server (GDB's host computer).",
+                  "Show IP address for download server (GDB's host computer).",
+                  NULL, NULL, &setlist, &showlist);
+
+  add_com ("upload", class_obscure, m32r_upload_command,
+          "Upload the srec file via the monitor's Ethernet upload capability.");
+
+  add_com ("tload", class_obscure, m32r_load, "test upload command.");
+}
index d9be3eb84e6cb5e825390f122abdbd91603d4801..c7033ea17a3b9b7f8ac0ca757b4166bacbf5f48d 100644 (file)
-// OBSOLETE /****************************************************************************
-// OBSOLETE 
-// OBSOLETE            THIS SOFTWARE IS NOT COPYRIGHTED
-// OBSOLETE 
-// OBSOLETE    HP offers the following for use in the public domain.  HP makes no
-// OBSOLETE    warranty with regard to the software or it's performance and the
-// OBSOLETE    user accepts the software "AS IS" with all faults.
-// OBSOLETE 
-// OBSOLETE    HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD
-// OBSOLETE    TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OBSOLETE    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-// OBSOLETE 
-// OBSOLETE ****************************************************************************/
-// OBSOLETE 
-// OBSOLETE /****************************************************************************
-// OBSOLETE  *  Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
-// OBSOLETE  *
-// OBSOLETE  *  Module name: remcom.c $
-// OBSOLETE  *  Revision: 1.34 $
-// OBSOLETE  *  Date: 91/03/09 12:29:49 $
-// OBSOLETE  *  Contributor:     Lake Stevens Instrument Division$
-// OBSOLETE  *
-// OBSOLETE  *  Description:     low level support for gdb debugger. $
-// OBSOLETE  *
-// OBSOLETE  *  Considerations:  only works on target hardware $
-// OBSOLETE  *
-// OBSOLETE  *  Written by:      Glenn Engel $
-// OBSOLETE  *  ModuleState:     Experimental $
-// OBSOLETE  *
-// OBSOLETE  *  NOTES:           See Below $
-// OBSOLETE  *
-// OBSOLETE  *  Modified for M32R by Michael Snyder, Cygnus Support.
-// OBSOLETE  *
-// OBSOLETE  *  To enable debugger support, two things need to happen.  One, a
-// OBSOLETE  *  call to set_debug_traps() is necessary in order to allow any breakpoints
-// OBSOLETE  *  or error conditions to be properly intercepted and reported to gdb.
-// OBSOLETE  *  Two, a breakpoint needs to be generated to begin communication.  This
-// OBSOLETE  *  is most easily accomplished by a call to breakpoint().  Breakpoint()
-// OBSOLETE  *  simulates a breakpoint by executing a trap #1.
-// OBSOLETE  *
-// OBSOLETE  *  The external function exceptionHandler() is
-// OBSOLETE  *  used to attach a specific handler to a specific M32R vector number.
-// OBSOLETE  *  It should use the same privilege level it runs at.  It should
-// OBSOLETE  *  install it as an interrupt gate so that interrupts are masked
-// OBSOLETE  *  while the handler runs.
-// OBSOLETE  *
-// OBSOLETE  *  Because gdb will sometimes write to the stack area to execute function
-// OBSOLETE  *  calls, this program cannot rely on using the supervisor stack so it
-// OBSOLETE  *  uses it's own stack area reserved in the int array remcomStack.
-// OBSOLETE  *
-// OBSOLETE  *************
-// OBSOLETE  *
-// OBSOLETE  *    The following gdb commands are supported:
-// OBSOLETE  *
-// OBSOLETE  * command          function                               Return value
-// OBSOLETE  *
-// OBSOLETE  *    g             return the value of the CPU registers  hex data or ENN
-// OBSOLETE  *    G             set the value of the CPU registers     OK or ENN
-// OBSOLETE  *
-// OBSOLETE  *    mAA..AA,LLLL  Read LLLL bytes at address AA..AA      hex data or ENN
-// OBSOLETE  *    MAA..AA,LLLL: Write LLLL bytes at address AA.AA      OK or ENN
-// OBSOLETE  *    XAA..AA,LLLL: Write LLLL binary bytes at address     OK or ENN
-// OBSOLETE  *                  AA..AA
-// OBSOLETE  *
-// OBSOLETE  *    c             Resume at current address              SNN   ( signal NN)
-// OBSOLETE  *    cAA..AA       Continue at address AA..AA             SNN
-// OBSOLETE  *
-// OBSOLETE  *    s             Step one instruction                   SNN
-// OBSOLETE  *    sAA..AA       Step one instruction from AA..AA       SNN
-// OBSOLETE  *
-// OBSOLETE  *    k             kill
-// OBSOLETE  *
-// OBSOLETE  *    ?             What was the last sigval ?             SNN   (signal NN)
-// OBSOLETE  *
-// OBSOLETE  * All commands and responses are sent with a packet which includes a
-// OBSOLETE  * checksum.  A packet consists of
-// OBSOLETE  *
-// OBSOLETE  * $<packet info>#<checksum>.
-// OBSOLETE  *
-// OBSOLETE  * where
-// OBSOLETE  * <packet info> :: <characters representing the command or response>
-// OBSOLETE  * <checksum>    :: <two hex digits computed as modulo 256 sum of <packetinfo>>
-// OBSOLETE  *
-// OBSOLETE  * When a packet is received, it is first acknowledged with either '+' or '-'.
-// OBSOLETE  * '+' indicates a successful transfer.  '-' indicates a failed transfer.
-// OBSOLETE  *
-// OBSOLETE  * Example:
-// OBSOLETE  *
-// OBSOLETE  * Host:                  Reply:
-// OBSOLETE  * $m0,10#2a               +$00010203040506070809101112131415#42
-// OBSOLETE  *
-// OBSOLETE  ****************************************************************************/
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE /************************************************************************
-// OBSOLETE  *
-// OBSOLETE  * external low-level support routines
-// OBSOLETE  */
-// OBSOLETE extern void putDebugChar();        /* write a single character      */
-// OBSOLETE extern int getDebugChar(); /* read and return a single char */
-// OBSOLETE extern void exceptionHandler();    /* assign an exception handler   */
-// OBSOLETE 
-// OBSOLETE /*****************************************************************************
-// OBSOLETE  * BUFMAX defines the maximum number of characters in inbound/outbound buffers
-// OBSOLETE  * at least NUMREGBYTES*2 are needed for register packets 
-// OBSOLETE  */
-// OBSOLETE #define BUFMAX 400
-// OBSOLETE 
-// OBSOLETE static char initialized;  /* boolean flag. != 0 means we've been initialized */
-// OBSOLETE 
-// OBSOLETE int     remote_debug;
-// OBSOLETE /*  debug >  0 prints ill-formed commands in valid packets & checksum errors */
-// OBSOLETE 
-// OBSOLETE static const unsigned char hexchars[]="0123456789abcdef";
-// OBSOLETE 
-// OBSOLETE #define NUMREGS 24
-// OBSOLETE 
-// OBSOLETE /* Number of bytes of registers.  */
-// OBSOLETE #define NUMREGBYTES (NUMREGS * 4)
-// OBSOLETE enum regnames { R0,  R1,  R2,  R3,  R4,  R5,  R6,   R7,
-// OBSOLETE            R8,  R9,  R10, R11, R12, R13, R14,  R15,
-// OBSOLETE            PSW, CBR, SPI, SPU, BPC, PC,  ACCL, ACCH };
-// OBSOLETE 
-// OBSOLETE enum SYS_calls {
-// OBSOLETE    SYS_null, 
-// OBSOLETE    SYS_exit,
-// OBSOLETE    SYS_open,
-// OBSOLETE    SYS_close,
-// OBSOLETE    SYS_read,
-// OBSOLETE    SYS_write,
-// OBSOLETE    SYS_lseek,
-// OBSOLETE    SYS_unlink,
-// OBSOLETE    SYS_getpid,
-// OBSOLETE    SYS_kill,
-// OBSOLETE    SYS_fstat,
-// OBSOLETE    SYS_sbrk,
-// OBSOLETE    SYS_fork,
-// OBSOLETE    SYS_execve,
-// OBSOLETE    SYS_wait4,
-// OBSOLETE    SYS_link,
-// OBSOLETE    SYS_chdir,
-// OBSOLETE    SYS_stat,
-// OBSOLETE    SYS_utime,
-// OBSOLETE    SYS_chown,
-// OBSOLETE    SYS_chmod,
-// OBSOLETE    SYS_time,
-// OBSOLETE    SYS_pipe };
-// OBSOLETE 
-// OBSOLETE static int registers[NUMREGS];
-// OBSOLETE 
-// OBSOLETE #define STACKSIZE 8096
-// OBSOLETE static unsigned char remcomInBuffer[BUFMAX];
-// OBSOLETE static unsigned char remcomOutBuffer[BUFMAX];
-// OBSOLETE static int  remcomStack[STACKSIZE/sizeof(int)];
-// OBSOLETE static int*  stackPtr = &remcomStack[STACKSIZE/sizeof(int) - 1];
-// OBSOLETE 
-// OBSOLETE static unsigned int save_vectors[18];      /* previous exception vectors */
-// OBSOLETE 
-// OBSOLETE /* Indicate to caller of mem2hex or hex2mem that there has been an error. */
-// OBSOLETE static volatile int mem_err = 0;
-// OBSOLETE 
-// OBSOLETE /* Store the vector number here (since GDB only gets the signal
-// OBSOLETE    number through the usual means, and that's not very specific).  */
-// OBSOLETE int gdb_m32r_vector = -1;
-// OBSOLETE 
-// OBSOLETE #if 0
-// OBSOLETE #include "syscall.h" /* for SYS_exit, SYS_write etc. */
-// OBSOLETE #endif
-// OBSOLETE 
-// OBSOLETE /* Global entry points:
-// OBSOLETE  */
-// OBSOLETE 
-// OBSOLETE extern void handle_exception(int);
-// OBSOLETE extern void set_debug_traps(void);
-// OBSOLETE extern void breakpoint(void);
-// OBSOLETE 
-// OBSOLETE /* Local functions:
-// OBSOLETE  */
-// OBSOLETE 
-// OBSOLETE static int  computeSignal(int);
-// OBSOLETE static void putpacket(unsigned char *);
-// OBSOLETE static unsigned char *getpacket(void);
-// OBSOLETE 
-// OBSOLETE static unsigned char *mem2hex(unsigned char *, unsigned char *, int, int);
-// OBSOLETE static unsigned char *hex2mem(unsigned char *, unsigned char *, int, int);
-// OBSOLETE static int  hexToInt(unsigned char **, int *);
-// OBSOLETE static unsigned char *bin2mem(unsigned char *, unsigned char *, int, int);
-// OBSOLETE static void stash_registers(void);
-// OBSOLETE static void restore_registers(void);
-// OBSOLETE static int  prepare_to_step(int);
-// OBSOLETE static int  finish_from_step(void);
-// OBSOLETE static unsigned long crc32 (unsigned char *, int, unsigned long);
-// OBSOLETE 
-// OBSOLETE static void gdb_error(char *, char *);
-// OBSOLETE static int  gdb_putchar(int), gdb_puts(char *), gdb_write(char *, int);
-// OBSOLETE 
-// OBSOLETE static unsigned char *strcpy (unsigned char *, const unsigned char *);
-// OBSOLETE static int   strlen (const unsigned char *);
-// OBSOLETE 
-// OBSOLETE /*
-// OBSOLETE  * This function does all command procesing for interfacing to gdb.
-// OBSOLETE  */
-// OBSOLETE 
-// OBSOLETE void 
-// OBSOLETE handle_exception(int exceptionVector)
-// OBSOLETE {
-// OBSOLETE   int    sigval, stepping;
-// OBSOLETE   int    addr, length, i;
-// OBSOLETE   unsigned char * ptr;
-// OBSOLETE   unsigned char   buf[16];
-// OBSOLETE   int binary;
-// OBSOLETE 
-// OBSOLETE   /* Do not call finish_from_step() if this is not a trap #1
-// OBSOLETE    * (breakpoint trap).  Without this check, the finish_from_step()
-// OBSOLETE    * might interpret a system call trap as a single step trap.  This
-// OBSOLETE    * can happen if: the stub receives 's' and exits, but an interrupt
-// OBSOLETE    * was pending; the interrupt is now handled and causes the stub to
-// OBSOLETE    * be reentered because some function makes a system call.  
-// OBSOLETE    */
-// OBSOLETE   if (exceptionVector == 1)        /* Trap exception? */
-// OBSOLETE     if (!finish_from_step())       /* Go see if stepping state needs update. */
-// OBSOLETE       return;              /* "false step": let the target continue */
-// OBSOLETE 
-// OBSOLETE   gdb_m32r_vector = exceptionVector;
-// OBSOLETE 
-// OBSOLETE   if (remote_debug)
-// OBSOLETE     {
-// OBSOLETE       mem2hex((unsigned char *) &exceptionVector, buf, 4, 0);
-// OBSOLETE       gdb_error("Handle exception %s, ", buf);
-// OBSOLETE       mem2hex((unsigned char *) &registers[PC], buf, 4, 0);
-// OBSOLETE       gdb_error("PC == 0x%s\n", buf);
-// OBSOLETE     }
-// OBSOLETE 
-// OBSOLETE   /* reply to host that an exception has occurred */
-// OBSOLETE   sigval = computeSignal( exceptionVector );
-// OBSOLETE 
-// OBSOLETE   ptr = remcomOutBuffer;
-// OBSOLETE  
-// OBSOLETE   *ptr++ = 'T';         /* notify gdb with signo, PC, FP and SP */
-// OBSOLETE   *ptr++ = hexchars[sigval >> 4];
-// OBSOLETE   *ptr++ = hexchars[sigval & 0xf];
-// OBSOLETE  
-// OBSOLETE   *ptr++ = hexchars[PC >> 4];
-// OBSOLETE   *ptr++ = hexchars[PC & 0xf];
-// OBSOLETE   *ptr++ = ':';
-// OBSOLETE   ptr = mem2hex((unsigned char *)&registers[PC], ptr, 4, 0);     /* PC */
-// OBSOLETE   *ptr++ = ';';
-// OBSOLETE  
-// OBSOLETE   *ptr++ = hexchars[R13 >> 4];
-// OBSOLETE   *ptr++ = hexchars[R13 & 0xf];
-// OBSOLETE   *ptr++ = ':';
-// OBSOLETE   ptr = mem2hex((unsigned char *)&registers[R13], ptr, 4, 0);    /* FP */
-// OBSOLETE   *ptr++ = ';';
-// OBSOLETE  
-// OBSOLETE   *ptr++ = hexchars[R15 >> 4];
-// OBSOLETE   *ptr++ = hexchars[R15 & 0xf];
-// OBSOLETE   *ptr++ = ':';
-// OBSOLETE   ptr = mem2hex((unsigned char *)&registers[R15], ptr, 4, 0);    /* SP */
-// OBSOLETE   *ptr++ = ';';
-// OBSOLETE   *ptr++ = 0;
-// OBSOLETE  
-// OBSOLETE   if (exceptionVector == 0)     /* simulated SYS call stuff */
-// OBSOLETE     {
-// OBSOLETE       mem2hex((unsigned char *) &registers[PC], buf, 4, 0);
-// OBSOLETE       switch (registers[R0]) {
-// OBSOLETE       case SYS_exit:
-// OBSOLETE    gdb_error("Target program has exited at %s\n", buf);
-// OBSOLETE    ptr = remcomOutBuffer;
-// OBSOLETE    *ptr++ = 'W';
-// OBSOLETE    sigval = registers[R1] & 0xff;
-// OBSOLETE    *ptr++ = hexchars[sigval >> 4];
-// OBSOLETE    *ptr++ = hexchars[sigval & 0xf];
-// OBSOLETE    *ptr++ = 0;
-// OBSOLETE    break;
-// OBSOLETE       case SYS_open:
-// OBSOLETE    gdb_error("Target attempts SYS_open call at %s\n", buf);
-// OBSOLETE    break;
-// OBSOLETE       case SYS_close:
-// OBSOLETE    gdb_error("Target attempts SYS_close call at %s\n", buf);
-// OBSOLETE    break;
-// OBSOLETE       case SYS_read:
-// OBSOLETE    gdb_error("Target attempts SYS_read call at %s\n", buf);
-// OBSOLETE    break;
-// OBSOLETE       case SYS_write:
-// OBSOLETE    if (registers[R1] == 1 ||       /* write to stdout  */
-// OBSOLETE        registers[R1] == 2)         /* write to stderr  */
-// OBSOLETE      {                             /* (we can do that) */
-// OBSOLETE        registers[R0] = gdb_write((void *) registers[R2], registers[R3]);
-// OBSOLETE        return;
-// OBSOLETE      }
-// OBSOLETE    else
-// OBSOLETE      gdb_error("Target attempts SYS_write call at %s\n", buf);
-// OBSOLETE    break;
-// OBSOLETE       case SYS_lseek:
-// OBSOLETE    gdb_error("Target attempts SYS_lseek call at %s\n", buf);
-// OBSOLETE    break;
-// OBSOLETE       case SYS_unlink:
-// OBSOLETE    gdb_error("Target attempts SYS_unlink call at %s\n", buf);
-// OBSOLETE    break;
-// OBSOLETE       case SYS_getpid:
-// OBSOLETE    gdb_error("Target attempts SYS_getpid call at %s\n", buf);
-// OBSOLETE    break;
-// OBSOLETE       case SYS_kill:
-// OBSOLETE    gdb_error("Target attempts SYS_kill call at %s\n", buf);
-// OBSOLETE    break;
-// OBSOLETE       case SYS_fstat:
-// OBSOLETE    gdb_error("Target attempts SYS_fstat call at %s\n", buf);
-// OBSOLETE    break;
-// OBSOLETE       default:
-// OBSOLETE    gdb_error("Target attempts unknown SYS call at %s\n", buf);
-// OBSOLETE    break;
-// OBSOLETE       }
-// OBSOLETE     }
-// OBSOLETE 
-// OBSOLETE   putpacket(remcomOutBuffer);
-// OBSOLETE 
-// OBSOLETE   stepping = 0;
-// OBSOLETE 
-// OBSOLETE   while (1==1) {
-// OBSOLETE     remcomOutBuffer[0] = 0;
-// OBSOLETE     ptr = getpacket();
-// OBSOLETE     binary = 0;
-// OBSOLETE     switch (*ptr++) {
-// OBSOLETE       default:     /* Unknown code.  Return an empty reply message. */
-// OBSOLETE    break;
-// OBSOLETE       case 'R':
-// OBSOLETE    if (hexToInt (&ptr, &addr))
-// OBSOLETE      registers[PC] = addr;
-// OBSOLETE    strcpy(remcomOutBuffer, "OK");
-// OBSOLETE    break;
-// OBSOLETE       case '!':
-// OBSOLETE    strcpy(remcomOutBuffer, "OK");
-// OBSOLETE    break;
-// OBSOLETE     case 'X': /* XAA..AA,LLLL:<binary data>#cs */
-// OBSOLETE       binary = 1;
-// OBSOLETE     case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
-// OBSOLETE       /* TRY TO READ '%x,%x:'.  IF SUCCEED, SET PTR = 0 */
-// OBSOLETE       {
-// OBSOLETE         if (hexToInt(&ptr,&addr))
-// OBSOLETE           if (*(ptr++) == ',')
-// OBSOLETE             if (hexToInt(&ptr,&length))
-// OBSOLETE               if (*(ptr++) == ':')
-// OBSOLETE                 {
-// OBSOLETE                   mem_err = 0;
-// OBSOLETE                   if (binary)
-// OBSOLETE                     bin2mem (ptr, (unsigned char *) addr, length, 1);
-// OBSOLETE                   else
-// OBSOLETE                     hex2mem(ptr, (unsigned char*) addr, length, 1);
-// OBSOLETE                   if (mem_err) {
-// OBSOLETE                     strcpy (remcomOutBuffer, "E03");
-// OBSOLETE                     gdb_error ("memory fault", "");
-// OBSOLETE                   } else {
-// OBSOLETE                     strcpy(remcomOutBuffer,"OK");
-// OBSOLETE                   }
-// OBSOLETE                   ptr = 0;
-// OBSOLETE                 }
-// OBSOLETE         if (ptr)
-// OBSOLETE           {
-// OBSOLETE             strcpy(remcomOutBuffer,"E02");
-// OBSOLETE           }
-// OBSOLETE       }
-// OBSOLETE    break;
-// OBSOLETE       case 'm': /* mAA..AA,LLLL  Read LLLL bytes at address AA..AA */
-// OBSOLETE            /* TRY TO READ %x,%x.  IF SUCCEED, SET PTR = 0 */
-// OBSOLETE    if (hexToInt(&ptr,&addr))
-// OBSOLETE      if (*(ptr++) == ',')
-// OBSOLETE        if (hexToInt(&ptr,&length))
-// OBSOLETE          {
-// OBSOLETE            ptr = 0;
-// OBSOLETE            mem_err = 0;
-// OBSOLETE            mem2hex((unsigned char*) addr, remcomOutBuffer, length, 1);
-// OBSOLETE            if (mem_err) {
-// OBSOLETE              strcpy (remcomOutBuffer, "E03");
-// OBSOLETE              gdb_error ("memory fault", "");
-// OBSOLETE            }
-// OBSOLETE          }
-// OBSOLETE    if (ptr)
-// OBSOLETE      {
-// OBSOLETE        strcpy(remcomOutBuffer,"E01");
-// OBSOLETE      }
-// OBSOLETE    break;
-// OBSOLETE       case '?': 
-// OBSOLETE    remcomOutBuffer[0] = 'S';
-// OBSOLETE    remcomOutBuffer[1] =  hexchars[sigval >> 4];
-// OBSOLETE    remcomOutBuffer[2] =  hexchars[sigval % 16];
-// OBSOLETE    remcomOutBuffer[3] = 0;
-// OBSOLETE    break;
-// OBSOLETE       case 'd': 
-// OBSOLETE    remote_debug = !(remote_debug);  /* toggle debug flag */
-// OBSOLETE    break;
-// OBSOLETE       case 'g': /* return the value of the CPU registers */
-// OBSOLETE    mem2hex((unsigned char*) registers, remcomOutBuffer, NUMREGBYTES, 0);
-// OBSOLETE    break;
-// OBSOLETE       case 'P': /* set the value of a single CPU register - return OK */
-// OBSOLETE    {
-// OBSOLETE      int regno;
-// OBSOLETE 
-// OBSOLETE      if (hexToInt (&ptr, &regno) && *ptr++ == '=')
-// OBSOLETE        if (regno >= 0 && regno < NUMREGS)
-// OBSOLETE          {
-// OBSOLETE            int stackmode;
-// OBSOLETE 
-// OBSOLETE            hex2mem (ptr, (unsigned char *) &registers[regno], 4, 0);
-// OBSOLETE            /*
-// OBSOLETE             * Since we just changed a single CPU register, let's
-// OBSOLETE             * make sure to keep the several stack pointers consistant.
-// OBSOLETE             */
-// OBSOLETE            stackmode = registers[PSW] & 0x80;
-// OBSOLETE            if (regno == R15)       /* stack pointer changed */
-// OBSOLETE              {                     /* need to change SPI or SPU */
-// OBSOLETE                if (stackmode == 0)
-// OBSOLETE                  registers[SPI] = registers[R15];
-// OBSOLETE                else
-// OBSOLETE                  registers[SPU] = registers[R15];
-// OBSOLETE              }
-// OBSOLETE            else if (regno == SPU)  /* "user" stack pointer changed */
-// OBSOLETE              {
-// OBSOLETE                if (stackmode != 0) /* stack in user mode: copy SP */
-// OBSOLETE                  registers[R15] = registers[SPU];
-// OBSOLETE              }
-// OBSOLETE            else if (regno == SPI)  /* "interrupt" stack pointer changed */
-// OBSOLETE              {
-// OBSOLETE                if (stackmode == 0) /* stack in interrupt mode: copy SP */
-// OBSOLETE                  registers[R15] = registers[SPI];
-// OBSOLETE              }
-// OBSOLETE            else if (regno == PSW)  /* stack mode may have changed! */
-// OBSOLETE              {                     /* force SP to either SPU or SPI */
-// OBSOLETE                if (stackmode == 0) /* stack in user mode */
-// OBSOLETE                  registers[R15] = registers[SPI];
-// OBSOLETE                else                /* stack in interrupt mode */
-// OBSOLETE                  registers[R15] = registers[SPU];
-// OBSOLETE              }
-// OBSOLETE            strcpy (remcomOutBuffer, "OK");
-// OBSOLETE            break;
-// OBSOLETE          }
-// OBSOLETE      strcpy (remcomOutBuffer, "E01");
-// OBSOLETE      break;
-// OBSOLETE    }
-// OBSOLETE       case 'G': /* set the value of the CPU registers - return OK */
-// OBSOLETE    hex2mem(ptr, (unsigned char*) registers, NUMREGBYTES, 0);
-// OBSOLETE    strcpy(remcomOutBuffer,"OK");
-// OBSOLETE    break;
-// OBSOLETE       case 's': /* sAA..AA Step one instruction from AA..AA(optional) */
-// OBSOLETE    stepping = 1;
-// OBSOLETE       case 'c': /* cAA..AA Continue from address AA..AA(optional) */
-// OBSOLETE            /* try to read optional parameter, pc unchanged if no parm */
-// OBSOLETE    if (hexToInt(&ptr,&addr))
-// OBSOLETE      registers[ PC ] = addr;
-// OBSOLETE    
-// OBSOLETE    if (stepping)   /* single-stepping */
-// OBSOLETE      {
-// OBSOLETE        if (!prepare_to_step(0))    /* set up for single-step */
-// OBSOLETE          {
-// OBSOLETE            /* prepare_to_step has already emulated the target insn:
-// OBSOLETE               Send SIGTRAP to gdb, don't resume the target at all.  */
-// OBSOLETE            ptr = remcomOutBuffer;
-// OBSOLETE            *ptr++ = 'T';           /* Simulate stopping with SIGTRAP */
-// OBSOLETE            *ptr++ = '0';
-// OBSOLETE            *ptr++ = '5';
-// OBSOLETE 
-// OBSOLETE            *ptr++ = hexchars[PC >> 4];     /* send PC */
-// OBSOLETE            *ptr++ = hexchars[PC & 0xf];
-// OBSOLETE            *ptr++ = ':';
-// OBSOLETE            ptr = mem2hex((unsigned char *)&registers[PC], ptr, 4, 0);
-// OBSOLETE            *ptr++ = ';';
-// OBSOLETE 
-// OBSOLETE            *ptr++ = hexchars[R13 >> 4];    /* send FP */
-// OBSOLETE            *ptr++ = hexchars[R13 & 0xf];
-// OBSOLETE            *ptr++ = ':';
-// OBSOLETE            ptr = mem2hex((unsigned char *)&registers[R13], ptr, 4, 0);
-// OBSOLETE            *ptr++ = ';';
-// OBSOLETE 
-// OBSOLETE            *ptr++ = hexchars[R15 >> 4];    /* send SP */
-// OBSOLETE            *ptr++ = hexchars[R15 & 0xf];
-// OBSOLETE            *ptr++ = ':';
-// OBSOLETE            ptr = mem2hex((unsigned char *)&registers[R15], ptr, 4, 0);
-// OBSOLETE            *ptr++ = ';';
-// OBSOLETE            *ptr++ = 0;
-// OBSOLETE 
-// OBSOLETE            break;  
-// OBSOLETE          }
-// OBSOLETE      }
-// OBSOLETE    else    /* continuing, not single-stepping */
-// OBSOLETE      {
-// OBSOLETE        /* OK, about to do a "continue".  First check to see if the 
-// OBSOLETE           target pc is on an odd boundary (second instruction in the 
-// OBSOLETE           word).  If so, we must do a single-step first, because 
-// OBSOLETE           ya can't jump or return back to an odd boundary!  */
-// OBSOLETE        if ((registers[PC] & 2) != 0)
-// OBSOLETE          prepare_to_step(1);
-// OBSOLETE      }
-// OBSOLETE 
-// OBSOLETE    return;
-// OBSOLETE 
-// OBSOLETE       case 'D':    /* Detach */
-// OBSOLETE #if 0
-// OBSOLETE    /* I am interpreting this to mean, release the board from control 
-// OBSOLETE       by the remote stub.  To do this, I am restoring the original
-// OBSOLETE       (or at least previous) exception vectors.
-// OBSOLETE     */
-// OBSOLETE    for (i = 0; i < 18; i++)
-// OBSOLETE      exceptionHandler (i, save_vectors[i]);
-// OBSOLETE    putpacket ("OK");
-// OBSOLETE    return;         /* continue the inferior */
-// OBSOLETE #else
-// OBSOLETE    strcpy(remcomOutBuffer,"OK");
-// OBSOLETE    break;
-// OBSOLETE #endif
-// OBSOLETE     case 'q':
-// OBSOLETE       if (*ptr++ == 'C' &&
-// OBSOLETE      *ptr++ == 'R' &&
-// OBSOLETE      *ptr++ == 'C' &&
-// OBSOLETE      *ptr++ == ':')
-// OBSOLETE    {
-// OBSOLETE      unsigned long start, len, our_crc;
-// OBSOLETE 
-// OBSOLETE      if (hexToInt (&ptr, (int *) &start) &&
-// OBSOLETE          *ptr++ == ','                   &&
-// OBSOLETE          hexToInt (&ptr, (int *) &len))
-// OBSOLETE        {
-// OBSOLETE          remcomOutBuffer[0] = 'C';
-// OBSOLETE          our_crc = crc32 ((unsigned char *) start, len, 0xffffffff);
-// OBSOLETE          mem2hex ((char *) &our_crc, 
-// OBSOLETE                   &remcomOutBuffer[1], 
-// OBSOLETE                   sizeof (long), 
-// OBSOLETE                   0); 
-// OBSOLETE        } /* else do nothing */
-// OBSOLETE    } /* else do nothing */
-// OBSOLETE       break;
-// OBSOLETE 
-// OBSOLETE       case 'k': /* kill the program */
-// OBSOLETE    continue;
-// OBSOLETE       } /* switch */
-// OBSOLETE 
-// OBSOLETE     /* reply to the request */
-// OBSOLETE     putpacket(remcomOutBuffer);
-// OBSOLETE   }
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* qCRC support */
-// OBSOLETE 
-// OBSOLETE /* Table used by the crc32 function to calcuate the checksum. */
-// OBSOLETE static unsigned long crc32_table[256] = {0, 0};
-// OBSOLETE 
-// OBSOLETE static unsigned long
-// OBSOLETE crc32 (unsigned char *buf, int len, unsigned long crc)
-// OBSOLETE {
-// OBSOLETE   if (! crc32_table[1])
-// OBSOLETE     {
-// OBSOLETE       /* Initialize the CRC table and the decoding table. */
-// OBSOLETE       int i, j;
-// OBSOLETE       unsigned long c;
-// OBSOLETE 
-// OBSOLETE       for (i = 0; i < 256; i++)
-// OBSOLETE    {
-// OBSOLETE      for (c = i << 24, j = 8; j > 0; --j)
-// OBSOLETE        c = c & 0x80000000 ? (c << 1) ^ 0x04c11db7 : (c << 1);
-// OBSOLETE      crc32_table[i] = c;
-// OBSOLETE    }
-// OBSOLETE     }
-// OBSOLETE 
-// OBSOLETE   while (len--)
-// OBSOLETE     {
-// OBSOLETE       crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ *buf) & 255];
-// OBSOLETE       buf++;
-// OBSOLETE     }
-// OBSOLETE   return crc;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static int 
-// OBSOLETE hex (unsigned char ch)
-// OBSOLETE {
-// OBSOLETE   if ((ch >= 'a') && (ch <= 'f')) return (ch-'a'+10);
-// OBSOLETE   if ((ch >= '0') && (ch <= '9')) return (ch-'0');
-// OBSOLETE   if ((ch >= 'A') && (ch <= 'F')) return (ch-'A'+10);
-// OBSOLETE   return (-1);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* scan for the sequence $<data>#<checksum>     */
-// OBSOLETE 
-// OBSOLETE unsigned char *
-// OBSOLETE getpacket (void)
-// OBSOLETE {
-// OBSOLETE   unsigned char *buffer = &remcomInBuffer[0];
-// OBSOLETE   unsigned char checksum;
-// OBSOLETE   unsigned char xmitcsum;
-// OBSOLETE   int count;
-// OBSOLETE   char ch;
-// OBSOLETE 
-// OBSOLETE   while (1)
-// OBSOLETE     {
-// OBSOLETE       /* wait around for the start character, ignore all other characters */
-// OBSOLETE       while ((ch = getDebugChar ()) != '$')
-// OBSOLETE    ;
-// OBSOLETE 
-// OBSOLETE retry:
-// OBSOLETE       checksum = 0;
-// OBSOLETE       xmitcsum = -1;
-// OBSOLETE       count = 0;
-// OBSOLETE 
-// OBSOLETE       /* now, read until a # or end of buffer is found */
-// OBSOLETE       while (count < BUFMAX)
-// OBSOLETE    {
-// OBSOLETE      ch = getDebugChar ();
-// OBSOLETE           if (ch == '$')
-// OBSOLETE        goto retry;
-// OBSOLETE      if (ch == '#')
-// OBSOLETE        break;
-// OBSOLETE      checksum = checksum + ch;
-// OBSOLETE      buffer[count] = ch;
-// OBSOLETE      count = count + 1;
-// OBSOLETE    }
-// OBSOLETE       buffer[count] = 0;
-// OBSOLETE 
-// OBSOLETE       if (ch == '#')
-// OBSOLETE    {
-// OBSOLETE      ch = getDebugChar ();
-// OBSOLETE      xmitcsum = hex (ch) << 4;
-// OBSOLETE      ch = getDebugChar ();
-// OBSOLETE      xmitcsum += hex (ch);
-// OBSOLETE 
-// OBSOLETE      if (checksum != xmitcsum)
-// OBSOLETE        {
-// OBSOLETE          if (remote_debug)
-// OBSOLETE            {
-// OBSOLETE              unsigned char buf[16];
-// OBSOLETE 
-// OBSOLETE              mem2hex((unsigned char *) &checksum, buf, 4, 0);
-// OBSOLETE              gdb_error("Bad checksum: my count = %s, ", buf);
-// OBSOLETE              mem2hex((unsigned char *) &xmitcsum, buf, 4, 0);
-// OBSOLETE              gdb_error("sent count = %s\n", buf);
-// OBSOLETE              gdb_error(" -- Bad buffer: \"%s\"\n", buffer); 
-// OBSOLETE            }
-// OBSOLETE          putDebugChar ('-');       /* failed checksum */
-// OBSOLETE        }
-// OBSOLETE      else
-// OBSOLETE        {
-// OBSOLETE          putDebugChar ('+');       /* successful transfer */
-// OBSOLETE 
-// OBSOLETE          /* if a sequence char is present, reply the sequence ID */
-// OBSOLETE          if (buffer[2] == ':')
-// OBSOLETE            {
-// OBSOLETE              putDebugChar (buffer[0]);
-// OBSOLETE              putDebugChar (buffer[1]);
-// OBSOLETE 
-// OBSOLETE              return &buffer[3];
-// OBSOLETE            }
-// OBSOLETE 
-// OBSOLETE          return &buffer[0];
-// OBSOLETE        }
-// OBSOLETE    }
-// OBSOLETE     }
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* send the packet in buffer.  */
-// OBSOLETE 
-// OBSOLETE static void 
-// OBSOLETE putpacket (unsigned char *buffer)
-// OBSOLETE {
-// OBSOLETE   unsigned char checksum;
-// OBSOLETE   int  count;
-// OBSOLETE   char ch;
-// OBSOLETE 
-// OBSOLETE   /*  $<packet info>#<checksum>. */
-// OBSOLETE   do {
-// OBSOLETE     putDebugChar('$');
-// OBSOLETE     checksum = 0;
-// OBSOLETE     count    = 0;
-// OBSOLETE 
-// OBSOLETE     while (ch=buffer[count]) {
-// OBSOLETE       putDebugChar(ch);
-// OBSOLETE       checksum += ch;
-// OBSOLETE       count += 1;
-// OBSOLETE     }
-// OBSOLETE     putDebugChar('#');
-// OBSOLETE     putDebugChar(hexchars[checksum >> 4]);
-// OBSOLETE     putDebugChar(hexchars[checksum % 16]);
-// OBSOLETE   } while (getDebugChar() != '+');
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Address of a routine to RTE to if we get a memory fault.  */
-// OBSOLETE 
-// OBSOLETE static void (*volatile mem_fault_routine)() = 0;
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE set_mem_err (void)
-// OBSOLETE {
-// OBSOLETE   mem_err = 1;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Check the address for safe access ranges.  As currently defined,
-// OBSOLETE    this routine will reject the "expansion bus" address range(s).
-// OBSOLETE    To make those ranges useable, someone must implement code to detect
-// OBSOLETE    whether there's anything connected to the expansion bus. */
-// OBSOLETE 
-// OBSOLETE static int
-// OBSOLETE mem_safe (unsigned char *addr)
-// OBSOLETE {
-// OBSOLETE #define BAD_RANGE_ONE_START        ((unsigned char *) 0x600000)
-// OBSOLETE #define BAD_RANGE_ONE_END  ((unsigned char *) 0xa00000)
-// OBSOLETE #define BAD_RANGE_TWO_START        ((unsigned char *) 0xff680000)
-// OBSOLETE #define BAD_RANGE_TWO_END  ((unsigned char *) 0xff800000)
-// OBSOLETE 
-// OBSOLETE   if (addr < BAD_RANGE_ONE_START)  return 1;       /* safe */
-// OBSOLETE   if (addr < BAD_RANGE_ONE_END)            return 0;       /* unsafe */
-// OBSOLETE   if (addr < BAD_RANGE_TWO_START)  return 1;       /* safe */
-// OBSOLETE   if (addr < BAD_RANGE_TWO_END)            return 0;       /* unsafe */
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* These are separate functions so that they are so short and sweet
-// OBSOLETE    that the compiler won't save any registers (if there is a fault
-// OBSOLETE    to mem_fault, they won't get restored, so there better not be any
-// OBSOLETE    saved).  */
-// OBSOLETE static int
-// OBSOLETE get_char (unsigned char *addr)
-// OBSOLETE {
-// OBSOLETE #if 1
-// OBSOLETE   if (mem_fault_routine && !mem_safe(addr))
-// OBSOLETE     {
-// OBSOLETE       mem_fault_routine ();
-// OBSOLETE       return 0;
-// OBSOLETE     }
-// OBSOLETE #endif
-// OBSOLETE   return *addr;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE set_char (unsigned char *addr, unsigned char val)
-// OBSOLETE {
-// OBSOLETE #if 1
-// OBSOLETE   if (mem_fault_routine && !mem_safe (addr))
-// OBSOLETE     {
-// OBSOLETE       mem_fault_routine ();
-// OBSOLETE       return;
-// OBSOLETE     }
-// OBSOLETE #endif
-// OBSOLETE   *addr = val;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Convert the memory pointed to by mem into hex, placing result in buf.
-// OBSOLETE    Return a pointer to the last char put in buf (null).
-// OBSOLETE    If MAY_FAULT is non-zero, then we should set mem_err in response to
-// OBSOLETE    a fault; if zero treat a fault like any other fault in the stub.  */
-// OBSOLETE 
-// OBSOLETE static unsigned char *
-// OBSOLETE mem2hex (unsigned char *mem, unsigned char *buf, int count, int may_fault)
-// OBSOLETE {
-// OBSOLETE   int i;
-// OBSOLETE   unsigned char ch;
-// OBSOLETE 
-// OBSOLETE   if (may_fault)
-// OBSOLETE     mem_fault_routine = set_mem_err;
-// OBSOLETE   for (i=0;i<count;i++) {
-// OBSOLETE     ch = get_char (mem++);
-// OBSOLETE     if (may_fault && mem_err)
-// OBSOLETE       return (buf);
-// OBSOLETE     *buf++ = hexchars[ch >> 4];
-// OBSOLETE     *buf++ = hexchars[ch % 16];
-// OBSOLETE   }
-// OBSOLETE   *buf = 0;
-// OBSOLETE   if (may_fault)
-// OBSOLETE     mem_fault_routine = 0;
-// OBSOLETE   return(buf);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Convert the hex array pointed to by buf into binary to be placed in mem.
-// OBSOLETE    Return a pointer to the character AFTER the last byte written. */
-// OBSOLETE 
-// OBSOLETE static unsigned char* 
-// OBSOLETE hex2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
-// OBSOLETE {
-// OBSOLETE   int i;
-// OBSOLETE   unsigned char ch;
-// OBSOLETE 
-// OBSOLETE   if (may_fault)
-// OBSOLETE     mem_fault_routine = set_mem_err;
-// OBSOLETE   for (i=0;i<count;i++) {
-// OBSOLETE     ch = hex(*buf++) << 4;
-// OBSOLETE     ch = ch + hex(*buf++);
-// OBSOLETE     set_char (mem++, ch);
-// OBSOLETE     if (may_fault && mem_err)
-// OBSOLETE       return (mem);
-// OBSOLETE   }
-// OBSOLETE   if (may_fault)
-// OBSOLETE     mem_fault_routine = 0;
-// OBSOLETE   return(mem);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Convert the binary stream in BUF to memory.
-// OBSOLETE 
-// OBSOLETE    Gdb will escape $, #, and the escape char (0x7d).
-// OBSOLETE    COUNT is the total number of bytes to write into
-// OBSOLETE    memory. */
-// OBSOLETE static unsigned char *
-// OBSOLETE bin2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
-// OBSOLETE {
-// OBSOLETE   int i;
-// OBSOLETE   unsigned char ch;
-// OBSOLETE 
-// OBSOLETE   if (may_fault)
-// OBSOLETE     mem_fault_routine = set_mem_err;
-// OBSOLETE   for (i = 0; i < count; i++)
-// OBSOLETE     {
-// OBSOLETE       /* Check for any escaped characters. Be paranoid and
-// OBSOLETE          only unescape chars that should be escaped. */
-// OBSOLETE       if (*buf == 0x7d)
-// OBSOLETE         {
-// OBSOLETE           switch (*(buf+1))
-// OBSOLETE             {
-// OBSOLETE             case 0x3:  /* # */
-// OBSOLETE             case 0x4:  /* $ */
-// OBSOLETE             case 0x5d: /* escape char */
-// OBSOLETE               buf++;
-// OBSOLETE               *buf |= 0x20;
-// OBSOLETE               break;
-// OBSOLETE             default:
-// OBSOLETE               /* nothing */
-// OBSOLETE               break;
-// OBSOLETE             }
-// OBSOLETE         }
-// OBSOLETE 
-// OBSOLETE       set_char (mem++, *buf++);
-// OBSOLETE 
-// OBSOLETE       if (may_fault && mem_err)
-// OBSOLETE         return mem;
-// OBSOLETE     }
-// OBSOLETE 
-// OBSOLETE   if (may_fault)
-// OBSOLETE     mem_fault_routine = 0;
-// OBSOLETE   return mem;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* this function takes the m32r exception vector and attempts to
-// OBSOLETE    translate this number into a unix compatible signal value */
-// OBSOLETE 
-// OBSOLETE static int 
-// OBSOLETE computeSignal (int exceptionVector)
-// OBSOLETE {
-// OBSOLETE   int sigval;
-// OBSOLETE   switch (exceptionVector) {
-// OBSOLETE     case 0  : sigval = 23; break; /* I/O trap                    */
-// OBSOLETE     case 1  : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 2  : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 3  : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 4  : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 5  : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 6  : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 7  : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 8  : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 9  : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 10 : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 11 : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 12 : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 13 : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 14 : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 15 : sigval = 5;  break; /* breakpoint                  */
-// OBSOLETE     case 16 : sigval = 10; break; /* BUS ERROR (alignment)       */
-// OBSOLETE     case 17 : sigval = 2;  break; /* INTerrupt                   */
-// OBSOLETE     default : sigval = 7;  break; /* "software generated"        */
-// OBSOLETE   }
-// OBSOLETE   return (sigval);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /**********************************************/
-// OBSOLETE /* WHILE WE FIND NICE HEX CHARS, BUILD AN INT */
-// OBSOLETE /* RETURN NUMBER OF CHARS PROCESSED           */
-// OBSOLETE /**********************************************/
-// OBSOLETE static int 
-// OBSOLETE hexToInt (unsigned char **ptr, int *intValue)
-// OBSOLETE {
-// OBSOLETE   int numChars = 0;
-// OBSOLETE   int hexValue;
-// OBSOLETE 
-// OBSOLETE   *intValue = 0;
-// OBSOLETE   while (**ptr)
-// OBSOLETE     {
-// OBSOLETE       hexValue = hex(**ptr);
-// OBSOLETE       if (hexValue >=0)
-// OBSOLETE         {
-// OBSOLETE      *intValue = (*intValue <<4) | hexValue;
-// OBSOLETE      numChars ++;
-// OBSOLETE         }
-// OBSOLETE       else
-// OBSOLETE    break;
-// OBSOLETE       (*ptr)++;
-// OBSOLETE     }
-// OBSOLETE   return (numChars);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /*
-// OBSOLETE   Table of branch instructions:
-// OBSOLETE   
-// OBSOLETE   10B6             RTE     return from trap or exception
-// OBSOLETE   1FCr             JMP     jump
-// OBSOLETE   1ECr             JL      jump and link
-// OBSOLETE   7Fxx             BRA     branch
-// OBSOLETE   FFxxxxxx BRA     branch (long)
-// OBSOLETE   B09rxxxx BNEZ    branch not-equal-zero
-// OBSOLETE   Br1rxxxx BNE     branch not-equal
-// OBSOLETE   7Dxx             BNC     branch not-condition
-// OBSOLETE   FDxxxxxx BNC     branch not-condition (long)
-// OBSOLETE   B0Arxxxx BLTZ    branch less-than-zero
-// OBSOLETE   B0Crxxxx BLEZ    branch less-equal-zero
-// OBSOLETE   7Exx             BL      branch and link
-// OBSOLETE   FExxxxxx BL      branch and link (long)
-// OBSOLETE   B0Drxxxx BGTZ    branch greater-than-zero
-// OBSOLETE   B0Brxxxx BGEZ    branch greater-equal-zero
-// OBSOLETE   B08rxxxx BEQZ    branch equal-zero
-// OBSOLETE   Br0rxxxx BEQ     branch equal
-// OBSOLETE   7Cxx             BC      branch condition
-// OBSOLETE   FCxxxxxx BC      branch condition (long)
-// OBSOLETE   */
-// OBSOLETE 
-// OBSOLETE static int 
-// OBSOLETE isShortBranch (unsigned char *instr)
-// OBSOLETE {
-// OBSOLETE   unsigned char instr0 = instr[0] & 0x7F;          /* mask off high bit */
-// OBSOLETE 
-// OBSOLETE   if (instr0 == 0x10 && instr[1] == 0xB6)  /* RTE */
-// OBSOLETE     return 1;              /* return from trap or exception */
-// OBSOLETE 
-// OBSOLETE   if (instr0 == 0x1E || instr0 == 0x1F)            /* JL or JMP */
-// OBSOLETE     if ((instr[1] & 0xF0) == 0xC0)
-// OBSOLETE       return 2;                                    /* jump thru a register */
-// OBSOLETE 
-// OBSOLETE   if (instr0 == 0x7C || instr0 == 0x7D ||  /* BC, BNC, BL, BRA */
-// OBSOLETE       instr0 == 0x7E || instr0 == 0x7F)
-// OBSOLETE     return 3;                                      /* eight bit PC offset */
-// OBSOLETE 
-// OBSOLETE   return 0;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static int
-// OBSOLETE isLongBranch (unsigned char *instr)
-// OBSOLETE {
-// OBSOLETE   if (instr[0] == 0xFC || instr[0] == 0xFD ||      /* BRA, BNC, BL, BC */
-// OBSOLETE       instr[0] == 0xFE || instr[0] == 0xFF)        /* 24 bit relative */
-// OBSOLETE     return 4;
-// OBSOLETE   if ((instr[0] & 0xF0) == 0xB0)           /* 16 bit relative */
-// OBSOLETE     {
-// OBSOLETE       if ((instr[1] & 0xF0) == 0x00 ||             /* BNE, BEQ */
-// OBSOLETE      (instr[1] & 0xF0) == 0x10)
-// OBSOLETE    return 5;
-// OBSOLETE       if (instr[0] == 0xB0)        /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ, BEQZ */
-// OBSOLETE    if ((instr[1] & 0xF0) == 0x80 || (instr[1] & 0xF0) == 0x90 || 
-// OBSOLETE        (instr[1] & 0xF0) == 0xA0 || (instr[1] & 0xF0) == 0xB0 ||
-// OBSOLETE        (instr[1] & 0xF0) == 0xC0 || (instr[1] & 0xF0) == 0xD0)
-// OBSOLETE      return 6;
-// OBSOLETE     }
-// OBSOLETE   return 0;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* if address is NOT on a 4-byte boundary, or high-bit of instr is zero, 
-// OBSOLETE    then it's a 2-byte instruction, else it's a 4-byte instruction.  */
-// OBSOLETE 
-// OBSOLETE #define INSTRUCTION_SIZE(addr) \
-// OBSOLETE     ((((int) addr & 2) || (((unsigned char *) addr)[0] & 0x80) == 0) ? 2 : 4)
-// OBSOLETE 
-// OBSOLETE static int
-// OBSOLETE isBranch (unsigned char *instr)
-// OBSOLETE {
-// OBSOLETE   if (INSTRUCTION_SIZE(instr) == 2)
-// OBSOLETE     return isShortBranch(instr);
-// OBSOLETE   else
-// OBSOLETE     return isLongBranch(instr);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static int
-// OBSOLETE willBranch (unsigned char *instr, int branchCode)
-// OBSOLETE {
-// OBSOLETE   switch (branchCode) 
-// OBSOLETE     {
-// OBSOLETE     case 0:        return 0;       /* not a branch */
-// OBSOLETE     case 1:        return 1;       /* RTE */
-// OBSOLETE     case 2:        return 1;       /* JL or JMP    */
-// OBSOLETE     case 3:                        /* BC, BNC, BL, BRA (short) */
-// OBSOLETE     case 4:                        /* BC, BNC, BL, BRA (long) */
-// OBSOLETE       switch (instr[0] & 0x0F) 
-// OBSOLETE    {
-// OBSOLETE    case 0xC:               /* Branch if Condition Register */
-// OBSOLETE      return (registers[CBR] != 0);
-// OBSOLETE    case 0xD:               /* Branch if NOT Condition Register */
-// OBSOLETE      return (registers[CBR] == 0);
-// OBSOLETE    case 0xE:               /* Branch and Link */
-// OBSOLETE    case 0xF:               /* Branch (unconditional) */
-// OBSOLETE      return 1;
-// OBSOLETE    default:                /* oops? */
-// OBSOLETE      return 0;
-// OBSOLETE    }
-// OBSOLETE     case 5:                        /* BNE, BEQ */
-// OBSOLETE       switch (instr[1] & 0xF0) 
-// OBSOLETE    {
-// OBSOLETE    case 0x00:              /* Branch if r1 equal to r2 */
-// OBSOLETE      return (registers[instr[0] & 0x0F] == registers[instr[1] & 0x0F]);
-// OBSOLETE    case 0x10:              /* Branch if r1 NOT equal to r2 */
-// OBSOLETE      return (registers[instr[0] & 0x0F] != registers[instr[1] & 0x0F]);
-// OBSOLETE    default:                /* oops? */
-// OBSOLETE      return 0;
-// OBSOLETE    }
-// OBSOLETE     case 6:                        /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ ,BEQZ */
-// OBSOLETE       switch (instr[1] & 0xF0) 
-// OBSOLETE    {
-// OBSOLETE    case 0x80:              /* Branch if reg equal to zero */
-// OBSOLETE      return (registers[instr[1] & 0x0F] == 0);
-// OBSOLETE    case 0x90:              /* Branch if reg NOT equal to zero */
-// OBSOLETE      return (registers[instr[1] & 0x0F] != 0);
-// OBSOLETE    case 0xA0:              /* Branch if reg less than zero */
-// OBSOLETE      return (registers[instr[1] & 0x0F] < 0);
-// OBSOLETE    case 0xB0:              /* Branch if reg greater or equal to zero */
-// OBSOLETE      return (registers[instr[1] & 0x0F] >= 0);
-// OBSOLETE    case 0xC0:              /* Branch if reg less than or equal to zero */
-// OBSOLETE      return (registers[instr[1] & 0x0F] <= 0);
-// OBSOLETE    case 0xD0:              /* Branch if reg greater than zero */
-// OBSOLETE      return (registers[instr[1] & 0x0F] > 0);
-// OBSOLETE    default:                /* oops? */
-// OBSOLETE      return 0;
-// OBSOLETE    }
-// OBSOLETE     default:                       /* oops? */
-// OBSOLETE       return 0;
-// OBSOLETE     }
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static int 
-// OBSOLETE branchDestination (unsigned char *instr, int branchCode)
-// OBSOLETE { 
-// OBSOLETE   switch (branchCode) { 
-// OBSOLETE   default: 
-// OBSOLETE   case 0:                                  /* not a branch */ 
-// OBSOLETE     return 0;
-// OBSOLETE   case 1:                                  /* RTE */ 
-// OBSOLETE     return registers[BPC] & ~3;            /* pop BPC into PC */
-// OBSOLETE   case 2:                                  /* JL or JMP */ 
-// OBSOLETE     return registers[instr[1] & 0x0F] & ~3;        /* jump thru a register */ 
-// OBSOLETE   case 3:          /* BC, BNC, BL, BRA (short, 8-bit relative offset) */ 
-// OBSOLETE     return (((int) instr) & ~3) + ((char) instr[1] << 2);
-// OBSOLETE   case 4:          /* BC, BNC, BL, BRA (long, 24-bit relative offset) */ 
-// OBSOLETE     return ((int) instr + 
-// OBSOLETE        ((((char) instr[1] << 16) | (instr[2] << 8) | (instr[3])) << 2)); 
-// OBSOLETE   case 5:          /* BNE, BEQ (16-bit relative offset) */ 
-// OBSOLETE   case 6:          /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ ,BEQZ (ditto) */ 
-// OBSOLETE     return ((int) instr + ((((char) instr[2] << 8) | (instr[3])) << 2)); 
-// OBSOLETE   }
-// OBSOLETE 
-// OBSOLETE   /* An explanatory note: in the last three return expressions, I have
-// OBSOLETE      cast the most-significant byte of the return offset to char.
-// OBSOLETE      What this accomplishes is sign extension.  If the other
-// OBSOLETE      less-significant bytes were signed as well, they would get sign
-// OBSOLETE      extended too and, if negative, their leading bits would clobber
-// OBSOLETE      the bits of the more-significant bytes ahead of them.  There are
-// OBSOLETE      other ways I could have done this, but sign extension from
-// OBSOLETE      odd-sized integers is always a pain. */
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE branchSideEffects (unsigned char *instr, int branchCode)
-// OBSOLETE {
-// OBSOLETE   switch (branchCode)
-// OBSOLETE     {
-// OBSOLETE     case 1:                        /* RTE */
-// OBSOLETE       return;                      /* I <THINK> this is already handled... */
-// OBSOLETE     case 2:                        /* JL (or JMP) */
-// OBSOLETE     case 3:                        /* BL (or BC, BNC, BRA) */
-// OBSOLETE     case 4:
-// OBSOLETE       if ((instr[0] & 0x0F) == 0x0E)               /* branch/jump and link */
-// OBSOLETE    registers[R14] = (registers[PC] & ~3) + 4;
-// OBSOLETE       return;
-// OBSOLETE     default:                       /* any other branch has no side effects */
-// OBSOLETE       return;
-// OBSOLETE     }
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static struct STEPPING_CONTEXT {
-// OBSOLETE   int stepping;                    /* true when we've started a single-step */
-// OBSOLETE   unsigned long  target_addr;      /* the instr we're trying to execute */
-// OBSOLETE   unsigned long  target_size;      /* the size of the target instr */
-// OBSOLETE   unsigned long  noop_addr;        /* where we've inserted a no-op, if any */
-// OBSOLETE   unsigned long  trap1_addr;       /* the trap following the target instr */
-// OBSOLETE   unsigned long  trap2_addr;       /* the trap at a branch destination, if any */
-// OBSOLETE   unsigned short noop_save;        /* instruction overwritten by our no-op */
-// OBSOLETE   unsigned short trap1_save;       /* instruction overwritten by trap1 */
-// OBSOLETE   unsigned short trap2_save;       /* instruction overwritten by trap2 */
-// OBSOLETE   unsigned short continue_p;       /* true if NOT returning to gdb after step */
-// OBSOLETE } stepping;
-// OBSOLETE 
-// OBSOLETE /* Function: prepare_to_step
-// OBSOLETE    Called from handle_exception to prepare the user program to single-step.
-// OBSOLETE    Places a trap instruction after the target instruction, with special 
-// OBSOLETE    extra handling for branch instructions and for instructions in the 
-// OBSOLETE    second half-word of a word.  
-// OBSOLETE 
-// OBSOLETE    Returns: True  if we should actually execute the instruction; 
-// OBSOLETE        False if we are going to emulate executing the instruction,
-// OBSOLETE        in which case we simply report to GDB that the instruction 
-// OBSOLETE        has already been executed.  */
-// OBSOLETE 
-// OBSOLETE #define TRAP1  0x10f1;     /* trap #1 instruction */
-// OBSOLETE #define NOOP   0x7000;  /* noop    instruction */
-// OBSOLETE 
-// OBSOLETE static unsigned short trap1 = TRAP1;
-// OBSOLETE static unsigned short noop  = NOOP;
-// OBSOLETE 
-// OBSOLETE static int
-// OBSOLETE prepare_to_step(continue_p)
-// OBSOLETE      int continue_p;       /* if this isn't REALLY a single-step (see below) */
-// OBSOLETE {
-// OBSOLETE   unsigned long pc = registers[PC];
-// OBSOLETE   int branchCode   = isBranch((unsigned char *) pc);
-// OBSOLETE   unsigned char *p;
-// OBSOLETE 
-// OBSOLETE   /* zero out the stepping context 
-// OBSOLETE      (paranoia -- it should already be zeroed) */
-// OBSOLETE   for (p = (unsigned char *) &stepping;
-// OBSOLETE        p < ((unsigned char *) &stepping) + sizeof(stepping);
-// OBSOLETE        p++)
-// OBSOLETE     *p = 0;
-// OBSOLETE 
-// OBSOLETE   if (branchCode != 0)                     /* next instruction is a branch */
-// OBSOLETE     {
-// OBSOLETE       branchSideEffects((unsigned char *) pc, branchCode);
-// OBSOLETE       if (willBranch((unsigned char *)pc, branchCode))
-// OBSOLETE    registers[PC] = branchDestination((unsigned char *) pc, branchCode);
-// OBSOLETE       else
-// OBSOLETE    registers[PC] = pc + INSTRUCTION_SIZE(pc);
-// OBSOLETE       return 0;                    /* branch "executed" -- just notify GDB */
-// OBSOLETE     }
-// OBSOLETE   else if (((int) pc & 2) != 0)            /* "second-slot" instruction */
-// OBSOLETE     {
-// OBSOLETE       /* insert no-op before pc */
-// OBSOLETE       stepping.noop_addr  =  pc - 2;
-// OBSOLETE       stepping.noop_save  = *(unsigned short *) stepping.noop_addr;
-// OBSOLETE       *(unsigned short *) stepping.noop_addr  = noop;
-// OBSOLETE       /* insert trap  after  pc */
-// OBSOLETE       stepping.trap1_addr =  pc + 2;
-// OBSOLETE       stepping.trap1_save = *(unsigned short *) stepping.trap1_addr;
-// OBSOLETE       *(unsigned short *) stepping.trap1_addr = trap1;
-// OBSOLETE     }
-// OBSOLETE   else                                     /* "first-slot" instruction */
-// OBSOLETE     {
-// OBSOLETE       /* insert trap  after  pc */
-// OBSOLETE       stepping.trap1_addr = pc + INSTRUCTION_SIZE(pc);     
-// OBSOLETE       stepping.trap1_save = *(unsigned short *) stepping.trap1_addr;
-// OBSOLETE       *(unsigned short *) stepping.trap1_addr = trap1;
-// OBSOLETE     }
-// OBSOLETE   /* "continue_p" means that we are actually doing a continue, and not 
-// OBSOLETE      being requested to single-step by GDB.  Sometimes we have to do
-// OBSOLETE      one single-step before continuing, because the PC is on a half-word
-// OBSOLETE      boundary.  There's no way to simply resume at such an address.  */
-// OBSOLETE   stepping.continue_p = continue_p;
-// OBSOLETE   stepping.stepping = 1;           /* starting a single-step */
-// OBSOLETE   return 1;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: finish_from_step
-// OBSOLETE    Called from handle_exception to finish up when the user program 
-// OBSOLETE    returns from a single-step.  Replaces the instructions that had
-// OBSOLETE    been overwritten by traps or no-ops, 
-// OBSOLETE 
-// OBSOLETE    Returns: True  if we should notify GDB that the target stopped.
-// OBSOLETE        False if we only single-stepped because we had to before we
-// OBSOLETE        could continue (ie. we were trying to continue at a 
-// OBSOLETE        half-word boundary).  In that case don't notify GDB:
-// OBSOLETE        just "continue continuing".  */
-// OBSOLETE 
-// OBSOLETE static int
-// OBSOLETE finish_from_step (void)
-// OBSOLETE {
-// OBSOLETE   if (stepping.stepping)   /* anything to do? */
-// OBSOLETE     {
-// OBSOLETE       int continue_p = stepping.continue_p;
-// OBSOLETE       unsigned char *p;
-// OBSOLETE 
-// OBSOLETE       if (stepping.noop_addr)      /* replace instr "under" our no-op */
-// OBSOLETE    *(unsigned short *) stepping.noop_addr  = stepping.noop_save;
-// OBSOLETE       if (stepping.trap1_addr)     /* replace instr "under" our trap  */
-// OBSOLETE    *(unsigned short *) stepping.trap1_addr = stepping.trap1_save;
-// OBSOLETE       if (stepping.trap2_addr)  /* ditto our other trap, if any    */
-// OBSOLETE    *(unsigned short *) stepping.trap2_addr = stepping.trap2_save;
-// OBSOLETE 
-// OBSOLETE       for (p = (unsigned char *) &stepping;        /* zero out the stepping context */
-// OBSOLETE       p < ((unsigned char *) &stepping) + sizeof(stepping);
-// OBSOLETE       p++)
-// OBSOLETE    *p = 0;
-// OBSOLETE 
-// OBSOLETE       return !(continue_p);
-// OBSOLETE     }
-// OBSOLETE   else     /* we didn't single-step, therefore this must be a legitimate stop */
-// OBSOLETE     return 1;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE struct PSWreg {            /* separate out the bit flags in the PSW register */
-// OBSOLETE   int pad1 : 16;
-// OBSOLETE   int bsm  : 1;
-// OBSOLETE   int bie  : 1;
-// OBSOLETE   int pad2 : 5;
-// OBSOLETE   int bc   : 1;
-// OBSOLETE   int sm   : 1;
-// OBSOLETE   int ie   : 1;
-// OBSOLETE   int pad3 : 5;
-// OBSOLETE   int c    : 1;
-// OBSOLETE } *psw;
-// OBSOLETE 
-// OBSOLETE /* Upon entry the value for LR to save has been pushed.
-// OBSOLETE    We unpush that so that the value for the stack pointer saved is correct.
-// OBSOLETE    Upon entry, all other registers are assumed to have not been modified
-// OBSOLETE    since the interrupt/trap occured.  */
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE stash_registers:
-// OBSOLETE    push r0
-// OBSOLETE    push r1
-// OBSOLETE    seth r1, #shigh(registers)
-// OBSOLETE    add3 r1, r1, #low(registers)
-// OBSOLETE    pop r0          ; r1
-// OBSOLETE    st r0, @(4,r1)
-// OBSOLETE    pop r0          ; r0
-// OBSOLETE    st r0, @r1
-// OBSOLETE    addi r1, #4     ; only add 4 as subsequent saves are `pre inc'
-// OBSOLETE    st r2, @+r1
-// OBSOLETE    st r3, @+r1
-// OBSOLETE    st r4, @+r1
-// OBSOLETE    st r5, @+r1
-// OBSOLETE    st r6, @+r1
-// OBSOLETE    st r7, @+r1
-// OBSOLETE    st r8, @+r1
-// OBSOLETE    st r9, @+r1
-// OBSOLETE    st r10, @+r1
-// OBSOLETE    st r11, @+r1
-// OBSOLETE    st r12, @+r1
-// OBSOLETE    st r13, @+r1    ; fp
-// OBSOLETE    pop r0          ; lr (r14)
-// OBSOLETE    st r0, @+r1
-// OBSOLETE    st sp, @+r1     ; sp contains right value at this point
-// OBSOLETE    mvfc r0, cr0
-// OBSOLETE    st r0, @+r1     ; cr0 == PSW
-// OBSOLETE    mvfc r0, cr1
-// OBSOLETE    st r0, @+r1     ; cr1 == CBR
-// OBSOLETE    mvfc r0, cr2
-// OBSOLETE    st r0, @+r1     ; cr2 == SPI
-// OBSOLETE    mvfc r0, cr3
-// OBSOLETE    st r0, @+r1     ; cr3 == SPU
-// OBSOLETE    mvfc r0, cr6
-// OBSOLETE    st r0, @+r1     ; cr6 == BPC
-// OBSOLETE    st r0, @+r1     ; PC  == BPC
-// OBSOLETE    mvfaclo r0
-// OBSOLETE    st r0, @+r1     ; ACCL
-// OBSOLETE    mvfachi r0
-// OBSOLETE    st r0, @+r1     ; ACCH
-// OBSOLETE    jmp lr");
-// OBSOLETE 
-// OBSOLETE /* C routine to clean up what stash_registers did.
-// OBSOLETE    It is called after calling stash_registers.
-// OBSOLETE    This is separate from stash_registers as we want to do this in C
-// OBSOLETE    but doing stash_registers in C isn't straightforward.  */
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE cleanup_stash (void)
-// OBSOLETE {
-// OBSOLETE   psw = (struct PSWreg *) &registers[PSW]; /* fields of PSW register */
-// OBSOLETE   psw->sm = psw->bsm;              /* fix up pre-trap values of psw fields */
-// OBSOLETE   psw->ie = psw->bie;
-// OBSOLETE   psw->c  = psw->bc;
-// OBSOLETE   registers[CBR] = psw->bc;                /* fix up pre-trap "C" register */
-// OBSOLETE 
-// OBSOLETE #if 0 /* FIXME: Was in previous version.  Necessary?
-// OBSOLETE     (Remember that we use the "rte" insn to return from the
-// OBSOLETE     trap/interrupt so the values of bsm, bie, bc are important.  */
-// OBSOLETE   psw->bsm = psw->bie = psw->bc = 0;       /* zero post-trap values */
-// OBSOLETE #endif
-// OBSOLETE 
-// OBSOLETE   /* FIXME: Copied from previous version.  This can probably be deleted
-// OBSOLETE      since methinks stash_registers has already done this.  */
-// OBSOLETE   registers[PC] = registers[BPC];  /* pre-trap PC */
-// OBSOLETE 
-// OBSOLETE   /* FIXME: Copied from previous version.  Necessary?  */
-// OBSOLETE   if (psw->sm)                     /* copy R15 into (psw->sm ? SPU : SPI) */
-// OBSOLETE     registers[SPU] = registers[R15];
-// OBSOLETE   else
-// OBSOLETE     registers[SPI] = registers[R15];
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE restore_and_return:
-// OBSOLETE    seth r0, #shigh(registers+8)
-// OBSOLETE    add3 r0, r0, #low(registers+8)
-// OBSOLETE    ld r2, @r0+     ; restore r2
-// OBSOLETE    ld r3, @r0+     ; restore r3
-// OBSOLETE    ld r4, @r0+     ; restore r4
-// OBSOLETE    ld r5, @r0+     ; restore r5
-// OBSOLETE    ld r6, @r0+     ; restore r6
-// OBSOLETE    ld r7, @r0+     ; restore r7
-// OBSOLETE    ld r8, @r0+     ; restore r8
-// OBSOLETE    ld r9, @r0+     ; restore r9
-// OBSOLETE    ld r10, @r0+    ; restore r10
-// OBSOLETE    ld r11, @r0+    ; restore r11
-// OBSOLETE    ld r12, @r0+    ; restore r12
-// OBSOLETE    ld r13, @r0+    ; restore r13
-// OBSOLETE    ld r14, @r0+    ; restore r14
-// OBSOLETE    ld r15, @r0+    ; restore r15
-// OBSOLETE    addi r0, #4     ; don't restore PSW (rte will do it)
-// OBSOLETE    ld r1, @r0+     ; restore cr1 == CBR (no-op, because it's read only)
-// OBSOLETE    mvtc r1, cr1
-// OBSOLETE    ld r1, @r0+     ; restore cr2 == SPI
-// OBSOLETE    mvtc r1, cr2
-// OBSOLETE    ld r1, @r0+     ; restore cr3 == SPU
-// OBSOLETE    mvtc r1, cr3
-// OBSOLETE    addi r0, #4     ; skip BPC
-// OBSOLETE    ld r1, @r0+     ; restore cr6 (BPC) == PC
-// OBSOLETE    mvtc r1, cr6
-// OBSOLETE    ld r1, @r0+     ; restore ACCL
-// OBSOLETE    mvtaclo r1
-// OBSOLETE    ld r1, @r0+     ; restore ACCH
-// OBSOLETE    mvtachi r1
-// OBSOLETE    seth r0, #shigh(registers)
-// OBSOLETE    add3 r0, r0, #low(registers)
-// OBSOLETE    ld r1, @(4,r0)  ; restore r1
-// OBSOLETE    ld r0, @r0      ; restore r0
-// OBSOLETE    rte");
-// OBSOLETE 
-// OBSOLETE /* General trap handler, called after the registers have been stashed.
-// OBSOLETE    NUM is the trap/exception number.  */
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE process_exception (int num)
-// OBSOLETE {
-// OBSOLETE   cleanup_stash ();
-// OBSOLETE   asm volatile ("
-// OBSOLETE    seth r1, #shigh(stackPtr)
-// OBSOLETE    add3 r1, r1, #low(stackPtr)
-// OBSOLETE    ld r15, @r1             ; setup local stack (protect user stack)
-// OBSOLETE    mv r0, %0
-// OBSOLETE    bl handle_exception
-// OBSOLETE    bl restore_and_return"
-// OBSOLETE            : : "r" (num) : "r0", "r1");
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE void _catchException0 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException0:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #0
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException1 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException1:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    bl cleanup_stash
-// OBSOLETE    seth r1, #shigh(stackPtr)
-// OBSOLETE    add3 r1, r1, #low(stackPtr)
-// OBSOLETE    ld r15, @r1             ; setup local stack (protect user stack)
-// OBSOLETE    seth r1, #shigh(registers + 21*4) ; PC
-// OBSOLETE    add3 r1, r1, #low(registers + 21*4)
-// OBSOLETE    ld r0, @r1
-// OBSOLETE    addi r0, #-4            ; back up PC for breakpoint trap.
-// OBSOLETE    st r0, @r1              ; FIXME: what about bp in right slot?
-// OBSOLETE    ldi r0, #1
-// OBSOLETE    bl handle_exception
-// OBSOLETE    bl restore_and_return");
-// OBSOLETE 
-// OBSOLETE void _catchException2 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException2:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #2
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException3 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException3:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #3
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException4 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException4:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #4
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException5 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException5:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #5
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException6 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException6:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #6
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException7 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException7:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #7
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException8 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException8:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #8
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException9 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException9:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #9
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException10 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException10:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #10
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException11 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException11:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #11
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException12 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException12:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #12
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException13 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException13:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #13
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException14 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException14:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #14
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException15 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException15:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #15
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException16 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException16:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #16
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE void _catchException17 ();
-// OBSOLETE 
-// OBSOLETE asm ("
-// OBSOLETE _catchException17:
-// OBSOLETE    push lr
-// OBSOLETE    bl stash_registers
-// OBSOLETE    ; Note that at this point the pushed value of `lr' has been popped
-// OBSOLETE    ldi r0, #17
-// OBSOLETE    bl process_exception");
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE /* this function is used to set up exception handlers for tracing and
-// OBSOLETE    breakpoints */
-// OBSOLETE void 
-// OBSOLETE set_debug_traps (void)
-// OBSOLETE {
-// OBSOLETE   /*  extern void remcomHandler(); */
-// OBSOLETE   int i;
-// OBSOLETE 
-// OBSOLETE   for (i = 0; i < 18; i++)         /* keep a copy of old vectors */
-// OBSOLETE     if (save_vectors[i] == 0)              /* only copy them the first time */
-// OBSOLETE       save_vectors[i] = getExceptionHandler (i);
-// OBSOLETE 
-// OBSOLETE   stackPtr  = &remcomStack[STACKSIZE/sizeof(int) - 1];
-// OBSOLETE 
-// OBSOLETE   exceptionHandler (0, _catchException0);
-// OBSOLETE   exceptionHandler (1, _catchException1);
-// OBSOLETE   exceptionHandler (2, _catchException2);
-// OBSOLETE   exceptionHandler (3, _catchException3);
-// OBSOLETE   exceptionHandler (4, _catchException4);
-// OBSOLETE   exceptionHandler (5, _catchException5);
-// OBSOLETE   exceptionHandler (6, _catchException6);
-// OBSOLETE   exceptionHandler (7, _catchException7);
-// OBSOLETE   exceptionHandler (8, _catchException8);
-// OBSOLETE   exceptionHandler (9, _catchException9);
-// OBSOLETE   exceptionHandler (10, _catchException10);
-// OBSOLETE   exceptionHandler (11, _catchException11);
-// OBSOLETE   exceptionHandler (12, _catchException12);
-// OBSOLETE   exceptionHandler (13, _catchException13);
-// OBSOLETE   exceptionHandler (14, _catchException14);
-// OBSOLETE   exceptionHandler (15, _catchException15);
-// OBSOLETE   exceptionHandler (16, _catchException16);
-// OBSOLETE   /*  exceptionHandler (17, _catchException17); */
-// OBSOLETE 
-// OBSOLETE   initialized = 1;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* This function will generate a breakpoint exception.  It is used at the
-// OBSOLETE    beginning of a program to sync up with a debugger and can be used
-// OBSOLETE    otherwise as a quick means to stop program execution and "break" into
-// OBSOLETE    the debugger. */
-// OBSOLETE 
-// OBSOLETE #define BREAKPOINT() asm volatile ("       trap #2");
-// OBSOLETE 
-// OBSOLETE void 
-// OBSOLETE breakpoint (void)
-// OBSOLETE {
-// OBSOLETE   if (initialized)
-// OBSOLETE     BREAKPOINT();
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* STDOUT section:
-// OBSOLETE    Stuff pertaining to simulating stdout by sending chars to gdb to be echoed.
-// OBSOLETE    Functions: gdb_putchar(char ch)
-// OBSOLETE               gdb_puts(char *str)
-// OBSOLETE               gdb_write(char *str, int len)
-// OBSOLETE               gdb_error(char *format, char *parm)
-// OBSOLETE          */
-// OBSOLETE  
-// OBSOLETE /* Function: gdb_putchar(int)
-// OBSOLETE    Make gdb write a char to stdout.
-// OBSOLETE    Returns: the char */
-// OBSOLETE  
-// OBSOLETE static int
-// OBSOLETE gdb_putchar (int ch)
-// OBSOLETE {
-// OBSOLETE   char buf[4];
-// OBSOLETE  
-// OBSOLETE   buf[0] = 'O';
-// OBSOLETE   buf[1] = hexchars[ch >> 4];
-// OBSOLETE   buf[2] = hexchars[ch & 0x0F];
-// OBSOLETE   buf[3] = 0;
-// OBSOLETE   putpacket(buf);
-// OBSOLETE   return ch;
-// OBSOLETE }
-// OBSOLETE  
-// OBSOLETE /* Function: gdb_write(char *, int)
-// OBSOLETE    Make gdb write n bytes to stdout (not assumed to be null-terminated).
-// OBSOLETE    Returns: number of bytes written */
-// OBSOLETE  
-// OBSOLETE static int
-// OBSOLETE gdb_write (char *data, int len)
-// OBSOLETE {
-// OBSOLETE   char *buf, *cpy;
-// OBSOLETE   int i;
-// OBSOLETE  
-// OBSOLETE   buf = remcomOutBuffer;
-// OBSOLETE   buf[0] = 'O';
-// OBSOLETE   i = 0;
-// OBSOLETE   while (i < len)
-// OBSOLETE     {
-// OBSOLETE       for (cpy = buf+1; 
-// OBSOLETE       i < len && cpy < buf + sizeof(remcomOutBuffer) - 3; 
-// OBSOLETE       i++)
-// OBSOLETE    {
-// OBSOLETE      *cpy++ = hexchars[data[i] >> 4];
-// OBSOLETE      *cpy++ = hexchars[data[i] & 0x0F];
-// OBSOLETE    }
-// OBSOLETE       *cpy = 0;
-// OBSOLETE       putpacket(buf);
-// OBSOLETE     }
-// OBSOLETE   return len;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: gdb_puts(char *)
-// OBSOLETE    Make gdb write a null-terminated string to stdout.
-// OBSOLETE    Returns: the length of the string */
-// OBSOLETE  
-// OBSOLETE static int
-// OBSOLETE gdb_puts (char *str)
-// OBSOLETE {
-// OBSOLETE   return gdb_write(str, strlen(str));
-// OBSOLETE }
-// OBSOLETE  
-// OBSOLETE /* Function: gdb_error(char *, char *)
-// OBSOLETE    Send an error message to gdb's stdout.
-// OBSOLETE    First string may have 1 (one) optional "%s" in it, which
-// OBSOLETE    will cause the optional second string to be inserted.  */
-// OBSOLETE  
-// OBSOLETE static void
-// OBSOLETE gdb_error (char *format, char *parm)
-// OBSOLETE {
-// OBSOLETE   char buf[400], *cpy;
-// OBSOLETE   int len;
-// OBSOLETE  
-// OBSOLETE   if (remote_debug)
-// OBSOLETE     {
-// OBSOLETE       if (format && *format)
-// OBSOLETE    len = strlen(format);
-// OBSOLETE       else
-// OBSOLETE    return;             /* empty input */
-// OBSOLETE 
-// OBSOLETE       if (parm && *parm)
-// OBSOLETE    len += strlen(parm);
-// OBSOLETE  
-// OBSOLETE       for (cpy = buf; *format; )
-// OBSOLETE    {
-// OBSOLETE      if (format[0] == '%' && format[1] == 's') /* include second string */
-// OBSOLETE        {
-// OBSOLETE          format += 2;          /* advance two chars instead of just one */
-// OBSOLETE          while (parm && *parm)
-// OBSOLETE            *cpy++ = *parm++;
-// OBSOLETE        }
-// OBSOLETE      else
-// OBSOLETE        *cpy++ = *format++;
-// OBSOLETE    }
-// OBSOLETE       *cpy = '\0';
-// OBSOLETE       gdb_puts(buf);
-// OBSOLETE     }
-// OBSOLETE }
-// OBSOLETE  
-// OBSOLETE static unsigned char *
-// OBSOLETE strcpy (unsigned char *dest, const unsigned char *src)
-// OBSOLETE {
-// OBSOLETE   unsigned char *ret = dest;
-// OBSOLETE 
-// OBSOLETE   if (dest && src)
-// OBSOLETE     {
-// OBSOLETE       while (*src)
-// OBSOLETE    *dest++ = *src++;
-// OBSOLETE       *dest = 0;
-// OBSOLETE     }
-// OBSOLETE   return ret;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static int
-// OBSOLETE strlen (const unsigned char *src)
-// OBSOLETE {
-// OBSOLETE   int ret;
-// OBSOLETE 
-// OBSOLETE   for (ret = 0; *src; src++)
-// OBSOLETE     ret++;
-// OBSOLETE 
-// OBSOLETE   return ret;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE #if 0
-// OBSOLETE void exit (code)
-// OBSOLETE      int code;
-// OBSOLETE {
-// OBSOLETE   _exit (code);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE int atexit (void *p)
-// OBSOLETE {
-// OBSOLETE   return 0;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE void abort (void)
-// OBSOLETE {
-// OBSOLETE   _exit (1);
-// OBSOLETE }
-// OBSOLETE #endif
+/****************************************************************************
+
+               THIS SOFTWARE IS NOT COPYRIGHTED
+
+   HP offers the following for use in the public domain.  HP makes no
+   warranty with regard to the software or it's performance and the
+   user accepts the software "AS IS" with all faults.
+
+   HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD
+   TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+****************************************************************************/
+
+/****************************************************************************
+ *  Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
+ *
+ *  Module name: remcom.c $
+ *  Revision: 1.34 $
+ *  Date: 91/03/09 12:29:49 $
+ *  Contributor:     Lake Stevens Instrument Division$
+ *
+ *  Description:     low level support for gdb debugger. $
+ *
+ *  Considerations:  only works on target hardware $
+ *
+ *  Written by:      Glenn Engel $
+ *  ModuleState:     Experimental $
+ *
+ *  NOTES:           See Below $
+ *
+ *  Modified for M32R by Michael Snyder, Cygnus Support.
+ *
+ *  To enable debugger support, two things need to happen.  One, a
+ *  call to set_debug_traps() is necessary in order to allow any breakpoints
+ *  or error conditions to be properly intercepted and reported to gdb.
+ *  Two, a breakpoint needs to be generated to begin communication.  This
+ *  is most easily accomplished by a call to breakpoint().  Breakpoint()
+ *  simulates a breakpoint by executing a trap #1.
+ *
+ *  The external function exceptionHandler() is
+ *  used to attach a specific handler to a specific M32R vector number.
+ *  It should use the same privilege level it runs at.  It should
+ *  install it as an interrupt gate so that interrupts are masked
+ *  while the handler runs.
+ *
+ *  Because gdb will sometimes write to the stack area to execute function
+ *  calls, this program cannot rely on using the supervisor stack so it
+ *  uses it's own stack area reserved in the int array remcomStack.
+ *
+ *************
+ *
+ *    The following gdb commands are supported:
+ *
+ * command          function                               Return value
+ *
+ *    g             return the value of the CPU registers  hex data or ENN
+ *    G             set the value of the CPU registers     OK or ENN
+ *
+ *    mAA..AA,LLLL  Read LLLL bytes at address AA..AA      hex data or ENN
+ *    MAA..AA,LLLL: Write LLLL bytes at address AA.AA      OK or ENN
+ *    XAA..AA,LLLL: Write LLLL binary bytes at address     OK or ENN
+ *                  AA..AA
+ *
+ *    c             Resume at current address              SNN   ( signal NN)
+ *    cAA..AA       Continue at address AA..AA             SNN
+ *
+ *    s             Step one instruction                   SNN
+ *    sAA..AA       Step one instruction from AA..AA       SNN
+ *
+ *    k             kill
+ *
+ *    ?             What was the last sigval ?             SNN   (signal NN)
+ *
+ * All commands and responses are sent with a packet which includes a
+ * checksum.  A packet consists of
+ *
+ * $<packet info>#<checksum>.
+ *
+ * where
+ * <packet info> :: <characters representing the command or response>
+ * <checksum>    :: <two hex digits computed as modulo 256 sum of <packetinfo>>
+ *
+ * When a packet is received, it is first acknowledged with either '+' or '-'.
+ * '+' indicates a successful transfer.  '-' indicates a failed transfer.
+ *
+ * Example:
+ *
+ * Host:                  Reply:
+ * $m0,10#2a               +$00010203040506070809101112131415#42
+ *
+ ****************************************************************************/
+
+
+/************************************************************************
+ *
+ * external low-level support routines
+ */
+extern void putDebugChar ();   /* write a single character      */
+extern int getDebugChar ();    /* read and return a single char */
+extern void exceptionHandler ();       /* assign an exception handler   */
+
+/*****************************************************************************
+ * BUFMAX defines the maximum number of characters in inbound/outbound buffers
+ * at least NUMREGBYTES*2 are needed for register packets 
+ */
+#define BUFMAX 400
+
+static char initialized;       /* boolean flag. != 0 means we've been initialized */
+
+int remote_debug;
+/*  debug >  0 prints ill-formed commands in valid packets & checksum errors */
+
+static const unsigned char hexchars[] = "0123456789abcdef";
+
+#define NUMREGS 24
+
+/* Number of bytes of registers.  */
+#define NUMREGBYTES (NUMREGS * 4)
+enum regnames
+{ R0, R1, R2, R3, R4, R5, R6, R7,
+  R8, R9, R10, R11, R12, R13, R14, R15,
+  PSW, CBR, SPI, SPU, BPC, PC, ACCL, ACCH
+};
+
+enum SYS_calls
+{
+  SYS_null,
+  SYS_exit,
+  SYS_open,
+  SYS_close,
+  SYS_read,
+  SYS_write,
+  SYS_lseek,
+  SYS_unlink,
+  SYS_getpid,
+  SYS_kill,
+  SYS_fstat,
+  SYS_sbrk,
+  SYS_fork,
+  SYS_execve,
+  SYS_wait4,
+  SYS_link,
+  SYS_chdir,
+  SYS_stat,
+  SYS_utime,
+  SYS_chown,
+  SYS_chmod,
+  SYS_time,
+  SYS_pipe
+};
+
+static int registers[NUMREGS];
+
+#define STACKSIZE 8096
+static unsigned char remcomInBuffer[BUFMAX];
+static unsigned char remcomOutBuffer[BUFMAX];
+static int remcomStack[STACKSIZE / sizeof (int)];
+static int *stackPtr = &remcomStack[STACKSIZE / sizeof (int) - 1];
+
+static unsigned int save_vectors[18];  /* previous exception vectors */
+
+/* Indicate to caller of mem2hex or hex2mem that there has been an error. */
+static volatile int mem_err = 0;
+
+/* Store the vector number here (since GDB only gets the signal
+   number through the usual means, and that's not very specific).  */
+int gdb_m32r_vector = -1;
+
+#if 0
+#include "syscall.h"           /* for SYS_exit, SYS_write etc. */
+#endif
+
+/* Global entry points:
+ */
+
+extern void handle_exception (int);
+extern void set_debug_traps (void);
+extern void breakpoint (void);
+
+/* Local functions:
+ */
+
+static int computeSignal (int);
+static void putpacket (unsigned char *);
+static unsigned char *getpacket (void);
+
+static unsigned char *mem2hex (unsigned char *, unsigned char *, int, int);
+static unsigned char *hex2mem (unsigned char *, unsigned char *, int, int);
+static int hexToInt (unsigned char **, int *);
+static unsigned char *bin2mem (unsigned char *, unsigned char *, int, int);
+static void stash_registers (void);
+static void restore_registers (void);
+static int prepare_to_step (int);
+static int finish_from_step (void);
+static unsigned long crc32 (unsigned char *, int, unsigned long);
+
+static void gdb_error (char *, char *);
+static int gdb_putchar (int), gdb_puts (char *), gdb_write (char *, int);
+
+static unsigned char *strcpy (unsigned char *, const unsigned char *);
+static int strlen (const unsigned char *);
+
+/*
+ * This function does all command procesing for interfacing to gdb.
+ */
+
+void
+handle_exception (int exceptionVector)
+{
+  int sigval, stepping;
+  int addr, length, i;
+  unsigned char *ptr;
+  unsigned char buf[16];
+  int binary;
+
+  if (!finish_from_step ())
+    return;                    /* "false step": let the target continue */
+
+  gdb_m32r_vector = exceptionVector;
+
+  if (remote_debug)
+    {
+      mem2hex ((unsigned char *) &exceptionVector, buf, 4, 0);
+      gdb_error ("Handle exception %s, ", buf);
+      mem2hex ((unsigned char *) &registers[PC], buf, 4, 0);
+      gdb_error ("PC == 0x%s\n", buf);
+    }
+
+  /* reply to host that an exception has occurred */
+  sigval = computeSignal (exceptionVector);
+
+  ptr = remcomOutBuffer;
+
+  *ptr++ = 'T';                        /* notify gdb with signo, PC, FP and SP */
+  *ptr++ = hexchars[sigval >> 4];
+  *ptr++ = hexchars[sigval & 0xf];
+
+  *ptr++ = hexchars[PC >> 4];
+  *ptr++ = hexchars[PC & 0xf];
+  *ptr++ = ':';
+  ptr = mem2hex ((unsigned char *) &registers[PC], ptr, 4, 0); /* PC */
+  *ptr++ = ';';
+
+  *ptr++ = hexchars[R13 >> 4];
+  *ptr++ = hexchars[R13 & 0xf];
+  *ptr++ = ':';
+  ptr = mem2hex ((unsigned char *) &registers[R13], ptr, 4, 0);        /* FP */
+  *ptr++ = ';';
+
+  *ptr++ = hexchars[R15 >> 4];
+  *ptr++ = hexchars[R15 & 0xf];
+  *ptr++ = ':';
+  ptr = mem2hex ((unsigned char *) &registers[R15], ptr, 4, 0);        /* SP */
+  *ptr++ = ';';
+  *ptr++ = 0;
+
+  if (exceptionVector == 0)    /* simulated SYS call stuff */
+    {
+      mem2hex ((unsigned char *) &registers[PC], buf, 4, 0);
+      switch (registers[R0])
+       {
+       case SYS_exit:
+         gdb_error ("Target program has exited at %s\n", buf);
+         ptr = remcomOutBuffer;
+         *ptr++ = 'W';
+         sigval = registers[R1] & 0xff;
+         *ptr++ = hexchars[sigval >> 4];
+         *ptr++ = hexchars[sigval & 0xf];
+         *ptr++ = 0;
+         break;
+       case SYS_open:
+         gdb_error ("Target attempts SYS_open call at %s\n", buf);
+         break;
+       case SYS_close:
+         gdb_error ("Target attempts SYS_close call at %s\n", buf);
+         break;
+       case SYS_read:
+         gdb_error ("Target attempts SYS_read call at %s\n", buf);
+         break;
+       case SYS_write:
+         if (registers[R1] == 1 ||     /* write to stdout  */
+             registers[R1] == 2)       /* write to stderr  */
+           {                   /* (we can do that) */
+             registers[R0] =
+               gdb_write ((void *) registers[R2], registers[R3]);
+             return;
+           }
+         else
+           gdb_error ("Target attempts SYS_write call at %s\n", buf);
+         break;
+       case SYS_lseek:
+         gdb_error ("Target attempts SYS_lseek call at %s\n", buf);
+         break;
+       case SYS_unlink:
+         gdb_error ("Target attempts SYS_unlink call at %s\n", buf);
+         break;
+       case SYS_getpid:
+         gdb_error ("Target attempts SYS_getpid call at %s\n", buf);
+         break;
+       case SYS_kill:
+         gdb_error ("Target attempts SYS_kill call at %s\n", buf);
+         break;
+       case SYS_fstat:
+         gdb_error ("Target attempts SYS_fstat call at %s\n", buf);
+         break;
+       default:
+         gdb_error ("Target attempts unknown SYS call at %s\n", buf);
+         break;
+       }
+    }
+
+  putpacket (remcomOutBuffer);
+
+  stepping = 0;
+
+  while (1 == 1)
+    {
+      remcomOutBuffer[0] = 0;
+      ptr = getpacket ();
+      binary = 0;
+      switch (*ptr++)
+       {
+       default:                /* Unknown code.  Return an empty reply message. */
+         break;
+       case 'R':
+         if (hexToInt (&ptr, &addr))
+           registers[PC] = addr;
+         strcpy (remcomOutBuffer, "OK");
+         break;
+       case '!':
+         strcpy (remcomOutBuffer, "OK");
+         break;
+       case 'X':               /* XAA..AA,LLLL:<binary data>#cs */
+         binary = 1;
+       case 'M':               /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
+         /* TRY TO READ '%x,%x:'.  IF SUCCEED, SET PTR = 0 */
+         {
+           if (hexToInt (&ptr, &addr))
+             if (*(ptr++) == ',')
+               if (hexToInt (&ptr, &length))
+                 if (*(ptr++) == ':')
+                   {
+                     mem_err = 0;
+                     if (binary)
+                       bin2mem (ptr, (unsigned char *) addr, length, 1);
+                     else
+                       hex2mem (ptr, (unsigned char *) addr, length, 1);
+                     if (mem_err)
+                       {
+                         strcpy (remcomOutBuffer, "E03");
+                         gdb_error ("memory fault", "");
+                       }
+                     else
+                       {
+                         strcpy (remcomOutBuffer, "OK");
+                       }
+                     ptr = 0;
+                   }
+           if (ptr)
+             {
+               strcpy (remcomOutBuffer, "E02");
+             }
+         }
+         break;
+       case 'm':               /* mAA..AA,LLLL  Read LLLL bytes at address AA..AA */
+         /* TRY TO READ %x,%x.  IF SUCCEED, SET PTR = 0 */
+         if (hexToInt (&ptr, &addr))
+           if (*(ptr++) == ',')
+             if (hexToInt (&ptr, &length))
+               {
+                 ptr = 0;
+                 mem_err = 0;
+                 mem2hex ((unsigned char *) addr, remcomOutBuffer, length,
+                          1);
+                 if (mem_err)
+                   {
+                     strcpy (remcomOutBuffer, "E03");
+                     gdb_error ("memory fault", "");
+                   }
+               }
+         if (ptr)
+           {
+             strcpy (remcomOutBuffer, "E01");
+           }
+         break;
+       case '?':
+         remcomOutBuffer[0] = 'S';
+         remcomOutBuffer[1] = hexchars[sigval >> 4];
+         remcomOutBuffer[2] = hexchars[sigval % 16];
+         remcomOutBuffer[3] = 0;
+         break;
+       case 'd':
+         remote_debug = !(remote_debug);       /* toggle debug flag */
+         break;
+       case 'g':               /* return the value of the CPU registers */
+         mem2hex ((unsigned char *) registers, remcomOutBuffer, NUMREGBYTES,
+                  0);
+         break;
+       case 'P':               /* set the value of a single CPU register - return OK */
+         {
+           int regno;
+
+           if (hexToInt (&ptr, &regno) && *ptr++ == '=')
+             if (regno >= 0 && regno < NUMREGS)
+               {
+                 int stackmode;
+
+                 hex2mem (ptr, (unsigned char *) &registers[regno], 4, 0);
+                 /*
+                  * Since we just changed a single CPU register, let's
+                  * make sure to keep the several stack pointers consistant.
+                  */
+                 stackmode = registers[PSW] & 0x80;
+                 if (regno == R15)     /* stack pointer changed */
+                   {           /* need to change SPI or SPU */
+                     if (stackmode == 0)
+                       registers[SPI] = registers[R15];
+                     else
+                       registers[SPU] = registers[R15];
+                   }
+                 else if (regno == SPU)        /* "user" stack pointer changed */
+                   {
+                     if (stackmode != 0)       /* stack in user mode: copy SP */
+                       registers[R15] = registers[SPU];
+                   }
+                 else if (regno == SPI)        /* "interrupt" stack pointer changed */
+                   {
+                     if (stackmode == 0)       /* stack in interrupt mode: copy SP */
+                       registers[R15] = registers[SPI];
+                   }
+                 else if (regno == PSW)        /* stack mode may have changed! */
+                   {           /* force SP to either SPU or SPI */
+                     if (stackmode == 0)       /* stack in user mode */
+                       registers[R15] = registers[SPI];
+                     else      /* stack in interrupt mode */
+                       registers[R15] = registers[SPU];
+                   }
+                 strcpy (remcomOutBuffer, "OK");
+                 break;
+               }
+           strcpy (remcomOutBuffer, "E01");
+           break;
+         }
+       case 'G':               /* set the value of the CPU registers - return OK */
+         hex2mem (ptr, (unsigned char *) registers, NUMREGBYTES, 0);
+         strcpy (remcomOutBuffer, "OK");
+         break;
+       case 's':               /* sAA..AA      Step one instruction from AA..AA(optional) */
+         stepping = 1;
+       case 'c':               /* cAA..AA      Continue from address AA..AA(optional) */
+         /* try to read optional parameter, pc unchanged if no parm */
+         if (hexToInt (&ptr, &addr))
+           registers[PC] = addr;
+
+         if (stepping)         /* single-stepping */
+           {
+             if (!prepare_to_step (0)) /* set up for single-step */
+               {
+                 /* prepare_to_step has already emulated the target insn:
+                    Send SIGTRAP to gdb, don't resume the target at all.  */
+                 ptr = remcomOutBuffer;
+                 *ptr++ = 'T'; /* Simulate stopping with SIGTRAP */
+                 *ptr++ = '0';
+                 *ptr++ = '5';
+
+                 *ptr++ = hexchars[PC >> 4];   /* send PC */
+                 *ptr++ = hexchars[PC & 0xf];
+                 *ptr++ = ':';
+                 ptr = mem2hex ((unsigned char *) &registers[PC], ptr, 4, 0);
+                 *ptr++ = ';';
+
+                 *ptr++ = hexchars[R13 >> 4];  /* send FP */
+                 *ptr++ = hexchars[R13 & 0xf];
+                 *ptr++ = ':';
+                 ptr =
+                   mem2hex ((unsigned char *) &registers[R13], ptr, 4, 0);
+                 *ptr++ = ';';
+
+                 *ptr++ = hexchars[R15 >> 4];  /* send SP */
+                 *ptr++ = hexchars[R15 & 0xf];
+                 *ptr++ = ':';
+                 ptr =
+                   mem2hex ((unsigned char *) &registers[R15], ptr, 4, 0);
+                 *ptr++ = ';';
+                 *ptr++ = 0;
+
+                 break;
+               }
+           }
+         else                  /* continuing, not single-stepping */
+           {
+             /* OK, about to do a "continue".  First check to see if the 
+                target pc is on an odd boundary (second instruction in the 
+                word).  If so, we must do a single-step first, because 
+                ya can't jump or return back to an odd boundary!  */
+             if ((registers[PC] & 2) != 0)
+               prepare_to_step (1);
+           }
+
+         return;
+
+       case 'D':               /* Detach */
+#if 0
+         /* I am interpreting this to mean, release the board from control 
+            by the remote stub.  To do this, I am restoring the original
+            (or at least previous) exception vectors.
+          */
+         for (i = 0; i < 18; i++)
+           exceptionHandler (i, save_vectors[i]);
+         putpacket ("OK");
+         return;               /* continue the inferior */
+#else
+         strcpy (remcomOutBuffer, "OK");
+         break;
+#endif
+       case 'q':
+         if (*ptr++ == 'C' &&
+             *ptr++ == 'R' && *ptr++ == 'C' && *ptr++ == ':')
+           {
+             unsigned long start, len, our_crc;
+
+             if (hexToInt (&ptr, (int *) &start) &&
+                 *ptr++ == ',' && hexToInt (&ptr, (int *) &len))
+               {
+                 remcomOutBuffer[0] = 'C';
+                 our_crc = crc32 ((unsigned char *) start, len, 0xffffffff);
+                 mem2hex ((char *) &our_crc,
+                          &remcomOutBuffer[1], sizeof (long), 0);
+               }               /* else do nothing */
+           }                   /* else do nothing */
+         break;
+
+       case 'k':               /* kill the program */
+         continue;
+       }                       /* switch */
+
+      /* reply to the request */
+      putpacket (remcomOutBuffer);
+    }
+}
+
+/* qCRC support */
+
+/* Table used by the crc32 function to calcuate the checksum. */
+static unsigned long crc32_table[256] = { 0, 0 };
+
+static unsigned long
+crc32 (unsigned char *buf, int len, unsigned long crc)
+{
+  if (!crc32_table[1])
+    {
+      /* Initialize the CRC table and the decoding table. */
+      int i, j;
+      unsigned long c;
+
+      for (i = 0; i < 256; i++)
+       {
+         for (c = i << 24, j = 8; j > 0; --j)
+           c = c & 0x80000000 ? (c << 1) ^ 0x04c11db7 : (c << 1);
+         crc32_table[i] = c;
+       }
+    }
+
+  while (len--)
+    {
+      crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ *buf) & 255];
+      buf++;
+    }
+  return crc;
+}
+
+static int
+hex (unsigned char ch)
+{
+  if ((ch >= 'a') && (ch <= 'f'))
+    return (ch - 'a' + 10);
+  if ((ch >= '0') && (ch <= '9'))
+    return (ch - '0');
+  if ((ch >= 'A') && (ch <= 'F'))
+    return (ch - 'A' + 10);
+  return (-1);
+}
+
+/* scan for the sequence $<data>#<checksum>     */
+
+unsigned char *
+getpacket (void)
+{
+  unsigned char *buffer = &remcomInBuffer[0];
+  unsigned char checksum;
+  unsigned char xmitcsum;
+  int count;
+  char ch;
+
+  while (1)
+    {
+      /* wait around for the start character, ignore all other characters */
+      while ((ch = getDebugChar ()) != '$')
+       ;
+
+    retry:
+      checksum = 0;
+      xmitcsum = -1;
+      count = 0;
+
+      /* now, read until a # or end of buffer is found */
+      while (count < BUFMAX)
+       {
+         ch = getDebugChar ();
+         if (ch == '$')
+           goto retry;
+         if (ch == '#')
+           break;
+         checksum = checksum + ch;
+         buffer[count] = ch;
+         count = count + 1;
+       }
+      buffer[count] = 0;
+
+      if (ch == '#')
+       {
+         ch = getDebugChar ();
+         xmitcsum = hex (ch) << 4;
+         ch = getDebugChar ();
+         xmitcsum += hex (ch);
+
+         if (checksum != xmitcsum)
+           {
+             if (remote_debug)
+               {
+                 unsigned char buf[16];
+
+                 mem2hex ((unsigned char *) &checksum, buf, 4, 0);
+                 gdb_error ("Bad checksum: my count = %s, ", buf);
+                 mem2hex ((unsigned char *) &xmitcsum, buf, 4, 0);
+                 gdb_error ("sent count = %s\n", buf);
+                 gdb_error (" -- Bad buffer: \"%s\"\n", buffer);
+               }
+             putDebugChar ('-');       /* failed checksum */
+           }
+         else
+           {
+             putDebugChar ('+');       /* successful transfer */
+
+             /* if a sequence char is present, reply the sequence ID */
+             if (buffer[2] == ':')
+               {
+                 putDebugChar (buffer[0]);
+                 putDebugChar (buffer[1]);
+
+                 return &buffer[3];
+               }
+
+             return &buffer[0];
+           }
+       }
+    }
+}
+
+/* send the packet in buffer.  */
+
+static void
+putpacket (unsigned char *buffer)
+{
+  unsigned char checksum;
+  int count;
+  char ch;
+
+  /*  $<packet info>#<checksum>. */
+  do
+    {
+      putDebugChar ('$');
+      checksum = 0;
+      count = 0;
+
+      while (ch = buffer[count])
+       {
+         putDebugChar (ch);
+         checksum += ch;
+         count += 1;
+       }
+      putDebugChar ('#');
+      putDebugChar (hexchars[checksum >> 4]);
+      putDebugChar (hexchars[checksum % 16]);
+    }
+  while (getDebugChar () != '+');
+}
+
+/* Address of a routine to RTE to if we get a memory fault.  */
+
+static void (*volatile mem_fault_routine) () = 0;
+
+static void
+set_mem_err (void)
+{
+  mem_err = 1;
+}
+
+/* Check the address for safe access ranges.  As currently defined,
+   this routine will reject the "expansion bus" address range(s).
+   To make those ranges useable, someone must implement code to detect
+   whether there's anything connected to the expansion bus. */
+
+static int
+mem_safe (unsigned char *addr)
+{
+#define BAD_RANGE_ONE_START    ((unsigned char *) 0x600000)
+#define BAD_RANGE_ONE_END      ((unsigned char *) 0xa00000)
+#define BAD_RANGE_TWO_START    ((unsigned char *) 0xff680000)
+#define BAD_RANGE_TWO_END      ((unsigned char *) 0xff800000)
+
+  if (addr < BAD_RANGE_ONE_START)
+    return 1;                  /* safe */
+  if (addr < BAD_RANGE_ONE_END)
+    return 0;                  /* unsafe */
+  if (addr < BAD_RANGE_TWO_START)
+    return 1;                  /* safe */
+  if (addr < BAD_RANGE_TWO_END)
+    return 0;                  /* unsafe */
+}
+
+/* These are separate functions so that they are so short and sweet
+   that the compiler won't save any registers (if there is a fault
+   to mem_fault, they won't get restored, so there better not be any
+   saved).  */
+static int
+get_char (unsigned char *addr)
+{
+#if 1
+  if (mem_fault_routine && !mem_safe (addr))
+    {
+      mem_fault_routine ();
+      return 0;
+    }
+#endif
+  return *addr;
+}
+
+static void
+set_char (unsigned char *addr, unsigned char val)
+{
+#if 1
+  if (mem_fault_routine && !mem_safe (addr))
+    {
+      mem_fault_routine ();
+      return;
+    }
+#endif
+  *addr = val;
+}
+
+/* Convert the memory pointed to by mem into hex, placing result in buf.
+   Return a pointer to the last char put in buf (null).
+   If MAY_FAULT is non-zero, then we should set mem_err in response to
+   a fault; if zero treat a fault like any other fault in the stub.  */
+
+static unsigned char *
+mem2hex (unsigned char *mem, unsigned char *buf, int count, int may_fault)
+{
+  int i;
+  unsigned char ch;
+
+  if (may_fault)
+    mem_fault_routine = set_mem_err;
+  for (i = 0; i < count; i++)
+    {
+      ch = get_char (mem++);
+      if (may_fault && mem_err)
+       return (buf);
+      *buf++ = hexchars[ch >> 4];
+      *buf++ = hexchars[ch % 16];
+    }
+  *buf = 0;
+  if (may_fault)
+    mem_fault_routine = 0;
+  return (buf);
+}
+
+/* Convert the hex array pointed to by buf into binary to be placed in mem.
+   Return a pointer to the character AFTER the last byte written. */
+
+static unsigned char *
+hex2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
+{
+  int i;
+  unsigned char ch;
+
+  if (may_fault)
+    mem_fault_routine = set_mem_err;
+  for (i = 0; i < count; i++)
+    {
+      ch = hex (*buf++) << 4;
+      ch = ch + hex (*buf++);
+      set_char (mem++, ch);
+      if (may_fault && mem_err)
+       return (mem);
+    }
+  if (may_fault)
+    mem_fault_routine = 0;
+  return (mem);
+}
+
+/* Convert the binary stream in BUF to memory.
+
+   Gdb will escape $, #, and the escape char (0x7d).
+   COUNT is the total number of bytes to write into
+   memory. */
+static unsigned char *
+bin2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
+{
+  int i;
+  unsigned char ch;
+
+  if (may_fault)
+    mem_fault_routine = set_mem_err;
+  for (i = 0; i < count; i++)
+    {
+      /* Check for any escaped characters. Be paranoid and
+         only unescape chars that should be escaped. */
+      if (*buf == 0x7d)
+       {
+         switch (*(buf + 1))
+           {
+           case 0x3:           /* # */
+           case 0x4:           /* $ */
+           case 0x5d:          /* escape char */
+             buf++;
+             *buf |= 0x20;
+             break;
+           default:
+             /* nothing */
+             break;
+           }
+       }
+
+      set_char (mem++, *buf++);
+
+      if (may_fault && mem_err)
+       return mem;
+    }
+
+  if (may_fault)
+    mem_fault_routine = 0;
+  return mem;
+}
+
+/* this function takes the m32r exception vector and attempts to
+   translate this number into a unix compatible signal value */
+
+static int
+computeSignal (int exceptionVector)
+{
+  int sigval;
+  switch (exceptionVector)
+    {
+    case 0:
+      sigval = 23;
+      break;                   /* I/O trap                    */
+    case 1:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 2:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 3:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 4:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 5:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 6:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 7:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 8:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 9:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 10:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 11:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 12:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 13:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 14:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 15:
+      sigval = 5;
+      break;                   /* breakpoint                  */
+    case 16:
+      sigval = 10;
+      break;                   /* BUS ERROR (alignment)       */
+    case 17:
+      sigval = 2;
+      break;                   /* INTerrupt                   */
+    default:
+      sigval = 7;
+      break;                   /* "software generated"        */
+    }
+  return (sigval);
+}
+
+/**********************************************/
+/* WHILE WE FIND NICE HEX CHARS, BUILD AN INT */
+/* RETURN NUMBER OF CHARS PROCESSED           */
+/**********************************************/
+static int
+hexToInt (unsigned char **ptr, int *intValue)
+{
+  int numChars = 0;
+  int hexValue;
+
+  *intValue = 0;
+  while (**ptr)
+    {
+      hexValue = hex (**ptr);
+      if (hexValue >= 0)
+       {
+         *intValue = (*intValue << 4) | hexValue;
+         numChars++;
+       }
+      else
+       break;
+      (*ptr)++;
+    }
+  return (numChars);
+}
+
+/*
+  Table of branch instructions:
+  
+  10B6         RTE     return from trap or exception
+  1FCr         JMP     jump
+  1ECr         JL      jump and link
+  7Fxx         BRA     branch
+  FFxxxxxx     BRA     branch (long)
+  B09rxxxx     BNEZ    branch not-equal-zero
+  Br1rxxxx     BNE     branch not-equal
+  7Dxx         BNC     branch not-condition
+  FDxxxxxx     BNC     branch not-condition (long)
+  B0Arxxxx     BLTZ    branch less-than-zero
+  B0Crxxxx     BLEZ    branch less-equal-zero
+  7Exx         BL      branch and link
+  FExxxxxx     BL      branch and link (long)
+  B0Drxxxx     BGTZ    branch greater-than-zero
+  B0Brxxxx     BGEZ    branch greater-equal-zero
+  B08rxxxx     BEQZ    branch equal-zero
+  Br0rxxxx     BEQ     branch equal
+  7Cxx         BC      branch condition
+  FCxxxxxx     BC      branch condition (long)
+  */
+
+static int
+isShortBranch (unsigned char *instr)
+{
+  unsigned char instr0 = instr[0] & 0x7F;      /* mask off high bit */
+
+  if (instr0 == 0x10 && instr[1] == 0xB6)      /* RTE */
+    return 1;                  /* return from trap or exception */
+
+  if (instr0 == 0x1E || instr0 == 0x1F)        /* JL or JMP */
+    if ((instr[1] & 0xF0) == 0xC0)
+      return 2;                        /* jump thru a register */
+
+  if (instr0 == 0x7C || instr0 == 0x7D ||      /* BC, BNC, BL, BRA */
+      instr0 == 0x7E || instr0 == 0x7F)
+    return 3;                  /* eight bit PC offset */
+
+  return 0;
+}
+
+static int
+isLongBranch (unsigned char *instr)
+{
+  if (instr[0] == 0xFC || instr[0] == 0xFD ||  /* BRA, BNC, BL, BC */
+      instr[0] == 0xFE || instr[0] == 0xFF)    /* 24 bit relative */
+    return 4;
+  if ((instr[0] & 0xF0) == 0xB0)       /* 16 bit relative */
+    {
+      if ((instr[1] & 0xF0) == 0x00 || /* BNE, BEQ */
+         (instr[1] & 0xF0) == 0x10)
+       return 5;
+      if (instr[0] == 0xB0)    /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ, BEQZ */
+       if ((instr[1] & 0xF0) == 0x80 || (instr[1] & 0xF0) == 0x90 ||
+           (instr[1] & 0xF0) == 0xA0 || (instr[1] & 0xF0) == 0xB0 ||
+           (instr[1] & 0xF0) == 0xC0 || (instr[1] & 0xF0) == 0xD0)
+         return 6;
+    }
+  return 0;
+}
+
+/* if address is NOT on a 4-byte boundary, or high-bit of instr is zero, 
+   then it's a 2-byte instruction, else it's a 4-byte instruction.  */
+
+#define INSTRUCTION_SIZE(addr) \
+    ((((int) addr & 2) || (((unsigned char *) addr)[0] & 0x80) == 0) ? 2 : 4)
+
+static int
+isBranch (unsigned char *instr)
+{
+  if (INSTRUCTION_SIZE (instr) == 2)
+    return isShortBranch (instr);
+  else
+    return isLongBranch (instr);
+}
+
+static int
+willBranch (unsigned char *instr, int branchCode)
+{
+  switch (branchCode)
+    {
+    case 0:
+      return 0;                        /* not a branch */
+    case 1:
+      return 1;                        /* RTE */
+    case 2:
+      return 1;                        /* JL or JMP    */
+    case 3:                    /* BC, BNC, BL, BRA (short) */
+    case 4:                    /* BC, BNC, BL, BRA (long) */
+      switch (instr[0] & 0x0F)
+       {
+       case 0xC:               /* Branch if Condition Register */
+         return (registers[CBR] != 0);
+       case 0xD:               /* Branch if NOT Condition Register */
+         return (registers[CBR] == 0);
+       case 0xE:               /* Branch and Link */
+       case 0xF:               /* Branch (unconditional) */
+         return 1;
+       default:                /* oops? */
+         return 0;
+       }
+    case 5:                    /* BNE, BEQ */
+      switch (instr[1] & 0xF0)
+       {
+       case 0x00:              /* Branch if r1 equal to r2 */
+         return (registers[instr[0] & 0x0F] == registers[instr[1] & 0x0F]);
+       case 0x10:              /* Branch if r1 NOT equal to r2 */
+         return (registers[instr[0] & 0x0F] != registers[instr[1] & 0x0F]);
+       default:                /* oops? */
+         return 0;
+       }
+    case 6:                    /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ ,BEQZ */
+      switch (instr[1] & 0xF0)
+       {
+       case 0x80:              /* Branch if reg equal to zero */
+         return (registers[instr[1] & 0x0F] == 0);
+       case 0x90:              /* Branch if reg NOT equal to zero */
+         return (registers[instr[1] & 0x0F] != 0);
+       case 0xA0:              /* Branch if reg less than zero */
+         return (registers[instr[1] & 0x0F] < 0);
+       case 0xB0:              /* Branch if reg greater or equal to zero */
+         return (registers[instr[1] & 0x0F] >= 0);
+       case 0xC0:              /* Branch if reg less than or equal to zero */
+         return (registers[instr[1] & 0x0F] <= 0);
+       case 0xD0:              /* Branch if reg greater than zero */
+         return (registers[instr[1] & 0x0F] > 0);
+       default:                /* oops? */
+         return 0;
+       }
+    default:                   /* oops? */
+      return 0;
+    }
+}
+
+static int
+branchDestination (unsigned char *instr, int branchCode)
+{
+  switch (branchCode)
+    {
+    default:
+    case 0:                    /* not a branch */
+      return 0;
+    case 1:                    /* RTE */
+      return registers[BPC] & ~3;      /* pop BPC into PC */
+    case 2:                    /* JL or JMP */
+      return registers[instr[1] & 0x0F] & ~3;  /* jump thru a register */
+    case 3:                    /* BC, BNC, BL, BRA (short, 8-bit relative offset) */
+      return (((int) instr) & ~3) + ((char) instr[1] << 2);
+    case 4:                    /* BC, BNC, BL, BRA (long, 24-bit relative offset) */
+      return ((int) instr +
+             ((((char) instr[1] << 16) | (instr[2] << 8) | (instr[3])) <<
+              2));
+    case 5:                    /* BNE, BEQ (16-bit relative offset) */
+    case 6:                    /* BNEZ, BLTZ, BLEZ, BGTZ, BGEZ ,BEQZ (ditto) */
+      return ((int) instr + ((((char) instr[2] << 8) | (instr[3])) << 2));
+    }
+
+  /* An explanatory note: in the last three return expressions, I have
+     cast the most-significant byte of the return offset to char.
+     What this accomplishes is sign extension.  If the other
+     less-significant bytes were signed as well, they would get sign
+     extended too and, if negative, their leading bits would clobber
+     the bits of the more-significant bytes ahead of them.  There are
+     other ways I could have done this, but sign extension from
+     odd-sized integers is always a pain. */
+}
+
+static void
+branchSideEffects (unsigned char *instr, int branchCode)
+{
+  switch (branchCode)
+    {
+    case 1:                    /* RTE */
+      return;                  /* I <THINK> this is already handled... */
+    case 2:                    /* JL (or JMP) */
+    case 3:                    /* BL (or BC, BNC, BRA) */
+    case 4:
+      if ((instr[0] & 0x0F) == 0x0E)   /* branch/jump and link */
+       registers[R14] = (registers[PC] & ~3) + 4;
+      return;
+    default:                   /* any other branch has no side effects */
+      return;
+    }
+}
+
+static struct STEPPING_CONTEXT
+{
+  int stepping;                        /* true when we've started a single-step */
+  unsigned long target_addr;   /* the instr we're trying to execute */
+  unsigned long target_size;   /* the size of the target instr */
+  unsigned long noop_addr;     /* where we've inserted a no-op, if any */
+  unsigned long trap1_addr;    /* the trap following the target instr */
+  unsigned long trap2_addr;    /* the trap at a branch destination, if any */
+  unsigned short noop_save;    /* instruction overwritten by our no-op */
+  unsigned short trap1_save;   /* instruction overwritten by trap1 */
+  unsigned short trap2_save;   /* instruction overwritten by trap2 */
+  unsigned short continue_p;   /* true if NOT returning to gdb after step */
+} stepping;
+
+/* Function: prepare_to_step
+   Called from handle_exception to prepare the user program to single-step.
+   Places a trap instruction after the target instruction, with special 
+   extra handling for branch instructions and for instructions in the 
+   second half-word of a word.  
+
+   Returns: True  if we should actually execute the instruction; 
+           False if we are going to emulate executing the instruction,
+           in which case we simply report to GDB that the instruction 
+           has already been executed.  */
+
+#define TRAP1  0x10f1;         /* trap #1 instruction */
+#define NOOP   0x7000;         /* noop    instruction */
+
+static unsigned short trap1 = TRAP1;
+static unsigned short noop = NOOP;
+
+static int
+prepare_to_step (continue_p)
+     int continue_p;           /* if this isn't REALLY a single-step (see below) */
+{
+  unsigned long pc = registers[PC];
+  int branchCode = isBranch ((unsigned char *) pc);
+  unsigned char *p;
+
+  /* zero out the stepping context 
+     (paranoia -- it should already be zeroed) */
+  for (p = (unsigned char *) &stepping;
+       p < ((unsigned char *) &stepping) + sizeof (stepping); p++)
+    *p = 0;
+
+  if (branchCode != 0)         /* next instruction is a branch */
+    {
+      branchSideEffects ((unsigned char *) pc, branchCode);
+      if (willBranch ((unsigned char *) pc, branchCode))
+       registers[PC] = branchDestination ((unsigned char *) pc, branchCode);
+      else
+       registers[PC] = pc + INSTRUCTION_SIZE (pc);
+      return 0;                        /* branch "executed" -- just notify GDB */
+    }
+  else if (((int) pc & 2) != 0)        /* "second-slot" instruction */
+    {
+      /* insert no-op before pc */
+      stepping.noop_addr = pc - 2;
+      stepping.noop_save = *(unsigned short *) stepping.noop_addr;
+      *(unsigned short *) stepping.noop_addr = noop;
+      /* insert trap  after  pc */
+      stepping.trap1_addr = pc + 2;
+      stepping.trap1_save = *(unsigned short *) stepping.trap1_addr;
+      *(unsigned short *) stepping.trap1_addr = trap1;
+    }
+  else                         /* "first-slot" instruction */
+    {
+      /* insert trap  after  pc */
+      stepping.trap1_addr = pc + INSTRUCTION_SIZE (pc);
+      stepping.trap1_save = *(unsigned short *) stepping.trap1_addr;
+      *(unsigned short *) stepping.trap1_addr = trap1;
+    }
+  /* "continue_p" means that we are actually doing a continue, and not 
+     being requested to single-step by GDB.  Sometimes we have to do
+     one single-step before continuing, because the PC is on a half-word
+     boundary.  There's no way to simply resume at such an address.  */
+  stepping.continue_p = continue_p;
+  stepping.stepping = 1;       /* starting a single-step */
+  return 1;
+}
+
+/* Function: finish_from_step
+   Called from handle_exception to finish up when the user program 
+   returns from a single-step.  Replaces the instructions that had
+   been overwritten by traps or no-ops, 
+
+   Returns: True  if we should notify GDB that the target stopped.
+           False if we only single-stepped because we had to before we
+           could continue (ie. we were trying to continue at a 
+           half-word boundary).  In that case don't notify GDB:
+           just "continue continuing".  */
+
+static int
+finish_from_step (void)
+{
+  if (stepping.stepping)       /* anything to do? */
+    {
+      int continue_p = stepping.continue_p;
+      unsigned char *p;
+
+      if (stepping.noop_addr)  /* replace instr "under" our no-op */
+       *(unsigned short *) stepping.noop_addr = stepping.noop_save;
+      if (stepping.trap1_addr) /* replace instr "under" our trap  */
+       *(unsigned short *) stepping.trap1_addr = stepping.trap1_save;
+      if (stepping.trap2_addr) /* ditto our other trap, if any    */
+       *(unsigned short *) stepping.trap2_addr = stepping.trap2_save;
+
+      for (p = (unsigned char *) &stepping;    /* zero out the stepping context */
+          p < ((unsigned char *) &stepping) + sizeof (stepping); p++)
+       *p = 0;
+
+      return !(continue_p);
+    }
+  else                         /* we didn't single-step, therefore this must be a legitimate stop */
+    return 1;
+}
+
+struct PSWreg
+{                              /* separate out the bit flags in the PSW register */
+  int pad1:16;
+  int bsm:1;
+  int bie:1;
+  int pad2:5;
+  int bc:1;
+  int sm:1;
+  int ie:1;
+  int pad3:5;
+  int c:1;
+} *psw;
+
+/* Upon entry the value for LR to save has been pushed.
+   We unpush that so that the value for the stack pointer saved is correct.
+   Upon entry, all other registers are assumed to have not been modified
+   since the interrupt/trap occured.  */
+
+asm ("\n\
+stash_registers:\n\
+       push r0\n\
+       push r1\n\
+       seth r1, #shigh(registers)\n\
+       add3 r1, r1, #low(registers)\n\
+       pop r0          ; r1\n\
+       st r0, @(4,r1)\n\
+       pop r0          ; r0\n\
+       st r0, @r1\n\
+       addi r1, #4     ; only add 4 as subsequent saves are `pre inc'\n\
+       st r2, @+r1\n\
+       st r3, @+r1\n\
+       st r4, @+r1\n\
+       st r5, @+r1\n\
+       st r6, @+r1\n\
+       st r7, @+r1\n\
+       st r8, @+r1\n\
+       st r9, @+r1\n\
+       st r10, @+r1\n\
+       st r11, @+r1\n\
+       st r12, @+r1\n\
+       st r13, @+r1    ; fp\n\
+       pop r0          ; lr (r14)\n\
+       st r0, @+r1\n\
+       st sp, @+r1     ; sp contains right value at this point\n\
+       mvfc r0, cr0\n\
+       st r0, @+r1     ; cr0 == PSW\n\
+       mvfc r0, cr1\n\
+       st r0, @+r1     ; cr1 == CBR\n\
+       mvfc r0, cr2\n\
+       st r0, @+r1     ; cr2 == SPI\n\
+       mvfc r0, cr3\n\
+       st r0, @+r1     ; cr3 == SPU\n\
+       mvfc r0, cr6\n\
+       st r0, @+r1     ; cr6 == BPC\n\
+       st r0, @+r1     ; PC  == BPC\n\
+       mvfaclo r0\n\
+       st r0, @+r1     ; ACCL\n\
+       mvfachi r0\n\
+       st r0, @+r1     ; ACCH\n\
+       jmp lr");
+
+/* C routine to clean up what stash_registers did.
+   It is called after calling stash_registers.
+   This is separate from stash_registers as we want to do this in C
+   but doing stash_registers in C isn't straightforward.  */
+
+static void
+cleanup_stash (void)
+{
+  psw = (struct PSWreg *) &registers[PSW];     /* fields of PSW register */
+  psw->sm = psw->bsm;          /* fix up pre-trap values of psw fields */
+  psw->ie = psw->bie;
+  psw->c = psw->bc;
+  registers[CBR] = psw->bc;    /* fix up pre-trap "C" register */
+
+#if 0                          /* FIXME: Was in previous version.  Necessary?
+                                  (Remember that we use the "rte" insn to return from the
+                                  trap/interrupt so the values of bsm, bie, bc are important.  */
+  psw->bsm = psw->bie = psw->bc = 0;   /* zero post-trap values */
+#endif
+
+  /* FIXME: Copied from previous version.  This can probably be deleted
+     since methinks stash_registers has already done this.  */
+  registers[PC] = registers[BPC];      /* pre-trap PC */
+
+  /* FIXME: Copied from previous version.  Necessary?  */
+  if (psw->sm)                 /* copy R15 into (psw->sm ? SPU : SPI) */
+    registers[SPU] = registers[R15];
+  else
+    registers[SPI] = registers[R15];
+}
+
+asm ("\n\
+restore_and_return:\n\
+       seth r0, #shigh(registers+8)\n\
+       add3 r0, r0, #low(registers+8)\n\
+       ld r2, @r0+     ; restore r2\n\
+       ld r3, @r0+     ; restore r3\n\
+       ld r4, @r0+     ; restore r4\n\
+       ld r5, @r0+     ; restore r5\n\
+       ld r6, @r0+     ; restore r6\n\
+       ld r7, @r0+     ; restore r7\n\
+       ld r8, @r0+     ; restore r8\n\
+       ld r9, @r0+     ; restore r9\n\
+       ld r10, @r0+    ; restore r10\n\
+       ld r11, @r0+    ; restore r11\n\
+       ld r12, @r0+    ; restore r12\n\
+       ld r13, @r0+    ; restore r13\n\
+       ld r14, @r0+    ; restore r14\n\
+       ld r15, @r0+    ; restore r15\n\
+       ld r1, @r0+     ; restore cr0 == PSW\n\
+       mvtc r1, cr0\n\
+       ld r1, @r0+     ; restore cr1 == CBR (no-op, because it's read only)\n\
+       mvtc r1, cr1\n\
+       ld r1, @r0+     ; restore cr2 == SPI\n\
+       mvtc r1, cr2\n\
+       ld r1, @r0+     ; restore cr3 == SPU\n\
+       mvtc r1, cr3\n\
+       addi r0, #4     ; skip BPC\n\
+       ld r1, @r0+     ; restore cr6 (BPC) == PC\n\
+       mvtc r1, cr6\n\
+       ld r1, @r0+     ; restore ACCL\n\
+       mvtaclo r1\n\
+       ld r1, @r0+     ; restore ACCH\n\
+       mvtachi r1\n\
+       seth r0, #shigh(registers)\n\
+       add3 r0, r0, #low(registers)\n\
+       ld r1, @(4,r0)  ; restore r1\n\
+       ld r0, @r0      ; restore r0\n\
+       rte");
+
+/* General trap handler, called after the registers have been stashed.
+   NUM is the trap/exception number.  */
+
+static void
+process_exception (int num)
+{
+  cleanup_stash ();
+  asm volatile ("\n\
+       seth r1, #shigh(stackPtr)\n\
+       add3 r1, r1, #low(stackPtr)\n\
+       ld r15, @r1             ; setup local stack (protect user stack)\n\
+       mv r0, %0\n\
+       bl handle_exception\n\
+       bl restore_and_return"::"r" (num):"r0", "r1");
+}
+
+void _catchException0 ();
+
+asm ("\n\
+_catchException0:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #0\n\
+       bl process_exception");
+
+void _catchException1 ();
+
+asm ("\n\
+_catchException1:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       bl cleanup_stash\n\
+       seth r1, #shigh(stackPtr)\n\
+       add3 r1, r1, #low(stackPtr)\n\
+       ld r15, @r1             ; setup local stack (protect user stack)\n\
+       seth r1, #shigh(registers + 21*4) ; PC\n\
+       add3 r1, r1, #low(registers + 21*4)\n\
+       ld r0, @r1\n\
+       addi r0, #-4            ; back up PC for breakpoint trap.\n\
+       st r0, @r1              ; FIXME: what about bp in right slot?\n\
+       ldi r0, #1\n\
+       bl handle_exception\n\
+       bl restore_and_return");
+
+void _catchException2 ();
+
+asm ("\n\
+_catchException2:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #2\n\
+       bl process_exception");
+
+void _catchException3 ();
+
+asm ("\n\
+_catchException3:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #3\n\
+       bl process_exception");
+
+void _catchException4 ();
+
+asm ("\n\
+_catchException4:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #4\n\
+       bl process_exception");
+
+void _catchException5 ();
+
+asm ("\n\
+_catchException5:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #5\n\
+       bl process_exception");
+
+void _catchException6 ();
+
+asm ("\n\
+_catchException6:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #6\n\
+       bl process_exception");
+
+void _catchException7 ();
+
+asm ("\n\
+_catchException7:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #7\n\
+       bl process_exception");
+
+void _catchException8 ();
+
+asm ("\n\
+_catchException8:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #8\n\
+       bl process_exception");
+
+void _catchException9 ();
+
+asm ("\n\
+_catchException9:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #9\n\
+       bl process_exception");
+
+void _catchException10 ();
+
+asm ("\n\
+_catchException10:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #10\n\
+       bl process_exception");
+
+void _catchException11 ();
+
+asm ("\n\
+_catchException11:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #11\n\
+       bl process_exception");
+
+void _catchException12 ();
+
+asm ("\n\
+_catchException12:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #12\n\
+       bl process_exception");
+
+void _catchException13 ();
+
+asm ("\n\
+_catchException13:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #13\n\
+       bl process_exception");
+
+void _catchException14 ();
+
+asm ("\n\
+_catchException14:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #14\n\
+       bl process_exception");
+
+void _catchException15 ();
+
+asm ("\n\
+_catchException15:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #15\n\
+       bl process_exception");
+
+void _catchException16 ();
+
+asm ("\n\
+_catchException16:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #16\n\
+       bl process_exception");
+
+void _catchException17 ();
+
+asm ("\n\
+_catchException17:\n\
+       push lr\n\
+       bl stash_registers\n\
+       ; Note that at this point the pushed value of `lr' has been popped\n\
+       ldi r0, #17\n\
+       bl process_exception");
+
+
+/* this function is used to set up exception handlers for tracing and
+   breakpoints */
+void
+set_debug_traps (void)
+{
+  /*  extern void remcomHandler(); */
+  int i;
+
+  for (i = 0; i < 18; i++)     /* keep a copy of old vectors */
+    if (save_vectors[i] == 0)  /* only copy them the first time */
+      save_vectors[i] = getExceptionHandler (i);
+
+  stackPtr = &remcomStack[STACKSIZE / sizeof (int) - 1];
+
+  exceptionHandler (0, _catchException0);
+  exceptionHandler (1, _catchException1);
+  exceptionHandler (2, _catchException2);
+  exceptionHandler (3, _catchException3);
+  exceptionHandler (4, _catchException4);
+  exceptionHandler (5, _catchException5);
+  exceptionHandler (6, _catchException6);
+  exceptionHandler (7, _catchException7);
+  exceptionHandler (8, _catchException8);
+  exceptionHandler (9, _catchException9);
+  exceptionHandler (10, _catchException10);
+  exceptionHandler (11, _catchException11);
+  exceptionHandler (12, _catchException12);
+  exceptionHandler (13, _catchException13);
+  exceptionHandler (14, _catchException14);
+  exceptionHandler (15, _catchException15);
+  exceptionHandler (16, _catchException16);
+  /*  exceptionHandler (17, _catchException17); */
+
+  initialized = 1;
+}
+
+/* This function will generate a breakpoint exception.  It is used at the
+   beginning of a program to sync up with a debugger and can be used
+   otherwise as a quick means to stop program execution and "break" into
+   the debugger. */
+
+#define BREAKPOINT() asm volatile ("   trap #2");
+
+void
+breakpoint (void)
+{
+  if (initialized)
+    BREAKPOINT ();
+}
+
+/* STDOUT section:
+   Stuff pertaining to simulating stdout by sending chars to gdb to be echoed.
+   Functions: gdb_putchar(char ch)
+              gdb_puts(char *str)
+              gdb_write(char *str, int len)
+              gdb_error(char *format, char *parm)
+             */
+
+/* Function: gdb_putchar(int)
+   Make gdb write a char to stdout.
+   Returns: the char */
+
+static int
+gdb_putchar (int ch)
+{
+  char buf[4];
+
+  buf[0] = 'O';
+  buf[1] = hexchars[ch >> 4];
+  buf[2] = hexchars[ch & 0x0F];
+  buf[3] = 0;
+  putpacket (buf);
+  return ch;
+}
+
+/* Function: gdb_write(char *, int)
+   Make gdb write n bytes to stdout (not assumed to be null-terminated).
+   Returns: number of bytes written */
+
+static int
+gdb_write (char *data, int len)
+{
+  char *buf, *cpy;
+  int i;
+
+  buf = remcomOutBuffer;
+  buf[0] = 'O';
+  i = 0;
+  while (i < len)
+    {
+      for (cpy = buf + 1;
+          i < len && cpy < buf + sizeof (remcomOutBuffer) - 3; i++)
+       {
+         *cpy++ = hexchars[data[i] >> 4];
+         *cpy++ = hexchars[data[i] & 0x0F];
+       }
+      *cpy = 0;
+      putpacket (buf);
+    }
+  return len;
+}
+
+/* Function: gdb_puts(char *)
+   Make gdb write a null-terminated string to stdout.
+   Returns: the length of the string */
+
+static int
+gdb_puts (char *str)
+{
+  return gdb_write (str, strlen (str));
+}
+
+/* Function: gdb_error(char *, char *)
+   Send an error message to gdb's stdout.
+   First string may have 1 (one) optional "%s" in it, which
+   will cause the optional second string to be inserted.  */
+
+static void
+gdb_error (char *format, char *parm)
+{
+  char buf[400], *cpy;
+  int len;
+
+  if (remote_debug)
+    {
+      if (format && *format)
+       len = strlen (format);
+      else
+       return;                 /* empty input */
+
+      if (parm && *parm)
+       len += strlen (parm);
+
+      for (cpy = buf; *format;)
+       {
+         if (format[0] == '%' && format[1] == 's')     /* include second string */
+           {
+             format += 2;      /* advance two chars instead of just one */
+             while (parm && *parm)
+               *cpy++ = *parm++;
+           }
+         else
+           *cpy++ = *format++;
+       }
+      *cpy = '\0';
+      gdb_puts (buf);
+    }
+}
+
+static unsigned char *
+strcpy (unsigned char *dest, const unsigned char *src)
+{
+  unsigned char *ret = dest;
+
+  if (dest && src)
+    {
+      while (*src)
+       *dest++ = *src++;
+      *dest = 0;
+    }
+  return ret;
+}
+
+static int
+strlen (const unsigned char *src)
+{
+  int ret;
+
+  for (ret = 0; *src; src++)
+    ret++;
+
+  return ret;
+}
+
+#if 0
+void
+exit (code)
+     int code;
+{
+  _exit (code);
+}
+
+int
+atexit (void *p)
+{
+  return 0;
+}
+
+void
+abort (void)
+{
+  _exit (1);
+}
+#endif
index 93edbf99a2da6dca99db33f77d5e60366473d7aa..dc51699ff8ea61ba212695b4c2c20fd957fbe826 100644 (file)
-// OBSOLETE /* Target-dependent code for the Mitsubishi m32r for GDB, the GNU debugger.
-// OBSOLETE 
-// OBSOLETE    Copyright 1996, 1998, 1999, 2000, 2001, 2003 Free Software
-// OBSOLETE    Foundation, Inc.
-// OBSOLETE 
-// OBSOLETE    This file is part of GDB.
-// OBSOLETE 
-// OBSOLETE    This program is free software; you can redistribute it and/or modify
-// OBSOLETE    it under the terms of the GNU General Public License as published by
-// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
-// OBSOLETE    (at your option) any later version.
-// OBSOLETE 
-// OBSOLETE    This program is distributed in the hope that it will be useful,
-// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
-// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// OBSOLETE    GNU General Public License for more details.
-// OBSOLETE 
-// OBSOLETE    You should have received a copy of the GNU General Public License
-// OBSOLETE    along with this program; if not, write to the Free Software
-// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
-// OBSOLETE    Boston, MA 02111-1307, USA.  */
-// OBSOLETE 
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "frame.h"
-// OBSOLETE #include "inferior.h"
-// OBSOLETE #include "target.h"
-// OBSOLETE #include "value.h"
-// OBSOLETE #include "bfd.h"
-// OBSOLETE #include "gdb_string.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include "symfile.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE 
-// OBSOLETE /* Function: m32r_use_struct_convention
-// OBSOLETE    Return nonzero if call_function should allocate stack space for a
-// OBSOLETE    struct return? */
-// OBSOLETE int
-// OBSOLETE m32r_use_struct_convention (int gcc_p, struct type *type)
-// OBSOLETE {
-// OBSOLETE   return (TYPE_LENGTH (type) > 8);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: frame_find_saved_regs
-// OBSOLETE    Return the frame_saved_regs structure for the frame.
-// OBSOLETE    Doesn't really work for dummy frames, but it does pass back
-// OBSOLETE    an empty frame_saved_regs, so I guess that's better than total failure */
-// OBSOLETE 
-// OBSOLETE void
-// OBSOLETE m32r_frame_find_saved_regs (struct frame_info *fi,
-// OBSOLETE                        struct frame_saved_regs *regaddr)
-// OBSOLETE {
-// OBSOLETE   memcpy (regaddr, &fi->fsr, sizeof (struct frame_saved_regs));
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Turn this on if you want to see just how much instruction decoding
-// OBSOLETE    if being done, its quite a lot
-// OBSOLETE  */
-// OBSOLETE #if 0
-// OBSOLETE static void
-// OBSOLETE dump_insn (char *commnt, CORE_ADDR pc, int insn)
-// OBSOLETE {
-// OBSOLETE   printf_filtered ("  %s %08x %08x ",
-// OBSOLETE               commnt, (unsigned int) pc, (unsigned int) insn);
-// OBSOLETE   TARGET_PRINT_INSN (pc, &tm_print_insn_info);
-// OBSOLETE   printf_filtered ("\n");
-// OBSOLETE }
-// OBSOLETE #define insn_debug(args) { printf_filtered args; }
-// OBSOLETE #else
-// OBSOLETE #define dump_insn(a,b,c) {}
-// OBSOLETE #define insn_debug(args) {}
-// OBSOLETE #endif
-// OBSOLETE 
-// OBSOLETE #define DEFAULT_SEARCH_LIMIT 44
-// OBSOLETE 
-// OBSOLETE /* Function: scan_prologue
-// OBSOLETE    This function decodes the target function prologue to determine
-// OBSOLETE    1) the size of the stack frame, and 2) which registers are saved on it.
-// OBSOLETE    It saves the offsets of saved regs in the frame_saved_regs argument,
-// OBSOLETE    and returns the frame size.  */
-// OBSOLETE 
-// OBSOLETE /*
-// OBSOLETE    The sequence it currently generates is:
-// OBSOLETE 
-// OBSOLETE    if (varargs function) { ddi sp,#n }
-// OBSOLETE    push registers
-// OBSOLETE    if (additional stack <= 256) {       addi sp,#-stack }
-// OBSOLETE    else if (additional stack < 65k) { add3 sp,sp,#-stack
-// OBSOLETE 
-// OBSOLETE    } else if (additional stack) {
-// OBSOLETE    seth sp,#(stack & 0xffff0000)
-// OBSOLETE    or3 sp,sp,#(stack & 0x0000ffff)
-// OBSOLETE    sub sp,r4
-// OBSOLETE    }
-// OBSOLETE    if (frame pointer) {
-// OBSOLETE    mv sp,fp
-// OBSOLETE    }
-// OBSOLETE 
-// OBSOLETE    These instructions are scheduled like everything else, so you should stop at
-// OBSOLETE    the first branch instruction.
-// OBSOLETE 
-// OBSOLETE  */
-// OBSOLETE 
-// OBSOLETE /* This is required by skip prologue and by m32r_init_extra_frame_info. 
-// OBSOLETE    The results of decoding a prologue should be cached because this
-// OBSOLETE    thrashing is getting nuts.
-// OBSOLETE    I am thinking of making a container class with two indexes, name and
-// OBSOLETE    address. It may be better to extend the symbol table.
-// OBSOLETE  */
-// OBSOLETE 
-// OBSOLETE static void
-// OBSOLETE decode_prologue (CORE_ADDR start_pc, CORE_ADDR scan_limit, CORE_ADDR *pl_endptr,   /* var parameter */
-// OBSOLETE             unsigned long *framelength, struct frame_info *fi,
-// OBSOLETE             struct frame_saved_regs *fsr)
-// OBSOLETE {
-// OBSOLETE   unsigned long framesize;
-// OBSOLETE   int insn;
-// OBSOLETE   int op1;
-// OBSOLETE   int maybe_one_more = 0;
-// OBSOLETE   CORE_ADDR after_prologue = 0;
-// OBSOLETE   CORE_ADDR after_stack_adjust = 0;
-// OBSOLETE   CORE_ADDR current_pc;
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE   framesize = 0;
-// OBSOLETE   after_prologue = 0;
-// OBSOLETE   insn_debug (("rd prolog l(%d)\n", scan_limit - current_pc));
-// OBSOLETE 
-// OBSOLETE   for (current_pc = start_pc; current_pc < scan_limit; current_pc += 2)
-// OBSOLETE     {
-// OBSOLETE 
-// OBSOLETE       insn = read_memory_unsigned_integer (current_pc, 2);
-// OBSOLETE       dump_insn ("insn-1", current_pc, insn);      /* MTZ */
-// OBSOLETE 
-// OBSOLETE       /* If this is a 32 bit instruction, we dont want to examine its
-// OBSOLETE          immediate data as though it were an instruction */
-// OBSOLETE       if (current_pc & 0x02)
-// OBSOLETE    {                       /* Clear the parallel execution bit from 16 bit instruction */
-// OBSOLETE      if (maybe_one_more)
-// OBSOLETE        {                   /* The last instruction was a branch, usually terminates
-// OBSOLETE                               the series, but if this is a parallel instruction,
-// OBSOLETE                               it may be a stack framing instruction */
-// OBSOLETE          if (!(insn & 0x8000))
-// OBSOLETE            {
-// OBSOLETE              insn_debug (("Really done"));
-// OBSOLETE              break;        /* nope, we are really done */
-// OBSOLETE            }
-// OBSOLETE        }
-// OBSOLETE      insn &= 0x7fff;       /* decode this instruction further */
-// OBSOLETE    }
-// OBSOLETE       else
-// OBSOLETE    {
-// OBSOLETE      if (maybe_one_more)
-// OBSOLETE        break;              /* This isnt the one more */
-// OBSOLETE      if (insn & 0x8000)
-// OBSOLETE        {
-// OBSOLETE          insn_debug (("32 bit insn\n"));
-// OBSOLETE          if (current_pc == scan_limit)
-// OBSOLETE            scan_limit += 2;        /* extend the search */
-// OBSOLETE          current_pc += 2;  /* skip the immediate data */
-// OBSOLETE          if (insn == 0x8faf)       /* add3 sp, sp, xxxx */
-// OBSOLETE            /* add 16 bit sign-extended offset */
-// OBSOLETE            {
-// OBSOLETE              insn_debug (("stack increment\n"));
-// OBSOLETE              framesize += -((short) read_memory_unsigned_integer (current_pc, 2));
-// OBSOLETE            }
-// OBSOLETE          else
-// OBSOLETE            {
-// OBSOLETE              if (((insn >> 8) == 0xe4) &&  /* ld24 r4, xxxxxx; sub sp, r4 */
-// OBSOLETE              read_memory_unsigned_integer (current_pc + 2, 2) == 0x0f24)
-// OBSOLETE                {           /* subtract 24 bit sign-extended negative-offset */
-// OBSOLETE                  dump_insn ("insn-2", current_pc + 2, insn);
-// OBSOLETE                  insn = read_memory_unsigned_integer (current_pc - 2, 4);
-// OBSOLETE                  dump_insn ("insn-3(l4)", current_pc - 2, insn);
-// OBSOLETE                  if (insn & 0x00800000)    /* sign extend */
-// OBSOLETE                    insn |= 0xff000000;     /* negative */
-// OBSOLETE                  else
-// OBSOLETE                    insn &= 0x00ffffff;     /* positive */
-// OBSOLETE                  framesize += insn;
-// OBSOLETE                }
-// OBSOLETE            }
-// OBSOLETE          after_prologue = current_pc;
-// OBSOLETE          continue;
-// OBSOLETE        }
-// OBSOLETE    }
-// OBSOLETE       op1 = insn & 0xf000; /* isolate just the first nibble */
-// OBSOLETE 
-// OBSOLETE       if ((insn & 0xf0ff) == 0x207f)
-// OBSOLETE    {                       /* st reg, @-sp */
-// OBSOLETE      int regno;
-// OBSOLETE      insn_debug (("push\n"));
-// OBSOLETE #if 0                              /* No, PUSH FP is not an indication that we will use a frame pointer. */
-// OBSOLETE      if (((insn & 0xffff) == 0x2d7f) && fi)
-// OBSOLETE        fi->using_frame_pointer = 1;
-// OBSOLETE #endif
-// OBSOLETE      framesize += 4;
-// OBSOLETE #if 0
-// OBSOLETE /* Why should we increase the scan limit, just because we did a push? 
-// OBSOLETE    And if there is a reason, surely we would only want to do it if we
-// OBSOLETE    had already reached the scan limit... */
-// OBSOLETE      if (current_pc == scan_limit)
-// OBSOLETE        scan_limit += 2;
-// OBSOLETE #endif
-// OBSOLETE      regno = ((insn >> 8) & 0xf);
-// OBSOLETE      if (fsr)              /* save_regs offset */
-// OBSOLETE        fsr->regs[regno] = framesize;
-// OBSOLETE      after_prologue = 0;
-// OBSOLETE      continue;
-// OBSOLETE    }
-// OBSOLETE       if ((insn >> 8) == 0x4f)     /* addi sp, xx */
-// OBSOLETE    /* add 8 bit sign-extended offset */
-// OBSOLETE    {
-// OBSOLETE      int stack_adjust = (char) (insn & 0xff);
-// OBSOLETE 
-// OBSOLETE      /* there are probably two of these stack adjustments:
-// OBSOLETE         1) A negative one in the prologue, and
-// OBSOLETE         2) A positive one in the epilogue.
-// OBSOLETE         We are only interested in the first one.  */
-// OBSOLETE 
-// OBSOLETE      if (stack_adjust < 0)
-// OBSOLETE        {
-// OBSOLETE          framesize -= stack_adjust;
-// OBSOLETE          after_prologue = 0;
-// OBSOLETE          /* A frameless function may have no "mv fp, sp".
-// OBSOLETE             In that case, this is the end of the prologue.  */
-// OBSOLETE          after_stack_adjust = current_pc + 2;
-// OBSOLETE        }
-// OBSOLETE      continue;
-// OBSOLETE    }
-// OBSOLETE       if (insn == 0x1d8f)
-// OBSOLETE    {                       /* mv fp, sp */
-// OBSOLETE      if (fi)
-// OBSOLETE        fi->using_frame_pointer = 1;        /* fp is now valid */
-// OBSOLETE      insn_debug (("done fp found\n"));
-// OBSOLETE      after_prologue = current_pc + 2;
-// OBSOLETE      break;                /* end of stack adjustments */
-// OBSOLETE    }
-// OBSOLETE       if (insn == 0x7000)  /* Nop looks like a branch, continue explicitly */
-// OBSOLETE    {
-// OBSOLETE      insn_debug (("nop\n"));
-// OBSOLETE      after_prologue = current_pc + 2;
-// OBSOLETE      continue;             /* nop occurs between pushes */
-// OBSOLETE    }
-// OBSOLETE       /* End of prolog if any of these are branch instructions */
-// OBSOLETE       if ((op1 == 0x7000)
-// OBSOLETE      || (op1 == 0xb000)
-// OBSOLETE      || (op1 == 0xf000))
-// OBSOLETE    {
-// OBSOLETE      after_prologue = current_pc;
-// OBSOLETE      insn_debug (("Done: branch\n"));
-// OBSOLETE      maybe_one_more = 1;
-// OBSOLETE      continue;
-// OBSOLETE    }
-// OBSOLETE       /* Some of the branch instructions are mixed with other types */
-// OBSOLETE       if (op1 == 0x1000)
-// OBSOLETE    {
-// OBSOLETE      int subop = insn & 0x0ff0;
-// OBSOLETE      if ((subop == 0x0ec0) || (subop == 0x0fc0))
-// OBSOLETE        {
-// OBSOLETE          insn_debug (("done: jmp\n"));
-// OBSOLETE          after_prologue = current_pc;
-// OBSOLETE          maybe_one_more = 1;
-// OBSOLETE          continue;         /* jmp , jl */
-// OBSOLETE        }
-// OBSOLETE    }
-// OBSOLETE     }
-// OBSOLETE 
-// OBSOLETE   if (current_pc >= scan_limit)
-// OBSOLETE     {
-// OBSOLETE       if (pl_endptr)
-// OBSOLETE    {
-// OBSOLETE #if 1
-// OBSOLETE      if (after_stack_adjust != 0)
-// OBSOLETE        /* We did not find a "mv fp,sp", but we DID find
-// OBSOLETE           a stack_adjust.  Is it safe to use that as the
-// OBSOLETE           end of the prologue?  I just don't know. */
-// OBSOLETE        {
-// OBSOLETE          *pl_endptr = after_stack_adjust;
-// OBSOLETE          if (framelength)
-// OBSOLETE            *framelength = framesize;
-// OBSOLETE        }
-// OBSOLETE      else
-// OBSOLETE #endif
-// OBSOLETE        /* We reached the end of the loop without finding the end
-// OBSOLETE           of the prologue.  No way to win -- we should report failure.  
-// OBSOLETE           The way we do that is to return the original start_pc.
-// OBSOLETE           GDB will set a breakpoint at the start of the function (etc.) */
-// OBSOLETE        *pl_endptr = start_pc;
-// OBSOLETE    }
-// OBSOLETE       return;
-// OBSOLETE     }
-// OBSOLETE   if (after_prologue == 0)
-// OBSOLETE     after_prologue = current_pc;
-// OBSOLETE 
-// OBSOLETE   insn_debug ((" framesize %d, firstline %08x\n", framesize, after_prologue));
-// OBSOLETE   if (framelength)
-// OBSOLETE     *framelength = framesize;
-// OBSOLETE   if (pl_endptr)
-// OBSOLETE     *pl_endptr = after_prologue;
-// OBSOLETE }                          /*  decode_prologue */
-// OBSOLETE 
-// OBSOLETE /* Function: skip_prologue
-// OBSOLETE    Find end of function prologue */
-// OBSOLETE 
-// OBSOLETE CORE_ADDR
-// OBSOLETE m32r_skip_prologue (CORE_ADDR pc)
-// OBSOLETE {
-// OBSOLETE   CORE_ADDR func_addr, func_end;
-// OBSOLETE   struct symtab_and_line sal;
-// OBSOLETE 
-// OBSOLETE   /* See what the symbol table says */
-// OBSOLETE 
-// OBSOLETE   if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
-// OBSOLETE     {
-// OBSOLETE       sal = find_pc_line (func_addr, 0);
-// OBSOLETE 
-// OBSOLETE       if (sal.line != 0 && sal.end <= func_end)
-// OBSOLETE    {
-// OBSOLETE 
-// OBSOLETE      insn_debug (("BP after prologue %08x\n", sal.end));
-// OBSOLETE      func_end = sal.end;
-// OBSOLETE    }
-// OBSOLETE       else
-// OBSOLETE    /* Either there's no line info, or the line after the prologue is after
-// OBSOLETE       the end of the function.  In this case, there probably isn't a
-// OBSOLETE       prologue.  */
-// OBSOLETE    {
-// OBSOLETE      insn_debug (("No line info, line(%x) sal_end(%x) funcend(%x)\n",
-// OBSOLETE                   sal.line, sal.end, func_end));
-// OBSOLETE      func_end = min (func_end, func_addr + DEFAULT_SEARCH_LIMIT);
-// OBSOLETE    }
-// OBSOLETE     }
-// OBSOLETE   else
-// OBSOLETE     func_end = pc + DEFAULT_SEARCH_LIMIT;
-// OBSOLETE   decode_prologue (pc, func_end, &sal.end, 0, 0, 0);
-// OBSOLETE   return sal.end;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE static unsigned long
-// OBSOLETE m32r_scan_prologue (struct frame_info *fi, struct frame_saved_regs *fsr)
-// OBSOLETE {
-// OBSOLETE   struct symtab_and_line sal;
-// OBSOLETE   CORE_ADDR prologue_start, prologue_end, current_pc;
-// OBSOLETE   unsigned long framesize = 0;
-// OBSOLETE 
-// OBSOLETE   /* this code essentially duplicates skip_prologue, 
-// OBSOLETE      but we need the start address below.  */
-// OBSOLETE 
-// OBSOLETE   if (find_pc_partial_function (fi->pc, NULL, &prologue_start, &prologue_end))
-// OBSOLETE     {
-// OBSOLETE       sal = find_pc_line (prologue_start, 0);
-// OBSOLETE 
-// OBSOLETE       if (sal.line == 0)   /* no line info, use current PC */
-// OBSOLETE    if (prologue_start == entry_point_address ())
-// OBSOLETE      return 0;
-// OBSOLETE     }
-// OBSOLETE   else
-// OBSOLETE     {
-// OBSOLETE       prologue_start = fi->pc;
-// OBSOLETE       prologue_end = prologue_start + 48;  /* We're in the boondocks: 
-// OBSOLETE                                               allow for 16 pushes, an add, 
-// OBSOLETE                                               and "mv fp,sp" */
-// OBSOLETE     }
-// OBSOLETE #if 0
-// OBSOLETE   prologue_end = min (prologue_end, fi->pc);
-// OBSOLETE #endif
-// OBSOLETE   insn_debug (("fipc(%08x) start(%08x) end(%08x)\n",
-// OBSOLETE           fi->pc, prologue_start, prologue_end));
-// OBSOLETE   prologue_end = min (prologue_end, prologue_start + DEFAULT_SEARCH_LIMIT);
-// OBSOLETE   decode_prologue (prologue_start, prologue_end, &prologue_end, &framesize,
-// OBSOLETE               fi, fsr);
-// OBSOLETE   return framesize;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: init_extra_frame_info
-// OBSOLETE    This function actually figures out the frame address for a given pc and
-// OBSOLETE    sp.  This is tricky on the m32r because we sometimes don't use an explicit
-// OBSOLETE    frame pointer, and the previous stack pointer isn't necessarily recorded
-// OBSOLETE    on the stack.  The only reliable way to get this info is to
-// OBSOLETE    examine the prologue.  */
-// OBSOLETE 
-// OBSOLETE void
-// OBSOLETE m32r_init_extra_frame_info (struct frame_info *fi)
-// OBSOLETE {
-// OBSOLETE   int reg;
-// OBSOLETE 
-// OBSOLETE   if (fi->next)
-// OBSOLETE     fi->pc = FRAME_SAVED_PC (fi->next);
-// OBSOLETE 
-// OBSOLETE   memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
-// OBSOLETE 
-// OBSOLETE   if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
-// OBSOLETE     {
-// OBSOLETE       /* We need to setup fi->frame here because run_stack_dummy gets it wrong
-// OBSOLETE          by assuming it's always FP.  */
-// OBSOLETE       fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
-// OBSOLETE                                              SP_REGNUM);
-// OBSOLETE       fi->framesize = 0;
-// OBSOLETE       return;
-// OBSOLETE     }
-// OBSOLETE   else
-// OBSOLETE     {
-// OBSOLETE       fi->using_frame_pointer = 0;
-// OBSOLETE       fi->framesize = m32r_scan_prologue (fi, &fi->fsr);
-// OBSOLETE 
-// OBSOLETE       if (!fi->next)
-// OBSOLETE    if (fi->using_frame_pointer)
-// OBSOLETE      {
-// OBSOLETE        fi->frame = read_register (FP_REGNUM);
-// OBSOLETE      }
-// OBSOLETE    else
-// OBSOLETE      fi->frame = read_register (SP_REGNUM);
-// OBSOLETE       else
-// OBSOLETE    /* fi->next means this is not the innermost frame */ if (fi->using_frame_pointer)
-// OBSOLETE    /* we have an FP */
-// OBSOLETE    if (fi->next->fsr.regs[FP_REGNUM] != 0)         /* caller saved our FP */
-// OBSOLETE      fi->frame = read_memory_integer (fi->next->fsr.regs[FP_REGNUM], 4);
-// OBSOLETE       for (reg = 0; reg < NUM_REGS; reg++)
-// OBSOLETE    if (fi->fsr.regs[reg] != 0)
-// OBSOLETE      fi->fsr.regs[reg] = fi->frame + fi->framesize - fi->fsr.regs[reg];
-// OBSOLETE     }
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: m32r_virtual_frame_pointer
-// OBSOLETE    Return the register that the function uses for a frame pointer, 
-// OBSOLETE    plus any necessary offset to be applied to the register before
-// OBSOLETE    any frame pointer offsets.  */
-// OBSOLETE 
-// OBSOLETE void
-// OBSOLETE m32r_virtual_frame_pointer (CORE_ADDR pc, long *reg, long *offset)
-// OBSOLETE {
-// OBSOLETE   struct frame_info *fi = deprecated_frame_xmalloc ();
-// OBSOLETE   struct cleanup *old_chain = make_cleanup (xfree, fi);
-// OBSOLETE 
-// OBSOLETE   /* Set up a dummy frame_info. */
-// OBSOLETE   fi->next = NULL;
-// OBSOLETE   fi->prev = NULL;
-// OBSOLETE   fi->frame = 0;
-// OBSOLETE   fi->pc = pc;
-// OBSOLETE 
-// OBSOLETE   /* Analyze the prolog and fill in the extra info.  */
-// OBSOLETE   m32r_init_extra_frame_info (fi);
-// OBSOLETE 
-// OBSOLETE   /* Results will tell us which type of frame it uses.  */
-// OBSOLETE   if (fi->using_frame_pointer)
-// OBSOLETE     {
-// OBSOLETE       *reg = FP_REGNUM;
-// OBSOLETE       *offset = 0;
-// OBSOLETE     }
-// OBSOLETE   else
-// OBSOLETE     {
-// OBSOLETE       *reg = SP_REGNUM;
-// OBSOLETE       *offset = 0;
-// OBSOLETE     }
-// OBSOLETE   do_cleanups (old_chain);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: find_callers_reg
-// OBSOLETE    Find REGNUM on the stack.  Otherwise, it's in an active register.  One thing
-// OBSOLETE    we might want to do here is to check REGNUM against the clobber mask, and
-// OBSOLETE    somehow flag it as invalid if it isn't saved on the stack somewhere.  This
-// OBSOLETE    would provide a graceful failure mode when trying to get the value of
-// OBSOLETE    caller-saves registers for an inner frame.  */
-// OBSOLETE 
-// OBSOLETE CORE_ADDR
-// OBSOLETE m32r_find_callers_reg (struct frame_info *fi, int regnum)
-// OBSOLETE {
-// OBSOLETE   for (; fi; fi = fi->next)
-// OBSOLETE     if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
-// OBSOLETE       return deprecated_read_register_dummy (fi->pc, fi->frame, regnum);
-// OBSOLETE     else if (fi->fsr.regs[regnum] != 0)
-// OBSOLETE       return read_memory_integer (fi->fsr.regs[regnum],
-// OBSOLETE                              REGISTER_RAW_SIZE (regnum));
-// OBSOLETE   return read_register (regnum);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: frame_chain Given a GDB frame, determine the address of
-// OBSOLETE    the calling function's frame.  This will be used to create a new
-// OBSOLETE    GDB frame struct, and then INIT_EXTRA_FRAME_INFO and
-// OBSOLETE    DEPRECATED_INIT_FRAME_PC will be called for the new frame.  For
-// OBSOLETE    m32r, we save the frame size when we initialize the frame_info.  */
-// OBSOLETE 
-// OBSOLETE CORE_ADDR
-// OBSOLETE m32r_frame_chain (struct frame_info *fi)
-// OBSOLETE {
-// OBSOLETE   CORE_ADDR fn_start, callers_pc, fp;
-// OBSOLETE 
-// OBSOLETE   /* is this a dummy frame? */
-// OBSOLETE   if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
-// OBSOLETE     return fi->frame;              /* dummy frame same as caller's frame */
-// OBSOLETE 
-// OBSOLETE   /* is caller-of-this a dummy frame? */
-// OBSOLETE   callers_pc = FRAME_SAVED_PC (fi);        /* find out who called us: */
-// OBSOLETE   fp = m32r_find_callers_reg (fi, FP_REGNUM);
-// OBSOLETE   if (DEPRECATED_PC_IN_CALL_DUMMY (callers_pc, fp, fp))
-// OBSOLETE     return fp;                     /* dummy frame's frame may bear no relation to ours */
-// OBSOLETE 
-// OBSOLETE   if (find_pc_partial_function (fi->pc, 0, &fn_start, 0))
-// OBSOLETE     if (fn_start == entry_point_address ())
-// OBSOLETE       return 0;                    /* in _start fn, don't chain further */
-// OBSOLETE   if (fi->framesize == 0)
-// OBSOLETE     {
-// OBSOLETE       printf_filtered ("cannot determine frame size @ %s , pc(%s)\n",
-// OBSOLETE                   paddr (fi->frame),
-// OBSOLETE                   paddr (fi->pc));
-// OBSOLETE       return 0;
-// OBSOLETE     }
-// OBSOLETE   insn_debug (("m32rx frame %08x\n", fi->frame + fi->framesize));
-// OBSOLETE   return fi->frame + fi->framesize;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: push_return_address (pc)
-// OBSOLETE    Set up the return address for the inferior function call.
-// OBSOLETE    Necessary for targets that don't actually execute a JSR/BSR instruction 
-// OBSOLETE    (ie. when using an empty CALL_DUMMY) */
-// OBSOLETE 
-// OBSOLETE CORE_ADDR
-// OBSOLETE m32r_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-// OBSOLETE {
-// OBSOLETE   write_register (RP_REGNUM, CALL_DUMMY_ADDRESS ());
-// OBSOLETE   return sp;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE /* Function: pop_frame
-// OBSOLETE    Discard from the stack the innermost frame,
-// OBSOLETE    restoring all saved registers.  */
-// OBSOLETE 
-// OBSOLETE struct frame_info *
-// OBSOLETE m32r_pop_frame (struct frame_info *frame)
-// OBSOLETE {
-// OBSOLETE   int regnum;
-// OBSOLETE 
-// OBSOLETE   if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
-// OBSOLETE     generic_pop_dummy_frame ();
-// OBSOLETE   else
-// OBSOLETE     {
-// OBSOLETE       for (regnum = 0; regnum < NUM_REGS; regnum++)
-// OBSOLETE    if (frame->fsr.regs[regnum] != 0)
-// OBSOLETE      write_register (regnum,
-// OBSOLETE                      read_memory_integer (frame->fsr.regs[regnum], 4));
-// OBSOLETE 
-// OBSOLETE       write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
-// OBSOLETE       write_register (SP_REGNUM, read_register (FP_REGNUM));
-// OBSOLETE       if (read_register (PSW_REGNUM) & 0x80)
-// OBSOLETE    write_register (SPU_REGNUM, read_register (SP_REGNUM));
-// OBSOLETE       else
-// OBSOLETE    write_register (SPI_REGNUM, read_register (SP_REGNUM));
-// OBSOLETE     }
-// OBSOLETE   flush_cached_frames ();
-// OBSOLETE   return NULL;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: frame_saved_pc
-// OBSOLETE    Find the caller of this frame.  We do this by seeing if RP_REGNUM is saved
-// OBSOLETE    in the stack anywhere, otherwise we get it from the registers. */
-// OBSOLETE 
-// OBSOLETE CORE_ADDR
-// OBSOLETE m32r_frame_saved_pc (struct frame_info *fi)
-// OBSOLETE {
-// OBSOLETE   if (DEPRECATED_PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame))
-// OBSOLETE     return deprecated_read_register_dummy (fi->pc, fi->frame, PC_REGNUM);
-// OBSOLETE   else
-// OBSOLETE     return m32r_find_callers_reg (fi, RP_REGNUM);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: push_arguments
-// OBSOLETE    Setup the function arguments for calling a function in the inferior.
-// OBSOLETE 
-// OBSOLETE    On the Mitsubishi M32R architecture, there are four registers (R0 to R3)
-// OBSOLETE    which are dedicated for passing function arguments.  Up to the first 
-// OBSOLETE    four arguments (depending on size) may go into these registers.
-// OBSOLETE    The rest go on the stack.
-// OBSOLETE 
-// OBSOLETE    Arguments that are smaller than 4 bytes will still take up a whole
-// OBSOLETE    register or a whole 32-bit word on the stack, and will be
-// OBSOLETE    right-justified in the register or the stack word.  This includes
-// OBSOLETE    chars, shorts, and small aggregate types.
-// OBSOLETE 
-// OBSOLETE    Arguments of 8 bytes size are split between two registers, if 
-// OBSOLETE    available.  If only one register is available, the argument will 
-// OBSOLETE    be split between the register and the stack.  Otherwise it is
-// OBSOLETE    passed entirely on the stack.  Aggregate types with sizes between
-// OBSOLETE    4 and 8 bytes are passed entirely on the stack, and are left-justified
-// OBSOLETE    within the double-word (as opposed to aggregates smaller than 4 bytes
-// OBSOLETE    which are right-justified).
-// OBSOLETE 
-// OBSOLETE    Aggregates of greater than 8 bytes are first copied onto the stack, 
-// OBSOLETE    and then a pointer to the copy is passed in the place of the normal
-// OBSOLETE    argument (either in a register if available, or on the stack).
-// OBSOLETE 
-// OBSOLETE    Functions that must return an aggregate type can return it in the 
-// OBSOLETE    normal return value registers (R0 and R1) if its size is 8 bytes or
-// OBSOLETE    less.  For larger return values, the caller must allocate space for 
-// OBSOLETE    the callee to copy the return value to.  A pointer to this space is
-// OBSOLETE    passed as an implicit first argument, always in R0. */
-// OBSOLETE 
-// OBSOLETE CORE_ADDR
-// OBSOLETE m32r_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
-// OBSOLETE                 unsigned char struct_return, CORE_ADDR struct_addr)
-// OBSOLETE {
-// OBSOLETE   int stack_offset, stack_alloc;
-// OBSOLETE   int argreg;
-// OBSOLETE   int argnum;
-// OBSOLETE   struct type *type;
-// OBSOLETE   CORE_ADDR regval;
-// OBSOLETE   char *val;
-// OBSOLETE   char valbuf[4];
-// OBSOLETE   int len;
-// OBSOLETE   int odd_sized_struct;
-// OBSOLETE 
-// OBSOLETE   /* first force sp to a 4-byte alignment */
-// OBSOLETE   sp = sp & ~3;
-// OBSOLETE 
-// OBSOLETE   argreg = ARG0_REGNUM;
-// OBSOLETE   /* The "struct return pointer" pseudo-argument goes in R0 */
-// OBSOLETE   if (struct_return)
-// OBSOLETE     write_register (argreg++, struct_addr);
-// OBSOLETE 
-// OBSOLETE   /* Now make sure there's space on the stack */
-// OBSOLETE   for (argnum = 0, stack_alloc = 0;
-// OBSOLETE        argnum < nargs; argnum++)
-// OBSOLETE     stack_alloc += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 3) & ~3);
-// OBSOLETE   sp -= stack_alloc;               /* make room on stack for args */
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE   /* Now load as many as possible of the first arguments into
-// OBSOLETE      registers, and push the rest onto the stack.  There are 16 bytes
-// OBSOLETE      in four registers available.  Loop thru args from first to last.  */
-// OBSOLETE 
-// OBSOLETE   argreg = ARG0_REGNUM;
-// OBSOLETE   for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
-// OBSOLETE     {
-// OBSOLETE       type = VALUE_TYPE (args[argnum]);
-// OBSOLETE       len = TYPE_LENGTH (type);
-// OBSOLETE       memset (valbuf, 0, sizeof (valbuf));
-// OBSOLETE       if (len < 4)
-// OBSOLETE    {                       /* value gets right-justified in the register or stack word */
-// OBSOLETE      memcpy (valbuf + (4 - len),
-// OBSOLETE              (char *) VALUE_CONTENTS (args[argnum]), len);
-// OBSOLETE      val = valbuf;
-// OBSOLETE    }
-// OBSOLETE       else
-// OBSOLETE    val = (char *) VALUE_CONTENTS (args[argnum]);
-// OBSOLETE 
-// OBSOLETE       if (len > 4 && (len & 3) != 0)
-// OBSOLETE    odd_sized_struct = 1;   /* such structs go entirely on stack */
-// OBSOLETE       else
-// OBSOLETE    odd_sized_struct = 0;
-// OBSOLETE       while (len > 0)
-// OBSOLETE    {
-// OBSOLETE      if (argreg > ARGLAST_REGNUM || odd_sized_struct)
-// OBSOLETE        {                   /* must go on the stack */
-// OBSOLETE          write_memory (sp + stack_offset, val, 4);
-// OBSOLETE          stack_offset += 4;
-// OBSOLETE        }
-// OBSOLETE      /* NOTE WELL!!!!!  This is not an "else if" clause!!!
-// OBSOLETE         That's because some *&^%$ things get passed on the stack
-// OBSOLETE         AND in the registers!   */
-// OBSOLETE      if (argreg <= ARGLAST_REGNUM)
-// OBSOLETE        {                   /* there's room in a register */
-// OBSOLETE          regval = extract_address (val, REGISTER_RAW_SIZE (argreg));
-// OBSOLETE          write_register (argreg++, regval);
-// OBSOLETE        }
-// OBSOLETE      /* Store the value 4 bytes at a time.  This means that things
-// OBSOLETE         larger than 4 bytes may go partly in registers and partly
-// OBSOLETE         on the stack.  */
-// OBSOLETE      len -= REGISTER_RAW_SIZE (argreg);
-// OBSOLETE      val += REGISTER_RAW_SIZE (argreg);
-// OBSOLETE    }
-// OBSOLETE     }
-// OBSOLETE   return sp;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE /* Function: fix_call_dummy 
-// OBSOLETE    If there is real CALL_DUMMY code (eg. on the stack), this function
-// OBSOLETE    has the responsability to insert the address of the actual code that
-// OBSOLETE    is the target of the target function call.  */
-// OBSOLETE 
-// OBSOLETE void
-// OBSOLETE m32r_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
-// OBSOLETE                 struct value **args, struct type *type, int gcc_p)
-// OBSOLETE {
-// OBSOLETE   /* ld24 r8, <(imm24) fun> */
-// OBSOLETE   *(unsigned long *) (dummy) = (fun & 0x00ffffff) | 0xe8000000;
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE 
-// OBSOLETE /* Function: m32r_write_sp
-// OBSOLETE    Because SP is really a read-only register that mirrors either SPU or SPI,
-// OBSOLETE    we must actually write one of those two as well, depending on PSW. */
-// OBSOLETE 
-// OBSOLETE void
-// OBSOLETE m32r_write_sp (CORE_ADDR val)
-// OBSOLETE {
-// OBSOLETE   unsigned long psw = read_register (PSW_REGNUM);
-// OBSOLETE 
-// OBSOLETE   if (psw & 0x80)          /* stack mode: user or interrupt */
-// OBSOLETE     write_register (SPU_REGNUM, val);
-// OBSOLETE   else
-// OBSOLETE     write_register (SPI_REGNUM, val);
-// OBSOLETE   write_register (SP_REGNUM, val);
-// OBSOLETE }
-// OBSOLETE 
-// OBSOLETE void
-// OBSOLETE _initialize_m32r_tdep (void)
-// OBSOLETE {
-// OBSOLETE   tm_print_insn = print_insn_m32r;
-// OBSOLETE }
+/* Target-dependent code for Renesas M32R, for GDB.
+
+   Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+   Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include "defs.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "frame-base.h"
+#include "symtab.h"
+#include "gdbtypes.h"
+#include "gdbcmd.h"
+#include "gdbcore.h"
+#include "gdb_string.h"
+#include "value.h"
+#include "inferior.h"
+#include "symfile.h"
+#include "objfiles.h"
+#include "language.h"
+#include "arch-utils.h"
+#include "regcache.h"
+#include "trad-frame.h"
+
+#include "gdb_assert.h"
+
+struct gdbarch_tdep
+{
+  /* gdbarch target dependent data here. Currently unused for M32R. */
+};
+
+/* m32r register names. */
+
+enum
+{
+  R0_REGNUM = 0,
+  R3_REGNUM = 3,
+  M32R_FP_REGNUM = 13,
+  LR_REGNUM = 14,
+  M32R_SP_REGNUM = 15,
+  PSW_REGNUM = 16,
+  M32R_PC_REGNUM = 21,
+  /* m32r calling convention. */
+  ARG1_REGNUM = R0_REGNUM,
+  ARGN_REGNUM = R3_REGNUM,
+  RET1_REGNUM = R0_REGNUM,
+};
+
+/* Local functions */
+
+extern void _initialize_m32r_tdep (void);
+
+static CORE_ADDR
+m32r_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
+{
+  /* Align to the size of an instruction (so that they can safely be
+     pushed onto the stack.  */
+  return sp & ~3;
+}
+
+/* Should we use EXTRACT_STRUCT_VALUE_ADDRESS instead of
+   EXTRACT_RETURN_VALUE?  GCC_P is true if compiled with gcc
+   and TYPE is the type (which is known to be struct, union or array).
+
+   The m32r returns anything less than 8 bytes in size in
+   registers. */
+
+static int
+m32r_use_struct_convention (int gcc_p, struct type *type)
+{
+  return (TYPE_LENGTH (type) > 8);
+}
+
+
+/* BREAKPOINT */
+#define M32R_BE_BREAKPOINT32 {0x10, 0xf1, 0x70, 0x00}
+#define M32R_LE_BREAKPOINT32 {0xf1, 0x10, 0x00, 0x70}
+#define M32R_BE_BREAKPOINT16 {0x10, 0xf1}
+#define M32R_LE_BREAKPOINT16 {0xf1, 0x10}
+
+static int
+m32r_memory_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
+{
+  int val;
+  unsigned char *bp;
+  int bplen;
+
+  bplen = (addr & 3) ? 2 : 4;
+
+  /* Save the memory contents.  */
+  val = target_read_memory (addr, contents_cache, bplen);
+  if (val != 0)
+    return val;                        /* return error */
+
+  /* Determine appropriate breakpoint contents and size for this address.  */
+  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+    {
+      if (((addr & 3) == 0)
+         && ((contents_cache[0] & 0x80) || (contents_cache[2] & 0x80)))
+       {
+         static unsigned char insn[] = M32R_BE_BREAKPOINT32;
+         bp = insn;
+         bplen = sizeof (insn);
+       }
+      else
+       {
+         static unsigned char insn[] = M32R_BE_BREAKPOINT16;
+         bp = insn;
+         bplen = sizeof (insn);
+       }
+    }
+  else
+    {                          /* little-endian */
+      if (((addr & 3) == 0)
+         && ((contents_cache[1] & 0x80) || (contents_cache[3] & 0x80)))
+       {
+         static unsigned char insn[] = M32R_LE_BREAKPOINT32;
+         bp = insn;
+         bplen = sizeof (insn);
+       }
+      else
+       {
+         static unsigned char insn[] = M32R_LE_BREAKPOINT16;
+         bp = insn;
+         bplen = sizeof (insn);
+       }
+    }
+
+  /* Write the breakpoint.  */
+  val = target_write_memory (addr, (char *) bp, bplen);
+  return val;
+}
+
+static int
+m32r_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
+{
+  int val;
+  int bplen;
+
+  /* Determine appropriate breakpoint contents and size for this address.  */
+  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+    {
+      if (((addr & 3) == 0)
+         && ((contents_cache[0] & 0x80) || (contents_cache[2] & 0x80)))
+       {
+         static unsigned char insn[] = M32R_BE_BREAKPOINT32;
+         bplen = sizeof (insn);
+       }
+      else
+       {
+         static unsigned char insn[] = M32R_BE_BREAKPOINT16;
+         bplen = sizeof (insn);
+       }
+    }
+  else
+    {
+      /* little-endian */
+      if (((addr & 3) == 0)
+         && ((contents_cache[1] & 0x80) || (contents_cache[3] & 0x80)))
+       {
+         static unsigned char insn[] = M32R_BE_BREAKPOINT32;
+         bplen = sizeof (insn);
+       }
+      else
+       {
+         static unsigned char insn[] = M32R_BE_BREAKPOINT16;
+         bplen = sizeof (insn);
+       }
+    }
+
+  /* Write contents.  */
+  val = target_write_memory (addr, contents_cache, bplen);
+  return val;
+}
+
+static const unsigned char *
+m32r_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+{
+  unsigned char *bp;
+
+  /* Determine appropriate breakpoint.  */
+  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+    {
+      if ((*pcptr & 3) == 0)
+       {
+         static unsigned char insn[] = M32R_BE_BREAKPOINT32;
+         bp = insn;
+         *lenptr = sizeof (insn);
+       }
+      else
+       {
+         static unsigned char insn[] = M32R_BE_BREAKPOINT16;
+         bp = insn;
+         *lenptr = sizeof (insn);
+       }
+    }
+  else
+    {
+      if ((*pcptr & 3) == 0)
+       {
+         static unsigned char insn[] = M32R_LE_BREAKPOINT32;
+         bp = insn;
+         *lenptr = sizeof (insn);
+       }
+      else
+       {
+         static unsigned char insn[] = M32R_LE_BREAKPOINT16;
+         bp = insn;
+         *lenptr = sizeof (insn);
+       }
+    }
+
+  return bp;
+}
+
+
+char *m32r_register_names[] = {
+  "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+  "r8", "r9", "r10", "r11", "r12", "fp", "lr", "sp",
+  "psw", "cbr", "spi", "spu", "bpc", "pc", "accl", "acch",
+  "evb"
+};
+
+static int
+m32r_num_regs (void)
+{
+  return (sizeof (m32r_register_names) / sizeof (m32r_register_names[0]));
+}
+
+static const char *
+m32r_register_name (int reg_nr)
+{
+  if (reg_nr < 0)
+    return NULL;
+  if (reg_nr >= m32r_num_regs ())
+    return NULL;
+  return m32r_register_names[reg_nr];
+}
+
+
+/* Return the GDB type object for the "standard" data type
+   of data in register N.  */
+
+static struct type *
+m32r_register_type (struct gdbarch *gdbarch, int reg_nr)
+{
+  if (reg_nr == M32R_PC_REGNUM)
+    return builtin_type_void_func_ptr;
+  else if (reg_nr == M32R_SP_REGNUM || reg_nr == M32R_FP_REGNUM)
+    return builtin_type_void_data_ptr;
+  else
+    return builtin_type_int32;
+}
+
+
+/* Write into appropriate registers a function return value
+   of type TYPE, given in virtual format.  
+
+   Things always get returned in RET1_REGNUM, RET2_REGNUM. */
+
+static void
+m32r_store_return_value (struct type *type, struct regcache *regcache,
+                        const void *valbuf)
+{
+  CORE_ADDR regval;
+  int len = TYPE_LENGTH (type);
+
+  regval = extract_unsigned_integer (valbuf, len > 4 ? 4 : len);
+  regcache_cooked_write_unsigned (regcache, RET1_REGNUM, regval);
+
+  if (len > 4)
+    {
+      regval = extract_unsigned_integer ((char *) valbuf + 4, len - 4);
+      regcache_cooked_write_unsigned (regcache, RET1_REGNUM + 1, regval);
+    }
+}
+
+/* Extract from an array REGBUF containing the (raw) register state
+   the address in which a function should return its structure value,
+   as a CORE_ADDR (or an expression that can be used as one).  */
+
+static CORE_ADDR
+m32r_extract_struct_value_address (struct regcache *regcache)
+{
+  ULONGEST addr;
+  regcache_cooked_read_unsigned (regcache, ARG1_REGNUM, &addr);
+  return addr;
+}
+
+
+/* This is required by skip_prologue. The results of decoding a prologue
+   should be cached because this thrashing is getting nuts.  */
+
+static void
+decode_prologue (CORE_ADDR start_pc, CORE_ADDR scan_limit,
+                CORE_ADDR *pl_endptr)
+{
+  unsigned long framesize;
+  int insn;
+  int op1;
+  int maybe_one_more = 0;
+  CORE_ADDR after_prologue = 0;
+  CORE_ADDR after_stack_adjust = 0;
+  CORE_ADDR current_pc;
+
+  framesize = 0;
+  after_prologue = 0;
+
+  for (current_pc = start_pc; current_pc < scan_limit; current_pc += 2)
+    {
+      insn = read_memory_unsigned_integer (current_pc, 2);
+
+      /* If this is a 32 bit instruction, we dont want to examine its
+         immediate data as though it were an instruction */
+      if (current_pc & 0x02)
+       {
+         /* Clear the parallel execution bit from 16 bit instruction */
+         if (maybe_one_more)
+           {
+             /* The last instruction was a branch, usually terminates
+                the series, but if this is a parallel instruction,
+                it may be a stack framing instruction */
+             if (!(insn & 0x8000))
+               {
+                 /* nope, we are really done */
+                 break;
+               }
+           }
+         /* decode this instruction further */
+         insn &= 0x7fff;
+       }
+      else
+       {
+         if (maybe_one_more)
+           break;              /* This isnt the one more */
+         if (insn & 0x8000)
+           {
+             if (current_pc == scan_limit)
+               scan_limit += 2;        /* extend the search */
+             current_pc += 2;  /* skip the immediate data */
+             if (insn == 0x8faf)       /* add3 sp, sp, xxxx */
+               /* add 16 bit sign-extended offset */
+               {
+                 framesize +=
+                   -((short) read_memory_unsigned_integer (current_pc, 2));
+               }
+             else
+               {
+                 if (((insn >> 8) == 0xe4)     /* ld24 r4, xxxxxx; sub sp, r4 */
+                     && read_memory_unsigned_integer (current_pc + 2,
+                                                      2) == 0x0f24)
+                   /* subtract 24 bit sign-extended negative-offset */
+                   {
+                     insn = read_memory_unsigned_integer (current_pc - 2, 4);
+                     if (insn & 0x00800000)    /* sign extend */
+                       insn |= 0xff000000;     /* negative */
+                     else
+                       insn &= 0x00ffffff;     /* positive */
+                     framesize += insn;
+                   }
+               }
+             after_prologue = current_pc;
+             continue;
+           }
+       }
+      op1 = insn & 0xf000;     /* isolate just the first nibble */
+
+      if ((insn & 0xf0ff) == 0x207f)
+       {                       /* st reg, @-sp */
+         int regno;
+         framesize += 4;
+         regno = ((insn >> 8) & 0xf);
+         after_prologue = 0;
+         continue;
+       }
+      if ((insn >> 8) == 0x4f) /* addi sp, xx */
+       /* add 8 bit sign-extended offset */
+       {
+         int stack_adjust = (char) (insn & 0xff);
+
+         /* there are probably two of these stack adjustments:
+            1) A negative one in the prologue, and
+            2) A positive one in the epilogue.
+            We are only interested in the first one.  */
+
+         if (stack_adjust < 0)
+           {
+             framesize -= stack_adjust;
+             after_prologue = 0;
+             /* A frameless function may have no "mv fp, sp".
+                In that case, this is the end of the prologue.  */
+             after_stack_adjust = current_pc + 2;
+           }
+         continue;
+       }
+      if (insn == 0x1d8f)
+       {                       /* mv fp, sp */
+         after_prologue = current_pc + 2;
+         break;                /* end of stack adjustments */
+       }
+      /* Nop looks like a branch, continue explicitly */
+      if (insn == 0x7000)
+       {
+         after_prologue = current_pc + 2;
+         continue;             /* nop occurs between pushes */
+       }
+      /* End of prolog if any of these are branch instructions */
+      if ((op1 == 0x7000) || (op1 == 0xb000) || (op1 == 0xf000))
+       {
+         after_prologue = current_pc;
+         maybe_one_more = 1;
+         continue;
+       }
+      /* Some of the branch instructions are mixed with other types */
+      if (op1 == 0x1000)
+       {
+         int subop = insn & 0x0ff0;
+         if ((subop == 0x0ec0) || (subop == 0x0fc0))
+           {
+             after_prologue = current_pc;
+             maybe_one_more = 1;
+             continue;         /* jmp , jl */
+           }
+       }
+    }
+
+  if (current_pc >= scan_limit)
+    {
+      if (pl_endptr)
+       {
+         if (after_stack_adjust != 0)
+           /* We did not find a "mv fp,sp", but we DID find
+              a stack_adjust.  Is it safe to use that as the
+              end of the prologue?  I just don't know. */
+           {
+             *pl_endptr = after_stack_adjust;
+           }
+         else
+           /* We reached the end of the loop without finding the end
+              of the prologue.  No way to win -- we should report failure.  
+              The way we do that is to return the original start_pc.
+              GDB will set a breakpoint at the start of the function (etc.) */
+           *pl_endptr = start_pc;
+       }
+      return;
+    }
+  if (after_prologue == 0)
+    after_prologue = current_pc;
+
+  if (pl_endptr)
+    *pl_endptr = after_prologue;
+}                              /*  decode_prologue */
+
+/* Function: skip_prologue
+   Find end of function prologue */
+
+#define DEFAULT_SEARCH_LIMIT 44
+
+CORE_ADDR
+m32r_skip_prologue (CORE_ADDR pc)
+{
+  CORE_ADDR func_addr, func_end;
+  struct symtab_and_line sal;
+
+  /* See what the symbol table says */
+
+  if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
+    {
+      sal = find_pc_line (func_addr, 0);
+
+      if (sal.line != 0 && sal.end <= func_end)
+       {
+         func_end = sal.end;
+       }
+      else
+       /* Either there's no line info, or the line after the prologue is after
+          the end of the function.  In this case, there probably isn't a
+          prologue.  */
+       {
+         func_end = min (func_end, func_addr + DEFAULT_SEARCH_LIMIT);
+       }
+    }
+  else
+    func_end = pc + DEFAULT_SEARCH_LIMIT;
+  decode_prologue (pc, func_end, &sal.end);
+  return sal.end;
+}
+
+
+struct m32r_unwind_cache
+{
+  /* The previous frame's inner most stack address.  Used as this
+     frame ID's stack_addr.  */
+  CORE_ADDR prev_sp;
+  /* The frame's base, optionally used by the high-level debug info.  */
+  CORE_ADDR base;
+  int size;
+  /* How far the SP and r13 (FP) have been offset from the start of
+     the stack frame (as defined by the previous frame's stack
+     pointer).  */
+  LONGEST sp_offset;
+  LONGEST r13_offset;
+  int uses_frame;
+  /* Table indicating the location of each and every register.  */
+  struct trad_frame_saved_reg *saved_regs;
+};
+
+/* Put here the code to store, into fi->saved_regs, the addresses of
+   the saved registers of frame described by FRAME_INFO.  This
+   includes special registers such as pc and fp saved in special ways
+   in the stack frame.  sp is even more special: the address we return
+   for it IS the sp for the next frame. */
+
+static struct m32r_unwind_cache *
+m32r_frame_unwind_cache (struct frame_info *next_frame,
+                        void **this_prologue_cache)
+{
+  CORE_ADDR pc;
+  ULONGEST prev_sp;
+  ULONGEST this_base;
+  unsigned long op;
+  int i;
+  struct m32r_unwind_cache *info;
+
+  if ((*this_prologue_cache))
+    return (*this_prologue_cache);
+
+  info = FRAME_OBSTACK_ZALLOC (struct m32r_unwind_cache);
+  (*this_prologue_cache) = info;
+  info->saved_regs = trad_frame_alloc_saved_regs (next_frame);
+
+  info->size = 0;
+  info->sp_offset = 0;
+
+  info->uses_frame = 0;
+  for (pc = frame_func_unwind (next_frame);
+       pc > 0 && pc < frame_pc_unwind (next_frame); pc += 2)
+    {
+      if ((pc & 2) == 0)
+       {
+         op = get_frame_memory_unsigned (next_frame, pc, 4);
+         if ((op & 0x80000000) == 0x80000000)
+           {
+             /* 32-bit instruction */
+             if ((op & 0xffff0000) == 0x8faf0000)
+               {
+                 /* add3 sp,sp,xxxx */
+                 short n = op & 0xffff;
+                 info->sp_offset += n;
+               }
+             else if (((op >> 8) == 0xe4)      /* ld24 r4, xxxxxx; sub sp, r4 */
+                      && get_frame_memory_unsigned (next_frame, pc + 4,
+                                                    2) == 0x0f24)
+               {
+                 unsigned long n = op & 0xffffff;
+                 info->sp_offset += n;
+                 pc += 2;
+               }
+             else
+               break;
+
+             pc += 2;
+             continue;
+           }
+       }
+
+      /* 16-bit instructions */
+      op = get_frame_memory_unsigned (next_frame, pc, 2) & 0x7fff;
+      if ((op & 0xf0ff) == 0x207f)
+       {
+         /* st rn, @-sp */
+         int regno = ((op >> 8) & 0xf);
+         info->sp_offset -= 4;
+         info->saved_regs[regno].addr = info->sp_offset;
+       }
+      else if ((op & 0xff00) == 0x4f00)
+       {
+         /* addi sp, xx */
+         int n = (char) (op & 0xff);
+         info->sp_offset += n;
+       }
+      else if (op == 0x1d8f)
+       {
+         /* mv fp, sp */
+         info->uses_frame = 1;
+         info->r13_offset = info->sp_offset;
+       }
+      else if (op == 0x7000)
+       /* nop */
+       continue;
+      else
+       break;
+    }
+
+  info->size = -info->sp_offset;
+
+  /* Compute the previous frame's stack pointer (which is also the
+     frame's ID's stack address), and this frame's base pointer.  */
+  if (info->uses_frame)
+    {
+      /* The SP was moved to the FP.  This indicates that a new frame
+         was created.  Get THIS frame's FP value by unwinding it from
+         the next frame.  */
+      this_base = frame_unwind_register_unsigned (next_frame, M32R_FP_REGNUM);
+      /* The FP points at the last saved register.  Adjust the FP back
+         to before the first saved register giving the SP.  */
+      prev_sp = this_base + info->size;
+    }
+  else
+    {
+      /* Assume that the FP is this frame's SP but with that pushed
+         stack space added back.  */
+      this_base = frame_unwind_register_unsigned (next_frame, M32R_SP_REGNUM);
+      prev_sp = this_base + info->size;
+    }
+
+  /* Convert that SP/BASE into real addresses.  */
+  info->prev_sp = prev_sp;
+  info->base = this_base;
+
+  /* Adjust all the saved registers so that they contain addresses and
+     not offsets.  */
+  for (i = 0; i < NUM_REGS - 1; i++)
+    if (trad_frame_addr_p (info->saved_regs, i))
+      info->saved_regs[i].addr = (info->prev_sp + info->saved_regs[i].addr);
+
+  /* The call instruction moves the caller's PC in the callee's LR.
+     Since this is an unwind, do the reverse.  Copy the location of LR
+     into PC (the address / regnum) so that a request for PC will be
+     converted into a request for the LR.  */
+  info->saved_regs[M32R_PC_REGNUM] = info->saved_regs[LR_REGNUM];
+
+  /* The previous frame's SP needed to be computed.  Save the computed
+     value.  */
+  trad_frame_set_value (info->saved_regs, M32R_SP_REGNUM, prev_sp);
+
+  return info;
+}
+
+static CORE_ADDR
+m32r_read_pc (ptid_t ptid)
+{
+  ptid_t save_ptid;
+  ULONGEST pc;
+
+  save_ptid = inferior_ptid;
+  inferior_ptid = ptid;
+  regcache_cooked_read_unsigned (current_regcache, M32R_PC_REGNUM, &pc);
+  inferior_ptid = save_ptid;
+  return pc;
+}
+
+static void
+m32r_write_pc (CORE_ADDR val, ptid_t ptid)
+{
+  ptid_t save_ptid;
+
+  save_ptid = inferior_ptid;
+  inferior_ptid = ptid;
+  write_register (M32R_PC_REGNUM, val);
+  inferior_ptid = save_ptid;
+}
+
+static CORE_ADDR
+m32r_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+  return frame_unwind_register_unsigned (next_frame, M32R_SP_REGNUM);
+}
+
+
+static CORE_ADDR
+m32r_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+                     struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+                     struct value **args, CORE_ADDR sp, int struct_return,
+                     CORE_ADDR struct_addr)
+{
+  int stack_offset, stack_alloc;
+  int argreg = ARG1_REGNUM;
+  int argnum;
+  struct type *type;
+  enum type_code typecode;
+  CORE_ADDR regval;
+  char *val;
+  char valbuf[MAX_REGISTER_SIZE];
+  int len;
+  int odd_sized_struct;
+
+  /* first force sp to a 4-byte alignment */
+  sp = sp & ~3;
+
+  /* Set the return address.  For the m32r, the return breakpoint is
+     always at BP_ADDR.  */
+  regcache_cooked_write_unsigned (regcache, LR_REGNUM, bp_addr);
+
+  /* If STRUCT_RETURN is true, then the struct return address (in
+     STRUCT_ADDR) will consume the first argument-passing register.
+     Both adjust the register count and store that value.  */
+  if (struct_return)
+    {
+      regcache_cooked_write_unsigned (regcache, argreg, struct_addr);
+      argreg++;
+    }
+
+  /* Now make sure there's space on the stack */
+  for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++)
+    stack_alloc += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 3) & ~3);
+  sp -= stack_alloc;           /* make room on stack for args */
+
+  for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
+    {
+      type = VALUE_TYPE (args[argnum]);
+      typecode = TYPE_CODE (type);
+      len = TYPE_LENGTH (type);
+
+      memset (valbuf, 0, sizeof (valbuf));
+
+      /* Passes structures that do not fit in 2 registers by reference.  */
+      if (len > 8
+         && (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION))
+       {
+         store_unsigned_integer (valbuf, 4, VALUE_ADDRESS (args[argnum]));
+         typecode = TYPE_CODE_PTR;
+         len = 4;
+         val = valbuf;
+       }
+      else if (len < 4)
+       {
+         /* value gets right-justified in the register or stack word */
+         memcpy (valbuf + (register_size (gdbarch, argreg) - len),
+                 (char *) VALUE_CONTENTS (args[argnum]), len);
+         val = valbuf;
+       }
+      else
+       val = (char *) VALUE_CONTENTS (args[argnum]);
+
+      while (len > 0)
+       {
+         if (argreg > ARGN_REGNUM)
+           {
+             /* must go on the stack */
+             write_memory (sp + stack_offset, val, 4);
+             stack_offset += 4;
+           }
+         else if (argreg <= ARGN_REGNUM)
+           {
+             /* there's room in a register */
+             regval =
+               extract_unsigned_integer (val,
+                                         register_size (gdbarch, argreg));
+             regcache_cooked_write_unsigned (regcache, argreg++, regval);
+           }
+
+         /* Store the value 4 bytes at a time.  This means that things
+            larger than 4 bytes may go partly in registers and partly
+            on the stack.  */
+         len -= register_size (gdbarch, argreg);
+         val += register_size (gdbarch, argreg);
+       }
+    }
+
+  /* Finally, update the SP register.  */
+  regcache_cooked_write_unsigned (regcache, M32R_SP_REGNUM, sp);
+
+  return sp;
+}
+
+
+/* Given a return value in `regbuf' with a type `valtype', 
+   extract and copy its value into `valbuf'.  */
+
+static void
+m32r_extract_return_value (struct type *type, struct regcache *regcache,
+                          void *dst)
+{
+  bfd_byte *valbuf = dst;
+  int len = TYPE_LENGTH (type);
+  ULONGEST tmp;
+
+  /* By using store_unsigned_integer we avoid having to do
+     anything special for small big-endian values.  */
+  regcache_cooked_read_unsigned (regcache, RET1_REGNUM, &tmp);
+  store_unsigned_integer (valbuf, (len > 4 ? len - 4 : len), tmp);
+
+  /* Ignore return values more than 8 bytes in size because the m32r
+     returns anything more than 8 bytes in the stack. */
+  if (len > 4)
+    {
+      regcache_cooked_read_unsigned (regcache, RET1_REGNUM + 1, &tmp);
+      store_unsigned_integer (valbuf + len - 4, 4, tmp);
+    }
+}
+
+
+static CORE_ADDR
+m32r_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+  return frame_unwind_register_unsigned (next_frame, M32R_PC_REGNUM);
+}
+
+/* Given a GDB frame, determine the address of the calling function's
+   frame.  This will be used to create a new GDB frame struct.  */
+
+static void
+m32r_frame_this_id (struct frame_info *next_frame,
+                   void **this_prologue_cache, struct frame_id *this_id)
+{
+  struct m32r_unwind_cache *info
+    = m32r_frame_unwind_cache (next_frame, this_prologue_cache);
+  CORE_ADDR base;
+  CORE_ADDR func;
+  struct minimal_symbol *msym_stack;
+  struct frame_id id;
+
+  /* The FUNC is easy.  */
+  func = frame_func_unwind (next_frame);
+
+  /* This is meant to halt the backtrace at "_start".  Make sure we
+     don't halt it at a generic dummy frame. */
+  if (inside_entry_file (func))
+    return;
+
+  /* Check if the stack is empty.  */
+  msym_stack = lookup_minimal_symbol ("_stack", NULL, NULL);
+  if (msym_stack && info->base == SYMBOL_VALUE_ADDRESS (msym_stack))
+    return;
+
+  /* Hopefully the prologue analysis either correctly determined the
+     frame's base (which is the SP from the previous frame), or set
+     that base to "NULL".  */
+  base = info->prev_sp;
+  if (base == 0)
+    return;
+
+  id = frame_id_build (base, func);
+
+  /* Check that we're not going round in circles with the same frame
+     ID (but avoid applying the test to sentinel frames which do go
+     round in circles).  Can't use frame_id_eq() as that doesn't yet
+     compare the frame's PC value.  */
+  if (frame_relative_level (next_frame) >= 0
+      && get_frame_type (next_frame) != DUMMY_FRAME
+      && frame_id_eq (get_frame_id (next_frame), id))
+    return;
+
+  (*this_id) = id;
+}
+
+static void
+m32r_frame_prev_register (struct frame_info *next_frame,
+                         void **this_prologue_cache,
+                         int regnum, int *optimizedp,
+                         enum lval_type *lvalp, CORE_ADDR *addrp,
+                         int *realnump, void *bufferp)
+{
+  struct m32r_unwind_cache *info
+    = m32r_frame_unwind_cache (next_frame, this_prologue_cache);
+  trad_frame_prev_register (next_frame, info->saved_regs, regnum,
+                           optimizedp, lvalp, addrp, realnump, bufferp);
+}
+
+static const struct frame_unwind m32r_frame_unwind = {
+  NORMAL_FRAME,
+  m32r_frame_this_id,
+  m32r_frame_prev_register
+};
+
+static const struct frame_unwind *
+m32r_frame_sniffer (struct frame_info *next_frame)
+{
+  return &m32r_frame_unwind;
+}
+
+static CORE_ADDR
+m32r_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+  struct m32r_unwind_cache *info
+    = m32r_frame_unwind_cache (next_frame, this_cache);
+  return info->base;
+}
+
+static const struct frame_base m32r_frame_base = {
+  &m32r_frame_unwind,
+  m32r_frame_base_address,
+  m32r_frame_base_address,
+  m32r_frame_base_address
+};
+
+/* Assuming NEXT_FRAME->prev is a dummy, return the frame ID of that
+   dummy frame.  The frame ID's base needs to match the TOS value
+   saved by save_dummy_frame_tos(), and the PC match the dummy frame's
+   breakpoint.  */
+
+static struct frame_id
+m32r_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+  return frame_id_build (m32r_unwind_sp (gdbarch, next_frame),
+                        frame_pc_unwind (next_frame));
+}
+
+
+static gdbarch_init_ftype m32r_gdbarch_init;
+
+static struct gdbarch *
+m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+  struct gdbarch *gdbarch;
+  struct gdbarch_tdep *tdep;
+
+  /* If there is already a candidate, use it.  */
+  arches = gdbarch_list_lookup_by_info (arches, &info);
+  if (arches != NULL)
+    return arches->gdbarch;
+
+  /* Allocate space for the new architecture.  */
+  tdep = XMALLOC (struct gdbarch_tdep);
+  gdbarch = gdbarch_alloc (&info, tdep);
+
+  set_gdbarch_read_pc (gdbarch, m32r_read_pc);
+  set_gdbarch_write_pc (gdbarch, m32r_write_pc);
+  set_gdbarch_unwind_sp (gdbarch, m32r_unwind_sp);
+
+  set_gdbarch_num_regs (gdbarch, m32r_num_regs ());
+  set_gdbarch_sp_regnum (gdbarch, M32R_SP_REGNUM);
+  set_gdbarch_register_name (gdbarch, m32r_register_name);
+  set_gdbarch_register_type (gdbarch, m32r_register_type);
+
+  set_gdbarch_extract_return_value (gdbarch, m32r_extract_return_value);
+  set_gdbarch_push_dummy_call (gdbarch, m32r_push_dummy_call);
+  set_gdbarch_store_return_value (gdbarch, m32r_store_return_value);
+  set_gdbarch_extract_struct_value_address (gdbarch,
+                                           m32r_extract_struct_value_address);
+  set_gdbarch_use_struct_convention (gdbarch, m32r_use_struct_convention);
+
+  set_gdbarch_skip_prologue (gdbarch, m32r_skip_prologue);
+  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+  set_gdbarch_decr_pc_after_break (gdbarch, 0);
+  set_gdbarch_function_start_offset (gdbarch, 0);
+  set_gdbarch_breakpoint_from_pc (gdbarch, m32r_breakpoint_from_pc);
+  set_gdbarch_memory_insert_breakpoint (gdbarch,
+                                       m32r_memory_insert_breakpoint);
+  set_gdbarch_memory_remove_breakpoint (gdbarch,
+                                       m32r_memory_remove_breakpoint);
+
+  set_gdbarch_frame_args_skip (gdbarch, 0);
+  set_gdbarch_frameless_function_invocation (gdbarch,
+                                            frameless_look_for_prologue);
+
+  set_gdbarch_frame_align (gdbarch, m32r_frame_align);
+
+  frame_unwind_append_sniffer (gdbarch, m32r_frame_sniffer);
+  frame_base_set_default (gdbarch, &m32r_frame_base);
+
+  /* Methods for saving / extracting a dummy frame's ID.  The ID's
+     stack address must match the SP value returned by
+     PUSH_DUMMY_CALL, and saved by generic_save_dummy_frame_tos.  */
+  set_gdbarch_unwind_dummy_id (gdbarch, m32r_unwind_dummy_id);
+
+  /* Return the unwound PC value.  */
+  set_gdbarch_unwind_pc (gdbarch, m32r_unwind_pc);
+
+  set_gdbarch_print_insn (gdbarch, print_insn_m32r);
+
+  return gdbarch;
+}
+
+void
+_initialize_m32r_tdep (void)
+{
+  register_gdbarch_init (bfd_arch_m32r, m32r_gdbarch_init);
+}
index f0f4ea59666d4572999e7d107733a7aaa5ee0e3d..223eb0991a6d946570e162de479a67a2dd59f45c 100644 (file)
@@ -21,6 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include "frame.h"
+#include "frame-unwind.h"
+#include "frame-base.h"
+#include "dwarf2-frame.h"
+#include "trad-frame.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "gdbcmd.h"
@@ -157,12 +161,23 @@ struct gdbarch_tdep
 #define STACK_CORRECTION (M6811_TDEP->stack_correction)
 #define USE_PAGE_REGISTER (M6811_TDEP->use_page_register)
 
-struct frame_extra_info
+struct m68hc11_unwind_cache
 {
+  /* The previous frame's inner most stack address.  Used as this
+     frame ID's stack_addr.  */
+  CORE_ADDR prev_sp;
+  /* The frame's base, optionally used by the high-level debug info.  */
+  CORE_ADDR base;
+  CORE_ADDR pc;
+  int size;
+  int prologue_type;
   CORE_ADDR return_pc;
+  CORE_ADDR sp_offset;
   int frameless;
-  int size;
   enum insn_return_kind return_kind;
+
+  /* Table indicating the location of each and every register.  */
+  struct trad_frame_saved_reg *saved_regs;
 };
 
 /* Table of registers for 68HC11.  This includes the hard registers
@@ -289,12 +304,15 @@ m68hc11_pseudo_register_read (struct gdbarch *gdbarch,
      addressing mode.  */
   if (regno == M68HC12_HARD_PC_REGNUM)
     {
+      ULONGEST pc;
       const int regsize = TYPE_LENGTH (builtin_type_uint32);
-      CORE_ADDR pc = read_register (HARD_PC_REGNUM);
-      int page = read_register (HARD_PAGE_REGNUM);
 
+      regcache_cooked_read_unsigned (regcache, HARD_PC_REGNUM, &pc);
       if (pc >= 0x8000 && pc < 0xc000)
         {
+          ULONGEST page;
+
+          regcache_cooked_read_unsigned (regcache, HARD_PAGE_REGNUM, &page);
           pc -= 0x8000;
           pc += (page << 14);
           pc += 0x1000000;
@@ -336,12 +354,14 @@ m68hc11_pseudo_register_write (struct gdbarch *gdbarch,
       if (pc >= 0x1000000)
         {
           pc -= 0x1000000;
-          write_register (HARD_PAGE_REGNUM, (pc >> 14) & 0x0ff);
+          regcache_cooked_write_unsigned (regcache, HARD_PAGE_REGNUM,
+                                          (pc >> 14) & 0x0ff);
           pc &= 0x03fff;
-          write_register (HARD_PC_REGNUM, pc + 0x8000);
+          regcache_cooked_write_unsigned (regcache, HARD_PC_REGNUM,
+                                          pc + 0x8000);
         }
       else
-        write_register (HARD_PC_REGNUM, pc);
+        regcache_cooked_write_unsigned (regcache, HARD_PC_REGNUM, pc);
       return;
     }
   
@@ -386,71 +406,6 @@ m68hc11_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
   return breakpoint;
 }
 
-/* Immediately after a function call, return the saved pc before the frame
-   is setup.  */
-
-static CORE_ADDR
-m68hc11_saved_pc_after_call (struct frame_info *frame)
-{
-  CORE_ADDR addr;
-  
-  addr = read_register (HARD_SP_REGNUM) + STACK_CORRECTION;
-  addr &= 0x0ffff;
-  return read_memory_integer (addr, 2) & 0x0FFFF;
-}
-
-static CORE_ADDR
-m68hc11_frame_saved_pc (struct frame_info *frame)
-{
-  return get_frame_extra_info (frame)->return_pc;
-}
-
-static CORE_ADDR
-m68hc11_frame_args_address (struct frame_info *frame)
-{
-  CORE_ADDR addr;
-
-  addr = get_frame_base (frame) + get_frame_extra_info (frame)->size + STACK_CORRECTION + 2;
-  if (get_frame_extra_info (frame)->return_kind == RETURN_RTC)
-    addr += 1;
-  else if (get_frame_extra_info (frame)->return_kind == RETURN_RTI)
-    addr += 7;
-
-  return addr;
-}
-
-/* Discard from the stack the innermost frame, restoring all saved
-   registers.  */
-
-static void
-m68hc11_pop_frame (void)
-{
-  register struct frame_info *frame = get_current_frame ();
-  register CORE_ADDR fp, sp;
-  register int regnum;
-
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-                                  get_frame_base (frame),
-                                  get_frame_base (frame)))
-    generic_pop_dummy_frame ();
-  else
-    {
-      fp = get_frame_base (frame);
-      DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
-
-      /* Copy regs from where they were saved in the frame.  */
-      for (regnum = 0; regnum < M68HC11_ALL_REGS; regnum++)
-       if (get_frame_saved_regs (frame)[regnum])
-         write_register (regnum,
-                          read_memory_integer (get_frame_saved_regs (frame)[regnum], 2));
-
-      write_register (HARD_PC_REGNUM, get_frame_extra_info (frame)->return_pc);
-      sp = (fp + get_frame_extra_info (frame)->size + 2) & 0x0ffff;
-      write_register (HARD_SP_REGNUM, sp);
-    }
-  flush_cached_frames ();
-}
-
 \f
 /* 68HC11 & 68HC12 prologue analysis.
 
@@ -553,10 +508,9 @@ static struct insn_sequence m6812_prologue[] = {
 
 /* Analyze the sequence of instructions starting at the given address.
    Returns a pointer to the sequence when it is recognized and
-   the optional value (constant/address) associated with it.
-   Advance the pc for the next sequence.  */
+   the optional value (constant/address) associated with it.  */
 static struct insn_sequence *
-m68hc11_analyze_instruction (struct insn_sequence *seq, CORE_ADDR *pc,
+m68hc11_analyze_instruction (struct insn_sequence *seq, CORE_ADDR pc,
                              CORE_ADDR *val)
 {
   unsigned char buffer[MAX_CODES];
@@ -573,7 +527,7 @@ m68hc11_analyze_instruction (struct insn_sequence *seq, CORE_ADDR *pc,
         {
           if (bufsize < j + 1)
             {
-              buffer[bufsize] = read_memory_unsigned_integer (*pc + bufsize,
+              buffer[bufsize] = read_memory_unsigned_integer (pc + bufsize,
                                                               1);
               bufsize++;
             }
@@ -610,15 +564,13 @@ m68hc11_analyze_instruction (struct insn_sequence *seq, CORE_ADDR *pc,
                 }
               else if ((buffer[j] & 0xfe) == 0xf0)
                 {
-                  v = read_memory_unsigned_integer (*pc + j + 1, 1);
+                  v = read_memory_unsigned_integer (pc + j + 1, 1);
                   if (buffer[j] & 1)
                     v |= 0xff00;
-                  *pc = *pc + 1;
                 }
               else if (buffer[j] == 0xf2)
                 {
-                  v = read_memory_unsigned_integer (*pc + j + 1, 2);
-                  *pc = *pc + 2;
+                  v = read_memory_unsigned_integer (pc + j + 1, 2);
                 }
               cur_val = v;
               break;
@@ -629,7 +581,6 @@ m68hc11_analyze_instruction (struct insn_sequence *seq, CORE_ADDR *pc,
       if (j == seq->length)
         {
           *val = cur_val;
-          *pc = *pc + j;
           return seq;
         }
     }
@@ -657,35 +608,35 @@ m68hc11_get_return_insn (CORE_ADDR pc)
     return RETURN_RTS;
 }
 
-
 /* Analyze the function prologue to find some information
    about the function:
     - the PC of the first line (for m68hc11_skip_prologue)
     - the offset of the previous frame saved address (from current frame)
     - the soft registers which are pushed.  */
-static void
-m68hc11_guess_from_prologue (CORE_ADDR pc, CORE_ADDR fp,
-                             CORE_ADDR *first_line,
-                             int *frame_offset, CORE_ADDR *pushed_regs)
+static CORE_ADDR
+m68hc11_scan_prologue (CORE_ADDR pc, CORE_ADDR current_pc,
+                       struct m68hc11_unwind_cache *info)
 {
-  CORE_ADDR save_addr;
+  LONGEST save_addr;
   CORE_ADDR func_end;
   int size;
   int found_frame_point;
   int saved_reg;
-  CORE_ADDR first_pc;
   int done = 0;
   struct insn_sequence *seq_table;
-  
-  first_pc = get_pc_function_start (pc);
+
+  info->size = 0;
+  info->sp_offset = 0;
+  if (pc >= current_pc)
+    return current_pc;
+
   size = 0;
 
   m68hc11_initialize_register_info ();
-  if (first_pc == 0)
+  if (pc == 0)
     {
-      *frame_offset = 0;
-      *first_line   = pc;
-      return;
+      info->size = 0;
+      return pc;
     }
 
   seq_table = gdbarch_tdep (current_gdbarch)->prologue;
@@ -731,20 +682,26 @@ m68hc11_guess_from_prologue (CORE_ADDR pc, CORE_ADDR fp,
      we find an instruction which is not supposed to appear in the
      prologue (as generated by gcc 2.95, 2.96).
   */
-  pc = first_pc;
   func_end = pc + 128;
   found_frame_point = 0;
-  *frame_offset = 0;
-  save_addr = fp + STACK_CORRECTION;
+  info->size = 0;
+  save_addr = 0;
   while (!done && pc + 2 < func_end)
     {
       struct insn_sequence *seq;
       CORE_ADDR val;
-      
-      seq = m68hc11_analyze_instruction (seq_table, &pc, &val);
+
+      seq = m68hc11_analyze_instruction (seq_table, pc, &val);
       if (seq == 0)
         break;
 
+      /* If we are within the instruction group, we can't advance the
+         pc nor the stack offset.  Otherwise the caller's stack computed
+         from the current stack can be wrong.  */
+      if (pc + seq->length > current_pc)
+        break;
+
+      pc = pc + seq->length;
       if (seq->type == P_SAVE_REG)
         {
           if (found_frame_point)
@@ -754,8 +711,7 @@ m68hc11_guess_from_prologue (CORE_ADDR pc, CORE_ADDR fp,
                 break;
 
               save_addr -= 2;
-              if (pushed_regs)
-                pushed_regs[saved_reg] = save_addr;
+              info->saved_regs[saved_reg].addr = save_addr;
             }
           else
             {
@@ -765,7 +721,7 @@ m68hc11_guess_from_prologue (CORE_ADDR pc, CORE_ADDR fp,
       else if (seq->type == P_SET_FRAME)
         {
           found_frame_point = 1;
-          *frame_offset = size;
+          info->size = size;
         }
       else if (seq->type == P_LOCAL_1)
         {
@@ -784,7 +740,11 @@ m68hc11_guess_from_prologue (CORE_ADDR pc, CORE_ADDR fp,
             size -= val;
         }
     }
-  *first_line  = pc;
+  if (found_frame_point == 0)
+    info->sp_offset = size;
+  else
+    info->sp_offset = -1;
+  return pc;
 }
 
 static CORE_ADDR
@@ -792,7 +752,7 @@ m68hc11_skip_prologue (CORE_ADDR pc)
 {
   CORE_ADDR func_addr, func_end;
   struct symtab_and_line sal;
-  int frame_offset;
+  struct m68hc11_unwind_cache tmp_cache = { 0 };
 
   /* If we have line debugging information, then the end of the
      prologue should be the first assembly instruction of the
@@ -804,173 +764,423 @@ m68hc11_skip_prologue (CORE_ADDR pc)
        return sal.end;
     }
 
-  m68hc11_guess_from_prologue (pc, 0, &pc, &frame_offset, 0);
+  pc = m68hc11_scan_prologue (pc, (CORE_ADDR) -1, &tmp_cache);
   return pc;
 }
 
-/* Given a GDB frame, determine the address of the calling function's
-   frame.  This will be used to create a new GDB frame struct, and
-   then DEPRECATED_INIT_EXTRA_FRAME_INFO and DEPRECATED_INIT_FRAME_PC
-   will be called for the new frame.  */
-
 static CORE_ADDR
-m68hc11_frame_chain (struct frame_info *frame)
+m68hc11_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
 {
-  CORE_ADDR addr;
+  ULONGEST pc;
+
+  frame_unwind_unsigned_register (next_frame, gdbarch_pc_regnum (gdbarch),
+                                  &pc);
+  return pc;
+}
+
+/* Put here the code to store, into fi->saved_regs, the addresses of
+   the saved registers of frame described by FRAME_INFO.  This
+   includes special registers such as pc and fp saved in special ways
+   in the stack frame.  sp is even more special: the address we return
+   for it IS the sp for the next frame. */
+
+struct m68hc11_unwind_cache *
+m68hc11_frame_unwind_cache (struct frame_info *next_frame,
+                            void **this_prologue_cache)
+{
+  ULONGEST prev_sp;
+  ULONGEST this_base;
+  struct m68hc11_unwind_cache *info;
+  CORE_ADDR current_pc;
+  int i;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-                                  get_frame_base (frame),
-                                  get_frame_base (frame)))
-    return get_frame_base (frame);     /* dummy frame same as caller's frame */
+  if ((*this_prologue_cache))
+    return (*this_prologue_cache);
 
-  if (get_frame_extra_info (frame)->return_pc == 0
-      || inside_entry_file (get_frame_extra_info (frame)->return_pc))
-    return (CORE_ADDR) 0;
+  info = FRAME_OBSTACK_ZALLOC (struct m68hc11_unwind_cache);
+  (*this_prologue_cache) = info;
+  info->saved_regs = trad_frame_alloc_saved_regs (next_frame);
 
-  if (get_frame_base (frame) == 0)
+  info->pc = frame_func_unwind (next_frame);
+
+  info->size = 0;
+  info->return_kind = m68hc11_get_return_insn (info->pc);
+
+  /* The SP was moved to the FP.  This indicates that a new frame
+     was created.  Get THIS frame's FP value by unwinding it from
+     the next frame.  */
+  frame_unwind_unsigned_register (next_frame, SOFT_FP_REGNUM, &this_base);
+  if (this_base == 0)
     {
-      return (CORE_ADDR) 0;
+      info->base = 0;
+      return info;
     }
 
-  addr = get_frame_base (frame) + get_frame_extra_info (frame)->size + STACK_CORRECTION - 2;
-  addr = read_memory_unsigned_integer (addr, 2) & 0x0FFFF;
-  return addr;
-}  
+  current_pc = frame_pc_unwind (next_frame);
+  if (info->pc != 0)
+    m68hc11_scan_prologue (info->pc, current_pc, info);
 
-/* Put here the code to store, into a struct frame_saved_regs, the
-   addresses of the saved registers of frame described by FRAME_INFO.
-   This includes special registers such as pc and fp saved in special
-   ways in the stack frame.   sp is even more special: the address we
-   return for it IS the sp for the next frame.  */
-static void
-m68hc11_frame_init_saved_regs (struct frame_info *fi)
-{
-  CORE_ADDR pc;
-  CORE_ADDR addr;
+  info->saved_regs[HARD_PC_REGNUM].addr = info->size;
 
-  if (get_frame_saved_regs (fi) == NULL)
-    frame_saved_regs_zalloc (fi);
+  if (info->sp_offset != (CORE_ADDR) -1)
+    {
+      info->saved_regs[HARD_PC_REGNUM].addr = info->sp_offset;
+      frame_unwind_unsigned_register (next_frame, HARD_SP_REGNUM, &this_base);
+      prev_sp = this_base + info->sp_offset + 2;
+      this_base += STACK_CORRECTION;
+    }
   else
-    memset (get_frame_saved_regs (fi), 0, SIZEOF_FRAME_SAVED_REGS);
-
-  pc = get_frame_pc (fi);
-  get_frame_extra_info (fi)->return_kind = m68hc11_get_return_insn (pc);
-  m68hc11_guess_from_prologue (pc, get_frame_base (fi), &pc,
-                              &get_frame_extra_info (fi)->size,
-                               get_frame_saved_regs (fi));
+    {
+      /* The FP points at the last saved register.  Adjust the FP back
+         to before the first saved register giving the SP.  */
+      prev_sp = this_base + info->size + 2;
 
-  addr = get_frame_base (fi) + get_frame_extra_info (fi)->size + STACK_CORRECTION;
-  if (soft_regs[SOFT_FP_REGNUM].name)
-    get_frame_saved_regs (fi)[SOFT_FP_REGNUM] = addr - 2;
+      this_base += STACK_CORRECTION;
+      if (soft_regs[SOFT_FP_REGNUM].name)
+        info->saved_regs[SOFT_FP_REGNUM].addr = info->size - 2;
+   }
 
-  /* Take into account how the function was called/returns.  */
-  if (get_frame_extra_info (fi)->return_kind == RETURN_RTC)
+  if (info->return_kind == RETURN_RTC)
     {
-      get_frame_saved_regs (fi)[HARD_PAGE_REGNUM] = addr;
-      addr++;
+      prev_sp += 1;
+      info->saved_regs[HARD_PAGE_REGNUM].addr = info->size;
+      info->saved_regs[HARD_PC_REGNUM].addr = info->size + 1;
     }
-  else if (get_frame_extra_info (fi)->return_kind == RETURN_RTI)
+  else if (info->return_kind == RETURN_RTI)
     {
-      get_frame_saved_regs (fi)[HARD_CCR_REGNUM] = addr;
-      get_frame_saved_regs (fi)[HARD_D_REGNUM] = addr + 1;
-      get_frame_saved_regs (fi)[HARD_X_REGNUM] = addr + 3;
-      get_frame_saved_regs (fi)[HARD_Y_REGNUM] = addr + 5;
-      addr += 7;
+      prev_sp += 7;
+      info->saved_regs[HARD_CCR_REGNUM].addr = info->size;
+      info->saved_regs[HARD_D_REGNUM].addr = info->size + 1;
+      info->saved_regs[HARD_X_REGNUM].addr = info->size + 3;
+      info->saved_regs[HARD_Y_REGNUM].addr = info->size + 5;
+      info->saved_regs[HARD_PC_REGNUM].addr = info->size + 7;
     }
-  get_frame_saved_regs (fi)[HARD_SP_REGNUM] = addr;
-  get_frame_saved_regs (fi)[HARD_PC_REGNUM] = get_frame_saved_regs (fi)[HARD_SP_REGNUM];
+
+  /* Add 1 here to adjust for the post-decrement nature of the push
+     instruction.*/
+  info->prev_sp = prev_sp;
+
+  info->base = this_base;
+
+  /* Adjust all the saved registers so that they contain addresses and not
+     offsets.  */
+  for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS - 1; i++)
+    if (trad_frame_addr_p (info->saved_regs, i))
+      {
+        info->saved_regs[i].addr += this_base;
+      }
+
+  /* The previous frame's SP needed to be computed.  Save the computed
+     value.  */
+  trad_frame_set_value (info->saved_regs, HARD_SP_REGNUM, info->prev_sp);
+
+  return info;
+}
+
+/* Given a GDB frame, determine the address of the calling function's
+   frame.  This will be used to create a new GDB frame struct.  */
+
+static void
+m68hc11_frame_this_id (struct frame_info *next_frame,
+                       void **this_prologue_cache,
+                       struct frame_id *this_id)
+{
+  struct m68hc11_unwind_cache *info
+    = m68hc11_frame_unwind_cache (next_frame, this_prologue_cache);
+  CORE_ADDR base;
+  CORE_ADDR func;
+  struct frame_id id;
+
+  /* The FUNC is easy.  */
+  func = frame_func_unwind (next_frame);
+
+  /* This is meant to halt the backtrace at "_start".  Make sure we
+     don't halt it at a generic dummy frame. */
+  if (inside_entry_file (func))
+    return;
+
+  /* Hopefully the prologue analysis either correctly determined the
+     frame's base (which is the SP from the previous frame), or set
+     that base to "NULL".  */
+  base = info->prev_sp;
+  if (base == 0)
+    return;
+
+  id = frame_id_build (base, func);
+#if 0
+  /* Check that we're not going round in circles with the same frame
+     ID (but avoid applying the test to sentinel frames which do go
+     round in circles).  Can't use frame_id_eq() as that doesn't yet
+     compare the frame's PC value.  */
+  if (frame_relative_level (next_frame) >= 0
+      && get_frame_type (next_frame) != DUMMY_FRAME
+      && frame_id_eq (get_frame_id (next_frame), id))
+    return;
+#endif
+  (*this_id) = id;
 }
 
 static void
-m68hc11_init_extra_frame_info (int fromleaf, struct frame_info *fi)
+m68hc11_frame_prev_register (struct frame_info *next_frame,
+                             void **this_prologue_cache,
+                             int regnum, int *optimizedp,
+                             enum lval_type *lvalp, CORE_ADDR *addrp,
+                             int *realnump, void *bufferp)
+{
+  struct m68hc11_unwind_cache *info
+    = m68hc11_frame_unwind_cache (next_frame, this_prologue_cache);
+
+  trad_frame_prev_register (next_frame, info->saved_regs, regnum,
+                            optimizedp, lvalp, addrp, realnump, bufferp);
+
+  if (regnum == HARD_PC_REGNUM)
+    {
+      /* Take into account the 68HC12 specific call (PC + page).  */
+      if (info->return_kind == RETURN_RTC
+          && *addrp >= 0x08000 && *addrp < 0x0c000
+          && USE_PAGE_REGISTER)
+        {
+          int page_optimized;
+
+          CORE_ADDR page;
+
+          trad_frame_prev_register (next_frame, info->saved_regs,
+                                    HARD_PAGE_REGNUM, &page_optimized,
+                                    0, &page, 0, 0);
+          *addrp -= 0x08000;
+          *addrp += ((page & 0x0ff) << 14);
+          *addrp += 0x1000000;
+        }
+    }
+}
+
+static const struct frame_unwind m68hc11_frame_unwind = {
+  NORMAL_FRAME,
+  m68hc11_frame_this_id,
+  m68hc11_frame_prev_register
+};
+
+const struct frame_unwind *
+m68hc11_frame_p (CORE_ADDR pc)
+{
+  return &m68hc11_frame_unwind;
+}
+
+static CORE_ADDR
+m68hc11_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+  struct m68hc11_unwind_cache *info
+    = m68hc11_frame_unwind_cache (next_frame, this_cache);
+
+  return info->base;
+}
+
+static CORE_ADDR
+m68hc11_frame_args_address (struct frame_info *next_frame, void **this_cache)
 {
   CORE_ADDR addr;
+  struct m68hc11_unwind_cache *info
+    = m68hc11_frame_unwind_cache (next_frame, this_cache);
 
-  frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
-  
-  if (get_next_frame (fi))
-    deprecated_update_frame_pc_hack (fi, DEPRECATED_FRAME_SAVED_PC (get_next_frame (fi)));
-  
-  m68hc11_frame_init_saved_regs (fi);
+  addr = info->base + info->size;
+  if (info->return_kind == RETURN_RTC)
+    addr += 1;
+  else if (info->return_kind == RETURN_RTI)
+    addr += 7;
 
-  if (fromleaf)
+  return addr;
+}
+
+static const struct frame_base m68hc11_frame_base = {
+  &m68hc11_frame_unwind,
+  m68hc11_frame_base_address,
+  m68hc11_frame_base_address,
+  m68hc11_frame_args_address
+};
+
+static CORE_ADDR
+m68hc11_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+  ULONGEST sp;
+  frame_unwind_unsigned_register (next_frame, HARD_SP_REGNUM, &sp);
+  return sp;
+}
+
+/* Assuming NEXT_FRAME->prev is a dummy, return the frame ID of that
+   dummy frame.  The frame ID's base needs to match the TOS value
+   saved by save_dummy_frame_tos(), and the PC match the dummy frame's
+   breakpoint.  */
+
+static struct frame_id
+m68hc11_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+  ULONGEST tos;
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
+
+  frame_unwind_unsigned_register (next_frame, SOFT_FP_REGNUM, &tos);
+  tos += 2;
+  return frame_id_build (tos, pc);
+}
+
+\f
+/* Get and print the register from the given frame.  */
+static void
+m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file,
+                        struct frame_info *frame, int regno)
+{
+  LONGEST rval;
+
+  if (regno == HARD_PC_REGNUM || regno == HARD_SP_REGNUM
+      || regno == SOFT_FP_REGNUM || regno == M68HC12_HARD_PC_REGNUM)
+    frame_read_unsigned_register (frame, regno, &rval);
+  else
+    frame_read_signed_register (frame, regno, &rval);
+
+  if (regno == HARD_A_REGNUM || regno == HARD_B_REGNUM
+      || regno == HARD_CCR_REGNUM || regno == HARD_PAGE_REGNUM)
     {
-      get_frame_extra_info (fi)->return_kind = m68hc11_get_return_insn (get_frame_pc (fi));
-      get_frame_extra_info (fi)->return_pc = m68hc11_saved_pc_after_call (fi);
+      fprintf_filtered (file, "0x%02x   ", (unsigned char) rval);
+      if (regno != HARD_CCR_REGNUM)
+        print_longest (file, 'd', 1, rval);
     }
   else
     {
-      addr = get_frame_saved_regs (fi)[HARD_PC_REGNUM];
-      addr = read_memory_unsigned_integer (addr, 2) & 0x0ffff;
-
-      /* Take into account the 68HC12 specific call (PC + page).  */
-      if (get_frame_extra_info (fi)->return_kind == RETURN_RTC
-          && addr >= 0x08000 && addr < 0x0c000
-          && USE_PAGE_REGISTER)
+      if (regno == HARD_PC_REGNUM && gdbarch_tdep (gdbarch)->use_page_register)
         {
-          CORE_ADDR page_addr = get_frame_saved_regs (fi)[HARD_PAGE_REGNUM];
+          ULONGEST page;
 
-          unsigned page = read_memory_unsigned_integer (page_addr, 1);
-          addr -= 0x08000;
-          addr += ((page & 0x0ff) << 14);
-          addr += 0x1000000;
+          frame_read_unsigned_register (frame, HARD_PAGE_REGNUM, &page);
+          fprintf_filtered (file, "0x%02x:%04x ", (unsigned) page,
+                            (unsigned) rval);
         }
-      get_frame_extra_info (fi)->return_pc = addr;
+      else
+        {
+          fprintf_filtered (file, "0x%04x ", (unsigned) rval);
+          if (regno != HARD_PC_REGNUM && regno != HARD_SP_REGNUM
+              && regno != SOFT_FP_REGNUM && regno != M68HC12_HARD_PC_REGNUM)
+            print_longest (file, 'd', 1, rval);
+        }
+    }
+
+  if (regno == HARD_CCR_REGNUM)
+    {
+      /* CCR register */
+      int C, Z, N, V;
+      unsigned char l = rval & 0xff;
+
+      fprintf_filtered (file, "%c%c%c%c%c%c%c%c   ",
+                        l & M6811_S_BIT ? 'S' : '-',
+                        l & M6811_X_BIT ? 'X' : '-',
+                        l & M6811_H_BIT ? 'H' : '-',
+                        l & M6811_I_BIT ? 'I' : '-',
+                        l & M6811_N_BIT ? 'N' : '-',
+                        l & M6811_Z_BIT ? 'Z' : '-',
+                        l & M6811_V_BIT ? 'V' : '-',
+                        l & M6811_C_BIT ? 'C' : '-');
+      N = (l & M6811_N_BIT) != 0;
+      Z = (l & M6811_Z_BIT) != 0;
+      V = (l & M6811_V_BIT) != 0;
+      C = (l & M6811_C_BIT) != 0;
+
+      /* Print flags following the h8300  */
+      if ((C | Z) == 0)
+       fprintf_filtered (file, "u> ");
+      else if ((C | Z) == 1)
+       fprintf_filtered (file, "u<= ");
+      else if (C == 0)
+       fprintf_filtered (file, "u< ");
+
+      if (Z == 0)
+       fprintf_filtered (file, "!= ");
+      else
+       fprintf_filtered (file, "== ");
+
+      if ((N ^ V) == 0)
+       fprintf_filtered (file, ">= ");
+      else
+       fprintf_filtered (file, "< ");
+
+      if ((Z | (N ^ V)) == 0)
+       fprintf_filtered (file, "> ");
+      else
+       fprintf_filtered (file, "<= ");
     }
 }
 
 /* Same as 'info reg' but prints the registers in a different way.  */
 static void
-show_regs (char *args, int from_tty)
+m68hc11_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
+                              struct frame_info *frame, int regno, int cpregs)
 {
-  int ccr = read_register (HARD_CCR_REGNUM);
-  int i;
-  int nr;
-  
-  printf_filtered ("PC=%04x SP=%04x FP=%04x CCR=%02x %c%c%c%c%c%c%c%c\n",
-                  (int) read_register (HARD_PC_REGNUM),
-                  (int) read_register (HARD_SP_REGNUM),
-                  (int) read_register (SOFT_FP_REGNUM),
-                  ccr,
-                  ccr & M6811_S_BIT ? 'S' : '-',
-                  ccr & M6811_X_BIT ? 'X' : '-',
-                  ccr & M6811_H_BIT ? 'H' : '-',
-                  ccr & M6811_I_BIT ? 'I' : '-',
-                  ccr & M6811_N_BIT ? 'N' : '-',
-                  ccr & M6811_Z_BIT ? 'Z' : '-',
-                  ccr & M6811_V_BIT ? 'V' : '-',
-                  ccr & M6811_C_BIT ? 'C' : '-');
-
-  printf_filtered ("D=%04x IX=%04x IY=%04x",
-                  (int) read_register (HARD_D_REGNUM),
-                  (int) read_register (HARD_X_REGNUM),
-                  (int) read_register (HARD_Y_REGNUM));
-
-  if (USE_PAGE_REGISTER)
+  if (regno >= 0)
     {
-      printf_filtered (" Page=%02x",
-                       (int) read_register (HARD_PAGE_REGNUM));
-    }
-  printf_filtered ("\n");
+      const char *name = gdbarch_register_name (gdbarch, regno);
+
+      if (!name || !*name)
+        return;
 
-  nr = 0;
-  for (i = SOFT_D1_REGNUM; i < M68HC11_ALL_REGS; i++)
+      fprintf_filtered (file, "%-10s ", name);
+      m68hc11_print_register (gdbarch, file, frame, regno);
+      fprintf_filtered (file, "\n");
+    }
+  else
     {
-      /* Skip registers which are not defined in the symbol table.  */
-      if (soft_regs[i].name == 0)
-        continue;
+      int i, nr;
+
+      fprintf_filtered (file, "PC=");
+      m68hc11_print_register (gdbarch, file, frame, HARD_PC_REGNUM);
+
+      fprintf_filtered (file, " SP=");
+      m68hc11_print_register (gdbarch, file, frame, HARD_SP_REGNUM);
+
+      fprintf_filtered (file, " FP=");
+      m68hc11_print_register (gdbarch, file, frame, SOFT_FP_REGNUM);
+
+      fprintf_filtered (file, "\nCCR=");
+      m68hc11_print_register (gdbarch, file, frame, HARD_CCR_REGNUM);
       
-      printf_filtered ("D%d=%04x",
-                       i - SOFT_D1_REGNUM + 1,
-                       (int) read_register (i));
-      nr++;
-      if ((nr % 8) == 7)
-        printf_filtered ("\n");
-      else
-        printf_filtered (" ");
+      fprintf_filtered (file, "\nD=");
+      m68hc11_print_register (gdbarch, file, frame, HARD_D_REGNUM);
+
+      fprintf_filtered (file, " X=");
+      m68hc11_print_register (gdbarch, file, frame, HARD_X_REGNUM);
+
+      fprintf_filtered (file, " Y=");
+      m68hc11_print_register (gdbarch, file, frame, HARD_Y_REGNUM);
+  
+      if (gdbarch_tdep (gdbarch)->use_page_register)
+        {
+          fprintf_filtered (file, "\nPage=");
+          m68hc11_print_register (gdbarch, file, frame, HARD_PAGE_REGNUM);
+        }
+      fprintf_filtered (file, "\n");
+
+      nr = 0;
+      for (i = SOFT_D1_REGNUM; i < M68HC11_ALL_REGS; i++)
+        {
+          /* Skip registers which are not defined in the symbol table.  */
+          if (soft_regs[i].name == 0)
+            continue;
+          
+          fprintf_filtered (file, "D%d=", i - SOFT_D1_REGNUM + 1);
+          m68hc11_print_register (gdbarch, file, frame, i);
+          nr++;
+          if ((nr % 8) == 7)
+            fprintf_filtered (file, "\n");
+          else
+            fprintf_filtered (file, " ");
+        }
+      if (nr && (nr % 8) != 7)
+        fprintf_filtered (file, "\n");
     }
-  if (nr && (nr % 8) != 7)
-    printf_filtered ("\n");
+}
+
+/* Same as 'info reg' but prints the registers in a different way.  */
+static void
+show_regs (char *args, int from_tty)
+{
+  m68hc11_print_registers_info (current_gdbarch, gdb_stdout,
+                                get_current_frame (), -1, 1);
 }
 
 static CORE_ADDR
@@ -980,85 +1190,89 @@ m68hc11_stack_align (CORE_ADDR addr)
 }
 
 static CORE_ADDR
-m68hc11_push_arguments (int nargs,
-                        struct value **args,
-                        CORE_ADDR sp,
-                        int struct_return,
-                        CORE_ADDR struct_addr)
+m68hc11_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+                         struct regcache *regcache, CORE_ADDR bp_addr,
+                         int nargs, struct value **args, CORE_ADDR sp,
+                         int struct_return, CORE_ADDR struct_addr)
 {
-  int stack_alloc;
   int argnum;
   int first_stack_argnum;
-  int stack_offset;
   struct type *type;
   char *val;
   int len;
+  char buf[2];
   
-  stack_alloc = 0;
   first_stack_argnum = 0;
   if (struct_return)
     {
       /* The struct is allocated on the stack and gdb used the stack
          pointer for the address of that struct.  We must apply the
          stack offset on the address.  */
-      write_register (HARD_D_REGNUM, struct_addr + STACK_CORRECTION);
+      regcache_cooked_write_unsigned (regcache, HARD_D_REGNUM,
+                                      struct_addr + STACK_CORRECTION);
     }
   else if (nargs > 0)
     {
       type = VALUE_TYPE (args[0]);
       len = TYPE_LENGTH (type);
-      
+
       /* First argument is passed in D and X registers.  */
       if (len <= 4)
         {
-          LONGEST v = extract_unsigned_integer (VALUE_CONTENTS (args[0]), len);
+          ULONGEST v;
+
+          v = extract_unsigned_integer (VALUE_CONTENTS (args[0]), len);
           first_stack_argnum = 1;
-          write_register (HARD_D_REGNUM, v);
+
+          regcache_cooked_write_unsigned (regcache, HARD_D_REGNUM, v);
           if (len > 2)
             {
               v >>= 16;
-              write_register (HARD_X_REGNUM, v);
+              regcache_cooked_write_unsigned (regcache, HARD_X_REGNUM, v);
             }
         }
     }
-  for (argnum = first_stack_argnum; argnum < nargs; argnum++)
-    {
-      type = VALUE_TYPE (args[argnum]);
-      stack_alloc += (TYPE_LENGTH (type) + 1) & -2;
-    }
-  sp -= stack_alloc;
 
-  stack_offset = STACK_CORRECTION;
-  for (argnum = first_stack_argnum; argnum < nargs; argnum++)
+  for (argnum = nargs - 1; argnum >= first_stack_argnum; argnum--)
     {
       type = VALUE_TYPE (args[argnum]);
       len = TYPE_LENGTH (type);
 
-      val = (char*) VALUE_CONTENTS (args[argnum]);
-      write_memory (sp + stack_offset, val, len);
-      stack_offset += len;
       if (len & 1)
         {
           static char zero = 0;
 
-          write_memory (sp + stack_offset, &zero, 1);
-          stack_offset++;
+          sp--;
+          write_memory (sp, &zero, 1);
         }
+      val = (char*) VALUE_CONTENTS (args[argnum]);
+      sp -= len;
+      write_memory (sp, val, len);
     }
-  return sp;
-}
 
+  /* Store return address.  */
+  sp -= 2;
+  store_unsigned_integer (buf, 2, bp_addr);
+  write_memory (sp, buf, 2);
 
-/* Return a location where we can set a breakpoint that will be hit
-   when an inferior function call returns.  */
-static CORE_ADDR
-m68hc11_call_dummy_address (void)
-{
-  return entry_point_address ();
+  /* Finally, update the stack pointer...  */
+  sp -= STACK_CORRECTION;
+  regcache_cooked_write_unsigned (regcache, HARD_SP_REGNUM, sp);
+
+  /* ...and fake a frame pointer.  */
+  regcache_cooked_write_unsigned (regcache, SOFT_FP_REGNUM, sp);
+
+  /* DWARF2/GCC uses the stack address *before* the function call as a
+     frame's CFA.  */
+  return sp + 2;
 }
 
+
+/* Return the GDB type object for the "standard" data type
+   of data in register N.  */
+
 static struct type *
-m68hc11_register_virtual_type (int reg_nr)
+m68hc11_register_type (struct gdbarch *gdbarch, int reg_nr)
 {
   switch (reg_nr)
     {
@@ -1077,66 +1291,58 @@ m68hc11_register_virtual_type (int reg_nr)
 }
 
 static void
-m68hc11_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
-  /* The struct address computed by gdb is on the stack.
-     It uses the stack pointer so we must apply the stack
-     correction offset.  */
-  write_register (HARD_D_REGNUM, addr + STACK_CORRECTION);
-}
-
-static void
-m68hc11_store_return_value (struct type *type, char *valbuf)
+m68hc11_store_return_value (struct type *type, struct regcache *regcache,
+                            const void *valbuf)
 {
   int len;
 
   len = TYPE_LENGTH (type);
 
   /* First argument is passed in D and X registers.  */
-  if (len <= 4)
+  if (len <= 2)
+    regcache_raw_write_part (regcache, HARD_D_REGNUM, 2 - len, len, valbuf);
+  else if (len <= 4)
     {
-      LONGEST v = extract_unsigned_integer (valbuf, len);
-
-      write_register (HARD_D_REGNUM, v);
-      if (len > 2)
-        {
-          v >>= 16;
-          write_register (HARD_X_REGNUM, v);
-        }
+      regcache_raw_write_part (regcache, HARD_X_REGNUM, 4 - len,
+                               len - 2, valbuf);
+      regcache_raw_write (regcache, HARD_D_REGNUM, (char*) valbuf + (len - 2));
     }
   else
     error ("return of value > 4 is not supported.");
 }
 
 
-/* Given a return value in `regbuf' with a type `type', 
+/* Given a return value in `regcache' with a type `type', 
    extract and copy its value into `valbuf'.  */
 
 static void
-m68hc11_extract_return_value (struct type *type,
-                              char *regbuf,
-                              char *valbuf)
+m68hc11_extract_return_value (struct type *type, struct regcache *regcache,
+                              void *valbuf)
 {
   int len = TYPE_LENGTH (type);
-  
+  char buf[M68HC11_REG_SIZE];
+
+  regcache_raw_read (regcache, HARD_D_REGNUM, buf);
   switch (len)
     {
     case 1:
-      memcpy (valbuf, &regbuf[HARD_D_REGNUM * 2 + 1], len);
+      memcpy (valbuf, buf + 1, 1);
       break;
-  
+
     case 2:
-      memcpy (valbuf, &regbuf[HARD_D_REGNUM * 2], len);
+      memcpy (valbuf, buf, 2);
       break;
-      
+
     case 3:
-      memcpy (&valbuf[0], &regbuf[HARD_X_REGNUM * 2 + 1], 1);
-      memcpy (&valbuf[1], &regbuf[HARD_D_REGNUM * 2], 2);
+      memcpy ((char*) valbuf + 1, buf, 2);
+      regcache_raw_read (regcache, HARD_X_REGNUM, buf);
+      memcpy (valbuf, buf + 1, 1);
       break;
-      
+
     case 4:
-      memcpy (&valbuf[0], &regbuf[HARD_X_REGNUM * 2], 2);
-      memcpy (&valbuf[2], &regbuf[HARD_D_REGNUM * 2], 2);
+      memcpy ((char*) valbuf + 2, buf, 2);
+      regcache_raw_read (regcache, HARD_X_REGNUM, buf);
+      memcpy (valbuf, buf, 2);
       break;
 
     default:
@@ -1163,26 +1369,12 @@ m68hc11_return_value_on_stack (struct type *type)
    the address in which a function should return its structure value,
    as a CORE_ADDR (or an expression that can be used as one).  */
 static CORE_ADDR
-m68hc11_extract_struct_value_address (char *regbuf)
+m68hc11_extract_struct_value_address (struct regcache *regcache)
 {
-  return extract_unsigned_integer (&regbuf[HARD_D_REGNUM * 2],
-                                  REGISTER_RAW_SIZE (HARD_D_REGNUM));
-}
-
-/* Function: push_return_address (pc)
-   Set up the return address for the inferior function call.
-   Needed for targets where we don't actually execute a JSR/BSR instruction */
+  char buf[M68HC11_REG_SIZE];
 
-static CORE_ADDR
-m68hc11_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
-  char valbuf[2];
-  
-  pc = CALL_DUMMY_ADDRESS ();
-  sp -= 2;
-  store_unsigned_integer (valbuf, 2, pc);
-  write_memory (sp + STACK_CORRECTION, valbuf, 2);
-  return sp;
+  regcache_cooked_read (regcache, HARD_D_REGNUM, buf);
+  return extract_unsigned_integer (buf, M68HC11_REG_SIZE);
 }
 
 /* Test whether the ELF symbol corresponds to a function using rtc or
@@ -1273,8 +1465,6 @@ static struct gdbarch *
 m68hc11_gdbarch_init (struct gdbarch_info info,
                       struct gdbarch_list *arches)
 {
-  static LONGEST m68hc11_call_dummy_words[] =
-  {0};
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
   int elf_flags;
@@ -1304,10 +1494,6 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
   gdbarch = gdbarch_alloc (&info, tdep);
   tdep->elf_flags = elf_flags;
 
-  /* NOTE: cagney/2002-12-06: This can be deleted when this arch is
-     ready to unwind the PC first (see frame.c:get_prev_frame()).  */
-  set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
-
   switch (info.bfd_arch_info->arch)
     {
     case bfd_arch_m68hc11:
@@ -1355,63 +1541,58 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
   /* Characters are unsigned.  */
   set_gdbarch_char_signed (gdbarch, 0);
 
+  set_gdbarch_unwind_pc (gdbarch, m68hc11_unwind_pc);
+  set_gdbarch_unwind_sp (gdbarch, m68hc11_unwind_sp);
+
   /* Set register info.  */
   set_gdbarch_fp0_regnum (gdbarch, -1);
-  set_gdbarch_deprecated_max_register_raw_size (gdbarch, 2);
-  set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 2);
-  set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, m68hc11_frame_init_saved_regs);
   set_gdbarch_frame_args_skip (gdbarch, 0);
 
   set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
-  set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
 
   set_gdbarch_sp_regnum (gdbarch, HARD_SP_REGNUM);
-  set_gdbarch_deprecated_fp_regnum (gdbarch, SOFT_FP_REGNUM);
   set_gdbarch_register_name (gdbarch, m68hc11_register_name);
-  set_gdbarch_deprecated_register_size (gdbarch, 2);
-  set_gdbarch_deprecated_register_bytes (gdbarch, M68HC11_ALL_REGS * 2);
-  set_gdbarch_deprecated_register_virtual_type (gdbarch, m68hc11_register_virtual_type);
+  set_gdbarch_register_type (gdbarch, m68hc11_register_type);
   set_gdbarch_pseudo_register_read (gdbarch, m68hc11_pseudo_register_read);
   set_gdbarch_pseudo_register_write (gdbarch, m68hc11_pseudo_register_write);
 
-  set_gdbarch_call_dummy_address (gdbarch, m68hc11_call_dummy_address);
-  set_gdbarch_deprecated_call_dummy_words (gdbarch, m68hc11_call_dummy_words);
-  set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (m68hc11_call_dummy_words));
-  set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
-  set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value);
-  set_gdbarch_deprecated_push_arguments (gdbarch, m68hc11_push_arguments);
-  set_gdbarch_deprecated_push_return_address (gdbarch, m68hc11_push_return_address);
-  set_gdbarch_return_value_on_stack (gdbarch, m68hc11_return_value_on_stack);
-
-  set_gdbarch_deprecated_store_struct_return (gdbarch, m68hc11_store_struct_return);
-  set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
-  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address);
+  set_gdbarch_push_dummy_call (gdbarch, m68hc11_push_dummy_call);
 
-  set_gdbarch_deprecated_frame_chain (gdbarch, m68hc11_frame_chain);
-  set_gdbarch_deprecated_frame_saved_pc (gdbarch, m68hc11_frame_saved_pc);
-  set_gdbarch_deprecated_frame_args_address (gdbarch, m68hc11_frame_args_address);
-  set_gdbarch_deprecated_saved_pc_after_call (gdbarch, m68hc11_saved_pc_after_call);
+  set_gdbarch_extract_return_value (gdbarch, m68hc11_extract_return_value);
+  set_gdbarch_return_value_on_stack (gdbarch, m68hc11_return_value_on_stack);
 
-  set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
+  set_gdbarch_store_return_value (gdbarch, m68hc11_store_return_value);
+  set_gdbarch_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address);
 
-  set_gdbarch_deprecated_store_struct_return (gdbarch, m68hc11_store_struct_return);
-  set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
-  set_gdbarch_deprecated_extract_struct_value_address
-    (gdbarch, m68hc11_extract_struct_value_address);
+  set_gdbarch_store_return_value (gdbarch, m68hc11_store_return_value);
+  set_gdbarch_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, m68hc11_use_struct_convention);
-  set_gdbarch_deprecated_init_extra_frame_info (gdbarch, m68hc11_init_extra_frame_info);
-  set_gdbarch_deprecated_pop_frame (gdbarch, m68hc11_pop_frame);
   set_gdbarch_skip_prologue (gdbarch, m68hc11_skip_prologue);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
   set_gdbarch_function_start_offset (gdbarch, 0);
   set_gdbarch_breakpoint_from_pc (gdbarch, m68hc11_breakpoint_from_pc);
   set_gdbarch_stack_align (gdbarch, m68hc11_stack_align);
-  set_gdbarch_deprecated_extra_stack_alignment_needed (gdbarch, 1);
   set_gdbarch_print_insn (gdbarch, gdb_print_insn_m68hc11);
 
   m68hc11_add_reggroups (gdbarch);
   set_gdbarch_register_reggroup_p (gdbarch, m68hc11_register_reggroup_p);
+  set_gdbarch_print_registers_info (gdbarch, m68hc11_print_registers_info);
+
+  /* Hook in the DWARF CFI frame unwinder.  */
+  frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
+  set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
+
+  frame_unwind_append_predicate (gdbarch, m68hc11_frame_p);
+  frame_base_set_default (gdbarch, &m68hc11_frame_base);
+  
+  /* Methods for saving / extracting a dummy frame's ID.  The ID's
+     stack address must match the SP value returned by
+     PUSH_DUMMY_CALL, and saved by generic_save_dummy_frame_tos.  */
+  set_gdbarch_unwind_dummy_id (gdbarch, m68hc11_unwind_dummy_id);
+
+  /* Return the unwound PC value.  */
+  set_gdbarch_unwind_pc (gdbarch, m68hc11_unwind_pc);
 
   /* Minsymbol frobbing.  */
   set_gdbarch_elf_make_msymbol_special (gdbarch,
@@ -1431,6 +1612,8 @@ _initialize_m68hc11_tdep (void)
   register_gdbarch_init (bfd_arch_m68hc12, m68hc11_gdbarch_init);
   m68hc11_init_reggroups ();
 
-  add_com ("regs", class_vars, show_regs, "Print all registers");
+  deprecate_cmd (add_com ("regs", class_vars, show_regs,
+                          "Print all registers"),
+                 "info registers");
 } 
 
index c8158c4261ccb6a6fed008f6c5465fbef38d8568..bbc14d3410e373276659d9d716ce88695caad817 100644 (file)
 
 #include "defs.h"
 #include "frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
 #include "symtab.h"
 #include "gdbcore.h"
 #include "value.h"
 #include "gdb_string.h"
+#include "gdb_assert.h"
 #include "inferior.h"
 #include "regcache.h"
 #include "arch-utils.h"
 #define P_LINKL_FP     0x480e
 #define P_LINKW_FP     0x4e56
 #define P_PEA_FP       0x4856
-#define P_MOVL_SP_FP   0x2c4f
-#define P_MOVL         0x207c
-#define P_JSR          0x4eb9
-#define P_BSR          0x61ff
-#define P_LEAL         0x43fb
-#define P_MOVML                0x48ef
-#define P_FMOVM                0xf237
-#define P_TRAP         0x4e40
+#define P_MOVEAL_SP_FP 0x2c4f
+#define P_ADDAW_SP     0xdefc
+#define P_ADDAL_SP     0xdffc
+#define P_SUBQW_SP     0x514f
+#define P_SUBQL_SP     0x518f
+#define P_LEA_SP_SP    0x4fef
+#define P_LEA_PC_A5    0x4bfb0170
+#define P_FMOVEMX_SP   0xf227
+#define P_MOVEL_SP     0x2f00
+#define P_MOVEML_SP    0x48e7
 
 
 #define REGISTER_BYTES_FP (16*4 + 8 + 8*12 + 3*4)
 #define REGISTER_BYTES_NOFP (16*4 + 8)
 
-#define NUM_FREGS (NUM_REGS-24)
-
 /* Offset from SP to first arg on stack at first instruction of a function */
-
 #define SP_ARG0 (1 * 4)
 
-/* This was determined by experimentation on hp300 BSD 4.3.  Perhaps
-   it corresponds to some offset in /usr/include/sys/user.h or
-   something like that.  Using some system include file would
-   have the advantage of probably being more robust in the face
-   of OS upgrades, but the disadvantage of being wrong for
-   cross-debugging.  */
-
-#define SIG_PC_FP_OFFSET 530
-
-#define TARGET_M68K
-
-
 #if !defined (BPT_VECTOR)
 #define BPT_VECTOR 0xf
 #endif
@@ -77,9 +67,6 @@
 #endif
 
 
-static void m68k_frame_init_saved_regs (struct frame_info *frame_info);
-
-
 /* gdbarch_breakpoint_from_pc is set to m68k_local_breakpoint_from_pc
    so m68k_remote_breakpoint_from_pc is currently not used.  */
 
@@ -107,26 +94,6 @@ m68k_register_bytes_ok (long numbytes)
          || (numbytes == REGISTER_BYTES_NOFP));
 }
 
-/* Number of bytes of storage in the actual machine representation
-   for register regnum.  On the 68000, all regs are 4 bytes
-   except the floating point regs which are 12 bytes.  */
-
-static int
-m68k_register_raw_size (int regnum)
-{
-  return (regnum >= FP0_REGNUM && regnum < FP0_REGNUM + 8 ? 12 : 4);
-}
-
-/* Number of bytes of storage in the program's representation
-   for register regnum.  On the 68000, all regs are 4 bytes
-   except the floating point regs which are 12-byte long doubles.  */
-
-static int
-m68k_register_virtual_size (int regnum)
-{
-  return (regnum >= FP0_REGNUM && regnum < FP0_REGNUM + 8 ? 12 : 4);
-}
-
 /* Return the GDB type object for the "standard" data type of data in
    register N.  This should be int for D0-D7, SR, FPCONTROL and
    FPSTATUS, long double for FP0-FP7, and void pointer for all others
@@ -136,7 +103,7 @@ m68k_register_virtual_size (int regnum)
    address.  */
 
 static struct type *
-m68k_register_virtual_type (int regnum)
+m68k_register_type (struct gdbarch *gdbarch, int regnum)
 {
   if (regnum >= FP0_REGNUM && regnum <= FP0_REGNUM + 7)
     return builtin_type_m68881_ext;
@@ -189,71 +156,93 @@ m68k_register_byte (int regnum)
   else
     return (regnum * 4);
 }
-
-/* Store the address of the place in which to copy the structure the
-   subroutine will return.  This is called from call_function. */
+\f
+/* Extract from an array REGBUF containing the (raw) register state, a
+   function return value of TYPE, and copy that, in virtual format,
+   into VALBUF.  */
 
 static void
-m68k_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+m68k_extract_return_value (struct type *type, struct regcache *regcache,
+                          void *valbuf)
 {
-  write_register (M68K_A1_REGNUM, addr);
+  int len = TYPE_LENGTH (type);
+  char buf[M68K_MAX_REGISTER_SIZE];
+
+  if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+      && TYPE_NFIELDS (type) == 1)
+    {
+      m68k_extract_return_value (TYPE_FIELD_TYPE (type, 0), regcache, valbuf);
+      return;
+    }
+
+  if (len <= 4)
+    {
+      regcache_raw_read (regcache, M68K_D0_REGNUM, buf);
+      memcpy (valbuf, buf + (4 - len), len);
+    }
+  else if (len <= 8)
+    {
+      regcache_raw_read (regcache, M68K_D0_REGNUM, buf);
+      memcpy (valbuf, buf + (8 - len), len - 4);
+      regcache_raw_read (regcache, M68K_D1_REGNUM,
+                        (char *) valbuf + (len - 4));
+    }
+  else
+    internal_error (__FILE__, __LINE__,
+                   "Cannot extract return value of %d bytes long.", len);
 }
 
-/* Extract from an array regbuf containing the (raw) register state
-   a function return value of type type, and copy that, in virtual format,
-   into valbuf.  This is assuming that floating point values are returned
-   as doubles in d0/d1.  */
+/* Write into the appropriate registers a function return value stored
+   in VALBUF of type TYPE, given in virtual format.  */
 
 static void
-m68k_deprecated_extract_return_value (struct type *type, char *regbuf,
-                                     char *valbuf)
+m68k_store_return_value (struct type *type, struct regcache *regcache,
+                        const void *valbuf)
 {
-  int offset = 0;
-  int typeLength = TYPE_LENGTH (type);
+  int len = TYPE_LENGTH (type);
 
-  if (typeLength < 4)
-    offset = 4 - typeLength;
+  if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+      && TYPE_NFIELDS (type) == 1)
+    {
+      m68k_store_return_value (TYPE_FIELD_TYPE (type, 0), regcache, valbuf);
+      return;
+    }
 
-  memcpy (valbuf, regbuf + offset, typeLength);
+  if (len <= 4)
+    regcache_raw_write_part (regcache, M68K_D0_REGNUM, 4 - len, len, valbuf);
+  else if (len <= 8)
+    {
+      regcache_raw_write_part (regcache, M68K_D1_REGNUM, 8 - len,
+                              len - 4, valbuf);
+      regcache_raw_write (regcache, M68K_D0_REGNUM,
+                         (char *) valbuf + (len - 4));
+    }
+  else
+    internal_error (__FILE__, __LINE__,
+                   "Cannot store return value of %d bytes long.", len);
 }
 
+/* Extract from REGCACHE, which contains the (raw) register state, the
+   address in which a function should return its structure value, as a
+   CORE_ADDR.  */
+
 static CORE_ADDR
-m68k_deprecated_extract_struct_value_address (char *regbuf)
+m68k_extract_struct_value_address (struct regcache *regcache)
 {
-  return (*(CORE_ADDR *) (regbuf));
-}
+  char buf[4];
 
-/* Write into appropriate registers a function return value
-   of type TYPE, given in virtual format.  Assumes floats are passed
-   in d0/d1.  */
-
-static void
-m68k_store_return_value (struct type *type, char *valbuf)
-{
-  deprecated_write_register_bytes (0, valbuf, TYPE_LENGTH (type));
+  regcache_cooked_read (regcache, M68K_D0_REGNUM, buf);
+  return extract_unsigned_integer (buf, 4);
 }
 
-/* Describe the pointer in each stack frame to the previous stack frame
-   (its caller).  */
-
-/* DEPRECATED_FRAME_CHAIN takes a frame's nominal address and produces
-   the frame's chain-pointer.  In the case of the 68000, the frame's
-   nominal address is the address of a 4-byte word containing the
-   calling frame's address.  */
-
-/* If we are chaining from sigtramp, then manufacture a sigtramp frame
-   (which isn't really on the stack.  I'm not sure this is right for anything
-   but BSD4.3 on an hp300.  */
-
-static CORE_ADDR
-m68k_frame_chain (struct frame_info *thisframe)
+static int
+m68k_use_struct_convention (int gcc_p, struct type *type)
 {
-  if (get_frame_type (thisframe) == SIGTRAMP_FRAME)
-    return get_frame_base (thisframe);
-  else if (!inside_entry_file (get_frame_pc (thisframe)))
-    return read_memory_unsigned_integer (get_frame_base (thisframe), 4);
-  else
-    return 0;
+  enum struct_return struct_return;
+
+  struct_return = gdbarch_tdep (current_gdbarch)->struct_return;
+  return generic_use_struct_convention (struct_return == reg_struct_return,
+                                       type);
 }
 
 /* A function that tells us whether the function invocation represented
@@ -269,23 +258,6 @@ m68k_frameless_function_invocation (struct frame_info *fi)
     return frameless_look_for_prologue (fi);
 }
 
-static CORE_ADDR
-m68k_frame_saved_pc (struct frame_info *frame)
-{
-  if (get_frame_type (frame) == SIGTRAMP_FRAME)
-    {
-      if (get_next_frame (frame))
-       return read_memory_unsigned_integer (get_frame_base (get_next_frame (frame))
-                                            + SIG_PC_FP_OFFSET, 4);
-      else
-       return read_memory_unsigned_integer (read_register (SP_REGNUM)
-                                            + SIG_PC_FP_OFFSET - 8, 4);
-    }
-  else
-    return read_memory_unsigned_integer (get_frame_base (frame) + 4, 4);
-}
-
-
 int
 delta68_in_sigtramp (CORE_ADDR pc, char *name)
 {
@@ -343,339 +315,588 @@ delta68_frame_num_args (struct frame_info *fi)
   return val;
 }
 
-/* Insert the specified number of args and function address
-   into a call sequence of the above form stored at DUMMYNAME.
-   We use the BFD routines to store a big-endian value of known size.  */
-
-static void
-m68k_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
-                    struct value **args, struct type *type, int gcc_p)
+static CORE_ADDR
+m68k_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+                     struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+                     struct value **args, CORE_ADDR sp, int struct_return,
+                     CORE_ADDR struct_addr)
 {
-  bfd_putb32 (fun, (unsigned char *) dummy + DEPRECATED_CALL_DUMMY_START_OFFSET + 2);
-  bfd_putb32 (nargs * 4,
-             (unsigned char *) dummy + DEPRECATED_CALL_DUMMY_START_OFFSET + 8);
+  char buf[4];
+  int i;
+
+  /* Push arguments in reverse order.  */
+  for (i = nargs - 1; i >= 0; i--)
+    {
+      struct type *value_type = VALUE_ENCLOSING_TYPE (args[i]);
+      int len = TYPE_LENGTH (value_type);
+      int container_len = (len + 3) & ~3;
+      int offset;
+
+      /* Non-scalars bigger than 4 bytes are left aligned, others are
+        right aligned.  */
+      if ((TYPE_CODE (value_type) == TYPE_CODE_STRUCT
+          || TYPE_CODE (value_type) == TYPE_CODE_UNION
+          || TYPE_CODE (value_type) == TYPE_CODE_ARRAY)
+         && len > 4)
+       offset = 0;
+      else
+       offset = container_len - len;
+      sp -= container_len;
+      write_memory (sp + offset, VALUE_CONTENTS_ALL (args[i]), len);
+    }
+
+  /* Store struct value address.  */
+  if (struct_return)
+    {
+      store_unsigned_integer (buf, 4, struct_addr);
+      regcache_cooked_write (regcache, M68K_A1_REGNUM, buf);
+    }
+
+  /* Store return address.  */
+  sp -= 4;
+  store_unsigned_integer (buf, 4, bp_addr);
+  write_memory (sp, buf, 4);
+
+  /* Finally, update the stack pointer...  */
+  store_unsigned_integer (buf, 4, sp);
+  regcache_cooked_write (regcache, M68K_SP_REGNUM, buf);
+
+  /* ...and fake a frame pointer.  */
+  regcache_cooked_write (regcache, M68K_FP_REGNUM, buf);
+
+  /* DWARF2/GCC uses the stack address *before* the function call as a
+     frame's CFA.  */
+  return sp + 8;
 }
+\f
+struct m68k_frame_cache
+{
+  /* Base address.  */
+  CORE_ADDR base;
+  CORE_ADDR sp_offset;
+  CORE_ADDR pc;
 
+  /* Saved registers.  */
+  CORE_ADDR saved_regs[M68K_NUM_REGS];
+  CORE_ADDR saved_sp;
 
-/* Push an empty stack frame, to record the current PC, etc.  */
+  /* Stack space reserved for local variables.  */
+  long locals;
+};
 
-static void
-m68k_push_dummy_frame (void)
+/* Allocate and initialize a frame cache.  */
+
+static struct m68k_frame_cache *
+m68k_alloc_frame_cache (void)
 {
-  register CORE_ADDR sp = read_register (SP_REGNUM);
-  register int regnum;
-  char raw_buffer[12];
+  struct m68k_frame_cache *cache;
+  int i;
 
-  sp = push_word (sp, read_register (PC_REGNUM));
-  sp = push_word (sp, read_register (DEPRECATED_FP_REGNUM));
-  write_register (DEPRECATED_FP_REGNUM, sp);
+  cache = FRAME_OBSTACK_ZALLOC (struct m68k_frame_cache);
 
-  /* Always save the floating-point registers, whether they exist on
-     this target or not.  */
-  for (regnum = FP0_REGNUM + 7; regnum >= FP0_REGNUM; regnum--)
-    {
-      deprecated_read_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 12);
-      sp = push_bytes (sp, raw_buffer, 12);
-    }
+  /* Base address.  */
+  cache->base = 0;
+  cache->sp_offset = -4;
+  cache->pc = 0;
 
-  for (regnum = DEPRECATED_FP_REGNUM - 1; regnum >= 0; regnum--)
-    {
-      sp = push_word (sp, read_register (regnum));
-    }
-  sp = push_word (sp, read_register (PS_REGNUM));
-  write_register (SP_REGNUM, sp);
+  /* Saved registers.  We initialize these to -1 since zero is a valid
+     offset (that's where %fp is supposed to be stored).  */
+  for (i = 0; i < M68K_NUM_REGS; i++)
+    cache->saved_regs[i] = -1;
+
+  /* Frameless until proven otherwise.  */
+  cache->locals = -1;
+
+  return cache;
 }
 
-/* Discard from the stack the innermost frame,
-   restoring all saved registers.  */
+/* Check whether PC points at a code that sets up a new stack frame.
+   If so, it updates CACHE and returns the address of the first
+   instruction after the sequence that sets removes the "hidden"
+   argument from the stack or CURRENT_PC, whichever is smaller.
+   Otherwise, return PC.  */
 
-static void
-m68k_pop_frame (void)
+static CORE_ADDR
+m68k_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR current_pc,
+                         struct m68k_frame_cache *cache)
 {
-  register struct frame_info *frame = get_current_frame ();
-  register CORE_ADDR fp;
-  register int regnum;
-  char raw_buffer[12];
+  int op;
+
+  if (pc >= current_pc)
+    return current_pc;
+
+  op = read_memory_unsigned_integer (pc, 2);
 
-  fp = get_frame_base (frame);
-  m68k_frame_init_saved_regs (frame);
-  for (regnum = FP0_REGNUM + 7; regnum >= FP0_REGNUM; regnum--)
+  if (op == P_LINKW_FP || op == P_LINKL_FP || op == P_PEA_FP)
     {
-      if (get_frame_saved_regs (frame)[regnum])
+      cache->saved_regs[M68K_FP_REGNUM] = 0;
+      cache->sp_offset += 4;
+      if (op == P_LINKW_FP)
        {
-         read_memory (get_frame_saved_regs (frame)[regnum], raw_buffer, 12);
-         deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer,
-                                          12);
+         /* link.w %fp, #-N */
+         /* link.w %fp, #0; adda.l #-N, %sp */
+         cache->locals = -read_memory_integer (pc + 2, 2);
+
+         if (pc + 4 < current_pc && cache->locals == 0)
+           {
+             op = read_memory_unsigned_integer (pc + 4, 2);
+             if (op == P_ADDAL_SP)
+               {
+                 cache->locals = read_memory_integer (pc + 6, 4);
+                 return pc + 10;
+               }
+           }
+
+         return pc + 4;
+       }
+      else if (op == P_LINKL_FP)
+       {
+         /* link.l %fp, #-N */
+         cache->locals = -read_memory_integer (pc + 2, 4);
+         return pc + 6;
+       }
+      else
+       {
+         /* pea (%fp); movea.l %sp, %fp */
+         cache->locals = 0;
+
+         if (pc + 2 < current_pc)
+           {
+             op = read_memory_unsigned_integer (pc + 2, 2);
+
+             if (op == P_MOVEAL_SP_FP)
+               {
+                 /* move.l %sp, %fp */
+                 return pc + 4;
+               }
+           }
+
+         return pc + 2;
        }
     }
-  for (regnum = DEPRECATED_FP_REGNUM - 1; regnum >= 0; regnum--)
+  else if ((op & 0170777) == P_SUBQW_SP || (op & 0170777) == P_SUBQL_SP)
     {
-      if (get_frame_saved_regs (frame)[regnum])
+      /* subq.[wl] #N,%sp */
+      /* subq.[wl] #8,%sp; subq.[wl] #N,%sp */
+      cache->locals = (op & 07000) == 0 ? 8 : (op & 07000) >> 9;
+      if (pc + 2 < current_pc)
        {
-         write_register (regnum,
-                         read_memory_integer (get_frame_saved_regs (frame)[regnum], 4));
+         op = read_memory_unsigned_integer (pc + 2, 2);
+         if ((op & 0170777) == P_SUBQW_SP || (op & 0170777) == P_SUBQL_SP)
+           {
+             cache->locals += (op & 07000) == 0 ? 8 : (op & 07000) >> 9;
+             return pc + 4;
+           }
        }
+      return pc + 2;
     }
-  if (get_frame_saved_regs (frame)[PS_REGNUM])
+  else if (op == P_ADDAW_SP || op == P_LEA_SP_SP)
     {
-      write_register (PS_REGNUM,
-                     read_memory_integer (get_frame_saved_regs (frame)[PS_REGNUM], 4));
+      /* adda.w #-N,%sp */
+      /* lea (-N,%sp),%sp */
+      cache->locals = -read_memory_integer (pc + 2, 2);
+      return pc + 4;
     }
-  write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp, 4));
-  write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
-  write_register (SP_REGNUM, fp + 8);
-  flush_cached_frames ();
+  else if (op == P_ADDAL_SP)
+    {
+      /* adda.l #-N,%sp */
+      cache->locals = -read_memory_integer (pc + 2, 4);
+      return pc + 6;
+    }
+
+  return pc;
 }
-\f
 
-/* Given an ip value corresponding to the start of a function,
-   return the ip of the first instruction after the function 
-   prologue.  This is the generic m68k support.  Machines which
-   require something different can override the SKIP_PROLOGUE
-   macro to point elsewhere.
+/* Check whether PC points at code that saves registers on the stack.
+   If so, it updates CACHE and returns the address of the first
+   instruction after the register saves or CURRENT_PC, whichever is
+   smaller.  Otherwise, return PC.  */
 
-   Some instructions which typically may appear in a function
-   prologue include:
+static CORE_ADDR
+m68k_analyze_register_saves (CORE_ADDR pc, CORE_ADDR current_pc,
+                            struct m68k_frame_cache *cache)
+{
+  if (cache->locals >= 0)
+    {
+      CORE_ADDR offset;
+      int op;
+      int i, mask, regno;
 
-   A link instruction, word form:
+      offset = -4 - cache->locals;
+      while (pc < current_pc)
+       {
+         op = read_memory_unsigned_integer (pc, 2);
+         if (op == P_FMOVEMX_SP)
+           {
+             /* fmovem.x REGS,-(%sp) */
+             op = read_memory_unsigned_integer (pc + 2, 2);
+             if ((op & 0xff00) == 0xe000)
+               {
+                 mask = op & 0xff;
+                 for (i = 0; i < 16; i++, mask >>= 1)
+                   {
+                     if (mask & 1)
+                       {
+                         cache->saved_regs[i + M68K_FP0_REGNUM] = offset;
+                         offset -= 12;
+                       }
+                   }
+                 pc += 4;
+               }
+             else
+               break;
+           }
+         else if ((op & 0170677) == P_MOVEL_SP)
+           {
+             /* move.l %R,-(%sp) */
+             regno = ((op & 07000) >> 9) | ((op & 0100) >> 3);
+             cache->saved_regs[regno] = offset;
+             offset -= 4;
+             pc += 2;
+           }
+         else if (op == P_MOVEML_SP)
+           {
+             /* movem.l REGS,-(%sp) */
+             mask = read_memory_unsigned_integer (pc + 2, 2);
+             for (i = 0; i < 16; i++, mask >>= 1)
+               {
+                 if (mask & 1)
+                   {
+                     cache->saved_regs[15 - i] = offset;
+                     offset -= 4;
+                   }
+               }
+             pc += 4;
+           }
+         else
+           break;
+       }
+    }
 
-   link.w       %a6,&0                  4e56  XXXX
+  return pc;
+}
 
-   A link instruction, long form:
 
-   link.l  %fp,&F%1             480e  XXXX  XXXX
+/* Do a full analysis of the prologue at PC and update CACHE
+   accordingly.  Bail out early if CURRENT_PC is reached.  Return the
+   address where the analysis stopped.
 
-   A movm instruction to preserve integer regs:
+   We handle all cases that can be generated by gcc.
 
-   movm.l  &M%1,(4,%sp)         48ef  XXXX  XXXX
+   For allocating a stack frame:
 
-   A fmovm instruction to preserve float regs:
+   link.w %a6,#-N
+   link.l %a6,#-N
+   pea (%fp); move.l %sp,%fp
+   link.w %a6,#0; add.l #-N,%sp
+   subq.l #N,%sp
+   subq.w #N,%sp
+   subq.w #8,%sp; subq.w #N-8,%sp
+   add.w #-N,%sp
+   lea (-N,%sp),%sp
+   add.l #-N,%sp
 
-   fmovm   &FPM%1,(FPO%1,%sp)   f237  XXXX  XXXX  XXXX  XXXX
+   For saving registers:
 
-   Some profiling setup code (FIXME, not recognized yet):
+   fmovem.x REGS,-(%sp)
+   move.l R1,-(%sp)
+   move.l R1,-(%sp); move.l R2,-(%sp)
+   movem.l REGS,-(%sp)
 
-   lea.l   (.L3,%pc),%a1                43fb  XXXX  XXXX  XXXX
-   bsr     _mcount                      61ff  XXXX  XXXX
+   For setting up the PIC register:
 
- */
+   lea (%pc,N),%a5
+
+   */
 
 static CORE_ADDR
-m68k_skip_prologue (CORE_ADDR ip)
+m68k_analyze_prologue (CORE_ADDR pc, CORE_ADDR current_pc,
+                      struct m68k_frame_cache *cache)
 {
-  register CORE_ADDR limit;
-  struct symtab_and_line sal;
-  register int op;
-
-  /* Find out if there is a known limit for the extent of the prologue.
-     If so, ensure we don't go past it.  If not, assume "infinity". */
+  unsigned int op;
 
-  sal = find_pc_line (ip, 0);
-  limit = (sal.end) ? sal.end : (CORE_ADDR) ~0;
+  pc = m68k_analyze_frame_setup (pc, current_pc, cache);
+  pc = m68k_analyze_register_saves (pc, current_pc, cache);
+  if (pc >= current_pc)
+    return current_pc;
 
-  while (ip < limit)
+  /* Check for GOT setup.  */
+  op = read_memory_unsigned_integer (pc, 4);
+  if (op == P_LEA_PC_A5)
     {
-      op = read_memory_unsigned_integer (ip, 2);
-
-      if (op == P_LINKW_FP)
-       ip += 4;                /* Skip link.w */
-      else if (op == P_PEA_FP)
-       ip += 2;                /* Skip pea %fp */
-      else if (op == P_MOVL_SP_FP)
-       ip += 2;                /* Skip move.l %sp, %fp */
-      else if (op == P_LINKL_FP)
-       ip += 6;                /* Skip link.l */
-      else if (op == P_MOVML)
-       ip += 6;                /* Skip movm.l */
-      else if (op == P_FMOVM)
-       ip += 10;               /* Skip fmovm */
-      else
-       break;                  /* Found unknown code, bail out. */
+      /* lea (%pc,N),%a5 */
+      return pc + 6;
     }
-  return (ip);
+
+  return pc;
 }
 
-/* Store the addresses of the saved registers of the frame described by 
-   FRAME_INFO in its saved_regs field.
-   This includes special registers such as pc and fp saved in special
-   ways in the stack frame.  sp is even more special:
-   the address we return for it IS the sp for the next frame.  */
+/* Return PC of first real instruction.  */
 
-static void
-m68k_frame_init_saved_regs (struct frame_info *frame_info)
+static CORE_ADDR
+m68k_skip_prologue (CORE_ADDR start_pc)
+{
+  struct m68k_frame_cache cache;
+  CORE_ADDR pc;
+  int op;
+
+  cache.locals = -1;
+  pc = m68k_analyze_prologue (start_pc, (CORE_ADDR) -1, &cache);
+  if (cache.locals < 0)
+    return start_pc;
+  return pc;
+}
+
+static CORE_ADDR
+m68k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
 {
-  register int regnum;
-  register int regmask;
-  register CORE_ADDR next_addr;
-  register CORE_ADDR pc;
+  char buf[8];
 
-  /* First possible address for a pc in a call dummy for this frame.  */
-  CORE_ADDR possible_call_dummy_start =
-    get_frame_base (frame_info) - 28 - DEPRECATED_FP_REGNUM * 4 - 4 - 8 * 12;
+  frame_unwind_register (next_frame, PC_REGNUM, buf);
+  return extract_typed_address (buf, builtin_type_void_func_ptr);
+}
+\f
+/* Normal frames.  */
 
-  int nextinsn;
+static struct m68k_frame_cache *
+m68k_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+  struct m68k_frame_cache *cache;
+  char buf[4];
+  int i;
+
+  if (*this_cache)
+    return *this_cache;
+
+  cache = m68k_alloc_frame_cache ();
+  *this_cache = cache;
+
+  /* In principle, for normal frames, %fp holds the frame pointer,
+     which holds the base address for the current stack frame.
+     However, for functions that don't need it, the frame pointer is
+     optional.  For these "frameless" functions the frame pointer is
+     actually the frame pointer of the calling frame.  Signal
+     trampolines are just a special case of a "frameless" function.
+     They (usually) share their frame pointer with the frame that was
+     in progress when the signal occurred.  */
+
+  frame_unwind_register (next_frame, M68K_FP_REGNUM, buf);
+  cache->base = extract_unsigned_integer (buf, 4);
+  if (cache->base == 0)
+    return cache;
+
+  /* For normal frames, %pc is stored at 4(%fp).  */
+  cache->saved_regs[M68K_PC_REGNUM] = 4;
+
+  cache->pc = frame_func_unwind (next_frame);
+  if (cache->pc != 0)
+    m68k_analyze_prologue (cache->pc, frame_pc_unwind (next_frame), cache);
+
+  if (cache->locals < 0)
+    {
+      /* We didn't find a valid frame, which means that CACHE->base
+        currently holds the frame pointer for our calling frame.  If
+        we're at the start of a function, or somewhere half-way its
+        prologue, the function's frame probably hasn't been fully
+        setup yet.  Try to reconstruct the base address for the stack
+        frame by looking at the stack pointer.  For truly "frameless"
+        functions this might work too.  */
+
+      frame_unwind_register (next_frame, M68K_SP_REGNUM, buf);
+      cache->base = extract_unsigned_integer (buf, 4) + cache->sp_offset;
+    }
 
-  if (get_frame_saved_regs (frame_info))
-    return;
+  /* Now that we have the base address for the stack frame we can
+     calculate the value of %sp in the calling frame.  */
+  cache->saved_sp = cache->base + 8;
 
-  frame_saved_regs_zalloc (frame_info);
+  /* Adjust all the saved registers such that they contain addresses
+     instead of offsets.  */
+  for (i = 0; i < M68K_NUM_REGS; i++)
+    if (cache->saved_regs[i] != -1)
+      cache->saved_regs[i] += cache->base;
 
-  memset (get_frame_saved_regs (frame_info), 0, SIZEOF_FRAME_SAVED_REGS);
+  return cache;
+}
 
-  if (get_frame_pc (frame_info) >= possible_call_dummy_start
-      && get_frame_pc (frame_info) <= get_frame_base (frame_info))
-    {
+static void
+m68k_frame_this_id (struct frame_info *next_frame, void **this_cache,
+                   struct frame_id *this_id)
+{
+  struct m68k_frame_cache *cache = m68k_frame_cache (next_frame, this_cache);
 
-      /* It is a call dummy.  We could just stop now, since we know
-         what the call dummy saves and where.  But this code proceeds
-         to parse the "prologue" which is part of the call dummy.
-         This is needlessly complex and confusing.  FIXME.  */
+  /* This marks the outermost frame.  */
+  if (cache->base == 0)
+    return;
 
-      next_addr = get_frame_base (frame_info);
-      pc = possible_call_dummy_start;
-    }
-  else
-    {
-      pc = get_frame_func (frame_info);
+  /* See the end of m68k_push_dummy_call.  */
+  *this_id = frame_id_build (cache->base + 8, cache->pc);
+}
 
-      nextinsn = read_memory_unsigned_integer (pc, 2);
-      if (P_PEA_FP == nextinsn
-         && P_MOVL_SP_FP == read_memory_unsigned_integer (pc + 2, 2))
-       {
-         /* pea %fp
-            move.l %sp, %fp */
-         next_addr = get_frame_base (frame_info);
-         pc += 4;
-       }
-      else if (P_LINKL_FP == nextinsn)
-       /* link.l %fp */
-       /* Find the address above the saved   
-          regs using the amount of storage from the link instruction.  */
-       {
-         next_addr = get_frame_base (frame_info) + read_memory_integer (pc + 2, 4);
-         pc += 6;
-       }
-      else if (P_LINKW_FP == nextinsn)
-       /* link.w %fp */
-       /* Find the address above the saved   
-          regs using the amount of storage from the link instruction.  */
-       {
-         next_addr = get_frame_base (frame_info) + read_memory_integer (pc + 2, 2);
-         pc += 4;
-       }
-      else
-       goto lose;
+static void
+m68k_frame_prev_register (struct frame_info *next_frame, void **this_cache,
+                         int regnum, int *optimizedp,
+                         enum lval_type *lvalp, CORE_ADDR *addrp,
+                         int *realnump, void *valuep)
+{
+  struct m68k_frame_cache *cache = m68k_frame_cache (next_frame, this_cache);
 
-      /* If have an addal #-n, sp next, adjust next_addr.  */
-      if (read_memory_unsigned_integer (pc, 2) == 0157774)
-       next_addr += read_memory_integer (pc += 2, 4), pc += 4;
-    }
+  gdb_assert (regnum >= 0);
 
-  for (;;)
+  if (regnum == M68K_SP_REGNUM && cache->saved_sp)
     {
-      nextinsn = read_memory_unsigned_integer (pc, 2);
-      regmask = read_memory_unsigned_integer (pc + 2, 2);
-      /* fmovemx to -(sp) */
-      if (0xf227 == nextinsn && (regmask & 0xff00) == 0xe000)
+      *optimizedp = 0;
+      *lvalp = not_lval;
+      *addrp = 0;
+      *realnump = -1;
+      if (valuep)
        {
-         /* Regmask's low bit is for register fp7, the first pushed */
-         for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
-           if (regmask & 1)
-             get_frame_saved_regs (frame_info)[regnum] = (next_addr -= 12);
-         pc += 4;
+         /* Store the value.  */
+         store_unsigned_integer (valuep, 4, cache->saved_sp);
        }
-      /* fmovemx to (fp + displacement) */
-      else if (0171056 == nextinsn && (regmask & 0xff00) == 0xf000)
-       {
-         register CORE_ADDR addr;
-
-         addr = get_frame_base (frame_info) + read_memory_integer (pc + 4, 2);
-         /* Regmask's low bit is for register fp7, the first pushed */
-         for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
-           if (regmask & 1)
-             {
-               get_frame_saved_regs (frame_info)[regnum] = addr;
-               addr += 12;
-             }
-         pc += 6;
-       }
-      /* moveml to (sp) */
-      else if (0044327 == nextinsn)
-       {
-         /* Regmask's low bit is for register 0, the first written */
-         for (regnum = 0; regnum < 16; regnum++, regmask >>= 1)
-           if (regmask & 1)
-             {
-               get_frame_saved_regs (frame_info)[regnum] = next_addr;
-               next_addr += 4;
-             }
-         pc += 4;
-       }
-      /* moveml to (fp + displacement) */
-      else if (0044356 == nextinsn)
-       {
-         register CORE_ADDR addr;
-
-         addr = get_frame_base (frame_info) + read_memory_integer (pc + 4, 2);
-         /* Regmask's low bit is for register 0, the first written */
-         for (regnum = 0; regnum < 16; regnum++, regmask >>= 1)
-           if (regmask & 1)
-             {
-               get_frame_saved_regs (frame_info)[regnum] = addr;
-               addr += 4;
-             }
-         pc += 6;
-       }
-      /* moveml to -(sp) */
-      else if (0044347 == nextinsn)
-       {
-         /* Regmask's low bit is for register 15, the first pushed */
-         for (regnum = 16; --regnum >= 0; regmask >>= 1)
-           if (regmask & 1)
-             get_frame_saved_regs (frame_info)[regnum] = (next_addr -= 4);
-         pc += 4;
-       }
-      /* movl r,-(sp) */
-      else if (0x2f00 == (0xfff0 & nextinsn))
-       {
-         regnum = 0xf & nextinsn;
-         get_frame_saved_regs (frame_info)[regnum] = (next_addr -= 4);
-         pc += 2;
-       }
-      /* fmovemx to index of sp */
-      else if (0xf236 == nextinsn && (regmask & 0xff00) == 0xf000)
-       {
-         /* Regmask's low bit is for register fp0, the first written */
-         for (regnum = FP0_REGNUM + 8; --regnum >= FP0_REGNUM; regmask >>= 1)
-           if (regmask & 1)
-             {
-               get_frame_saved_regs (frame_info)[regnum] = next_addr;
-               next_addr += 12;
-             }
-         pc += 10;
-       }
-      /* clrw -(sp); movw ccr,-(sp) */
-      else if (0x4267 == nextinsn && 0x42e7 == regmask)
+      return;
+    }
+
+  if (regnum < M68K_NUM_REGS && cache->saved_regs[regnum] != -1)
+    {
+      *optimizedp = 0;
+      *lvalp = lval_memory;
+      *addrp = cache->saved_regs[regnum];
+      *realnump = -1;
+      if (valuep)
        {
-         get_frame_saved_regs (frame_info)[PS_REGNUM] = (next_addr -= 4);
-         pc += 4;
+         /* Read the value in from memory.  */
+         read_memory (*addrp, valuep,
+                      register_size (current_gdbarch, regnum));
        }
-      else
-       break;
+      return;
     }
-lose:;
-  get_frame_saved_regs (frame_info)[SP_REGNUM] = get_frame_base (frame_info) + 8;
-  get_frame_saved_regs (frame_info)[DEPRECATED_FP_REGNUM] = get_frame_base (frame_info);
-  get_frame_saved_regs (frame_info)[PC_REGNUM] = get_frame_base (frame_info) + 4;
-#ifdef SIG_SP_FP_OFFSET
-  /* Adjust saved SP_REGNUM for fake _sigtramp frames.  */
-  if ((get_frame_type (frame_info) == SIGTRAMP_FRAME) && frame_info->next)
-    frame_info->saved_regs[SP_REGNUM] =
-      frame_info->next->frame + SIG_SP_FP_OFFSET;
-#endif
+
+  frame_register_unwind (next_frame, regnum,
+                        optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind m68k_frame_unwind =
+{
+  NORMAL_FRAME,
+  m68k_frame_this_id,
+  m68k_frame_prev_register
+};
+
+static const struct frame_unwind *
+m68k_frame_sniffer (struct frame_info *next_frame)
+{
+  return &m68k_frame_unwind;
 }
+\f
+/* Signal trampolines.  */
+
+static struct m68k_frame_cache *
+m68k_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+  struct m68k_frame_cache *cache;
+  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+  struct m68k_sigtramp_info info;
+  char buf[4];
+  int i;
+
+  if (*this_cache)
+    return *this_cache;
+
+  cache = m68k_alloc_frame_cache ();
+
+  frame_unwind_register (next_frame, M68K_SP_REGNUM, buf);
+  cache->base = extract_unsigned_integer (buf, 4) - 4;
 
+  info = tdep->get_sigtramp_info (next_frame);
 
+  for (i = 0; i < M68K_NUM_REGS; i++)
+    if (info.sc_reg_offset[i] != -1)
+      cache->saved_regs[i] = info.sigcontext_addr + info.sc_reg_offset[i];
+
+  *this_cache = cache;
+  return cache;
+}
+
+static void
+m68k_sigtramp_frame_this_id (struct frame_info *next_frame, void **this_cache,
+                            struct frame_id *this_id)
+{
+  struct m68k_frame_cache *cache =
+    m68k_sigtramp_frame_cache (next_frame, this_cache);
+
+  /* See the end of m68k_push_dummy_call.  */
+  *this_id = frame_id_build (cache->base + 8, frame_pc_unwind (next_frame));
+}
+
+static void
+m68k_sigtramp_frame_prev_register (struct frame_info *next_frame,
+                                  void **this_cache,
+                                  int regnum, int *optimizedp,
+                                  enum lval_type *lvalp, CORE_ADDR *addrp,
+                                  int *realnump, void *valuep)
+{
+  /* Make sure we've initialized the cache.  */
+  m68k_sigtramp_frame_cache (next_frame, this_cache);
+
+  m68k_frame_prev_register (next_frame, this_cache, regnum,
+                           optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind m68k_sigtramp_frame_unwind =
+{
+  SIGTRAMP_FRAME,
+  m68k_sigtramp_frame_this_id,
+  m68k_sigtramp_frame_prev_register
+};
+
+static const struct frame_unwind *
+m68k_sigtramp_frame_sniffer (struct frame_info *next_frame)
+{
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
+  char *name;
+
+  /* We shouldn't even bother to try if the OSABI didn't register
+     a get_sigtramp_info handler.  */
+  if (!gdbarch_tdep (current_gdbarch)->get_sigtramp_info)
+    return NULL;
+
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  if (PC_IN_SIGTRAMP (pc, name))
+    return &m68k_sigtramp_frame_unwind;
+
+  return NULL;
+}
+\f
+static CORE_ADDR
+m68k_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+  struct m68k_frame_cache *cache = m68k_frame_cache (next_frame, this_cache);
+
+  return cache->base;
+}
+
+static const struct frame_base m68k_frame_base =
+{
+  &m68k_frame_unwind,
+  m68k_frame_base_address,
+  m68k_frame_base_address,
+  m68k_frame_base_address
+};
+
+static struct frame_id
+m68k_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+  char buf[4];
+  CORE_ADDR fp;
+
+  frame_unwind_register (next_frame, M68K_FP_REGNUM, buf);
+  fp = extract_unsigned_integer (buf, 4);
+
+  /* See the end of m68k_push_dummy_call.  */
+  return frame_id_build (fp + 8, frame_pc_unwind (next_frame));
+}
+\f
 #ifdef USE_PROC_FS             /* Target dependent support for /proc */
 
 #include <sys/procfs.h>
@@ -745,19 +966,13 @@ fill_gregset (gregset_t *gregsetp, int regno)
 
   for (regi = 0; regi < R_PC; regi++)
     {
-      if ((regno == -1) || (regno == regi))
-       {
-         *(regp + regi) = *(int *) &deprecated_registers[REGISTER_BYTE (regi)];
-       }
-    }
-  if ((regno == -1) || (regno == PS_REGNUM))
-    {
-      *(regp + R_PS) = *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
-    }
-  if ((regno == -1) || (regno == PC_REGNUM))
-    {
-      *(regp + R_PC) = *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
+      if (regno == -1 || regno == regi)
+       regcache_collect (regi, regp + regi);
     }
+  if (regno == -1 || regno == PS_REGNUM)
+    regcache_collect (PS_REGNUM, regp + R_PS);
+  if (regno == -1 || regno == PC_REGNUM)
+    regcache_collect (PC_REGNUM, regp + R_PC);
 }
 
 #if defined (FP0_REGNUM)
@@ -791,30 +1006,18 @@ void
 fill_fpregset (fpregset_t *fpregsetp, int regno)
 {
   int regi;
-  char *to;
-  char *from;
 
   for (regi = FP0_REGNUM; regi < M68K_FPC_REGNUM; regi++)
     {
-      if ((regno == -1) || (regno == regi))
-       {
-         from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
-         to = (char *) &(fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
-         memcpy (to, from, REGISTER_RAW_SIZE (regi));
-       }
-    }
-  if ((regno == -1) || (regno == M68K_FPC_REGNUM))
-    {
-      fpregsetp->f_pcr = *(int *) &deprecated_registers[REGISTER_BYTE (M68K_FPC_REGNUM)];
-    }
-  if ((regno == -1) || (regno == M68K_FPS_REGNUM))
-    {
-      fpregsetp->f_psr = *(int *) &deprecated_registers[REGISTER_BYTE (M68K_FPS_REGNUM)];
-    }
-  if ((regno == -1) || (regno == M68K_FPI_REGNUM))
-    {
-      fpregsetp->f_fpiaddr = *(int *) &deprecated_registers[REGISTER_BYTE (M68K_FPI_REGNUM)];
+      if (regno == -1 || regno == regi)
+       regcache_collect (regi, &fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
     }
+  if (regno == -1 || regno == M68K_FPC_REGNUM)
+    regcache_collect (M68K_FPC_REGNUM, &fpregsetp->f_pcr);
+  if (regno == -1 || regno == M68K_FPS_REGNUM)
+    regcache_collect (M68K_FPS_REGNUM, &fpregsetp->f_psr);
+  if (regno == -1 || regno == M68K_FPI_REGNUM)
+    regcache_collect (M68K_FPI_REGNUM, &fpregsetp->f_fpiaddr);
 }
 
 #endif /* defined (FP0_REGNUM) */
@@ -857,6 +1060,7 @@ m68k_get_longjmp_target (CORE_ADDR *pc)
   return 1;
 }
 
+#ifdef SYSCALL_TRAP
 /* Immediately after a function call, return the saved pc before the frame
    is setup.  For sun3's, we check for the common case of being inside of a
    system call, and if so, we know that Sun pushes the call # on the stack
@@ -865,7 +1069,6 @@ m68k_get_longjmp_target (CORE_ADDR *pc)
 static CORE_ADDR
 m68k_saved_pc_after_call (struct frame_info *frame)
 {
-#ifdef SYSCALL_TRAP
   int op;
 
   op = read_memory_unsigned_integer (frame->pc - SYSCALL_TRAP_OFFSET, 2);
@@ -873,9 +1076,9 @@ m68k_saved_pc_after_call (struct frame_info *frame)
   if (op == SYSCALL_TRAP)
     return read_memory_unsigned_integer (read_register (SP_REGNUM) + 4, 4);
   else
-#endif /* SYSCALL_TRAP */
     return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
 }
+#endif /* SYSCALL_TRAP */
 
 /* Function: m68k_gdbarch_init
    Initializer function for the m68k gdbarch vector.
@@ -884,10 +1087,6 @@ m68k_saved_pc_after_call (struct frame_info *frame)
 static struct gdbarch *
 m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
-  static LONGEST call_dummy_words[7] = { 0xf227e0ff, 0x48e7fffc, 0x426742e7,
-    0x4eb93232, 0x3232dffc, 0x69696969,
-    (0x4e404e71 | (BPT_VECTOR << 16))
-  };
   struct gdbarch_tdep *tdep = NULL;
   struct gdbarch *gdbarch;
 
@@ -899,17 +1098,15 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   tdep = xmalloc (sizeof (struct gdbarch_tdep));
   gdbarch = gdbarch_alloc (&info, tdep);
 
-  /* NOTE: cagney/2002-12-06: This can be deleted when this arch is
-     ready to unwind the PC first (see frame.c:get_prev_frame()).  */
-  set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
-
   set_gdbarch_long_double_format (gdbarch, &floatformat_m68881_ext);
   set_gdbarch_long_double_bit (gdbarch, 96);
 
   set_gdbarch_function_start_offset (gdbarch, 0);
 
   set_gdbarch_skip_prologue (gdbarch, m68k_skip_prologue);
+#ifdef SYSCALL_TRAP
   set_gdbarch_deprecated_saved_pc_after_call (gdbarch, m68k_saved_pc_after_call);
+#endif
   set_gdbarch_breakpoint_from_pc (gdbarch, m68k_local_breakpoint_from_pc);
 
   /* Stack grows down. */
@@ -919,50 +1116,26 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
   set_gdbarch_decr_pc_after_break (gdbarch, 2);
 
-  set_gdbarch_deprecated_store_struct_return (gdbarch, m68k_store_struct_return);
-  set_gdbarch_deprecated_extract_return_value (gdbarch,
-                                              m68k_deprecated_extract_return_value);
-  set_gdbarch_deprecated_store_return_value (gdbarch, m68k_store_return_value);
+  set_gdbarch_extract_return_value (gdbarch, m68k_extract_return_value);
+  set_gdbarch_store_return_value (gdbarch, m68k_store_return_value);
+  set_gdbarch_extract_struct_value_address (gdbarch,
+                                           m68k_extract_struct_value_address);
+  set_gdbarch_use_struct_convention (gdbarch, m68k_use_struct_convention);
 
-  set_gdbarch_deprecated_frame_chain (gdbarch, m68k_frame_chain);
-  set_gdbarch_deprecated_frame_saved_pc (gdbarch, m68k_frame_saved_pc);
-  set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, m68k_frame_init_saved_regs);
   set_gdbarch_frameless_function_invocation (gdbarch,
                                             m68k_frameless_function_invocation);
   set_gdbarch_frame_args_skip (gdbarch, 8);
 
-  set_gdbarch_deprecated_register_raw_size (gdbarch, m68k_register_raw_size);
-  set_gdbarch_deprecated_register_virtual_size (gdbarch, m68k_register_virtual_size);
-  set_gdbarch_deprecated_max_register_raw_size (gdbarch, 12);
-  set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 12);
-  set_gdbarch_deprecated_register_virtual_type (gdbarch, m68k_register_virtual_type);
+  set_gdbarch_register_type (gdbarch, m68k_register_type);
   set_gdbarch_register_name (gdbarch, m68k_register_name);
-  set_gdbarch_deprecated_register_size (gdbarch, 4);
-  set_gdbarch_deprecated_register_byte (gdbarch, m68k_register_byte);
   set_gdbarch_num_regs (gdbarch, 29);
   set_gdbarch_register_bytes_ok (gdbarch, m68k_register_bytes_ok);
-  set_gdbarch_deprecated_register_bytes (gdbarch, (16 * 4 + 8 + 8 * 12 + 3 * 4));
   set_gdbarch_sp_regnum (gdbarch, M68K_SP_REGNUM);
-  set_gdbarch_deprecated_fp_regnum (gdbarch, M68K_FP_REGNUM);
   set_gdbarch_pc_regnum (gdbarch, M68K_PC_REGNUM);
   set_gdbarch_ps_regnum (gdbarch, M68K_PS_REGNUM);
   set_gdbarch_fp0_regnum (gdbarch, M68K_FP0_REGNUM);
 
-  set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
-  set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
-  set_gdbarch_deprecated_call_dummy_breakpoint_offset (gdbarch, 24);
-  set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
-  set_gdbarch_deprecated_call_dummy_length (gdbarch, 28);
-  set_gdbarch_deprecated_call_dummy_start_offset (gdbarch, 12);
-
-  set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words);
-  set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_words));
-  set_gdbarch_deprecated_fix_call_dummy (gdbarch, m68k_fix_call_dummy);
-  set_gdbarch_deprecated_push_dummy_frame (gdbarch, m68k_push_dummy_frame);
-  set_gdbarch_deprecated_pop_frame (gdbarch, m68k_pop_frame);
-
-  /* Should be using push_dummy_call.  */
-  set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
+  set_gdbarch_push_dummy_call (gdbarch, m68k_push_dummy_call);
 
   /* Disassembler.  */
   set_gdbarch_print_insn (gdbarch, print_insn_m68k);
@@ -973,6 +1146,13 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 #else
   tdep->jb_pc = -1;
 #endif
+  tdep->get_sigtramp_info = NULL;
+  tdep->struct_return = pcc_struct_return;
+
+  /* Frame unwinder.  */
+  set_gdbarch_unwind_dummy_id (gdbarch, m68k_unwind_dummy_id);
+  set_gdbarch_unwind_pc (gdbarch, m68k_unwind_pc);
+  frame_base_set_default (gdbarch, &m68k_frame_base);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
@@ -983,6 +1163,9 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   if (tdep->jb_pc >= 0)
     set_gdbarch_get_longjmp_target (gdbarch, m68k_get_longjmp_target);
 
+  frame_unwind_append_sniffer (gdbarch, m68k_sigtramp_frame_sniffer);
+  frame_unwind_append_sniffer (gdbarch, m68k_frame_sniffer);
+
   return gdbarch;
 }
 
index 7c499a73ca949a9560b010fdaa77650d2dad55fd..702e4fc04d5bf2ea02b70ba4d815be1bd07c594b 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef M68K_TDEP_H
 #define M68K_TDEP_H
 
+struct frame_info;
+
 /* Register numbers of various important registers.
    Note that some of these values are "real" register numbers,
    and correspond to the general registers of the machine,
@@ -32,6 +34,7 @@
 enum
 {
   M68K_D0_REGNUM = 0,
+  M68K_D1_REGNUM = 1,
   M68K_A0_REGNUM = 8,
   M68K_A1_REGNUM = 9,
   M68K_FP_REGNUM = 14,         /* Contains address of executing stack frame */
@@ -44,6 +47,28 @@ enum
   M68K_FPI_REGNUM = 28
 };
 
+#define M68K_NUM_REGS (M68K_FPI_REGNUM + 1)
+
+/* Size of the largest register.  */
+#define M68K_MAX_REGISTER_SIZE 12
+
+struct m68k_sigtramp_info
+{
+  /* Address of sigcontext.  */
+  CORE_ADDR sigcontext_addr;
+
+  /* Offset of registers in `struct sigcontext'.  */
+  int *sc_reg_offset;
+};
+
+/* Convention for returning structures.  */
+
+enum struct_return
+{
+  pcc_struct_return,           /* Return "short" structures in memory.  */
+  reg_struct_return            /* Return "short" structures in registers.  */
+};
+
 /* Target-dependent structure in gdbarch.  */
 struct gdbarch_tdep
 {
@@ -52,6 +77,12 @@ struct gdbarch_tdep
   int jb_pc;
   /* The size of each entry in the jump buffer.  */
   size_t jb_elt_size;
+
+  /* Get info about sigtramp.  */
+  struct m68k_sigtramp_info (*get_sigtramp_info) (struct frame_info *);
+
+  /* Convention for returning structures.  */
+  enum struct_return struct_return;
 };
 
 #endif /* M68K_TDEP_H */
index e077deadc27c69038c76cd6ee1ef9cd1085581f3..cfe9dab59a1da240ccc0c2af038cc8a8834a86ef 100644 (file)
@@ -140,23 +140,25 @@ fetch_register (int regno)
 
   if (CANNOT_FETCH_REGISTER (regno))
     {
-      memset (buf, '\0', REGISTER_RAW_SIZE (regno));   /* Supply zeroes */
+      memset (buf, '\0', register_size (current_gdbarch, regno));      /* Supply zeroes */
       supply_register (regno, buf);
       return;
     }
 
   /* Overload thread id onto process id */
-  if ((tid = TIDGET (inferior_ptid)) == 0)
+  tid = TIDGET (inferior_ptid);
+  if (tid == 0)
     tid = PIDGET (inferior_ptid);      /* no thread id, just use process id */
 
   offset = U_REGS_OFFSET;
 
   regaddr = register_addr (regno, offset);
-  for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+  for (i = 0; i < register_size (current_gdbarch, regno);
+       i += sizeof (PTRACE_XFER_TYPE))
     {
       errno = 0;
-      *(PTRACE_XFER_TYPE *) & buf[i] = ptrace (PT_READ_U, tid,
-                                              (PTRACE_ARG3_TYPE) regaddr, 0);
+      *(PTRACE_XFER_TYPE *) &buf[i] = ptrace (PT_READ_U, tid,
+                                             (PTRACE_ARG3_TYPE) regaddr, 0);
       regaddr += sizeof (PTRACE_XFER_TYPE);
       if (errno != 0)
        {
@@ -207,7 +209,8 @@ store_register (int regno)
     }
 
   /* Overload thread id onto process id */
-  if ((tid = TIDGET (inferior_ptid)) == 0)
+  tid = TIDGET (inferior_ptid);
+  if (tid == 0)
     tid = PIDGET (inferior_ptid);      /* no thread id, just use process id */
 
   offset = U_REGS_OFFSET;
@@ -218,7 +221,8 @@ store_register (int regno)
   regcache_collect (regno, buf);
 
   /* Store the local buffer into the inferior a chunk at the time. */
-  for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+  for (i = 0; i < register_size (current_gdbarch, regno);
+       i += sizeof (PTRACE_XFER_TYPE))
     {
       errno = 0;
       ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) regaddr,
@@ -293,7 +297,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
   int i;
 
   for (i = 0; i < NUM_GREGS; i++)
-    if ((regno == -1 || regno == i))
+    if (regno == -1 || regno == i)
       regcache_collect (i, regp + regmap[i]);
 }
 
@@ -380,12 +384,12 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno)
   /* Fill in the floating-point registers.  */
   for (i = FP0_REGNUM; i < FP0_REGNUM + 8; i++)
     if (regno == -1 || regno == i)
-      regcache_collect (regno, FPREG_ADDR (fpregsetp, regno - FP0_REGNUM));
+      regcache_collect (i, FPREG_ADDR (fpregsetp, i - FP0_REGNUM));
 
   /* Fill in the floating-point control registers.  */
   for (i = M68K_FPC_REGNUM; i <= M68K_FPI_REGNUM; i++)
     if (regno == -1 || regno == i)
-      regcache_collect (regno, (char *) &fpregsetp->fpcntl[regno - M68K_FPC_REGNUM]);
+      regcache_collect (i, (char *) &fpregsetp->fpcntl[i - M68K_FPC_REGNUM]);
 }
 
 #ifdef HAVE_PTRACE_GETREGS
@@ -450,7 +454,8 @@ fetch_inferior_registers (int regno)
     }
 
   /* GNU/Linux LWP ID's are process ID's.  */
-  if ((tid = TIDGET (inferior_ptid)) == 0)
+  tid = TIDGET (inferior_ptid);
+  if (tid == 0)
     tid = PIDGET (inferior_ptid);              /* Not a threaded program.  */
 
   /* Use the PTRACE_GETFPXREGS request whenever possible, since it
@@ -505,7 +510,8 @@ store_inferior_registers (int regno)
     }
 
   /* GNU/Linux LWP ID's are process ID's.  */
-  if ((tid = TIDGET (inferior_ptid)) == 0)
+  tid = TIDGET (inferior_ptid);
+  if (tid == 0)
     tid = PIDGET (inferior_ptid);      /* Not a threaded program.  */
 
   /* Use the PTRACE_SETFPREGS requests whenever possible, since it
index 1fa9f74965039ad6247f0eabdaa727972c9955c1..b39eebe337bb3aaf8b2be7fb0d810f9f1f975815 100644 (file)
@@ -22,6 +22,8 @@
 
 #include "defs.h"
 #include "gdbcore.h"
+#include "doublest.h"
+#include "floatformat.h"
 #include "frame.h"
 #include "target.h"
 #include "gdb_string.h"
@@ -51,9 +53,9 @@
    /* moveq #82,d0; notb d0; trap #0 */                                        \
    || (insn1 == 0x70524600 && (insn2 >> 16) == 0x4e40))
 
-/* Return non-zero if PC points into the signal trampoline.  For the sake
-   of m68k_linux_frame_saved_pc we also distinguish between non-RT and RT
-   signal trampolines.  */
+/* Return non-zero if PC points into the signal trampoline.  For the
+   sake of m68k_linux_get_sigtramp_info we also distinguish between
+   non-RT and RT signal trampolines.  */
 
 static int
 m68k_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
@@ -87,100 +89,183 @@ m68k_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
   return 0;
 }
 
-/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>.  */
-#define SIGCONTEXT_PC_OFFSET 26
-
-/* Offset to saved PC in ucontext, from <asm/ucontext.h>.  */
-#define UCONTEXT_PC_OFFSET 88
-
-/* Get saved user PC for sigtramp from sigcontext or ucontext.  */
-
-static CORE_ADDR
-m68k_linux_sigtramp_saved_pc (struct frame_info *frame)
+/* From <asm/sigcontext.h>.  */
+static int m68k_linux_sigcontext_reg_offset[M68K_NUM_REGS] =
 {
-  CORE_ADDR sigcontext_addr;
-  char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
-  int ptrbytes = TARGET_PTR_BIT / TARGET_CHAR_BIT;
-  int sigcontext_offs = (2 * TARGET_INT_BIT) / TARGET_CHAR_BIT;
+  2 * 4,                       /* %d0 */
+  3 * 4,                       /* %d1 */
+  -1,                          /* %d2 */
+  -1,                          /* %d3 */
+  -1,                          /* %d4 */
+  -1,                          /* %d5 */
+  -1,                          /* %d6 */
+  -1,                          /* %d7 */
+  4 * 4,                       /* %a0 */
+  5 * 4,                       /* %a1 */
+  -1,                          /* %a2 */
+  -1,                          /* %a3 */
+  -1,                          /* %a4 */
+  -1,                          /* %a5 */
+  -1,                          /* %fp */
+  1 * 4,                       /* %sp */
+  5 * 4 + 2,                   /* %sr */
+  6 * 4 + 2,                   /* %pc */
+  8 * 4,                       /* %fp0 */
+  11 * 4,                      /* %fp1 */
+  -1,                          /* %fp2 */
+  -1,                          /* %fp3 */
+  -1,                          /* %fp4 */
+  -1,                          /* %fp5 */
+  -1,                          /* %fp6 */
+  -1,                          /* %fp7 */
+  14 * 4,                      /* %fpcr */
+  15 * 4,                      /* %fpsr */
+  16 * 4                       /* %fpiaddr */
+};
+
+/* From <asm/ucontext.h>.  */
+static int m68k_linux_ucontext_reg_offset[M68K_NUM_REGS] =
+{
+  6 * 4,                       /* %d0 */
+  7 * 4,                       /* %d1 */
+  8 * 4,                       /* %d2 */
+  9 * 4,                       /* %d3 */
+  10 * 4,                      /* %d4 */
+  11 * 4,                      /* %d5 */
+  12 * 4,                      /* %d6 */
+  13 * 4,                      /* %d7 */
+  14 * 4,                      /* %a0 */
+  15 * 4,                      /* %a1 */
+  16 * 4,                      /* %a2 */
+  17 * 4,                      /* %a3 */
+  18 * 4,                      /* %a4 */
+  19 * 4,                      /* %a5 */
+  20 * 4,                      /* %fp */
+  21 * 4,                      /* %sp */
+  23 * 4,                      /* %sr */
+  22 * 4,                      /* %pc */
+  27 * 4,                      /* %fp0 */
+  30 * 4,                      /* %fp1 */
+  33 * 4,                      /* %fp2 */
+  36 * 4,                      /* %fp3 */
+  39 * 4,                      /* %fp4 */
+  42 * 4,                      /* %fp5 */
+  45 * 4,                      /* %fp6 */
+  48 * 4,                      /* %fp7 */
+  24 * 4,                      /* %fpcr */
+  25 * 4,                      /* %fpsr */
+  26 * 4                       /* %fpiaddr */
+};
+
+
+/* Get info about saved registers in sigtramp.  */
+
+static struct m68k_sigtramp_info
+m68k_linux_get_sigtramp_info (struct frame_info *next_frame)
+{
+  CORE_ADDR sp;
+  char buf[4];
+  struct m68k_sigtramp_info info;
+
+  frame_unwind_register (next_frame, M68K_SP_REGNUM, buf);
+  sp = extract_unsigned_integer (buf, 4);
 
   /* Get sigcontext address, it is the third parameter on the stack.  */
-  if (get_next_frame (frame))
-    sigcontext_addr
-      = read_memory_unsigned_integer (get_frame_base (get_next_frame (frame))
-                                     + FRAME_ARGS_SKIP
-                                     + sigcontext_offs,
-                                     ptrbytes);
-  else
-    sigcontext_addr
-      = read_memory_unsigned_integer (read_register (SP_REGNUM)
-                                     + sigcontext_offs,
-                                     ptrbytes);
-
-  /* Don't cause a memory_error when accessing sigcontext in case the
-     stack layout has changed or the stack is corrupt.  */
-  if (m68k_linux_pc_in_sigtramp (get_frame_pc (frame), 0) == 2)
-    target_read_memory (sigcontext_addr + UCONTEXT_PC_OFFSET, buf, ptrbytes);
+  info.sigcontext_addr = read_memory_unsigned_integer (sp + 8, 4);
+
+  if (m68k_linux_pc_in_sigtramp (frame_pc_unwind (next_frame), 0) == 2)
+    info.sc_reg_offset = m68k_linux_ucontext_reg_offset;
   else
-    target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET, buf, ptrbytes);
-  return extract_unsigned_integer (buf, ptrbytes);
+    info.sc_reg_offset = m68k_linux_sigcontext_reg_offset;
+  return info;
 }
 
-/* Return the saved program counter for FRAME.  */
+/* Extract from an array REGBUF containing the (raw) register state, a
+   function return value of TYPE, and copy that, in virtual format,
+   into VALBUF.  */
 
-static CORE_ADDR
-m68k_linux_frame_saved_pc (struct frame_info *frame)
+static void
+m68k_linux_extract_return_value (struct type *type, struct regcache *regcache,
+                                void *valbuf)
 {
-  if (get_frame_type (frame) == SIGTRAMP_FRAME)
-    return m68k_linux_sigtramp_saved_pc (frame);
-
-  return read_memory_unsigned_integer (get_frame_base (frame) + 4, 4);
-}
+  int len = TYPE_LENGTH (type);
+  char buf[M68K_MAX_REGISTER_SIZE];
 
-/* The following definitions are appropriate when using the ELF
-   format, where floating point values are returned in fp0, pointer
-   values in a0 and other values in d0.  */
-
-/* Extract from an array REGBUF containing the (raw) register state a
-   function return value of type TYPE, and copy that, in virtual
-   format, into VALBUF.  */
+  if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+      && TYPE_NFIELDS (type) == 1)
+    {
+      m68k_linux_extract_return_value (TYPE_FIELD_TYPE (type, 0), regcache,
+                                      valbuf);
+      return;
+    }
 
-static void
-m68k_linux_extract_return_value (struct type *type, char *regbuf, char *valbuf)
-{
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
     {
-      DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, type,
-                                             regbuf + REGISTER_BYTE (FP0_REGNUM),
-                                             valbuf);
+      regcache_raw_read (regcache, M68K_FP0_REGNUM, buf);
+      convert_typed_floating (buf, builtin_type_m68881_ext, valbuf, type);
     }
   else if (TYPE_CODE (type) == TYPE_CODE_PTR)
-    memcpy (valbuf, regbuf + REGISTER_BYTE (M68K_A0_REGNUM),
-           TYPE_LENGTH (type));
+    regcache_raw_read (regcache, M68K_A0_REGNUM, valbuf);
   else
-    memcpy (valbuf,
-           regbuf + (TYPE_LENGTH (type) >= 4 ? 0 : 4 - TYPE_LENGTH (type)),
-           TYPE_LENGTH (type));
+    {
+      if (len <= 4)
+       {
+         regcache_raw_read (regcache, M68K_D0_REGNUM, buf);
+         memcpy (valbuf, buf + (4 - len), len);
+       }
+      else if (len <= 8)
+       {
+         regcache_raw_read (regcache, M68K_D0_REGNUM, buf);
+         memcpy (valbuf, buf + (8 - len), len - 4);
+         regcache_raw_read (regcache, M68K_D1_REGNUM,
+                            (char *) valbuf + (len - 4));
+       }
+      else
+       internal_error (__FILE__, __LINE__,
+                       "Cannot extract return value of %d bytes long.", len);
+    }
 }
 
-/* Write into appropriate registers a function return value of type
-   TYPE, given in virtual format.  */
+/* Write into the appropriate registers a function return value stored
+   in VALBUF of type TYPE, given in virtual format.  */
 
 static void
-m68k_linux_store_return_value (struct type *type, char *valbuf)
+m68k_linux_store_return_value (struct type *type, struct regcache *regcache,
+                              const void *valbuf)
 {
+  int len = TYPE_LENGTH (type);
+
+  if (TYPE_CODE (type) == TYPE_CODE_STRUCT
+      && TYPE_NFIELDS (type) == 1)
+    {
+      m68k_linux_store_return_value (TYPE_FIELD_TYPE (type, 0), regcache,
+                                    valbuf);
+      return;
+    }
+
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
     {
-      char raw_buffer[REGISTER_RAW_SIZE (FP0_REGNUM)];
-      DEPRECATED_REGISTER_CONVERT_TO_RAW (type, FP0_REGNUM, valbuf, raw_buffer);
-      deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
-                                      raw_buffer, TYPE_LENGTH (type));
+      char buf[M68K_MAX_REGISTER_SIZE];
+      convert_typed_floating (valbuf, type, buf, builtin_type_m68881_ext);
+      regcache_raw_write (regcache, M68K_FP0_REGNUM, buf);
     }
+  else if (TYPE_CODE (type) == TYPE_CODE_PTR)
+    regcache_raw_write (regcache, M68K_A0_REGNUM, valbuf);
   else
     {
-      if (TYPE_CODE (type) == TYPE_CODE_PTR)
-       deprecated_write_register_bytes (REGISTER_BYTE (M68K_A0_REGNUM),
-                                        valbuf, TYPE_LENGTH (type));
-      deprecated_write_register_bytes (0, valbuf, TYPE_LENGTH (type));
+      if (len <= 4)
+       regcache_raw_write_part (regcache, M68K_D0_REGNUM,
+                                4 - len, len, valbuf);
+      else if (len <= 8)
+       {
+         regcache_raw_write_part (regcache, M68K_D1_REGNUM, 8 - len,
+                                  len - 4, valbuf);
+         regcache_raw_write (regcache, M68K_D0_REGNUM,
+                             (char *) valbuf + (len - 4));
+       }
+      else
+       internal_error (__FILE__, __LINE__,
+                       "Cannot store return value of %d bytes long.", len);
     }
 }
 
@@ -189,9 +274,12 @@ m68k_linux_store_return_value (struct type *type, char *valbuf)
    as a CORE_ADDR.  */
 
 static CORE_ADDR
-m68k_linux_extract_struct_value_address (char *regbuf)
+m68k_linux_extract_struct_value_address (struct regcache *regcache)
 {
-  return *(CORE_ADDR *) (regbuf + REGISTER_BYTE (M68K_A0_REGNUM));
+  char buf[4];
+
+  regcache_cooked_read (regcache, M68K_A0_REGNUM, buf);
+  return extract_unsigned_integer (buf, 4);
 }
 
 static void
@@ -201,15 +289,13 @@ m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
   tdep->jb_pc = M68K_LINUX_JB_PC;
   tdep->jb_elt_size = M68K_LINUX_JB_ELEMENT_SIZE;
+  tdep->get_sigtramp_info = m68k_linux_get_sigtramp_info;
+  tdep->struct_return = reg_struct_return;
 
-  set_gdbarch_deprecated_frame_saved_pc (gdbarch,
-                                        m68k_linux_frame_saved_pc);
-  set_gdbarch_deprecated_extract_return_value (gdbarch,
-                                              m68k_linux_extract_return_value);
-  set_gdbarch_deprecated_store_return_value (gdbarch,
-                                            m68k_linux_store_return_value);
-  set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
-                                                      m68k_linux_extract_struct_value_address);
+  set_gdbarch_extract_return_value (gdbarch, m68k_linux_extract_return_value);
+  set_gdbarch_store_return_value (gdbarch, m68k_linux_store_return_value);
+  set_gdbarch_extract_struct_value_address (gdbarch,
+                                           m68k_linux_extract_struct_value_address);
 
   set_gdbarch_pc_in_sigtramp (gdbarch, m68k_linux_pc_in_sigtramp);
 
index 2902629a43ece2434dd26f7656807d2c667799b2..24c171490000469dad68c192a34e676cfb9aa582 100644 (file)
@@ -1,3 +1,23 @@
+2003-08-04  Andrew Cagney  <cagney@redhat.com>
+
+       * mi-cmds.h (struct mi_cli): Define.
+       (struct mi_cmd): Change type of "cli" to "struct mi_cli".
+       * mi-cmds.c (mi_cmds): Update table.
+       * mi-parse.c (mi_parse): Update.
+       * mi-main.c (mi_execute_cli_command): Add "args_p" parameter, make
+       others constant.
+       (mi_cmd_execute): Update call.
+       (captured_mi_execute_command): Ditto.
+
+2003-08-04  David Carlton  <carlton@kealia.com>
+
+       * mi-main.c (mi_error_last_message): Add "%s" second argument to
+       xasprintf call.
+
+2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       * mi-out.c (mi_ui_out_impl): Add NULL for redirect member.
+
 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
 
         * mi-cmds.c (mi_cmds): Add "-target-disconnect".
index 91824022278d979c07abdea36ea82f4b4d5c8a5d..0dfc2170ec96d41288d9345b9e8e5c9a8e73877a 100644 (file)
@@ -34,138 +34,138 @@ static void build_table (struct mi_cmd *commands);
 
 struct mi_cmd mi_cmds[] =
 {
-  {"break-after", "ignore %s", 0},
-  {"break-catch", 0, 0},
-  {"break-commands", 0, 0},
-  {"break-condition", "cond %s", 0},
-  {"break-delete", "delete breakpoint %s", 0},
-  {"break-disable", "disable breakpoint %s", 0},
-  {"break-enable", "enable breakpoint %s", 0},
-  {"break-info", "info break %s", 0},
-  {"break-insert", 0, 0, mi_cmd_break_insert},
-  {"break-list", "info break", 0},
-  {"break-watch", 0, 0, mi_cmd_break_watch},
-  {"data-disassemble", 0, 0, mi_cmd_disassemble},
-  {"data-evaluate-expression", 0, 0, mi_cmd_data_evaluate_expression},
-  {"data-list-changed-registers", 0, 0, mi_cmd_data_list_changed_registers},
-  {"data-list-register-names", 0, 0, mi_cmd_data_list_register_names},
-  {"data-list-register-values", 0, 0, mi_cmd_data_list_register_values},
-  {"data-read-memory", 0, 0, mi_cmd_data_read_memory},
-  {"data-write-memory", 0, 0, mi_cmd_data_write_memory},
-  {"data-write-register-values", 0, 0, mi_cmd_data_write_register_values},
-  {"display-delete", 0, 0},
-  {"display-disable", 0, 0},
-  {"display-enable", 0, 0},
-  {"display-insert", 0, 0},
-  {"display-list", 0, 0},
-  {"environment-cd", 0, 0, mi_cmd_env_cd},
-  {"environment-directory", 0, 0, mi_cmd_env_dir},
-  {"environment-path", 0, 0, mi_cmd_env_path},
-  {"environment-pwd", 0, 0, mi_cmd_env_pwd},
-  {"exec-abort", 0, 0},
-  {"exec-arguments", "set args %s", 0},
-  {"exec-continue", 0, mi_cmd_exec_continue},
-  {"exec-finish", 0, mi_cmd_exec_finish},
-  {"exec-interrupt", 0, mi_cmd_exec_interrupt},
-  {"exec-next", 0, mi_cmd_exec_next},
-  {"exec-next-instruction", 0, mi_cmd_exec_next_instruction},
-  {"exec-return", 0, mi_cmd_exec_return},
-  {"exec-run", 0, mi_cmd_exec_run},
-  {"exec-show-arguments", 0, 0},
-  {"exec-signal", 0, 0},
-  {"exec-step", 0, mi_cmd_exec_step},
-  {"exec-step-instruction", 0, mi_cmd_exec_step_instruction},
-  {"exec-until", 0, mi_cmd_exec_until},
-  {"file-clear", 0, 0},
-  {"file-exec-and-symbols", "file %s", 0},
-  {"file-exec-file", "exec-file %s", 0},
-  {"file-list-exec-sections", 0, 0},
-  {"file-list-exec-source-file", 0, 0, mi_cmd_file_list_exec_source_file},
-  {"file-list-exec-source-files", 0, 0},
-  {"file-list-shared-libraries", 0, 0},
-  {"file-list-symbol-files", 0, 0},
-  {"file-symbol-file", "symbol-file %s", 0},
-  {"gdb-complete", 0, 0},
-  {"gdb-exit", 0, 0, mi_cmd_gdb_exit},
-  {"gdb-set", "set %s", 0},
-  {"gdb-show", "show %s", 0},
-  {"gdb-source", 0, 0},
-  {"gdb-version", "show version", 0},
-  {"interpreter-exec", 0, 0, mi_cmd_interpreter_exec},
-  {"kod-info", 0, 0},
-  {"kod-list", 0, 0},
-  {"kod-list-object-types", 0, 0},
-  {"kod-show", 0, 0},
-  {"overlay-auto", 0, 0},
-  {"overlay-list-mapping-state", 0, 0},
-  {"overlay-list-overlays", 0, 0},
-  {"overlay-map", 0, 0},
-  {"overlay-off", 0, 0},
-  {"overlay-on", 0, 0},
-  {"overlay-unmap", 0, 0},
-  {"signal-handle", 0, 0},
-  {"signal-list-handle-actions", 0, 0},
-  {"signal-list-signal-types", 0, 0},
-  {"stack-info-depth", 0, 0, mi_cmd_stack_info_depth},
-  {"stack-info-frame", 0, 0},
-  {"stack-list-arguments", 0, 0, mi_cmd_stack_list_args},
-  {"stack-list-exception-handlers", 0, 0},
-  {"stack-list-frames", 0, 0, mi_cmd_stack_list_frames},
-  {"stack-list-locals", 0, 0, mi_cmd_stack_list_locals},
-  {"stack-select-frame", 0, 0, mi_cmd_stack_select_frame},
-  {"symbol-info-address", 0, 0},
-  {"symbol-info-file", 0, 0},
-  {"symbol-info-function", 0, 0},
-  {"symbol-info-line", 0, 0},
-  {"symbol-info-symbol", 0, 0},
-  {"symbol-list-functions", 0, 0},
-  {"symbol-list-lines", 0, 0, mi_cmd_symbol_list_lines},
-  {"symbol-list-types", 0, 0},
-  {"symbol-list-variables", 0, 0},
-  {"symbol-locate", 0, 0},
-  {"symbol-type", 0, 0},
-  {"target-attach", 0, 0},
-  {"target-compare-sections", 0, 0},
-  {"target-detach", "detach", 0},
-  {"target-disconnect", "disconnect", 0},
-  {"target-download", 0, mi_cmd_target_download},
-  {"target-exec-status", 0, 0},
-  {"target-list-available-targets", 0, 0},
-  {"target-list-current-targets", 0, 0},
-  {"target-list-parameters", 0, 0},
-  {"target-select", 0, mi_cmd_target_select},
-  {"thread-info", 0, 0},
-  {"thread-list-all-threads", 0, 0},
-  {"thread-list-ids", 0, 0, mi_cmd_thread_list_ids},
-  {"thread-select", 0, 0, mi_cmd_thread_select},
-  {"trace-actions", 0, 0},
-  {"trace-delete", 0, 0},
-  {"trace-disable", 0, 0},
-  {"trace-dump", 0, 0},
-  {"trace-enable", 0, 0},
-  {"trace-exists", 0, 0},
-  {"trace-find", 0, 0},
-  {"trace-frame-number", 0, 0},
-  {"trace-info", 0, 0},
-  {"trace-insert", 0, 0},
-  {"trace-list", 0, 0},
-  {"trace-pass-count", 0, 0},
-  {"trace-save", 0, 0},
-  {"trace-start", 0, 0},
-  {"trace-stop", 0, 0},
-  {"var-assign", 0, 0, mi_cmd_var_assign},
-  {"var-create", 0, 0, mi_cmd_var_create},
-  {"var-delete", 0, 0, mi_cmd_var_delete},
-  {"var-evaluate-expression", 0, 0, mi_cmd_var_evaluate_expression},
-  {"var-info-expression", 0, 0, mi_cmd_var_info_expression},
-  {"var-info-num-children", 0, 0, mi_cmd_var_info_num_children},
-  {"var-info-type", 0, 0, mi_cmd_var_info_type},
-  {"var-list-children", 0, 0, mi_cmd_var_list_children},
-  {"var-set-format", 0, 0, mi_cmd_var_set_format},
-  {"var-show-attributes", 0, 0, mi_cmd_var_show_attributes},
-  {"var-show-format", 0, 0, mi_cmd_var_show_format},
-  {"var-update", 0, 0, mi_cmd_var_update},
-  {0,}
+  { "break-after", { "ignore", 1 }, NULL, NULL },
+  { "break-catch", { NULL, 0 }, NULL, NULL },
+  { "break-commands", { NULL, 0 }, NULL, NULL },
+  { "break-condition", { "cond", 1 }, NULL, NULL },
+  { "break-delete", { "delete breakpoint", 1 }, NULL, NULL },
+  { "break-disable", { "disable breakpoint", 1 }, NULL, NULL },
+  { "break-enable", { "enable breakpoint", 1 }, NULL, NULL },
+  { "break-info", { "info break", 1 }, NULL, NULL },
+  { "break-insert", { NULL, 0 }, 0, mi_cmd_break_insert},
+  { "break-list", { "info break", }, NULL, NULL },
+  { "break-watch", { NULL, 0 }, 0, mi_cmd_break_watch},
+  { "data-disassemble", { NULL, 0 }, 0, mi_cmd_disassemble},
+  { "data-evaluate-expression", { NULL, 0 }, 0, mi_cmd_data_evaluate_expression},
+  { "data-list-changed-registers", { NULL, 0 }, 0, mi_cmd_data_list_changed_registers},
+  { "data-list-register-names", { NULL, 0 }, 0, mi_cmd_data_list_register_names},
+  { "data-list-register-values", { NULL, 0 }, 0, mi_cmd_data_list_register_values},
+  { "data-read-memory", { NULL, 0 }, 0, mi_cmd_data_read_memory},
+  { "data-write-memory", { NULL, 0 }, 0, mi_cmd_data_write_memory},
+  { "data-write-register-values", { NULL, 0 }, 0, mi_cmd_data_write_register_values},
+  { "display-delete", { NULL, 0 }, NULL, NULL },
+  { "display-disable", { NULL, 0 }, NULL, NULL },
+  { "display-enable", { NULL, 0 }, NULL, NULL },
+  { "display-insert", { NULL, 0 }, NULL, NULL },
+  { "display-list", { NULL, 0 }, NULL, NULL },
+  { "environment-cd", { NULL, 0 }, 0, mi_cmd_env_cd},
+  { "environment-directory", { NULL, 0 }, 0, mi_cmd_env_dir},
+  { "environment-path", { NULL, 0 }, 0, mi_cmd_env_path},
+  { "environment-pwd", { NULL, 0 }, 0, mi_cmd_env_pwd},
+  { "exec-abort", { NULL, 0 }, NULL, NULL },
+  { "exec-arguments", { "set args", 1 }, NULL, NULL },
+  { "exec-continue", { NULL, 0 }, mi_cmd_exec_continue},
+  { "exec-finish", { NULL, 0 }, mi_cmd_exec_finish},
+  { "exec-interrupt", { NULL, 0 }, mi_cmd_exec_interrupt},
+  { "exec-next", { NULL, 0 }, mi_cmd_exec_next},
+  { "exec-next-instruction", { NULL, 0 }, mi_cmd_exec_next_instruction},
+  { "exec-return", { NULL, 0 }, mi_cmd_exec_return},
+  { "exec-run", { NULL, 0 }, mi_cmd_exec_run},
+  { "exec-show-arguments", { NULL, 0 }, NULL, NULL },
+  { "exec-signal", { NULL, 0 }, NULL, NULL },
+  { "exec-step", { NULL, 0 }, mi_cmd_exec_step},
+  { "exec-step-instruction", { NULL, 0 }, mi_cmd_exec_step_instruction},
+  { "exec-until", { NULL, 0 }, mi_cmd_exec_until},
+  { "file-clear", { NULL, 0 }, NULL, NULL },
+  { "file-exec-and-symbols", { "file", 1 }, NULL, NULL },
+  { "file-exec-file", { "exec-file", 1 }, NULL, NULL },
+  { "file-list-exec-sections", { NULL, 0 }, NULL, NULL },
+  { "file-list-exec-source-file", { NULL, 0 }, 0, mi_cmd_file_list_exec_source_file},
+  { "file-list-exec-source-files", { NULL, 0 }, NULL, NULL },
+  { "file-list-shared-libraries", { NULL, 0 }, NULL, NULL },
+  { "file-list-symbol-files", { NULL, 0 }, NULL, NULL },
+  { "file-symbol-file", { "symbol-file", 1 }, NULL, NULL },
+  { "gdb-complete", { NULL, 0 }, NULL, NULL },
+  { "gdb-exit", { NULL, 0 }, 0, mi_cmd_gdb_exit},
+  { "gdb-set", { "set", 1 }, NULL, NULL },
+  { "gdb-show", { "show", 1 }, NULL, NULL },
+  { "gdb-source", { NULL, 0 }, NULL, NULL },
+  { "gdb-version", { "show version", 0 }, 0 },
+  { "interpreter-exec", { NULL, 0 }, 0, mi_cmd_interpreter_exec},
+  { "kod-info", { NULL, 0 }, NULL, NULL },
+  { "kod-list", { NULL, 0 }, NULL, NULL },
+  { "kod-list-object-types", { NULL, 0 }, NULL, NULL },
+  { "kod-show", { NULL, 0 }, NULL, NULL },
+  { "overlay-auto", { NULL, 0 }, NULL, NULL },
+  { "overlay-list-mapping-state", { NULL, 0 }, NULL, NULL },
+  { "overlay-list-overlays", { NULL, 0 }, NULL, NULL },
+  { "overlay-map", { NULL, 0 }, NULL, NULL },
+  { "overlay-off", { NULL, 0 }, NULL, NULL },
+  { "overlay-on", { NULL, 0 }, NULL, NULL },
+  { "overlay-unmap", { NULL, 0 }, NULL, NULL },
+  { "signal-handle", { NULL, 0 }, NULL, NULL },
+  { "signal-list-handle-actions", { NULL, 0 }, NULL, NULL },
+  { "signal-list-signal-types", { NULL, 0 }, NULL, NULL },
+  { "stack-info-depth", { NULL, 0 }, 0, mi_cmd_stack_info_depth},
+  { "stack-info-frame", { NULL, 0 }, NULL, NULL },
+  { "stack-list-arguments", { NULL, 0 }, 0, mi_cmd_stack_list_args},
+  { "stack-list-exception-handlers", { NULL, 0 }, NULL, NULL },
+  { "stack-list-frames", { NULL, 0 }, 0, mi_cmd_stack_list_frames},
+  { "stack-list-locals", { NULL, 0 }, 0, mi_cmd_stack_list_locals},
+  { "stack-select-frame", { NULL, 0 }, 0, mi_cmd_stack_select_frame},
+  { "symbol-info-address", { NULL, 0 }, NULL, NULL },
+  { "symbol-info-file", { NULL, 0 }, NULL, NULL },
+  { "symbol-info-function", { NULL, 0 }, NULL, NULL },
+  { "symbol-info-line", { NULL, 0 }, NULL, NULL },
+  { "symbol-info-symbol", { NULL, 0 }, NULL, NULL },
+  { "symbol-list-functions", { NULL, 0 }, NULL, NULL },
+  { "symbol-list-lines", { NULL, 0 }, 0, mi_cmd_symbol_list_lines},
+  { "symbol-list-types", { NULL, 0 }, NULL, NULL },
+  { "symbol-list-variables", { NULL, 0 }, NULL, NULL },
+  { "symbol-locate", { NULL, 0 }, NULL, NULL },
+  { "symbol-type", { NULL, 0 }, NULL, NULL },
+  { "target-attach", { NULL, 0 }, NULL, NULL },
+  { "target-compare-sections", { NULL, 0 }, NULL, NULL },
+  { "target-detach", { "detach", 0 }, 0 },
+  { "target-disconnect", { "disconnect", 0 }, 0 },
+  { "target-download", { NULL, 0 }, mi_cmd_target_download},
+  { "target-exec-status", { NULL, 0 }, NULL, NULL },
+  { "target-list-available-targets", { NULL, 0 }, NULL, NULL },
+  { "target-list-current-targets", { NULL, 0 }, NULL, NULL },
+  { "target-list-parameters", { NULL, 0 }, NULL, NULL },
+  { "target-select", { NULL, 0 }, mi_cmd_target_select},
+  { "thread-info", { NULL, 0 }, NULL, NULL },
+  { "thread-list-all-threads", { NULL, 0 }, NULL, NULL },
+  { "thread-list-ids", { NULL, 0 }, 0, mi_cmd_thread_list_ids},
+  { "thread-select", { NULL, 0 }, 0, mi_cmd_thread_select},
+  { "trace-actions", { NULL, 0 }, NULL, NULL },
+  { "trace-delete", { NULL, 0 }, NULL, NULL },
+  { "trace-disable", { NULL, 0 }, NULL, NULL },
+  { "trace-dump", { NULL, 0 }, NULL, NULL },
+  { "trace-enable", { NULL, 0 }, NULL, NULL },
+  { "trace-exists", { NULL, 0 }, NULL, NULL },
+  { "trace-find", { NULL, 0 }, NULL, NULL },
+  { "trace-frame-number", { NULL, 0 }, NULL, NULL },
+  { "trace-info", { NULL, 0 }, NULL, NULL },
+  { "trace-insert", { NULL, 0 }, NULL, NULL },
+  { "trace-list", { NULL, 0 }, NULL, NULL },
+  { "trace-pass-count", { NULL, 0 }, NULL, NULL },
+  { "trace-save", { NULL, 0 }, NULL, NULL },
+  { "trace-start", { NULL, 0 }, NULL, NULL },
+  { "trace-stop", { NULL, 0 }, NULL, NULL },
+  { "var-assign", { NULL, 0 }, 0, mi_cmd_var_assign},
+  { "var-create", { NULL, 0 }, 0, mi_cmd_var_create},
+  { "var-delete", { NULL, 0 }, 0, mi_cmd_var_delete},
+  { "var-evaluate-expression", { NULL, 0 }, 0, mi_cmd_var_evaluate_expression},
+  { "var-info-expression", { NULL, 0 }, 0, mi_cmd_var_info_expression},
+  { "var-info-num-children", { NULL, 0 }, 0, mi_cmd_var_info_num_children},
+  { "var-info-type", { NULL, 0 }, 0, mi_cmd_var_info_type},
+  { "var-list-children", { NULL, 0 }, 0, mi_cmd_var_list_children},
+  { "var-set-format", { NULL, 0 }, 0, mi_cmd_var_set_format},
+  { "var-show-attributes", { NULL, 0 }, 0, mi_cmd_var_show_attributes},
+  { "var-show-format", { NULL, 0 }, 0, mi_cmd_var_show_format},
+  { "var-update", { NULL, 0 }, 0, mi_cmd_var_update},
+  { NULL, }
 };
 
 /* Pointer to the mi command table (built at run time) */
index b0c8cb8db1f1d53ba569646a6e00c506dae69ae0..efcf0b5ca0a2dfbe8477e36506aa35aa1484855c 100644 (file)
@@ -108,18 +108,26 @@ extern mi_cmd_argv_ftype mi_cmd_var_update;
 
 /* Description of a single command. */
 
+struct mi_cli
+{
+  /* Corresponding CLI command.  If ARGS_P is non-zero, the MI
+     command's argument list is appended to the CLI command.  */
+  const char *cmd;
+  int args_p;
+};
+
 struct mi_cmd
-  {
-    /* official name of the command */
-    const char *name;
-    /* If non-null, the corresponding CLI command that can be used to
-       implement this MI command */
-    const char *cli;
-    /* If non-null, the function implementing the MI command */
-    mi_cmd_args_ftype *args_func;
-    /* If non-null, the function implementing the MI command */
-    mi_cmd_argv_ftype *argv_func;
-  };
+{
+  /* official name of the command.  */
+  const char *name;
+  /* The corresponding CLI command that can be used to implement this
+     MI command (if cli.lhs is non NULL).  */
+  struct mi_cli cli;
+  /* If non-null, the function implementing the MI command.  */
+  mi_cmd_args_ftype *args_func;
+  /* If non-null, the function implementing the MI command.  */
+  mi_cmd_argv_ftype *argv_func;
+};
 
 /* Lookup a command in the mi comand table */
 
index 5e55913fb94a34ac514c8a117a4498b3eb6b62b4..29eccaca5f4450512a31e6a93b11263bf5b4ab22 100644 (file)
@@ -87,7 +87,8 @@ static char *old_regs;
 extern void _initialize_mi_main (void);
 static enum mi_cmd_result mi_cmd_execute (struct mi_parse *parse);
 
-static void mi_execute_cli_command (const char *cli, char *args);
+static void mi_execute_cli_command (const char *cmd, int args_p,
+                                   const char *args);
 static enum mi_cmd_result mi_execute_async_cli_command (char *mi, char *args, int from_tty);
 
 static void mi_exec_async_cli_cmd_continuation (struct continuation_arg *arg);
@@ -101,7 +102,7 @@ void
 mi_error_last_message (void)
 {
   char *s = error_last_message ();
-  xasprintf (&mi_error_message, s);
+  xasprintf (&mi_error_message, "%s", s);
   xfree (s);
 }
 
@@ -1156,9 +1157,7 @@ captured_mi_execute_command (struct ui_out *uiout, void *data)
          mi commands */
       /* echo the command on the console. */
       fprintf_unfiltered (gdb_stdlog, "%s\n", context->command);
-      /* FIXME: If the command string has something that looks like 
-         a format spec (e.g. %s) we will get a core dump */
-      mi_execute_cli_command ("%s", context->command);
+      mi_execute_cli_command (context->command, 0, NULL);
 
       /* If we changed interpreters, DON'T print out anything. */
       if (current_interp_named_p (INTERP_MI)
@@ -1275,12 +1274,13 @@ mi_cmd_execute (struct mi_parse *parse)
        return parse->cmd->args_func (parse->args, 0 /*from_tty */ );
       return parse->cmd->argv_func (parse->command, parse->argv, parse->argc);
     }
-  else if (parse->cmd->cli != 0)
+  else if (parse->cmd->cli.cmd != 0)
     {
       /* FIXME: DELETE THIS. */
       /* The operation is still implemented by a cli command */
       /* Must be a synchronous one */
-      mi_execute_cli_command (parse->cmd->cli, parse->args);
+      mi_execute_cli_command (parse->cmd->cli.cmd, parse->cmd->cli.args_p,
+                             parse->args);
       return MI_CMD_DONE;
     }
   else
@@ -1301,17 +1301,20 @@ mi_cmd_execute (struct mi_parse *parse)
 /* Use only for synchronous commands */
 
 void
-mi_execute_cli_command (const char *cli, char *args)
+mi_execute_cli_command (const char *cmd, int args_p, const char *args)
 {
-  if (cli != 0)
+  if (cmd != 0)
     {
       struct cleanup *old_cleanups;
       char *run;
-      xasprintf (&run, cli, args);
+      if (args_p)
+       xasprintf (&run, "%s %s", cmd, args);
+      else
+       run = xstrdup (cmd);
       if (mi_debug_p)
        /* FIXME: gdb_???? */
        fprintf_unfiltered (gdb_stdout, "cli=%s run=%s\n",
-                           cli, run);
+                           cmd, run);
       old_cleanups = make_cleanup (xfree, run);
       execute_command ( /*ui */ run, 0 /*from_tty */ );
       do_cleanups (old_cleanups);
index 2aac5289829ae6ed05d6bab5e1b89fc67b104726..637ceb42ca1823df22952c55442479ba9692d9b1 100644 (file)
@@ -86,6 +86,7 @@ struct ui_out_impl mi_ui_out_impl =
   mi_message,
   mi_wrap_hint,
   mi_flush,
+  NULL,
   1, /* Needs MI hacks.  */
 };
 
index ebfddc7ff29ef3c93efb9025e274b4aa24df83ae..a0ff8898ff53eb40b93d37266db2246509a25551 100644 (file)
@@ -222,7 +222,7 @@ mi_parse (char *cmd)
   /* For CLI and old ARGS commands, also return the remainder of the
      command line as a single string. */
   if (parse->cmd->args_func != NULL
-      || parse->cmd->cli != NULL)
+      || parse->cmd->cli.cmd != NULL)
     {
       parse->args = xstrdup (chp);
     }
index f4f75e7d3932ae2c3704b0500f745475a97ae4fb..49586d9cc99279bb9327ccc2f00c9dffda346758 100644 (file)
@@ -451,13 +451,23 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc, asection *section)
   struct objfile *objfile;
   struct minimal_symbol *msymbol;
   struct minimal_symbol *best_symbol = NULL;
+  struct obj_section *pc_section;
 
   /* pc has to be in a known section. This ensures that anything beyond
      the end of the last segment doesn't appear to be part of the last
      function in the last segment.  */
-  if (find_pc_section (pc) == NULL)
+  pc_section = find_pc_section (pc);
+  if (pc_section == NULL)
     return NULL;
 
+  /* If no section was specified, then just make sure that the PC is in
+     the same section as the minimal symbol we find.  */
+  if (section == NULL)
+    section = pc_section->the_bfd_section;
+
+  /* FIXME drow/2003-07-19: Should we also check that PC is in SECTION
+     if we were passed a non-NULL SECTION argument?  */
+
   for (objfile = object_files;
        objfile != NULL;
        objfile = objfile->next)
index a0469f6f9f385bea4e16dc820c9a4de9da2f9ba2..6d58055300a0f8cd8b9764a2304822f6d9154cbc 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux on MIPS processors.
 
-   Copyright 2001, 2002 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 int
 mips_linux_cannot_fetch_register (int regno)
 {
-  if (REGISTER_NAME (regno)[0] == 0)
-    return 1;
-  if (regno == PS_REGNUM)
-    return 1;
-  else if (regno == ZERO_REGNUM)
-    return 1;
-  else
+  if (regno > ZERO_REGNUM && regno < ZERO_REGNUM + 32)
     return 0;
+  else if (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 32)
+    return 0;
+
+  switch (regno)
+    {
+    case LO_REGNUM:
+    case HI_REGNUM:
+    case BADVADDR_REGNUM:
+    case CAUSE_REGNUM:
+    case PC_REGNUM:
+    case FCRCS_REGNUM:
+    case FCRIR_REGNUM:
+      return 0;
+    }
+
+  return 1;
 }
 
 int
 mips_linux_cannot_store_register (int regno)
 {
-  if (REGISTER_NAME (regno)[0] == 0)
-    return 1;
-  if (regno == PS_REGNUM)
-    return 1;
-  else if (regno == ZERO_REGNUM)
-    return 1;
-  else if (regno == BADVADDR_REGNUM)
-    return 1;
-  else if (regno == CAUSE_REGNUM)
-    return 1;
-  else if (regno == FCRIR_REGNUM)
-    return 1;
-  else
+  if (regno > ZERO_REGNUM && regno < ZERO_REGNUM + 32)
     return 0;
+  else if (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 32)
+    return 0;
+
+  switch (regno)
+    {
+    case LO_REGNUM:
+    case HI_REGNUM:
+    case PC_REGNUM:
+    case FCRCS_REGNUM:
+      return 0;
+    }
+
+  return 1;
 }
index 78503d1c65040c1606645d8b9fa21fb5c75b422d..93a15e547177238884173125099f1173587bf6ea 100644 (file)
@@ -716,7 +716,7 @@ _initialize_mips_linux_tdep (void)
   const struct bfd_arch_info *arch_info;
 
   register_addr_data =
-    register_gdbarch_data (init_register_addr_data, 0);
+    register_gdbarch_data (init_register_addr_data);
 
   for (arch_info = bfd_lookup_arch (bfd_arch_mips, 0);
        arch_info != NULL;
index f39179d3a0fce3ee3e9cc2420947777daaa23805..d1d2e38b869114fc4866fd6153c1d1cfa92d84d6 100644 (file)
@@ -50,6 +50,7 @@
 #include "sim-regno.h"
 
 static void set_reg_offset (CORE_ADDR *saved_regs, int regnum, CORE_ADDR off);
+static struct type *mips_register_type (struct gdbarch *gdbarch, int regnum);
 
 /* A useful bit in the CP0 status register (PS_REGNUM).  */
 /* This bit is set if we are emulating 32-bit FPRs on a 64-bit chip.  */
@@ -670,7 +671,7 @@ mips_register_raw_size (int regnum)
       /* For the moment map [NUM_REGS .. 2*NUM_REGS) onto the same raw
         registers, but always return the virtual size.  */
       int rawnum = regnum % NUM_REGS;
-      return TYPE_LENGTH (MIPS_REGISTER_TYPE (rawnum));
+      return TYPE_LENGTH (gdbarch_register_type (current_gdbarch, rawnum));
     }
   else
     internal_error (__FILE__, __LINE__, "Register %d out of range", regnum);
@@ -700,7 +701,8 @@ mips_register_byte (int regnum)
       /* Add space for all the proceeding registers based on their
          real size.  */
       for (reg = NUM_REGS; reg < regnum; reg++)
-       byte += TYPE_LENGTH (MIPS_REGISTER_TYPE ((reg % NUM_REGS)));
+       byte += TYPE_LENGTH (gdbarch_register_type (current_gdbarch,
+                                                    (reg % NUM_REGS)));
       return byte;
     }
   else
@@ -4284,10 +4286,10 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
       col++;
     }
   /* print the R0 to R31 names */
-  fprintf_filtered (file,
-                   (start_regnum % NUM_REGS) < MIPS_NUMREGS
-                   ? "\n R%-4d" : "\n      ",
-                   start_regnum);
+  if ((start_regnum % NUM_REGS) < MIPS_NUMREGS)
+    fprintf_filtered (file, "\n R%-4d", start_regnum % NUM_REGS);
+  else
+    fprintf_filtered (file, "\n      ");
 
   /* now print the values in hex, 4 or 8 to the row */
   for (col = 0, regnum = start_regnum;
index 3519495f5f9466d1dbb483e8236b7d9a89d1bdec..7e84eb9e22d7bbce5371ff71e60c0a6dc1c28696 100644 (file)
@@ -169,7 +169,7 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
   get_frame_extra_info (dummy)->status = 0;
   get_frame_extra_info (dummy)->stack_size = 0;
   memset (get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS);
-  mn10300_analyze_prologue (dummy, 0);
+  mn10300_analyze_prologue (dummy, pc);
   return dummy;
 }
 
@@ -401,8 +401,13 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
   char *name;
 
   /* Use the PC in the frame if it's provided to look up the
-     start of this function.  */
-  pc = (fi ? get_frame_pc (fi) : pc);
+     start of this function.
+
+     Note: kevinb/2003-07-16: We used to do the following here:
+       pc = (fi ? get_frame_pc (fi) : pc);
+     But this is (now) badly broken when called from analyze_dummy_frame().
+  */
+  pc = (pc ? pc : get_frame_pc (fi));
 
   /* Find the start of this function.  */
   status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
@@ -432,6 +437,9 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
   if (status != 0)
     return pc;
 
+#if 0
+  /* Note: kevinb/2003-07-16: We shouldn't be making these sorts of
+     changes to the frame in prologue examination code.  */
   /* If we're physically on an "rets" instruction, then our frame has
      already been deallocated.  Note this can also be true for retf
      and ret if they specify a size of zero.
@@ -452,9 +460,10 @@ mn10300_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
        deprecated_update_frame_base_hack (fi, read_sp ());
       return get_frame_pc (fi);
     }
+#endif
 
   /* Figure out where to stop scanning.  */
-  stop = fi ? get_frame_pc (fi) : func_end;
+  stop = fi ? pc : func_end;
 
   /* Don't walk off the end of the function.  */
   stop = stop > func_end ? func_end : stop;
index 9141450d6acd9a7c8ce03feb2770312ab597e38b..2f8ca22a454e3b86e3f74727bb73ec30610ea47f 100644 (file)
@@ -245,8 +245,12 @@ extern void monitor_close (int quitting);
 extern char *monitor_supply_register (int regno, char *valstr);
 extern int monitor_expect (char *prompt, char *buf, int buflen);
 extern int monitor_expect_prompt (char *buf, int buflen);
-extern void monitor_printf (char *, ...) ATTR_FORMAT (printf, 1, 2);
-extern void monitor_printf_noecho (char *, ...) ATTR_FORMAT (printf, 1, 2);
+/* Note: The variable argument functions monitor_printf and
+   monitor_printf_noecho vararg do not take take standard format style
+   arguments.  Instead they take custom formats interpretered directly
+   by monitor_vsprintf.  */
+extern void monitor_printf (char *, ...);
+extern void monitor_printf_noecho (char *, ...);
 extern void monitor_write (char *buf, int buflen);
 extern int monitor_readchar (void);
 extern char *monitor_get_dev_name (void);
index 3c8d5d2936ddda5ae58bd7e71d24193db3bb1c77..6b381592345f18d0a1f4d8c4aa7f243c75e086e7 100644 (file)
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -146,7 +146,7 @@ ocd_error (char *s, int error_code)
       s = buf;
     }
 
-  error (s);
+  error ("%s", s);
 }
 
 /*  Return nonzero if the thread TH is still alive on the remote system.  */
index 4ba0645eee561d6964333cb69b8efd783beed8f5..17a3be552bb59ae03af3c1028a9487a96c0afc25 100644 (file)
@@ -461,8 +461,8 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
   /* void pointer */
   if ((TYPE_CODE (type) == TYPE_CODE_PTR) && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID))
     {
-      fprintf_filtered (stream,
-                       TYPE_NAME (type) ? TYPE_NAME (type) : "pointer");
+      fputs_filtered (TYPE_NAME (type) ? TYPE_NAME (type) : "pointer",
+                     stream);
       return;
     }
   /* When SHOW is zero or less, and there is a valid type name, then always
index a4bbaded9a1a945ba5d0a6dbeea03544250fb849..b28b62a00cb38c7e3511f500522795e37fba3e15 100644 (file)
@@ -661,7 +661,7 @@ common:
       char *demangled_name;
 
       fprintf_filtered (stream, "&");
-      fprintf_filtered (stream, kind);
+      fputs_filtered (kind, stream);
       demangled_name = cplus_demangle (TYPE_FN_FIELD_PHYSNAME (f, j),
                                       DMGL_ANSI | DMGL_PARAMS);
       if (demangled_name == NULL)
@@ -1080,7 +1080,7 @@ pascal_object_print_class_member (char *valaddr, struct type *domain,
   if (i < len)
     {
       const char *name;
-      fprintf_filtered (stream, prefix);
+      fputs_filtered (prefix, stream);
       name = type_name_no_tag (domain);
       if (name)
        fputs_filtered (name, stream);
index 16724ac5ed453d4bf7010ae5ee0f158af5cd5c19..e807e13b7111901a0a6ce3a8f399ef63339e90df 100644 (file)
@@ -455,7 +455,8 @@ write_dollar_variable (struct stoken str)
 
   /* Handle tokens that refer to machine registers:
      $ followed by a register name.  */
-  i = frame_map_name_to_regnum (str.ptr + 1, str.length - 1);
+  i = frame_map_name_to_regnum (deprecated_selected_frame,
+                               str.ptr + 1, str.length - 1);
   if (i >= 0)
     goto handle_register;
 
index 9d58507d335c35770de33f7e2ece3ef2f11dbb54..80b72d346dce49b15a698cf6fc88813584ce194a 100644 (file)
@@ -509,7 +509,7 @@ print_scalar_formatted (void *valaddr, struct type *type, int format, int size,
        strcpy (buf, local_binary_format_prefix ());
        strcat (buf, cp);
        strcat (buf, local_binary_format_suffix ());
-       fprintf_filtered (stream, buf);
+       fputs_filtered (buf, stream);
       }
       break;
 
@@ -1264,12 +1264,6 @@ address_info (char *exp, int from_tty)
                        val, REGISTER_NAME (basereg));
       break;
 
-    case LOC_THREAD_LOCAL_STATIC:
-      printf_filtered ("a thread-local variable at offset %ld in the "
-                       "thread-local storage for `%s'",
-                       val, SYMBOL_OBJFILE (sym)->name);
-      break;
-
     case LOC_OPTIMIZED_OUT:
       printf_filtered ("optimized out");
       break;
@@ -2011,7 +2005,7 @@ printf_command (char *arg, int from_tty)
        current_substring += strlen (current_substring) + 1;
       }
     /* Print the portion of the format string after the last argument.  */
-    printf_filtered (last_arg);
+    puts_filtered (last_arg);
   }
   do_cleanups (old_cleanups);
 }
index 509390f91725870bc0a48cccd48d8316b36b4399..5c7f0ca9169a516a64a3f8add3ad7952d2355e4e 100644 (file)
@@ -51,10 +51,11 @@ struct regcache_descr
      for raw and pseudo registers and allow access to both.  */
   int legacy_p;
 
-  /* The raw register cache.  This should contain just [0
-     .. NUM_RAW_REGISTERS).  However, for older targets, it contains
-     space for the full [0 .. NUM_RAW_REGISTERS +
-     NUM_PSEUDO_REGISTERS).  */
+  /* The raw register cache.  Each raw (or hard) register is supplied
+     by the target interface.  The raw cache should not contain
+     redundant information - if the PC is constructed from two
+     registers then those regigisters and not the PC lives in the raw
+     cache.  */
   int nr_raw_registers;
   long sizeof_raw_registers;
   long sizeof_raw_register_valid_p;
@@ -91,12 +92,6 @@ init_legacy_regcache_descr (struct gdbarch *gdbarch,
      ``gdbarch'' as a parameter.  */
   gdb_assert (gdbarch != NULL);
 
-  /* FIXME: cagney/2002-05-11: Shouldn't be including pseudo-registers
-     in the register cache.  Unfortunatly some architectures still
-     rely on this and the pseudo_register_write() method.  */
-  descr->nr_raw_registers = descr->nr_cooked_registers;
-  descr->sizeof_raw_register_valid_p = descr->sizeof_cooked_register_valid_p;
-
   /* Compute the offset of each register.  Legacy architectures define
      REGISTER_BYTE() so use that.  */
   /* FIXME: cagney/2002-11-07: Instead of using REGISTER_BYTE() this
@@ -104,8 +99,10 @@ init_legacy_regcache_descr (struct gdbarch *gdbarch,
      offets at runtime.  This currently isn't possible as some ISAs
      define overlapping register regions - see the mess in
      read_register_bytes() and write_register_bytes() registers.  */
-  descr->sizeof_register = XCALLOC (descr->nr_cooked_registers, long);
-  descr->register_offset = XCALLOC (descr->nr_cooked_registers, long);
+  descr->sizeof_register
+    = GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, long);
+  descr->register_offset
+    = GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, long);
   for (i = 0; i < descr->nr_cooked_registers; i++)
     {
       /* FIXME: cagney/2001-12-04: This code shouldn't need to use
@@ -153,7 +150,7 @@ init_regcache_descr (struct gdbarch *gdbarch)
   gdb_assert (gdbarch != NULL);
 
   /* Create an initial, zero filled, table.  */
-  descr = XCALLOC (1, struct regcache_descr);
+  descr = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct regcache_descr);
   descr->gdbarch = gdbarch;
 
   /* Total size of the register space.  The raw registers are mapped
@@ -163,8 +160,8 @@ init_regcache_descr (struct gdbarch *gdbarch)
   descr->sizeof_cooked_register_valid_p = NUM_REGS + NUM_PSEUDO_REGS;
 
   /* Fill in a table of register types.  */
-  descr->register_type = XCALLOC (descr->nr_cooked_registers,
-                                 struct type *);
+  descr->register_type
+    = GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, struct type *);
   for (i = 0; i < descr->nr_cooked_registers; i++)
     {
       if (gdbarch_register_type_p (gdbarch))
@@ -176,23 +173,6 @@ init_regcache_descr (struct gdbarch *gdbarch)
        descr->register_type[i] = REGISTER_VIRTUAL_TYPE (i); /* OK */
     }
 
-  /* If an old style architecture, fill in the remainder of the
-     register cache descriptor using the register macros.  */
-  if (!gdbarch_pseudo_register_read_p (gdbarch)
-      && !gdbarch_pseudo_register_write_p (gdbarch)
-      && !gdbarch_register_type_p (gdbarch))
-    {
-      /* NOTE: cagney/2003-05-02: Don't add a test for REGISTER_BYTE_P
-        to the above.  Doing that would cause all the existing
-        architectures to revert back to the legacy regcache
-        mechanisms, and that is not a good thing.  Instead just,
-        later, check that the register cache's layout is consistent
-        with REGISTER_BYTE.  */
-      descr->legacy_p = 1;
-      init_legacy_regcache_descr (gdbarch, descr);
-      return descr;
-    }
-
   /* Construct a strictly RAW register cache.  Don't allow pseudo's
      into the register cache.  */
   descr->nr_raw_registers = NUM_REGS;
@@ -203,6 +183,24 @@ init_regcache_descr (struct gdbarch *gdbarch)
      .. NUM_REGS + NUM_PSEUDO_REGS).  */
   descr->sizeof_raw_register_valid_p = descr->sizeof_cooked_register_valid_p;
 
+  /* If an old style architecture, fill in the remainder of the
+     register cache descriptor using the register macros.  */
+  /* NOTE: cagney/2003-06-29: If either of REGISTER_BYTE or
+     REGISTER_RAW_SIZE are still present, things are most likely
+     totally screwed.  Ex: an architecture with raw register sizes
+     smaller than what REGISTER_BYTE indicates; non monotonic
+     REGISTER_BYTE values.  For GDB 6 check for these nasty methods
+     and fall back to legacy code when present.  Sigh!  */
+  if ((!gdbarch_pseudo_register_read_p (gdbarch)
+       && !gdbarch_pseudo_register_write_p (gdbarch)
+       && !gdbarch_register_type_p (gdbarch))
+      || REGISTER_BYTE_P () || REGISTER_RAW_SIZE_P ())
+    {
+      descr->legacy_p = 1;
+      init_legacy_regcache_descr (gdbarch, descr);
+      return descr;
+    }
+
   /* Lay out the register cache.
 
      NOTE: cagney/2002-05-22: Only register_type() is used when
@@ -212,8 +210,10 @@ init_regcache_descr (struct gdbarch *gdbarch)
 
   {
     long offset = 0;
-    descr->sizeof_register = XCALLOC (descr->nr_cooked_registers, long);
-    descr->register_offset = XCALLOC (descr->nr_cooked_registers, long);
+    descr->sizeof_register
+      = GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, long);
+    descr->register_offset
+      = GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, long);
     for (i = 0; i < descr->nr_cooked_registers; i++)
       {
        descr->sizeof_register[i] = TYPE_LENGTH (descr->register_type[i]);
@@ -255,19 +255,6 @@ regcache_descr (struct gdbarch *gdbarch)
   return gdbarch_data (gdbarch, regcache_descr_handle);
 }
 
-static void
-xfree_regcache_descr (struct gdbarch *gdbarch, void *ptr)
-{
-  struct regcache_descr *descr = ptr;
-  if (descr == NULL)
-    return;
-  xfree (descr->register_offset);
-  xfree (descr->sizeof_register);
-  descr->register_offset = NULL;
-  descr->sizeof_register = NULL;
-  xfree (descr);
-}
-
 /* Utility functions returning useful register attributes stored in
    the regcache descr.  */
 
@@ -289,8 +276,11 @@ register_size (struct gdbarch *gdbarch, int regnum)
   int size;
   gdb_assert (regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS));
   size = descr->sizeof_register[regnum];
+  /* NB: The deprecated REGISTER_RAW_SIZE, if not provided, defaults
+     to the size of the register's type.  */
   gdb_assert (size == REGISTER_RAW_SIZE (regnum)); /* OK */
-  gdb_assert (size == REGISTER_RAW_SIZE (regnum)); /* OK */
+  /* NB: Don't check the register's virtual size.  It, in say the case
+     of the MIPS, may not match the raw size!  */
   return size;
 }
 
@@ -1427,7 +1417,6 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
 {
   struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
   struct gdbarch *gdbarch = regcache->descr->gdbarch;
-  struct reggroup *const *groups = reggroups (gdbarch);
   int regnum;
   int footnote_nr = 0;
   int footnote_register_size = 0;
@@ -1598,13 +1587,15 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
            fprintf_unfiltered (file, "Groups");
          else
            {
-             int i;
              const char *sep = "";
-             for (i = 0; groups[i] != NULL; i++)
+             struct reggroup *group;
+             for (group = reggroup_next (gdbarch, NULL);
+                  group != NULL;
+                  group = reggroup_next (gdbarch, group))
                {
-                 if (gdbarch_register_reggroup_p (gdbarch, regnum, groups[i]))
+                 if (gdbarch_register_reggroup_p (gdbarch, regnum, group))
                    {
-                     fprintf_unfiltered (file, "%s%s", sep, reggroup_name (groups[i]));
+                     fprintf_unfiltered (file, "%s%s", sep, reggroup_name (group));
                      sep = ",";
                    }
                }
@@ -1671,8 +1662,7 @@ extern initialize_file_ftype _initialize_regcache; /* -Wmissing-prototype */
 void
 _initialize_regcache (void)
 {
-  regcache_descr_handle = register_gdbarch_data (init_regcache_descr,
-                                                xfree_regcache_descr);
+  regcache_descr_handle = register_gdbarch_data (init_regcache_descr);
   REGISTER_GDBARCH_SWAP (current_regcache);
   register_gdbarch_swap (&deprecated_registers, sizeof (deprecated_registers), NULL);
   register_gdbarch_swap (&deprecated_register_valid, sizeof (deprecated_register_valid), NULL);
index ea9a9ec921e2fc839b5ea4f8907765c373362cba..791ec0abd521f426295bcbd83bb1509736b519db 100644 (file)
@@ -60,12 +60,18 @@ reggroup_type (struct reggroup *group)
   return group->type;
 }
 
-/* All the groups for a given architecture.  */
+/* A linked list of groups for the given architecture.  */
+
+struct reggroup_el
+{
+  struct reggroup *group;
+  struct reggroup_el *next;
+};
 
 struct reggroups
 {
-  int nr_group;
-  struct reggroup **group;
+  struct reggroup_el *first;
+  struct reggroup_el **last;
 };
 
 static struct gdbarch_data *reggroups_data;
@@ -73,33 +79,24 @@ static struct gdbarch_data *reggroups_data;
 static void *
 reggroups_init (struct gdbarch *gdbarch)
 {
-  struct reggroups *groups = XMALLOC (struct reggroups);
-  groups->nr_group = 0;
-  groups->group = NULL;
+  struct reggroups *groups = GDBARCH_OBSTACK_ZALLOC (gdbarch,
+                                                    struct reggroups);
+  groups->last = &groups->first;
   return groups;
 }
 
-static void
-reggroups_free (struct gdbarch *gdbarch, void *data)
-{
-  struct reggroups *groups = data;
-  xfree (groups->group);
-  xfree (groups);
-}
-
 /* Add a register group (with attribute values) to the pre-defined
-   list.  This function can be called during architecture
-   initialization and hence needs to handle NULL architecture groups.  */
+   list.  */
 
 static void
-add_group (struct reggroups *groups, struct reggroup *group)
+add_group (struct reggroups *groups, struct reggroup *group,
+          struct reggroup_el *el)
 {
   gdb_assert (group != NULL);
-  groups->nr_group++;
-  groups->group = xrealloc (groups->group, (sizeof (struct reggroup *)
-                                           * (groups->nr_group + 1)));
-  groups->group[groups->nr_group - 1] = group;
-  groups->group[groups->nr_group] = NULL;
+  el->group = group;
+  el->next = NULL;
+  (*groups->last) = el;
+  groups->last = &el->next;
 }
 
 void
@@ -113,25 +110,37 @@ reggroup_add (struct gdbarch *gdbarch, struct reggroup *group)
       groups = reggroups_init (gdbarch);
       set_gdbarch_data (gdbarch, reggroups_data, groups);
     }
-  add_group (groups, group);
+  add_group (groups, group,
+            GDBARCH_OBSTACK_ZALLOC (gdbarch, struct reggroup_el));
 }
 
-/* The register groups for the current architecture.  Mumble something
-   about the lifetime of the buffer....  */
+/* The default register groups for an architecture.  */
+
+static struct reggroups default_groups = { NULL, &default_groups.first };
 
-static struct reggroups *default_groups;
+/* A register group iterator.  */
 
-struct reggroup * const*
-reggroups (struct gdbarch *gdbarch)
+struct reggroup *
+reggroup_next (struct gdbarch *gdbarch, struct reggroup *last)
 {
-  struct reggroups *groups = gdbarch_data (gdbarch, reggroups_data);
+  struct reggroups *groups;
+  struct reggroup_el *el;
   /* Don't allow this function to be called during architecture
-     creation.  */
+     creation.  If there are no groups, use the default groups list.  */
+  groups = gdbarch_data (gdbarch, reggroups_data);
   gdb_assert (groups != NULL);
-  if (groups->group == NULL)
-    return default_groups->group;
-  else
-    return groups->group;
+  if (groups->first == NULL)
+    groups = &default_groups;
+
+  /* Retun the first/next reggroup.  */
+  if (last == NULL)
+    return groups->first->group;
+  for (el = groups->first; el != NULL; el = el->next)
+    {
+      if (el->group == last)
+       return el->next->group;
+    }
+  return NULL;
 }
 
 /* Is REGNUM a member of REGGROUP?  */
@@ -168,28 +177,27 @@ default_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
 static void
 reggroups_dump (struct gdbarch *gdbarch, struct ui_file *file)
 {
-  struct reggroup *const *groups = reggroups (gdbarch);
-  int i = -1;
+  struct reggroup *group = NULL;
   do
     {
       /* Group name.  */
       {
        const char *name;
-       if (i < 0)
+       if (group == NULL)
          name = "Group";
        else
-         name = reggroup_name (groups[i]);
+         name = reggroup_name (group);
        fprintf_unfiltered (file, " %-10s", name);
       }
       
       /* Group type.  */
       {
        const char *type;
-       if (i < 0)
+       if (group == NULL)
          type = "Type";
        else
          {
-           switch (reggroup_type (groups[i]))
+           switch (reggroup_type (group))
              {
              case USER_REGGROUP:
                type = "user";
@@ -208,9 +216,10 @@ reggroups_dump (struct gdbarch *gdbarch, struct ui_file *file)
          documentation.  */
       
       fprintf_unfiltered (file, "\n");
-      i++;
+
+      group = reggroup_next (gdbarch, group);
     }
-  while (groups[i] != NULL);
+  while (group != NULL);
 }
 
 static void
@@ -250,18 +259,16 @@ extern initialize_file_ftype _initialize_reggroup; /* -Wmissing-prototypes */
 void
 _initialize_reggroup (void)
 {
-  reggroups_data = register_gdbarch_data (reggroups_init, reggroups_free);
+  reggroups_data = register_gdbarch_data (reggroups_init);
 
   /* The pre-defined list of groups.  */
-  default_groups = reggroups_init (NULL);
-  add_group (default_groups, general_reggroup);
-  add_group (default_groups, float_reggroup);
-  add_group (default_groups, system_reggroup);
-  add_group (default_groups, vector_reggroup);
-  add_group (default_groups, all_reggroup);
-  add_group (default_groups, save_reggroup);
-  add_group (default_groups, restore_reggroup);
-
+  add_group (&default_groups, general_reggroup, XMALLOC (struct reggroup_el));
+  add_group (&default_groups, float_reggroup, XMALLOC (struct reggroup_el));
+  add_group (&default_groups, system_reggroup, XMALLOC (struct reggroup_el));
+  add_group (&default_groups, vector_reggroup, XMALLOC (struct reggroup_el));
+  add_group (&default_groups, all_reggroup, XMALLOC (struct reggroup_el));
+  add_group (&default_groups, save_reggroup, XMALLOC (struct reggroup_el));
+  add_group (&default_groups, restore_reggroup, XMALLOC (struct reggroup_el));
 
   add_cmd ("reggroups", class_maintenance,
           maintenance_print_reggroups, "\
index 0088a8520e3266f9effcb06147289e90d43e5d14..22c0a6fcca9d8fb412c617a6c4b2a0153c696267 100644 (file)
@@ -51,8 +51,11 @@ extern void reggroup_add (struct gdbarch *gdbarch, struct reggroup *group);
 extern const char *reggroup_name (struct reggroup *reggroup);
 extern enum reggroup_type reggroup_type (struct reggroup *reggroup);
 
-/* The register groups for the current architecture.  */
-extern struct reggroup *const *reggroups (struct gdbarch *gdbarch);
+/* Interator for the architecture's register groups.  Pass in NULL,
+   returns the first group.  Pass in a group, returns the next group,
+   or NULL when the last group is reached.  */
+extern struct reggroup *reggroup_next (struct gdbarch *gdbarch,
+                                      struct reggroup *last);
 
 /* Is REGNUM a member of REGGROUP?  */
 extern int default_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
index 96f39728f5414228f1129ec097dfb7900bb190e2..c50c5044387f6c1d33f56dd9ff8d21de18ed781c 100644 (file)
@@ -483,7 +483,7 @@ mips_error (char *string,...)
   wrap_here ("");              /* Force out any buffered output */
   gdb_flush (gdb_stdout);
   if (error_pre_print)
-    fprintf_filtered (gdb_stderr, error_pre_print);
+    fputs_filtered (error_pre_print, gdb_stderr);
   vfprintf_filtered (gdb_stderr, string, args);
   fprintf_filtered (gdb_stderr, "\n");
   va_end (args);
index f7b9e89b0ba1fc4461943e530ee9fbaffa3bbd1e..11424bb81ea23f6bdea8ddcc89971be6e03aaeb2 100644 (file)
@@ -331,7 +331,7 @@ gdbsim_fetch_register (int regno)
            warn_user = 0;
          }
        /* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
-          indicatingthat GDB and the SIM have different ideas about
+          indicating that GDB and the SIM have different ideas about
           which registers are fetchable.  */
        /* Else if (nr_bytes < 0): an old simulator, that doesn't
           think to return the register size.  Just assume all is ok.  */
@@ -369,7 +369,7 @@ gdbsim_store_register (int regno)
        internal_error (__FILE__, __LINE__,
                        "Register size different to expected");
       /* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
-        indicatingthat GDB and the SIM have different ideas about
+        indicating that GDB and the SIM have different ideas about
         which registers are fetchable.  */
       if (sr_get_debug ())
        {
index b3fb7f2b7960d300c1764be3880fd9dd62788860..d21025c78a92907c332c80de7805ebf709ddd19c 100644 (file)
@@ -675,8 +675,11 @@ vx_add_symbols (char *name, int from_tty, CORE_ADDR text_addr,
      free_objfile it.  */
   objfile_to_front (objfile);
 
-  offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
-  memcpy (offs, objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
+  offs =
+    (struct section_offsets *)
+    alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
+  memcpy (offs, objfile->section_offsets,
+          SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
 
   ss.text_start = 0;
   ss.data_start = 0;
index 0555873834b3dd92107919802f22f84917c257f1..c024d08dee9028a3502eaecfedfce33d5e482265 100644 (file)
@@ -256,7 +256,7 @@ static void *
 init_remote_state (struct gdbarch *gdbarch)
 {
   int regnum;
-  struct remote_state *rs = xmalloc (sizeof (struct remote_state));
+  struct remote_state *rs = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct remote_state);
 
   if (DEPRECATED_REGISTER_BYTES != 0)
     rs->sizeof_g_packet = DEPRECATED_REGISTER_BYTES;
@@ -264,7 +264,8 @@ init_remote_state (struct gdbarch *gdbarch)
     rs->sizeof_g_packet = 0;
 
   /* Assume a 1:1 regnum<->pnum table.  */
-  rs->regs = xcalloc (NUM_REGS + NUM_PSEUDO_REGS, sizeof (struct packet_reg));
+  rs->regs = GDBARCH_OBSTACK_CALLOC (gdbarch, NUM_REGS + NUM_PSEUDO_REGS,
+                                    struct packet_reg);
   for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
     {
       struct packet_reg *r = &rs->regs[regnum];
@@ -303,14 +304,6 @@ init_remote_state (struct gdbarch *gdbarch)
   return rs;
 }
 
-static void
-free_remote_state (struct gdbarch *gdbarch, void *pointer)
-{
-  struct remote_state *data = pointer;
-  xfree (data->regs);
-  xfree (data);
-}
-
 static struct packet_reg *
 packet_reg_from_regnum (struct remote_state *rs, long regnum)
 {
@@ -2071,7 +2064,7 @@ remote_cisco_section_offsets (bfd_vma text_addr,
       sprintf_vma (tmp + strlen (tmp), data_addr);
       sprintf (tmp + strlen (tmp), " bss = 0x");
       sprintf_vma (tmp + strlen (tmp), bss_addr);
-      fprintf_filtered (gdb_stdlog, tmp);
+      fputs_filtered (tmp, gdb_stdlog);
       fprintf_filtered (gdb_stdlog,
                        "Reloc offset: text = 0x%s data = 0x%s bss = 0x%s\n",
                        paddr_nz (*text_offs),
@@ -3027,14 +3020,12 @@ Packet: '%s'\n",
                    p = p1;
 
                    if (*p++ != ':')
-                     warning ("Malformed packet(b) (missing colon): %s\n\
-Packet: '%s'\n",
-                              p, buf);
+                     error ("Malformed packet(b) (missing colon): %s\nPacket: '%s'\n",
+                            p, buf);
 
                    if (reg == NULL)
-                     warning ("Remote sent bad register number %s: %s\n\
-Packet: '%s'\n",
-                              phex_nz (pnum, 0), p, buf);
+                     error ("Remote sent bad register number %s: %s\nPacket: '%s'\n",
+                            phex_nz (pnum, 0), p, buf);
 
                    fieldsize = hex2bin (p, regs, REGISTER_RAW_SIZE (reg->regnum));
                    p += 2 * fieldsize;
@@ -3044,10 +3035,7 @@ Packet: '%s'\n",
                  }
 
                if (*p++ != ';')
-                 {
-                   warning ("Remote register badly formatted: %s", buf);
-                   warning ("            here: %s", p);
-                 }
+                 error ("Remote register badly formatted: %s\nhere: %s", buf, p);
              }
          }
          /* fall through */
@@ -3250,9 +3238,8 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
                  {
                    p1 = (unsigned char *) strchr (p, ':');
                    if (p1 == NULL)
-                     warning ("Malformed packet(a) (missing colon): %s\n\
-Packet: '%s'\n",
-                              p, buf);
+                     error ("Malformed packet(a) (missing colon): %s\nPacket: '%s'\n",
+                            p, buf);
                    if (strncmp (p, "thread", p1 - p) == 0)
                      {
                        p_temp = unpack_varlen_hex (++p1, &thread_num);
@@ -3281,14 +3268,12 @@ Packet: '%s'\n",
                    struct packet_reg *reg = packet_reg_from_pnum (rs, pnum);
                    p = p1;
                    if (*p++ != ':')
-                     warning ("Malformed packet(b) (missing colon): %s\n\
-Packet: '%s'\n",
-                              p, buf);
+                     error ("Malformed packet(b) (missing colon): %s\nPacket: '%s'\n",
+                            p, buf);
 
                    if (reg == NULL)
-                     warning ("Remote sent bad register number %ld: %s\n\
-Packet: '%s'\n",
-                              pnum, p, buf);
+                     error ("Remote sent bad register number %ld: %s\nPacket: '%s'\n",
+                            pnum, p, buf);
 
                    fieldsize = hex2bin (p, regs, REGISTER_RAW_SIZE (reg->regnum));
                    p += 2 * fieldsize;
@@ -3298,10 +3283,8 @@ Packet: '%s'\n",
                  }
 
                if (*p++ != ';')
-                 {
-                   warning ("Remote register badly formatted: %s", buf);
-                   warning ("            here: %s", p);
-                 }
+                 error ("Remote register badly formatted: %s\nhere: %s",
+                        buf, p);
              }
          }
          /* fall through */
@@ -3771,42 +3754,45 @@ int
 remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
 {
   unsigned char *buf;
-  int max_buf_size;            /* Max size of packet output buffer */
   unsigned char *p;
   unsigned char *plen;
   long sizeof_buf;
   int plenlen;
   int todo;
   int nr_bytes;
+  int payload_size;
+  unsigned char *payload_start;
 
-  /* Verify that the target can support a binary download */
+  /* Verify that the target can support a binary download */
   check_binary_download (memaddr);
 
-  /* Determine the max packet size. */
-  max_buf_size = get_memory_write_packet_size ();
-  sizeof_buf = max_buf_size + 1; /* Space for trailing NUL */
+  /* Compute the size, and then allocate space for the largest
+     possible packet.  Include space for an extra trailing NUL.  */
+  sizeof_buf = get_memory_write_packet_size () + 1;
   buf = alloca (sizeof_buf);
 
-  /* Subtract header overhead from max payload size -  $M<memaddr>,<len>:#nn */
-  max_buf_size -= 2 + hexnumlen (memaddr + len - 1) + 1 + hexnumlen (len) + 4;
+  /* Compute the size of the actual payload by subtracting out the
+     packet header and footer overhead: "$M<memaddr>,<len>:...#nn".  */
+  payload_size = (get_memory_write_packet_size () - (strlen ("$M,:#NN")
+                                                    + hexnumlen (memaddr)
+                                                    + hexnumlen (len)));
 
-  /* construct "M"<memaddr>","<len>":" */
-  /* sprintf (buf, "M%lx,%x:", (unsigned long) memaddr, todo); */
-  p = buf;
+  /* Construct the packet header: "[MX]<memaddr>,<len>:".   */
 
-  /* Append [XM].  Compute a best guess of the number of bytes
+  /* Append "[XM]".  Compute a best guess of the number of bytes
      actually transfered. */
+  p = buf;
   switch (remote_protocol_binary_download.support)
     {
     case PACKET_ENABLE:
       *p++ = 'X';
       /* Best guess at number of bytes that will fit. */
-      todo = min (len, max_buf_size);
+      todo = min (len, payload_size);
       break;
     case PACKET_DISABLE:
       *p++ = 'M';
       /* num bytes that will fit */
-      todo = min (len, max_buf_size / 2);
+      todo = min (len, payload_size / 2);
       break;
     case PACKET_SUPPORT_UNKNOWN:
       internal_error (__FILE__, __LINE__,
@@ -3815,20 +3801,25 @@ remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
       internal_error (__FILE__, __LINE__, "bad switch");
     }
   
-  /* Append <memaddr> */
+  /* Append "<memaddr>".  */
   memaddr = remote_address_masked (memaddr);
   p += hexnumstr (p, (ULONGEST) memaddr);
+
+  /* Append ",".  */
   *p++ = ',';
   
-  /* Append <len>.  Retain the location/size of <len>.  It may
-     need to be adjusted once the packet body has been created. */
+  /* Append <len>.  Retain the location/size of <len>.  It may need to
+     be adjusted once the packet body has been created.  */
   plen = p;
   plenlen = hexnumstr (p, (ULONGEST) todo);
   p += plenlen;
+
+  /* Append ":".  */
   *p++ = ':';
   *p = '\0';
   
-  /* Append the packet body. */
+  /* Append the packet body.  */
+  payload_start = p;
   switch (remote_protocol_binary_download.support)
     {
     case PACKET_ENABLE:
@@ -3836,7 +3827,7 @@ remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
         increasing byte addresses.  Only escape certain critical
         characters.  */
       for (nr_bytes = 0;
-          (nr_bytes < todo) && (p - buf) < (max_buf_size - 2);
+          (nr_bytes < todo) && (p - payload_start) < payload_size;
           nr_bytes++)
        {
          switch (myaddr[nr_bytes] & 0xff)
@@ -3859,7 +3850,6 @@ remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
             and we have actually sent fewer bytes than planned.
             Fix-up the length field of the packet.  Use the same
             number of characters as before.  */
-         
          plen += hexnumnstr (plen, (ULONGEST) nr_bytes, plenlen);
          *plen = ':';  /* overwrite \0 from hexnumnstr() */
        }
@@ -6069,8 +6059,7 @@ _initialize_remote (void)
   struct cmd_list_element *tmpcmd;
 
   /* architecture specific data */
-  remote_gdbarch_data_handle = register_gdbarch_data (init_remote_state,
-                                                     free_remote_state);
+  remote_gdbarch_data_handle = register_gdbarch_data (init_remote_state);
 
   /* Old tacky stuff.  NOTE: This comes after the remote protocol so
      that the remote protocol has been initialized.  */
index e825529ba95876f257149662828946ccb7574a17..ea2457040aafe2fb8fd48371ec0ffadb3c9eda73 100644 (file)
@@ -664,7 +664,9 @@ vmap_symtab (struct vmap *vp)
     /* If symbols are not yet loaded, offsets are not yet valid. */
     return;
 
-  new_offsets = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
+  new_offsets =
+    (struct section_offsets *)
+    alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
 
   for (i = 0; i < objfile->num_sections; ++i)
     new_offsets->offsets[i] = ANOFFSET (objfile->section_offsets, i);
index 87ddef0de16104308886dce15cc60337053e5d0c..0f3bd41f764a37a1b6441201bcf1b8cf91be8c1f 100644 (file)
@@ -93,7 +93,9 @@ s390_register_byte (int reg_nr)
 #define S390X_SIGREGS_FP0_OFFSET      (216)
 #define S390_UC_MCONTEXT_OFFSET    (256)
 #define S390X_UC_MCONTEXT_OFFSET   (344)
-#define S390_STACK_FRAME_OVERHEAD  (GDB_TARGET_IS_ESAME ? 160:96)
+#define S390_STACK_FRAME_OVERHEAD  16*DEPRECATED_REGISTER_SIZE+32
+#define S390_STACK_PARAMETER_ALIGNMENT  DEPRECATED_REGISTER_SIZE
+#define S390_NUM_FP_PARAMETER_REGISTERS (GDB_TARGET_IS_ESAME ? 4:2)
 #define S390_SIGNAL_FRAMESIZE  (GDB_TARGET_IS_ESAME ? 160:96)
 #define s390_NR_sigreturn          119
 #define s390_NR_rt_sigreturn       173
@@ -111,6 +113,7 @@ struct frame_extra_info
   CORE_ADDR sig_fixed_saved_pc_valid;
   CORE_ADDR sig_fixed_saved_pc;
   CORE_ADDR frame_pointer_saved_pc;    /* frame pointer needed for alloca */
+  CORE_ADDR stack_bought_valid;
   CORE_ADDR stack_bought;      /* amount we decrement the stack pointer by */
   CORE_ADDR sigcontext;
 };
@@ -186,491 +189,1297 @@ s390_stab_reg_to_regnum (int regno)
 }
 
 
-/* Return true if REGIDX is the number of a register used to pass
-     arguments, false otherwise.  */
+/* Prologue analysis.  */
+
+/* When we analyze a prologue, we're really doing 'abstract
+   interpretation' or 'pseudo-evaluation': running the function's code
+   in simulation, but using conservative approximations of the values
+   it would have when it actually runs.  For example, if our function
+   starts with the instruction:
+
+      ahi r1, 42     # add halfword immediate 42 to r1
+
+   we don't know exactly what value will be in r1 after executing this
+   instruction, but we do know it'll be 42 greater than its original
+   value.
+
+   If we then see an instruction like:
+
+      ahi r1, 22     # add halfword immediate 22 to r1
+
+   we still don't know what r1's value is, but again, we can say it is
+   now 64 greater than its original value.
+
+   If the next instruction were:
+
+      lr r2, r1      # set r2 to r1's value
+
+   then we can say that r2's value is now the original value of r1
+   plus 64.  And so on.
+
+   Of course, this can only go so far before it gets unreasonable.  If
+   we wanted to be able to say anything about the value of r1 after
+   the instruction:
+
+      xr r1, r3      # exclusive-or r1 and r3, place result in r1
+
+   then things would get pretty complex.  But remember, we're just
+   doing a conservative approximation; if exclusive-or instructions
+   aren't relevant to prologues, we can just say r1's value is now
+   'unknown'.  We can ignore things that are too complex, if that loss
+   of information is acceptable for our application.
+
+   Once you've reached an instruction that you don't know how to
+   simulate, you stop.  Now you examine the state of the registers and
+   stack slots you've kept track of.  For example:
+
+   - To see how large your stack frame is, just check the value of sp;
+     if it's the original value of sp minus a constant, then that
+     constant is the stack frame's size.  If the sp's value has been
+     marked as 'unknown', then that means the prologue has done
+     something too complex for us to track, and we don't know the
+     frame size.
+
+   - To see whether we've saved the SP in the current frame's back
+     chain slot, we just check whether the current value of the back
+     chain stack slot is the original value of the sp.
+
+   Sure, this takes some work.  But prologue analyzers aren't
+   quick-and-simple pattern patching to recognize a few fixed prologue
+   forms any more; they're big, hairy functions.  Along with inferior
+   function calls, prologue analysis accounts for a substantial
+   portion of the time needed to stabilize a GDB port.  So I think
+   it's worthwhile to look for an approach that will be easier to
+   understand and maintain.  In the approach used here:
+
+   - It's easier to see that the analyzer is correct: you just see
+     whether the analyzer properly (albiet conservatively) simulates
+     the effect of each instruction.
+
+   - It's easier to extend the analyzer: you can add support for new
+     instructions, and know that you haven't broken anything that
+     wasn't already broken before.
+
+   - It's orthogonal: to gather new information, you don't need to
+     complicate the code for each instruction.  As long as your domain
+     of conservative values is already detailed enough to tell you
+     what you need, then all the existing instruction simulations are
+     already gathering the right data for you.
+
+   A 'struct prologue_value' is a conservative approximation of the
+   real value the register or stack slot will have.  */
+
+struct prologue_value {
+
+  /* What sort of value is this?  This determines the interpretation
+     of subsequent fields.  */
+  enum {
+
+    /* We don't know anything about the value.  This is also used for
+       values we could have kept track of, when doing so would have
+       been too complex and we don't want to bother.  The bottom of
+       our lattice.  */
+    pv_unknown,
+
+    /* A known constant.  K is its value.  */
+    pv_constant,
+
+    /* The value that register REG originally had *UPON ENTRY TO THE
+       FUNCTION*, plus K.  If K is zero, this means, obviously, just
+       the value REG had upon entry to the function.  REG is a GDB
+       register number.  Before we start interpreting, we initialize
+       every register R to { pv_register, R, 0 }.  */
+    pv_register,
+
+  } kind;
+
+  /* The meanings of the following fields depend on 'kind'; see the
+     comments for the specific 'kind' values.  */
+  int reg;
+  CORE_ADDR k;
+};
+
+
+/* Set V to be unknown.  */
+static void
+pv_set_to_unknown (struct prologue_value *v)
+{
+  v->kind = pv_unknown;
+}
+
+
+/* Set V to the constant K.  */
+static void
+pv_set_to_constant (struct prologue_value *v, CORE_ADDR k)
+{
+  v->kind = pv_constant;
+  v->k = k;
+}
+
+
+/* Set V to the original value of register REG, plus K.  */
+static void
+pv_set_to_register (struct prologue_value *v, int reg, CORE_ADDR k)
+{
+  v->kind = pv_register;
+  v->reg = reg;
+  v->k = k;
+}
+
+
+/* If one of *A and *B is a constant, and the other isn't, swap the
+   pointers as necessary to ensure that *B points to the constant.
+   This can reduce the number of cases we need to analyze in the
+   functions below.  */
+static void
+pv_constant_last (struct prologue_value **a,
+                  struct prologue_value **b)
+{
+  if ((*a)->kind == pv_constant
+      && (*b)->kind != pv_constant)
+    {
+      struct prologue_value *temp = *a;
+      *a = *b;
+      *b = temp;
+    }
+}
+
+
+/* Set SUM to the sum of A and B.  SUM, A, and B may point to the same
+   'struct prologue_value' object.  */
+static void
+pv_add (struct prologue_value *sum,
+        struct prologue_value *a,
+        struct prologue_value *b)
+{
+  pv_constant_last (&a, &b);
+
+  /* We can handle adding constants to registers, and other constants.  */
+  if (b->kind == pv_constant
+      && (a->kind == pv_register
+          || a->kind == pv_constant))
+    {
+      sum->kind = a->kind;
+      sum->reg = a->reg;    /* not meaningful if a is pv_constant, but
+                               harmless */
+      sum->k = a->k + b->k;
+    }
+
+  /* Anything else we don't know how to add.  We don't have a
+     representation for, say, the sum of two registers, or a multiple
+     of a register's value (adding a register to itself).  */
+  else
+    sum->kind = pv_unknown;
+}
+
+
+/* Add the constant K to V.  */
+static void
+pv_add_constant (struct prologue_value *v, CORE_ADDR k)
+{
+  struct prologue_value pv_k;
+
+  /* Rather than thinking of all the cases we can and can't handle,
+     we'll just let pv_add take care of that for us.  */
+  pv_set_to_constant (&pv_k, k);
+  pv_add (v, v, &pv_k);
+}
+
+
+/* Subtract B from A, and put the result in DIFF.
+
+   This isn't quite the same as negating B and adding it to A, since
+   we don't have a representation for the negation of anything but a
+   constant.  For example, we can't negate { pv_register, R1, 10 },
+   but we do know that { pv_register, R1, 10 } minus { pv_register,
+   R1, 5 } is { pv_constant, <ignored>, 5 }.
+
+   This means, for example, that we can subtract two stack addresses;
+   they're both relative to the original SP.  Since the frame pointer
+   is set based on the SP, its value will be the original SP plus some
+   constant (probably zero), so we can use its value just fine.  */
+static void
+pv_subtract (struct prologue_value *diff,
+             struct prologue_value *a,
+             struct prologue_value *b)
+{
+  pv_constant_last (&a, &b);
+
+  /* We can subtract a constant from another constant, or from a
+     register.  */
+  if (b->kind == pv_constant
+      && (a->kind == pv_register
+          || a->kind == pv_constant))
+    {
+      diff->kind = a->kind;
+      diff->reg = a->reg;    /* not always meaningful, but harmless */
+      diff->k = a->k - b->k;
+    }
+
+  /* We can subtract a register from itself, yielding a constant.  */
+  else if (a->kind == pv_register
+           && b->kind == pv_register
+           && a->reg == b->reg)
+    {
+      diff->kind = pv_constant;
+      diff->k = a->k - b->k;
+    }
+
+  /* We don't know how to subtract anything else.  */
+  else
+    diff->kind = pv_unknown;
+}
+
+
+/* Set AND to the logical and of A and B.  */
+static void
+pv_logical_and (struct prologue_value *and,
+                struct prologue_value *a,
+                struct prologue_value *b)
+{
+  pv_constant_last (&a, &b);
+
+  /* We can 'and' two constants.  */
+  if (a->kind == pv_constant
+      && b->kind == pv_constant)
+    {
+      and->kind = pv_constant;
+      and->k = a->k & b->k;
+    }
+
+  /* We can 'and' anything with the constant zero.  */
+  else if (b->kind == pv_constant
+           && b->k == 0)
+    {
+      and->kind = pv_constant;
+      and->k = 0;
+    }
+  
+  /* We can 'and' anything with ~0.  */
+  else if (b->kind == pv_constant
+           && b->k == ~ (CORE_ADDR) 0)
+    *and = *a;
+
+  /* We can 'and' a register with itself.  */
+  else if (a->kind == pv_register
+           && b->kind == pv_register
+           && a->reg == b->reg
+           && a->k == b->k)
+    *and = *a;
+
+  /* Otherwise, we don't know.  */
+  else
+    pv_set_to_unknown (and);
+}
+
+
+/* Return non-zero iff A and B are identical expressions.
+
+   This is not the same as asking if the two values are equal; the
+   result of such a comparison would have to be a pv_boolean, and
+   asking whether two 'unknown' values were equal would give you
+   pv_maybe.  Same for comparing, say, { pv_register, R1, 0 } and {
+   pv_register, R2, 0}.  Instead, this is asking whether the two
+   representations are the same.  */
 static int
-is_arg_reg (int regidx)
+pv_is_identical (struct prologue_value *a,
+                 struct prologue_value *b)
 {
-  return 2 <= regidx && regidx <= 6;
+  if (a->kind != b->kind)
+    return 0;
+
+  switch (a->kind)
+    {
+    case pv_unknown:
+      return 1;
+    case pv_constant:
+      return (a->k == b->k);
+    case pv_register:
+      return (a->reg == b->reg && a->k == b->k);
+    default:
+      gdb_assert (0);
+    }
 }
 
 
-/* s390_get_frame_info based on Hartmuts
-   prologue definition in
-   gcc-2.8.1/config/l390/linux.c 
+/* Return non-zero if A is the original value of register number R
+   plus K, zero otherwise.  */
+static int
+pv_is_register (struct prologue_value *a, int r, CORE_ADDR k)
+{
+  return (a->kind == pv_register
+          && a->reg == r
+          && a->k == k);
+}
+
+
+/* A prologue-value-esque boolean type, including "maybe", when we
+   can't figure out whether something is true or not.  */
+enum pv_boolean {
+  pv_maybe,
+  pv_definite_yes,
+  pv_definite_no,
+};
+
+
+/* Decide whether a reference to SIZE bytes at ADDR refers exactly to
+   an element of an array.  The array starts at ARRAY_ADDR, and has
+   ARRAY_LEN values of ELT_SIZE bytes each.  If ADDR definitely does
+   refer to an array element, set *I to the index of the referenced
+   element in the array, and return pv_definite_yes.  If it definitely
+   doesn't, return pv_definite_no.  If we can't tell, return pv_maybe.
+
+   If the reference does touch the array, but doesn't fall exactly on
+   an element boundary, or doesn't refer to the whole element, return
+   pv_maybe.  */
+static enum pv_boolean
+pv_is_array_ref (struct prologue_value *addr,
+                 CORE_ADDR size,
+                 struct prologue_value *array_addr,
+                 CORE_ADDR array_len, 
+                 CORE_ADDR elt_size,
+                 int *i)
+{
+  struct prologue_value offset;
+
+  /* Note that, since ->k is a CORE_ADDR, and CORE_ADDR is unsigned,
+     if addr is *before* the start of the array, then this isn't going
+     to be negative...  */
+  pv_subtract (&offset, addr, array_addr);
+
+  if (offset.kind == pv_constant)
+    {
+      /* This is a rather odd test.  We want to know if the SIZE bytes
+         at ADDR don't overlap the array at all, so you'd expect it to
+         be an || expression: "if we're completely before || we're
+         completely after".  But with unsigned arithmetic, things are
+         different: since it's a number circle, not a number line, the
+         right values for offset.k are actually one contiguous range.  */
+      if (offset.k <= -size
+          && offset.k >= array_len * elt_size)
+        return pv_definite_no;
+      else if (offset.k % elt_size != 0
+               || size != elt_size)
+        return pv_maybe;
+      else
+        {
+          *i = offset.k / elt_size;
+          return pv_definite_yes;
+        }
+    }
+  else
+    return pv_maybe;
+}
 
-   It reads one instruction at a time & based on whether
-   it looks like prologue code or not it makes a decision on
-   whether the prologue is over, there are various state machines
-   in the code to determine if the prologue code is possilby valid.
-   
-   This is done to hopefully allow the code survive minor revs of
-   calling conventions.
 
- */
 
+/* Decoding S/390 instructions.  */
+
+/* Named opcode values for the S/390 instructions we recognize.  Some
+   instructions have their opcode split across two fields; those are the
+   op1_* and op2_* enums.  */
+enum
+  {
+    op1_aghi = 0xa7,   op2_aghi = 0xb,
+    op1_ahi  = 0xa7,   op2_ahi  = 0xa,
+    op_ar    = 0x1a,
+    op_basr  = 0x0d,
+    op1_bras = 0xa7,   op2_bras = 0x5,
+    op_l     = 0x58,
+    op_la    = 0x41,
+    op1_larl = 0xc0,   op2_larl = 0x0,
+    op_lgr   = 0xb904,
+    op1_lghi = 0xa7,   op2_lghi = 0x9,
+    op1_lhi  = 0xa7,   op2_lhi  = 0x8,
+    op_lr    = 0x18,
+    op_nr    = 0x14,
+    op_ngr   = 0xb980,
+    op_s     = 0x5b,
+    op_st    = 0x50,
+    op_std   = 0x60,
+    op1_stg  = 0xe3,   op2_stg  = 0x24,
+    op_stm   = 0x90,
+    op1_stmg = 0xeb,   op2_stmg = 0x24,
+    op_svc   = 0x0a,
+  };
+
+
+/* The functions below are for recognizing and decoding S/390
+   instructions of various formats.  Each of them checks whether INSN
+   is an instruction of the given format, with the specified opcodes.
+   If it is, it sets the remaining arguments to the values of the
+   instruction's fields, and returns a non-zero value; otherwise, it
+   returns zero.
+
+   These functions' arguments appear in the order they appear in the
+   instruction, not in the machine-language form.  So, opcodes always
+   come first, even though they're sometimes scattered around the
+   instructions.  And displacements appear before base and extension
+   registers, as they do in the assembly syntax, not at the end, as
+   they do in the machine language.  */
 static int
-s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info,
-                    struct frame_info *fi, int init_extra_info)
+is_ri (bfd_byte *insn, int op1, int op2, unsigned int *r1, int *i2)
 {
-#define CONST_POOL_REGIDX 13
-#define GOT_REGIDX        12
-  bfd_byte instr[S390_MAX_INSTR_SIZE];
-  CORE_ADDR test_pc = pc, test_pc2;
-  CORE_ADDR orig_sp = 0, save_reg_addr = 0, *saved_regs = NULL;
-  int valid_prologue, good_prologue = 0;
-  int gprs_saved[S390_NUM_GPRS];
-  int fprs_saved[S390_NUM_FPRS];
-  int regidx, instrlen;
-  int const_pool_state;
-  int varargs_state;
-  int loop_cnt, gdb_gpr_store, gdb_fpr_store;
-  int offset, expected_offset;
-  int err = 0;
-  disassemble_info info;
+  if (insn[0] == op1 && (insn[1] & 0xf) == op2)
+    {
+      *r1 = (insn[1] >> 4) & 0xf;
+      /* i2 is a 16-bit signed quantity.  */
+      *i2 = (((insn[2] << 8) | insn[3]) ^ 0x8000) - 0x8000;
+      return 1;
+    }
+  else
+    return 0;
+}
 
-  /* Have we seen an instruction initializing the frame pointer yet?
-     If we've seen an `lr %r11, %r15', then frame_pointer_found is
-     non-zero, and frame_pointer_regidx == 11.  Otherwise,
-     frame_pointer_found is zero and frame_pointer_regidx is 15,
-     indicating that we're using the stack pointer as our frame
-     pointer.  */
-  int frame_pointer_found = 0;
-  int frame_pointer_regidx = 0xf;
-
-  /* What we've seen so far regarding saving the back chain link:
-     0 -- nothing yet; sp still has the same value it had at the entry
-          point.  Since not all functions allocate frames, this is a
-          valid state for the prologue to finish in.
-     1 -- We've saved the original sp in some register other than the
-          frame pointer (hard-coded to be %r11, yuck).
-          save_link_regidx is the register we saved it in.
-     2 -- We've seen the initial `bras' instruction of the sequence for
-          reserving more than 32k of stack:
-                bras %rX, .+8
-                .long N
-                s %r15, 0(%rX)
-          where %rX is not the constant pool register.
-          subtract_sp_regidx is %rX, and fextra_info->stack_bought is N.
-     3 -- We've reserved space for a new stack frame.  This means we
-          either saw a simple `ahi %r15,-N' in state 1, or the final
-          `s %r15, ...' in state 2.
-     4 -- The frame and link are now fully initialized.  We've
-          reserved space for the new stack frame, and stored the old
-          stack pointer captured in the back chain pointer field.  */
-  int save_link_state = 0;
-  int save_link_regidx, subtract_sp_regidx;
-
-  /* What we've seen so far regarding r12 --- the GOT (Global Offset
-     Table) pointer.  We expect to see `l %r12, N(%r13)', which loads
-     r12 with the offset from the constant pool to the GOT, and then
-     an `ar %r12, %r13', which adds the constant pool address,
-     yielding the GOT's address.  Here's what got_state means:
-     0 -- seen nothing
-     1 -- seen `l %r12, N(%r13)', but no `ar'
-     2 -- seen load and add, so GOT pointer is totally initialized
-     When got_state is 1, then got_load_addr is the address of the
-     load instruction, and got_load_len is the length of that
-     instruction.  */
-  int got_state= 0;
-  CORE_ADDR got_load_addr = 0, got_load_len = 0;
-
-  const_pool_state = varargs_state = 0;
-
-  memset (gprs_saved, 0, sizeof (gprs_saved));
-  memset (fprs_saved, 0, sizeof (fprs_saved));
-  info.read_memory_func = deprecated_tm_print_insn_info.read_memory_func;
 
-  save_link_regidx = subtract_sp_regidx = 0;
-  if (fextra_info)
+static int
+is_ril (bfd_byte *insn, int op1, int op2,
+        unsigned int *r1, int *i2)
+{
+  if (insn[0] == op1 && (insn[1] & 0xf) == op2)
     {
-      if (fi && get_frame_base (fi))
-       {
-          orig_sp = get_frame_base (fi);
-          if (! init_extra_info && fextra_info->initialised)
-            orig_sp += fextra_info->stack_bought;
-         saved_regs = get_frame_saved_regs (fi);
-       }
-      if (init_extra_info || !fextra_info->initialised)
-       {
-         s390_memset_extra_info (fextra_info);
-         fextra_info->function_start = pc;
-         fextra_info->initialised = 1;
-       }
+      *r1 = (insn[1] >> 4) & 0xf;
+      /* i2 is a signed quantity.  If the host 'int' is 32 bits long,
+         no sign extension is necessary, but we don't want to assume
+         that.  */
+      *i2 = (((insn[2] << 24)
+              | (insn[3] << 16)
+              | (insn[4] << 8)
+              | (insn[5])) ^ 0x80000000) - 0x80000000;
+      return 1;
     }
-  instrlen = 0;
-  do
+  else
+    return 0;
+}
+
+
+static int
+is_rr (bfd_byte *insn, int op, unsigned int *r1, unsigned int *r2)
+{
+  if (insn[0] == op)
     {
-      valid_prologue = 0;
-      test_pc += instrlen;
-      /* add the previous instruction len */
-      instrlen = s390_readinstruction (instr, test_pc, &info);
-      if (instrlen < 0)
-       {
-         good_prologue = 0;
-         err = -1;
-         break;
-       }
-      /* We probably are in a glibc syscall */
-      if (instr[0] == S390_SYSCALL_OPCODE && test_pc == pc)
-       {
-         good_prologue = 1;
-         if (saved_regs && fextra_info && get_next_frame (fi)
-             && get_frame_extra_info (get_next_frame (fi))
-             && get_frame_extra_info (get_next_frame (fi))->sigcontext)
-           {
-             /* We are backtracing from a signal handler */
-             save_reg_addr = get_frame_extra_info (get_next_frame (fi))->sigcontext +
-               REGISTER_BYTE (S390_GP0_REGNUM);
-             for (regidx = 0; regidx < S390_NUM_GPRS; regidx++)
-               {
-                 saved_regs[S390_GP0_REGNUM + regidx] = save_reg_addr;
-                 save_reg_addr += S390_GPR_SIZE;
-               }
-             save_reg_addr = get_frame_extra_info (get_next_frame (fi))->sigcontext +
-               (GDB_TARGET_IS_ESAME ? S390X_SIGREGS_FP0_OFFSET :
-                S390_SIGREGS_FP0_OFFSET);
-             for (regidx = 0; regidx < S390_NUM_FPRS; regidx++)
-               {
-                 saved_regs[S390_FP0_REGNUM + regidx] = save_reg_addr;
-                 save_reg_addr += S390_FPR_SIZE;
-               }
-           }
-         break;
-       }
-      if (save_link_state == 0)
-       {
-         /* check for a stack relative STMG or STM */
-         if (((GDB_TARGET_IS_ESAME &&
-               ((instr[0] == 0xeb) && (instr[5] == 0x24))) ||
-              (instr[0] == 0x90)) && ((instr[2] >> 4) == 0xf))
-           {
-             regidx = (instr[1] >> 4);
-             if (regidx < 6)
-               varargs_state = 1;
-             offset = ((instr[2] & 0xf) << 8) + instr[3];
-             expected_offset =
-               S390_GPR6_STACK_OFFSET + (S390_GPR_SIZE * (regidx - 6));
-             if (offset != expected_offset)
-               {
-                 good_prologue = 0;
-                 break;
-               }
-             if (saved_regs)
-               save_reg_addr = orig_sp + offset;
-             for (; regidx <= (instr[1] & 0xf); regidx++)
-               {
-                 if (gprs_saved[regidx])
-                   {
-                     good_prologue = 0;
-                     break;
-                   }
-                 good_prologue = 1;
-                 gprs_saved[regidx] = 1;
-                 if (saved_regs)
-                   {
-                     saved_regs[S390_GP0_REGNUM + regidx] = save_reg_addr;
-                     save_reg_addr += S390_GPR_SIZE;
-                   }
-               }
-             valid_prologue = 1;
-             continue;
-           }
-       }
-      /* check for a stack relative STG or ST */
-      if ((save_link_state == 0 || save_link_state == 3) &&
-         ((GDB_TARGET_IS_ESAME &&
-           ((instr[0] == 0xe3) && (instr[5] == 0x24))) ||
-          (instr[0] == 0x50)) && ((instr[2] >> 4) == 0xf))
-       {
-         regidx = instr[1] >> 4;
-         offset = ((instr[2] & 0xf) << 8) + instr[3];
-         if (offset == 0)
-           {
-             if (save_link_state == 3 && regidx == save_link_regidx)
-               {
-                 save_link_state = 4;
-                 valid_prologue = 1;
-                 continue;
-               }
-             else
-               break;
-           }
-         if (regidx < 6)
-           varargs_state = 1;
-         expected_offset =
-           S390_GPR6_STACK_OFFSET + (S390_GPR_SIZE * (regidx - 6));
-         if (offset != expected_offset)
-           {
-             good_prologue = 0;
-             break;
-           }
-         if (gprs_saved[regidx])
-           {
-             good_prologue = 0;
-             break;
-           }
-         good_prologue = 1;
-         gprs_saved[regidx] = 1;
-         if (saved_regs)
-           {
-             save_reg_addr = orig_sp + offset;
-             saved_regs[S390_GP0_REGNUM + regidx] = save_reg_addr;
-           }
-         valid_prologue = 1;
-         continue;
-       }
+      *r1 = (insn[1] >> 4) & 0xf;
+      *r2 = insn[1] & 0xf;
+      return 1;
+    }
+  else
+    return 0;
+}
+
+
+static int
+is_rre (bfd_byte *insn, int op, unsigned int *r1, unsigned int *r2)
+{
+  if (((insn[0] << 8) | insn[1]) == op)
+    {
+      /* Yes, insn[3].  insn[2] is unused in RRE format.  */
+      *r1 = (insn[3] >> 4) & 0xf;
+      *r2 = insn[3] & 0xf;
+      return 1;
+    }
+  else
+    return 0;
+}
+
+
+static int
+is_rs (bfd_byte *insn, int op,
+       unsigned int *r1, unsigned int *r3, unsigned int *d2, unsigned int *b2)
+{
+  if (insn[0] == op)
+    {
+      *r1 = (insn[1] >> 4) & 0xf;
+      *r3 = insn[1] & 0xf;
+      *b2 = (insn[2] >> 4) & 0xf;
+      *d2 = ((insn[2] & 0xf) << 8) | insn[3];
+      return 1;
+    }
+  else
+    return 0;
+}
+
+
+static int
+is_rse (bfd_byte *insn, int op1, int op2,
+        unsigned int *r1, unsigned int *r3, unsigned int *d2, unsigned int *b2)
+{
+  if (insn[0] == op1
+      /* Yes, insn[5].  insn[4] is unused.  */
+      && insn[5] == op2)
+    {
+      *r1 = (insn[1] >> 4) & 0xf;
+      *r3 = insn[1] & 0xf;
+      *b2 = (insn[2] >> 4) & 0xf;
+      *d2 = ((insn[2] & 0xf) << 8) | insn[3];
+      return 1;
+    }
+  else
+    return 0;
+}
+
+
+static int
+is_rx (bfd_byte *insn, int op,
+       unsigned int *r1, unsigned int *d2, unsigned int *x2, unsigned int *b2)
+{
+  if (insn[0] == op)
+    {
+      *r1 = (insn[1] >> 4) & 0xf;
+      *x2 = insn[1] & 0xf;
+      *b2 = (insn[2] >> 4) & 0xf;
+      *d2 = ((insn[2] & 0xf) << 8) | insn[3];
+      return 1;
+    }
+  else
+    return 0;
+}
+
+
+static int
+is_rxe (bfd_byte *insn, int op1, int op2,
+        unsigned int *r1, unsigned int *d2, unsigned int *x2, unsigned int *b2)
+{
+  if (insn[0] == op1
+      /* Yes, insn[5].  insn[4] is unused.  */
+      && insn[5] == op2)
+    {
+      *r1 = (insn[1] >> 4) & 0xf;
+      *x2 = insn[1] & 0xf;
+      *b2 = (insn[2] >> 4) & 0xf;
+      *d2 = ((insn[2] & 0xf) << 8) | insn[3];
+      return 1;
+    }
+  else
+    return 0;
+}
+
+
+/* Set ADDR to the effective address for an X-style instruction, like:
+
+        L R1, D2(X2, B2)
+
+   Here, X2 and B2 are registers, and D2 is an unsigned 12-bit
+   constant; the effective address is the sum of all three.  If either
+   X2 or B2 are zero, then it doesn't contribute to the sum --- this
+   means that r0 can't be used as either X2 or B2.
 
-      /* Check for an fp-relative STG, ST, or STM.  This is probably
-          spilling an argument from a register out into a stack slot.
-          This could be a user instruction, but if we haven't included
-          any other suspicious instructions in the prologue, this
-          could only be an initializing store, which isn't too bad to
-          skip.  The consequences of not including arg-to-stack spills
-          are more serious, though --- you don't see the proper values
-          of the arguments.  */
-      if ((save_link_state == 3 || save_link_state == 4)
-          && ((instr[0] == 0x50      /* st %rA, D(%rX,%rB) */
-               && (instr[1] & 0xf) == 0 /* %rX is zero, no index reg */
-               && is_arg_reg ((instr[1] >> 4) & 0xf)
-               && ((instr[2] >> 4) & 0xf) == frame_pointer_regidx)
-              || (instr[0] == 0x90 /* stm %rA, %rB, D(%rC) */
-                  && is_arg_reg ((instr[1] >> 4) & 0xf)
-                  && is_arg_reg (instr[1] & 0xf)
-                  && ((instr[2] >> 4) & 0xf) == frame_pointer_regidx)))
+   GPR is an array of general register values, indexed by GPR number,
+   not GDB register number.  */
+static void
+compute_x_addr (struct prologue_value *addr, 
+                struct prologue_value *gpr,
+                unsigned int d2, unsigned int x2, unsigned int b2)
+{
+  /* We can't just add stuff directly in addr; it might alias some of
+     the registers we need to read.  */
+  struct prologue_value result;
+
+  pv_set_to_constant (&result, d2);
+  if (x2)
+    pv_add (&result, &result, &gpr[x2]);
+  if (b2)
+    pv_add (&result, &result, &gpr[b2]);
+
+  *addr = result;
+}
+
+
+/* The number of GPR and FPR spill slots in an S/390 stack frame.  We
+   track general-purpose registers r2 -- r15, and floating-point
+   registers f0, f2, f4, and f6.  */
+#define S390_NUM_SPILL_SLOTS (14 + 4)
+
+
+/* If the SIZE bytes at ADDR are a stack slot we're actually tracking,
+   return pv_definite_yes and set *STACK to point to the slot.  If
+   we're sure that they are not any of our stack slots, then return
+   pv_definite_no.  Otherwise, return pv_maybe.
+   - GPR is an array indexed by GPR number giving the current values
+     of the general-purpose registers.
+   - SPILL is an array tracking the spill area of the caller's frame;
+     SPILL[i] is the i'th spill slot.  The spill slots are designated
+     for r2 -- r15, and then f0, f2, f4, and f6.
+   - BACK_CHAIN is the value of the back chain slot; it's only valid
+     when the current frame actually has some space for a back chain
+     slot --- that is, when the current value of the stack pointer
+     (according to GPR) is at least S390_STACK_FRAME_OVERHEAD bytes
+     less than its original value.  */
+static enum pv_boolean
+s390_on_stack (struct prologue_value *addr,
+               CORE_ADDR size,
+               struct prologue_value *gpr,
+               struct prologue_value *spill, 
+               struct prologue_value *back_chain,
+               struct prologue_value **stack)
+{
+  struct prologue_value gpr_spill_addr;
+  struct prologue_value fpr_spill_addr;
+  struct prologue_value back_chain_addr;  
+  int i;
+  enum pv_boolean b;
+
+  /* Construct the addresses of the spill arrays and the back chain.  */
+  pv_set_to_register (&gpr_spill_addr, S390_SP_REGNUM, 2 * S390_GPR_SIZE);
+  pv_set_to_register (&fpr_spill_addr, S390_SP_REGNUM, 16 * S390_GPR_SIZE);
+  back_chain_addr = gpr[S390_SP_REGNUM - S390_GP0_REGNUM];
+
+  /* We have to check for GPR and FPR references using two separate
+     calls to pv_is_array_ref, since the GPR and FPR spill slots are
+     different sizes.  (SPILL is an array, but the thing it tracks
+     isn't really an array.)  */
+
+  /* Was it a reference to the GPR spill array?  */
+  b = pv_is_array_ref (addr, size, &gpr_spill_addr, 14, S390_GPR_SIZE, &i);
+  if (b == pv_definite_yes)
+    {
+      *stack = &spill[i];
+      return pv_definite_yes;
+    }
+  if (b == pv_maybe)
+    return pv_maybe;
+
+  /* Was it a reference to the FPR spill array?  */
+  b = pv_is_array_ref (addr, size, &fpr_spill_addr, 4, S390_FPR_SIZE, &i);
+  if (b == pv_definite_yes)
+    {
+      *stack = &spill[14 + i];
+      return pv_definite_yes;
+    }
+  if (b == pv_maybe)
+    return pv_maybe;
+
+  /* Was it a reference to the back chain?
+     This isn't quite right.  We ought to check whether we have
+     actually allocated any new frame at all.  */
+  b = pv_is_array_ref (addr, size, &back_chain_addr, 1, S390_GPR_SIZE, &i);
+  if (b == pv_definite_yes)
+    {
+      *stack = back_chain;
+      return pv_definite_yes;
+    }
+  if (b == pv_maybe)
+    return pv_maybe;
+
+  /* All the above queries returned definite 'no's.  */
+  return pv_definite_no;
+}
+
+
+/* Do a SIZE-byte store of VALUE to ADDR.  GPR, SPILL, and BACK_CHAIN,
+   and the return value are as described for s390_on_stack, above.
+   Note that, when this returns pv_maybe, we have to assume that all
+   of our memory now contains unknown values.  */
+static enum pv_boolean
+s390_store (struct prologue_value *addr,
+            CORE_ADDR size,
+            struct prologue_value *value,
+            struct prologue_value *gpr,
+            struct prologue_value *spill, 
+            struct prologue_value *back_chain)
+{
+  struct prologue_value *stack;
+  enum pv_boolean on_stack
+    = s390_on_stack (addr, size, gpr, spill, back_chain, &stack);
+
+  if (on_stack == pv_definite_yes)
+    *stack = *value;
+
+  return on_stack;
+}
+            
+
+/* The current frame looks like a signal delivery frame: the first
+   instruction is an 'svc' opcode.  If the next frame is a signal
+   handler's frame, set FI's saved register map to point into the
+   signal context structure.  */
+static void
+s390_get_signal_frame_info (struct frame_info *fi)
+{
+  struct frame_info *next_frame = get_next_frame (fi);
+
+  if (next_frame
+      && get_frame_extra_info (next_frame)
+      && get_frame_extra_info (next_frame)->sigcontext)
+    {
+      /* We're definitely backtracing from a signal handler.  */
+      CORE_ADDR *saved_regs = get_frame_saved_regs (fi);
+      CORE_ADDR save_reg_addr = (get_frame_extra_info (next_frame)->sigcontext
+                                 + REGISTER_BYTE (S390_GP0_REGNUM));
+      int reg;
+
+      for (reg = 0; reg < S390_NUM_GPRS; reg++)
         {
-          valid_prologue = 1;
-          continue;
+          saved_regs[S390_GP0_REGNUM + reg] = save_reg_addr;
+          save_reg_addr += S390_GPR_SIZE;
         }
 
-      /* check for STD */
-      if (instr[0] == 0x60 && (instr[2] >> 4) == 0xf)
-       {
-         regidx = instr[1] >> 4;
-         if (regidx == 0 || regidx == 2)
-           varargs_state = 1;
-         if (fprs_saved[regidx])
-           {
-             good_prologue = 0;
-             break;
-           }
-         fprs_saved[regidx] = 1;
-         if (saved_regs)
-           {
-             save_reg_addr = orig_sp + (((instr[2] & 0xf) << 8) + instr[3]);
-             saved_regs[S390_FP0_REGNUM + regidx] = save_reg_addr;
-           }
-         valid_prologue = 1;
-         continue;
-       }
+      save_reg_addr = (get_frame_extra_info (next_frame)->sigcontext
+                       + (GDB_TARGET_IS_ESAME ? S390X_SIGREGS_FP0_OFFSET :
+                          S390_SIGREGS_FP0_OFFSET));
+      for (reg = 0; reg < S390_NUM_FPRS; reg++)
+        {
+          saved_regs[S390_FP0_REGNUM + reg] = save_reg_addr;
+          save_reg_addr += S390_FPR_SIZE;
+        }
+    }
+}
 
 
-      if (const_pool_state == 0)
-       {
+static int
+s390_get_frame_info (CORE_ADDR start_pc,
+                     struct frame_extra_info *fextra_info,
+                     struct frame_info *fi,
+                     int init_extra_info)
+{
+  /* Our return value:
+     zero if we were able to read all the instructions we wanted, or
+     -1 if we got an error trying to read memory.  */
+  int result = 0;
 
-         if (GDB_TARGET_IS_ESAME)
-           {
-             /* Check for larl CONST_POOL_REGIDX,offset on ESAME */
-             if ((instr[0] == 0xc0)
-                 && (instr[1] == (CONST_POOL_REGIDX << 4)))
-               {
-                 const_pool_state = 2;
-                 valid_prologue = 1;
-                 continue;
-               }
-           }
-         else
-           {
-             /* Check for BASR gpr13,gpr0 used to load constant pool pointer to r13 in old compiler */
-             if (instr[0] == 0xd && (instr[1] & 0xf) == 0
-                 && ((instr[1] >> 4) == CONST_POOL_REGIDX))
-               {
-                 const_pool_state = 1;
-                 valid_prologue = 1;
-                 continue;
-               }
-           }
-         /* Check for new fangled bras %r13,newpc to load new constant pool */
-         /* embedded in code, older pre abi compilers also emitted this stuff.  */
-         if ((instr[0] == 0xa7) && ((instr[1] & 0xf) == 0x5) &&
-             ((instr[1] >> 4) == CONST_POOL_REGIDX)
-             && ((instr[2] & 0x80) == 0))
-           {
-             const_pool_state = 2;
-             test_pc +=
-               (((((instr[2] & 0xf) << 8) + instr[3]) << 1) - instrlen);
-             valid_prologue = 1;
-             continue;
-           }
-       }
-      /* Check for AGHI or AHI CONST_POOL_REGIDX,val */
-      if (const_pool_state == 1 && (instr[0] == 0xa7) &&
-         ((GDB_TARGET_IS_ESAME &&
-           (instr[1] == ((CONST_POOL_REGIDX << 4) | 0xb))) ||
-          (instr[1] == ((CONST_POOL_REGIDX << 4) | 0xa))))
-       {
-         const_pool_state = 2;
-         valid_prologue = 1;
-         continue;
-       }
-      /* Check for LGR or LR gprx,15 */
-      if ((GDB_TARGET_IS_ESAME &&
-          instr[0] == 0xb9 && instr[1] == 0x04 && (instr[3] & 0xf) == 0xf) ||
-         (instr[0] == 0x18 && (instr[1] & 0xf) == 0xf))
-       {
-         if (GDB_TARGET_IS_ESAME)
-           regidx = instr[3] >> 4;
-         else
-           regidx = instr[1] >> 4;
-         if (save_link_state == 0 && regidx != 0xb)
-           {
-             /* Almost defintely code for
-                decrementing the stack pointer 
-                ( i.e. a non leaf function 
-                or else leaf with locals ) */
-             save_link_regidx = regidx;
-             save_link_state = 1;
-             valid_prologue = 1;
-             continue;
-           }
-         /* We use this frame pointer for alloca
-            unfortunately we need to assume its gpr11
-            otherwise we would need a smarter prologue
-            walker. */
-         if (!frame_pointer_found && regidx == 0xb)
-           {
-             frame_pointer_regidx = 0xb;
-             frame_pointer_found = 1;
-             if (fextra_info)
-               fextra_info->frame_pointer_saved_pc = test_pc;
-             valid_prologue = 1;
-             continue;
-           }
-       }
-      /* Check for AHI or AGHI gpr15,val */
-      if (save_link_state == 1 && (instr[0] == 0xa7) &&
-         ((GDB_TARGET_IS_ESAME && (instr[1] == 0xfb)) || (instr[1] == 0xfa)))
-       {
-         if (fextra_info)
-           fextra_info->stack_bought =
-             -extract_signed_integer (&instr[2], 2);
-         save_link_state = 3;
-         valid_prologue = 1;
-         continue;
-       }
-      /* Alternatively check for the complex construction for
-         buying more than 32k of stack
-         BRAS gprx,.+8
-         long val
-         s    %r15,0(%gprx)  gprx currently r1 */
-      if ((save_link_state == 1) && (instr[0] == 0xa7)
-         && ((instr[1] & 0xf) == 0x5) && (instr[2] == 0)
-         && (instr[3] == 0x4) && ((instr[1] >> 4) != CONST_POOL_REGIDX))
-       {
-         subtract_sp_regidx = instr[1] >> 4;
-         save_link_state = 2;
-         if (fextra_info)
-           target_read_memory (test_pc + instrlen,
-                               (char *) &fextra_info->stack_bought,
-                               sizeof (fextra_info->stack_bought));
-         test_pc += 4;
-         valid_prologue = 1;
-         continue;
-       }
-      if (save_link_state == 2 && instr[0] == 0x5b
-         && instr[1] == 0xf0 &&
-         instr[2] == (subtract_sp_regidx << 4) && instr[3] == 0)
-       {
-         save_link_state = 3;
-         valid_prologue = 1;
-         continue;
-       }
-      /* check for LA gprx,offset(15) used for varargs */
-      if ((instr[0] == 0x41) && ((instr[2] >> 4) == 0xf) &&
-         ((instr[1] & 0xf) == 0))
-       {
-         /* some code uses gpr7 to point to outgoing args */
-         if (((instr[1] >> 4) == 7) && (save_link_state == 0) &&
-             ((instr[2] & 0xf) == 0)
-             && (instr[3] == S390_STACK_FRAME_OVERHEAD))
-           {
-             valid_prologue = 1;
-             continue;
-           }
-         if (varargs_state == 1)
-           {
-             varargs_state = 2;
-             valid_prologue = 1;
-             continue;
-           }
-       }
-      /* Check for a GOT load */
+  /* We just use this for reading instructions.  */
+  disassemble_info info;
 
-      if (GDB_TARGET_IS_ESAME)
-       {
-         /* Check for larl  GOT_REGIDX, on ESAME */
-         if ((got_state == 0) && (instr[0] == 0xc0)
-             && (instr[1] == (GOT_REGIDX << 4)))
-           {
-             got_state = 2;
-             valid_prologue = 1;
-             continue;
-           }
-       }
-      else
-       {
-         /* check for l GOT_REGIDX,x(CONST_POOL_REGIDX) */
-         if (got_state == 0 && const_pool_state == 2 && instr[0] == 0x58
-             && (instr[2] == (CONST_POOL_REGIDX << 4))
-             && ((instr[1] >> 4) == GOT_REGIDX))
-           {
-             got_state = 1;
-              got_load_addr = test_pc;
-              got_load_len = instrlen;
-             valid_prologue = 1;
-             continue;
-           }
-         /* Check for subsequent ar got_regidx,basr_regidx */
-         if (got_state == 1 && instr[0] == 0x1a &&
-             instr[1] == ((GOT_REGIDX << 4) | CONST_POOL_REGIDX))
-           {
-             got_state = 2;
-             valid_prologue = 1;
-             continue;
-           }
-       }
-    }
-  while (valid_prologue && good_prologue);
-  if (good_prologue)
+  /* The current PC for our abstract interpretation.  */
+  CORE_ADDR pc;
+
+  /* The address of the next instruction after that.  */
+  CORE_ADDR next_pc;
+  
+  /* The general-purpose registers.  */
+  struct prologue_value gpr[S390_NUM_GPRS];
+
+  /* The floating-point registers.  */
+  struct prologue_value fpr[S390_NUM_FPRS];
+
+  /* The register spill stack slots in the caller's frame ---
+     general-purpose registers r2 through r15, and floating-point
+     registers.  spill[i] is where gpr i+2 gets spilled;
+     spill[(14, 15, 16, 17)] is where (f0, f2, f4, f6) get spilled.  */
+  struct prologue_value spill[S390_NUM_SPILL_SLOTS];
+
+  /* The value of the back chain slot.  This is only valid if the stack
+     pointer is known to be less than its original value --- that is,
+     if we have indeed allocated space on the stack.  */
+  struct prologue_value back_chain;
+
+  /* The address of the instruction after the last one that changed
+     the SP, FP, or back chain.  */
+  CORE_ADDR after_last_frame_setup_insn = start_pc;
+
+  info.read_memory_func = deprecated_tm_print_insn_info.read_memory_func;
+
+  /* Set up everything's initial value.  */
+  {
+    int i;
+
+    for (i = 0; i < S390_NUM_GPRS; i++)
+      pv_set_to_register (&gpr[i], S390_GP0_REGNUM + i, 0);
+
+    for (i = 0; i < S390_NUM_FPRS; i++)
+      pv_set_to_register (&fpr[i], S390_FP0_REGNUM + i, 0);
+
+    for (i = 0; i < S390_NUM_SPILL_SLOTS; i++)
+      pv_set_to_unknown (&spill[i]);
+
+    pv_set_to_unknown (&back_chain);
+  }
+
+  /* Start interpreting instructions, until we hit something we don't
+     know how to interpret.  (Ideally, we should stop at the frame's
+     real current PC, but at the moment, our callers don't give us
+     that info.)  */
+  for (pc = start_pc; ; pc = next_pc)
     {
-      /* If this function doesn't reference the global offset table,
-         then the compiler may use r12 for other things.  If the last
-         instruction we saw was a load of r12 from the constant pool,
-         with no subsequent add to make the address PC-relative, then
-         the load was probably a genuine body instruction; don't treat
-         it as part of the prologue.  */
-      if (got_state == 1
-          && got_load_addr + got_load_len == test_pc)
+      bfd_byte insn[S390_MAX_INSTR_SIZE];
+      int insn_len = s390_readinstruction (insn, pc, &info);
+
+      /* Fields for various kinds of instructions.  */
+      unsigned int b2, r1, r2, d2, x2, r3;
+      int i2;
+
+      /* The values of SP, FP, and back chain before this instruction,
+         for detecting instructions that change them.  */
+      struct prologue_value pre_insn_sp, pre_insn_fp, pre_insn_back_chain;
+
+      /* If we got an error trying to read the instruction, report it.  */
+      if (insn_len < 0)
+        {
+          result = -1;
+          break;
+        }
+
+      next_pc = pc + insn_len;
+
+      pre_insn_sp = gpr[S390_SP_REGNUM - S390_GP0_REGNUM];
+      pre_insn_fp = gpr[S390_FRAME_REGNUM - S390_GP0_REGNUM];
+      pre_insn_back_chain = back_chain;
+
+      /* A special case, first --- only recognized as the very first
+         instruction of the function, for signal delivery frames:
+         SVC i --- system call  */
+      if (pc == start_pc
+          && is_rr (insn, op_svc, &r1, &r2))
+        {
+          if (fi)
+            s390_get_signal_frame_info (fi);
+          break;
+        }
+        
+      /* AHI r1, i2 --- add halfword immediate */
+      else if (is_ri (insn, op1_ahi, op2_ahi, &r1, &i2))
+        pv_add_constant (&gpr[r1], i2);
+
+
+      /* AGHI r1, i2 --- add halfword immediate (64-bit version) */
+      else if (GDB_TARGET_IS_ESAME
+               && is_ri (insn, op1_aghi, op2_aghi, &r1, &i2))
+        pv_add_constant (&gpr[r1], i2);
+
+      /* AR r1, r2 -- add register */
+      else if (is_rr (insn, op_ar, &r1, &r2))
+        pv_add (&gpr[r1], &gpr[r1], &gpr[r2]);
+
+      /* BASR r1, 0 --- branch and save
+         Since r2 is zero, this saves the PC in r1, but doesn't branch.  */
+      else if (is_rr (insn, op_basr, &r1, &r2)
+               && r2 == 0)
+        pv_set_to_constant (&gpr[r1], next_pc);
+
+      /* BRAS r1, i2 --- branch relative and save */
+      else if (is_ri (insn, op1_bras, op2_bras, &r1, &i2))
+        {
+          pv_set_to_constant (&gpr[r1], next_pc);
+          next_pc = pc + i2 * 2;
+
+          /* We'd better not interpret any backward branches.  We'll
+             never terminate.  */
+          if (next_pc <= pc)
+            break;
+        }
+
+      /* L r1, d2(x2, b2) --- load */
+      else if (is_rx (insn, op_l, &r1, &d2, &x2, &b2))
+        {
+          struct prologue_value addr;
+          struct prologue_value *stack;
+
+          compute_x_addr (&addr, gpr, d2, x2, b2);
+
+          /* If it's a load from an in-line constant pool, then we can
+             simulate that, under the assumption that the code isn't
+             going to change between the time the processor actually
+             executed it creating the current frame, and the time when
+             we're analyzing the code to unwind past that frame.  */
+          if (addr.kind == pv_constant
+              && start_pc <= addr.k 
+              && addr.k < next_pc)
+            pv_set_to_constant (&gpr[r1], 
+                                read_memory_integer (addr.k, 4));
+
+          /* If it's definitely a reference to something on the stack, 
+             we can do that.  */
+          else if (s390_on_stack (&addr, 4, gpr, spill, &back_chain, &stack)
+                   == pv_definite_yes)
+            gpr[r1] = *stack;
+
+          /* Otherwise, we don't know the value.  */
+          else
+            pv_set_to_unknown (&gpr[r1]);
+        }
+
+      /* LA r1, d2(x2, b2) --- load address */
+      else if (is_rx (insn, op_la, &r1, &d2, &x2, &b2))
+        compute_x_addr (&gpr[r1], gpr, d2, x2, b2);
+
+      /* LARL r1, i2 --- load address relative long */
+      else if (GDB_TARGET_IS_ESAME 
+               && is_ril (insn, op1_larl, op2_larl, &r1, &i2))
+        pv_set_to_constant (&gpr[r1], pc + i2 * 2);
+
+      /* LGR r1, r2 --- load from register */
+      else if (GDB_TARGET_IS_ESAME
+               && is_rre (insn, op_lgr, &r1, &r2))
+        gpr[r1] = gpr[r2];
+
+      /* LHI r1, i2 --- load halfword immediate */
+      else if (is_ri (insn, op1_lhi, op2_lhi, &r1, &i2))
+        pv_set_to_constant (&gpr[r1], i2);
+
+      /* LGHI r1, i2 --- load halfword immediate --- 64-bit version */
+      else if (is_ri (insn, op1_lghi, op2_lghi, &r1, &i2))
+        pv_set_to_constant (&gpr[r1], i2);
+
+      /* LR r1, r2 --- load from register */
+      else if (is_rr (insn, op_lr, &r1, &r2))
+        gpr[r1] = gpr[r2];
+
+      /* NGR r1, r2 --- logical and --- 64-bit version */
+      else if (GDB_TARGET_IS_ESAME
+               && is_rre (insn, op_ngr, &r1, &r2))
+        pv_logical_and (&gpr[r1], &gpr[r1], &gpr[r2]);
+
+      /* NR r1, r2 --- logical and */
+      else if (is_rr (insn, op_nr, &r1, &r2))
+        pv_logical_and (&gpr[r1], &gpr[r1], &gpr[r2]);
+
+      /* NGR r1, r2 --- logical and --- 64-bit version */
+      else if (GDB_TARGET_IS_ESAME
+               && is_rre (insn, op_ngr, &r1, &r2))
+        pv_logical_and (&gpr[r1], &gpr[r1], &gpr[r2]);
+
+      /* NR r1, r2 --- logical and */
+      else if (is_rr (insn, op_nr, &r1, &r2))
+        pv_logical_and (&gpr[r1], &gpr[r1], &gpr[r2]);
+
+      /* S r1, d2(x2, b2) --- subtract from memory */
+      else if (is_rx (insn, op_s, &r1, &d2, &x2, &b2))
+        {
+          struct prologue_value addr;
+          struct prologue_value value;
+          struct prologue_value *stack;
+
+          compute_x_addr (&addr, gpr, d2, x2, b2);
+
+          /* If it's a load from an in-line constant pool, then we can
+             simulate that, under the assumption that the code isn't
+             going to change between the time the processor actually
+             executed it and the time when we're analyzing it.  */
+          if (addr.kind == pv_constant
+              && start_pc <= addr.k 
+              && addr.k < pc)
+            pv_set_to_constant (&value, read_memory_integer (addr.k, 4));
+
+          /* If it's definitely a reference to something on the stack,
+             we could do that.  */
+          else if (s390_on_stack (&addr, 4, gpr, spill, &back_chain, &stack)
+                   == pv_definite_yes)
+            value = *stack;
+
+          /* Otherwise, we don't know the value.  */
+          else
+            pv_set_to_unknown (&value);
+
+          pv_subtract (&gpr[r1], &gpr[r1], &value);
+        }
+
+      /* ST r1, d2(x2, b2) --- store  */
+      else if (is_rx (insn, op_st, &r1, &d2, &x2, &b2))
+        {
+          struct prologue_value addr;
+
+          compute_x_addr (&addr, gpr, d2, x2, b2);
+
+          /* The below really should be '4', not 'S390_GPR_SIZE'; this
+             instruction always stores 32 bits, regardless of the full
+             size of the GPR.  */
+          if (s390_store (&addr, 4, &gpr[r1], gpr, spill, &back_chain)
+              == pv_maybe)
+            /* If we can't be sure that it's *not* a store to
+               something we're tracing, then we would have to mark all
+               our memory as unknown --- after all, it *could* be a
+               store to any of them --- so we might as well just stop
+               interpreting.  */
+            break;
+        }
+
+      /* STD r1, d2(x2,b2) --- store floating-point register  */
+      else if (is_rx (insn, op_std, &r1, &d2, &x2, &b2))
+        {
+          struct prologue_value addr;
+
+          compute_x_addr (&addr, gpr, d2, x2, b2);
+
+          if (s390_store (&addr, 8, &fpr[r1], gpr, spill, &back_chain)
+              == pv_maybe)
+            /* If we can't be sure that it's *not* a store to
+               something we're tracing, then we would have to mark all
+               our memory as unknown --- after all, it *could* be a
+               store to any of them --- so we might as well just stop
+               interpreting.  */
+            break;
+        }
+
+      /* STG r1, d2(x2, b2) --- 64-bit store */
+      else if (GDB_TARGET_IS_ESAME
+               && is_rxe (insn, op1_stg, op2_stg, &r1, &d2, &x2, &b2))
+        {
+          struct prologue_value addr;
+
+          compute_x_addr (&addr, gpr, d2, x2, b2);
+
+          /* The below really should be '8', not 'S390_GPR_SIZE'; this
+             instruction always stores 64 bits, regardless of the full
+             size of the GPR.  */
+          if (s390_store (&addr, 8, &gpr[r1], gpr, spill, &back_chain)
+              == pv_maybe)
+            /* If we can't be sure that it's *not* a store to
+               something we're tracing, then we would have to mark all
+               our memory as unknown --- after all, it *could* be a
+               store to any of them --- so we might as well just stop
+               interpreting.  */
+            break;
+        }
+
+      /* STM r1, r3, d2(b2) --- store multiple */
+      else if (is_rs (insn, op_stm, &r1, &r3, &d2, &b2))
         {
-          test_pc = got_load_addr;
-          instrlen = got_load_len;
+          int regnum;
+          int offset;
+          struct prologue_value addr;
+
+          for (regnum = r1, offset = 0;
+               regnum <= r3;
+               regnum++, offset += 4)
+            {
+              compute_x_addr (&addr, gpr, d2 + offset, 0, b2);
+              
+              if (s390_store (&addr, 4, &gpr[regnum], gpr, spill, &back_chain)
+                  == pv_maybe)
+                /* If we can't be sure that it's *not* a store to
+                   something we're tracing, then we would have to mark all
+                   our memory as unknown --- after all, it *could* be a
+                   store to any of them --- so we might as well just stop
+                   interpreting.  */
+                break;
+            }
+
+          /* If we left the loop early, we should stop interpreting
+             altogether.  */
+          if (regnum <= r3)
+            break;
         }
+
+      /* STMG r1, r3, d2(b2) --- store multiple, 64-bit */
+      else if (GDB_TARGET_IS_ESAME
+               && is_rse (insn, op1_stmg, op2_stmg, &r1, &r3, &d2, &b2))
+        {
+          int regnum;
+          int offset;
+          struct prologue_value addr;
+
+          for (regnum = r1, offset = 0;
+               regnum <= r3;
+               regnum++, offset += 8)
+            {
+              compute_x_addr (&addr, gpr, d2 + offset, 0, b2);
+              
+              if (s390_store (&addr, 8, &gpr[regnum], gpr, spill, &back_chain)
+                  == pv_maybe)
+                /* If we can't be sure that it's *not* a store to
+                   something we're tracing, then we would have to mark all
+                   our memory as unknown --- after all, it *could* be a
+                   store to any of them --- so we might as well just stop
+                   interpreting.  */
+                break;
+            }
+
+          /* If we left the loop early, we should stop interpreting
+             altogether.  */
+          if (regnum <= r3)
+            break;
+        }
+
+      else
+        /* An instruction we don't know how to simulate.  The only
+           safe thing to do would be to set every value we're tracking
+           to 'unknown'.  Instead, we'll be optimistic: we just stop
+           interpreting, and assume that the machine state we've got
+           now is good enough for unwinding the stack.  */
+        break;
+
+      /* Record the address after the last instruction that changed
+         the FP, SP, or backlink.  Ignore instructions that changed
+         them back to their original values --- those are probably
+         restore instructions.  (The back chain is never restored,
+         just popped.)  */
+      {
+        struct prologue_value *sp = &gpr[S390_SP_REGNUM - S390_GP0_REGNUM];
+        struct prologue_value *fp = &gpr[S390_FRAME_REGNUM - S390_GP0_REGNUM];
         
-      good_prologue = (((const_pool_state == 0) || (const_pool_state == 2)) &&
-                      ((save_link_state == 0) || (save_link_state == 4)) &&
-                      ((varargs_state == 0) || (varargs_state == 2)));
+        if ((! pv_is_identical (&pre_insn_sp, sp)
+             && ! pv_is_register (sp, S390_SP_REGNUM, 0))
+            || (! pv_is_identical (&pre_insn_fp, fp)
+                && ! pv_is_register (fp, S390_FRAME_REGNUM, 0))
+            || ! pv_is_identical (&pre_insn_back_chain, &back_chain))
+          after_last_frame_setup_insn = next_pc;
+      }
+    }
+
+  /* Okay, now gpr[], fpr[], spill[], and back_chain reflect the state
+     of the machine as of the first instruction we couldn't interpret
+     (hopefully the first non-prologue instruction).  */
+  {
+    /* The size of the frame, or (CORE_ADDR) -1 if we couldn't figure
+       that out.  */
+    CORE_ADDR frame_size = -1;
+
+    /* The value the SP had upon entry to the function, or
+       (CORE_ADDR) -1 if we can't figure that out.  */
+    CORE_ADDR original_sp = -1;
+
+    /* Are we using S390_FRAME_REGNUM as a frame pointer register?  */
+    int using_frame_pointer = 0;
+
+    /* If S390_FRAME_REGNUM is some constant offset from the SP, then
+       that strongly suggests that we're going to use that as our
+       frame pointer register, not the SP.  */
+    {
+      struct prologue_value *fp = &gpr[S390_FRAME_REGNUM - S390_GP0_REGNUM];
+
+      if (fp->kind == pv_register
+          && fp->reg == S390_SP_REGNUM)
+        using_frame_pointer = 1;
     }
-  if (fextra_info)
+
+    /* If we were given a frame_info structure, we may be able to use
+       the frame's base address to figure out the actual value of the
+       original SP.  */
+    if (fi && get_frame_base (fi))
+      {
+        int frame_base_regno;
+        struct prologue_value *frame_base;
+
+        /* The meaning of the frame base depends on whether the
+           function uses a frame pointer register other than the SP or
+           not (see s390_read_fp):
+           - If the function does use a frame pointer register other
+             than the SP, then the frame base is that register's
+             value.
+           - If the function doesn't use a frame pointer, then the
+             frame base is the SP itself.
+           We're duplicating some of the logic of s390_fp_regnum here,
+           but we don't want to call that, because it would just do
+           exactly the same analysis we've already done above.  */
+        if (using_frame_pointer)
+          frame_base_regno = S390_FRAME_REGNUM;
+        else
+          frame_base_regno = S390_SP_REGNUM;
+
+        frame_base = &gpr[frame_base_regno - S390_GP0_REGNUM];
+
+        /* We know the frame base address; if the value of whatever
+           register it came from is a constant offset from the
+           original SP, then we can reconstruct the original SP just
+           by subtracting off that constant.  */
+        if (frame_base->kind == pv_register
+            && frame_base->reg == S390_SP_REGNUM)
+          original_sp = get_frame_base (fi) - frame_base->k;
+      }
+
+    /* If the analysis said that the current SP value is the original
+       value less some constant, then that constant is the frame size.  */
     {
-      fextra_info->good_prologue = good_prologue;
-      fextra_info->skip_prologue_function_start =
-       (good_prologue ? test_pc : pc);
+      struct prologue_value *sp = &gpr[S390_SP_REGNUM - S390_GP0_REGNUM];
+
+      if (sp->kind == pv_register
+          && sp->reg == S390_SP_REGNUM)
+        frame_size = -sp->k;
     }
-  if (saved_regs)
-    /* The SP's element of the saved_regs array holds the old SP,
-       not the address at which it is saved.  */
-    saved_regs[S390_SP_REGNUM] = orig_sp;
-  return err;
+
+    /* If we knew other registers' current values, we could check if
+       the analysis said any of those were related to the original SP
+       value, too.  But for now, we'll just punt.  */
+
+    /* If the caller passed in an 'extra info' structure, fill in the
+       parts we can.  */
+    if (fextra_info)
+      {
+        if (init_extra_info || ! fextra_info->initialised)
+          {
+            s390_memset_extra_info (fextra_info);
+            fextra_info->function_start = start_pc;
+            fextra_info->initialised = 1;
+          }
+
+        if (frame_size != -1)
+          {
+            fextra_info->stack_bought_valid = 1;
+            fextra_info->stack_bought = frame_size;
+          }
+
+        /* Assume everything was okay, and indicate otherwise when we
+           find something amiss.  */
+        fextra_info->good_prologue = 1;
+
+        if (using_frame_pointer)
+          /* Actually, nobody cares about the exact PC, so any
+             non-zero value will do here.  */
+          fextra_info->frame_pointer_saved_pc = 1;
+
+        /* If we weren't able to find the size of the frame, or find
+           the original sp based on actual current register values,
+           then we're not going to be able to unwind this frame.
+
+           (If we're just doing prologue analysis to set a breakpoint,
+           then frame_size might be known, but original_sp unknown; if
+           we're analyzing a real frame which uses alloca, then
+           original_sp might be known (from the frame pointer
+           register), but the frame size might be unknown.)  */
+        if (original_sp == -1 && frame_size == -1)
+          fextra_info->good_prologue = 0;
+        
+        if (fextra_info->good_prologue)
+          fextra_info->skip_prologue_function_start
+            = after_last_frame_setup_insn;
+        else 
+          /* If the prologue was too complex for us to make sense of,
+             then perhaps it's better to just not skip anything at
+             all.  */
+          fextra_info->skip_prologue_function_start = start_pc;
+      }
+
+    /* Indicate where registers were saved on the stack, if:
+       - the caller seems to want to know,
+       - the caller provided an actual SP, and
+       - the analysis gave us enough information to actually figure it
+         out.  */
+    if (fi
+        && get_frame_saved_regs (fi)
+        && original_sp != -1)
+      {
+        int slot_num;
+        CORE_ADDR slot_addr;
+        CORE_ADDR *saved_regs = get_frame_saved_regs (fi);
+
+        /* Scan the spill array; if a spill slot says it holds the
+           original value of some register, then record that slot's
+           address as the place that register was saved.
+
+           Just for kicks, note that, even if registers aren't saved
+           in their officially-sanctioned slots, this will still work
+           --- we know what really got put where.  */
+
+        /* First, the slots for r2 -- r15.  */
+        for (slot_num = 0, slot_addr = original_sp + 2 * S390_GPR_SIZE;
+             slot_num < 14;
+             slot_num++, slot_addr += S390_GPR_SIZE)
+          {
+            struct prologue_value *slot = &spill[slot_num];
+
+            if (slot->kind == pv_register
+                && slot->k == 0)
+              saved_regs[slot->reg] = slot_addr;
+          }
+
+        /* Then, the slots for f0, f2, f4, and f6.  They're a
+           different size.  */
+        for (slot_num = 14, slot_addr = original_sp + 16 * S390_GPR_SIZE;
+             slot_num < S390_NUM_SPILL_SLOTS;
+             slot_num++, slot_addr += S390_FPR_SIZE)
+          {
+            struct prologue_value *slot = &spill[slot_num];
+            
+            if (slot->kind == pv_register
+                && slot->k == 0)
+              saved_regs[slot->reg] = slot_addr;
+          }
+
+        /* The stack pointer's element of saved_regs[] is special.  */
+        saved_regs[S390_SP_REGNUM] = original_sp;
+      }
+  }
+
+  return result;
 }
 
 
@@ -797,7 +1606,8 @@ s390_frameless_function_invocation (struct frame_info *fi)
          s390_get_frame_info (s390_sniff_pc_function_start (get_frame_pc (fi), fi),
                               fextra_info_ptr, fi, 1);
        }
-      frameless = ((fextra_info_ptr->stack_bought == 0));
+      frameless = (fextra_info_ptr->stack_bought_valid
+                   && fextra_info_ptr->stack_bought == 0);
     }
   return frameless;
 
@@ -1331,7 +2141,7 @@ is_struct_like (struct type *type)
    You'd think this would just be floats, doubles, long doubles, etc.
    But as an odd quirk, not mentioned in the ABI, GCC passes float and
    double singletons as if they were a plain float, double, etc.  (The
-   corresponding union types are handled normally.)  So we exclude
+   corresponding union types are handled normally.)  So we include
    those types here.  *shrug* */
 static int
 is_float_like (struct type *type)
@@ -1354,6 +2164,25 @@ is_double_or_float (struct type *type)
 }
 
 
+/* Return non-zero if TYPE is a `DOUBLE_ARG', as defined by the
+   parameter passing conventions described in the "GNU/Linux for S/390
+   ELF Application Binary Interface Supplement".  Return zero
+   otherwise.  */
+static int
+is_double_arg (struct type *type)
+{
+  unsigned length = TYPE_LENGTH (type);
+
+  /* The s390x ABI doesn't handle DOUBLE_ARGS specially.  */
+  if (GDB_TARGET_IS_ESAME)
+    return 0;
+
+  return ((is_integer_like (type)
+           || is_struct_like (type))
+          && length == 8);
+}
+
+
 /* Return non-zero if TYPE is considered a `SIMPLE_ARG', as defined by
    the parameter passing conventions described in the "GNU/Linux for
    S/390 ELF Application Binary Interface Supplement".  Return zero
@@ -1365,13 +2194,18 @@ is_simple_arg (struct type *type)
 
   /* This is almost a direct translation of the ABI's language, except
      that we have to exclude 8-byte structs; those are DOUBLE_ARGs.  */
-  return ((is_integer_like (type) && length <= 4)
+  return ((is_integer_like (type) && length <= DEPRECATED_REGISTER_SIZE)
           || is_pointer_like (type)
-          || (is_struct_like (type) && length != 8)
-          || (is_float_like (type) && length == 16));
+          || (is_struct_like (type) && !is_double_arg (type)));
 }
 
 
+static int
+is_power_of_two (unsigned int n)
+{
+  return ((n & (n - 1)) == 0);
+}
+
 /* Return non-zero if TYPE should be passed as a pointer to a copy,
    zero otherwise.  TYPE must be a SIMPLE_ARG, as recognized by
    `is_simple_arg'.  */
@@ -1380,8 +2214,8 @@ pass_by_copy_ref (struct type *type)
 {
   unsigned length = TYPE_LENGTH (type);
 
-  return ((is_struct_like (type) && length != 1 && length != 2 && length != 4)
-          || (is_float_like (type) && length == 16));
+  return (is_struct_like (type)
+          && !(is_power_of_two (length) && length <= DEPRECATED_REGISTER_SIZE));
 }
 
 
@@ -1404,21 +2238,6 @@ extend_simple_arg (struct value *arg)
 }
 
 
-/* Return non-zero if TYPE is a `DOUBLE_ARG', as defined by the
-   parameter passing conventions described in the "GNU/Linux for S/390
-   ELF Application Binary Interface Supplement".  Return zero
-   otherwise.  */
-static int
-is_double_arg (struct type *type)
-{
-  unsigned length = TYPE_LENGTH (type);
-
-  return ((is_integer_like (type)
-           || is_struct_like (type))
-          && length == 8);
-}
-
-
 /* Round ADDR up to the next N-byte boundary.  N must be a power of
    two.  */
 static CORE_ADDR
@@ -1538,9 +2357,9 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
         
         sp = round_down (sp, alignment_of (type));
 
-        /* SIMPLE_ARG values get extended to 32 bits.  Assume every
-           argument is.  */
-        if (length < 4) length = 4;
+        /* SIMPLE_ARG values get extended to DEPRECATED_REGISTER_SIZE bytes. 
+           Assume every argument is.  */
+        if (length < DEPRECATED_REGISTER_SIZE) length = DEPRECATED_REGISTER_SIZE;
         sp -= length;
       }
   }
@@ -1561,13 +2380,17 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
     int gr = 2;
     CORE_ADDR starg = sp;
 
+    /* A struct is returned using general register 2 */
+    if (struct_return)
+      gr++;
+
     for (i = 0; i < nargs; i++)
       {
         struct value *arg = args[i];
         struct type *type = VALUE_TYPE (arg);
         
         if (is_double_or_float (type)
-            && fr <= 2)
+            && fr <= S390_NUM_FP_PARAMETER_REGISTERS * 2 - 2)
           {
             /* When we store a single-precision value in an FP register,
                it occupies the leftmost bits.  */
@@ -1594,7 +2417,7 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
             deprecated_write_register_gen (S390_GP0_REGNUM + gr,
                                           VALUE_CONTENTS (arg));
             deprecated_write_register_gen (S390_GP0_REGNUM + gr + 1,
-                                          VALUE_CONTENTS (arg) + 4);
+                                          VALUE_CONTENTS (arg) + DEPRECATED_REGISTER_SIZE);
             gr += 2;
           }
         else
@@ -1610,9 +2433,9 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
 
             if (is_simple_arg (type))
               {
-                /* Simple args are always either extended to 32 bits,
-                   or pointers.  */
-                starg = round_up (starg, 4);
+                /* Simple args are always extended to 
+                   DEPRECATED_REGISTER_SIZE bytes.  */
+                starg = round_up (starg, DEPRECATED_REGISTER_SIZE);
 
                 /* Do we need to pass a pointer to our copy of this
                    argument?  */
@@ -1620,18 +2443,19 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
                   write_memory_signed_integer (starg, pointer_size,
                                                copy_addr[i]);
                 else
-                  /* Simple args are always extended to 32 bits.  */
-                  write_memory_signed_integer (starg, 4,
+                  /* Simple args are always extended to 
+                     DEPRECATED_REGISTER_SIZE bytes. */
+                  write_memory_signed_integer (starg, DEPRECATED_REGISTER_SIZE,
                                                extend_simple_arg (arg));
-                starg += 4;
+                starg += DEPRECATED_REGISTER_SIZE;
               }
             else
               {
                 /* You'd think we should say:
                    starg = round_up (starg, alignment_of (type));
                    Unfortunately, GCC seems to simply align the stack on
-                   a four-byte boundary, even when passing doubles.  */
-                starg = round_up (starg, 4);
+                   a four/eight-byte boundary, even when passing doubles. */
+                starg = round_up (starg, S390_STACK_PARAMETER_ALIGNMENT);
                 write_memory (starg, VALUE_CONTENTS (arg), length);
                 starg += length;
               }
@@ -1642,7 +2466,7 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
   /* Allocate the standard frame areas: the register save area, the
      word reserved for the compiler (which seems kind of meaningless),
      and the back chain pointer.  */
-  sp -= 96;
+  sp -= S390_STACK_FRAME_OVERHEAD;
 
   /* Write the back chain pointer into the first word of the stack
      frame.  This will help us get backtraces from within functions
index 655aaaa0367154676387bc9f46321fb32cb0a95e..dc3e99228d2607c68d8fadc34f10a3019999d091 100644 (file)
@@ -53,7 +53,6 @@
 
 void (*sh_show_regs) (void);
 CORE_ADDR (*skip_prologue_hard_way) (CORE_ADDR);
-void (*do_pseudo_register) (int);
 
 #define SH_DEFAULT_NUM_REGS 59
 
@@ -345,6 +344,22 @@ sh_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
   return breakpoint;
 }
 
+static CORE_ADDR
+sh_push_dummy_code (struct gdbarch *gdbarch,
+                   CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc,
+                   struct value **args, int nargs,
+                   struct type *value_type,
+                   CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
+{
+  /* Allocate space sufficient for a breakpoint.  */
+  sp = (sp - 2) & ~1;
+  /* Store the address of that breakpoint */
+  *bp_addr = sp;
+  /* sh always starts the call at the callee's entry point.  */
+  *real_pc = funaddr;
+  return sp;
+}
+
 /* Macros and functions for setting and testing a bit in a minimal
    symbol that marks it as 32-bit function.  The MSB of the minimal
    symbol's "info" field is used for this purpose. This field is
@@ -928,7 +943,7 @@ sh64_use_struct_convention (int gcc_p, struct type *type)
 
    We store structs through a pointer passed in R2 */
 static void
-sh_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+sh64_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
 {
   write_register (STRUCT_RETURN_REGNUM, (addr));
 }
@@ -1034,7 +1049,7 @@ sh_find_callers_reg (struct frame_info *fi, int regnum)
          return 0;
        if (get_frame_saved_regs (fi)[regnum] != 0)
          return read_memory_integer (get_frame_saved_regs (fi)[regnum],
-                                     REGISTER_RAW_SIZE (regnum));
+                                     register_size (current_gdbarch, regnum));
       }
   return read_register (regnum);
 }
@@ -1919,9 +1934,12 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
    the address in which a function should return its structure value,
    as a CORE_ADDR (or an expression that can be used as one).  */
 static CORE_ADDR
-sh_extract_struct_value_address (char *regbuf)
+sh_extract_struct_value_address (struct regcache *regcache)
 {
-  return (extract_unsigned_integer ((regbuf), REGISTER_RAW_SIZE (0)));
+  ULONGEST addr;
+  /*FIXME: Is R0 really correct here?  Not STRUCT_RETURN_REGNUM? */
+  regcache_cooked_read_unsigned (regcache, STRUCT_RETURN_REGNUM, &addr);
+  return addr;
 }
 
 static CORE_ADDR
@@ -2010,6 +2028,12 @@ sh64_pop_frame (void)
   flush_cached_frames ();
 }
 
+static CORE_ADDR
+sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp)
+{
+  return sp & ~3;
+}
+
 /* Function: push_arguments
    Setup the function arguments for calling a function in the inferior.
 
@@ -2054,8 +2078,11 @@ sh64_pop_frame (void)
    to R7.   */
 
 static CORE_ADDR
-sh_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
-                  int struct_return, CORE_ADDR struct_addr)
+sh_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+                   struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+                   struct value **args, CORE_ADDR sp, int struct_return,
+                   CORE_ADDR struct_addr)
+
 {
   int stack_offset, stack_alloc;
   int argreg;
@@ -2066,15 +2093,15 @@ sh_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
   char valbuf[4];
   int len;
   int odd_sized_struct;
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); 
 
   /* first force sp to a 4-byte alignment */
-  sp = sp & ~3;
+  sp = sh_frame_align (gdbarch, sp);
 
   /* The "struct return pointer" pseudo-argument has its own dedicated 
      register */
   if (struct_return)
-    write_register (STRUCT_RETURN_REGNUM, struct_addr);
+    regcache_cooked_write_unsigned (regcache, STRUCT_RETURN_REGNUM, struct_addr);
 
   /* Now make sure there's space on the stack */
   for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++)
@@ -2123,16 +2150,24 @@ sh_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
          if (argreg <= tdep->ARGLAST_REGNUM)
            {                   
              /* there's room in a register */
-             regval = extract_unsigned_integer (val, REGISTER_RAW_SIZE (argreg));
-             write_register (argreg++, regval);
+             regval = extract_unsigned_integer (val, register_size (gdbarch,
+                                                                    argreg));
+             regcache_cooked_write_unsigned (regcache, argreg++, regval);
            }
          /* Store the value 4 bytes at a time.  This means that things
             larger than 4 bytes may go partly in registers and partly
             on the stack.  */
-         len -= REGISTER_RAW_SIZE (argreg);
-         val += REGISTER_RAW_SIZE (argreg);
+         len -= register_size (gdbarch, argreg);
+         val += register_size (gdbarch, argreg);
        }
     }
+
+  /* Store return address. */
+  regcache_cooked_write_unsigned (regcache, tdep->PR_REGNUM, bp_addr);
+
+  /* Update stack pointer.  */
+  regcache_cooked_write_unsigned (regcache, SP_REGNUM, sp);
+
   return sp;
 }
 
@@ -2331,7 +2366,7 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
    Needed for targets where we don't actually execute a JSR/BSR instruction */
 
 static CORE_ADDR
-sh_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
+sh64_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
 {
   write_register (gdbarch_tdep (current_gdbarch)->PR_REGNUM,
                  CALL_DUMMY_ADDRESS ());
@@ -2366,7 +2401,8 @@ sh_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
    containing the (raw) register state a function return value of type
    TYPE, and copy that, in virtual format, into VALBUF.  */
 static void
-sh_extract_return_value (struct type *type, char *regbuf, char *valbuf)
+sh_default_extract_return_value (struct type *type, struct regcache *regcache,
+                                void *valbuf)
 {
   int len = TYPE_LENGTH (type);
   int return_register = R0_REGNUM;
@@ -2374,67 +2410,34 @@ sh_extract_return_value (struct type *type, char *regbuf, char *valbuf)
   
   if (len <= 4)
     {
-      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-       offset = REGISTER_BYTE (return_register) + 4 - len;
-      else
-       offset = REGISTER_BYTE (return_register);
-      memcpy (valbuf, regbuf + offset, len);
+      ULONGEST c;
+
+      regcache_cooked_read_unsigned (regcache, R0_REGNUM, &c);
+      store_unsigned_integer (valbuf, len, c);
     }
-  else if (len <= 8)
+  else if (len == 8)
     {
-      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-       offset = REGISTER_BYTE (return_register) + 8 - len;
-      else
-       offset = REGISTER_BYTE (return_register);
-      memcpy (valbuf, regbuf + offset, len);
+      int i, regnum = R0_REGNUM;
+      for (i = 0; i < len; i += 4)
+       regcache_raw_read (regcache, regnum++, (char *)valbuf + i);
     }
   else
     error ("bad size for return value");
 }
 
 static void
-sh3e_sh4_extract_return_value (struct type *type, char *regbuf, char *valbuf)
+sh3e_sh4_extract_return_value (struct type *type, struct regcache *regcache,
+                              void *valbuf)
 {
-  int return_register;
-  int offset;
-  int len = TYPE_LENGTH (type);
-
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
-    return_register = FP0_REGNUM;
-  else
-    return_register = R0_REGNUM;
-  
-  if (len == 8 && TYPE_CODE (type) == TYPE_CODE_FLT)
-    {
-      DOUBLEST val;
-      if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
-       floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword,
-                                (char *) regbuf + REGISTER_BYTE (return_register),
-                                &val);
-      else
-       floatformat_to_doublest (&floatformat_ieee_double_big,
-                                (char *) regbuf + REGISTER_BYTE (return_register),
-                                &val);
-      deprecated_store_floating (valbuf, len, val);
-    }
-  else if (len <= 4)
     {
-      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-       offset = REGISTER_BYTE (return_register) + 4 - len;
-      else
-       offset = REGISTER_BYTE (return_register);
-      memcpy (valbuf, regbuf + offset, len);
-    }
-  else if (len <= 8)
-    {
-      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-       offset = REGISTER_BYTE (return_register) + 8 - len;
-      else
-       offset = REGISTER_BYTE (return_register);
-      memcpy (valbuf, regbuf + offset, len);
+      int len = TYPE_LENGTH (type);
+      int i, regnum = FP0_REGNUM;
+      for (i = 0; i < len; i += 4)
+       regcache_raw_read (regcache, regnum++, (char *)valbuf + i);
     }
   else
-    error ("bad size for return value");
+    sh_default_extract_return_value (type, regcache, valbuf);
 }
 
 static void
@@ -2497,35 +2500,38 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
    depending on the type of the return value. In all the other cases
    the result is stored in r0, left-justified. */
 static void
-sh_default_store_return_value (struct type *type, char *valbuf)
+sh_default_store_return_value (struct type *type, struct regcache *regcache,
+                              const void *valbuf)
 {
-  char buf[32];        /* more than enough... */
+  ULONGEST val;
+  int len = TYPE_LENGTH (type);
 
-  if (TYPE_LENGTH (type) < REGISTER_RAW_SIZE (R0_REGNUM))
+  if (len <= 4)
     {
-      /* Add leading zeros to the value. */
-      memset (buf, 0, REGISTER_RAW_SIZE (R0_REGNUM));
-      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-       memcpy (buf + REGISTER_RAW_SIZE (R0_REGNUM) - TYPE_LENGTH (type),
-               valbuf, TYPE_LENGTH (type));
-      else
-       memcpy (buf, valbuf, TYPE_LENGTH (type));
-      deprecated_write_register_bytes (REGISTER_BYTE (R0_REGNUM), buf, 
-                                      REGISTER_RAW_SIZE (R0_REGNUM));
+      val = extract_unsigned_integer (valbuf, len);
+      regcache_cooked_write_unsigned (regcache, R0_REGNUM, val);
     }
   else
-    deprecated_write_register_bytes (REGISTER_BYTE (R0_REGNUM), valbuf, 
-                                    TYPE_LENGTH (type));
+    {
+      int i, regnum = R0_REGNUM;
+      for (i = 0; i < len; i += 4)
+        regcache_raw_write (regcache, regnum++, (char *)valbuf + i);
+    }
 }
 
 static void
-sh3e_sh4_store_return_value (struct type *type, char *valbuf)
+sh3e_sh4_store_return_value (struct type *type, struct regcache *regcache,
+                            const void *valbuf)
 {
   if (TYPE_CODE (type) == TYPE_CODE_FLT) 
-    deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), 
-                                    valbuf, TYPE_LENGTH (type));
+    {
+      int len = TYPE_LENGTH (type);
+      int i, regnum = FP0_REGNUM;
+      for (i = 0; i < len; i += 4)
+        regcache_raw_write (regcache, regnum++, (char *)valbuf + i);
+    }
   else
-    sh_default_store_return_value (type, valbuf);
+    sh_default_store_return_value (type, regcache, valbuf);
 }
 
 static void
@@ -3043,29 +3049,6 @@ sh_show_regs_command (char *args, int from_tty)
     (*sh_show_regs)();
 }
 
-/* Index within `registers' of the first byte of the space for
-   register N.  */
-static int
-sh_default_register_byte (int reg_nr)
-{
-  return (reg_nr * 4);
-}
-
-static int
-sh_sh4_register_byte (int reg_nr)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
-
-  if (reg_nr >= tdep->DR0_REGNUM 
-      && reg_nr <= tdep->DR_LAST_REGNUM)
-    return (dr_reg_base_num (reg_nr) * 4);
-  else if  (reg_nr >= tdep->FV0_REGNUM 
-           && reg_nr <= tdep->FV_LAST_REGNUM)
-    return (fv_reg_base_num (reg_nr) * 4);
-  else
-    return (reg_nr * 4);
-}
-
 /* *INDENT-OFF* */
 /*
     SH MEDIA MODE (ISA 32)
@@ -3221,29 +3204,6 @@ sh_sh64_register_byte (int reg_nr)
       + (reg_nr - FP0_REGNUM + 1) * 4);
 }
 
-/* Number of bytes of storage in the actual machine representation for
-   register REG_NR.  */
-static int
-sh_default_register_raw_size (int reg_nr)
-{
-  return 4;
-}
-
-static int
-sh_sh4_register_raw_size (int reg_nr)
-{
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
-
-  if (reg_nr >= tdep->DR0_REGNUM 
-      && reg_nr <= tdep->DR_LAST_REGNUM)
-    return 8;
-  else if  (reg_nr >= tdep->FV0_REGNUM 
-           && reg_nr <= tdep->FV_LAST_REGNUM)
-    return 16;
-  else
-    return 4;
-}
-
 static int
 sh_sh64_register_raw_size (int reg_nr)
 {
@@ -3268,14 +3228,6 @@ sh_sh64_register_raw_size (int reg_nr)
     return 4;
 }
 
-/* Number of bytes of storage in the program's representation
-   for register N.  */
-static int
-sh_register_virtual_size (int reg_nr)
-{
-  return 4;
-}
-
 /* ??????? FIXME */
 static int
 sh_sh64_register_virtual_size (int reg_nr)
@@ -3290,7 +3242,7 @@ sh_sh64_register_virtual_size (int reg_nr)
 /* Return the GDB type object for the "standard" data type
    of data in register N.  */
 static struct type *
-sh_sh3e_register_virtual_type (int reg_nr)
+sh_sh3e_register_type (struct gdbarch *gdbarch, int reg_nr)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
 
@@ -3312,9 +3264,9 @@ sh_sh4_build_float_register_type (int high)
 }
 
 static struct type *
-sh_sh4_register_virtual_type (int reg_nr)
+sh_sh4_register_type (struct gdbarch *gdbarch, int reg_nr)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); 
 
   if ((reg_nr >= FP0_REGNUM
        && (reg_nr <= tdep->FP_LAST_REGNUM)) 
@@ -3363,7 +3315,7 @@ sh_sh64_register_virtual_type (int reg_nr)
 }
 
 static struct type *
-sh_default_register_virtual_type (int reg_nr)
+sh_default_register_type (struct gdbarch *gdbarch, int reg_nr)
 {
   return builtin_type_int;
 }
@@ -3405,7 +3357,7 @@ sh_sh4_register_convert_to_virtual (int regnum, struct type *type,
     {
       DOUBLEST val;
       floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword, from, &val);
-      deprecated_store_floating (to, TYPE_LENGTH (type), val);
+      store_typed_floating (to, type, val);
     }
   else
     error ("sh_register_convert_to_virtual called with non DR register number");
@@ -3446,7 +3398,7 @@ sh_sh4_register_convert_to_raw (struct type *type, int regnum,
   if (regnum >= tdep->DR0_REGNUM 
       && regnum <= tdep->DR_LAST_REGNUM)
     {
-      DOUBLEST val = deprecated_extract_floating (from, TYPE_LENGTH(type));
+      DOUBLEST val = extract_typed_floating (from, type);
       floatformat_from_doublest (&floatformat_ieee_double_littlebyte_bigword, &val, to);
     }
   else
@@ -3496,10 +3448,10 @@ sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
       for (portion = 0; portion < 2; portion++)
        regcache_raw_read (regcache, base_regnum + portion, 
                           (temp_buffer
-                           + REGISTER_RAW_SIZE (base_regnum) * portion));
+                           + register_size (gdbarch, base_regnum) * portion));
       /* We must pay attention to the endiannes. */
       sh_sh4_register_convert_to_virtual (reg_nr,
-                                         REGISTER_VIRTUAL_TYPE (reg_nr),
+                                         gdbarch_register_type (gdbarch, reg_nr),
                                          temp_buffer, buffer);
     }
   else if (reg_nr >= tdep->FV0_REGNUM 
@@ -3511,7 +3463,7 @@ sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
       for (portion = 0; portion < 4; portion++)
        regcache_raw_read (regcache, base_regnum + portion, 
                           ((char *) buffer
-                           + REGISTER_RAW_SIZE (base_regnum) * portion));
+                           + register_size (gdbarch, base_regnum) * portion));
     }
 }
 
@@ -3695,14 +3647,14 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
       base_regnum = dr_reg_base_num (reg_nr);
 
       /* We must pay attention to the endiannes. */
-      sh_sh4_register_convert_to_raw (REGISTER_VIRTUAL_TYPE (reg_nr), reg_nr,
+      sh_sh4_register_convert_to_raw (gdbarch_register_type (gdbarch, reg_nr), reg_nr,
                                      buffer, temp_buffer);
 
       /* Write the real regs for which this one is an alias.  */
       for (portion = 0; portion < 2; portion++)
        regcache_raw_write (regcache, base_regnum + portion, 
                            (temp_buffer
-                            + REGISTER_RAW_SIZE (base_regnum) * portion));
+                            + register_size (gdbarch, base_regnum) * portion));
     }
   else if (reg_nr >= tdep->FV0_REGNUM
           && reg_nr <= tdep->FV_LAST_REGNUM)
@@ -3713,7 +3665,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
       for (portion = 0; portion < 4; portion++)
        regcache_raw_write (regcache, base_regnum + portion,
                            ((char *) buffer
-                            + REGISTER_RAW_SIZE (base_regnum) * portion));
+                            + register_size (gdbarch, base_regnum) * portion));
     }
 }
 
@@ -3886,11 +3838,12 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
 
 /* Floating point vector of 4 float registers. */
 static void
-do_fv_register_info (int fv_regnum)
+do_fv_register_info (struct gdbarch *gdbarch, struct ui_file *file,
+                    int fv_regnum)
 {
   int first_fp_reg_num = fv_reg_base_num (fv_regnum);
-  printf_filtered ("fv%d\t0x%08x\t0x%08x\t0x%08x\t0x%08x\n", 
-                    fv_regnum - gdbarch_tdep (current_gdbarch)->FV0_REGNUM, 
+  fprintf_filtered (file, "fv%d\t0x%08x\t0x%08x\t0x%08x\t0x%08x\n", 
+                    fv_regnum - gdbarch_tdep (gdbarch)->FV0_REGNUM, 
                     (int) read_register (first_fp_reg_num),
                     (int) read_register (first_fp_reg_num + 1),
                     (int) read_register (first_fp_reg_num + 2),
@@ -3925,12 +3878,13 @@ do_fpp_register_info (int fpp_regnum)
 
 /* Double precision registers. */
 static void
-do_dr_register_info (int dr_regnum)
+do_dr_register_info (struct gdbarch *gdbarch, struct ui_file *file,
+                    int dr_regnum)
 {
   int first_fp_reg_num = dr_reg_base_num (dr_regnum);
 
-  printf_filtered ("dr%d\t0x%08x%08x\n", 
-                   dr_regnum - gdbarch_tdep (current_gdbarch)->DR0_REGNUM, 
+  fprintf_filtered (file, "dr%d\t0x%08x%08x\n", 
+                   dr_regnum - gdbarch_tdep (gdbarch)->DR0_REGNUM, 
                    (int) read_register (first_fp_reg_num),
                    (int) read_register (first_fp_reg_num + 1));
 }
@@ -3986,23 +3940,24 @@ do_cr_c_register_info (int cr_c_regnum)
 }
 
 static void
-sh_do_pseudo_register (int regnum)
+sh_print_pseudo_register (struct gdbarch *gdbarch, struct ui_file *file,
+                         int regnum)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); 
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); 
 
   if (regnum < NUM_REGS || regnum >= NUM_REGS + NUM_PSEUDO_REGS)
     internal_error (__FILE__, __LINE__,
                    "Invalid pseudo register number %d\n", regnum);
   else if (regnum >= tdep->DR0_REGNUM
-          && regnum < tdep->DR_LAST_REGNUM)
-    do_dr_register_info (regnum);
+          && regnum <= tdep->DR_LAST_REGNUM)
+    do_dr_register_info (gdbarch, file, regnum);
   else if (regnum >= tdep->FV0_REGNUM
           && regnum <= tdep->FV_LAST_REGNUM)
-    do_fv_register_info (regnum);
+    do_fv_register_info (gdbarch, file, regnum);
 }
 
 static void
-sh_do_fp_register (int regnum)
+sh_do_fp_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum)
 {                              /* do values for FP (float) regs */
   char *raw_buffer;
   double flt;  /* double extracted from raw hex data */
@@ -4010,35 +3965,35 @@ sh_do_fp_register (int regnum)
   int j;
 
   /* Allocate space for the float. */
-  raw_buffer = (char *) alloca (REGISTER_RAW_SIZE (FP0_REGNUM));
+  raw_buffer = (char *) alloca (register_size (gdbarch, FP0_REGNUM));
 
   /* Get the data in raw format.  */
-  if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
+  if (!frame_register_read (get_selected_frame (), regnum, raw_buffer))
     error ("can't read register %d (%s)", regnum, REGISTER_NAME (regnum));
 
   /* Get the register as a number */ 
   flt = unpack_double (builtin_type_float, raw_buffer, &inv);
 
   /* Print the name and some spaces. */
-  fputs_filtered (REGISTER_NAME (regnum), gdb_stdout);
-  print_spaces_filtered (15 - strlen (REGISTER_NAME (regnum)), gdb_stdout);
+  fputs_filtered (REGISTER_NAME (regnum), file);
+  print_spaces_filtered (15 - strlen (REGISTER_NAME (regnum)), file);
 
   /* Print the value. */
   if (inv)
-    printf_filtered ("<invalid float>");
+    fprintf_filtered (file, "<invalid float>");
   else
-    printf_filtered ("%-10.9g", flt);
+    fprintf_filtered (file, "%-10.9g", flt);
 
   /* Print the fp register as hex. */
-  printf_filtered ("\t(raw 0x");
-  for (j = 0; j < REGISTER_RAW_SIZE (regnum); j++)
+  fprintf_filtered (file, "\t(raw 0x");
+  for (j = 0; j < register_size (gdbarch, regnum); j++)
     {
       register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
-       : REGISTER_RAW_SIZE (regnum) - 1 - j;
-      printf_filtered ("%02x", (unsigned char) raw_buffer[idx]);
+       : register_size (gdbarch, regnum) - 1 - j;
+      fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
     }
-  printf_filtered (")");
-  printf_filtered ("\n");
+  fprintf_filtered (file, ")");
+  fprintf_filtered (file, "\n");
 }
 
 static void
@@ -4054,7 +4009,7 @@ sh64_do_pseudo_register (int regnum)
 
   else if ((regnum >= tdep->DR0_REGNUM
            && regnum <= tdep->DR_LAST_REGNUM))
-    do_dr_register_info (regnum);
+    do_dr_register_info (current_gdbarch, gdb_stdout, regnum);
 
   else if ((regnum >= tdep->DR0_C_REGNUM
            && regnum <= tdep->DR_LAST_C_REGNUM))
@@ -4062,7 +4017,7 @@ sh64_do_pseudo_register (int regnum)
 
   else if ((regnum >= tdep->FV0_REGNUM
            && regnum <= tdep->FV_LAST_REGNUM))
-    do_fv_register_info (regnum);
+    do_fv_register_info (current_gdbarch, gdb_stdout, regnum);
           
   else if ((regnum >= tdep->FV0_C_REGNUM
            && regnum <= tdep->FV_LAST_C_REGNUM))
@@ -4078,7 +4033,7 @@ sh64_do_pseudo_register (int regnum)
 
   else if (regnum >= tdep->FP0_C_REGNUM
           && regnum <= tdep->FP_LAST_C_REGNUM)
-    sh_do_fp_register (regnum); /* this should work also for pseudoregs */
+    sh_do_fp_register (current_gdbarch, gdb_stdout, regnum); /* this should work also for pseudoregs */
 
   else if (regnum >= tdep->PC_C_REGNUM
           && regnum <= tdep->FPUL_C_REGNUM)
@@ -4087,27 +4042,27 @@ sh64_do_pseudo_register (int regnum)
 }
 
 static void
-sh_do_register (int regnum)
+sh_do_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum)
 {
   char raw_buffer[MAX_REGISTER_SIZE];
 
-  fputs_filtered (REGISTER_NAME (regnum), gdb_stdout);
-  print_spaces_filtered (15 - strlen (REGISTER_NAME (regnum)), gdb_stdout);
+  fputs_filtered (REGISTER_NAME (regnum), file);
+  print_spaces_filtered (15 - strlen (REGISTER_NAME (regnum)), file);
 
   /* Get the data in raw format.  */
-  if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
-    printf_filtered ("*value not available*\n");
+  if (!frame_register_read (get_selected_frame (), regnum, raw_buffer))
+    fprintf_filtered (file, "*value not available*\n");
       
-  val_print (REGISTER_VIRTUAL_TYPE (regnum), raw_buffer, 0, 0,
-            gdb_stdout, 'x', 1, 0, Val_pretty_default);
-  printf_filtered ("\t");
-  val_print (REGISTER_VIRTUAL_TYPE (regnum), raw_buffer, 0, 0,
-            gdb_stdout, 0, 1, 0, Val_pretty_default);
-  printf_filtered ("\n");
+  val_print (gdbarch_register_type (gdbarch, regnum), raw_buffer, 0, 0,
+            file, 'x', 1, 0, Val_pretty_default);
+  fprintf_filtered (file, "\t");
+  val_print (gdbarch_register_type (gdbarch, regnum), raw_buffer, 0, 0,
+            file, 0, 1, 0, Val_pretty_default);
+  fprintf_filtered (file, "\n");
 }
 
 static void
-sh_print_register (int regnum)
+sh_print_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum)
 {
   if (regnum < 0 || regnum >= NUM_REGS + NUM_PSEUDO_REGS)
     internal_error (__FILE__, __LINE__,
@@ -4115,25 +4070,31 @@ sh_print_register (int regnum)
 
   else if (regnum >= 0 && regnum < NUM_REGS)
     {
-      if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
-       sh_do_fp_register (regnum);     /* FP regs */
+      if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) == TYPE_CODE_FLT)
+       sh_do_fp_register (gdbarch, file, regnum);      /* FP regs */
       else
-       sh_do_register (regnum);        /* All other regs */
+       sh_do_register (gdbarch, file, regnum); /* All other regs */
     }
 
   else if (regnum < NUM_REGS + NUM_PSEUDO_REGS)
-    do_pseudo_register (regnum);
+    {
+      if (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_sh5)
+       sh64_do_pseudo_register (regnum);
+      else
+       sh_print_pseudo_register (gdbarch, file, regnum);
+    }
 }
 
 static void
-sh_do_registers_info (int regnum, int fpregs)
+sh_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
+                        struct frame_info *frame, int regnum, int fpregs)
 {
   if (regnum != -1)            /* do one specified register */
     {
       if (*(REGISTER_NAME (regnum)) == '\0')
        error ("Not a valid register for the current processor type");
 
-      sh_print_register (regnum);
+      sh_print_register (gdbarch, file, regnum);
     }
   else
     /* do all (or most) registers */
@@ -4150,20 +4111,20 @@ sh_do_registers_info (int regnum, int fpregs)
              continue;
            }
 
-         if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
+         if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) == TYPE_CODE_FLT)
            {
              if (fpregs)
                {
                  /* true for "INFO ALL-REGISTERS" command */
-                 sh_do_fp_register (regnum);   /* FP regs */
+                 sh_do_fp_register (gdbarch, file, regnum);    /* FP regs */
                  regnum ++;
                }
              else
-               regnum += (gdbarch_tdep (current_gdbarch)->FP_LAST_REGNUM - FP0_REGNUM);        /* skip FP regs */
+               regnum += (gdbarch_tdep (gdbarch)->FP_LAST_REGNUM - FP0_REGNUM);        /* skip FP regs */
            }
          else
            {
-             sh_do_register (regnum);  /* All other regs */
+             sh_do_register (gdbarch, file, regnum);   /* All other regs */
              regnum++;
            }
        }
@@ -4171,7 +4132,10 @@ sh_do_registers_info (int regnum, int fpregs)
       if (fpregs)
        while (regnum < NUM_REGS + NUM_PSEUDO_REGS)
          {
-           do_pseudo_register (regnum);
+           if (gdbarch_bfd_arch_info (gdbarch)->mach == bfd_mach_sh5)
+             sh64_do_pseudo_register (regnum);
+           else
+             sh_print_pseudo_register (gdbarch, file, regnum);
            regnum++;
          }
     }
@@ -4189,7 +4153,7 @@ sh_compact_do_registers_info (int regnum, int fpregs)
       if (regnum >= 0 && regnum < tdep->R0_C_REGNUM)
         error ("Not a valid register for the current processor mode.");
 
-      sh_print_register (regnum);
+      sh_print_register (current_gdbarch, gdb_stdout, regnum);
     }
   else
     /* do all compact registers */
@@ -4197,7 +4161,7 @@ sh_compact_do_registers_info (int regnum, int fpregs)
       regnum = tdep->R0_C_REGNUM;
       while (regnum < NUM_REGS + NUM_PSEUDO_REGS)
         {
-          do_pseudo_register (regnum);
+          sh64_do_pseudo_register (regnum);
           regnum++;
         }
     }
@@ -4207,7 +4171,8 @@ static void
 sh64_do_registers_info (int regnum, int fpregs)
 {
   if (pc_is_isa32 (get_frame_pc (deprecated_selected_frame)))
-   sh_do_registers_info (regnum, fpregs);
+   sh_print_registers_info (current_gdbarch, gdb_stdout,
+                           deprecated_selected_frame, regnum, fpregs);
   else
    sh_compact_do_registers_info (regnum, fpregs); 
 }
@@ -4285,7 +4250,7 @@ sh_dsp_register_sim_regno (int nr)
 {
   if (legacy_register_sim_regno (nr) < 0)
     return legacy_register_sim_regno (nr);
-  if (nr >= DSP_DSR_REGNUM && nr < DSP_Y1_REGNUM)
+  if (nr >= DSP_DSR_REGNUM && nr <= DSP_Y1_REGNUM)
     return nr - DSP_DSR_REGNUM + SIM_SH_DSR_REGNUM;
   if (nr == DSP_MOD_REGNUM)
     return SIM_SH_MOD_REGNUM;
@@ -4303,12 +4268,9 @@ static gdbarch_init_ftype sh_gdbarch_init;
 static struct gdbarch *
 sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
-  static LONGEST sh_call_dummy_words[] = {0};
+  static LONGEST sh64_call_dummy_words[] = {0};
   struct gdbarch *gdbarch;
   struct gdbarch_tdep *tdep;
-  gdbarch_register_name_ftype *sh_register_name;
-  gdbarch_deprecated_store_return_value_ftype *sh_store_return_value;
-  gdbarch_deprecated_register_virtual_type_ftype *sh_register_virtual_type;
 
   /* If there is already a candidate, use it.  */
   arches = gdbarch_list_lookup_by_info (arches, &info);
@@ -4359,80 +4321,108 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   tdep->sh_abi = SH_ABI_UNKNOWN;
 
-  set_gdbarch_fp0_regnum (gdbarch, -1);
-  set_gdbarch_num_pseudo_regs (gdbarch, 0);
-  set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
-  set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
+  set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+  set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
   set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+  set_gdbarch_long_long_bit (gdbarch, 8 * TARGET_CHAR_BIT);
+  set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+  set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
+  set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
   set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+
   set_gdbarch_num_regs (gdbarch, SH_DEFAULT_NUM_REGS);
   set_gdbarch_sp_regnum (gdbarch, 15);
   set_gdbarch_deprecated_fp_regnum (gdbarch, 14);
   set_gdbarch_pc_regnum (gdbarch, 16);
-  set_gdbarch_deprecated_register_size (gdbarch, 4);
-  set_gdbarch_deprecated_register_bytes (gdbarch, SH_DEFAULT_NUM_REGS * 4);
-  set_gdbarch_deprecated_do_registers_info (gdbarch, sh_do_registers_info);
+  set_gdbarch_fp0_regnum (gdbarch, -1);
+  set_gdbarch_num_pseudo_regs (gdbarch, 0);
+
   set_gdbarch_breakpoint_from_pc (gdbarch, sh_breakpoint_from_pc);
-  set_gdbarch_deprecated_frame_chain (gdbarch, sh_frame_chain);
-  set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
-  set_gdbarch_deprecated_init_extra_frame_info (gdbarch, sh_init_extra_frame_info);
-  set_gdbarch_deprecated_extract_return_value (gdbarch, sh_extract_return_value);
-  set_gdbarch_deprecated_push_arguments (gdbarch, sh_push_arguments);
-  set_gdbarch_deprecated_store_struct_return (gdbarch, sh_store_struct_return);
   set_gdbarch_use_struct_convention (gdbarch, sh_use_struct_convention);
-  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
-  set_gdbarch_deprecated_pop_frame (gdbarch, sh_pop_frame);
+
   set_gdbarch_print_insn (gdbarch, gdb_print_insn_sh);
   set_gdbarch_register_sim_regno (gdbarch, legacy_register_sim_regno);
+
+  set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
+
+  set_gdbarch_skip_prologue (gdbarch, sh_skip_prologue);
+  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+  set_gdbarch_decr_pc_after_break (gdbarch, 0);
+  set_gdbarch_function_start_offset (gdbarch, 0);
+
+  set_gdbarch_frame_args_skip (gdbarch, 0);
+  set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
+  set_gdbarch_believe_pcc_promotion (gdbarch, 1);
+
   skip_prologue_hard_way = sh_skip_prologue_hard_way;
-  do_pseudo_register = sh_do_pseudo_register;
+
+  set_gdbarch_deprecated_frame_chain (gdbarch, sh_frame_chain);
+  set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
+  set_gdbarch_deprecated_init_extra_frame_info (gdbarch, sh_init_extra_frame_info);
+  set_gdbarch_deprecated_pop_frame (gdbarch, sh_pop_frame);
+  set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc);
+  set_gdbarch_deprecated_saved_pc_after_call (gdbarch, sh_saved_pc_after_call);
+  set_gdbarch_frame_align (gdbarch, sh_frame_align);
 
   switch (info.bfd_arch_info->mach)
     {
     case bfd_mach_sh:
-      sh_register_name = sh_sh_register_name;
+      set_gdbarch_register_name (gdbarch, sh_sh_register_name);
+      set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
       sh_show_regs = sh_generic_show_regs;
-      sh_store_return_value = sh_default_store_return_value;
-      sh_register_virtual_type = sh_default_register_virtual_type;
+      set_gdbarch_register_type (gdbarch, sh_default_register_type);
+      set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
+      set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
+      set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call);
+      set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
+
       set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
-      set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
       break;
     case bfd_mach_sh2:
-      sh_register_name = sh_sh_register_name;
+      set_gdbarch_register_name (gdbarch, sh_sh_register_name);
+      set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
       sh_show_regs = sh_generic_show_regs;
-      sh_store_return_value = sh_default_store_return_value;
-      sh_register_virtual_type = sh_default_register_virtual_type;
+      set_gdbarch_register_type (gdbarch, sh_default_register_type);
+      set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
+      set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
+      set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call);
+      set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
+
       set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
-      set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
       break;      
     case bfd_mach_sh2e:
-      sh_register_name = sh_sh2e_register_name;
+      /* doubles on sh2e and sh3e are actually 4 byte. */
+      set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+
+      set_gdbarch_register_name (gdbarch, sh_sh2e_register_name);
+      set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
       sh_show_regs = sh2e_show_regs;
-      sh_store_return_value = sh3e_sh4_store_return_value;
-      sh_register_virtual_type = sh_sh3e_register_virtual_type;
-      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
-      set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
+      set_gdbarch_register_type (gdbarch, sh_sh3e_register_type);
+      set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
       set_gdbarch_fp0_regnum (gdbarch, 25);
+      set_gdbarch_store_return_value (gdbarch, sh3e_sh4_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+      set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call);
+      set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
       tdep->FPUL_REGNUM = 23;
       tdep->FPSCR_REGNUM = 24;
       tdep->FP_LAST_REGNUM = 40;
+
+      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
       break;
     case bfd_mach_sh_dsp:
-      sh_register_name = sh_sh_dsp_register_name;
+      set_gdbarch_register_name (gdbarch, sh_sh_dsp_register_name);
+      set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
       sh_show_regs = sh_dsp_show_regs;
-      sh_store_return_value = sh_default_store_return_value;
-      sh_register_virtual_type = sh_default_register_virtual_type;
-      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
-      set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
+      set_gdbarch_register_type (gdbarch, sh_default_register_type);
+      set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
       set_gdbarch_register_sim_regno (gdbarch, sh_dsp_register_sim_regno);
+      set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
+      set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call);
+      set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
       tdep->DSR_REGNUM = 24;
       tdep->A0G_REGNUM = 25;
       tdep->A0_REGNUM = 26;
@@ -4447,45 +4437,57 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       tdep->MOD_REGNUM = 40;
       tdep->RS_REGNUM = 43;
       tdep->RE_REGNUM = 44;
+
+      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
       break;
     case bfd_mach_sh3:
-      sh_register_name = sh_sh3_register_name;
+      set_gdbarch_register_name (gdbarch, sh_sh3_register_name);
+      set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
       sh_show_regs = sh3_show_regs;
-      sh_store_return_value = sh_default_store_return_value;
-      sh_register_virtual_type = sh_default_register_virtual_type;
-      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
-      set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
+      set_gdbarch_register_type (gdbarch, sh_default_register_type);
+      set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
+      set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
+      set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call);
+      set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
       tdep->SSR_REGNUM = 41;
       tdep->SPC_REGNUM = 42;
+
+      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
       break;
     case bfd_mach_sh3e:
-      sh_register_name = sh_sh3e_register_name;
+      /* doubles on sh2e and sh3e are actually 4 byte. */
+      set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+
+      set_gdbarch_register_name (gdbarch, sh_sh3e_register_name);
+      set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
       sh_show_regs = sh3e_show_regs;
-      sh_store_return_value = sh3e_sh4_store_return_value;
-      sh_register_virtual_type = sh_sh3e_register_virtual_type;
-      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
-      set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
-      set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+      set_gdbarch_register_type (gdbarch, sh_sh3e_register_type);
+      set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
       set_gdbarch_fp0_regnum (gdbarch, 25);
+      set_gdbarch_store_return_value (gdbarch, sh3e_sh4_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+      set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call);
+      set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
       tdep->FPUL_REGNUM = 23;
       tdep->FPSCR_REGNUM = 24;
       tdep->FP_LAST_REGNUM = 40;
       tdep->SSR_REGNUM = 41;
       tdep->SPC_REGNUM = 42;
+
+      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
       break;
     case bfd_mach_sh3_dsp:
-      sh_register_name = sh_sh3_dsp_register_name;
+      set_gdbarch_register_name (gdbarch, sh_sh3_dsp_register_name);
+      set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
       sh_show_regs = sh3_dsp_show_regs;
-      sh_store_return_value = sh_default_store_return_value;
-      sh_register_virtual_type = sh_default_register_virtual_type;
-      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
-      set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
+      set_gdbarch_register_type (gdbarch, sh_default_register_type);
+      set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
+      set_gdbarch_register_sim_regno (gdbarch, sh_dsp_register_sim_regno);
+      set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
+      set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call);
+      set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
       tdep->DSR_REGNUM = 24;
       tdep->A0G_REGNUM = 25;
       tdep->A0_REGNUM = 26;
@@ -4502,23 +4504,23 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       tdep->RE_REGNUM = 44;
       tdep->SSR_REGNUM = 41;
       tdep->SPC_REGNUM = 42;
+
+      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
       break;
     case bfd_mach_sh4:
-      sh_register_name = sh_sh4_register_name;
+      set_gdbarch_register_name (gdbarch, sh_sh4_register_name);
+      set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
       sh_show_regs = sh4_show_regs;
-      sh_store_return_value = sh3e_sh4_store_return_value;
-      sh_register_virtual_type = sh_sh4_register_virtual_type;
-      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
-      set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+      set_gdbarch_register_type (gdbarch, sh_sh4_register_type);
+      set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
       set_gdbarch_fp0_regnum (gdbarch, 25);
-      set_gdbarch_deprecated_register_raw_size (gdbarch, sh_sh4_register_raw_size);
-      set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_sh4_register_raw_size);
-      set_gdbarch_deprecated_register_byte (gdbarch, sh_sh4_register_byte);
       set_gdbarch_num_pseudo_regs (gdbarch, 12);
-      set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4 * 4);
-      set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4 * 4);
       set_gdbarch_pseudo_register_read (gdbarch, sh_pseudo_register_read);
       set_gdbarch_pseudo_register_write (gdbarch, sh_pseudo_register_write);
+      set_gdbarch_store_return_value (gdbarch, sh3e_sh4_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+      set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call);
+      set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
       tdep->FPUL_REGNUM = 23;
       tdep->FPSCR_REGNUM = 24;
       tdep->FP_LAST_REGNUM = 40;
@@ -4528,6 +4530,8 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       tdep->DR_LAST_REGNUM = 66;
       tdep->FV0_REGNUM = 67;
       tdep->FV_LAST_REGNUM = 70;
+
+      set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
       break;
     case bfd_mach_sh5:
       tdep->PR_REGNUM = 18;
@@ -4589,16 +4593,15 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
         ISA16(compact) or ISA32(media). */
       set_gdbarch_num_regs (gdbarch, SIM_SH64_NR_REGS);
       set_gdbarch_deprecated_register_size (gdbarch, 8); /*????*/
-      set_gdbarch_deprecated_register_bytes (gdbarch, 
+      set_gdbarch_deprecated_register_bytes (gdbarch,
                                             ((SIM_SH64_NR_FP_REGS + 1) * 4)
                                             + (SIM_SH64_NR_REGS - SIM_SH64_NR_FP_REGS -1) * 8);
 
-      sh_register_name = sh_sh64_register_name;
+      set_gdbarch_register_name (gdbarch, sh_sh64_register_name);
       sh_show_regs = sh64_show_regs;
-      sh_register_virtual_type = sh_sh64_register_virtual_type;
-      sh_store_return_value = sh64_store_return_value;
+      set_gdbarch_deprecated_register_virtual_type (gdbarch, sh_sh64_register_virtual_type);
+      set_gdbarch_deprecated_store_return_value (gdbarch, sh64_store_return_value);
       skip_prologue_hard_way = sh64_skip_prologue_hard_way;
-      do_pseudo_register = sh64_do_pseudo_register;
       set_gdbarch_deprecated_register_raw_size (gdbarch, sh_sh64_register_raw_size);
       set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_sh64_register_raw_size);
       set_gdbarch_deprecated_register_byte (gdbarch, sh_sh64_register_byte);
@@ -4615,12 +4618,17 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       set_gdbarch_deprecated_do_registers_info (gdbarch, sh64_do_registers_info);
       set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh64_nofp_frame_init_saved_regs);
       set_gdbarch_breakpoint_from_pc (gdbarch, sh_sh64_breakpoint_from_pc);
+      set_gdbarch_deprecated_call_dummy_words (gdbarch, sh64_call_dummy_words);
+      set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (sh64_call_dummy_words));
+
       set_gdbarch_deprecated_init_extra_frame_info (gdbarch, sh64_init_extra_frame_info);
       set_gdbarch_deprecated_frame_chain (gdbarch, sh64_frame_chain);
       set_gdbarch_deprecated_get_saved_register (gdbarch, sh64_get_saved_register);
       set_gdbarch_deprecated_extract_return_value (gdbarch, sh64_extract_return_value);
       set_gdbarch_deprecated_push_arguments (gdbarch, sh64_push_arguments);
-      /*set_gdbarch_deprecated_store_struct_return (gdbarch, sh64_store_struct_return);*/
+      set_gdbarch_deprecated_push_return_address (gdbarch, sh64_push_return_address);
+      set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
+      set_gdbarch_deprecated_store_struct_return (gdbarch, sh64_store_struct_return);
       set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address);
       set_gdbarch_use_struct_convention (gdbarch, sh64_use_struct_convention);
       set_gdbarch_deprecated_pop_frame (gdbarch, sh64_pop_frame);
@@ -4628,47 +4636,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
                                             sh64_elf_make_msymbol_special);
       break;
     default:
-      sh_register_name = sh_generic_register_name;
+      set_gdbarch_register_name (gdbarch, sh_generic_register_name);
+      set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
       sh_show_regs = sh_generic_show_regs;
-      sh_store_return_value = sh_default_store_return_value;
-      sh_register_virtual_type = sh_default_register_virtual_type;
+      set_gdbarch_register_type (gdbarch, sh_default_register_type);
+      set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
+      set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
+      set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
+
       set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
-      set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
-      set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
       break;
     }
 
-  set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
-  set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
-
-  set_gdbarch_register_name (gdbarch, sh_register_name);
-  set_gdbarch_deprecated_register_virtual_type (gdbarch, sh_register_virtual_type);
-
-  set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
-  set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
-  set_gdbarch_long_long_bit (gdbarch, 8 * TARGET_CHAR_BIT);
-  set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT);
-  set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
-  set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
-
-  set_gdbarch_deprecated_call_dummy_words (gdbarch, sh_call_dummy_words);
-  set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (sh_call_dummy_words));
-
-  set_gdbarch_deprecated_push_return_address (gdbarch, sh_push_return_address);
-
-  set_gdbarch_deprecated_store_return_value (gdbarch, sh_store_return_value);
-  set_gdbarch_skip_prologue (gdbarch, sh_skip_prologue);
-  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_decr_pc_after_break (gdbarch, 0);
-  set_gdbarch_function_start_offset (gdbarch, 0);
-
-  set_gdbarch_frame_args_skip (gdbarch, 0);
-  set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
-  set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc);
-  set_gdbarch_deprecated_saved_pc_after_call (gdbarch, sh_saved_pc_after_call);
-  set_gdbarch_believe_pcc_promotion (gdbarch, 1);
-
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
index d4335349790f88eb45cb0475f2dee1ccb06d6d87..5ff6ba63ac8e7a9dfd7495e4cbc4e60f97ee1b3d 100644 (file)
@@ -1472,7 +1472,7 @@ void
 _initialize_svr4_solib (void)
 {
   fetch_link_map_offsets_gdbarch_data =
-    register_gdbarch_data (init_fetch_link_map_offsets, 0);
+    register_gdbarch_data (init_fetch_link_map_offsets);
 
   svr4_so_ops.relocate_section_addresses = svr4_relocate_section_addresses;
   svr4_so_ops.free_so = svr4_free_so;
index 04be72da4659f93690ecb39820962ec181dc1008..936f037a46fb374cf787b68533365091e5232f59 100644 (file)
@@ -1,5 +1,5 @@
 /* Shared library declarations for GDB, the GNU Debugger.
-   Copyright 1992, 1993, 1995, 1998, 1999, 2000, 2001
+   Copyright 1992, 1993, 1995, 1998, 1999, 2000, 2001, 2003
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -112,7 +112,7 @@ extern void solib_create_inferior_hook (void);      /* solib.c */
  */
 
 #define SOLIB_LOADED_LIBRARY_PATHNAME(pid) \
-(0)
+""
 
 /* This function returns TRUE if the dynamic linker has just reported
    an unload of a library.
index cb7b048eafdac9c94b7bf4ede365ce9d5ee60147..e3df6e167a1dfa5c95ab7cb9201264492242ca12 100644 (file)
@@ -453,7 +453,7 @@ som_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
       /* Note: Here is OK to compare with ".text" because this is the
          name that gdb itself gives to that section, not the SOM
          name. */
-      for (i = 0; i < SECT_OFF_MAX && addrs->other[i].name; i++)
+      for (i = 0; i < objfile->num_sections && addrs->other[i].name; i++)
        if (strcmp (addrs->other[i].name, ".text") == 0)
          break;
       text_addr = addrs->other[i].addr;
index d98ae8a74a0bfb2b3dd7010ec5eb542172cf544d..e3b483677081192f676c390ef21264ae1526a91f 100644 (file)
@@ -1361,7 +1361,7 @@ forward_search_command (char *regex, int from_tty)
 
   msg = (char *) re_comp (regex);
   if (msg)
-    error (msg);
+    error ("%s", msg);
 
   if (current_source_symtab == 0)
     select_source_symtab (0);
@@ -1457,7 +1457,7 @@ reverse_search_command (char *regex, int from_tty)
 
   msg = (char *) re_comp (regex);
   if (msg)
-    error (msg);
+    error ("%s", msg);
 
   if (current_source_symtab == 0)
     select_source_symtab (0);
index ba418b637db558bc7f1adf79082589a02d3ef7fc..261ed6061ccc6b3eb3dbc55b0919e7443e5a3f60 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for GNU/Linux SPARC.
 
-   Copyright 2001, 2002 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -21,6 +21,7 @@
 
 #include "defs.h"
 #include "regcache.h"
+#include "sparc-tdep.h"
    
 #include <sys/procfs.h>
 
index 33145e0150e912e373bf70f3aeb270e6d99de31b..540bbcc9e3bbf080606a00071a23ad3290264014 100644 (file)
@@ -26,6 +26,8 @@
 #include "gdbcore.h"
 #include "regcache.h"
 
+#include "sparc-tdep.h"
+
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
index 31718139b295c24f8cbe3c2df4d8f8597974964f..ef6368f69f6b8d26f2ae7b3d243d1fbd3ba84520 100644 (file)
@@ -34,6 +34,8 @@
 #include "regcache.h"
 #include "osabi.h"
 
+#include "sparc-tdep.h"
+
 #ifdef USE_PROC_FS
 #include <sys/procfs.h>
 /* Prototypes for supply_gregset etc. */
@@ -130,9 +132,6 @@ struct gdbarch_tdep
  *       TARGET_ARCHITECTURE->mach == bfd_mach_sparc_v9a))
  */
 
-/* From infrun.c */
-extern int stop_after_trap;
-
 /* We don't store all registers immediately when requested, since they
    get sent over in large chunks anyway.  Instead, we accumulate most
    of the changes and send them over once.  "deferred_stores" keeps
@@ -2874,6 +2873,22 @@ sparc_print_extra_frame_info (struct frame_info *fi)
 
 /* MULTI_ARCH support */
 
+const char *
+legacy_register_name (int i)
+{
+#ifdef REGISTER_NAMES
+  static char *names[] = REGISTER_NAMES;
+  if (i < 0 || i >= (sizeof (names) / sizeof (*names)))
+    return NULL;
+  else
+    return names[i];
+#else
+  internal_error (__FILE__, __LINE__,
+                 "legacy_register_name: called.");
+  return NULL;
+#endif
+}
+
 static const char *
 sparc32_register_name (int regno)
 {
@@ -3188,7 +3203,7 @@ sparc_call_dummy_address (void)
 
 /* Supply the Y register number to those that need it.  */
 
-static int
+int
 sparc_y_regnum (void)
 {
   return gdbarch_tdep (current_gdbarch)->y_regnum;
@@ -3203,7 +3218,7 @@ sparc_reg_struct_has_addr (int gcc_p, struct type *type)
     return (gcc_p != 1);
 }
 
-static int
+int
 sparc_intreg_size (void)
 {
   return SPARC_INTREG_SIZE;
index a991d0ef2a4d9753ca9c59e52e1bc750bf0e36fc..1e68d6961a97ca6ed8451ebee70b97ea18733634 100644 (file)
@@ -1,5 +1,5 @@
 /* Native-dependent code for UltraSPARC systems running NetBSD.
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright 2002, 2003 Free Software Foundation, Inc.
    Contributed by Wasabi Systems, Inc.
 
    This file is part of GDB.
@@ -23,6 +23,7 @@
 #include "inferior.h"
 #include "regcache.h"
 
+#include "sparc-tdep.h"
 #include "sparcnbsd-tdep.h"
 
 #include <sys/types.h>
index ce5d44dc6b4bd1b60a55da7342cc7f6d64d1fa42..f63d9e5ace040433e46b74fd2314822caae6b8bd 100644 (file)
@@ -1,5 +1,5 @@
 /* Native-dependent code for SPARC systems running NetBSD.
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright 2002, 2003 Free Software Foundation, Inc.
    Contributed by Wasabi Systems, Inc.
 
    This file is part of GDB.
@@ -23,6 +23,7 @@
 #include "inferior.h"
 #include "regcache.h"
 
+#include "sparc-tdep.h"
 #include "sparcnbsd-tdep.h"
 
 #include <sys/types.h>
index 4fe05aa9ce03a1ae3ea590fba344be52d15b9096..6cd0e3f3a855c6c486291fe96aec3cf69eceb631 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "gdb_string.h"
 
+#include "sparc-tdep.h"
 #include "sparcnbsd-tdep.h"
 #include "nbsd-tdep.h"
 
index 988e3c9bc50d9c8a306e60c05e61de369deb8c1d..a10e16408665f445d593d14b8beb3db6b2e50637 100644 (file)
@@ -547,7 +547,7 @@ print_frame (struct frame_info *fi,
   stb = ui_out_stream_new (uiout);
   old_chain = make_cleanup_ui_out_stream_delete (stb);
 
-  func = find_pc_function (frame_address_in_block (fi));
+  func = find_pc_function (get_frame_address_in_block (fi));
   if (func)
     {
       /* In certain pathological cases, the symtabs give the wrong
@@ -566,7 +566,7 @@ print_frame (struct frame_info *fi,
          ever changed many parts of GDB will need to be changed (and we'll
          create a find_pc_minimal_function or some such).  */
 
-      struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (frame_address_in_block (fi));
+      struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (get_frame_address_in_block (fi));
       if (msymbol != NULL
          && (SYMBOL_VALUE_ADDRESS (msymbol)
              > BLOCK_START (SYMBOL_BLOCK_VALUE (func))))
@@ -614,7 +614,7 @@ print_frame (struct frame_info *fi,
     }
   else
     {
-      struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (frame_address_in_block (fi));
+      struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (get_frame_address_in_block (fi));
       if (msymbol != NULL)
        {
          funname = DEPRECATED_SYMBOL_NAME (msymbol);
@@ -1206,7 +1206,7 @@ backtrace_command_1 (char *count_exp, int show_locals, int from_tty)
           fi = get_prev_frame (fi))
        {
          QUIT;
-         ps = find_pc_psymtab (frame_address_in_block (fi));
+         ps = find_pc_psymtab (get_frame_address_in_block (fi));
          if (ps)
            PSYMTAB_TO_SYMTAB (ps);     /* Force syms to come in */
        }
index 1241852383abb7fc151008efbea380fc172aa378..1e8f3c8c8e628e0d7c48b1f78507550d9c392b45 100644 (file)
@@ -22,7 +22,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "builtin-regs.h"
+#include "user-regs.h"
 #include "frame.h"
 #include "gdbtypes.h"
 #include "value.h"
@@ -147,14 +147,14 @@ _initialize_frame_reg (void)
   /* Frame based $fp, $pc, $sp and $ps.  These only come into play
      when the target does not define its own version of these
      registers.  */
-  add_builtin_reg ("fp", value_of_builtin_frame_fp_reg);
-  add_builtin_reg ("pc", value_of_builtin_frame_pc_reg);
-  add_builtin_reg ("sp", value_of_builtin_frame_sp_reg);
-  add_builtin_reg ("ps", value_of_builtin_frame_ps_reg);
+  user_reg_add_builtin ("fp", value_of_builtin_frame_fp_reg);
+  user_reg_add_builtin ("pc", value_of_builtin_frame_pc_reg);
+  user_reg_add_builtin ("sp", value_of_builtin_frame_sp_reg);
+  user_reg_add_builtin ("ps", value_of_builtin_frame_ps_reg);
 
   /* NOTE: cagney/2002-04-05: For moment leave the $frame / $gdbframe
      / $gdb.frame disabled.  It isn't yet clear which of the many
      options is the best.  */
   if (0)
-    add_builtin_reg ("frame", value_of_builtin_frame_reg);
+    user_reg_add_builtin ("frame", value_of_builtin_frame_reg);
 }
index 40bea1413b241c1103120b6a2b33087f2d8b9b9b..cc30975ea9e430ec66d07099f058c9c0d1047b9d 100644 (file)
@@ -486,14 +486,6 @@ enum address_class
 
   LOC_HP_THREAD_LOCAL_STATIC,
 
-  /* Value is at a thread-specific location calculated by a
-     target-specific method.  SYMBOL_OBJFILE gives the object file
-     in which the symbol is defined; the symbol's value is the
-     offset into that objfile's thread-local storage for the current
-     thread.  */
-      
-  LOC_THREAD_LOCAL_STATIC,
-
   /* The variable does not actually exist in the program.
      The value is ignored.  */
 
@@ -612,12 +604,6 @@ struct symbol
     /* Used by LOC_BASEREG and LOC_BASEREG_ARG.  */
     short basereg;
 
-    /* Used by LOC_THREAD_LOCAL_STATIC.  The objfile in which this
-       symbol is defined.  To find a thread-local variable (e.g., a
-       variable declared with the `__thread' storage class), we may
-       need to know which object file it's in.  */
-    struct objfile *objfile;
-
     /* For a LOC_COMPUTED or LOC_COMPUTED_ARG symbol, this is the
        baton and location_funcs structure to find its location.  For a
        LOC_BLOCK symbol for a function in a compilation unit compiled
index 7b9289d225e0182fe0b5b9f8789d92a5343be4c9..fdcc209606879294172b497aaeceb31117bb26cc 100644 (file)
@@ -1,3 +1,170 @@
+2003-08-02  Andrew Cagney  <cagney@redhat.com>
+
+       * gdb.base/annota3.exp: New file.
+       * gdb.base/annota3.c: New file.
+       * gdb.c++/annota3.exp: New file.
+       * gdb.c++/annota3.cc: New file.
+
+2003-07-29  Michael Chastain  <mec@shout.net>
+
+       * gdb.threads/tls.c (spin): Check errno only if sem_wait
+       actually failed.
+       (do_pass): Likewise.
+       * gdb.threads/tls.exp: Always initialize no_of_threads.
+
+2003-07-27  Daniel Jacobowitz  <drow@mvista.com>
+
+       * gdb.threads/print-threads.exp (test_all_threads): Loosen KFAIL
+       pattern.
+       * gdb.threads/tls-shared.exp: Don't use gdb_suppress_entire_file.
+       * gdb.threads/tls.exp: Recognize one case of the host library not
+       supporting TLS.
+
+2003-07-27  Andrew Cagney  <cagney@redhat.com>
+
+       * gdb.base/fileio.exp: Use SH when running commands using
+       remote_exec.
+
+2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
+
+       From Kei Sakamoto <sakamoto.kei@renesas.com>:
+       * gdb.base/relocate.c (dummy): New padding array.
+
+2003-07-23  Michael Snyder  <msnyder@redhat.com>
+
+       * gdb.base/return2.exp: Don't test long-long return.
+
+       * gdb.disasm/t01_mov.s: New file, h8300sx disassembly tests.
+       * gdb.disasm/t01_mov.exp: Ditto.
+       * gdb.disasm/t02_mova.s: Ditto.
+       * gdb.disasm/t02_mova.exp: Ditto.
+       * gdb.disasm/t03_add.s: Ditto.
+       * gdb.disasm/t03_add.exp: Ditto.
+       * gdb.disasm/t04_sub.s: Ditto.
+       * gdb.disasm/t04_sub.exp: Ditto.
+       * gdb.disasm/t05_cmp.s: Ditto.
+       * gdb.disasm/t05_cmp.exp: Ditto.
+       * gdb.disasm/t06_ari2.s: Ditto.
+       * gdb.disasm/t06_ari2.exp: Ditto.
+       * gdb.disasm/t07_ari3.s: Ditto.
+       * gdb.disasm/t07_ari3.exp: Ditto.
+       * gdb.disasm/t08_or.s: Ditto.
+       * gdb.disasm/t08_or.exp: Ditto.
+       * gdb.disasm/t09_xor.s: Ditto.
+       * gdb.disasm/t09_xor.exp: Ditto.
+       * gdb.disasm/t10_and.s: Ditto.
+       * gdb.disasm/t10_and.exp: Ditto.
+       * gdb.disasm/t11_logs.s: Ditto.
+       * gdb.disasm/t11_logs.exp: Ditto.
+       * gdb.disasm/t12_bit.s: Ditto.
+       * gdb.disasm/t12_bit.exp: Ditto.
+       * gdb.disasm/t13_otr.s: Ditto.
+       * gdb.disasm/t13_otr.exp: Ditto.
+
+2003-07-22  Elena Zannoni  <ezannoni@redhat.com>
+
+       * gdb.threads/tls.exp :Add kfail for 'info address' case.
+
+2003-07-22  Elena Zannoni  <ezannoni@redhat.com>
+
+        * gdb.threads/tls.c : New file.
+        * gdb.threads/tls.exp : New file.
+        * gdb.threads/tls-main.c : New file.
+        * gdb.threads/tls-shared.c : New file.
+        * gdb.threads/tls-shared.exp : New file.
+
+2003-07-22  Andreas Schwab  <schwab@suse.de>
+
+       * gdb.asm/powerpc.inc (gdbasm_startup): Force alignment.
+
+2003-07-20  Andreas Schwab  <schwab@suse.de>
+
+       * gdb.base/selftest.exp (do_steps_and_nexts): Add more patterns
+       due to insn reordering.
+
+2003-07-15  Andrew Cagney  <cagney@redhat.com>
+
+       * gdb.asm/asm-source.exp: Do not allow "start" in the backtrace.
+
+2003-07-15  Michael Chastain  <mec@shout.net>
+
+       * gdb.base/gdb1250.exp: New file.
+       * gdb.base/gdb1250.c: New file.
+
+2003-07-09  Michal Ludvig  <mludvig@suse.cz>
+
+       * gdb.c++/templates.exp (test_ptype_of_templates): Recognize
+       expansion of size_t to 'unsigned long', not only to 'unsigned'.
+
+2003-07-09  Elena Zannoni  <ezannoni@redhat.com>
+
+        * gdb.threads/tls.c: New file.
+        * gdb.threads/tls.exp: New file.
+        * gdb.threads/tls-main.c: New file.
+        * gdb.threads/tls-shared.c: New file.
+        * gdb.threads/tls-shared.exp: New file.
+
+2003-07-09  Elena Zannoni  <ezannoni@redhat.com>
+
+       * gdb.base/annota1.exp: Make sure that we properly escape the
+       full path of the source file. Xfail more permissive patterns,
+       due to a compiler debug info problem. 
+
+2003-07-07  Andreas Schwab  <schwab@suse.de>
+
+       * gdb.asm/m68k.inc: New file.
+       * gdb.asm/asm-source.exp: Use it for m68k-*-*.
+
+       * gdb.objc/basicclass.exp ("Call an Objective-C method with no
+       arguments"): Also match negative number.
+
+       * gdb.base/float.exp ("info float"): Add test for m68k-*-*.
+
+2003-07-03  Daniel Jacobowitz  <drow@mvista.com>
+
+       * gdb.base/store.c (charest): New typedef.
+       (add_char): Rename to add_charest, update.
+       (wack_char): Rename to wack_charest, update types.  Return l + r
+       to keep r live across the call.
+       (wack_short, wack_int, wack_long, wack_longest, wack_float)
+       (wack_double, wack_doublest): Return l + r to keep r live across
+       the call.
+       * gdb.base/store.exp: Accomodate store.c changes.
+
+2003-06-30  David Carlton  <carlton@kealia.com>
+
+       * gdb.c++/maint.exp (test_invalid_name): New.
+       (test_first_component): Add tests for invalid names.
+
+2003-06-29  Michael Chastain  <mec@shout.net>
+
+       * gdb.c++/inherit.exp (test_print_svi_classes): Accept gdb
+       output of '<VTT for class>' for virtual base classes.
+
+2003-06-29  Daniel Jacobowitz  <drow@mvista.com>
+
+       * gdb.base/completion.exp: Tab-complete "complet" instead of
+       "compl".
+       * gdb.base/complex.exp, gdb.base/complex.c: New files.
+
+2003-06-29  Daniel Jacobowitz  <drow@mvista.com>
+
+       * gdb.base/constvars.exp: Remove most xfails for GCC 3.x.
+       * gdb.base/volatile.exp: Likewise.
+
+2003-06-29  Daniel Jacobowitz  <drow@mvista.com>
+
+       * gdb.threads/print-threads.exp (test_all_threads): Add kfail for
+       gdb/1265.
+
+2003-06-28  Michael Chastain  <mec@shout.net>
+           Daniel Jacobowitz  <drow@mvista.com>
+
+       * gdb.base/selftest.exp (do_steps_and_nexts): Increase maximum
+       initial line count of 'captured_main' from 26 to 32.
+       (test_with_self): Allow xmalloc call to be interleaved with the
+       preceding two lines.
+
 2003-06-27  David Carlton  <carlton@kealia.com>
 
        * carlton_runtest (FASTTESTS): Add gdb.c++/pr-1210.exp.
index 8c3f00325ad4f6f97e48e8710e8ecc3974aa31c4..3745e6062d3c0ccec81f476bd1602e946419894b 100644 (file)
@@ -99,6 +99,9 @@ switch -glob -- [istarget] {
         set asm-arch v850
         set gdb_wrapper_initialized 1
     }
+    "m68k-*-*" {
+        set asm-arch m68k
+    }
 }
 
 if { "${asm-arch}" == "" } {
@@ -241,7 +244,7 @@ gdb_test "n" "12\[  \]*.*foo3" "n in foo2"
 # doesn't fall off the stack.
 
 gdb_test "bt 10" \
-       "\#0.*foo2.*asmsrc2\[.\]s:12.*\#1.*main.*asmsrc1\[.\]s:33(.*\#2.*start\[^\r\n\]*)?" \
+       "\#0.*foo2.*asmsrc2\[.\]s:12.*\#1.*main.*asmsrc1\[.\]s:33" \
        "bt ALL in foo2"
 
 # See if a capped `bt' prints the right source files.
index 5aefde2c02fdc83c0240b9d7a2eb0dbbf525053c..2597ad6c395a75b3a4e103b47784052e01b3c838 100644 (file)
@@ -36,6 +36,7 @@
 
        comment "crt0 startup"
        .macro gdbasm_startup
+       .p2align 2
        .endm
 
        comment "Declare a data variable"
index e4483e3b471365a0ea80f70cbe0033fe941f32e5..c3ceac34cd657fb7b55da6c56d772b7c4fe99027 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 1999, 2000, 2001, 2002
+#   Copyright 1999, 2000, 2001, 2002, 2003
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -87,6 +87,11 @@ gdb_test "break main" \
 set old_gdb_prompt $gdb_prompt
 set gdb_prompt "\r\n\032\032pre-prompt\r\n$gdb_prompt \r\n\032\032prompt\r\n"
 
+#
+# Escape all the characters in the path that need it. For instance 
+# the directory name could contain '+'.
+#
+set escapedsrcfile [string_to_regexp ${srcdir}/${subdir}/${srcfile}]
 
 
 #
@@ -115,8 +120,11 @@ gdb_expect {
 #
 send_gdb "info break\n" 
 gdb_expect {
-re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType           \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress    +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1   \r\n\032\032field 1\r\nbreakpoint     \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny   \r\n\032\032field 4\r\n$hex +\r\n\032\032field 5\r\nin main at (${srcdir}/${subdir}/)?${srcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \
   -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType           \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress    +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1   \r\n\032\032field 1\r\nbreakpoint     \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny   \r\n\032\032field 4\r\n$hex +\r\n\032\032field 5\r\nin main at ${escapedsrcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \
        {pass "breakpoint info"}
+    -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-headers\r\n\r\n\032\032field 0\r\nNum \r\n\032\032field 1\r\nType           \r\n\032\032field 2\r\nDisp \r\n\032\032field 3\r\nEnb \r\n\032\032field 4\r\nAddress    +\r\n\032\032field 5\r\nWhat\r\n\r\n\032\032breakpoints-table\r\n\r\n\032\032record\r\n\r\n\032\032field 0\r\n1   \r\n\032\032field 1\r\nbreakpoint     \r\n\032\032field 2\r\nkeep \r\n\032\032field 3\r\ny   \r\n\032\032field 4\r\n$hex +\r\n\032\032field 5\r\nin main at .*${srcfile}:$main_line\r\n\r\n\032\032breakpoints-table-end\r\n$gdb_prompt$" \
+       { setup_xfail "*-*-*" 1270
+          fail "breakpoint info"}
    -re ".*$gdb_prompt$" { fail "breakpoint info" }
    timeout { fail "breakpoint info (timeout)" }
 }
@@ -247,8 +255,11 @@ gdb_expect {
 #
 send_gdb "backtrace\n"
 gdb_expect {
-  -re "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0  \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\nprintf\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1  \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${srcdir}/${subdir}/${srcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032frame-end\r\n(\r\n\032\032frame-begin .*\r\n\r\n\032\032frame-end\r\n)*$gdb_prompt$" \
+    -re "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0  \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\nprintf\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1  \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${escapedsrcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032frame-end\r\n(\r\n\032\032frame-begin .*\r\n\r\n\032\032frame-end\r\n)*$gdb_prompt$" \
          { pass "backtrace from shlibrary" }
+    -re "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0  \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\nprintf\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1  \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*${srcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032frame-end\r\n(\r\n\032\032frame-begin .*\r\n\r\n\032\032frame-end\r\n)*$gdb_prompt$" \
+         { setup_xfail "*-*-*" 1270
+            fail "backtrace from shlibrary" }
   -re ".*$gdb_prompt$"     { fail "backtrace from shlibrary" }
   timeout                  { fail "backtrace from shlibrary (timeout)" }
 }
@@ -263,8 +274,11 @@ gdb_expect {
 #
 send_gdb "signal SIGUSR1\n"
 gdb_expect {
-  -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${srcdir}/${subdir}/${srcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+    -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${escapedsrcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
        { pass "send SIGUSR1" }
+    -re "\r\n\032\032post-prompt\r\nContinuing with signal SIGUSR1.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 2\r\n\r\nBreakpoint 2, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nhandle_USR1\r\n\032\032frame-args\r\n \\(\r\n\032\032arg-begin\r\nsig\r\n\032\032arg-name-end\r\n=\r\n\032\032arg-value -\r\n$decimal\r\n\032\032arg-end\r\n\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*${srcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*annota1.c:.*:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+       { setup_xfail "*-*-*" 1270
+          fail "send SIGUSR1" }
   -re ".*$gdb_prompt$"     { fail "send SIGUSR1" }
   timeout                  { fail "send SIGUSR1 (timeout)" }
 }
@@ -322,8 +336,11 @@ gdb_expect {
 #
 send_gdb "break main\n"
 gdb_expect {
-     -re "post-prompt.*\032\032breakpoints-invalid.*Breakpoint 4 at $hex: file ${srcdir}/${subdir}/${srcfile}, line $main_line.*$gdb_prompt$" \
+    -re "post-prompt.*\032\032breakpoints-invalid.*Breakpoint 4 at $hex: file ${escapedsrcfile}, line $main_line.*$gdb_prompt$" \
             { pass "break at 28" }
+    -re "post-prompt.*\032\032breakpoints-invalid.*Breakpoint 4 at $hex: file .*${srcfile}, line $main_line.*$gdb_prompt$" \
+            { setup_xfail "*-*-*" 1270
+               fail "break at 28" }
      -re ".*$gdb_prompt$"  { fail "break at 28" }
      timeout { fail "break at 28 (timeout)" }
 }
index 9c721b113f6601ba943f963effb12b7fb7978c92..1ac5a5092d3715afa185ff23e73b7d19e9c40f04 100644 (file)
@@ -677,7 +677,7 @@ gdb_test "cd ${fullsrcdir}" \
          "Working directory [string_to_regexp ${fullsrcdir}].*" \
          "cd to \${srcdir}"
 
-send_gdb "file ./gdb.base/compl\t"
+send_gdb "file ./gdb.base/complet\t"
 sleep 1
 gdb_expect  {
         -re "^file ./gdb.base/completion\\.exp $"\
@@ -688,17 +688,17 @@ gdb_expect  {
                       { send_gdb "n\n"
                         gdb_expect {
                                 -re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
-                                        { pass "complete 'file ./gdb.base/compl'"}
-                                -re ".*$gdb_prompt $" { fail "complete 'file ./gdb.base/compl'"}
-                                timeout           {fail "(timeout) complete 'file ./gdb.base/compl'"}
+                                        { pass "complete 'file ./gdb.base/complet'"}
+                                -re ".*$gdb_prompt $" { fail "complete 'file ./gdb.base/complet'"}
+                                timeout           {fail "(timeout) complete 'file ./gdb.base/complet'"}
                                }
                       }
-                      -re ".*$gdb_prompt $" { fail "complete 'file ./gdb.base/compl'"}
-                      timeout           {fail "(timeout) complete 'file ./gdb.base/compl'"}
+                      -re ".*$gdb_prompt $" { fail "complete 'file ./gdb.base/complet'"}
+                      timeout           {fail "(timeout) complete 'file ./gdb.base/complet'"}
                      }
             }
-        -re ".*$gdb_prompt $"       { fail "complete 'file ./gdb.base/compl'" }
-        timeout         { fail "(timeout) complete 'file ./gdb.base/compl'" }
+        -re ".*$gdb_prompt $"       { fail "complete 'file ./gdb.base/complet'" }
+        timeout         { fail "(timeout) complete 'file ./gdb.base/complet'" }
         }
 
 send_gdb "info func marke\t"
index d58b9b65847eebcce1506b1f525b3c900dd339fe..8a6b60b3ed564e3219cc2273ab9d5f630db0bde1 100644 (file)
@@ -84,7 +84,7 @@ get_debug_format
 proc local_compiler_xfail_check { } {
     global gcc_compiled;
 
-    if {$gcc_compiled} then {
+    if {$gcc_compiled == 2} then {
        if { ![test_debug_format "HP"] \
                && ![test_debug_format "DWARF 2"] } then {
            setup_xfail "*-*-*" 
@@ -128,6 +128,10 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
 # test function parameters
 
 local_compiler_xfail_check
+if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+    # With stabs, even GCC 3 does not get the const char arguments correct.
+    setup_xfail "*-*-*"
+}
 send_gdb "ptype qux1\n"
 gdb_expect {
     -re "type = int \\(const char, const char, const char \\*, char \\* const\\).*$gdb_prompt $" {
@@ -140,6 +144,8 @@ gdb_expect {
 # test vars and pointers
 
 proc do_constvar_tests {} {
+    global gcc_compiled
+
     gdb_test "print lave" " = 66 'B'"
     gdb_test "ptype lave" "type = char"
     gdb_test "print lavish" " = 10 '\\\\n'"
@@ -279,6 +285,11 @@ proc do_constvar_tests {} {
     gdb_test "ptype locust" "type = double \\* const"
 
     local_compiler_xfail_check
+    if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+       # With stabs, even GCC 3 does not get the constant structure member
+       # correct.
+       setup_xfail "*-*-*"
+    }
     gdb_test "ptype crass" "type = struct crass \{\[\r\n\]+\[\ \t\]+char \\* const ptr;\[\r\n\]+\}"
     local_compiler_xfail_check
     gdb_test "ptype crisp" "type = struct crisp \{\[\r\n\]+\[\ \t\]+char \\* const \\*ptr;\[\r\n\]+\}"
index 279f1ab271cb9a64e26b027ef3f13f8bbf0367a9..98c64db8bca4399c3d4e461f5c5d4ac65a836e8a 100644 (file)
@@ -52,8 +52,8 @@ if [get_compiler_info ${binfile}] {
     return -1;
 }
 
-remote_exec build "test -r dir2.fileio.test && chmod -f +w dir2.fileio.test"
-remote_exec build "rm -rf *.fileio.test"
+remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test}
+remote_exec build {sh -xc rm\ -rf\ *.fileio.test}
 
 set oldtimeout $timeout
 set timeout [expr "$timeout + 60"]
@@ -269,9 +269,8 @@ gdb_test continue \
 send_gdb "quit\n"
 send_gdb "y\n"
 
-remote_exec build "test -r dir2.fileio.test && chmod -f +w dir2.fileio.test"
-remote_exec build "rm -rf *.fileio.test"
+remote_exec build {sh -xc test\ -r\ dir2.fileio.test\ &&\ chmod\ -f\ +w\ dir2.fileio.test}
+remote_exec build {sh -xc rm\ -rf\ *.fileio.test}
 
 set timeout $oldtimeout
 return 0
-
index 7aa75f35889bfb14507b44df95f38c17e3356977..f681e1f14684dd5eeb9435b9e091a2bd4fea9b21 100644 (file)
@@ -61,6 +61,8 @@ if { [istarget "alpha*-*-*"] } then {
     gdb_test "info float" "R7:.*Status Word:.*Opcode:.*" "info float"
 } elseif [istarget "ia64-*-*"] then {
     gdb_test "info float" "f0.*f1.*f127.*" "info float"
+} elseif [istarget "m68k-*-*"] then {
+    gdb_test "info float" "fp0.*fp1.*fp7.*" "info float"
 } else {
     gdb_test "info float" "No floating.point info available for this processor." "info float"
 }
index d2023920fb4164e47e17b2f9b404826174291c91..df8545dc62efe0e4b6bfd66cbf3bdc861ed6331b 100644 (file)
@@ -1,6 +1,10 @@
 static int static_foo = 1;
 static int static_bar = 2;
 
+/* This padding is just for the benefit of the test harness.  It
+   causes the globals to have different addresses than the functions.  */
+int dummy[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
 int global_foo = 3;
 int global_bar = 4;
 
index d10faf001fbacfde5f889b5d34b561c90eca9170..c87d9e4693583b6b2a955c6cafdaf6e6a64f9333 100644 (file)
@@ -109,7 +109,7 @@ proc return2_tests { } {
     return_1 "short"
     return_1 "int"
     return_1 "long"
-    if { ! [istarget "m6811-*-*"] } then {
+    if { ! [istarget "m6811-*-*"] && ![istarget "h8300*-*"] } then {
         return_1 "long_long"
     }
     return_1 "float"
index a899e36011130dba63590702a5d3734f47e356f5..6fe601eda522a6b0939cde9a913104ae788db91e 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 1988, 1990, 1991, 1992, 1994, 1997, 1999, 2000, 2002
+#   Copyright 1988, 1990, 1991, 1992, 1994, 1997, 1999, 2000, 2002, 2003
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -52,7 +52,7 @@ proc do_steps_and_nexts {} {
  
     gdb_reinitialize_dir $srcdir/..
 
-    for {set count 0} {$count < 26} {incr count} {
+    for {set count 0} {$count < 32} {incr count} {
        send_gdb "list\n"
        # NOTE: carlton/2002-12-11: The "initial brace" and
        # "current_directory initialization" possibilities happen to
@@ -180,6 +180,18 @@ proc do_steps_and_nexts {} {
                set description "step over gdb_sysroot initialization"
                set command "step"
            }
+           -re ".*ndir = 0.*$gdb_prompt $" {
+               set description "step over ndir initialization"
+               set command "step"
+           }
+           -re ".*instream = stdin.*$gdb_prompt $" {
+               set description "step over instream initialization"
+               set command "step"
+           }
+           -re ".*getcwd .gdb_dirbuf, sizeof .gdb_dirbuf..;.*$gdb_prompt $" {
+               set description "next over getcwd"
+               set command "next"
+           }
            -re "\[ \t\]+\{\r\n$gdb_prompt $" {
                setup_xfail "mips-*-irix5*"
                fail "$description ended up at odd location"
@@ -327,10 +339,31 @@ proc test_with_self { executable } {
     # If we don't actually enter the xmalloc call when we give a
     # step command that seems like a genuine bug.  It seems to happen
     # on most RISC processors.
+    # NOTE drow/2003-06-22: However, if we step back to the preceding two
+    # lines, just keep stepping until we enter.
+    set stepped_back 0
     setup_xfail "alpha-*-*" "mips-*-*"
     set description "step into xmalloc call"
     send_gdb "step\n"
     gdb_expect {
+       -re "ncmd = 0;.*$gdb_prompt $" {
+           set stepped_back 1
+           send_gdb "step\n"
+           exp_continue
+       }
+       -re "dirsize = 1;.*$gdb_prompt $" {
+           set stepped_back 1
+           send_gdb "step\n"
+           exp_continue
+       }
+       -re ".*dirarg = .* xmalloc.*$gdb_prompt $" {
+           if { $stepped_back == 1 } {
+               send_gdb "step\n"
+               exp_continue
+           } else {
+               fail "$description"
+           }
+       }
        -re "xmalloc.*size=.*at.*utils.c.*$gdb_prompt $" {
            pass "$description"
        }
index 46acc6a1c81f4848962aad9d27d3d687ec9e7428..545515dfc1030d071115e65a15c0e55ffacedc40 100644 (file)
@@ -7,8 +7,10 @@
    function calls within main even when no optimization flags were
    passed.  */
 
-char
-add_char (register char u, register char v)
+typedef signed char charest;
+
+charest
+add_charest (register charest u, register charest v)
 {
   return u + v;
 }
@@ -61,12 +63,12 @@ add_doublest (register doublest u, register doublest v)
 
 /* */
 
-char
-wack_char (register char u, register char v)
+charest
+wack_charest (register charest u, register charest v)
 {
-  register char l = u, r = v;
-  l = add_char (l, r);
-  return l;
+  register charest l = u, r = v;
+  l = add_charest (l, r);
+  return l + r;
 }
 
 short
@@ -74,7 +76,7 @@ wack_short (register short u, register short v)
 {
   register short l = u, r = v;
   l = add_short (l, r);
-  return l;
+  return l + r;
 }
 
 int
@@ -82,7 +84,7 @@ wack_int (register int u, register int v)
 {
   register int l = u, r = v;
   l = add_int (l, r);
-  return l;
+  return l + r;
 }
 
 long
@@ -90,7 +92,7 @@ wack_long (register long u, register long v)
 {
   register long l = u, r = v;
   l = add_long (l, r);
-  return l;
+  return l + r;
 }
 
 long
@@ -98,7 +100,7 @@ wack_longest (register longest u, register longest v)
 {
   register longest l = u, r = v;
   l = add_longest (l, r);
-  return l;
+  return l + r;
 }
 
 float
@@ -106,7 +108,7 @@ wack_float (register float u, register float v)
 {
   register float l = u, r = v;
   l = add_float (l, r);
-  return l;
+  return l + r;
 }
 
 double
@@ -114,7 +116,7 @@ wack_double (register double u, register double v)
 {
   register double l = u, r = v;
   l = add_double (l, r);
-  return l;
+  return l + r;
 }
 
 doublest
@@ -122,7 +124,7 @@ wack_doublest (register doublest u, register doublest v)
 {
   register doublest l = u, r = v;
   l = add_doublest (l, r);
-  return l;
+  return l + r;
 }
 
 /* */
@@ -253,7 +255,7 @@ int
 main ()
 {
   /* These calls are for current frame test.  */
-  wack_char (-1, -2);
+  wack_charest (-1, -2);
   wack_short (-1, -2);
   wack_int (-1, -2);
   wack_long (-1, -2);
@@ -263,7 +265,7 @@ main ()
   wack_doublest (-1, -2);
 
   /* These calls are for up frame.  */
-  wack_char (-1, -2);
+  wack_charest (-1, -2);
   wack_short (-1, -2);
   wack_int (-1, -2);
   wack_long (-1, -2);
index 5e0e60eb793018ffdc5378744ef2fea8d9fbfdf3..49e05ef814df6cede95eddce0b9b7572e4780452 100644 (file)
@@ -63,11 +63,11 @@ proc check_set { t l r new add } {
     gdb_test "print r" " = ${r}" "print old r - ${t}"
     gdb_test "set variable l = 4"
     gdb_test "print l" " = ${new}" "print new l - ${t}"
-    gdb_test "next" "return l;"
+    gdb_test "next" "return l \\+ r;"
     gdb_test "print l" " = ${add}" "print add  - ${t}"
 }
 
-check_set "char" "-1 .*" "-2 .*" "4 ..004." "2 ..002."
+check_set "charest" "-1 .*" "-2 .*" "4 ..004." "2 ..002."
 check_set "short" "-1" "-2" "4" "2"
 check_set "int" "-1" "-2" "4" "2"
 check_set "long" "-1" "-2" "4" "2"
@@ -89,7 +89,7 @@ proc up_set { t l r new } {
     gdb_test "print l" " = ${new}" "up print new l - ${t}"
 }
 
-up_set "char" "-1 .*" "-2 .*" "4 ..004."
+up_set "charest" "-1 .*" "-2 .*" "4 ..004."
 up_set "short" "-1" "-2" "4"
 up_set "int" "-1" "-2" "4"
 up_set "long" "-1" "-2" "4"
index efb271b6ec025b61e6afca35f1ecdd1d6d616504..704369605eba452f2e683e7bd29aa96507393857 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+#   Copyright 1997, 1998, 1999, 2003 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
@@ -90,7 +90,7 @@ get_debug_format
 proc local_compiler_xfail_check { } {
     global gcc_compiled;
 
-    if {$gcc_compiled} then {
+    if {$gcc_compiled == 2} then {
        if { ![test_debug_format "HP"] \
                && ![test_debug_format "DWARF 2"] } then {
            setup_xfail "*-*-*" 
@@ -258,6 +258,11 @@ gdb_test "ptype vendor" "type = const volatile unsigned char \\* const volatile.
 
 # test function parameters
 local_compiler_xfail_check
+if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then {
+    # For reasons unknown, GCC 3 with stabs mangles several cv-qualified
+    # arguments to this function.
+    setup_xfail "*-*-*"
+}
 send_gdb "ptype qux2\n"
 gdb_expect {
     -re "type = int \\(volatile unsigned char, const volatile int, volatile short( int)?, volatile long( int)? \\*, float \\* volatile, const volatile signed char \\* const volatile\\).*$gdb_prompt $" {
index 86c1f834f11785c69926fe85d0fd3fab8ebdd509..993bfb159cb1510f3577fd23ea96d56407501fe2 100644 (file)
@@ -704,6 +704,14 @@ proc test_print_svi_classes {} {
        -re ".* = \{\<vA\> = \{va = 3, vx = 4\}, _vptr.vB = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
            pass "print g_vB (FIXME v3 vtbl ptr)"
        }
+       -re ".* = \{\<vA\> = \{va = 3, vx = 4\}, _vptr.vB = $hex <VTT for vB>, vb = 5, vx = 6\}$nl$gdb_prompt $" {
+           # Happens with gcc 3.3 -gstabs+
+           # Does not happen with gcc 3.2.3 -gstabs+.
+           # Does not happen gcc HEAD%20030624 (pre-3.4) -gstabs+.
+           # -- chastain 2003-06-29
+           pass "print g_vB"
+       }
+
        -re ".*invalid address 0x0.*$gdb_prompt $" {
            # Does not happen with gcc cygnus-2.4.5-930828
            fail "print g_vB (known bug with gcc cygnus-2.4.5-930417)"
@@ -730,6 +738,13 @@ proc test_print_svi_classes {} {
        -re ".* = \{\<vA\> = \{va = 7, vx = 8\}, _vptr.vC = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
            pass "print g_vC (FIXME v3 vtbl ptr)"
        }
+       -re ".* = \{\<vA\> = \{va = 7, vx = 8\}, _vptr.vC = $hex <VTT for vC>, vc = 9, vx = 10\}$nl$gdb_prompt $" {
+           # Happens with gcc 3.3 -gstabs+
+           # Does not happen with gcc 3.2.3 -gstabs+.
+           # Does not happen gcc HEAD%20030624 (pre-3.4) -gstabs+.
+           # -- chastain 2003-06-29
+           pass "print g_vC"
+       }
        -re ".*$gdb_prompt $" { fail "print g_vC" }
        timeout { fail "print g_vC (timeout)" }
     }
@@ -906,6 +921,13 @@ proc test_print_mvi_classes {} {
        -re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, _vptr.vB = $hex, vb = 21, vx = 22\}, \<vC\> = \{_vptr.vC = $hex, vc = 23, vx = 24\}, _vptr.vD = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
            pass "print g_vD (FIXME v3 vtbl ptr)"
        }
+       -re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, _vptr.vB = $hex, vb = 21, vx = 22\}, \<vC\> = \{_vptr.vC = $hex <VTT for vD>, vc = 23, vx = 24\}, _vptr.vD = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
+           # Happens with gcc 3.3 -gstabs+
+           # Does not happen with gcc 3.2.3 -gstabs+.
+           # Does not happen gcc HEAD%20030624 (pre-3.4) -gstabs+.
+           # -- chastain 2003-06-29
+           pass "print g_vD"
+       }
        -re ".*invalid address 0x0.*$gdb_prompt $" {
            # Does not happen with gcc cygnus-2.4.5-930828
            fail "print g_vD (known bug with gcc cygnus-2.4.5-930417)"
index 77bfff698be0c7852780f7c4fd7c505222352ad1..710e14ae6487e7d71475f7aea01df0e3bee11425 100644 (file)
@@ -51,7 +51,19 @@ proc test_single_component {name} {
     gdb_test "maint cp first_component $name" "$matchname"
 }
 
+# This is used when NAME is invalid.
+proc test_invalid_name {name} {
+    set matchname [string_to_regexp "$name"]
+    gdb_test "maint cp first_component $name" \
+       "During symbol reading, unexpected demangled name '$matchname'.\r\n$matchname"
+}
+
 proc test_first_component {} {
+    # The function in question might complain; make sure that we see
+    # all complaints.
+
+    gdb_test "set complaints -1" ""
+
     test_single_component "foo"
     test_single_component "operator<<"
     test_single_component "operator>>"
@@ -85,12 +97,22 @@ proc test_first_component {} {
     gdb_test "maint cp first_component foo::bar::baz" "foo"
     gdb_test "maint cp first_component C<A>::bar" "C<A>"
     gdb_test "maint cp first_component C<std::basic_streambuf<wchar_t,std::char_traits<wchar_t> > >::bar" "C<std::basic_streambuf<wchar_t,std::char_traits<wchar_t> > >"
+
+    # Make sure we behave appropriately on invalid input.
+
+    # NOTE: carlton/2003-06-25: As of today, the demangler can in fact
+    # produce examples like the third case below: there really should
+    # be a space between the two <'s.  See PR gdb/1245.
+
+    test_invalid_name "foo<"
+    test_invalid_name "foo("
+    test_invalid_name "bool operator<<char>"
 }
 
 proc test_namespace {} {
     # There's not a lot we can do to test this.
 
-    gdb_test "maint cp namespace" "Definite namespaces:\r\nPossible namespaces:"
+    gdb_test "maint cp namespace" "Possible namespaces:"
 }
 
 gdb_exit
index 9bef50cef162fc8955807f1312d6ca08fadc04d9..0b8357d05e5b3eea8dba963d433cd6022ca1c48e 100644 (file)
@@ -61,7 +61,7 @@ proc test_ptype_of_templates {} {
        -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\((T5<int> const|const T5<int>) ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
            pass "ptype T5<int> (obsolescent gcc or gdb)"
        }
-       -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
+       -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned( long|)\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
            # This also triggers gdb/1113...
            kfail "gdb/1111" "ptype T5<int>"
        }
@@ -87,7 +87,7 @@ proc test_ptype_of_templates {} {
        -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\(T5<int> const ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
            pass "ptype t5i (obsolescent gcc or gdb)"
        }
-       -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
+       -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned( long|)\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
            # This also triggers gdb/1113...
            kfail "gdb/1111" "ptype T5<int>"
        }
index 60a106a050bc50be6a1039c796fa9c7dc0c67715..5d6fd8d5c8b330883b2888aeec4e0a33ef0078c6 100644 (file)
@@ -94,6 +94,13 @@ proc test_all_threads { name kill } {
                fail "all threads ran once ($name) (total $i threads ran)"
            }
        }
+       -re "Program received signal SIGTRAP.*(Thread \[0-9\]* \\(zombie\\)|0x00000000 in ).*$gdb_prompt $" {
+           if { $kill == 1 } {
+               kfail "gdb/1265" "Running threads ($name) (zombie thread)"
+           } else {
+               fail "Running threads ($name) (unknown output)"
+           }
+       }
        -re "$gdb_prompt" {
            fail "Running threads ($name) (unknown output)"
        }
index 315f33b1c4aaec6073de36c77f97fe44bf93fe12..f8cc18d72a2138fb0b8b74ae61906846ab1cf58a 100644 (file)
@@ -417,14 +417,14 @@ info_threads_command (char *arg, int from_tty)
   struct thread_info *tp;
   ptid_t current_ptid;
   struct frame_info *cur_frame;
-  int saved_frame_level = frame_relative_level (deprecated_selected_frame);
+  int saved_frame_level = frame_relative_level (get_selected_frame ());
   int counter;
   char *extra_info;
 
-  /* Avoid coredumps which would happen if we tried to access a NULL
-     deprecated_selected_frame.  */
-  if (!target_has_stack)
-    error ("No stack.");
+  /* Check that there really is a frame.  This happens when a simulator
+     is connected but not loaded or running, for instance.  */
+  if (legacy_frame_p (current_gdbarch) && saved_frame_level < 0)
+    error ("No frame.");
 
   prune_threads ();
   target_find_new_threads ();
@@ -448,10 +448,7 @@ info_threads_command (char *arg, int from_tty)
       puts_filtered ("  ");
 
       switch_to_thread (tp->ptid);
-      if (deprecated_selected_frame)
-       print_stack_frame (deprecated_selected_frame, -1, 0);
-      else
-       printf_filtered ("[No stack.]\n");
+      print_stack_frame (get_selected_frame (), -1, 0);
     }
 
   switch_to_thread (current_ptid);
@@ -463,12 +460,12 @@ info_threads_command (char *arg, int from_tty)
    * of the stack (leaf frame).
    */
   counter = saved_frame_level;
-  cur_frame = find_relative_frame (deprecated_selected_frame, &counter);
+  cur_frame = find_relative_frame (get_selected_frame (), &counter);
   if (counter != 0)
     {
       /* Ooops, can't restore, tell user where we are. */
       warning ("Couldn't restore frame in current thread, at frame 0");
-      print_stack_frame (deprecated_selected_frame, -1, 0);
+      print_stack_frame (get_selected_frame (), -1, 0);
     }
   else
     {
index 3efebecb3eca90ccf11b4a1b1334ad5025aeae66..e4f9642fcf4314927d9b0f091975dc3d7992b12f 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1201,9 +1201,9 @@ command_line_input (char *prompt_arg, int repeat, char *annotation_suffix)
 
       if (annotation_level > 1 && instream == stdin)
        {
-         printf_unfiltered ("\n\032\032pre-");
-         printf_unfiltered (annotation_suffix);
-         printf_unfiltered ("\n");
+         puts_unfiltered ("\n\032\032pre-");
+         puts_unfiltered (annotation_suffix);
+         puts_unfiltered ("\n");
        }
 
       /* Don't use fancy stuff if not talking to stdin.  */
@@ -1222,9 +1222,9 @@ command_line_input (char *prompt_arg, int repeat, char *annotation_suffix)
 
       if (annotation_level > 1 && instream == stdin)
        {
-         printf_unfiltered ("\n\032\032post-");
-         printf_unfiltered (annotation_suffix);
-         printf_unfiltered ("\n");
+         puts_unfiltered ("\n\032\032post-");
+         puts_unfiltered (annotation_suffix);
+         puts_unfiltered ("\n");
        }
 
       if (!rl || rl == (char *) EOF)
@@ -1686,7 +1686,7 @@ quit_confirm (void)
       else
        s = "The program is running.  Exit anyway? ";
 
-      if (!query (s))
+      if (!query ("%s", s))
        return 0;
     }
 
index 92e6f83eecb6b76d8e18f368729aaafcb85c6856..d73813b9f1f48c2bc776ef87b926d79e93df2147 100644 (file)
@@ -38,36 +38,70 @@ trad_frame_alloc_saved_regs (struct frame_info *next_frame)
   struct trad_frame_saved_reg *this_saved_regs
     = FRAME_OBSTACK_CALLOC (numregs, struct trad_frame_saved_reg);
   for (regnum = 0; regnum < numregs; regnum++)
-    this_saved_regs[regnum].realnum = regnum;
+    {
+      this_saved_regs[regnum].realreg = regnum;
+      this_saved_regs[regnum].addr = -1;
+    }      
   return this_saved_regs;
 }
 
+enum { REG_VALUE = -1, REG_UNKNOWN = -2 };
+
+int
+trad_frame_value_p (struct trad_frame_saved_reg this_saved_regs[], int regnum)
+{
+  return (this_saved_regs[regnum].realreg == REG_VALUE);
+}
+
+int
+trad_frame_addr_p (struct trad_frame_saved_reg this_saved_regs[], int regnum)
+{
+  return (this_saved_regs[regnum].realreg >= 0
+         && this_saved_regs[regnum].addr != -1);
+}
+
+int
+trad_frame_realreg_p (struct trad_frame_saved_reg this_saved_regs[],
+                     int regnum)
+{
+  return (this_saved_regs[regnum].realreg >= 0
+         && this_saved_regs[regnum].addr == -1);
+}
+
 void
-trad_frame_register_value (struct trad_frame_saved_reg this_saved_regs[],
-                          int regnum, LONGEST val)
+trad_frame_set_value (struct trad_frame_saved_reg this_saved_regs[],
+                     int regnum, LONGEST val)
 {
-  /* Make the REALNUM invalid, indicating that the ADDR contains the
+  /* Make the REALREG invalid, indicating that the ADDR contains the
      register's value.  */
-  this_saved_regs[regnum].realnum = -1;
+  this_saved_regs[regnum].realreg = REG_VALUE;
   this_saved_regs[regnum].addr = val;
 }
 
+void
+trad_frame_set_unknown (struct trad_frame_saved_reg this_saved_regs[],
+                       int regnum)
+{
+  /* Make the REALREG invalid, indicating that the value is not known.  */
+  this_saved_regs[regnum].realreg = REG_UNKNOWN;
+  this_saved_regs[regnum].addr = -1;
+}
+
 void
 trad_frame_prev_register (struct frame_info *next_frame,
                          struct trad_frame_saved_reg this_saved_regs[],
                          int regnum, int *optimizedp,
                          enum lval_type *lvalp, CORE_ADDR *addrp,
-                         int *realnump, void *bufferp)
+                         int *realregp, void *bufferp)
 {
   struct gdbarch *gdbarch = get_frame_arch (next_frame);
-  if (this_saved_regs[regnum].realnum >= 0
-      && this_saved_regs[regnum].addr != 0)
+  if (trad_frame_addr_p (this_saved_regs, regnum))
     {
       /* The register was saved in memory.  */
       *optimizedp = 0;
       *lvalp = lval_memory;
       *addrp = this_saved_regs[regnum].addr;
-      *realnump = -1;
+      *realregp = -1;
       if (bufferp != NULL)
        {
          /* Read the value in from memory.  */
@@ -75,22 +109,26 @@ trad_frame_prev_register (struct frame_info *next_frame,
                            register_size (gdbarch, regnum));
        }
     }
-  else if (this_saved_regs[regnum].realnum >= 0
-          && this_saved_regs[regnum].addr == 0)
+  else if (trad_frame_realreg_p (this_saved_regs, regnum))
     {
       /* As the next frame to return the value of the register.  */
-      frame_register_unwind (next_frame, this_saved_regs[regnum].realnum,
-                            optimizedp, lvalp, addrp, realnump, bufferp);
+      frame_register_unwind (next_frame, this_saved_regs[regnum].realreg,
+                            optimizedp, lvalp, addrp, realregp, bufferp);
     }
-  else
+  else if (trad_frame_value_p (this_saved_regs, regnum))
     {
       /* The register's value is available.  */
       *optimizedp = 0;
       *lvalp = not_lval;
       *addrp = 0;
-      *realnump = -1;
+      *realregp = -1;
       if (bufferp != NULL)
        store_unsigned_integer (bufferp, register_size (gdbarch, regnum),
                                this_saved_regs[regnum].addr);
     }
+  else
+    {
+      error ("Register %s not available",
+            gdbarch_register_name (gdbarch, regnum));
+    }
 }
index 2b04c7e654e0c2ded647252eb65d9731b2491294..55720c7e836296634d82e5e1f4eb52aaa190fa76 100644 (file)
@@ -28,33 +28,51 @@ struct frame_info;
    the value of REGNUM for the previous frame can be found in this
    frame.
 
-   The table is initialized with an identity encoding (ADDR == 0,
-   REALNUM == REGNUM) indicating that the value of REGNUM in the
-   previous frame can be found in register REGNUM (== REALNUM) in this
+   The table is initialized with an identity encoding (ADDR == -1,
+   REALREG == REGNUM) indicating that the value of REGNUM in the
+   previous frame can be found in register REGNUM (== REALREG) in this
    frame.
 
    The initial encoding can then be changed:
 
-   Modify ADDR (REALNUM >= 0, ADDR != 0) to indicate that the value of
-   register REGNUM in the previous frame can be found in memory at
-   ADDR in this frame.
+   Modify ADDR (REALREG >= 0, ADDR != -1) to indicate that the value
+   of register REGNUM in the previous frame can be found in memory at
+   ADDR in this frame (addr_p, !realreg_p, !value_p).
 
-   Modify REALNUM (REALNUM >= 0, ADDR == 0) to indicate that the value
-   of register REGNUM in the previous frame is found in register
-   REALNUM in this frame.
+   Modify REALREG (REALREG >= 0, ADDR == -1) to indicate that the
+   value of register REGNUM in the previous frame is found in register
+   REALREG in this frame (!addr_p, realreg_p, !value_p).
 
-   Call trad_frame_register_value (REALNUM < 0) to indicate that the
-   value of register REGNUM in the previous frame is found in ADDR.  */
+   Call trad_frame_set_value (REALREG == -1) to indicate that the
+   value of register REGNUM in the previous frame is found in ADDR
+   (!addr_p, !realreg_p, value_p).
+
+   Call trad_frame_set_unknown (REALREG == -2) to indicate that the
+   register's value is not known.  */
 
 struct trad_frame_saved_reg
 {
   LONGEST addr; /* A CORE_ADDR fits in a longest.  */
-  int realnum;
+  int realreg;
 };
 
-/* Convenience function, encode REGNUM's location in the trad-frame.  */
-void trad_frame_register_value (struct trad_frame_saved_reg this_saved_regs[],
-                               int regnum, LONGEST val);
+/* Encode REGNUM value in the trad-frame.  */
+void trad_frame_set_value (struct trad_frame_saved_reg this_saved_regs[],
+                          int regnum, LONGEST val);
+
+/* Mark REGNUM as unknown.  */
+void trad_frame_set_unknown (struct trad_frame_saved_reg this_saved_regs[],
+                            int regnum);
+
+/* Convenience functions, return non-zero if the register has been
+   encoded as specified.  */
+int trad_frame_value_p (struct trad_frame_saved_reg this_saved_regs[],
+                       int regnum);
+int trad_frame_addr_p (struct trad_frame_saved_reg this_saved_regs[],
+                      int regnum);
+int trad_frame_realreg_p (struct trad_frame_saved_reg this_saved_regs[],
+                         int regnum);
+
 
 /* Return a freshly allocated (and initialized) trad_frame array.  */
 struct trad_frame_saved_reg *trad_frame_alloc_saved_regs (struct frame_info *next_frame);
@@ -65,6 +83,6 @@ void trad_frame_prev_register (struct frame_info *next_frame,
                               struct trad_frame_saved_reg this_saved_regs[],
                               int regnum, int *optimizedp,
                               enum lval_type *lvalp, CORE_ADDR *addrp,
-                              int *realnump, void *bufferp);
+                              int *realregp, void *bufferp);
 
 #endif
index 9ab34614aa0de99cdd49c0e5fda06d9d8ece8f71..8eb6d330c7459d38d6e37c15d210f210afb4b0db 100644 (file)
@@ -1,3 +1,31 @@
+2003-08-04  Daniel Jacobowitz  <drow@mvista.com>
+
+       * tui-interp.c: Include "cli-out.h".
+       (tui_resume): Update tui_old_uiout's stream to gdb_stdout.
+
+2003-07-24  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * tui.c (tui_rl_other_window): New function to switch the TUI active
+       window and give focus to a next window.
+       (tui_initialize_readline): Bind it to c-x o.
+       (tui_rl_next_keymap): Activate TUI mode when entering SingleKey mode.
+
+2003-07-23  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * tui.c (tui_enable): Call tuiRefreshAll to make sure the window
+       is accurate.
+
+2003-07-23  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * tui-interp.c (tui_resume): Enable tui when we expected it.
+       (tui_suspend): Remember in which TUI mode we are.
+       (_initialize_tui_interp): Use the tui interpreter even when no
+       other interpreter was set and define in which TUI mode to start.
+
+2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
+
+       * tui-out.c (tui_ui_out_impl): Add NULL for redirect member.
+
 2003-06-22  Daniel Jacobowitz  <drow@mvista.com>
 
        * tui-hooks.c: Update include order.
index f935ea4094ced5731da0acc51387f01146b25fdc..986ebb3b13326333721ffc6679c927d45dfcc2d8 100644 (file)
 #include "event-top.h"
 #include "event-loop.h"
 #include "ui-out.h"
+#include "cli-out.h"
 #include "tui/tuiData.h"
 #include "readline/readline.h"
 #include "tui/tuiWin.h"
 #include "tui/tui.h"
 #include "tui/tuiIO.h"
 
+/* Set to 1 when the TUI mode must be activated when we first start gdb.  */
+static int tui_start_enabled = 0;
+
 /* Cleanup the tui before exiting.  */
 
 static void
@@ -60,14 +64,32 @@ tui_init (void)
 static int
 tui_resume (void *data)
 {
+  struct ui_file *stream;
+
+  /* gdb_setup_readline will change gdb_stdout.  If the TUI was previously
+     writing to gdb_stdout, then set it to the new gdb_stdout afterwards.  */
+
+  stream = cli_out_set_stream (tui_old_uiout, gdb_stdout);
+  if (stream != gdb_stdout)
+    {
+      cli_out_set_stream (tui_old_uiout, stream);
+      stream = NULL;
+    }
+
   gdb_setup_readline ();
-  tui_enable ();
+
+  if (stream != NULL)
+    cli_out_set_stream (tui_old_uiout, gdb_stdout);
+
+  if (tui_start_enabled)
+    tui_enable ();
   return 1;
 }
 
 static int
 tui_suspend (void *data)
 {
+  tui_start_enabled = tui_active;
   tui_disable ();
   return 1;
 }
@@ -177,4 +199,12 @@ _initialize_tui_interp (void)
   /* Create a default uiout builder for the TUI. */
   tui_out = tui_out_new (gdb_stdout);
   interp_add (interp_new ("tui", NULL, tui_out, &procs));
+  if (interpreter_p && strcmp (interpreter_p, "tui") == 0)
+    tui_start_enabled = 1;
+
+  if (interpreter_p && strcmp (interpreter_p, INTERP_CONSOLE) == 0)
+    {
+      xfree (interpreter_p);
+      interpreter_p = xstrdup ("tui");
+    }
 }
index 94fda09b14c2baa9f2eb6d22f22f7b2e94f6c5b8..e1be56a6b00064b99a8f098404ae36b917d836f6 100644 (file)
@@ -90,6 +90,7 @@ static struct ui_out_impl tui_ui_out_impl =
   tui_message,
   tui_wrap_hint,
   tui_flush,
+  NULL,
   0, /* Does not need MI hacks (i.e. needs CLI hacks).  */
 };
 
index 7e665d58a79428bdd1bffaebad19a68e6d6821f8..601a5795e2dac23c09e5424589270d0c4a0f9601 100644 (file)
@@ -45,6 +45,7 @@
 #include "tuiStack.h"
 #include "tuiWin.h"
 #include "tuiSourceWin.h"
+#include "tuiDataWin.h"
 #include "readline/readline.h"
 #include "target.h"
 #include "frame.h"
@@ -209,6 +210,27 @@ tui_rl_delete_other_windows (int notused1, int notused2)
   return 0;
 }
 
+/* TUI readline command.
+   Switch the active window to give the focus to a next window.  */
+static int
+tui_rl_other_window (int count, int key)
+{
+  TuiWinInfoPtr winInfo;
+
+  if (!tui_active)
+    tui_rl_switch_mode (0/*notused*/, 0/*notused*/);
+
+  winInfo = tuiNextWin (tuiWinWithFocus ());
+  if (winInfo)
+    {
+      tuiSetWinFocusTo (winInfo);
+      if (dataWin && dataWin->generic.isVisible)
+        tuiRefreshDataWin ();
+      keypad (cmdWin->generic.handle, (winInfo != cmdWin));
+    }
+  return 0;
+}
+
 /* TUI readline command.
    Execute the gdb command bound to the specified key.  */
 static int
@@ -248,6 +270,9 @@ tui_rl_command_mode (int count, int key)
 static int
 tui_rl_next_keymap (int notused1, int notused2)
 {
+  if (!tui_active)
+    tui_rl_switch_mode (0/*notused*/, 0/*notused*/);
+
   tui_set_key_mode (tui_current_key_mode == tui_command_mode
                     ? tui_single_key_mode : tui_command_mode);
   return 0;
@@ -326,6 +351,8 @@ tui_initialize_readline ()
   rl_bind_key_in_map ('1', tui_rl_delete_other_windows, tui_ctlx_keymap);
   rl_bind_key_in_map ('2', tui_rl_change_windows, emacs_ctlx_keymap);
   rl_bind_key_in_map ('2', tui_rl_change_windows, tui_ctlx_keymap);
+  rl_bind_key_in_map ('o', tui_rl_other_window, emacs_ctlx_keymap);
+  rl_bind_key_in_map ('o', tui_rl_other_window, tui_ctlx_keymap);
   rl_bind_key_in_map ('q', tui_rl_next_keymap, tui_keymap);
   rl_bind_key_in_map ('s', tui_rl_next_keymap, emacs_ctlx_keymap);
   rl_bind_key_in_map ('s', tui_rl_next_keymap, tui_ctlx_keymap);
@@ -390,7 +417,7 @@ tui_enable (void)
 
   /* Restore TUI keymap.  */
   tui_set_key_mode (tui_current_key_mode);
-  refresh ();
+  tuiRefreshAll ();
 
   /* Update gdb's knowledge of its terminal.  */
   target_terminal_save_ours ();
index 71e6d6ac070ead3a98529ba8955435b20a0944a2..5fb8eaa69e80e74d95fbb0117072066c68e2c2a6 100644 (file)
@@ -206,6 +206,7 @@ struct ui_out_impl default_ui_out_impl =
   default_message,
   default_wrap_hint,
   default_flush,
+  NULL,
   0, /* Does not need MI hacks.  */
 };
 
@@ -254,6 +255,7 @@ static void uo_message (struct ui_out *uiout, int verbosity,
                        const char *format, va_list args);
 static void uo_wrap_hint (struct ui_out *uiout, char *identstring);
 static void uo_flush (struct ui_out *uiout);
+static int uo_redirect (struct ui_out *uiout, struct ui_file *outstream);
 
 /* Prototypes for local functions */
 
@@ -638,6 +640,12 @@ ui_out_flush (struct ui_out *uiout)
   uo_flush (uiout);
 }
 
+int
+ui_out_redirect (struct ui_out *uiout, struct ui_file *outstream)
+{
+  return uo_redirect (uiout, outstream);
+}
+
 /* set the flags specified by the mask given */
 int
 ui_out_set_flags (struct ui_out *uiout, int mask)
@@ -981,6 +989,15 @@ uo_flush (struct ui_out *uiout)
   uiout->impl->flush (uiout);
 }
 
+int
+uo_redirect (struct ui_out *uiout, struct ui_file *outstream)
+{
+  if (!uiout->impl->redirect)
+    return -1;
+  uiout->impl->redirect (uiout, outstream);
+  return 0;
+}
+
 /* local functions */
 
 /* list of column headers manipulation routines */
index a52c3453722874a008507aa67fdf66054991a88e..5e19aff9a89bc32aa689425d7674dd4523b14889 100644 (file)
@@ -27,7 +27,7 @@
 
 struct ui_out;
 struct ui_out_data;
-
+struct ui_file;
 
 /* the current ui_out */
 
@@ -231,6 +231,8 @@ typedef void (message_ftype) (struct ui_out * uiout, int verbosity,
                              const char *format, va_list args);
 typedef void (wrap_hint_ftype) (struct ui_out * uiout, char *identstring);
 typedef void (flush_ftype) (struct ui_out * uiout);
+typedef int (redirect_ftype) (struct ui_out * uiout,
+                             struct ui_file * outstream);
 
 /* ui-out-impl */
 
@@ -254,6 +256,7 @@ struct ui_out_impl
     message_ftype *message;
     wrap_hint_ftype *wrap_hint;
     flush_ftype *flush;
+    redirect_ftype *redirect;
     int is_mi_like_p;
   };
 
@@ -266,4 +269,8 @@ extern struct ui_out *ui_out_new (struct ui_out_impl *impl,
                                  struct ui_out_data *data,
                                  int flags);
 
+/* Redirect the ouptut of a ui_out object temporarily.  */
+
+extern int ui_out_redirect (struct ui_out *uiout, struct ui_file *outstream);
+
 #endif /* UI_OUT_H */
index 96a2490480db5ff97d43b8301c7fcd0375176dc1..6f97752f0dff33600e0ea7eac9c861a5dea432a8 100644 (file)
@@ -578,7 +578,7 @@ vwarning (const char *string, va_list args)
       wrap_here ("");          /* Force out any buffered output */
       gdb_flush (gdb_stdout);
       if (warning_pre_print)
-       fprintf_unfiltered (gdb_stderr, warning_pre_print);
+       fputs_unfiltered (warning_pre_print, gdb_stderr);
       vfprintf_unfiltered (gdb_stderr, string, args);
       fprintf_unfiltered (gdb_stderr, "\n");
       va_end (args);
@@ -644,7 +644,7 @@ error_stream (struct ui_file *stream)
   gdb_flush (gdb_stdout);
   annotate_error_begin ();
   if (error_pre_print)
-    fprintf_filtered (gdb_stderr, error_pre_print);
+    fputs_filtered (error_pre_print, gdb_stderr);
   ui_file_put (stream, do_write, gdb_stderr);
   fprintf_filtered (gdb_stderr, "\n");
 
@@ -724,7 +724,7 @@ internal_vproblem (struct internal_problem *problem,
      so that the user knows that they are living on the edge.  */
   {
     char *msg;
-    xasprintf (&msg, fmt, ap);
+    xvasprintf (&msg, fmt, ap);
     xasprintf (&reason, "\
 %s:%d: %s: %s\n\
 A problem internal to GDB has been detected,\n\
@@ -922,7 +922,7 @@ quit (void)
 
   /* Don't use *_filtered; we don't want to prompt the user to continue.  */
   if (quit_pre_print)
-    fprintf_unfiltered (gdb_stderr, quit_pre_print);
+    fputs_unfiltered (quit_pre_print, gdb_stderr);
 
 #ifdef __MSDOS__
   /* No steenking SIGINT will ever be coming our way when the
index d4b8bf5faf758804ce4f9ee66b4ddf67e15b64d6..71e391a0908aaff484c2d8ceed331daf24b8f851 100644 (file)
@@ -452,9 +452,9 @@ print_floating (char *valaddr, struct type *type, struct ui_file *stream)
       if (floatformat_is_negative (fmt, valaddr))
        fprintf_filtered (stream, "-");
       fprintf_filtered (stream, "nan(");
-      fprintf_filtered (stream, local_hex_format_prefix ());
-      fprintf_filtered (stream, floatformat_mantissa (fmt, valaddr));
-      fprintf_filtered (stream, local_hex_format_suffix ());
+      fputs_filtered (local_hex_format_prefix (), stream);
+      fputs_filtered (floatformat_mantissa (fmt, valaddr), stream);
+      fputs_filtered (local_hex_format_suffix (), stream);
       fprintf_filtered (stream, ")");
       return;
     }
@@ -515,7 +515,7 @@ print_binary_chars (struct ui_file *stream, unsigned char *valaddr,
 
   /* FIXME: We should be not printing leading zeroes in most cases.  */
 
-  fprintf_filtered (stream, local_binary_format_prefix ());
+  fputs_filtered (local_binary_format_prefix (), stream);
   if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
     {
       for (p = valaddr;
@@ -553,7 +553,7 @@ print_binary_chars (struct ui_file *stream, unsigned char *valaddr,
            }
        }
     }
-  fprintf_filtered (stream, local_binary_format_suffix ());
+  fputs_filtered (local_binary_format_suffix (), stream);
 }
 
 /* VALADDR points to an integer of LEN bytes.
@@ -602,7 +602,7 @@ print_octal_chars (struct ui_file *stream, unsigned char *valaddr, unsigned len)
   cycle = (len * BITS_IN_BYTES) % BITS_IN_OCTAL;
   carry = 0;
 
-  fprintf_filtered (stream, local_octal_format_prefix ());
+  fputs_filtered (local_octal_format_prefix (), stream);
   if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
     {
       for (p = valaddr;
@@ -701,7 +701,7 @@ print_octal_chars (struct ui_file *stream, unsigned char *valaddr, unsigned len)
        }
     }
 
-  fprintf_filtered (stream, local_octal_format_suffix ());
+  fputs_filtered (local_octal_format_suffix (), stream);
 }
 
 /* VALADDR points to an integer of LEN bytes.
@@ -744,7 +744,7 @@ print_decimal_chars (struct ui_file *stream, unsigned char *valaddr,
       digits[i] = 0;
     }
 
-  fprintf_filtered (stream, local_decimal_format_prefix ());
+  fputs_filtered (local_decimal_format_prefix (), stream);
 
   /* Ok, we have an unknown number of bytes of data to be printed in
    * decimal.
@@ -841,7 +841,7 @@ print_decimal_chars (struct ui_file *stream, unsigned char *valaddr,
     }
   xfree (digits);
 
-  fprintf_filtered (stream, local_decimal_format_suffix ());
+  fputs_filtered (local_decimal_format_suffix (), stream);
 }
 
 /* VALADDR points to an integer of LEN bytes.  Print it in hex on stream.  */
@@ -853,7 +853,7 @@ print_hex_chars (struct ui_file *stream, unsigned char *valaddr, unsigned len)
 
   /* FIXME: We should be not printing leading zeroes in most cases.  */
 
-  fprintf_filtered (stream, local_hex_format_prefix ());
+  fputs_filtered (local_hex_format_prefix (), stream);
   if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
     {
       for (p = valaddr;
@@ -872,7 +872,7 @@ print_hex_chars (struct ui_file *stream, unsigned char *valaddr, unsigned len)
          fprintf_filtered (stream, "%02x", *p);
        }
     }
-  fprintf_filtered (stream, local_hex_format_suffix ());
+  fputs_filtered (local_hex_format_suffix (), stream);
 }
 
 /*  Called by various <lang>_val_print routines to print elements of an
index 0e6ab9664971665398dd472a29f5992a84e92473..e6e841892cace2f10467597e1a526a75fbf5fbf4 100644 (file)
@@ -1 +1 @@
-2003-06-27-cvs
+2003-08-05-cvs
index c2227cd29fe4d3902e3176f190691d3009fa39e5..897a541ba9d36ea840cd6e8c52101e4c8f62a02f 100644 (file)
@@ -637,7 +637,7 @@ get_image_name (HANDLE h, void *address, int unicode)
 
   /* See if we could read the address of a string, and that the
      address isn't null. */
-  if (!ReadProcessMemory (h, address,  &address_ptr, sizeof (address_ptr), &done) 
+  if (!ReadProcessMemory (h, address,  &address_ptr, sizeof (address_ptr), &done)
       || done != sizeof (address_ptr) || !address_ptr)
     return NULL;
 
@@ -802,7 +802,7 @@ get_relocated_section_addrs (bfd *abfd, CORE_ADDR text_load)
 static struct objfile *
 solib_symbols_add (char *name, int from_tty, CORE_ADDR load_addr)
 {
-  struct section_addr_info *section_addrs_ptr = NULL;
+  struct section_addr_info *addrs = NULL;
   static struct objfile *result = NULL;
   bfd *abfd = NULL;
 
@@ -825,33 +825,28 @@ solib_symbols_add (char *name, int from_tty, CORE_ADDR load_addr)
     {
       if (bfd_check_format (abfd, bfd_object))
        {
-         section_addrs_ptr = get_relocated_section_addrs (abfd, load_addr);
+         addrs = get_relocated_section_addrs (abfd, load_addr);
        }
 
       bfd_close (abfd);
     }
 
-  if (section_addrs_ptr)
+  if (addrs)
     {
-      result = safe_symbol_file_add (name, from_tty, section_addrs_ptr,
-                                    0, OBJF_SHARED);
-
-      free_section_addr_info (section_addrs_ptr);
+      result = safe_symbol_file_add (name, from_tty, addrs, 0, OBJF_SHARED);
+      free_section_addr_info (addrs);
     }
-
   else
     {
       /* Fallback on handling just the .text section. */
-      struct section_addr_info *section_addrs;
       struct cleanup *my_cleanups;
 
-      section_addrs = alloc_section_addr_info (1);
-      my_cleanups = make_cleanup (xfree, section_addrs);
-      section_addrs->other[0].name = ".text";
-      section_addrs->other[0].addr = load_addr;
+      addrs = alloc_section_addr_info (1);
+      my_cleanups = make_cleanup (xfree, addrs);
+      addrs->other[0].name = ".text";
+      addrs->other[0].addr = load_addr;
 
-      result = safe_symbol_file_add (name, from_tty, &section_addrs,
-                                    0, OBJF_SHARED);
+      result = safe_symbol_file_add (name, from_tty, addrs, 0, OBJF_SHARED);
       do_cleanups (my_cleanups);
     }
 
@@ -2215,8 +2210,7 @@ typedef struct
 {
   struct target_ops *target;
   bfd_vma addr;
-}
-map_code_section_args;
+} map_code_section_args;
 
 static void
 map_single_dll_code_section (bfd * abfd, asection * sect, void *obj)
index 4a989ce07a759d70fa81134cc86494b5dfd6df02..87b69c9d853b8c77a02509352b5ca007c96c7764 100644 (file)
 #include <sys/debugreg.h>
 #include <sys/syscall.h>
 #include <sys/procfs.h>
+#include <asm/prctl.h>
+/* FIXME ezannoni-2003-07-09: we need <sys/reg.h> to be included after
+   <asm/ptrace.h> because the latter redefines FS and GS for no apparent
+   reason, and those definitions don't match the ones that libpthread_db
+   uses, which come from <sys/reg.h>.  */
+/* ezannoni-2003-07-09: I think this is fixed. The extraneous defs have
+   been removed from ptrace.h in the kernel.  However, better safe than
+   sorry.  */
+#include <asm/ptrace.h>
 #include <sys/reg.h>
+#include "gdb_proc_service.h"
 
 /* Prototypes for supply_gregset etc.  */
 #include "gregset.h"
 
 #include "x86-64-tdep.h"
-
-/* The register sets used in GNU/Linux ELF core-dumps are identical to
-   the register sets used by `ptrace'.  The corresponding types are
-   `elf_gregset_t' for the general-purpose registers (with
-   `elf_greg_t' the type of a single GP register) and `elf_fpregset_t'
-   for the floating-point registers.  */
-
-/* Mapping between the general-purpose registers in `struct user'
-   format and GDB's register array layout.  */
-static int regmap[] =
-{
-  RAX, RBX, RCX, RDX,
-  RSI, RDI, RBP, RSP,
-  R8, R9, R10, R11,
-  R12, R13, R14, R15,
-  RIP, EFLAGS, CS, SS, 
-  DS, ES, FS, GS
-};
+#include "x86-64-linux-tdep.h"
 
 /* Which ptrace request retrieves which registers?
    These apply to the corresponding SET requests as well.  */
@@ -76,11 +69,7 @@ static int regmap[] =
 void
 supply_gregset (elf_gregset_t *gregsetp)
 {
-  elf_greg_t *regp = (elf_greg_t *) gregsetp;
-  int i;
-
-  for (i = 0; i < X86_64_NUM_GREGS; i++)
-    supply_register (i, regp + regmap[i]);
+  x86_64_linux_supply_gregset ((char *) gregsetp);
 }
 
 /* Fill register REGNO (if it is a general-purpose register) in
@@ -90,12 +79,7 @@ supply_gregset (elf_gregset_t *gregsetp)
 void
 fill_gregset (elf_gregset_t *gregsetp, int regno)
 {
-  elf_greg_t *regp = (elf_greg_t *) gregsetp;
-  int i;
-
-  for (i = 0; i < X86_64_NUM_GREGS; i++)
-    if (regno == -1 || regno == i)
-      regcache_collect (i, regp + regmap[i]);
+  x86_64_linux_fill_gregset ((char *) gregsetp, regno);
 }
 
 /* Fetch all general-purpose registers from process/thread TID and
@@ -332,3 +316,34 @@ x86_64_linux_dr_get_status (void)
 {
   return x86_64_linux_dr_get (DR_STATUS);
 }
+
+extern ps_err_e
+ps_get_thread_area (const struct ps_prochandle *ph,
+                    lwpid_t lwpid, int idx, void **base)
+{
+
+/* This definition comes from prctl.h, but some kernels may not have it.  */
+#ifndef PTRACE_ARCH_PRCTL
+#define PTRACE_ARCH_PRCTL      30
+#endif
+
+  /* FIXME: ezannoni-2003-07-09 see comment above about include file order.
+     We could be getting bogus values for these two.  */
+  gdb_assert (FS < ELF_NGREG);
+  gdb_assert (GS < ELF_NGREG);
+  switch (idx)
+    {
+    case FS:
+      if (ptrace (PTRACE_ARCH_PRCTL, lwpid, base, ARCH_GET_FS) == 0)
+       return PS_OK;
+      break;
+    case GS:
+      if (ptrace (PTRACE_ARCH_PRCTL, lwpid, base, ARCH_GET_GS) == 0)
+       return PS_OK;
+      break;
+    default:                   /* Should not happen.  */
+      return PS_BADADDR;
+    }
+  return PS_ERR;               /* ptrace failed.  */
+}
+
index 8532685c896b354a2c5bf34cec176fcf42888c38..7aab1d4e2fa38bdfae41a25a30f44c5f3d29431b 100644 (file)
 #include "gdb_string.h"
 
 #include "x86-64-tdep.h"
+#include "x86-64-linux-tdep.h"
+
+/* Register indexes to 'struct user' come from <sys/reg.h>.  */
+
+#define USER_R15    0
+#define USER_R14    1
+#define USER_R13    2
+#define USER_R12    3
+#define USER_RBP    4
+#define USER_RBX    5
+#define USER_R11    6
+#define USER_R10    7
+#define USER_R9     8
+#define USER_R8     9
+#define USER_RAX    10
+#define USER_RCX    11
+#define USER_RDX    12
+#define USER_RSI    13
+#define USER_RDI    14
+#define USER_RIP    16
+#define USER_CS     17
+#define USER_EFLAGS 18
+#define USER_RSP    19
+#define USER_SS     20
+#define USER_DS     23
+#define USER_ES     24
+#define USER_FS     25
+#define USER_GS     26
+
+/* Mapping between the general-purpose registers in `struct user'
+   format and GDB's register array layout.  */
+
+static int user_to_gdb_regmap[] =
+{
+  USER_RAX, USER_RBX, USER_RCX, USER_RDX,
+  USER_RSI, USER_RDI, USER_RBP, USER_RSP,
+  USER_R8, USER_R9, USER_R10, USER_R11,
+  USER_R12, USER_R13, USER_R14, USER_R15,
+  USER_RIP, USER_EFLAGS, USER_CS, USER_SS,
+  USER_DS, USER_ES, USER_FS, USER_GS
+};
+
+/* Fill GDB's register array with the general-purpose register values
+   in *GREGSETP.  */
+
+void
+x86_64_linux_supply_gregset (char *regp)
+{
+  int i;
+
+  for (i = 0; i < X86_64_NUM_GREGS; i++)
+    supply_register (i, regp + (user_to_gdb_regmap[i] * 8));
+}
+
+/* Fill register REGNO (if it is a general-purpose register) in
+   *GREGSETPS with the value in GDB's register array.  If REGNO is -1,
+   do this for all registers.  */
+
+void
+x86_64_linux_fill_gregset (char *regp, int regno)
+{
+  int i;
+
+  for (i = 0; i < X86_64_NUM_GREGS; i++)
+    if (regno == -1 || regno == i)
+      regcache_collect (i, regp + (user_to_gdb_regmap[i] * 8));
+}
+
+/* The register sets used in GNU/Linux ELF core-dumps are identical to
+   the register sets used by `ptrace'.  The corresponding types are
+   `elf_gregset_t' for the general-purpose registers (with
+   `elf_greg_t' the type of a single GP register) and `elf_fpregset_t'
+   for the floating-point registers.  */
+
+static void
+fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
+                        int which, CORE_ADDR ignore)
+{
+  switch (which)
+    {
+    case 0:  /* Integer registers.  */
+      if (core_reg_size != 216)
+       warning ("Wrong size register set in core file.");
+      else
+       x86_64_linux_supply_gregset (core_reg_sect);
+      break;
+
+    case 2:  /* Floating point registers.  */
+    case 3:  /* "Extended" floating point registers.  This is gdb-speak
+               for SSE/SSE2. */
+      if (core_reg_size != 512)
+       warning ("Wrong size XMM register set in core file.");
+      else
+       x86_64_supply_fxsave (core_reg_sect);
+      break;
+
+    default:
+      /* Don't know what kind of register request this is; just ignore it.  */
+      break;
+    }
+}
+
+static struct core_fns x86_64_core_fns = 
+{
+  bfd_target_elf_flavour,              /* core_flavour */
+  default_check_format,                        /* check_format */
+  default_core_sniffer,                        /* core_sniffer */
+  fetch_core_registers,                        /* core_read_registers */
+  NULL                                 /* next */
+};
 
 #define LINUX_SIGTRAMP_INSN0   0x48    /* mov $NNNNNNNN, %rax */
 #define LINUX_SIGTRAMP_OFFSET0 0
@@ -175,6 +285,8 @@ extern void _initialize_x86_64_linux_tdep (void);
 void
 _initialize_x86_64_linux_tdep (void)
 {
+  add_core_fns (&x86_64_core_fns);
+
   gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_LINUX,
                          x86_64_linux_init_abi);
 }
index 0fe24853f837e7958b89bba5b8629a0dd3dbc8a0..a2ae63189f4db6c93f6b61dc0b65cbba3e43ab91 100644 (file)
 #include "x86-64-tdep.h"
 #include "i387-tdep.h"
 
-/* Register numbers of various important registers.  */
-
-#define X86_64_RAX_REGNUM      0 /* %rax */
-#define X86_64_RDX_REGNUM      3 /* %rdx */
-#define X86_64_RDI_REGNUM      5 /* %rdi */
-#define X86_64_RBP_REGNUM      6 /* %rbp */
-#define X86_64_RSP_REGNUM      7 /* %rsp */
-#define X86_64_RIP_REGNUM      16 /* %rip */
-#define X86_64_EFLAGS_REGNUM   17 /* %eflags */
-#define X86_64_ST0_REGNUM      22 /* %st0 */
-#define X86_64_XMM0_REGNUM     38 /* %xmm0 */
-#define X86_64_XMM1_REGNUM     39 /* %xmm1 */
+/* Register information.  */
 
 struct x86_64_register_info
 {
@@ -597,13 +586,14 @@ x86_64_push_arguments (struct regcache *regcache, int nargs,
 {
   int intreg = 0;
   int ssereg = 0;
-  /* For varargs functions we have to pass the total number of SSE arguments
-     in %rax.  So, let's count this number.  */
+  /* For varargs functions we have to pass the total number of SSE
+     registers used in %rax.  So, let's count this number.  */
   int total_sse_args = 0;
   /* Once an SSE/int argument is passed on the stack, all subsequent
      arguments are passed there.  */
   int sse_stack = 0;
   int int_stack = 0;
+  unsigned total_sp;
   int i;
   char buf[8];
   static int int_parameter_registers[INT_REGS] =
@@ -644,7 +634,8 @@ x86_64_push_arguments (struct regcache *regcache, int nargs,
            int_stack = 1;
          if (ssereg / 2 + needed_sseregs > SSE_REGS)
            sse_stack = 1;
-         total_sse_args += needed_sseregs;
+         if (!sse_stack)
+           total_sse_args += needed_sseregs;
 
          for (j = 0; j < n; j++)
            {
@@ -720,13 +711,29 @@ x86_64_push_arguments (struct regcache *regcache, int nargs,
        }
     }
 
+  /* We have to make sure that the stack is 16-byte aligned after the
+     setup.  Let's calculate size of arguments first, align stack and
+     then fill in the arguments.  */
+  total_sp = 0;
+  for (i = 0; i < stack_values_count; i++)
+    {
+      struct value *arg = args[stack_values[i]];
+      int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg));
+      total_sp += (len + 7) & ~7;
+    }
+  /* total_sp is now a multiple of 8, if it is not a multiple of 16,
+     change the stack pointer so that it will be afterwards correctly
+     aligned.  */
+  if (total_sp & 15)
+    sp -= 8;
+    
   /* Push any remaining arguments onto the stack.  */
   while (--stack_values_count >= 0)
     {
       struct value *arg = args[stack_values[stack_values_count]];
       int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg));
 
-      /* Make sure the stack stays eightbyte-aligned.  */
+      /* Make sure the stack is 8-byte-aligned.  */
       sp -= (len + 7) & ~7;
       write_memory (sp, VALUE_CONTENTS_ALL (arg), len);
     }
@@ -781,7 +788,8 @@ x86_64_store_return_value (struct type *type, struct regcache *regcache,
   else if (TYPE_CODE_FLT == TYPE_CODE (type))
     {
       /* Handle double and float variables.  */
-      regcache_cooked_write (regcache,  X86_64_XMM0_REGNUM, valbuf);
+      regcache_cooked_write_part (regcache, X86_64_XMM0_REGNUM,
+                                 0, len, valbuf);
     }
   /* XXX: What about complex floating point types?  */
   else
@@ -1069,7 +1077,7 @@ static const struct frame_unwind x86_64_frame_unwind =
 };
 
 static const struct frame_unwind *
-x86_64_frame_p (CORE_ADDR pc)
+x86_64_frame_sniffer (struct frame_info *next_frame)
 {
   return &x86_64_frame_unwind;
 }
@@ -1141,8 +1149,9 @@ static const struct frame_unwind x86_64_sigtramp_frame_unwind =
 };
 
 static const struct frame_unwind *
-x86_64_sigtramp_frame_p (CORE_ADDR pc)
+x86_64_sigtramp_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   char *name;
 
   find_pc_partial_function (pc, &name, NULL, NULL);
@@ -1252,8 +1261,8 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
      in the future.  */
   set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
 
-  frame_unwind_append_predicate (gdbarch, x86_64_sigtramp_frame_p);
-  frame_unwind_append_predicate (gdbarch, x86_64_frame_p);
+  frame_unwind_append_sniffer (gdbarch, x86_64_sigtramp_frame_sniffer);
+  frame_unwind_append_sniffer (gdbarch, x86_64_frame_sniffer);
   frame_base_set_default (gdbarch, &x86_64_frame_base);
 }
 \f
index 70ceffbbda2f701e50f8183105befcd99b904682..7ad6990f76a36028f429f4a7c44abc3c2ae3271d 100644 (file)
@@ -30,6 +30,19 @@ struct frame_info;
 
 #include "i386-tdep.h"
 
+/* Register numbers of various important registers.  */
+
+#define X86_64_RAX_REGNUM      0 /* %rax */
+#define X86_64_RDX_REGNUM      3 /* %rdx */
+#define X86_64_RDI_REGNUM      5 /* %rdi */
+#define X86_64_RBP_REGNUM      6 /* %rbp */
+#define X86_64_RSP_REGNUM      7 /* %rsp */
+#define X86_64_RIP_REGNUM      16 /* %rip */
+#define X86_64_EFLAGS_REGNUM   17 /* %eflags */
+#define X86_64_ST0_REGNUM      22 /* %st0 */
+#define X86_64_XMM0_REGNUM     38 /* %xmm0 */
+#define X86_64_XMM1_REGNUM     39 /* %xmm1 */
+
 /* Number of general purpose registers.  */
 #define X86_64_NUM_GREGS       22
 
index f061efa770f12e022a6718c076892c3720f5235e..5145a48ab8dbad093fc991dda65577ae6eab91fd 100644 (file)
@@ -1,3 +1,24 @@
+2003-07-09  Bob Wilson  <bob.wilson@acm.org>
+
+       * xtensa-config.h: Undef all macros before defining them.
+
+2003-07-06  H.J. Lu <hongjiu.lu@intel.com>
+
+       * demangle.h: Support C++.
+
+2003-07-01  Zack Weinberg  <zack@codesourcery.com>
+
+       * filenames.h: New file imported from binutils.
+
+2003-06-30  Bob Wilson  <bob.wilson@acm.org>
+
+       * xtensa-config.h: New file imported from binutils.
+
+2003-06-30  Bob Wilson  <bob.wilson@acm.org>
+
+       * xtensa-config.h (XCHAL_HAVE_CONST16, XCHAL_HAVE_ABS,
+       XCHAL_HAVE_ADDX, XCHAL_HAVE_L32R): Define.
+
 2003-06-25  Alan Modra  <amodra@bigpond.net.au>
 
        * bfdlink.h: Correct spelling of "relocatable".
index b6db3064d4f84a18868d9bc9c332181849f37d40..f9e1fea87c683477e5e9503e03f4217dac5be416 100644 (file)
@@ -1,4 +1,31 @@
-2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com> 
+2003-07-17  Jeff Muizelaar  <muizelaar@rogers.com>
+
+       * pe.h: (IMAGE_FILE_NET_RUN_FROM_SWAP): Define.
+       (IMAGE_FILE_MACHINE_WCEMIPSV2): Define.
+       (IMAGE_FILE_MACHINE_SH3DSP): Define.
+       (IMAGE_FILE_MACHINE_SH3E): Define.
+       (IMAGE_FILE_MACHINE_SH5): Define.
+       (IMAGE_FILE_MACHINE_AM33): Define.
+       (IMAGE_FILE_MACHINE_POWERPCFP): Define.
+       (IMAGE_FILE_MACHINE_AXP64): Define.
+       (IMAGE_FILE_MACHINE_TRICORE): Define.
+       (IMAGE_FILE_MACHINE_CEF): Define.
+       (IMAGE_FILE_MACHINE_EBC): Define.
+       (IMAGE_FILE_MACHINE_AMD64): Define.
+       (IMAGE_FILE_MACHINE_M32R): Define.
+       (IMAGE_FILE_MACHINE_CEE): Define.
+
+2003-07-14  Christian Groessler  <chris@groessler.org>
+
+        * i860.h (AOUTSZ): Define for i860 coff.
+
+2003-06-29  Andreas Jaeger  <aj@suse.de>
+
+       * xcoff.h (struct __rtinit ): Convert to ISO C90 prototypes.
+
+       * ecoff.h: Convert to ISO C90 prototypes.  Replace PTR by void *.
+
+2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
 
        * coff/h8300.h (H8300HNMAGIC, H8300SNMAGIC): New.
        (H8300HNBADMAG, H8300SNBADMAG): New.
@@ -11,7 +38,7 @@
 
 2003-03-25  Stan Cox   <scox@redhat.com>
            Nick Clifton  <nickc@redhat.com>
-           
+
        Contribute support for Intel's iWMMXt chip - an ARM variant:
 
        * arm.h (ARM_NOTE_SECTION): Define.
 2002-02-01  Tom Rix  <trix@redhat.com>
 
        * xcoff.h: Conditionally support <aiaff> for pre AIX 4.3.
+
 2002-01-31  Ivan Guzvinec  <ivang@opencores.org>
 
        * or32.h: New file.
 
 2001-12-24  Tom Rix  <trix@redhat.com>
 
-       * xcoff.h (xcoff_big_format_p): Make <bigaf> the default archive 
+       * xcoff.h (xcoff_big_format_p): Make <bigaf> the default archive
        format.
-       (XCOFFARMAG_ELEMENT_SIZE, XCOFFARMAGBIG_ELEMENT_SIZE): Define for 
-       archive header ascii elements.  
+       (XCOFFARMAG_ELEMENT_SIZE, XCOFFARMAGBIG_ELEMENT_SIZE): Define for
+       archive header ascii elements.
 
 2001-12-17  Tom Rix  <trix@redhat.com>
 
        * xcoff.h :  Add .except and .typchk section string and styp flags.
-       Fix xcoff_big_format_p macro.  
+       Fix xcoff_big_format_p macro.
 
 2001-12-16  Tom Rix  <trix@redhat.com>
 
-       * xcoff.h : Clean up formatting. 
+       * xcoff.h : Clean up formatting.
 
 2002-01-15  Richard Earnshaw  <rearnsha@arm.com>
 
@@ -57,9 +84,9 @@
 
        * ti.h: Move arch-specific stuff from here...
        (COFF_ADJUST_SYM_IN/OUT): Optionally put page flag into symbol
-       value. 
+       value.
        * tic54x.h: ...to here.
-       
+
 2001-10-26  Christian Groessler  <cpg@aladdin.de>
 
        * external.h (GET_LINENO_LNNO): Fix usage of H_GET_32/16.
 2001-09-05  Tom Rix <trix@redhat.com>
 
        * xcoff.h : Add XCOFF_SYSCALL32 and XCOFF_SYSCALL64 hash table flags.
-       
+
 2001-08-27  Andreas Jaeger  <aj@suse.de>
 
        * xcoff.h (struct __rtinit): Make proper prototype for rtl.
@@ -94,12 +121,12 @@ Fri Aug 24 01:18:51 2001  J"orn Rennecke <amylaar@redhat.com>
 
 2001-04-05  Tom Rix <trix@redhat.com>
 
-       * rs6000.h : move xcoff32 external structures from xcofflink. 
-       * rs6k64.h : move xcoff64 external structures from xcofflink. 
+       * rs6000.h : move xcoff32 external structures from xcofflink.
+       * rs6k64.h : move xcoff64 external structures from xcofflink.
        * internal.h : promote 32 bit structure elements to 64 bit
        for xcoff64 support
        * xcoff.h : New file.
-       
+
 2001-03-23  Nick Clifton  <nickc@redhat.com>
 
        * a29k.h: Fix compile time warning.
@@ -166,10 +193,10 @@ Fri Aug 24 01:18:51 2001  J"orn Rennecke <amylaar@redhat.com>
        * rs6k64.h: New file.
 
 2000-04-17  Timothy Wall  <twall@cygnus.com>
-       
+
        * ti.h: Load page cleanup.
        * intental.h: Add load page field.
-       
+
 Mon Apr 17 16:44:01 2000  David Mosberger  <davidm@hpl.hp.com>
 
        * pe.h (PEP64AOUTHDR): New header for PE+.
@@ -195,15 +222,15 @@ Mon Apr 17 16:44:01 2000  David Mosberger  <davidm@hpl.hp.com>
 2000-04-11  Timothy Wall  <twall@cygnus.com>
 
        * ti.h: Remove load page references until load pages are
-       reimplemented. 
+       reimplemented.
        * tic54x.h: Ditto.
-       
+
 2000-04-07  Timothy Wall  <twall@cygnus.com>
 
        * internal.h: Fix some comments related to TI COFF (instead of tic80).
        * ti.h: New.
        * tic54x.h: New.
-       
+
 Wed Apr  5 22:08:41 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): Define.
@@ -223,7 +250,7 @@ Wed Apr  5 22:08:41 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
        * arm.h: Add Windows CE definitions.
        * mipspe.h: New file: Windows CE definitions for MIPS.
        * pe.h: Add constants for ILF support.
-       
+
 2000-01-05  Nick Clifton  <nickc@cygnus.com>
 
        * pe.h: Fix formatting of comments.
@@ -295,7 +322,7 @@ Mon May 17 13:35:35 1999  Stan Cox  <scox@cygnus.com>
 1999-04-08  Nick Clifton  <nickc@cygnus.com>
 
        * mcore.h: New header file.  Defines for Motorola's MCore
-       processor. 
+       processor.
 
 Sun Dec  6 21:36:37 1998  Mark Elbrecht  <snowball3@usa.net>
 
@@ -306,11 +333,11 @@ Wed Jan 27 13:35:35 1999  Stan Cox  <scox@cygnus.com>
        * arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26):
        Changed values to avoid clashing with IMAGE_FILE_* coff header
        flag values.
-       
+
 Wed Apr  1 16:06:15 1998  Nick Clifton  <nickc@cygnus.com>
 
        * internal.h: Document numbers associated with Thumb symbol
-       types. 
+       types.
 
 Fri Mar 27 17:16:57 1998  Ian Lance Taylor  <ian@cygnus.com>
 
@@ -417,7 +444,7 @@ Wed Jun 26 16:24:26 1996  Ian Lance Taylor  <ian@cygnus.com>
 Fri Jun 21 11:17:46 1996  Richard Henderson  <rth@tamu.edu>
 
        * alpha.h: Add declarations for relocation types added for Alpha
-       OSF/1 3.0.
+       OSF/1 3.0.
 
 Tue Jun 18 16:04:29 1996  Jeffrey A. Law  <law@rtl.cygnus.com>
 
@@ -443,7 +470,7 @@ Tue May  7 00:36:39 1996  Jeffrey A Law  (law@cygnus.com)
        (R_MOV16B1, R_MOV16B2): Renamed from R_MOVB1 and R_MOVB2.
        (R_MOV24B1, R_MOV24B2): Renamed from R_MOVLB1 and R_MOVLB2.
        (R_MOVL1, R_MOVL2): New relocs.
-       
+
 Fri May  3 13:01:12 1996  Jeffrey A Law  (law@cygnus.com)
 
        * internal.h (R_PCRWORD_B): Define for the h8300 relaxing
@@ -473,7 +500,7 @@ Thu Mar 21 16:25:57 1996  David Mosberger-Tang  <davidm@azstarnet.com>
 Thu Mar 14 15:22:44 1996  Jeffrey A Law  (law@cygnus.com)
 
        * internal.h (R_MEM_INDIRECT): New reloc for the h8300.
+
 Fri Feb  9 10:44:11 1996  Ian Lance Taylor  <ian@cygnus.com>
 
        * aux-coff.h: Rename from aux.h, to avoid problems on hapless DOS
@@ -522,7 +549,7 @@ Wed Nov  1 15:25:18 1995  Manfred Hollstein KS/EF4A 60/1F/110 #40283  <manfred@l
 
 Wed Oct 18 18:36:19 1995  Geoffrey Noer  <noer@cygnus.com>
 
-       * sym.h: #if 0'd out runtime_pdr struct because it chokes 
+       * sym.h: #if 0'd out runtime_pdr struct because it chokes
        Visual C++ and there aren't any references to it elsewhere in gdb.
 
 Mon Oct 16 11:12:24 1995  Ian Lance Taylor  <ian@cygnus.com>
index 00d2f24008610cbb15881b5e9de1f80e789723fe..3a7aa4fbbb56bb71093700185b789261488e1d63 100644 (file)
@@ -2,7 +2,7 @@
    This does not include symbol information, found in sym.h and
    symconst.h.
 
-   Copyright 2001, 2002 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003 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
@@ -296,21 +296,21 @@ struct ecoff_debug_info
      fields are also used by the assembler to output ECOFF debugging
      information.  */
   unsigned char *line;
-  PTR external_dnr;    /* struct dnr_ext */
-  PTR external_pdr;    /* struct pdr_ext */
-  PTR external_sym;    /* struct sym_ext */
-  PTR external_opt;    /* struct opt_ext */
+  void *external_dnr;  /* struct dnr_ext */
+  void *external_pdr;  /* struct pdr_ext */
+  void *external_sym;  /* struct sym_ext */
+  void *external_opt;  /* struct opt_ext */
   union aux_ext *external_aux;
   char *ss;
   char *ssext;
-  PTR external_fdr;    /* struct fdr_ext */
-  PTR external_rfd;    /* struct rfd_ext */
-  PTR external_ext;    /* struct ext_ext */
+  void *external_fdr;  /* struct fdr_ext */
+  void *external_rfd;  /* struct rfd_ext */
+  void *external_ext;  /* struct ext_ext */
 
   /* These fields are used when linking.  They may disappear at some
      point.  */
   char *ssext_end;
-  PTR external_ext_end;
+  void *external_ext_end;
 
   /* When linking, this field holds a mapping from the input FDR
      numbers to the output numbers, and is used when writing out the
@@ -406,32 +406,31 @@ struct ecoff_debug_swap
   bfd_size_type external_rfd_size;
   bfd_size_type external_ext_size;
   /* Functions to swap in external symbolic data.  */
-  void (*swap_hdr_in) PARAMS ((bfd *, PTR, HDRR *));
-  void (*swap_dnr_in) PARAMS ((bfd *, PTR, DNR *));
-  void (*swap_pdr_in) PARAMS ((bfd *, PTR, PDR *));
-  void (*swap_sym_in) PARAMS ((bfd *, PTR, SYMR *));
-  void (*swap_opt_in) PARAMS ((bfd *, PTR, OPTR *));
-  void (*swap_fdr_in) PARAMS ((bfd *, PTR, FDR *));
-  void (*swap_rfd_in) PARAMS ((bfd *, PTR, RFDT *));
-  void (*swap_ext_in) PARAMS ((bfd *, PTR, EXTR *));
-  void (*swap_tir_in) PARAMS ((int, const struct tir_ext *, TIR *));
-  void (*swap_rndx_in) PARAMS ((int, const struct rndx_ext *, RNDXR *));
+  void (*swap_hdr_in) (bfd *, void *, HDRR *);
+  void (*swap_dnr_in) (bfd *, void *, DNR *);
+  void (*swap_pdr_in) (bfd *, void *, PDR *);
+  void (*swap_sym_in) (bfd *, void *, SYMR *);
+  void (*swap_opt_in) (bfd *, void *, OPTR *);
+  void (*swap_fdr_in) (bfd *, void *, FDR *);
+  void (*swap_rfd_in) (bfd *, void *, RFDT *);
+  void (*swap_ext_in) (bfd *, void *, EXTR *);
+  void (*swap_tir_in) (int, const struct tir_ext *, TIR *);
+  void (*swap_rndx_in) (int, const struct rndx_ext *, RNDXR *);
   /* Functions to swap out external symbolic data.  */
-  void (*swap_hdr_out) PARAMS ((bfd *, const HDRR *, PTR));
-  void (*swap_dnr_out) PARAMS ((bfd *, const DNR *, PTR));
-  void (*swap_pdr_out) PARAMS ((bfd *, const PDR *, PTR));
-  void (*swap_sym_out) PARAMS ((bfd *, const SYMR *, PTR));
-  void (*swap_opt_out) PARAMS ((bfd *, const OPTR *, PTR));
-  void (*swap_fdr_out) PARAMS ((bfd *, const FDR *, PTR));
-  void (*swap_rfd_out) PARAMS ((bfd *, const RFDT *, PTR));
-  void (*swap_ext_out) PARAMS ((bfd *, const EXTR *, PTR));
-  void (*swap_tir_out) PARAMS ((int, const TIR *, struct tir_ext *));
-  void (*swap_rndx_out) PARAMS ((int, const RNDXR *, struct rndx_ext *));
+  void (*swap_hdr_out) (bfd *, const HDRR *, void *);
+  void (*swap_dnr_out) (bfd *, const DNR *, void *);
+  void (*swap_pdr_out) (bfd *, const PDR *, void *);
+  void (*swap_sym_out) (bfd *, const SYMR *, void *);
+  void (*swap_opt_out) (bfd *, const OPTR *, void *);
+  void (*swap_fdr_out) (bfd *, const FDR *, void *);
+  void (*swap_rfd_out) (bfd *, const RFDT *, void *);
+  void (*swap_ext_out) (bfd *, const EXTR *, void *);
+  void (*swap_tir_out) (int, const TIR *, struct tir_ext *);
+  void (*swap_rndx_out) (int, const RNDXR *, struct rndx_ext *);
   /* Function to read symbol data and set up pointers in
      ecoff_debug_info structure.  The section argument is used for
      ELF, not straight ECOFF.  */
-  bfd_boolean (*read_debug_info)
-    PARAMS ((bfd *, asection *, struct ecoff_debug_info *));
+  bfd_boolean (*read_debug_info) (bfd *, asection *, struct ecoff_debug_info *);
 };
 
 #endif /* ! defined (ECOFF_H) */
index dac7617829615d454574cfdce359d4fff6c81f78..95d0c1a27169aefe42ffde8304c021c2b6c4de6f 100644 (file)
@@ -37,6 +37,9 @@
 
 #define I860BADMAG(x)   ((x).f_magic != I860MAGIC)
 
+#undef AOUTSZ
+#define AOUTSZ 36
+
 /* FIXME: What are the a.out magic numbers?  */
 
 #define _ETEXT "etext"
index ff3787569be601686dce59bca9bfb2bd19787fb6..363d307379b9bf418bc558498a347e762dcfdfb8 100644 (file)
@@ -1,6 +1,6 @@
 /* pe.h  -  PE COFF header information 
 
-   Copyright 2000, 2001 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -32,6 +32,7 @@
 #define IMAGE_FILE_32BIT_MACHINE             0x0100
 #define IMAGE_FILE_DEBUG_STRIPPED            0x0200
 #define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP   0x0400
+#define IMAGE_FILE_NET_RUN_FROM_SWAP         0x0800
 #define IMAGE_FILE_SYSTEM                    0x1000
 #define IMAGE_FILE_DLL                       0x2000
 #define IMAGE_FILE_UP_SYSTEM_ONLY            0x4000
 
 /* Machine numbers.  */
 
-#define IMAGE_FILE_MACHINE_UNKNOWN           0x0
-#define IMAGE_FILE_MACHINE_ALPHA             0x184
-#define IMAGE_FILE_MACHINE_ARM               0x1c0
-#define IMAGE_FILE_MACHINE_ALPHA64           0x284
-#define IMAGE_FILE_MACHINE_I386              0x14c
-#define IMAGE_FILE_MACHINE_IA64              0x200
-#define IMAGE_FILE_MACHINE_M68K              0x268
-#define IMAGE_FILE_MACHINE_MIPS16            0x266
-#define IMAGE_FILE_MACHINE_MIPSFPU           0x366
-#define IMAGE_FILE_MACHINE_MIPSFPU16         0x466
-#define IMAGE_FILE_MACHINE_POWERPC           0x1f0
-#define IMAGE_FILE_MACHINE_R3000             0x162
-#define IMAGE_FILE_MACHINE_R4000             0x166
-#define IMAGE_FILE_MACHINE_R10000            0x168
-#define IMAGE_FILE_MACHINE_SH3               0x1a2
-#define IMAGE_FILE_MACHINE_SH4               0x1a6
-#define IMAGE_FILE_MACHINE_THUMB             0x1c2
-                                                                           
+#define IMAGE_FILE_MACHINE_UNKNOWN           0x0000
+#define IMAGE_FILE_MACHINE_ALPHA             0x0184
+#define IMAGE_FILE_MACHINE_ALPHA64           0x0284
+#define IMAGE_FILE_MACHINE_AM33              0x01d3
+#define IMAGE_FILE_MACHINE_AMD64             0x8664
+#define IMAGE_FILE_MACHINE_ARM               0x01c0
+#define IMAGE_FILE_MACHINE_AXP64             IMAGE_FILE_MACHINE_ALPHA64
+#define IMAGE_FILE_MACHINE_CEE               0xc0ee
+#define IMAGE_FILE_MACHINE_CEF               0x0cef
+#define IMAGE_FILE_MACHINE_EBC               0x0ebc
+#define IMAGE_FILE_MACHINE_I386              0x014c
+#define IMAGE_FILE_MACHINE_IA64              0x0200
+#define IMAGE_FILE_MACHINE_M32R              0x9041
+#define IMAGE_FILE_MACHINE_M68K              0x0268
+#define IMAGE_FILE_MACHINE_MIPS16            0x0266
+#define IMAGE_FILE_MACHINE_MIPSFPU           0x0366
+#define IMAGE_FILE_MACHINE_MIPSFPU16         0x0466
+#define IMAGE_FILE_MACHINE_POWERPC           0x01f0
+#define IMAGE_FILE_MACHINE_POWERPCFP         0x01f1
+#define IMAGE_FILE_MACHINE_R10000            0x0168
+#define IMAGE_FILE_MACHINE_R3000             0x0162
+#define IMAGE_FILE_MACHINE_R4000             0x0166
+#define IMAGE_FILE_MACHINE_SH3               0x01a2
+#define IMAGE_FILE_MACHINE_SH3DSP            0x01a3
+#define IMAGE_FILE_MACHINE_SH3E              0x01a4
+#define IMAGE_FILE_MACHINE_SH4               0x01a6
+#define IMAGE_FILE_MACHINE_SH5               0x01a8
+#define IMAGE_FILE_MACHINE_THUMB             0x01c2
+#define IMAGE_FILE_MACHINE_TRICORE           0x0520
+#define IMAGE_FILE_MACHINE_WCEMIPSV2         0x0169
+
 #define IMAGE_SUBSYSTEM_UNKNOWN                         0
 #define IMAGE_SUBSYSTEM_NATIVE                  1
 #define IMAGE_SUBSYSTEM_WINDOWS_GUI             2
index b27cececb0d8f7e6b5dadfdca20ffad3e0b7a9e7..64a9ee164ce5dda29e76bdc71abbac8b2b10b689 100644 (file)
@@ -1,6 +1,6 @@
 /* Internal format of XCOFF object file data structures for BFD.
 
-   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
 
@@ -424,7 +424,7 @@ struct __rtinit
 {
   /* Pointer to runtime linker.     
      XXX: Is the parameter really void?  */
-  int  (*rtl) PARAMS ((void)); 
+  int  (*rtl) (void);  
 
   /* Offset to array of init functions, 0 if none. */
   int  init_offset;
index 21e9dd33820c14444ae8cea69a9ae2d9878049a1..bff266931c81b6f5d73e374f32ec5627304a96d0 100644 (file)
 
 #include "ansidecl.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 /* Options passed to cplus_demangle (in 2nd parameter). */
 
 #define DMGL_NO_OPTS    0              /* For readability... */
@@ -160,4 +164,8 @@ enum gnu_v3_dtor_kinds {
 extern enum gnu_v3_dtor_kinds
        is_gnu_v3_mangled_dtor PARAMS ((const char *name));
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* DEMANGLE_H */
index eb4b7ccb55e0a71b70da832bb6d0f97db090597f..6b0a8c57a370a7c9f6b7d153e33f3d59fced93e4 100644 (file)
@@ -1,3 +1,47 @@
+2003-07-28  Eric Christopher  <echristo@redhat.com>
+
+       * ppc.h (R_PPC_RELAX32): New. Fake relocation.
+
+2003-07-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * v850.h (SHF_V850_GPREL): New.
+       (SHF_V850_EPREL): Likewise.
+       (SHF_V850_R0REL): Likewise.
+
+2003-07-09  Alexandre Oliva  <aoliva@redhat.com>
+
+       2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
+       * mn10300.h: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
+       PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
+       Renumbered all relocs.
+       2001-04-12  Alexandre Oliva  <aoliva@redhat.com>
+       * mn10300.h (R_MN10300_GOTPC, R_MN10300_GOTOFF,
+       R_MN10300_PLT32, R_MN10300_GOT32, R_MN10300_GOT24,
+       R_MN10300_GOT16, R_MN10300_COPY, R_MN10300_GLOB_DAT,
+       R_MN10300_JMP_SLOT, R_MN10300_RELATIVE): New relocs.
+
+2003-07-09  Alexandre Oliva  <aoliva@redhat.com>
+
+       2000-04-01  Alexandre Oliva  <aoliva@cygnus.com>
+       * mn10300.h (E_MN10300_MACH_AM33_2): Renamed from
+       E_MN10300_MACH_AM332.
+       2000-03-31  Alexandre Oliva  <aoliva@cygnus.com>
+       * mn10300.h (E_MN10300_MACH_AM332): Defined.
+
+2003-07-01  Martin Schwidefsky  <schwidefsky@de.ibm.com>
+
+       * s390.h (elf_s390_reloc_type): Add long displacement relocations
+       R_390_20, R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
+
+2003-06-29  Andreas Jaeger  <aj@suse.de>
+
+       * mmix.h: Convert to ISO C90 prototypes.
+       * mips.h: Likewise.
+
+       * reloc-macros.h (START_RELOC_NUMBERS): Convert to ISO C90
+       prototype.
+       (RELOC_NUMBER): Remove !__STDC__ code.
+
 2003-06-13  Robert Millan <zeratul2@wanadoo.es>
 
        * common.h (GNU_ABI_TAG_NETBSD): New tag.
 
        2002-04-02  Alexandre Oliva  <aoliva@redhat.com>
 
-               * sh.h (EF_SH_MERGE_MACH): Handle SH2E.
+               * sh.h (EF_SH_MERGE_MACH): Handle SH2E.
 
        2002-04-02  Elena Zannoni  <ezannoni@redhat.com>
 
index 44f7cb9292c54201f6fb0084437db8b4c73a6d86..4b36ff763e9bcc304697876b76b5df19c180efa4 100644 (file)
@@ -1,5 +1,5 @@
 /* MIPS ELF support for BFD.
-   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
    Free Software Foundation, Inc.
 
    By Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>, from
@@ -456,9 +456,9 @@ typedef struct
 
 /* MIPS ELF .reginfo swapping routines.  */
 extern void bfd_mips_elf32_swap_reginfo_in
-  PARAMS ((bfd *, const Elf32_External_RegInfo *, Elf32_RegInfo *));
+  (bfd *, const Elf32_External_RegInfo *, Elf32_RegInfo *);
 extern void bfd_mips_elf32_swap_reginfo_out
-  PARAMS ((bfd *, const Elf32_RegInfo *, Elf32_External_RegInfo *));
+  (bfd *, const Elf32_RegInfo *, Elf32_External_RegInfo *);
 \f
 /* Processor specific section flags.  */
 
@@ -822,9 +822,9 @@ typedef struct
 
 /* MIPS ELF option header swapping routines.  */
 extern void bfd_mips_elf_swap_options_in
-  PARAMS ((bfd *, const Elf_External_Options *, Elf_Internal_Options *));
+  (bfd *, const Elf_External_Options *, Elf_Internal_Options *);
 extern void bfd_mips_elf_swap_options_out
-  PARAMS ((bfd *, const Elf_Internal_Options *, Elf_External_Options *));
+  (bfd *, const Elf_Internal_Options *, Elf_External_Options *);
 
 /* Values which may appear in the kind field of an Elf_Options
    structure.  */
@@ -926,9 +926,9 @@ typedef struct
 
 /* MIPS ELF reginfo swapping routines.  */
 extern void bfd_mips_elf64_swap_reginfo_in
-  PARAMS ((bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *));
+  (bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *);
 extern void bfd_mips_elf64_swap_reginfo_out
-  PARAMS ((bfd *, const Elf64_Internal_RegInfo *, Elf64_External_RegInfo *));
+  (bfd *, const Elf64_Internal_RegInfo *, Elf64_External_RegInfo *);
 
 /* Masks for the info work of an ODK_EXCEPTIONS descriptor.  */
 #define OEX_FPU_MIN    0x1f    /* FPEs which must be enabled.  */
index 98536e2465c72db98b495a373566db93c10f1f40..fef3e91fd271923a85cdd6bb96897a4ac2a992cd 100644 (file)
@@ -1,5 +1,5 @@
 /* MMIX support for BFD.
-   Copyright 2001, 2002 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -158,11 +158,11 @@ END_RELOC_NUMBERS (R_MMIX_max)
 
 #ifdef BFD_ARCH_SIZE
 extern bfd_boolean _bfd_mmix_prepare_linker_allocated_gregs
PARAMS ((bfd *, struct bfd_link_info *));
 (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_mmix_finalize_linker_allocated_gregs
PARAMS ((bfd *, struct bfd_link_info *));
 (bfd *, struct bfd_link_info *);
 extern bfd_boolean _bfd_mmix_check_all_relocs
PARAMS ((bfd *, struct bfd_link_info *));
 (bfd *, struct bfd_link_info *);
 #endif
 
 #endif /* ELF_MMIX_H */
index e10be900a403df5578f326f3e2049da3be720c94..e640096a24fc99ed6c2aa3a7b8970322e1e17626 100644 (file)
@@ -1,5 +1,5 @@
 /* MN10300 ELF support for BFD.
-   Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -36,6 +36,20 @@ START_RELOC_NUMBERS (elf_mn10300_reloc_type)
   RELOC_NUMBER (R_MN10300_GNU_VTINHERIT, 7)
   RELOC_NUMBER (R_MN10300_GNU_VTENTRY, 8)
   RELOC_NUMBER (R_MN10300_24, 9)
+  RELOC_NUMBER (R_MN10300_GOTPC32, 10)
+  RELOC_NUMBER (R_MN10300_GOTPC16, 11)
+  RELOC_NUMBER (R_MN10300_GOTOFF32, 12)
+  RELOC_NUMBER (R_MN10300_GOTOFF24, 13)
+  RELOC_NUMBER (R_MN10300_GOTOFF16, 14)
+  RELOC_NUMBER (R_MN10300_PLT32, 15)
+  RELOC_NUMBER (R_MN10300_PLT16, 16)
+  RELOC_NUMBER (R_MN10300_GOT32, 17)
+  RELOC_NUMBER (R_MN10300_GOT24, 18)
+  RELOC_NUMBER (R_MN10300_GOT16, 19)
+  RELOC_NUMBER (R_MN10300_COPY, 20)
+  RELOC_NUMBER (R_MN10300_GLOB_DAT, 21)
+  RELOC_NUMBER (R_MN10300_JMP_SLOT, 22)
+  RELOC_NUMBER (R_MN10300_RELATIVE, 23)
 END_RELOC_NUMBERS (R_MN10300_MAX)
 
 /* Machine variant if we know it.  This field was invented at Cygnus,
@@ -50,4 +64,5 @@ END_RELOC_NUMBERS (R_MN10300_MAX)
 
 #define E_MN10300_MACH_MN10300 0x00810000
 #define E_MN10300_MACH_AM33    0x00820000
+#define E_MN10300_MACH_AM33_2   0x00830000
 #endif /* _ELF_MN10300_H */
index 52bcc1e055c750a257828de1419dcfcabf5c8203..54914e3cc0ad08395353da7468b6d6b2af08745c 100644 (file)
@@ -120,7 +120,11 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type)
   RELOC_NUMBER (R_PPC_EMB_BIT_FLD,     115)
   RELOC_NUMBER (R_PPC_EMB_RELSDA,      116)
 
-  /* These are GNU extensions to enable C++ vtable garbage collection.  */
+/* Fake relocation for branch stubs. This will keep them
+   together.  */
+#define R_PPC_RELAX32 251
+
+/* These are GNU extensions to enable C++ vtable garbage collection.  */
   RELOC_NUMBER (R_PPC_GNU_VTINHERIT,   253)
   RELOC_NUMBER (R_PPC_GNU_VTENTRY,     254)
 
index 6a21c3b6fe21584893c72c2c1c1c7bd2a3ad1ed8..3a1306fa75093443b13ef26b0b352b2c71b03f81 100644 (file)
@@ -110,6 +110,11 @@ START_RELOC_NUMBERS (elf_s390_reloc_type)
     RELOC_NUMBER (R_390_TLS_DTPOFF, 55)        /* Offset in TLS block.  */
     RELOC_NUMBER (R_390_TLS_TPOFF, 56) /* Negate offset in static TLS
                                           block.  */
+    RELOC_NUMBER (R_390_20, 57)                /* Direct 20 bit.  */
+    RELOC_NUMBER (R_390_GOT20, 58)     /* 20 bit GOT offset.  */
+    RELOC_NUMBER (R_390_GOTPLT20, 59)  /* 20 bit offset to jump slot.  */
+    RELOC_NUMBER (R_390_TLS_GOTIE20, 60)/* 20 bit GOT offset for statis TLS
+                                          block offset.  */
     /* These are GNU extensions to enable C++ vtable garbage collection.  */
     RELOC_NUMBER (R_390_GNU_VTINHERIT, 250)
     RELOC_NUMBER (R_390_GNU_VTENTRY, 251)
index c949ab01f8c4b48a645d2f1d981b1c9a4e74786f..db5b2d9fd1a2709655519e75d133ac30b9142692 100644 (file)
@@ -104,4 +104,15 @@ END_RELOC_NUMBERS (R_V850_max)
 /* Section contains the .scommon data.  */
 #define SHT_V850_ZCOMMON       0x70000002
 
+/* Processor specific section flags.  */
+
+/* This section must be in the small data area (pointed to by GP).  */
+#define SHF_V850_GPREL         0x10000000
+
+/* This section must be in the tiny data area (pointed to by EP).  */
+#define SHF_V850_EPREL         0x20000000
+
+/* This section must be in the zero data area (pointed to by R0).  */
+#define SHF_V850_R0REL         0x40000000
+
 #endif /* _ELF_V850_H */
index e100c1193166a1055cdb8fdad0d92a27d72a2916..5b2706091a34eedff2da0391d76861491836d5a1 100644 (file)
@@ -1,3 +1,25 @@
+2003-07-18  Michael Snyder  <msnyder@redhat.com>
+
+       * include/opcode/h8sx.h (DO_MOVA1, DO_MOVA2): Reformatting.
+
+2003-07-15  Richard Sandiford  <rsandifo@redhat.com>
+
+       * mips.h (CPU_RM7000): New macro.
+       (OPCODE_IS_MEMBER): Match CPU_RM7000 against 4650 insns.
+
+2003-07-09  Alexandre Oliva  <aoliva@redhat.com>
+
+       2000-04-01  Alexandre Oliva  <aoliva@cygnus.com>
+       * mn10300.h (AM33_2): Renamed from AM33.
+       2000-03-31  Alexandre Oliva  <aoliva@cygnus.com>
+       * mn10300.h (AM332, FMT_D3): Defined.
+       (MN10300_OPERAND_FSREG, MN10300_OPERAND_FDREG): Likewise.
+       (MN10300_OPERAND_FPCR): Likewise.
+
+2003-07-01  Martin Schwidefsky  <schwidefsky@de.ibm.com>
+
+       * s390.h (s390_opcode_cpu_val): Add enum for cpu type z990.
+
 2003-06-25  Richard Sandiford  <rsandifo@redhat.com>
 
        * h8300.h (IMM2_NS, IMM8_NS, IMM16_NS): Remove.
index bfac3f8c73ed052eb035465516bb9c499d2fb211..20793a0a94b0d24eb0695030231d3d49bc9fd065 100644 (file)
@@ -1627,17 +1627,17 @@ struct h8_opcode h8_opcodes[] =
   DO_MOVA1 (RDPOSTDEC, 0xA, B30 | RDPOSTDEC),
   DO_MOVA1 (RDPREINC,  0x9, B30 | RDPREINC),
   DO_MOVA1 (RDPREDEC,  0xB, B30 | RDPREDEC),
-  DO_MOVA1 (DISP2DST, B30 | B20 | DISP2DST,  B30 | DSTDISPREG),
-  DO_MOVA2 (DISP16DST, 0xC,      B30 | DSTDISPREG, DSTDISP16LIST),
-  DO_MOVA2 (DISP32DST, 0xC,      B31 | DSTDISPREG, DSTDISP32LIST),
-  DO_MOVA2 (INDEXB16 | DST, 0xD, B30 | DSTDISPREG, DSTDISP16LIST),
-  DO_MOVA2 (INDEXW16 | DST, 0xE, B30 | DSTDISPREG, DSTDISP16LIST),
-  DO_MOVA2 (INDEXL16 | DST, 0xF, B30 | DSTDISPREG, DSTDISP16LIST),
-  DO_MOVA2 (INDEXB32 | DST, 0xD, B31 | DSTDISPREG, DSTDISP32LIST),
-  DO_MOVA2 (INDEXW32 | DST, 0xE, B31 | DSTDISPREG, DSTDISP32LIST),
-  DO_MOVA2 (INDEXL32 | DST, 0xF, B31 | DSTDISPREG, DSTDISP32LIST),
-  DO_MOVA2 (ABS16DST | DST, 0x4, 0x0,              DSTABS16LIST),
-  DO_MOVA2 (ABS32DST | DST, 0x4, 0x8,              DSTABS32LIST),
+  DO_MOVA1 (DISP2DST,  B30 | B20 | DISP2DST,  B30 | DSTDISPREG),
+  DO_MOVA2 (DISP16DST, 0xC, B30 | DSTDISPREG, DSTDISP16LIST),
+  DO_MOVA2 (DISP32DST, 0xC, B31 | DSTDISPREG, DSTDISP32LIST),
+  DO_MOVA2 (INDEXB16D, 0xD, B30 | DSTDISPREG, DSTDISP16LIST),
+  DO_MOVA2 (INDEXW16D, 0xE, B30 | DSTDISPREG, DSTDISP16LIST),
+  DO_MOVA2 (INDEXL16D, 0xF, B30 | DSTDISPREG, DSTDISP16LIST),
+  DO_MOVA2 (INDEXB32D, 0xD, B31 | DSTDISPREG, DSTDISP32LIST),
+  DO_MOVA2 (INDEXW32D, 0xE, B31 | DSTDISPREG, DSTDISP32LIST),
+  DO_MOVA2 (INDEXL32D, 0xF, B31 | DSTDISPREG, DSTDISP32LIST),
+  DO_MOVA2 (ABS16DST 0x4, 0x0,              DSTABS16LIST),
+  DO_MOVA2 (ABS32DST 0x4, 0x8,              DSTABS32LIST),
 
   {O (O_MOV, SB), AV_H8, 10, "movfpe", {{ABS16SRC, RD8, E}}, {{0x6, 0xA, 0x4, RD8, ABS16SRC, DATA3, E}}},
   {O (O_MOV, SB), AV_H8, 10, "movtpe", {{RS8, ABS16DST, E}}, {{0x6, 0xA, 0xC, RS8, ABS16DST, DATA3, E}}},
index 476c8e3112cf189bd58a55ad938c4bb3a6cfb25c..65434a77853a778ed37590f497cb9102c1413d33 100644 (file)
@@ -451,6 +451,7 @@ struct mips_opcode
 #define CPU_VR5400     5400
 #define CPU_VR5500     5500
 #define CPU_R6000      6000
+#define CPU_RM7000     7000
 #define CPU_R8000      8000
 #define CPU_R10000     10000
 #define CPU_R12000     12000
@@ -469,6 +470,7 @@ struct mips_opcode
 #define OPCODE_IS_MEMBER(insn, isa, cpu)                               \
     (((insn)->membership & isa) != 0                                   \
      || (cpu == CPU_R4650 && ((insn)->membership & INSN_4650) != 0)    \
+     || (cpu == CPU_RM7000 && ((insn)->membership & INSN_4650) != 0)   \
      || (cpu == CPU_R4010 && ((insn)->membership & INSN_4010) != 0)    \
      || (cpu == CPU_VR4100 && ((insn)->membership & INSN_4100) != 0)   \
      || (cpu == CPU_R3900 && ((insn)->membership & INSN_3900) != 0)    \
index 0de7f451a4d4c182bb191939c62a2bd14c9e7194..bd7faa110aa30a49ba57199a0d47037c910afb64 100644 (file)
@@ -135,6 +135,12 @@ extern const struct mn10300_operand mn10300_operands[];
 
 #define MN10300_OPERAND_24BIT 0x800000
 
+#define MN10300_OPERAND_FSREG 0x1000000
+
+#define MN10300_OPERAND_FDREG 0x2000000
+
+#define MN10300_OPERAND_FPCR 0x4000000
+
 /* Opcode Formats.  */
 #define FMT_S0 1
 #define FMT_S1 2
@@ -151,11 +157,13 @@ extern const struct mn10300_operand mn10300_operands[];
 #define FMT_D8 13
 #define FMT_D9 14
 #define FMT_D10 15
+#define FMT_D3 16
 
 /* Variants of the mn10300 which have additional opcodes.  */
 #define MN103 300
 #define AM30  300
 
 #define AM33 330
+#define AM33_2 332
 
 #endif /* MN10300_H */
index 6e32723b235d1d9c091d237d9c4870677e9c6c3a..f582a4e5104361533386c9a9be40e0e40e087a0b 100644 (file)
@@ -34,7 +34,8 @@ enum s390_opcode_cpu_val
   {
     S390_OPCODE_G5 = 0,
     S390_OPCODE_G6,
-    S390_OPCODE_Z900
+    S390_OPCODE_Z900,
+    S390_OPCODE_Z990
   };
 
 /* The opcode table is an array of struct s390_opcode.  */
index b47cbd754b44c54051fbadc4ea060bd822043f57..4191c3685758f2b2fc37eb6591950d85895163ef 100644 (file)
@@ -1,5 +1,5 @@
 /* Xtensa configuration settings.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001,2002,2003 Free Software Foundation, Inc.
    Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
 
    This program is free software; you can redistribute it and/or modify
    Xtensa System Software Reference Manual for documentation of these
    macros.  */
 
+#undef XCHAL_HAVE_BE
 #define XCHAL_HAVE_BE                  1
+
+#undef XCHAL_HAVE_DENSITY
 #define XCHAL_HAVE_DENSITY             1
+
+#undef XCHAL_HAVE_CONST16
+#define XCHAL_HAVE_CONST16             0
+
+#undef XCHAL_HAVE_ABS
+#define XCHAL_HAVE_ABS                 1
+
+#undef XCHAL_HAVE_ADDX
+#define XCHAL_HAVE_ADDX                        1
+
+#undef XCHAL_HAVE_L32R
+#define XCHAL_HAVE_L32R                        1
+
+#undef XCHAL_HAVE_MAC16
 #define XCHAL_HAVE_MAC16               0
+
+#undef XCHAL_HAVE_MUL16
 #define XCHAL_HAVE_MUL16               0
+
+#undef XCHAL_HAVE_MUL32
 #define XCHAL_HAVE_MUL32               0
+
+#undef XCHAL_HAVE_DIV32
 #define XCHAL_HAVE_DIV32               0
+
+#undef XCHAL_HAVE_NSA
 #define XCHAL_HAVE_NSA                 1
+
+#undef XCHAL_HAVE_MINMAX
 #define XCHAL_HAVE_MINMAX              0
+
+#undef XCHAL_HAVE_SEXT
 #define XCHAL_HAVE_SEXT                        0
+
+#undef XCHAL_HAVE_LOOPS
 #define XCHAL_HAVE_LOOPS               1
+
+#undef XCHAL_HAVE_BOOLEANS
 #define XCHAL_HAVE_BOOLEANS            0
+
+#undef XCHAL_HAVE_FP
 #define XCHAL_HAVE_FP                  0
+
+#undef XCHAL_HAVE_FP_DIV
 #define XCHAL_HAVE_FP_DIV              0
+
+#undef XCHAL_HAVE_FP_RECIP
 #define XCHAL_HAVE_FP_RECIP            0
+
+#undef XCHAL_HAVE_FP_SQRT
 #define XCHAL_HAVE_FP_SQRT             0
+
+#undef XCHAL_HAVE_FP_RSQRT
 #define XCHAL_HAVE_FP_RSQRT            0
+
+#undef XCHAL_HAVE_WINDOWED
 #define XCHAL_HAVE_WINDOWED            1
 
+
+#undef XCHAL_ICACHE_SIZE
 #define XCHAL_ICACHE_SIZE              8192
+
+#undef XCHAL_DCACHE_SIZE
 #define XCHAL_DCACHE_SIZE              8192
+
+#undef XCHAL_ICACHE_LINESIZE
 #define XCHAL_ICACHE_LINESIZE          16
+
+#undef XCHAL_DCACHE_LINESIZE
 #define XCHAL_DCACHE_LINESIZE          16
+
+#undef XCHAL_ICACHE_LINEWIDTH
 #define XCHAL_ICACHE_LINEWIDTH         4
+
+#undef XCHAL_DCACHE_LINEWIDTH
 #define XCHAL_DCACHE_LINEWIDTH         4
+
+#undef XCHAL_DCACHE_IS_WRITEBACK
 #define XCHAL_DCACHE_IS_WRITEBACK      0
 
+
+#undef XCHAL_HAVE_MMU
 #define XCHAL_HAVE_MMU                 1
+
+#undef XCHAL_MMU_MIN_PTE_PAGE_SIZE
 #define XCHAL_MMU_MIN_PTE_PAGE_SIZE    12
 
+
+#undef XCHAL_HAVE_DEBUG
 #define XCHAL_HAVE_DEBUG               1
+
+#undef XCHAL_NUM_IBREAK
 #define XCHAL_NUM_IBREAK               2
+
+#undef XCHAL_NUM_DBREAK
 #define XCHAL_NUM_DBREAK               2
+
+#undef XCHAL_DEBUGLEVEL
 #define XCHAL_DEBUGLEVEL               4
 
-#define XCHAL_EXTRA_SA_SIZE             0
-#define XCHAL_EXTRA_SA_ALIGN            1
+
+#undef XCHAL_EXTRA_SA_SIZE
+#define XCHAL_EXTRA_SA_SIZE            0
+
+#undef XCHAL_EXTRA_SA_ALIGN
+#define XCHAL_EXTRA_SA_ALIGN           1
 
 #endif /* !XTENSA_CONFIG_H */
index 99f2f0a695a9c5fb20285bb4623e4be7d1c336d3..f26593fc08176816fdc5ad9a95a6c8e7337bcae8 100644 (file)
@@ -1,3 +1,16 @@
+2003-07-05  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       * pex-win32.c (pexecute): Mark parameters this_pname and
+       temp_base as unused. Remove unused variables retries,
+       sleep_interval. Initialize org_stdin, org_stdout.
+       (pwait): Mark parameter flags as unused.
+
+2003-07-02  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       * pex-win32.c (fix_argv): Ensure that the executable pathname
+       uses Win32 backslashes.
+       (pexecute): Cast away constness when assigning *errmsg_arg.
+
 2003-06-26  H.J. Lu <hongjiu.lu@intel.com>
 
        * testsuite/demangle-expected: Add more GNU V3 testcases.
index bd097a4bb052600dea352169aabfe5cc2c6c6140..27a5bb4e309ea5885122a35cdc715684f49d665f 100644 (file)
@@ -57,7 +57,13 @@ fix_argv (argvec)
      char **argvec;
 {
   int i;
+  char * command0 = argvec[0];
 
+  /* Ensure that the executable pathname uses Win32 backslashes.  */
+  for (; *command0 != '\0'; command0++)
+    if (*command0 == '/')
+      *command0 = '\\';
   for (i = 1; argvec[i] != 0; i++)
     {
       int len, j;
@@ -130,15 +136,16 @@ int
 pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
      const char *program;
      char * const *argv;
-     const char *this_pname;
-     const char *temp_base;
+     const char *this_pname ATTRIBUTE_UNUSED;
+     const char *temp_base ATTRIBUTE_UNUSED;
      char **errmsg_fmt, **errmsg_arg;
      int flags;
 {
   int pid;
-  int pdes[2], org_stdin, org_stdout;
+  int pdes[2];
+  int org_stdin = -1;
+  int org_stdout = -1;
   int input_desc, output_desc;
-  int retries, sleep_interval;
 
   /* Pipe waiting from last process, to be used as input for the next one.
      Value is STDIN_FILE_NO if no pipe is waiting
@@ -203,7 +210,7 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
   if (pid == -1)
     {
       *errmsg_fmt = install_error_msg;
-      *errmsg_arg = program;
+      *errmsg_arg = (char*) program;
       return -1;
     }
 
@@ -221,7 +228,7 @@ int
 pwait (pid, status, flags)
      int pid;
      int *status;
-     int flags;
+     int flags ATTRIBUTE_UNUSED;
 {
   int termstat;
 
index cc8783edce301ef5e36ec6b3ca54bf347ed77be4..d2d5f21b611235316317197d3a32c2dff5897a6f 100755 (executable)
 # mkinstalldirs --- make directory hierarchy
 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
 # Created: 1993-05-16
-# Last modified: 1994-03-25
 # Public domain
 
 errstatus=0
+dirmode=""
 
-for file in ${1+"$@"} ; do 
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-   shift
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
 
-   pathcomp=
-   for d in ${1+"$@"} ; do
-     pathcomp="$pathcomp$d"
-     case "$pathcomp" in
-       -* ) pathcomp=./$pathcomp ;;
-     esac
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage" 1>&2
+      exit 0
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+case $dirmode in
+  '')
+    if mkdir -p -- . 2>/dev/null; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    fi
+    ;;
+esac
+
+for file
+do
+  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  shift
+
+  pathcomp=
+  for d
+  do
+    pathcomp="$pathcomp$d"
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
 
-     if test ! -d "$pathcomp"; then
-        echo "mkdir $pathcomp" 1>&2
-        mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
-     fi
+      if test ! -d "$pathcomp"; then
+       errstatus=$lasterr
+      else
+       if test ! -z "$dirmode"; then
+         echo "chmod $dirmode $pathcomp"
+         lasterr=""
+         chmod "$dirmode" "$pathcomp" || lasterr=$?
 
-     if test ! -d "$pathcomp"; then
-       errstatus=$lasterr
-     fi
+         if test ! -z "$lasterr"; then
+           errstatus=$lasterr
+         fi
+       fi
+      fi
+    fi
 
-     pathcomp="$pathcomp/"
-   done
+    pathcomp="$pathcomp/"
+  done
 done
 
 exit $errstatus
 
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
 # mkinstalldirs ends here
index d0806c4c9eee9653014ae997afccd3914f859811..7c8edbd5db3d7240c258431771cfc2cd971b3808 100644 (file)
@@ -1,3 +1,114 @@
+2003-08-05  Nick Clifton  <nickc@redhat.com>
+
+       * configure.in (ALL_LINGUAS): Add nl.
+       * configure: Regenerate.
+       * po/nl.po: New Dutch translation.
+
+2003-07-30  Jason Eckhardt  <jle@rice.edu>
+
+        * i860-dis.c: Convert to ISO C90.  Remove superflous prototypes.
+
+2003-07-30  Nick Clifton  <nickc@redhat.com>
+
+       * po/ro.po: Updated Romanian translation.
+
+2003-07-29  Jakub Jelinek  <jakub@redhat.com>
+
+       * ppc-opc.c (insert_mbe, extract_mbe): Shift 1L instead of 1 up.
+
+2003-07-24  Nick Clifton  <nickc@redhat.com>
+
+       * po/fr.po: Updated French translation.
+
+2003-07-18  Nick Clifton  <nickc@redhat.com>
+
+       * arm-dis.c (parse_arm_disassembler_option): Do not expect
+       option string to be NUL terminated.
+        (parse_disassembler_options): Allow options to be space or
+       comma separated.  
+
+2003-07-17  Nick Clifton  <nickc@redhat.com>
+
+       * po/es.po: New Spanish translation.
+       * po/sv.po: New Swedish translation.
+       * po/opcodes.pot: Regenerate.
+
+2003-07-15  Richard Sandiford  <rsandifo@redhat.com>
+
+       * mips-dis.c (mips_arch_choices): Add rm7000 and rm9000 entries.
+
+2003-07-14  Nick Clifton  <nickc@redhat.com>
+
+       * po/tr.po: Update with latest version.
+       * po/POTFILES.in: Regenerate.
+       * Makefile.in: Regenerate.
+
+2003-07-11  Alan Modra  <amodra@bigpond.net.au>
+
+       * po/opcodes.pot: Regenerate.
+
+2003-07-09  Alexandre Oliva  <aoliva@redhat.com>
+
+       2000-05-25  Alexandre Oliva  <aoliva@cygnus.com>
+       * m10300-dis.c (disassemble): Negate negative accumulator's shift.
+       2000-05-24  Alexandre Oliva  <aoliva@cygnus.com>
+       * m10300-dis.c (disassemble, case FSREG, FDREG): Don't assume
+       32-bit longs when sign-extending operands.
+       2000-04-20  Alexandre Oliva  <aoliva@cygnus.com>
+       * m10300-opc.c: Remove MN10300_OPERAND_RELAX from all FSREGs.
+       * m10300-dis.c (HAVE_AM33_2): Define.
+       (disassemble): Use it.
+       (HAVE_AM33): Redefine.
+       (print_insn_mn10300): Fix mask for 5-byte extended insns.
+       2000-04-01  Alexandre Oliva  <aoliva@cygnus.com>
+       * m10300-opc.c: Renamed AM332 to AM33_2.
+       2000-03-31  Alexandre Oliva  <aoliva@cygnus.com>
+       * m10300-opc.c: Defined AM33 2.0 register operands.  Added support
+       for AM33 2.0 `imm8,(abs16)' addressing mode for btst, bset and
+       bclr.  Implemented `fbCC', `flCC', `dcpf' and all FP insns.
+       * m10300-dis.c (print_insn_mn10300): Recognize 5byte extended
+       insn code of AM33 2.0.
+       (disassemble): Recognize FMT_D3.  Print out FP register names.
+
+2003-07-09  Chris Demetriou  <cgd@broadcom.com>
+
+       * mips-dis.c (set_default_mips_dis_options): Get BFD from
+       the disassembler_info's section, rather than from the
+       disassembler_info's symbols pointer.
+
+2003-07-07  Alan Modra  <amodra@bigpond.net.au>
+
+       * ppc-opc.c: Remove NULL pointer checks.  Formatting.  Remove
+       extraneous ATTRIBUTE_UNUSED.
+       * ppc-dis.c (print_insn_powerpc): Always pass a valid address to
+       operand->extract.
+
+2003-07-04  Alan Modra  <amodra@bigpond.net.au>
+
+       * ppc-opc.c: Convert to C90, removing unnecessary prototypes and
+       casts.  Formatting.
+
+       * ppc-opc.c: Remove PARAMS from prototypes.
+       (FXM4): Define.
+       (insert_fxm): New function, used by both FXM and FXM4.
+       (extract_fxm): Likewise.
+       (XFXFXM_MASK): Remove 1 << 20 term.
+       (powerpc_opcodes): Add Power4 version of "mfcr".  Simplify "mtcr" mask.
+
+2003-07-01  Martin Schwidefsky  <schwidefsky@de.ibm.com>
+
+       * s390-dis.c (s390_extract_operand): Add support for long displacements.
+       * s390-mkopc.c (s390_opcode_cpu_val): Add support for cpu type z990.
+       * s390-opc.c (D20_20): Add define for 20 bit displacements.
+       (INSTR_RRF_R0RR, INSTR_RSL_R0RD, INSTR_RSY_RRRD, INSTR_RSY_RURD,
+       INSTR_RSY_AARD, INSTR_RXY_RRRD, INSTR_RXY_FRRD, INSTR_SIY_URD): Add
+       new instruction formats.
+       (MASK_RRF_R0RR, MASK_RSL_R0RD, MASK_RSY_RRRD, MASK_RSY_RURD,
+       MASK_RSY_AARD, MASK_RXY_RRRD, MASK_RXY_FRRD, MASK_SIY_URD): Likewise.
+       (s390_opformats): Likewise.
+       * s390-opc.txt: Add new instructions for cpu type z990. Add missing
+       hfp instructions. Add missing instructions pgin, pgout and xsch.
+
 2003-06-23  H.J. Lu <hongjiu.lu@intel.com>
 
        * i386-dis.c (PNI_Fixup): New. Fix up "mwait" and "monitor" in
 
 2002-11-06  Aldy Hernandez  <aldyh@redhat.com>
 
-       * opcodes/ppc-opc.c: Change RD to RS for evmerge*.
+       * ppc-opc.c: Change RD to RS for evmerge*.
 
 2002-10-07  Nathan Tallent  <eraxxon@alumni.rice.edu>
 
 
        * Makefile.am: Run "make dep-am".
        * Makefile.in: Regenerate.
-       * opcodes/po/POTFILES.in: Regenerate.
+       * po/POTFILES.in: Regenerate.
 
 2002-01-19  Richard Earnshaw  <rearnsha@arm.com>
 
 
 2001-08-23  Martin Schwidefsky  <schwidefsky@de.ibm.com>
 
-       * opcodes/s390-opc.c: Add "low or high" and "not low or high"
+       * s390-opc.c: Add "low or high" and "not low or high"
        branch instructions for gcc 3.0.
-       * opcodes/s390-opc.txt: Likewise.
+       * s390-opc.txt: Likewise.
 
 2001-08-21  Andreas Jaeger  <aj@suse.de>
 
index 2823902f2246c62faba1ad8588a92557750752d5..a9875a1e5a6b8f1447c239a3e99abb0988d23e9c 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
 
 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -467,7 +467,7 @@ acinclude.m4 aclocal.m4 config.in configure configure.in
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-TAR = tar
+TAR = gtar
 GZIP_ENV = --best
 SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
 OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
index 2c9e385707ab5a19d0dc222ffa012e0cd5ac56b4..97ec8423485fd32767efdbea30aad4504f5f2a34 100644 (file)
@@ -27,6 +27,7 @@
 #include "coff/internal.h"
 #include "libcoff.h"
 #include "opintl.h"
+#include "safe-ctype.h"
 
 /* FIXME: This shouldn't be done here.  */
 #include "elf-bfd.h"
@@ -1152,51 +1153,48 @@ parse_arm_disassembler_option (option)
       option += 10;
 
       for (i = NUM_ARM_REGNAMES; i--;)
-       if (streq (option, regnames[i].name))
+       if (strneq (option, regnames[i].name, strlen (regnames[i].name)))
          {
            regname_selected = i;
            break;
          }
 
       if (i < 0)
+       /* XXX - should break 'option' at following delimiter.  */
        fprintf (stderr, _("Unrecognised register name set: %s\n"), option);
     }
-  else if (streq (option, "force-thumb"))
+  else if (strneq (option, "force-thumb", 11))
     force_thumb = 1;
-  else if (streq (option, "no-force-thumb"))
+  else if (strneq (option, "no-force-thumb", 14))
     force_thumb = 0;
   else
+    /* XXX - should break 'option' at following delimiter.  */
     fprintf (stderr, _("Unrecognised disassembler option: %s\n"), option);
 
   return;
 }
 
-/* Parse the string of disassembler options, spliting it at whitespaces.  */
+/* Parse the string of disassembler options, spliting it at whitespaces
+   or commas.  (Whitespace separators supported for backwards compatibility).  */
 
 static void
 parse_disassembler_options (options)
      char * options;
 {
-  char * space;
-
   if (options == NULL)
     return;
 
-  do
+  while (*options)
     {
-      space = strchr (options, ' ');
-
-      if (space)
-       {
-         * space = '\0';
-         parse_arm_disassembler_option (options);
-         * space = ' ';
-         options = space + 1;
-       }
-      else
-       parse_arm_disassembler_option (options);
+      parse_arm_disassembler_option (options);
+
+      /* Skip forward to next seperator.  */
+      while ((*options) && (! ISSPACE (*options)) && (*options != ','))
+       ++ options;
+      /* Skip forward past seperators.  */
+      while (ISSPACE (*options) || (*options == ','))
+       ++ options;      
     }
-  while (space);
 }
 
 /* NOTE: There are no checks in these routines that
index ae248d05111aea2ae36b22ff2db67d8f3ba2541c..4a95a9a6060cd1423b9246028182b770068bc2a5 100755 (executable)
@@ -2672,7 +2672,7 @@ else
 fi
 
 
-ALL_LINGUAS="fr sv tr es da de id pt_BR ro"
+ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl"
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
 echo "configure:2678: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
index ea64c849a61e59fdfccfdf0013a0d5f84aa59472..89199243a2f484254a2e2d7fa0f20aa6ceae60bb 100644 (file)
@@ -78,7 +78,7 @@ AC_EXEEXT
 
 AC_PROG_CC
 
-ALL_LINGUAS="fr sv tr es da de id pt_BR ro"
+ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl"
 CY_GNU_GETTEXT
 
 . ${srcdir}/../bfd/configure.host
index a3e87b0f5521f619ce29f7e220a7f1fab8f8ee71..d95c7e96f09ee94beb1ba45f958ddf17cd2f809c 100644 (file)
@@ -44,10 +44,6 @@ static const char *const crnames[] =
   "p0", "p1", "p2", "p3", "--", "--", "--", "--" };
 
 
-/* Prototypes.  */
-static int sign_ext            PARAMS((unsigned int, int)); 
-static void print_br_address   PARAMS((disassemble_info *, bfd_vma, long));
-
 
 /* True if opcode is xor, xorh, and, andh, or, orh, andnot, andnoth.  */
 #define BITWISE_OP(op)  ((op) == 0x30 || (op) == 0x31          \
@@ -60,9 +56,7 @@ static void print_br_address  PARAMS((disassemble_info *, bfd_vma, long));
 
 /* Sign extend N-bit number.  */
 static int
-sign_ext (x, n)
-     unsigned int x;
-     int n;
+sign_ext (unsigned int x, int n)
 {
   int t;
   t = x >> (n - 1);
@@ -74,10 +68,7 @@ sign_ext (x, n)
 /* Print a PC-relative branch offset.  VAL is the sign extended value
    from the branch instruction.  */
 static void
-print_br_address (info, memaddr, val)
-     disassemble_info *info;
-     bfd_vma memaddr;
-     long val;
+print_br_address (disassemble_info *info, bfd_vma memaddr, long val)
 {
 
   long adj = (long)memaddr + 4 + (val << 2);
@@ -96,9 +87,7 @@ print_br_address (info, memaddr, val)
 
 /* Print one instruction.  */
 int
-print_insn_i860 (memaddr, info)
-     bfd_vma memaddr;
-     disassemble_info *info;
+print_insn_i860 (bfd_vma memaddr, disassemble_info *info)
 {
   bfd_byte buff[4];
   unsigned int insn, i;
index a8d4b510dcd8884d5f081aa7dbd0967cc77f1d98..1d3637c704d0b534fc82783b4faf7536f02406dd 100644 (file)
@@ -26,7 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 static void disassemble PARAMS ((bfd_vma, struct disassemble_info *,
                                 unsigned long insn, unsigned int));
 
-#define HAVE_AM33 (info->mach == AM33)
+#define HAVE_AM33_2 (info->mach == AM33_2)
+#define HAVE_AM33 (info->mach == AM33 || HAVE_AM33_2)
 #define HAVE_AM30 (info->mach == AM30)
 
 int
@@ -200,6 +201,9 @@ print_insn_mn10300 (memaddr, info)
 
       insn = bfd_getb32 (buffer);
       consume = 7;
+      /* Handle the 5-byte extended instruction codes.  */
+      if ((insn & 0xfff80000) == 0xfe800000)
+       consume = 5;
     }
 
   disassemble (memaddr, info, insn, consume);
@@ -237,6 +241,8 @@ disassemble (memaddr, info, insn, size)
        mysize = 5;
       else if (op->format == FMT_D2)
        mysize = 4;
+      else if (op->format == FMT_D3)
+       mysize = 5;
       else if (op->format == FMT_D4)
        mysize = 6;
       else if (op->format == FMT_D6)
@@ -253,6 +259,7 @@ disassemble (memaddr, info, insn, size)
       if ((op->mask & insn) == op->opcode
          && size == (unsigned int) mysize
          && (op->machine == 0
+             || (op->machine == AM33_2 && HAVE_AM33_2)
              || (op->machine == AM33 && HAVE_AM33)
              || (op->machine == AM30 && HAVE_AM30)))
        {
@@ -343,6 +350,25 @@ disassemble (memaddr, info, insn, size)
              insn |= (temp & 0xffffff00) >> 8;
              extension = temp & 0xff;
            }
+         else if (size == 5 && op->format == FMT_D3)
+           {
+             status = (*info->read_memory_func) (memaddr + 2, buffer, 2, info);
+             if (status != 0)
+               {
+                 (*info->memory_error_func) (status, memaddr, info);
+                 return;
+               }
+             insn &= 0xffff0000;
+             insn |= bfd_getl16 (buffer);
+
+             status = (*info->read_memory_func) (memaddr + 4, buffer, 1, info);
+             if (status != 0)
+               {
+                 (*info->memory_error_func) (status, memaddr, info);
+                 return;
+               }
+             extension = *(unsigned char *) buffer;
+           }
          else if (size == 5)
            {
              unsigned long temp = 0;
@@ -498,6 +524,52 @@ disassemble (memaddr, info, insn, size)
                  if ((operand->flags & MN10300_OPERAND_SIGNED) != 0)
                    value = ((value & 0xffffff) ^ 0x800000) - 0x800000;
                }
+             else if ((operand->flags & (MN10300_OPERAND_FSREG
+                                         | MN10300_OPERAND_FDREG)))
+               {
+                 /* See m10300-opc.c just before #define FSM0 for an
+                    explanation of these variables.  Note that
+                    FMT-implied shifts are not taken into account for
+                    FP registers.  */
+                 unsigned long mask_low, mask_high;
+                 int shl_low, shr_high, shl_high;
+
+                 switch (operand->bits)
+                   {
+                   case 5:
+                     /* Handle regular FP registers.  */
+                     if (operand->shift >= 0)
+                       {
+                         /* This is an `m' register.  */
+                         shl_low = operand->shift;
+                         shl_high = 8 + (8 & shl_low) + (shl_low & 4) / 4;
+                       }
+                     else
+                       {
+                         /* This is an `n' register.  */
+                         shl_low = -operand->shift;
+                         shl_high = shl_low / 4;
+                       }
+                     mask_low = 0x0f;
+                     mask_high = 0x10;
+                     shr_high = 4;
+                     break;
+
+                   case 3:
+                     /* Handle accumulators.  */
+                     shl_low = -operand->shift;
+                     shl_high = 0;
+                     mask_low = 0x03;
+                     mask_high = 0x04;
+                     shr_high = 2;
+                     break;
+
+                   default:
+                     abort ();
+                   }
+                 value = ((((insn >> shl_high) << shr_high) & mask_high)
+                          | ((insn >> shl_low) & mask_low));
+               }
              else if ((operand->flags & MN10300_OPERAND_EXTENDED) != 0)
                {
                  value = ((extension >> (operand->shift))
@@ -567,6 +639,15 @@ disassemble (memaddr, info, insn, size)
                    (*info->fprintf_func) (info->stream, "xr%d", (int) value);
                }
 
+             else if ((operand->flags & MN10300_OPERAND_FSREG) != 0)
+               (*info->fprintf_func) (info->stream, "fs%d", (int) value);
+
+             else if ((operand->flags & MN10300_OPERAND_FDREG) != 0)
+               (*info->fprintf_func) (info->stream, "fd%d", (int) value);
+
+             else if ((operand->flags & MN10300_OPERAND_FPCR) != 0)
+               (*info->fprintf_func) (info->stream, "fpcr");
+
              else if ((operand->flags & MN10300_OPERAND_USP) != 0)
                (*info->fprintf_func) (info->stream, "usp");
 
index 84014e127c8d2c46a67d549db6e3950a0c74b891..d1a2ea20d0831b30ef0f3f3d24d604d58dfe6e4d 100644 (file)
@@ -338,6 +338,85 @@ const struct mn10300_operand mn10300_operands[] = {
 #define SIMM4_6    (SIMM4_2+1)
   {4, 12, MN10300_OPERAND_SIGNED},
 
+#define FPCR      (SIMM4_6+1)
+  {0, 0, MN10300_OPERAND_FPCR},
+
+/* We call f[sd]m registers those whose most significant bit is stored
+ * within the opcode half-word, i.e., in a bit on the left of the 4
+ * least significant bits, and f[sd]n registers those whose most
+ * significant bit is stored at the end of the full word, after the 4
+ * least significant bits.  They're not numbered after their position
+ * in the mnemonic asm instruction, but after their position in the
+ * opcode word, i.e., depending on the amount of shift they need.
+ *
+ * The additional bit is shifted as follows: for `n' registers, it
+ * will be shifted by (|shift|/4); for `m' registers, it will be
+ * shifted by (8+(8&shift)+(shift&4)/4); for accumulator, whose
+ * specifications are only 3-bits long, the two least-significant bits
+ * are shifted by 16, and the most-significant bit is shifted by -2
+ * (i.e., it's stored in the least significant bit of the full
+ * word).  */
+
+/* fsm register in the first register operand position.  */
+#define FSM0      (FPCR+1)
+  {5, 0, MN10300_OPERAND_FSREG },
+
+/* fsm register in the second register operand position.  */
+#define FSM1      (FSM0+1)
+  {5, 4, MN10300_OPERAND_FSREG },
+
+/* fsm register in the third register operand position.  */
+#define FSM2      (FSM1+1)
+  {5, 8, MN10300_OPERAND_FSREG },
+
+/* fsm register in the fourth register operand position.  */
+#define FSM3      (FSM2+1)
+  {5, 12, MN10300_OPERAND_FSREG },
+
+/* fsn register in the first register operand position.  */
+#define FSN1      (FSM3+1)
+  {5, -4, MN10300_OPERAND_FSREG },
+
+/* fsn register in the second register operand position.  */
+#define FSN2      (FSN1+1)
+  {5, -8, MN10300_OPERAND_FSREG },
+
+/* fsm register in the third register operand position.  */
+#define FSN3      (FSN2+1)
+  {5, -12, MN10300_OPERAND_FSREG },
+
+/* fsm accumulator, in the fourth register operand position.  */
+#define FSACC     (FSN3+1)
+  {3, -16, MN10300_OPERAND_FSREG },
+
+/* fdm register in the first register operand position.  */
+#define FDM0      (FSACC+1)
+  {5, 0, MN10300_OPERAND_FDREG },
+
+/* fdm register in the second register operand position.  */
+#define FDM1      (FDM0+1)
+  {5, 4, MN10300_OPERAND_FDREG },
+
+/* fdm register in the third register operand position.  */
+#define FDM2      (FDM1+1)
+  {5, 8, MN10300_OPERAND_FDREG },
+
+/* fdm register in the fourth register operand position.  */
+#define FDM3      (FDM2+1)
+  {5, 12, MN10300_OPERAND_FDREG },
+
+/* fdn register in the first register operand position.  */
+#define FDN1      (FDM3+1)
+  {5, -4, MN10300_OPERAND_FDREG },
+
+/* fdn register in the second register operand position.  */
+#define FDN2      (FDN1+1)
+  {5, -8, MN10300_OPERAND_FDREG },
+
+/* fdn register in the third register operand position.  */
+#define FDN3      (FDN2+1)
+  {5, -12, MN10300_OPERAND_FDREG },
+
 } ; 
 
 #define MEM(ADDR) PAREN, ADDR, PAREN 
@@ -810,14 +889,17 @@ const struct mn10300_opcode mn10300_opcodes[] = {
 { "btst",      0xfbe90000,  0xffff0000,  0,    FMT_D7, AM33,   {IMM8, RN02}},
 { "btst",      0xfde90000,  0xffff0000,  0,    FMT_D8, AM33,   {IMM24, RN02}},
 { "btst",      0xfee90000,  0xffff0000,  0,    FMT_D9, AM33,   {IMM32_HIGH8, RN02}},
+{ "btst",      0xfe820000,  0xffff0000,  0,    FMT_D3, AM33_2, {IMM8E, MEM(IMM16_MEM)}},
 { "btst",      0xfe020000,  0xffff0000,  0,    FMT_D5, 0,      {IMM8E, MEM(IMM32_LOWSHIFT8)}},
 { "btst",      0xfaf80000,  0xfffc0000,  0,    FMT_D2, 0,      {IMM8, MEM2(SD8N_SHIFT8, AN0)}},
 
 { "bset",      0xf080,      0xfff0,      0,    FMT_D0, 0,      {DM1, MEM(AN0)}},
+{ "bset",      0xfe800000,  0xffff0000,  0,    FMT_D3, AM33_2, {IMM8E, MEM(IMM16_MEM)}},
 { "bset",      0xfe000000,  0xffff0000,  0,    FMT_D5, 0,      {IMM8E, MEM(IMM32_LOWSHIFT8)}},
 { "bset",      0xfaf00000,  0xfffc0000,  0,    FMT_D2, 0,      {IMM8, MEM2(SD8N_SHIFT8, AN0)}},
 
 { "bclr",      0xf090,      0xfff0,      0,    FMT_D0, 0,      {DM1, MEM(AN0)}},
+{ "bclr",      0xfe810000,  0xffff0000,  0,    FMT_D3, AM33_2, {IMM8E, MEM(IMM16_MEM)}},
 { "bclr",      0xfe010000,  0xffff0000,  0,    FMT_D5, 0,      {IMM8E, MEM(IMM32_LOWSHIFT8)}},
 { "bclr",      0xfaf40000,  0xfffc0000,  0,    FMT_D2, 0,      {IMM8, MEM2(SD8N_SHIFT8,AN0)}},
 
@@ -889,6 +971,36 @@ const struct mn10300_opcode mn10300_opcodes[] = {
 { "lra",       0xda,        0xff,        0,    FMT_S0, 0,      {UNUSED}},
 { "setlb",     0xdb,        0xff,        0,    FMT_S0, 0,      {UNUSED}},
 
+{ "fbeq",      0xf8d000,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fbne",      0xf8d100,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fbgt",      0xf8d200,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fbge",      0xf8d300,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fblt",      0xf8d400,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fble",      0xf8d500,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fbuo",      0xf8d600,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fblg",      0xf8d700,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fbleg",     0xf8d800,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fbug",      0xf8d900,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fbuge",     0xf8da00,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fbul",      0xf8db00,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fbule",     0xf8dc00,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+{ "fbue",      0xf8dd00,    0xffff00,    0,    FMT_D1, AM33_2, {SD8N_PCREL}},
+
+{ "fleq",      0xf0d0,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "flne",      0xf0d1,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "flgt",      0xf0d2,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "flge",      0xf0d3,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "fllt",      0xf0d4,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "flle",      0xf0d5,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "fluo",      0xf0d6,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "fllg",      0xf0d7,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "flleg",     0xf0d8,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "flug",      0xf0d9,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "fluge",     0xf0da,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "flul",      0xf0db,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "flule",     0xf0dc,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+{ "flue",      0xf0dd,      0xffff,      0,    FMT_D0, AM33_2, {UNUSED}},
+
 { "jmp",       0xf0f4,      0xfffc,      0,    FMT_D0, 0,      {PAREN,AN0,PAREN}},
 { "jmp",       0xcc0000,    0xff0000,    0,    FMT_S2, 0,      {IMM16_PCREL}},
 { "jmp",       0xdc000000,  0xff000000,  0,    FMT_S4, 0,      {IMM32_HIGH24}},
@@ -906,6 +1018,141 @@ const struct mn10300_opcode mn10300_opcodes[] = {
 { "rtm",       0xf0ff,      0xffff,      0,    FMT_D0, 0,      {UNUSED}},
 { "nop",       0xcb,        0xff,        0,    FMT_S0, 0,      {UNUSED}},
 
+{ "dcpf",      0xf9a600,    0xffff0f,    0,    FMT_D6, AM33_2,  {MEM (RM2)}},
+{ "dcpf",      0xf9a700,    0xffffff,    0,    FMT_D6, AM33_2,  {MEM (SP)}},
+{ "dcpf",      0xfba60000,  0xffff00ff,  0,    FMT_D7, AM33_2,  {MEM2 (RI,RM0)}},
+{ "dcpf",      0xfba70000,  0xffff0f00,  0,    FMT_D7, AM33_2,  {MEM2 (SD8,RM2)}},
+{ "dcpf",      0xfda70000,  0xffff0f00,  0,    FMT_D8, AM33_2,  {MEM2 (SD24,RM2)}},
+{ "dcpf",      0xfe460000,  0xffff0f00,  0,    FMT_D9, AM33_2,  {MEM2 (IMM32_HIGH8,RM2)}},
+
+{ "fmov",      0xf92000,    0xfffe00,    0,    FMT_D6, AM33_2,  {MEM (RM2), FSM0}},
+{ "fmov",      0xf92200,    0xfffe00,    0,    FMT_D6, AM33_2,  {MEMINC (RM2), FSM0}},
+{ "fmov",      0xf92400,    0xfffef0,    0,    FMT_D6, AM33_2,  {MEM (SP), FSM0}},
+{ "fmov",      0xf92600,    0xfffe00,    0,    FMT_D6, AM33_2,  {RM2, FSM0}},
+{ "fmov",      0xf93000,    0xfffd00,    0,    FMT_D6, AM33_2,  {FSM1, MEM (RM0)}},
+{ "fmov",      0xf93100,    0xfffd00,    0,    FMT_D6, AM33_2,  {FSM1, MEMINC (RM0)}},
+{ "fmov",      0xf93400,    0xfffd0f,    0,    FMT_D6, AM33_2,  {FSM1, MEM (SP)}},
+{ "fmov",      0xf93500,    0xfffd00,    0,    FMT_D6, AM33_2,  {FSM1, RM0}},
+{ "fmov",      0xf94000,    0xfffc00,    0,    FMT_D6, AM33_2,  {FSM1, FSM0}},
+{ "fmov",      0xf9a000,    0xfffe01,    0,    FMT_D6, AM33_2,  {MEM (RM2), FDM0}},
+{ "fmov",      0xf9a200,    0xfffe01,    0,    FMT_D6, AM33_2,  {MEMINC (RM2), FDM0}},
+{ "fmov",      0xf9a400,    0xfffef1,    0,    FMT_D6, AM33_2,  {MEM (SP), FDM0}},
+{ "fmov",      0xf9b000,    0xfffd10,    0,    FMT_D6, AM33_2,  {FDM1, MEM (RM0)}},
+{ "fmov",      0xf9b100,    0xfffd10,    0,    FMT_D6, AM33_2,  {FDM1, MEMINC (RM0)}},
+{ "fmov",      0xf9b400,    0xfffd1f,    0,    FMT_D6, AM33_2,  {FDM1, MEM (SP)}},
+{ "fmov",      0xf9b500,    0xffff0f,    0,    FMT_D6, AM33_2,  {RM2, FPCR}},
+{ "fmov",      0xf9b700,    0xfffff0,    0,    FMT_D6, AM33_2,  {FPCR, RM0}},
+{ "fmov",      0xf9c000,    0xfffc11,    0,    FMT_D6, AM33_2,  {FDM1, FDM0}},
+{ "fmov",      0xfb200000,  0xfffe0000,  0,    FMT_D7, AM33_2, {MEM2 (SD8, RM2), FSM2}},
+{ "fmov",      0xfb220000,  0xfffe0000,  0,    FMT_D7, AM33_2, {MEMINC2 (RM2, SIMM8), FSM2}},
+{ "fmov",      0xfb240000,  0xfffef000,  0,    FMT_D7, AM33_2, {MEM2 (IMM8, SP), FSM2}},
+{ "fmov",      0xfb270000,  0xffff000d,  0,    FMT_D7, AM33_2, {MEM2 (RI, RM0), FSN1}},
+{ "fmov",      0xfb300000,  0xfffd0000,  0,    FMT_D7, AM33_2, {FSM3, MEM2 (SD8, RM0)}},
+{ "fmov",      0xfb310000,  0xfffd0000,  0,    FMT_D7, AM33_2, {FSM3, MEMINC2 (RM0, SIMM8)}},
+{ "fmov",      0xfb340000,  0xfffd0f00,  0,    FMT_D7, AM33_2, {FSM3, MEM2 (IMM8, SP)}},
+{ "fmov",      0xfb370000,  0xffff000d,  0,    FMT_D7, AM33_2, {FSN1, MEM2(RI, RM0)}},
+  /* FIXME: the spec doesn't say the fd register must be even for the
+   * next two insns.  Assuming it was a mistake in the spec.  */
+{ "fmov",      0xfb470000,  0xffff001d,  0,    FMT_D7, AM33_2, {MEM2 (RI, RM0), FDN1}},
+{ "fmov",      0xfb570000,  0xffff001d,  0,    FMT_D7, AM33_2, {FDN1, MEM2(RI, RM0)}},
+  /* END of FIXME */
+{ "fmov",      0xfba00000,  0xfffe0100,  0,    FMT_D7, AM33_2, {MEM2 (SD8, RM2), FDM2}},
+{ "fmov",      0xfba20000,  0xfffe0100,  0,    FMT_D7, AM33_2, {MEMINC2 (RM2, SIMM8), FDM2}},
+{ "fmov",      0xfba40000,  0xfffef100,  0,    FMT_D7, AM33_2, {MEM2 (IMM8, SP), FDM2}},
+{ "fmov",      0xfbb00000,  0xfffd1000,  0,    FMT_D7, AM33_2, {FDM3, MEM2 (SD8, RM0)}},
+{ "fmov",      0xfbb10000,  0xfffd1000,  0,    FMT_D7, AM33_2, {FDM3, MEMINC2 (RM0, SIMM8)}},
+{ "fmov",      0xfbb40000,  0xfffd1f00,  0,    FMT_D7, AM33_2, {FDM3, MEM2 (IMM8, SP)}},
+{ "fmov",      0xfd200000,  0xfffe0000,  0,    FMT_D8, AM33_2, {MEM2 (SIMM24, RM2), FSM2}},
+{ "fmov",      0xfd220000,  0xfffe0000,  0,    FMT_D8, AM33_2, {MEMINC2 (RM2, SIMM24), FSM2}},
+{ "fmov",      0xfd240000,  0xfffef000,  0,    FMT_D8, AM33_2, {MEM2 (IMM24, SP), FSM2}},
+{ "fmov",      0xfd300000,  0xfffd0000,  0,    FMT_D8, AM33_2, {FSM3, MEM2 (SIMM24, RM0)}},
+{ "fmov",      0xfd310000,  0xfffd0000,  0,    FMT_D8, AM33_2, {FSM3, MEMINC2 (RM0, SIMM24)}},
+{ "fmov",      0xfd340000,  0xfffd0f00,  0,    FMT_D8, AM33_2, {FSM3, MEM2 (IMM24, SP)}},
+{ "fmov",      0xfda00000,  0xfffe0100,  0,    FMT_D8, AM33_2, {MEM2 (SIMM24, RM2), FDM2}},
+{ "fmov",      0xfda20000,  0xfffe0100,  0,    FMT_D8, AM33_2, {MEMINC2 (RM2, SIMM24), FDM2}},
+{ "fmov",      0xfda40000,  0xfffef100,  0,    FMT_D8, AM33_2, {MEM2 (IMM24, SP), FDM2}},
+{ "fmov",      0xfdb00000,  0xfffd1000,  0,    FMT_D8, AM33_2, {FDM3, MEM2 (SIMM24, RM0)}},
+{ "fmov",      0xfdb10000,  0xfffd1000,  0,    FMT_D8, AM33_2, {FDM3, MEMINC2 (RM0, SIMM24)}},
+{ "fmov",      0xfdb40000,  0xfffd1f00,  0,    FMT_D8, AM33_2, {FDM3, MEM2 (IMM24, SP)}},
+{ "fmov",      0xfdb50000,  0xffff0000,  0,    FMT_D4, AM33_2, {IMM32, FPCR}},
+{ "fmov",      0xfe200000,  0xfffe0000,  0,    FMT_D9, AM33_2, {MEM2 (IMM32_HIGH8, RM2), FSM2}},
+{ "fmov",      0xfe220000,  0xfffe0000,  0,    FMT_D9, AM33_2, {MEMINC2 (RM2, IMM32_HIGH8), FSM2}},
+{ "fmov",      0xfe240000,  0xfffef000,  0,    FMT_D9, AM33_2, {MEM2 (IMM32_HIGH8, SP), FSM2}},
+{ "fmov",      0xfe260000,  0xfffef000,  0,    FMT_D9, AM33_2, {IMM32_HIGH8, FSM2}},
+{ "fmov",      0xfe300000,  0xfffd0000,  0,    FMT_D9, AM33_2, {FSM3, MEM2 (IMM32_HIGH8, RM0)}},
+{ "fmov",      0xfe310000,  0xfffd0000,  0,    FMT_D9, AM33_2, {FSM3, MEMINC2 (RM0, IMM32_HIGH8)}},
+{ "fmov",      0xfe340000,  0xfffd0f00,  0,    FMT_D9, AM33_2, {FSM3, MEM2 (IMM32_HIGH8, SP)}},
+{ "fmov",      0xfe400000,  0xfffe0100,  0,    FMT_D9, AM33_2, {MEM2 (IMM32_HIGH8, RM2), FDM2}},
+{ "fmov",      0xfe420000,  0xfffe0100,  0,    FMT_D9, AM33_2, {MEMINC2 (RM2, IMM32_HIGH8), FDM2}},
+{ "fmov",      0xfe440000,  0xfffef100,  0,    FMT_D9, AM33_2, {MEM2 (IMM32_HIGH8, SP), FDM2}},
+{ "fmov",      0xfe500000,  0xfffd1000,  0,    FMT_D9, AM33_2, {FDM3, MEM2 (IMM32_HIGH8, RM0)}},
+{ "fmov",      0xfe510000,  0xfffd1000,  0,    FMT_D9, AM33_2, {FDM3, MEMINC2 (RM0, IMM32_HIGH8)}},
+{ "fmov",      0xfe540000,  0xfffd1f00,  0,    FMT_D9, AM33_2, {FDM3, MEM2 (IMM32_HIGH8, SP)}},
+
+  /* FIXME: these are documented in the instruction bitmap, but not in
+   * the instruction manual.  */
+{ "ftoi",      0xfb400000,  0xffff0f05,  0,    FMT_D10,AM33_2,  {FSN3, FSN1}},
+{ "itof",      0xfb420000,  0xffff0f05,  0,    FMT_D10,AM33_2,  {FSN3, FSN1}},
+{ "ftod",      0xfb520000,  0xffff0f15,  0,    FMT_D10,AM33_2,  {FSN3, FDN1}},
+{ "dtof",      0xfb560000,  0xffff1f05,  0,    FMT_D10,AM33_2,  {FDN3, FSN1}},
+  /* END of FIXME */
+
+{ "fabs",      0xfb440000,  0xffff0f05,  0,    FMT_D10,AM33_2,  {FSN3, FSN1}},
+{ "fabs",      0xfbc40000,  0xffff1f15,  0,    FMT_D10,AM33_2,  {FDN3, FDN1}},
+{ "fabs",      0xf94400,    0xfffef0,    0,    FMT_D6, AM33_2,  {FSM0}},
+{ "fabs",      0xf9c400,    0xfffef1,    0,    FMT_D6, AM33_2,  {FDM0}},
+
+{ "fneg",      0xfb460000,  0xffff0f05,  0,    FMT_D10,AM33_2,  {FSN3, FSN1}},
+{ "fneg",      0xfbc60000,  0xffff1f15,  0,    FMT_D10,AM33_2,  {FDN3, FDN1}},
+{ "fneg",      0xf94600,    0xfffef0,    0,    FMT_D6, AM33_2,  {FSM0}},
+{ "fneg",      0xf9c600,    0xfffef1,    0,    FMT_D6, AM33_2,  {FDM0}},
+
+{ "frsqrt",    0xfb500000,  0xffff0f05,  0,    FMT_D10,AM33_2,  {FSN3, FSN1}},
+{ "frsqrt",    0xfbd00000,  0xffff1f15,  0,    FMT_D10,AM33_2,  {FDN3, FDN1}},
+{ "frsqrt",    0xf95000,    0xfffef0,    0,    FMT_D6, AM33_2,  {FSM0}},
+{ "frsqrt",    0xf9d000,    0xfffef1,    0,    FMT_D6, AM33_2,  {FDM0}},
+
+  /* FIXME: this is documented in the instruction bitmap, but not in
+   * the instruction manual.  */
+{ "fsqrt",     0xfb540000,  0xffff0f05,  0,    FMT_D10,AM33_2,  {FSN3, FSN1}},
+{ "fsqrt",     0xfbd40000,  0xffff1f15,  0,    FMT_D10,AM33_2,  {FDN3, FDN1}},
+{ "fsqrt",     0xf95200,    0xfffef0,    0,    FMT_D6, AM33_2,  {FSM0}},
+{ "fsqrt",     0xf9d200,    0xfffef1,    0,    FMT_D6, AM33_2,  {FDM0}},
+  /* END of FIXME */
+
+{ "fcmp",      0xf95400,    0xfffc00,    0,    FMT_D6, AM33_2,  {FSM1, FSM0}},
+{ "fcmp",      0xf9d400,    0xfffc11,    0,    FMT_D6, AM33_2,  {FDM1, FDM0}},
+{ "fcmp",      0xfe350000,  0xfffd0f00,  0,    FMT_D9, AM33_2,  {IMM32_HIGH8, FSM3}},
+
+{ "fadd",      0xfb600000,  0xffff0001,  0,    FMT_D10,AM33_2,  {FSN3, FSN2, FSN1}},
+{ "fadd",      0xfbe00000,  0xffff1111,  0,    FMT_D10,AM33_2,  {FDN3, FDN2, FDN1}},
+{ "fadd",      0xf96000,    0xfffc00,    0,    FMT_D6, AM33_2,  {FSM1, FSM0}},
+{ "fadd",      0xf9e000,    0xfffc11,    0,    FMT_D6, AM33_2,  {FDM1, FDM0}},
+{ "fadd",      0xfe600000,  0xfffc0000,  0,    FMT_D9, AM33_2,  {IMM32_HIGH8, FSM3, FSM2}},
+
+{ "fsub",      0xfb640000,  0xffff0001,  0,    FMT_D10,AM33_2,  {FSN3, FSN2, FSN1}},
+{ "fsub",      0xfbe40000,  0xffff1111,  0,    FMT_D10,AM33_2,  {FDN3, FDN2, FDN1}},
+{ "fsub",      0xf96400,    0xfffc00,    0,    FMT_D6, AM33_2,  {FSM1, FSM0}},
+{ "fsub",      0xf9e400,    0xfffc11,    0,    FMT_D6, AM33_2,  {FDM1, FDM0}},
+{ "fsub",      0xfe640000,  0xfffc0000,  0,    FMT_D9, AM33_2,  {IMM32_HIGH8, FSM3, FSM2}},
+
+{ "fmul",      0xfb700000,  0xffff0001,  0,    FMT_D10,AM33_2,  {FSN3, FSN2, FSN1}},
+{ "fmul",      0xfbf00000,  0xffff1111,  0,    FMT_D10,AM33_2,  {FDN3, FDN2, FDN1}},
+{ "fmul",      0xf97000,    0xfffc00,    0,    FMT_D6, AM33_2,  {FSM1, FSM0}},
+{ "fmul",      0xf9f000,    0xfffc11,    0,    FMT_D6, AM33_2,  {FDM1, FDM0}},
+{ "fmul",      0xfe700000,  0xfffc0000,  0,    FMT_D9, AM33_2,  {IMM32_HIGH8, FSM3, FSM2}},
+
+{ "fdiv",      0xfb740000,  0xffff0001,  0,    FMT_D10,AM33_2,  {FSN3, FSN2, FSN1}},
+{ "fdiv",      0xfbf40000,  0xffff1111,  0,    FMT_D10,AM33_2,  {FDN3, FDN2, FDN1}},
+{ "fdiv",      0xf97400,    0xfffc00,    0,    FMT_D6, AM33_2,  {FSM1, FSM0}},
+{ "fdiv",      0xf9f400,    0xfffc11,    0,    FMT_D6, AM33_2,  {FDM1, FDM0}},
+{ "fdiv",      0xfe740000,  0xfffc0000,  0,    FMT_D9, AM33_2,  {IMM32_HIGH8, FSM3, FSM2}},
+
+{ "fmadd",     0xfb800000,  0xfffc0000,  0,    FMT_D10,AM33_2,  {FSN3, FSN2, FSN1, FSACC}},
+{ "fmsub",     0xfb840000,  0xfffc0000,  0,    FMT_D10,AM33_2,  {FSN3, FSN2, FSN1, FSACC}},
+{ "fnmadd",    0xfb900000,  0xfffc0000,  0,    FMT_D10,AM33_2,  {FSN3, FSN2, FSN1, FSACC}},
+{ "fnmsub",    0xfb940000,  0xfffc0000,  0,    FMT_D10,AM33_2,  {FSN3, FSN2, FSN1, FSACC}},
+
 /* UDF instructions.  */
 { "udf00",     0xf600,      0xfff0,      0,    FMT_D0, 0,      {DM1, DN0}},
 { "udf00",     0xf90000,    0xfffc00,    0,    FMT_D1, 0,      {SIMM8, DN0}},
index 1ed436a0d0aa3d86e9e36773a60801295da7bfd0..af6c445a5615abff56b18dd78e91cb59534df215 100644 (file)
@@ -347,6 +347,10 @@ const struct mips_arch_choice mips_arch_choices[] = {
     mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
   { "r6000",   1, bfd_mach_mips6000, CPU_R6000, ISA_MIPS2,
     mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+  { "rm7000",  1, bfd_mach_mips7000, CPU_RM7000, ISA_MIPS4,
+    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
+  { "rm9000",  1, bfd_mach_mips7000, CPU_RM7000, ISA_MIPS4,
+    mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
   { "r8000",   1, bfd_mach_mips8000, CPU_R8000, ISA_MIPS4,
     mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
   { "r10000",  1, bfd_mach_mips10000, CPU_R10000, ISA_MIPS4,
@@ -495,11 +499,11 @@ set_default_mips_dis_options (info)
   mips_hwr_names = mips_hwr_names_numeric;
 
   /* If an ELF "newabi" binary, use the n32/(n)64 GPR names.  */
-  if (info->flavour == bfd_target_elf_flavour && info->symbols != NULL)
+  if (info->flavour == bfd_target_elf_flavour && info->section != NULL)
     {
       Elf_Internal_Ehdr *header;
 
-      header = elf_elfheader (bfd_asymbol_bfd (*(info->symbols)));
+      header = elf_elfheader (info->section->owner);
       if (is_newabi (header))
        mips_gpr_names = mips_gpr_names_newabi;
     }
index df9060ef8a519d516a317acc0b0c78526e172e9e..f16a87b428e0e6f64431861836449aaf018cadc6 100644 (file)
@@ -16,8 +16,8 @@ d10v-dis.c
 d10v-opc.c
 d30v-dis.c
 d30v-opc.c
-dis-buf.c
 disassemble.c
+dis-buf.c
 dlx-dis.c
 fr30-asm.c
 fr30-desc.c
@@ -48,12 +48,12 @@ ia64-dis.c
 ia64-gen.c
 ia64-opc-a.c
 ia64-opc-b.c
+ia64-opc.c
 ia64-opc-d.c
 ia64-opc-f.c
+ia64-opc.h
 ia64-opc-i.c
 ia64-opc-m.c
-ia64-opc.c
-ia64-opc.h
 ip2k-asm.c
 ip2k-desc.c
 ip2k-desc.h
@@ -87,9 +87,9 @@ m68k-opc.c
 m88k-dis.c
 mcore-dis.c
 mcore-opc.h
+mips16-opc.c
 mips-dis.c
 mips-opc.c
-mips16-opc.c
 mmix-dis.c
 mmix-opc.c
 ns32k-dis.c
@@ -111,11 +111,11 @@ ppc-opc.c
 s390-dis.c
 s390-mkopc.c
 s390-opc.c
-sh-dis.c
-sh-opc.h
 sh64-dis.c
 sh64-opc.c
 sh64-opc.h
+sh-dis.c
+sh-opc.h
 sparc-dis.c
 sparc-opc.c
 sysdep.h
@@ -139,5 +139,5 @@ xstormy16-opc.c
 xstormy16-opc.h
 xtensa-dis.c
 z8k-dis.c
-z8k-opc.h
 z8kgen.c
+z8k-opc.h
index 4ee0c9935cd27d002585fb6d010e603b58e417d1..f94b9673c3735835644cb8c6634efade795155f3 100644 (file)
@@ -1,12 +1,12 @@
-# Mensajes en español para opcodes-2.12.91
-# Copyright (C) 2002 Free Software Foundation, Inc.
-# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2002.
+# Mensajes en español para opcodes-2.14rel030712.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2002, 2003.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.12.91\n"
-"POT-Creation-Date: 2002-07-23 15:55-0400\n"
-"PO-Revision-Date: 2002-07-24 02:03-0500\n"
+"Project-Id-Version: opcodes 2.14rel030712\n"
+"POT-Creation-Date: 2003-07-11 13:56+0930\n"
+"PO-Revision-Date: 2003-07-14 18:57-0500\n"
 "Last-Translator: Cristian Othón Martínez Vera <cfuga@itam.mx>\n"
 "Language-Team: Spanish <es@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -25,21 +25,21 @@ msgstr "pista de salto sin alinear"
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "¡Referencia limm ilegal en la última instrucción!\n"
 
-#: arm-dis.c:507
+#: arm-dis.c:554
 msgid "<illegal precision>"
 msgstr "<precisión ilegal>"
 
-#: arm-dis.c:1010
+#: arm-dis.c:1162
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Conjunto de nombres de registro no reconocido: %s\n"
 
-#: arm-dis.c:1017
+#: arm-dis.c:1169
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
 msgstr "Opción de desensamblador no reconocida: %s\n"
 
-#: arm-dis.c:1191
+#: arm-dis.c:1343
 msgid ""
 "\n"
 "The following ARM specific disassembler options are supported for use with\n"
@@ -49,26 +49,26 @@ msgstr ""
 "Las siguientes opciones de desensamblador específicas de ARM tienen soporte\n"
 "para su uso con el interruptor -M:\n"
 
-#: avr-dis.c:118 avr-dis.c:128
+#: avr-dis.c:117 avr-dis.c:127
 msgid "undefined"
 msgstr "sin definir"
 
-#: avr-dis.c:180
+#: avr-dis.c:179
 msgid "Internal disassembler error"
 msgstr "Error interno del desensamblador"
 
-#: avr-dis.c:228
+#: avr-dis.c:227
 #, c-format
 msgid "unknown constraint `%c'"
 msgstr "restricción `%c' desconocida"
 
-#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
-#: openrisc-ibld.c:195 xstormy16-ibld.c:195
+#: cgen-asm.c:348 fr30-ibld.c:195 frv-ibld.c:195 ip2k-ibld.c:195
+#: iq2000-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr "operando fuera de rango (%ld no está entre %ld y %ld)"
 
-#: cgen-asm.c:367
+#: cgen-asm.c:369
 #, c-format
 msgid "operand out of range (%lu not between %lu and %lu)"
 msgstr "operando fuera de rango (%lu no está entre %lu y %lu)"
@@ -89,129 +89,135 @@ msgstr "Error desconocido %d\n"
 msgid "Address 0x%x is out of bounds.\n"
 msgstr "La dirección 0x%x está fuera de los límites.\n"
 
-#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
-#: xstormy16-asm.c:231
+#: fr30-asm.c:323 frv-asm.c:626 ip2k-asm.c:574 iq2000-asm.c:460 m32r-asm.c:325
+#: openrisc-asm.c:261 xstormy16-asm.c:284
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr "No se reconoció el campo %d durante la decodificación.\n"
 
-#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
-#: xstormy16-asm.c:281
+#: fr30-asm.c:373 frv-asm.c:676 ip2k-asm.c:624 iq2000-asm.c:510 m32r-asm.c:375
+#: openrisc-asm.c:311 xstormy16-asm.c:334
 msgid "missing mnemonic in syntax string"
 msgstr "falta el mnemónico en la cadena sintáctica"
 
 #. We couldn't parse it.
-#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
-#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
-#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
-#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
-#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:812
+#: frv-asm.c:816 frv-asm.c:903 frv-asm.c:1005 ip2k-asm.c:760 ip2k-asm.c:764
+#: ip2k-asm.c:851 ip2k-asm.c:953 iq2000-asm.c:646 iq2000-asm.c:650
+#: iq2000-asm.c:737 iq2000-asm.c:839 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:447 openrisc-asm.c:451
+#: openrisc-asm.c:538 openrisc-asm.c:640 xstormy16-asm.c:470
+#: xstormy16-asm.c:474 xstormy16-asm.c:561 xstormy16-asm.c:663
 msgid "unrecognized instruction"
 msgstr "instrucción no reconocida"
 
-#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
-#: xstormy16-asm.c:464
+#: fr30-asm.c:556 frv-asm.c:859 ip2k-asm.c:807 iq2000-asm.c:693 m32r-asm.c:558
+#: openrisc-asm.c:494 xstormy16-asm.c:517
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "error sintáctico (se esperaba el carácter `%c', se encontró `%c')"
 
-#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
-#: xstormy16-asm.c:474
+#: fr30-asm.c:566 frv-asm.c:869 ip2k-asm.c:817 iq2000-asm.c:703 m32r-asm.c:568
+#: openrisc-asm.c:504 xstormy16-asm.c:527
 #, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
 msgstr "error sintáctico (se esperaba el carácter `%c', se encontró el final de la instrucción)"
 
-#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
-#: xstormy16-asm.c:502
+#: fr30-asm.c:594 frv-asm.c:897 ip2k-asm.c:845 iq2000-asm.c:731 m32r-asm.c:596
+#: openrisc-asm.c:532 xstormy16-asm.c:555
 msgid "junk at end of line"
 msgstr "basura al final de la línea"
 
-#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
-#: xstormy16-asm.c:609
+#: fr30-asm.c:701 frv-asm.c:1004 ip2k-asm.c:952 iq2000-asm.c:838
+#: m32r-asm.c:703 openrisc-asm.c:639 xstormy16-asm.c:662
 msgid "unrecognized form of instruction"
 msgstr "forma de instrucción no reconocida"
 
-#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
-#: xstormy16-asm.c:621
+#: fr30-asm.c:713 frv-asm.c:1016 ip2k-asm.c:964 iq2000-asm.c:850
+#: m32r-asm.c:715 openrisc-asm.c:651 xstormy16-asm.c:674
 #, c-format
 msgid "bad instruction `%.50s...'"
 msgstr "instrucción errónea `%.50s...'"
 
-#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
-#: xstormy16-asm.c:624
+#: fr30-asm.c:716 frv-asm.c:1019 ip2k-asm.c:967 iq2000-asm.c:853
+#: m32r-asm.c:718 openrisc-asm.c:654 xstormy16-asm.c:677
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr "instrucción errónea `%.50s'"
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
-#: xstormy16-dis.c:39
+#: fr30-dis.c:41 frv-dis.c:41 ip2k-dis.c:41 iq2000-dis.c:41 m32r-dis.c:41
+#: mmix-dis.c:284 openrisc-dis.c:41 xstormy16-dis.c:41
 msgid "*unknown*"
 msgstr "*desconocida*"
 
-#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
-#: xstormy16-dis.c:169
+#: fr30-dis.c:320 frv-dis.c:371 ip2k-dis.c:329 iq2000-dis.c:192 m32r-dis.c:251
+#: openrisc-dis.c:138 xstormy16-dis.c:171
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
 msgstr "No se reconoció el campo %d al mostrar insn.\n"
 
-#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
-#: xstormy16-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 ip2k-ibld.c:166 iq2000-ibld.c:166
+#: m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
 #, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
 msgstr "operando fuera de rango (%ld no está entre %ld y %lu)"
 
-#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
-#: xstormy16-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 ip2k-ibld.c:179 iq2000-ibld.c:179
+#: m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr "operando fuera de rango (%lu no está entre 0 y %lu)"
 
-#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
-#: xstormy16-ibld.c:678
+#: fr30-ibld.c:730 frv-ibld.c:829 ip2k-ibld.c:607 iq2000-ibld.c:713
+#: m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr "No se reconoció el campo %d al construir insn.\n"
 
-#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
-#: xstormy16-ibld.c:826
+#: fr30-ibld.c:937 frv-ibld.c:1121 ip2k-ibld.c:684 iq2000-ibld.c:890
+#: m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr "No se reconoció el campo %d al decodificar insn.\n"
 
-#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
-#: xstormy16-ibld.c:939
+#: fr30-ibld.c:1086 frv-ibld.c:1375 ip2k-ibld.c:761 iq2000-ibld.c:1024
+#: m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr "No se reconoció el campo %d al obtener el operando int.\n"
 
-#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
-#: xstormy16-ibld.c:1032
+#: fr30-ibld.c:1215 frv-ibld.c:1609 ip2k-ibld.c:818 iq2000-ibld.c:1138
+#: m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr "No se reconoció el campo %d al obtener el operando vma.\n"
 
-#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
-#: xstormy16-ibld.c:1134
+#: fr30-ibld.c:1349 frv-ibld.c:1852 ip2k-ibld.c:880 iq2000-ibld.c:1261
+#: m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr "No se reconoció el campo %d al establecer el operando int.\n"
 
-#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
-#: xstormy16-ibld.c:1224
+#: fr30-ibld.c:1471 frv-ibld.c:2083 ip2k-ibld.c:930 iq2000-ibld.c:1372
+#: m32r-ibld.c:1176 openrisc-ibld.c:1001 xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr "No se reconoció el campo %d al establecer el operando vma.\n"
 
-#: h8300-dis.c:385
+#: frv-asm.c:365
+msgid "register number must be even"
+msgstr "el número de registro debe ser par"
+
+#: h8300-dis.c:377
 #, c-format
-msgid "Hmmmm %x"
-msgstr "Hmmmm %x"
+msgid "Hmmmm 0x%x"
+msgstr "Hmmmm 0x%x"
 
-#: h8300-dis.c:396
+#: h8300-dis.c:760
 #, c-format
-msgid "Don't understand %x \n"
-msgstr "No se entiende %x \n"
+msgid "Don't understand 0x%x \n"
+msgstr "No se entiende 0x%x \n"
 
 #: h8500-dis.c:143
 #, c-format
@@ -224,10 +230,188 @@ msgstr "no se puede lidiar con insert %d\n"
 msgid "%02x\t\t*unknown*"
 msgstr "%02x\t\t*desconocido*"
 
-#: i386-dis.c:1649
+#: i386-dis.c:1699
 msgid "<internal disassembler error>"
 msgstr "<error interno del desensamblador>"
 
+#: ia64-gen.c:295
+#, c-format
+msgid "%s: Error: "
+msgstr "%s: Error: "
+
+#: ia64-gen.c:308
+#, c-format
+msgid "%s: Warning: "
+msgstr "%s: Aviso: "
+
+#: ia64-gen.c:494 ia64-gen.c:728
+#, c-format
+msgid "multiple note %s not handled\n"
+msgstr "la nota múltiple %s no se maneja\n"
+
+#: ia64-gen.c:605
+msgid "can't find ia64-ic.tbl for reading\n"
+msgstr "no se puede encontrar ia64-ic.tbl para lectura\n"
+
+#: ia64-gen.c:810
+#, c-format
+msgid "can't find %s for reading\n"
+msgstr "no se puede encontrar %s para lectura\n"
+
+#: ia64-gen.c:1034
+#, c-format
+msgid ""
+"most recent format '%s'\n"
+"appears more restrictive than '%s'\n"
+msgstr ""
+"el formato más reciente '%s'\n"
+"parece más restrictivo que '%s'\n"
+
+#: ia64-gen.c:1045
+#, c-format
+msgid "overlapping field %s->%s\n"
+msgstr "campo solapado %s->%s\n"
+
+#: ia64-gen.c:1236
+#, c-format
+msgid "overwriting note %d with note %d (IC:%s)\n"
+msgstr "se sobreescribe la nota %d con la nota %d (IC:%s)\n"
+
+#: ia64-gen.c:1435
+#, c-format
+msgid "don't know how to specify %% dependency %s\n"
+msgstr "no se sabe cómo especificar la dependencia %% %s\n"
+
+#: ia64-gen.c:1457
+#, c-format
+msgid "Don't know how to specify # dependency %s\n"
+msgstr "No se sabe cómo especificar la dependencia # %s\n"
+
+#: ia64-gen.c:1496
+#, c-format
+msgid "IC:%s [%s] has no terminals or sub-classes\n"
+msgstr "IC:%s [%s] no tiene terminales o sub-clases\n"
+
+#: ia64-gen.c:1499
+#, c-format
+msgid "IC:%s has no terminals or sub-classes\n"
+msgstr "IC:%s no tiene terminales o sub-clases\n"
+
+#: ia64-gen.c:1508
+#, c-format
+msgid "no insns mapped directly to terminal IC %s [%s]"
+msgstr "no hay insns mapeadas directamente al IC terminal %s [%s]"
+
+#: ia64-gen.c:1511
+#, c-format
+msgid "no insns mapped directly to terminal IC %s\n"
+msgstr "no hay insns mapeadas directamente al IC terminal %s\n"
+
+#: ia64-gen.c:1522
+#, c-format
+msgid "class %s is defined but not used\n"
+msgstr "se define la clase %s pero no se utiliza\n"
+
+#: ia64-gen.c:1533
+#, c-format
+msgid "Warning: rsrc %s (%s) has no chks%s\n"
+msgstr "Aviso: el rsrc %s (%s) no tiene chks%s\n"
+
+#: ia64-gen.c:1537
+#, c-format
+msgid "rsrc %s (%s) has no regs\n"
+msgstr "el rsrc %s (%s) no tiene registros\n"
+
+#: ia64-gen.c:2436
+#, c-format
+msgid "IC note %d in opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr "la nota IC %d en el código de operación %s (IC:%s) tiene conflictos con el recurso %s nota %d\n"
+
+#: ia64-gen.c:2464
+#, c-format
+msgid "IC note %d for opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr "la nota IC %d para el código de operación %s (IC:%s) tiene conflictos con el recurso %s nota %d\n"
+
+#: ia64-gen.c:2478
+#, c-format
+msgid "opcode %s has no class (ops %d %d %d)\n"
+msgstr "el código de operación %s no tiene clase (ops %d %d %d)\n"
+
+#: ia64-gen.c:2789
+#, c-format
+msgid "unable to change directory to \"%s\", errno = %s\n"
+msgstr "no se puede cambiar el directorio a \"%s\", errno = %s\n"
+
+#. We've been passed a w.  Return with an error message so that
+#. cgen will try the next parsing option.
+#: ip2k-asm.c:92
+msgid "W keyword invalid in FR operand slot."
+msgstr "la palabra clave W es inválida en la ranura del operando FR."
+
+#. Invalid offset present.
+#: ip2k-asm.c:122
+msgid "offset(IP) is not a valid form"
+msgstr "el desplazamiento(IP) no es una forma válida"
+
+#. Found something there in front of (DP) but it's out
+#. of range.
+#: ip2k-asm.c:175
+msgid "(DP) offset out of range."
+msgstr "desplazamiento (DP) fuera de rango."
+
+#. Found something there in front of (SP) but it's out
+#. of range.
+#: ip2k-asm.c:221
+msgid "(SP) offset out of range."
+msgstr "desplazamiento (SP) fuera de rango."
+
+#: ip2k-asm.c:241
+msgid "illegal use of parentheses"
+msgstr "uso ilegal de paréntesis"
+
+#: ip2k-asm.c:248
+msgid "operand out of range (not between 1 and 255)"
+msgstr "operando fuera de rango (no está entre 1 y 255)"
+
+#. Something is very wrong. opindex has to be one of the above.
+#: ip2k-asm.c:273
+msgid "parse_addr16: invalid opindex."
+msgstr "parse_addr16: índice de operador inválido."
+
+#: ip2k-asm.c:353
+msgid "Byte address required. - must be even."
+msgstr "Se requiere una dirección de byte. - debe ser par."
+
+#: ip2k-asm.c:362
+msgid "cgen_parse_address returned a symbol. Literal required."
+msgstr "cgen_parse_address devolvió un símbolo. Se requiere una literal."
+
+#: ip2k-asm.c:420
+#, c-format
+msgid "%operator operand is not a symbol"
+msgstr "el operando %operator no es un símbolo"
+
+#: ip2k-asm.c:474
+msgid "Attempt to find bit index of 0"
+msgstr "Se intentó encontrar un índice de bit de 0"
+
+#: iq2000-asm.c:110 iq2000-asm.c:141
+msgid "immediate value cannot be register"
+msgstr "el valor inmediato no puede ser un registro"
+
+#: iq2000-asm.c:120 iq2000-asm.c:151
+msgid "immediate value out of range"
+msgstr "el valor inmediato está fuera de rango"
+
+#: iq2000-asm.c:180
+msgid "21-bit offset out of range"
+msgstr "desplazamiento de 21-bit fuera de rango"
+
+#: iq2000-asm.c:205 iq2000-asm.c:235 iq2000-asm.c:272 iq2000-asm.c:305
+#: openrisc-asm.c:96 openrisc-asm.c:155
+msgid "missing `)'"
+msgstr "falta un `)'"
+
 #: m10200-dis.c:199
 #, c-format
 msgid "unknown\t0x%02x"
@@ -238,7 +422,7 @@ msgstr "desconocido\t0x%02x"
 msgid "unknown\t0x%04lx"
 msgstr "desconocido\t0x%04lx"
 
-#: m10300-dis.c:685
+#: m10300-dis.c:766
 #, c-format
 msgid "unknown\t0x%04x"
 msgstr "desconocido\t0x%04x"
@@ -253,21 +437,128 @@ msgstr "<error interno en la tabla de c
 msgid "<function code %d>"
 msgstr "<código de función %d>"
 
-#: m88k-dis.c:255
+#: m88k-dis.c:746
 #, c-format
 msgid "# <dis error: %08x>"
 msgstr "# <error de desensamblador: %08x>"
 
-#: mips-dis.c:337
+#: mips-dis.c:699
+msgid "# internal error, incomplete extension sequence (+)"
+msgstr "# error interno, secuencia de extensión incompleta (+)"
+
+#: mips-dis.c:742
+#, c-format
+msgid "# internal error, undefined extension sequence (+%c)"
+msgstr "# error interno, secuencia de extensión sin definir (+%c)"
+
+#: mips-dis.c:1000
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr "# error interno, modificador(%c) sin definir"
 
-#: mips-dis.c:1209
+#: mips-dis.c:1751
 #, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
 msgstr "# error interno del desensamblador, modificador (%c) no reconocido"
 
+#: mips-dis.c:1763
+msgid ""
+"\n"
+"The following MIPS specific disassembler options are supported for use\n"
+"with the -M switch (multiple options should be separated by commas):\n"
+msgstr ""
+"\n"
+"Las siguientes opciones de desensamblador específicas de MIPS tienen soporte\n"
+"para su uso con el interruptor -M (las opciones múltiples se deben separar con comas):\n"
+
+#: mips-dis.c:1767
+msgid ""
+"\n"
+"  gpr-names=ABI            Print GPR names according to  specified ABI.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  gpr-names=ABI            Muestra los nombres GPR de acuerdo a la ABI especificada.\n"
+"                           Por omisión: basado en el binario a desensamblar.\n"
+
+#: mips-dis.c:1771
+msgid ""
+"\n"
+"  fpr-names=ABI            Print FPR names according to specified ABI.\n"
+"                           Default: numeric.\n"
+msgstr ""
+"\n"
+"  fpr-names=ABI            Muestra los nombres FPR de acuerdo a la ABI especificada.\n"
+"                           Por omisión: numérico.\n"
+
+#: mips-dis.c:1775
+msgid ""
+"\n"
+"  cp0-names=ARCH           Print CP0 register names according to\n"
+"                           specified architecture.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  cp0-names=ARCH           Muestra los nombres de registro CP0 de acuerdo a\n"
+"                           la arquitectura especificada.\n"
+"                           Por omisión: basado en el binario a desensamblar.\n"
+
+#: mips-dis.c:1780
+msgid ""
+"\n"
+"  hwr-names=ARCH           Print HWR names according to specified \n"
+"\t\t\t   architecture.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  hwr-names=ARCH           Muestra los nombres HWR de acuerdo a la arquitectura \n"
+"                           especificada.\n"
+"                           Por omisión: basado en el binario a desensamblar.\n"
+
+#: mips-dis.c:1785
+msgid ""
+"\n"
+"  reg-names=ABI            Print GPR and FPR names according to\n"
+"                           specified ABI.\n"
+msgstr ""
+"\n"
+"  reg-names=ABI            Muestra los nombres GPR y FPR de acuerdo a\n"
+"                           la ABI especificada.\n"
+
+#: mips-dis.c:1789
+msgid ""
+"\n"
+"  reg-names=ARCH           Print CP0 register and HWR names according to\n"
+"                           specified architecture.\n"
+msgstr ""
+"\n"
+"  reg-names=ARCH           Muestra el registro CP0 y los nombres HWR de acuerdo a\n"
+"                           la arquitectura especificada.\n"
+
+#: mips-dis.c:1793
+msgid ""
+"\n"
+"  For the options above, the following values are supported for \"ABI\":\n"
+"   "
+msgstr ""
+"\n"
+"  Para las opciones anteriores, se da soporte a los siguientes valores de \"ABI\":\n"
+"   "
+
+#: mips-dis.c:1798 mips-dis.c:1806 mips-dis.c:1808
+msgid "\n"
+msgstr "\n"
+
+#: mips-dis.c:1800
+msgid ""
+"\n"
+"  For the options above, The following values are supported for \"ARCH\":\n"
+"   "
+msgstr ""
+"\n"
+"  Para las opciones anteriores, se da soporte a los siguientes valores de \"ARCH\":\n"
+"   "
+
 #: mmix-dis.c:34
 #, c-format
 msgid "Bad case %d (%s) in %s:%d\n"
@@ -282,7 +573,7 @@ msgstr "Interno: C
 msgid "(unknown)"
 msgstr "(desconocido)"
 
-#: mmix-dis.c:517
+#: mmix-dis.c:519
 #, c-format
 msgid "*unknown operands type: %d*"
 msgstr "*tipo de operandos operandos desconocido: %d*"
@@ -293,76 +584,116 @@ msgstr "*tipo de operandos operandos desconocido: %d*"
 #. * aoffsetp by since whatever generated this is broken
 #. * anyway!
 #.
-#: ns32k-dis.c:628
+#: ns32k-dis.c:631
 msgid "$<undefined>"
 msgstr "$<sin definir>"
 
-#: ppc-opc.c:777 ppc-opc.c:810
+#: ppc-opc.c:781 ppc-opc.c:809
 msgid "invalid conditional option"
 msgstr "opción condicional inválida"
 
-#: ppc-opc.c:812
+#: ppc-opc.c:811
 msgid "attempt to set y bit when using + or - modifier"
 msgstr "intento de establecer el bit y cuando se usaba el modificador + ó -"
 
-#: ppc-opc.c:844 ppc-opc.c:896
+#: ppc-opc.c:840
+msgid "offset not a multiple of 16"
+msgstr "el desplazamiento no es un múltiplo de 16"
+
+#: ppc-opc.c:860
+msgid "offset not a multiple of 2"
+msgstr "el desplazamiento no es un múltiplo de 2"
+
+#: ppc-opc.c:862
+msgid "offset greater than 62"
+msgstr "el desplazamiento es mayor que 62"
+
+#: ppc-opc.c:881 ppc-opc.c:927 ppc-opc.c:975
 msgid "offset not a multiple of 4"
 msgstr "el desplazamiento no es un múltiplo de 4"
 
-#: ppc-opc.c:869
+#: ppc-opc.c:883
+msgid "offset greater than 124"
+msgstr "el desplazamiento es mayor que 124"
+
+#: ppc-opc.c:902
+msgid "offset not a multiple of 8"
+msgstr "el desplazamiento no es un múltiplo de 8"
+
+#: ppc-opc.c:904
+msgid "offset greater than 248"
+msgstr "el desplazamiento es mayor que 248"
+
+#: ppc-opc.c:950
 msgid "offset not between -2048 and 2047"
 msgstr "el desplazamiento no está entre -2048 y 2047"
 
-#: ppc-opc.c:894
+#: ppc-opc.c:973
 msgid "offset not between -8192 and 8191"
 msgstr "el desplazamiento no está entre -8192 y 8191"
 
-#: ppc-opc.c:922
+#: ppc-opc.c:1011
+msgid "ignoring invalid mfcr mask"
+msgstr "se ignora la máscara mfcr inválida"
+
+#: ppc-opc.c:1059
 msgid "ignoring least significant bits in branch offset"
 msgstr "ignorando los bits menos significativos en el desplazamiento de la rama"
 
-#: ppc-opc.c:956 ppc-opc.c:993
+#: ppc-opc.c:1090 ppc-opc.c:1125
 msgid "illegal bitmask"
 msgstr "máscara de bits ilegal"
 
-#: ppc-opc.c:1066
+#: ppc-opc.c:1192
 msgid "value out of range"
 msgstr "valor fuera de rango"
 
-#: ppc-opc.c:1142
+#: ppc-opc.c:1262
 msgid "index register in load range"
 msgstr "registro índice en el rango de carga"
 
-#: ppc-opc.c:1158
+#: ppc-opc.c:1279
+msgid "source and target register operands must be different"
+msgstr "los operandos de registros fuente y objetivo deben ser diferentes"
+
+#: ppc-opc.c:1294
 msgid "invalid register operand when updating"
 msgstr "operando de registro inválido mientras se actualizaba"
 
-#. Mark as non-valid instruction
-#: sparc-dis.c:750
+#: ppc-opc.c:1335
+msgid "target register operand must be even"
+msgstr "el operando de registro objetivo debe ser par"
+
+#: ppc-opc.c:1350
+msgid "source register operand must be even"
+msgstr "el operando de registro fuente debe ser par"
+
+#. Mark as non-valid instruction.
+#: sparc-dis.c:760
 msgid "unknown"
 msgstr "desconocida"
 
-#: sparc-dis.c:825
+#: sparc-dis.c:835
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Error interno:  sparc-opcode.h erróneo: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:836
+#: sparc-dis.c:846
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Error interno: sparc-opcode.h erróneo: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:885
+#: sparc-dis.c:895
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr "Error interno: sparc-opcode.h erróneo: \"%s\" == \"%s\"\n"
 
-#: v850-dis.c:224
+#: v850-dis.c:221
 #, c-format
 msgid "unknown operand shift: %x\n"
 msgstr "operando de desplazamiento desconocido: %x\n"
 
-#: v850-dis.c:236
+#: v850-dis.c:233
 #, c-format
 msgid "unknown pop reg: %d\n"
 msgstr "registro pop desconocido: %d\n"
@@ -416,33 +747,45 @@ msgstr "el valor inmediato no est
 msgid "immediate value must be even"
 msgstr "el valor inmediato debe ser par"
 
-#: xstormy16-asm.c:74
+#: xstormy16-asm.c:76
 msgid "Bad register in preincrement"
 msgstr "Registro erróneo en el preincremento"
 
-#: xstormy16-asm.c:79
+#: xstormy16-asm.c:81
 msgid "Bad register in postincrement"
 msgstr "Registro erróneo en el postincremento"
 
-#: xstormy16-asm.c:81
+#: xstormy16-asm.c:83
 msgid "Bad register name"
 msgstr "Nombre de registro erróneo"
 
-#: xstormy16-asm.c:85
+#: xstormy16-asm.c:87
 msgid "Label conflicts with register name"
 msgstr "La etiqueta tiene conflictos con el nombre de registro"
 
-#: xstormy16-asm.c:89
+#: xstormy16-asm.c:91
 msgid "Label conflicts with `Rx'"
 msgstr "La etiqueta tiene conflictos con `Rx'"
 
-#: xstormy16-asm.c:91
+#: xstormy16-asm.c:93
 msgid "Bad immediate expression"
 msgstr "Expresión inmediata errónea"
 
-#: xstormy16-asm.c:120
+#: xstormy16-asm.c:115
+msgid "No relocation for small immediate"
+msgstr "No hay reubicaciones para inmediatos small"
+
+#: xstormy16-asm.c:125
 msgid "Small operand was not an immediate number"
 msgstr "El operando small no era un número inmediato"
 
+#: xstormy16-asm.c:164
+msgid "Operand is not a symbol"
+msgstr "El operando no es un símbolo"
+
+#: xstormy16-asm.c:172
+msgid "Syntax error: No trailing ')'"
+msgstr "Error sintáctico: No hay ')' al final"
+
 #~ msgid "unrecognized keyword/register name"
 #~ msgstr "nombre clave/de registro no reconocido"
index b0ff20e1f60959a1e51b608fafb213ccd6a8a5e8..08ae66193a724e31ff66229a07cc2a93c1044ca4 100644 (file)
@@ -4,9 +4,9 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.12.91\n"
-"POT-Creation-Date: 2002-07-23 15:55-0400\n"
-"PO-Revision-Date: 2002-07-24 08:00-0500\n"
+"Project-Id-Version: opcodes 2.14rel030712\n"
+"POT-Creation-Date: 2003-07-11 13:56+0930\n"
+"PO-Revision-Date: 2003-07-22 08:00-0500\n"
 "Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
 "Language-Team: French <traduc@traduc.org>\n"
 "MIME-Version: 1.0\n"
@@ -25,21 +25,21 @@ msgstr "saut indic
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "Référence limite illégale dans la dernière instruction!\n"
 
-#: arm-dis.c:507
+#: arm-dis.c:554
 msgid "<illegal precision>"
 msgstr "<précision illégale>"
 
-#: arm-dis.c:1010
+#: arm-dis.c:1162
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Nom de jeu de registres inconnu: %s\n"
 
-#: arm-dis.c:1017
+#: arm-dis.c:1169
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
 msgstr "Option du désassembleur non reconnue: %s\n"
 
-#: arm-dis.c:1191
+#: arm-dis.c:1343
 msgid ""
 "\n"
 "The following ARM specific disassembler options are supported for use with\n"
@@ -49,26 +49,26 @@ msgstr ""
 "Les options spécifiques ARM suivantes sont supportées avec l'utilisation de\n"
 "l'option -M:\n"
 
-#: avr-dis.c:118 avr-dis.c:128
+#: avr-dis.c:117 avr-dis.c:127
 msgid "undefined"
 msgstr "non défini"
 
-#: avr-dis.c:180
+#: avr-dis.c:179
 msgid "Internal disassembler error"
 msgstr "Erreur interne du désassembleur"
 
-#: avr-dis.c:228
+#: avr-dis.c:227
 #, c-format
 msgid "unknown constraint `%c'"
 msgstr "contrainte inconnue « %c »"
 
-#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
-#: openrisc-ibld.c:195 xstormy16-ibld.c:195
+#: cgen-asm.c:348 fr30-ibld.c:195 frv-ibld.c:195 ip2k-ibld.c:195
+#: iq2000-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr "opérande hors gamme (%ld n'est pas entre %ld et %ld)"
 
-#: cgen-asm.c:367
+#: cgen-asm.c:369
 #, c-format
 msgid "operand out of range (%lu not between %lu and %lu)"
 msgstr "opérande hors gamme (%lu n'est pas entre %lu et %lu)"
@@ -89,130 +89,136 @@ msgstr "Erreur inconnue %d\n"
 msgid "Address 0x%x is out of bounds.\n"
 msgstr "Adresse 0x%x est hors gamme.\n"
 
-#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
-#: xstormy16-asm.c:231
+#: fr30-asm.c:323 frv-asm.c:626 ip2k-asm.c:574 iq2000-asm.c:460 m32r-asm.c:325
+#: openrisc-asm.c:261 xstormy16-asm.c:284
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr "Champ non reconnu %d lors de l'analyse.\n"
 
-#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
-#: xstormy16-asm.c:281
+#: fr30-asm.c:373 frv-asm.c:676 ip2k-asm.c:624 iq2000-asm.c:510 m32r-asm.c:375
+#: openrisc-asm.c:311 xstormy16-asm.c:334
 msgid "missing mnemonic in syntax string"
 msgstr "mnémonique manquante dans la syntaxe de la chaîne"
 
 #. We couldn't parse it.
-#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
-#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
-#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
-#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
-#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:812
+#: frv-asm.c:816 frv-asm.c:903 frv-asm.c:1005 ip2k-asm.c:760 ip2k-asm.c:764
+#: ip2k-asm.c:851 ip2k-asm.c:953 iq2000-asm.c:646 iq2000-asm.c:650
+#: iq2000-asm.c:737 iq2000-asm.c:839 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:447 openrisc-asm.c:451
+#: openrisc-asm.c:538 openrisc-asm.c:640 xstormy16-asm.c:470
+#: xstormy16-asm.c:474 xstormy16-asm.c:561 xstormy16-asm.c:663
 msgid "unrecognized instruction"
 msgstr "instruction non reconnue"
 
-#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
-#: xstormy16-asm.c:464
+#: fr30-asm.c:556 frv-asm.c:859 ip2k-asm.c:807 iq2000-asm.c:693 m32r-asm.c:558
+#: openrisc-asm.c:494 xstormy16-asm.c:517
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "erreur de syntaxe (caractère « %c » attendu,  « %c » obtenu)"
 
-#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
-#: xstormy16-asm.c:474
+#: fr30-asm.c:566 frv-asm.c:869 ip2k-asm.c:817 iq2000-asm.c:703 m32r-asm.c:568
+#: openrisc-asm.c:504 xstormy16-asm.c:527
 #, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
 msgstr "erreur de syntaxe (caractère « %c » attendu, fin de l'instruction obtenue)"
 
-#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
-#: xstormy16-asm.c:502
+#: fr30-asm.c:594 frv-asm.c:897 ip2k-asm.c:845 iq2000-asm.c:731 m32r-asm.c:596
+#: openrisc-asm.c:532 xstormy16-asm.c:555
 msgid "junk at end of line"
 msgstr "rebut à la fin de la ligne"
 
-#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
-#: xstormy16-asm.c:609
+#: fr30-asm.c:701 frv-asm.c:1004 ip2k-asm.c:952 iq2000-asm.c:838
+#: m32r-asm.c:703 openrisc-asm.c:639 xstormy16-asm.c:662
 msgid "unrecognized form of instruction"
 msgstr "forme d'instruction non reconnue"
 
-#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
-#: xstormy16-asm.c:621
+#: fr30-asm.c:713 frv-asm.c:1016 ip2k-asm.c:964 iq2000-asm.c:850
+#: m32r-asm.c:715 openrisc-asm.c:651 xstormy16-asm.c:674
 #, c-format
 msgid "bad instruction `%.50s...'"
 msgstr "instruction erronée « %.50s... »"
 
-#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
-#: xstormy16-asm.c:624
+#: fr30-asm.c:716 frv-asm.c:1019 ip2k-asm.c:967 iq2000-asm.c:853
+#: m32r-asm.c:718 openrisc-asm.c:654 xstormy16-asm.c:677
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr "instruction erronée « %.50s »"
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
-#: xstormy16-dis.c:39
+#: fr30-dis.c:41 frv-dis.c:41 ip2k-dis.c:41 iq2000-dis.c:41 m32r-dis.c:41
+#: mmix-dis.c:284 openrisc-dis.c:41 xstormy16-dis.c:41
 msgid "*unknown*"
 msgstr "*inconnu*"
 
-#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
-#: xstormy16-dis.c:169
+#: fr30-dis.c:320 frv-dis.c:371 ip2k-dis.c:329 iq2000-dis.c:192 m32r-dis.c:251
+#: openrisc-dis.c:138 xstormy16-dis.c:171
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
 msgstr "Champ non reconnu %d lors de l'impression insn.\n"
 
-#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
-#: xstormy16-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 ip2k-ibld.c:166 iq2000-ibld.c:166
+#: m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
 #, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
 msgstr "opérande hors gamme (%ld n'est pas entre %ld et %lu)"
 
-#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
-#: xstormy16-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 ip2k-ibld.c:179 iq2000-ibld.c:179
+#: m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr "opérande hors gamme (%lu n'est pas entre 0 et %lu)"
 
-#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
-#: xstormy16-ibld.c:678
+#: fr30-ibld.c:730 frv-ibld.c:829 ip2k-ibld.c:607 iq2000-ibld.c:713
+#: m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr "Champ non reconnu %d lors de la construction de insn.\n"
 
-#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
-#: xstormy16-ibld.c:826
+#: fr30-ibld.c:937 frv-ibld.c:1121 ip2k-ibld.c:684 iq2000-ibld.c:890
+#: m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr "Champ non reconnu %d lors du décodage de insn.\n"
 
-#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
-#: xstormy16-ibld.c:939
+#: fr30-ibld.c:1086 frv-ibld.c:1375 ip2k-ibld.c:761 iq2000-ibld.c:1024
+#: m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr "Champ non reconnu %d lors de la prise d'une opérande int.\n"
 
-#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
-#: xstormy16-ibld.c:1032
+#: fr30-ibld.c:1215 frv-ibld.c:1609 ip2k-ibld.c:818 iq2000-ibld.c:1138
+#: m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr "Champ non reconnu %d lors de la prise d'une opérande vma.\n"
 
-#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
-#: xstormy16-ibld.c:1134
+#: fr30-ibld.c:1349 frv-ibld.c:1852 ip2k-ibld.c:880 iq2000-ibld.c:1261
+#: m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr "Champ non reconnu %d lors de l'initialisation d'une opérande int.\n"
 
-#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
-#: xstormy16-ibld.c:1224
+#: fr30-ibld.c:1471 frv-ibld.c:2083 ip2k-ibld.c:930 iq2000-ibld.c:1372
+#: m32r-ibld.c:1176 openrisc-ibld.c:1001 xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr "Champ non reconnu %d lors de l'initialisation d'une opérande vma.\n"
 
+#: frv-asm.c:365
+msgid "register number must be even"
+msgstr "numéro de registre doit être pair"
+
 # h8300-dis.c:380Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
-#: h8300-dis.c:385
+#: h8300-dis.c:377
 #, c-format
-msgid "Hmmmm %x"
-msgstr "Hummm %x"
+msgid "Hmmmm 0x%x"
+msgstr "Hummmm 0x%x"
 
-#: h8300-dis.c:396
+#: h8300-dis.c:760
 #, c-format
-msgid "Don't understand %x \n"
-msgstr "Ne comprend pas %x \n"
+msgid "Don't understand 0x%x \n"
+msgstr "Ne comprend pas 0x%x \n"
 
 #: h8500-dis.c:143
 #, c-format
@@ -225,10 +231,188 @@ msgstr "Ne peut g
 msgid "%02x\t\t*unknown*"
 msgstr "%02x\t\t*inconnu*"
 
-#: i386-dis.c:1649
+#: i386-dis.c:1699
 msgid "<internal disassembler error>"
 msgstr "<erreur interne du désassembleur>"
 
+#: ia64-gen.c:295
+#, c-format
+msgid "%s: Error: "
+msgstr "%s: ERREUR: "
+
+#: ia64-gen.c:308
+#, c-format
+msgid "%s: Warning: "
+msgstr "%s: AVERTISSEMENT: "
+
+#: ia64-gen.c:494 ia64-gen.c:728
+#, c-format
+msgid "multiple note %s not handled\n"
+msgstr "note multiple %s n'est pas traitée\n"
+
+#: ia64-gen.c:605
+msgid "can't find ia64-ic.tbl for reading\n"
+msgstr "ne peut trouver ia64-ic.tbl pour la lecture\n"
+
+#: ia64-gen.c:810
+#, c-format
+msgid "can't find %s for reading\n"
+msgstr "ne peut trouver %s pour la lecture\n"
+
+#: ia64-gen.c:1034
+#, c-format
+msgid ""
+"most recent format '%s'\n"
+"appears more restrictive than '%s'\n"
+msgstr ""
+"le plus récent format '%s'\n"
+"apparaît plus restrictif que '%s'\n"
+
+#: ia64-gen.c:1045
+#, c-format
+msgid "overlapping field %s->%s\n"
+msgstr "chevauchement de champ %s->%s\n"
+
+#: ia64-gen.c:1236
+#, c-format
+msgid "overwriting note %d with note %d (IC:%s)\n"
+msgstr "sur-écriture de la note %d avec la note %d (IC:%s)\n"
+
+#: ia64-gen.c:1435
+#, c-format
+msgid "don't know how to specify %% dependency %s\n"
+msgstr "ne sait comment spécifier %% pour la dépendance %s\n"
+
+#: ia64-gen.c:1457
+#, c-format
+msgid "Don't know how to specify # dependency %s\n"
+msgstr "Ne sait comment spécifier # pour la dépendence %s\n"
+
+#: ia64-gen.c:1496
+#, c-format
+msgid "IC:%s [%s] has no terminals or sub-classes\n"
+msgstr "IC:%s [%s] n'a pas de terminals ou de sous-classes\n"
+
+#: ia64-gen.c:1499
+#, c-format
+msgid "IC:%s has no terminals or sub-classes\n"
+msgstr "IC:%s n'a pas de terminals ou de sous-classes\n"
+
+#: ia64-gen.c:1508
+#, c-format
+msgid "no insns mapped directly to terminal IC %s [%s]"
+msgstr "aucun insns mappé directement au terminal IC %s [%s]"
+
+#: ia64-gen.c:1511
+#, c-format
+msgid "no insns mapped directly to terminal IC %s\n"
+msgstr "aucun insns mappé directement au terminal IC %s\n"
+
+#: ia64-gen.c:1522
+#, c-format
+msgid "class %s is defined but not used\n"
+msgstr "classe %s défini mais non utilisée\n"
+
+#: ia64-gen.c:1533
+#, c-format
+msgid "Warning: rsrc %s (%s) has no chks%s\n"
+msgstr "AVERTISSEMENT: rsrc %s (%s) n'a pas de chks%s\n"
+
+#: ia64-gen.c:1537
+#, c-format
+msgid "rsrc %s (%s) has no regs\n"
+msgstr "rsrc %s (%s) n'a pas de registres\n"
+
+#: ia64-gen.c:2436
+#, c-format
+msgid "IC note %d in opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr "IC note %d dans l'opcode %s (IC:%s) entre en conflit avec la ressource %s note %d\n"
+
+#: ia64-gen.c:2464
+#, c-format
+msgid "IC note %d for opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr "IC note %d pour l'opcode %s (IC:%s) entre en conflit avec la ressource %s note %d\n"
+
+#: ia64-gen.c:2478
+#, c-format
+msgid "opcode %s has no class (ops %d %d %d)\n"
+msgstr "opcode %s n'a pas de classe (ops %d %d %d)\n"
+
+#: ia64-gen.c:2789
+#, c-format
+msgid "unable to change directory to \"%s\", errno = %s\n"
+msgstr "incapable de changer de répertoire vers \"%s\", errno = %s\n"
+
+#. We've been passed a w.  Return with an error message so that
+#. cgen will try the next parsing option.
+#: ip2k-asm.c:92
+msgid "W keyword invalid in FR operand slot."
+msgstr "W mot clé invalide dans la slot de l'opérance FR."
+
+#. Invalid offset present.
+#: ip2k-asm.c:122
+msgid "offset(IP) is not a valid form"
+msgstr "décalage(IP) n'a pas un format valide"
+
+#. Found something there in front of (DP) but it's out
+#. of range.
+#: ip2k-asm.c:175
+msgid "(DP) offset out of range."
+msgstr "décalage (DP) est hors gamme."
+
+#. Found something there in front of (SP) but it's out
+#. of range.
+#: ip2k-asm.c:221
+msgid "(SP) offset out of range."
+msgstr "décalage (SP) est hors gamme."
+
+#: ip2k-asm.c:241
+msgid "illegal use of parentheses"
+msgstr "usage illégal des parenthèses"
+
+#: ip2k-asm.c:248
+msgid "operand out of range (not between 1 and 255)"
+msgstr "opérande hors gamme (n'est pas entre 1 et 255)"
+
+#. Something is very wrong. opindex has to be one of the above.
+#: ip2k-asm.c:273
+msgid "parse_addr16: invalid opindex."
+msgstr "parse_addr16: opindex invalide."
+
+#: ip2k-asm.c:353
+msgid "Byte address required. - must be even."
+msgstr "adresse d'octet requise - doit être paire."
+
+#: ip2k-asm.c:362
+msgid "cgen_parse_address returned a symbol. Literal required."
+msgstr "cgen_parse_address a retourné un symbole. Litéral requis."
+
+#: ip2k-asm.c:420
+#, c-format
+msgid "%operator operand is not a symbol"
+msgstr "opérande de l'%opérateur n'est pas un symbole"
+
+#: ip2k-asm.c:474
+msgid "Attempt to find bit index of 0"
+msgstr "Tentative de repérage d'un index de bit de 0"
+
+#: iq2000-asm.c:110 iq2000-asm.c:141
+msgid "immediate value cannot be register"
+msgstr "valeur immédiate doit être un registre"
+
+#: iq2000-asm.c:120 iq2000-asm.c:151
+msgid "immediate value out of range"
+msgstr "valeur immédiate est hors gamme"
+
+#: iq2000-asm.c:180
+msgid "21-bit offset out of range"
+msgstr "décalage de 21 bits est hors gamme"
+
+#: iq2000-asm.c:205 iq2000-asm.c:235 iq2000-asm.c:272 iq2000-asm.c:305
+#: openrisc-asm.c:96 openrisc-asm.c:155
+msgid "missing `)'"
+msgstr "`)' manquante"
+
 #: m10200-dis.c:199
 #, c-format
 msgid "unknown\t0x%02x"
@@ -239,7 +423,7 @@ msgstr "inconnu\t0x%02x"
 msgid "unknown\t0x%04lx"
 msgstr "inconnu\t0x%04lx"
 
-#: m10300-dis.c:685
+#: m10300-dis.c:766
 #, c-format
 msgid "unknown\t0x%04x"
 msgstr "inconnu\t0x%04x"
@@ -254,21 +438,128 @@ msgstr "<erreur interne dans la table des codes-op: %s %s>\n"
 msgid "<function code %d>"
 msgstr "<code de fonction %d>"
 
-#: m88k-dis.c:255
+#: m88k-dis.c:746
 #, c-format
 msgid "# <dis error: %08x>"
 msgstr "# <erreur du désassembleur: %08x>"
 
-#: mips-dis.c:337
+#: mips-dis.c:699
+msgid "# internal error, incomplete extension sequence (+)"
+msgstr "# erreur interne, séquence d'extension incomplète (+)"
+
+#: mips-dis.c:742
+#, c-format
+msgid "# internal error, undefined extension sequence (+%c)"
+msgstr "# erreur interne, séquence d'extension indéfinie (+%c)"
+
+#: mips-dis.c:1000
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr "# erreur interne, modificateur non défini(%c)"
 
-#: mips-dis.c:1209
+#: mips-dis.c:1751
 #, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
 msgstr "# erreur interne du déssassembleur, modificateur non reconnu(%c)"
 
+#: mips-dis.c:1763
+msgid ""
+"\n"
+"The following MIPS specific disassembler options are supported for use\n"
+"with the -M switch (multiple options should be separated by commas):\n"
+msgstr ""
+"\n"
+"Les options spécifiques MIPS du désassembleur sont supportées avec l'utilisation de\n"
+"l'option -M (les options multiples doivent être séparées par des virgules):\n"
+
+#: mips-dis.c:1767
+msgid ""
+"\n"
+"  gpr-names=ABI            Print GPR names according to  specified ABI.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  gpr-names=ABI            Afficher les noms GPR selon l'ABI spécifié.\n"
+"                           Par défaut: basé sur le binaire déassemblé.\n"
+
+#: mips-dis.c:1771
+msgid ""
+"\n"
+"  fpr-names=ABI            Print FPR names according to specified ABI.\n"
+"                           Default: numeric.\n"
+msgstr ""
+"\n"
+"  fpr-names=ABI            Afficher les noms FPR selon l'ABI spécifié.\n"
+"                           Par défaut: numérique.\n"
+
+#: mips-dis.c:1775
+msgid ""
+"\n"
+"  cp0-names=ARCH           Print CP0 register names according to\n"
+"                           specified architecture.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  cp0-names=ARCH           Afficher les noms des registres CP0 selon\n"
+"                           l'architecture spécifiée.\n"
+"                           Par défaut: basé sur le binaire déassemblé.\n"
+
+#: mips-dis.c:1780
+msgid ""
+"\n"
+"  hwr-names=ARCH           Print HWR names according to specified \n"
+"\t\t\t   architecture.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  hwr-names=ARCH           Afficher les noms HWR selon  \n"
+"\t\t\t   l'architecture spécifiée.\n"
+"                           Par défaut: basé sur le binaire déassemblé.\n"
+
+#: mips-dis.c:1785
+msgid ""
+"\n"
+"  reg-names=ABI            Print GPR and FPR names according to\n"
+"                           specified ABI.\n"
+msgstr ""
+"\n"
+"  reg-names=ABI            Afficher les noms GPR et FPR selon l'ABI\n"
+"                           spécifié.\n"
+
+#: mips-dis.c:1789
+msgid ""
+"\n"
+"  reg-names=ARCH           Print CP0 register and HWR names according to\n"
+"                           specified architecture.\n"
+msgstr ""
+"\n"
+"  reg-names=ARCH           Afficher les noms des registres CP0 et HWR selon\n"
+"                           l'architecture spécifiée.\n"
+
+#: mips-dis.c:1793
+msgid ""
+"\n"
+"  For the options above, the following values are supported for \"ABI\":\n"
+"   "
+msgstr ""
+"\n"
+"  Pour les options ci-haut, les valeurs suivantes sont supportés pour l'\"ABI\":\n"
+"   "
+
+#: mips-dis.c:1798 mips-dis.c:1806 mips-dis.c:1808
+msgid "\n"
+msgstr "\n"
+
+#: mips-dis.c:1800
+msgid ""
+"\n"
+"  For the options above, The following values are supported for \"ARCH\":\n"
+"   "
+msgstr ""
+"\n"
+"  Pour les options ci-haut, les valeurs suivantes sont supportées pour \"ARCH\":\n"
+"   "
+
 #: mmix-dis.c:34
 #, c-format
 msgid "Bad case %d (%s) in %s:%d\n"
@@ -283,7 +574,7 @@ msgstr "Interne: code qui n'est pas au point (case de test manquant): %s:%d"
 msgid "(unknown)"
 msgstr "(inconnu)"
 
-#: mmix-dis.c:517
+#: mmix-dis.c:519
 #, c-format
 msgid "*unknown operands type: %d*"
 msgstr "*type d'opérande inconnue: %d*"
@@ -294,76 +585,116 @@ msgstr "*type d'op
 #. * aoffsetp by since whatever generated this is broken
 #. * anyway!
 #.
-#: ns32k-dis.c:628
+#: ns32k-dis.c:631
 msgid "$<undefined>"
 msgstr "$<non défini>"
 
-#: ppc-opc.c:777 ppc-opc.c:810
+#: ppc-opc.c:781 ppc-opc.c:809
 msgid "invalid conditional option"
 msgstr "option conditionnelle invalide"
 
-#: ppc-opc.c:812
+#: ppc-opc.c:811
 msgid "attempt to set y bit when using + or - modifier"
 msgstr "tentative d'initialisation du bit y lorsque le modificateur + ou - a été utilisé"
 
-#: ppc-opc.c:844 ppc-opc.c:896
+#: ppc-opc.c:840
+msgid "offset not a multiple of 16"
+msgstr "décalage n'est pas un multiple de 16"
+
+#: ppc-opc.c:860
+msgid "offset not a multiple of 2"
+msgstr "décalage n'est pas un multiple de 2"
+
+#: ppc-opc.c:862
+msgid "offset greater than 62"
+msgstr "décalage plus grand que 62"
+
+#: ppc-opc.c:881 ppc-opc.c:927 ppc-opc.c:975
 msgid "offset not a multiple of 4"
 msgstr "décalage n'est pas un multiple de 4"
 
-#: ppc-opc.c:869
+#: ppc-opc.c:883
+msgid "offset greater than 124"
+msgstr "décalage plus grand que 124"
+
+#: ppc-opc.c:902
+msgid "offset not a multiple of 8"
+msgstr "décalage n'est pas un multiple de 8"
+
+#: ppc-opc.c:904
+msgid "offset greater than 248"
+msgstr "décalage plus grand que 248"
+
+#: ppc-opc.c:950
 msgid "offset not between -2048 and 2047"
 msgstr "décalage n'est pas entre -2048 et 2047"
 
-#: ppc-opc.c:894
+#: ppc-opc.c:973
 msgid "offset not between -8192 and 8191"
 msgstr "décalage n'est pas entre -8192 et 8191"
 
-#: ppc-opc.c:922
+#: ppc-opc.c:1011
+msgid "ignoring invalid mfcr mask"
+msgstr "masque mfcr invalide est ignoré"
+
+#: ppc-opc.c:1059
 msgid "ignoring least significant bits in branch offset"
 msgstr "Les derniers bits les moins significatifs sont ignorés dans le décalage de branchement"
 
-#: ppc-opc.c:956 ppc-opc.c:993
+#: ppc-opc.c:1090 ppc-opc.c:1125
 msgid "illegal bitmask"
 msgstr "masque de bits illégal"
 
-#: ppc-opc.c:1066
+#: ppc-opc.c:1192
 msgid "value out of range"
 msgstr "valeur hors gamme"
 
-#: ppc-opc.c:1142
+#: ppc-opc.c:1262
 msgid "index register in load range"
 msgstr "registre index n'est pas dans la plage de chargement"
 
-#: ppc-opc.c:1158
+#: ppc-opc.c:1279
+msgid "source and target register operands must be different"
+msgstr "les opérandes des registres source et cible doivent être diffrents"
+
+#: ppc-opc.c:1294
 msgid "invalid register operand when updating"
 msgstr "opérande registre invalide lors de la mise à jour"
 
-#. Mark as non-valid instruction
-#: sparc-dis.c:750
+#: ppc-opc.c:1335
+msgid "target register operand must be even"
+msgstr "opérande du registre cible doit être pair"
+
+#: ppc-opc.c:1350
+msgid "source register operand must be even"
+msgstr "opérande du registre source doit être pair"
+
+#. Mark as non-valid instruction.
+#: sparc-dis.c:760
 msgid "unknown"
 msgstr "inconnu"
 
-#: sparc-dis.c:825
+#: sparc-dis.c:835
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Erreur interne:  sparc-opcode.h erroné: « %s », %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:836
+#: sparc-dis.c:846
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Erreur interne: sparc-opcode.h erroné: « %s », %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:885
+#: sparc-dis.c:895
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr "Erreur interne: sparc-opcode.h erroné: « %s » == « %s »\n"
 
-#: v850-dis.c:224
+#: v850-dis.c:221
 #, c-format
 msgid "unknown operand shift: %x\n"
 msgstr "décalage d'opérande inconnu: %x\n"
 
-#: v850-dis.c:236
+#: v850-dis.c:233
 #, c-format
 msgid "unknown pop reg: %d\n"
 msgstr "registre de pile inconnu: %d\n"
@@ -417,33 +748,45 @@ msgstr "valeur imm
 msgid "immediate value must be even"
 msgstr "valeur immédiate doit être paire"
 
-#: xstormy16-asm.c:74
+#: xstormy16-asm.c:76
 msgid "Bad register in preincrement"
 msgstr "Registre erroné dans un préincrément"
 
-#: xstormy16-asm.c:79
+#: xstormy16-asm.c:81
 msgid "Bad register in postincrement"
 msgstr "Registre erroné dans un postincrément"
 
-#: xstormy16-asm.c:81
+#: xstormy16-asm.c:83
 msgid "Bad register name"
 msgstr "Nom erroné de registre"
 
-#: xstormy16-asm.c:85
+#: xstormy16-asm.c:87
 msgid "Label conflicts with register name"
 msgstr "Conflits d'étiquette avec le nom de registre"
 
-#: xstormy16-asm.c:89
+#: xstormy16-asm.c:91
 msgid "Label conflicts with `Rx'"
 msgstr "Conflit d'étiquette avec « Rx »"
 
-#: xstormy16-asm.c:91
+#: xstormy16-asm.c:93
 msgid "Bad immediate expression"
 msgstr "Expression immédiate erronée"
 
-#: xstormy16-asm.c:120
+#: xstormy16-asm.c:115
+msgid "No relocation for small immediate"
+msgstr "aucune relocalisation pour un petit immédiat"
+
+#: xstormy16-asm.c:125
 msgid "Small operand was not an immediate number"
 msgstr "Petite opérande n'était pas un nombre immédiat"
 
+#: xstormy16-asm.c:164
+msgid "Operand is not a symbol"
+msgstr "opérande n'est pas un symbol"
+
+#: xstormy16-asm.c:172
+msgid "Syntax error: No trailing ')'"
+msgstr "Erreur de syntaxe: pas de ')' en suffixe"
+
 #~ msgid "unrecognized keyword/register name"
 #~ msgstr "nom de mot clé ou de registre non reconnu"
index ee61ca633f8677bc3864751b828af7a11fbb2c2a..15fdff07f02ca5c5cb00ff6544a51da8379dc00e 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-06-05 11:34+0100\n"
+"POT-Creation-Date: 2003-07-17 14:54+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -228,7 +228,7 @@ msgstr ""
 msgid "%02x\t\t*unknown*"
 msgstr ""
 
-#: i386-dis.c:1650
+#: i386-dis.c:1699
 msgid "<internal disassembler error>"
 msgstr ""
 
@@ -417,7 +417,7 @@ msgstr ""
 msgid "unknown\t0x%04lx"
 msgstr ""
 
-#: m10300-dis.c:685
+#: m10300-dis.c:766
 #, c-format
 msgid "unknown\t0x%04x"
 msgstr ""
@@ -437,47 +437,47 @@ msgstr ""
 msgid "# <dis error: %08x>"
 msgstr ""
 
-#: mips-dis.c:699
+#: mips-dis.c:703
 msgid "# internal error, incomplete extension sequence (+)"
 msgstr ""
 
-#: mips-dis.c:742
+#: mips-dis.c:746
 #, c-format
 msgid "# internal error, undefined extension sequence (+%c)"
 msgstr ""
 
-#: mips-dis.c:1000
+#: mips-dis.c:1004
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr ""
 
-#: mips-dis.c:1751
+#: mips-dis.c:1755
 #, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
 msgstr ""
 
-#: mips-dis.c:1763
+#: mips-dis.c:1767
 msgid ""
 "\n"
 "The following MIPS specific disassembler options are supported for use\n"
 "with the -M switch (multiple options should be separated by commas):\n"
 msgstr ""
 
-#: mips-dis.c:1767
+#: mips-dis.c:1771
 msgid ""
 "\n"
 "  gpr-names=ABI            Print GPR names according to  specified ABI.\n"
 "                           Default: based on binary being disassembled.\n"
 msgstr ""
 
-#: mips-dis.c:1771
+#: mips-dis.c:1775
 msgid ""
 "\n"
 "  fpr-names=ABI            Print FPR names according to specified ABI.\n"
 "                           Default: numeric.\n"
 msgstr ""
 
-#: mips-dis.c:1775
+#: mips-dis.c:1779
 msgid ""
 "\n"
 "  cp0-names=ARCH           Print CP0 register names according to\n"
@@ -485,7 +485,7 @@ msgid ""
 "                           Default: based on binary being disassembled.\n"
 msgstr ""
 
-#: mips-dis.c:1780
+#: mips-dis.c:1784
 msgid ""
 "\n"
 "  hwr-names=ARCH           Print HWR names according to specified \n"
@@ -493,32 +493,32 @@ msgid ""
 "                           Default: based on binary being disassembled.\n"
 msgstr ""
 
-#: mips-dis.c:1785
+#: mips-dis.c:1789
 msgid ""
 "\n"
 "  reg-names=ABI            Print GPR and FPR names according to\n"
 "                           specified ABI.\n"
 msgstr ""
 
-#: mips-dis.c:1789
+#: mips-dis.c:1793
 msgid ""
 "\n"
 "  reg-names=ARCH           Print CP0 register and HWR names according to\n"
 "                           specified architecture.\n"
 msgstr ""
 
-#: mips-dis.c:1793
+#: mips-dis.c:1797
 msgid ""
 "\n"
 "  For the options above, the following values are supported for \"ABI\":\n"
 "   "
 msgstr ""
 
-#: mips-dis.c:1798 mips-dis.c:1806 mips-dis.c:1808
+#: mips-dis.c:1802 mips-dis.c:1810 mips-dis.c:1812
 msgid "\n"
 msgstr ""
 
-#: mips-dis.c:1800
+#: mips-dis.c:1804
 msgid ""
 "\n"
 "  For the options above, The following values are supported for \"ARCH\":\n"
@@ -554,66 +554,86 @@ msgstr ""
 msgid "$<undefined>"
 msgstr ""
 
-#: ppc-opc.c:818 ppc-opc.c:851
+#: ppc-opc.c:781 ppc-opc.c:809
 msgid "invalid conditional option"
 msgstr ""
 
-#: ppc-opc.c:853
+#: ppc-opc.c:811
 msgid "attempt to set y bit when using + or - modifier"
 msgstr ""
 
-#: ppc-opc.c:881
+#: ppc-opc.c:840
+msgid "offset not a multiple of 16"
+msgstr ""
+
+#: ppc-opc.c:860
 msgid "offset not a multiple of 2"
 msgstr ""
 
-#: ppc-opc.c:883
+#: ppc-opc.c:862
 msgid "offset greater than 62"
 msgstr ""
 
-#: ppc-opc.c:904 ppc-opc.c:954 ppc-opc.c:1006
+#: ppc-opc.c:881 ppc-opc.c:927 ppc-opc.c:975
 msgid "offset not a multiple of 4"
 msgstr ""
 
-#: ppc-opc.c:906
+#: ppc-opc.c:883
 msgid "offset greater than 124"
 msgstr ""
 
-#: ppc-opc.c:927
+#: ppc-opc.c:902
 msgid "offset not a multiple of 8"
 msgstr ""
 
-#: ppc-opc.c:929
+#: ppc-opc.c:904
 msgid "offset greater than 248"
 msgstr ""
 
-#: ppc-opc.c:979
+#: ppc-opc.c:950
 msgid "offset not between -2048 and 2047"
 msgstr ""
 
-#: ppc-opc.c:1004
+#: ppc-opc.c:973
 msgid "offset not between -8192 and 8191"
 msgstr ""
 
-#: ppc-opc.c:1032
+#: ppc-opc.c:1011
+msgid "ignoring invalid mfcr mask"
+msgstr ""
+
+#: ppc-opc.c:1059
 msgid "ignoring least significant bits in branch offset"
 msgstr ""
 
-#: ppc-opc.c:1066 ppc-opc.c:1103
+#: ppc-opc.c:1090 ppc-opc.c:1125
 msgid "illegal bitmask"
 msgstr ""
 
-#: ppc-opc.c:1176
+#: ppc-opc.c:1192
 msgid "value out of range"
 msgstr ""
 
-#: ppc-opc.c:1252
+#: ppc-opc.c:1262
 msgid "index register in load range"
 msgstr ""
 
-#: ppc-opc.c:1268
+#: ppc-opc.c:1279
+msgid "source and target register operands must be different"
+msgstr ""
+
+#: ppc-opc.c:1294
 msgid "invalid register operand when updating"
 msgstr ""
 
+#: ppc-opc.c:1335
+msgid "target register operand must be even"
+msgstr ""
+
+#: ppc-opc.c:1350
+msgid "source register operand must be even"
+msgstr ""
+
 #. Mark as non-valid instruction.
 #: sparc-dis.c:760
 msgid "unknown"
index 72077eda6745c2d397b3fa1a0b4f00fedced4288..ca0b870ee2e6d11c7ad4a1c8718ce6567e6afe88 100644 (file)
@@ -1,18 +1,17 @@
-# Mesajele în limba român? pentru pachetul opcodes
+# Mesajele în limba românã pentru pachetul opcodes
 # Copyright (C) 2003 Free Software Foundation, Inc.
 # Eugen Hoanca <eugenh@urban-grafx.ro>, 2003
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.12.91\n"
-"POT-Creation-Date: 2002-07-23 15:55-0400\n"
-"PO-Revision-Date: 2003-04-28 08:32+0300\n"
+"Project-Id-Version: opcodes 2.14rel030712\n"
+"POT-Creation-Date: 2003-07-11 13:56+0930\n"
+"PO-Revision-Date: 2003-07-21 16:53+0300\n"
 "Last-Translator: Eugen Hoanca <eugenh@urban-grafx.ro>\n"
 "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-2\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
 #: alpha-opc.c:335
 msgid "branch operand unaligned"
@@ -20,27 +19,27 @@ msgstr "ramur
 
 #: alpha-opc.c:358 alpha-opc.c:380
 msgid "jump hint unaligned"
-msgstr "sugestie sãriturã(jump) nealiniatã"
+msgstr "sugestie salt(jump) nealiniat"
 
 #: arc-dis.c:52
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "referinþã limm ilegalã în ultima instrucþiune!\n"
 
-#: arm-dis.c:507
+#: arm-dis.c:554
 msgid "<illegal precision>"
 msgstr "<precizie ilegalã>"
 
-#: arm-dis.c:1010
+#: arm-dis.c:1162
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Setare nume registru necunoscutã: %s\n"
 
-#: arm-dis.c:1017
+#: arm-dis.c:1169
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
-msgstr "Opþiune dezasamblor necunoscutã: %s\n"
+msgstr "Opþiune dezasamblor necunsocutã: %s\n"
 
-#: arm-dis.c:1191
+#: arm-dis.c:1343
 msgid ""
 "\n"
 "The following ARM specific disassembler options are supported for use with\n"
@@ -50,26 +49,26 @@ msgstr ""
 "Opþiunile ARM de dezasamblor specifice urmãtoare sunt permise cu folosirea\n"
 "switch-ului -M:\n"
 
-#: avr-dis.c:118 avr-dis.c:128
+#: avr-dis.c:117 avr-dis.c:127
 msgid "undefined"
 msgstr "nedefinit(ã)"
 
-#: avr-dis.c:180
+#: avr-dis.c:179
 msgid "Internal disassembler error"
 msgstr "Eroare internã de dezasamblor"
 
-#: avr-dis.c:228
+#: avr-dis.c:227
 #, c-format
 msgid "unknown constraint `%c'"
 msgstr "constrângere necunoscutã `%c'"
 
-#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
-#: openrisc-ibld.c:195 xstormy16-ibld.c:195
+#: cgen-asm.c:348 fr30-ibld.c:195 frv-ibld.c:195 ip2k-ibld.c:195
+#: iq2000-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr "operand în afara intervalului (%ld nu este între %ld ºi %ld)"
 
-#: cgen-asm.c:367
+#: cgen-asm.c:369
 #, c-format
 msgid "operand out of range (%lu not between %lu and %lu)"
 msgstr "operand în afara intervalului (%lu nu este între %lu ºi %lu)"
@@ -88,131 +87,137 @@ msgstr "Eroare necunoscut
 #: dis-buf.c:62
 #, c-format
 msgid "Address 0x%x is out of bounds.\n"
-msgstr "Adresa 0x%x este în afara limitelor (out of bounds).\n"
+msgstr "Adresa 0x%x este peste limite (out of bounds).\n"
 
-#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
-#: xstormy16-asm.c:231
+#: fr30-asm.c:323 frv-asm.c:626 ip2k-asm.c:574 iq2000-asm.c:460 m32r-asm.c:325
+#: openrisc-asm.c:261 xstormy16-asm.c:284
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr "Câmp necunoscut %d în analizã(parsing).\n"
 
-#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
-#: xstormy16-asm.c:281
+#: fr30-asm.c:373 frv-asm.c:676 ip2k-asm.c:624 iq2000-asm.c:510 m32r-asm.c:375
+#: openrisc-asm.c:311 xstormy16-asm.c:334
 msgid "missing mnemonic in syntax string"
 msgstr "mnemonicã lipsã în sintaxã"
 
 #. We couldn't parse it.
-#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
-#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
-#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
-#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
-#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:812
+#: frv-asm.c:816 frv-asm.c:903 frv-asm.c:1005 ip2k-asm.c:760 ip2k-asm.c:764
+#: ip2k-asm.c:851 ip2k-asm.c:953 iq2000-asm.c:646 iq2000-asm.c:650
+#: iq2000-asm.c:737 iq2000-asm.c:839 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:447 openrisc-asm.c:451
+#: openrisc-asm.c:538 openrisc-asm.c:640 xstormy16-asm.c:470
+#: xstormy16-asm.c:474 xstormy16-asm.c:561 xstormy16-asm.c:663
 msgid "unrecognized instruction"
 msgstr "instrucþiune necunoscutã"
 
-#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
-#: xstormy16-asm.c:464
+#: fr30-asm.c:556 frv-asm.c:859 ip2k-asm.c:807 iq2000-asm.c:693 m32r-asm.c:558
+#: openrisc-asm.c:494 xstormy16-asm.c:517
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "eroare de sintaxã ( se aºtepta %c', s-a primit `%c')"
 
-#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
-#: xstormy16-asm.c:474
+#: fr30-asm.c:566 frv-asm.c:869 ip2k-asm.c:817 iq2000-asm.c:703 m32r-asm.c:568
+#: openrisc-asm.c:504 xstormy16-asm.c:527
 #, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
 msgstr "eroare de sintaxã (s-a aºteptat char `%c' s-a primit sfârºit de instrucþiune)"
 
-#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
-#: xstormy16-asm.c:502
+#: fr30-asm.c:594 frv-asm.c:897 ip2k-asm.c:845 iq2000-asm.c:731 m32r-asm.c:596
+#: openrisc-asm.c:532 xstormy16-asm.c:555
 msgid "junk at end of line"
 msgstr "resturi(junk) la sfârºit de linie"
 
-#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
-#: xstormy16-asm.c:609
+#: fr30-asm.c:701 frv-asm.c:1004 ip2k-asm.c:952 iq2000-asm.c:838
+#: m32r-asm.c:703 openrisc-asm.c:639 xstormy16-asm.c:662
 msgid "unrecognized form of instruction"
 msgstr "formã de instrucþiune necunoscutã"
 
-#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
-#: xstormy16-asm.c:621
+#: fr30-asm.c:713 frv-asm.c:1016 ip2k-asm.c:964 iq2000-asm.c:850
+#: m32r-asm.c:715 openrisc-asm.c:651 xstormy16-asm.c:674
 #, c-format
 msgid "bad instruction `%.50s...'"
-msgstr "instrucþiune greºitã `%.50s...'"
+msgstr "instrucþiune greºitã ``%.50s...'"
 
-#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
-#: xstormy16-asm.c:624
+#: fr30-asm.c:716 frv-asm.c:1019 ip2k-asm.c:967 iq2000-asm.c:853
+#: m32r-asm.c:718 openrisc-asm.c:654 xstormy16-asm.c:677
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr "instrucþiune greºitã `%.50s'"
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
-#: xstormy16-dis.c:39
+#: fr30-dis.c:41 frv-dis.c:41 ip2k-dis.c:41 iq2000-dis.c:41 m32r-dis.c:41
+#: mmix-dis.c:284 openrisc-dis.c:41 xstormy16-dis.c:41
 msgid "*unknown*"
 msgstr "*necunoscut(ã)*"
 
-#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
-#: xstormy16-dis.c:169
+#: fr30-dis.c:320 frv-dis.c:371 ip2k-dis.c:329 iq2000-dis.c:192 m32r-dis.c:251
+#: openrisc-dis.c:138 xstormy16-dis.c:171
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
-msgstr "Câmp necunoscut %d la tipãrirea insn.\n"
+msgstr "Câmp necunoscut %d în tipãrire insn.\n"
 
-#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
-#: xstormy16-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 ip2k-ibld.c:166 iq2000-ibld.c:166
+#: m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
 #, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
 msgstr "operand în afara limitelor (%ld nu este între %ld ºi %lu)"
 
-#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
-#: xstormy16-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 ip2k-ibld.c:179 iq2000-ibld.c:179
+#: m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr "operand în afara limitelor (%lu nu este între 0 ºi %lu)"
 
-#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
-#: xstormy16-ibld.c:678
+#: fr30-ibld.c:730 frv-ibld.c:829 ip2k-ibld.c:607 iq2000-ibld.c:713
+#: m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr "Câmp necunoscut %d în construire(building) insn.\n"
 
-#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
-#: xstormy16-ibld.c:826
+#: fr30-ibld.c:937 frv-ibld.c:1121 ip2k-ibld.c:684 iq2000-ibld.c:890
+#: m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr "Câmp necunoscut %d în decodare insn.\n"
 
-#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
-#: xstormy16-ibld.c:939
+#: fr30-ibld.c:1086 frv-ibld.c:1375 ip2k-ibld.c:761 iq2000-ibld.c:1024
+#: m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr "Câmp necunoscut %d în preluare operand int.\n"
 
-#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
-#: xstormy16-ibld.c:1032
+#: fr30-ibld.c:1215 frv-ibld.c:1609 ip2k-ibld.c:818 iq2000-ibld.c:1138
+#: m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr "Câmp necunoscut %d în preluare operand vma.\n"
 
-#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
-#: xstormy16-ibld.c:1134
+#: fr30-ibld.c:1349 frv-ibld.c:1852 ip2k-ibld.c:880 iq2000-ibld.c:1261
+#: m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr "Câmp necunoscut %d în setare operand int.\n"
 
-#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
-#: xstormy16-ibld.c:1224
+#: fr30-ibld.c:1471 frv-ibld.c:2083 ip2k-ibld.c:930 iq2000-ibld.c:1372
+#: m32r-ibld.c:1176 openrisc-ibld.c:1001 xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr "Câmp necunoscut %d în setare operand vma.\n"
 
-#: h8300-dis.c:385
+#: frv-asm.c:365
+msgid "register number must be even"
+msgstr "numãrul registrului trebuie sã fie par"
+
+#: h8300-dis.c:377
 #, c-format
-msgid "Hmmmm %x"
-msgstr "Hmmmm %x"
+msgid "Hmmmm 0x%x"
+msgstr "Hmmmm 0x%x"
 
-#: h8300-dis.c:396
+#: h8300-dis.c:760
 #, c-format
-msgid "Don't understand %x \n"
-msgstr "Nu înþeleg %x \n"
+msgid "Don't understand 0x%x \n"
+msgstr "Nu înþeleg 0x%x \n"
 
 #: h8500-dis.c:143
 #, c-format
@@ -225,10 +230,188 @@ msgstr "nu fac fa
 msgid "%02x\t\t*unknown*"
 msgstr "%02x\t\t*necunoscut(ã)*"
 
-#: i386-dis.c:1649
+#: i386-dis.c:1699
 msgid "<internal disassembler error>"
 msgstr "<eroare internã de dezasamblor>"
 
+#: ia64-gen.c:295
+#, c-format
+msgid "%s: Error: "
+msgstr "%s: Eroare: "
+
+#: ia64-gen.c:308
+#, c-format
+msgid "%s: Warning: "
+msgstr "%s: Avertisment: "
+
+#: ia64-gen.c:494 ia64-gen.c:728
+#, c-format
+msgid "multiple note %s not handled\n"
+msgstr "notele multiple %s nerezolvabile(handled)\n"
+
+#: ia64-gen.c:605
+msgid "can't find ia64-ic.tbl for reading\n"
+msgstr "nu pot gãsi ia64-ic.tbl pentru citire\n"
+
+#: ia64-gen.c:810
+#, c-format
+msgid "can't find %s for reading\n"
+msgstr "nu pot gãsi %s pentru citire\n"
+
+#: ia64-gen.c:1034
+#, c-format
+msgid ""
+"most recent format '%s'\n"
+"appears more restrictive than '%s'\n"
+msgstr ""
+"cel mai recent format %s \n"
+"pare mai restrictiv decât '%s'\n"
+
+#: ia64-gen.c:1045
+#, c-format
+msgid "overlapping field %s->%s\n"
+msgstr "câmp suprapus %s -> %s\n"
+
+#: ia64-gen.c:1236
+#, c-format
+msgid "overwriting note %d with note %d (IC:%s)\n"
+msgstr "suprascriere nota %d cu nota %d (IC:%s)\n"
+
+#: ia64-gen.c:1435
+#, c-format
+msgid "don't know how to specify %% dependency %s\n"
+msgstr "nu ºtiu cum se specificã dependinþele %% %s\n"
+
+#: ia64-gen.c:1457
+#, c-format
+msgid "Don't know how to specify # dependency %s\n"
+msgstr "nu ºtiu cum se specificã dependinþele # %s\n"
+
+#: ia64-gen.c:1496
+#, c-format
+msgid "IC:%s [%s] has no terminals or sub-classes\n"
+msgstr "IC:%s [%s] nu are terminale sau sublclase\n"
+
+#: ia64-gen.c:1499
+#, c-format
+msgid "IC:%s has no terminals or sub-classes\n"
+msgstr "IC:%s nu are terminale sau subclase\n"
+
+#: ia64-gen.c:1508
+#, c-format
+msgid "no insns mapped directly to terminal IC %s [%s]"
+msgstr "nici un insns mapat direct la terminalul IC %s [%s]"
+
+#: ia64-gen.c:1511
+#, c-format
+msgid "no insns mapped directly to terminal IC %s\n"
+msgstr "nici un insns mapat direct la terminalul IC %s\n"
+
+#: ia64-gen.c:1522
+#, c-format
+msgid "class %s is defined but not used\n"
+msgstr "clasa %s este definitã dar nefolositã\n"
+
+#: ia64-gen.c:1533
+#, c-format
+msgid "Warning: rsrc %s (%s) has no chks%s\n"
+msgstr "Avertisment: rsrc %s (%s) nu are chks%s\n"
+
+#: ia64-gen.c:1537
+#, c-format
+msgid "rsrc %s (%s) has no regs\n"
+msgstr "rsrc %s (%s) nu areo regs\n"
+
+#: ia64-gen.c:2436
+#, c-format
+msgid "IC note %d in opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr "Nota IC %d din opcode %s (IC:%s) e în conflict cu resursa %s nota %d\n"
+
+#: ia64-gen.c:2464
+#, c-format
+msgid "IC note %d for opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr "Nota IC %d pentru opcode %s (IC:%s) e în conflict cu resursa %s nota %d\n"
+
+#: ia64-gen.c:2478
+#, c-format
+msgid "opcode %s has no class (ops %d %d %d)\n"
+msgstr "opcode %s nu are clasã (ops %d %d %d)\n"
+
+#: ia64-gen.c:2789
+#, c-format
+msgid "unable to change directory to \"%s\", errno = %s\n"
+msgstr "nu am putut schimba directorul în \"%s\", errno = %s\n"
+
+#. We've been passed a w.  Return with an error message so that
+#. cgen will try the next parsing option.
+#: ip2k-asm.c:92
+msgid "W keyword invalid in FR operand slot."
+msgstr "Cuvânt cheie W invalidv în slotul operand FR."
+
+#. Invalid offset present.
+#: ip2k-asm.c:122
+msgid "offset(IP) is not a valid form"
+msgstr "offsetul(IP) nu are formã validã"
+
+#. Found something there in front of (DP) but it's out
+#. of range.
+#: ip2k-asm.c:175
+msgid "(DP) offset out of range."
+msgstr "(DP) offset în afara intervalului"
+
+#. Found something there in front of (SP) but it's out
+#. of range.
+#: ip2k-asm.c:221
+msgid "(SP) offset out of range."
+msgstr "(SP) offset în afara intervalului"
+
+#: ip2k-asm.c:241
+msgid "illegal use of parentheses"
+msgstr "Folosire ilegalã de paranteze"
+
+#: ip2k-asm.c:248
+msgid "operand out of range (not between 1 and 255)"
+msgstr "operand în afara limitelor (nu este între 0 ºi 255)"
+
+#. Something is very wrong. opindex has to be one of the above.
+#: ip2k-asm.c:273
+msgid "parse_addr16: invalid opindex."
+msgstr "parse_addr16: opindex invalid."
+
+#: ip2k-asm.c:353
+msgid "Byte address required. - must be even."
+msgstr "Se necesitã adresã byte. -trebuie sã fie parã (even)."
+
+#: ip2k-asm.c:362
+msgid "cgen_parse_address returned a symbol. Literal required."
+msgstr "cgen_parse_address a returnat un simbol. Se necesitã literal."
+
+#: ip2k-asm.c:420
+#, c-format
+msgid "%operator operand is not a symbol"
+msgstr "%operator operandulk nu este un simbol"
+
+#: ip2k-asm.c:474
+msgid "Attempt to find bit index of 0"
+msgstr "Se încearcã gãsirea bitului index de 0"
+
+#: iq2000-asm.c:110 iq2000-asm.c:141
+msgid "immediate value cannot be register"
+msgstr "valoarea directã(immediate) nu poate fi înregistratã"
+
+#: iq2000-asm.c:120 iq2000-asm.c:151
+msgid "immediate value out of range"
+msgstr "valoare directã(immediate) în afara intervalului"
+
+#: iq2000-asm.c:180
+msgid "21-bit offset out of range"
+msgstr "offsetul 21 bit în afara intervalului"
+
+#: iq2000-asm.c:205 iq2000-asm.c:235 iq2000-asm.c:272 iq2000-asm.c:305
+#: openrisc-asm.c:96 openrisc-asm.c:155
+msgid "missing `)'"
+msgstr "`)' lipsã"
+
 #: m10200-dis.c:199
 #, c-format
 msgid "unknown\t0x%02x"
@@ -239,7 +422,7 @@ msgstr "necunoscut(
 msgid "unknown\t0x%04lx"
 msgstr "necunoscut(ã)\t0x%04lx"
 
-#: m10300-dis.c:685
+#: m10300-dis.c:766
 #, c-format
 msgid "unknown\t0x%04x"
 msgstr "necunoscut(ã)\t0x%04x"
@@ -254,21 +437,128 @@ msgstr "<eroare intern
 msgid "<function code %d>"
 msgstr "<cod funcþie %d>"
 
-#: m88k-dis.c:255
+#: m88k-dis.c:746
 #, c-format
 msgid "# <dis error: %08x>"
 msgstr "# <eroare dez: %08x>"
 
-#: mips-dis.c:337
+#: mips-dis.c:699
+msgid "# internal error, incomplete extension sequence (+)"
+msgstr "# eroare internã, secvenþã incompletã de extensie (+)"
+
+#: mips-dis.c:742
+#, c-format
+msgid "# internal error, undefined extension sequence (+%c)"
+msgstr "# eroare internã, secvenþã de extensie nedefinitã (+%c)"
+
+#: mips-dis.c:1000
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr "# eroare internã, modificator nedefinit(%c)"
 
-#: mips-dis.c:1209
+#: mips-dis.c:1751
 #, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
 msgstr "# eroare internã de dezasamblor, modificator necunoscut (%c)"
 
+#: mips-dis.c:1763
+msgid ""
+"\n"
+"The following MIPS specific disassembler options are supported for use\n"
+"with the -M switch (multiple options should be separated by commas):\n"
+msgstr ""
+"\n"
+"Opþiunile MIPS de dezasamblor specifice urmãtoare sunt permise cu folosirea\n"
+"switch-ului -M (opþiunile multiple trebuie separate prin virgulã:\n"
+
+#: mips-dis.c:1767
+msgid ""
+"\n"
+"  gpr-names=ABI            Print GPR names according to  specified ABI.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  gpr-names=ABI            Afiºeazã numele GPR potrivit ABI specificat.\n"
+"                           Implicit: bazat pe binar ce este dezasamblat.\n"
+
+#: mips-dis.c:1771
+msgid ""
+"\n"
+"  fpr-names=ABI            Print FPR names according to specified ABI.\n"
+"                           Default: numeric.\n"
+msgstr ""
+"\n"
+"  fpr-names=ABI            Afiºeazã numele FPR potrivit ABI specificat.\n"
+"                           Implicit: numeric.\n"
+
+#: mips-dis.c:1775
+msgid ""
+"\n"
+"  cp0-names=ARCH           Print CP0 register names according to\n"
+"                           specified architecture.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  cp0-names=ARCH           Afiºeazã numele de regiºtri CP0 potrivit\n"
+"                           arhitecturii specifice.\n"
+"                           Implicit: bazat pe binar în dezasamblare.\n"
+
+#: mips-dis.c:1780
+msgid ""
+"\n"
+"  hwr-names=ARCH           Print HWR names according to specified \n"
+"\t\t\t   architecture.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  hwr-names=ARCH           Afiºeazã numele HWR potrivit arhitecturii \n"
+"\t\t\t   specifice.\n"
+"                           Implicit: bazat pe binar în dezasamblare.\n"
+
+#: mips-dis.c:1785
+msgid ""
+"\n"
+"  reg-names=ABI            Print GPR and FPR names according to\n"
+"                           specified ABI.\n"
+msgstr ""
+"\n"
+"  reg-names=ABI            Afiºeazã numele GPR ºi FPR potriviti\n"
+"                           ABI specificat.\n"
+
+#: mips-dis.c:1789
+msgid ""
+"\n"
+"  reg-names=ARCH           Print CP0 register and HWR names according to\n"
+"                           specified architecture.\n"
+msgstr ""
+"\n"
+"  reg-names=ARCH           Afiºeazã regiºtrii CP0 ºi numele HWR potrivit\n"
+"                           arhitecturii specifice.\n"
+
+#: mips-dis.c:1793
+msgid ""
+"\n"
+"  For the options above, the following values are supported for \"ABI\":\n"
+"   "
+msgstr ""
+"\n"
+"  Pentru opþiunile de mai sus, urmatoarele valori sunt suportate pentru \"ABI\":\n"
+"   "
+
+#: mips-dis.c:1798 mips-dis.c:1806 mips-dis.c:1808
+msgid "\n"
+msgstr "\n"
+
+#: mips-dis.c:1800
+msgid ""
+"\n"
+"  For the options above, The following values are supported for \"ARCH\":\n"
+"   "
+msgstr ""
+"\n"
+"  Pentru opþiunile de mai sus, urmatoarele valori sunt suportate pentru \"ARCH\":\n"
+"   "
+
 #: mmix-dis.c:34
 #, c-format
 msgid "Bad case %d (%s) in %s:%d\n"
@@ -277,13 +567,13 @@ msgstr "Caz gre
 #: mmix-dis.c:44
 #, c-format
 msgid "Internal: Non-debugged code (test-case missing): %s:%d"
-msgstr "Intern: cod ne-depanat (caz test lipsã) %s:%d"
+msgstr "Intern: cod non debugged (caz test lipsã) %s:%d"
 
 #: mmix-dis.c:53
 msgid "(unknown)"
 msgstr "(necunoscut)"
 
-#: mmix-dis.c:517
+#: mmix-dis.c:519
 #, c-format
 msgid "*unknown operands type: %d*"
 msgstr "*tip necunoscut de operanzi: %d*"
@@ -294,76 +584,116 @@ msgstr "*tip necunoscut de operanzi: %d*"
 #. * aoffsetp by since whatever generated this is broken
 #. * anyway!
 #.
-#: ns32k-dis.c:628
+#: ns32k-dis.c:631
 msgid "$<undefined>"
 msgstr "$<nedefinit>"
 
-#: ppc-opc.c:777 ppc-opc.c:810
+#: ppc-opc.c:781 ppc-opc.c:809
 msgid "invalid conditional option"
 msgstr "opþiune condiþionalã invalidã"
 
-#: ppc-opc.c:812
+#: ppc-opc.c:811
 msgid "attempt to set y bit when using + or - modifier"
 msgstr "se încearcã setarea bitului y în folosirea modificatorilor + sau -"
 
-#: ppc-opc.c:844 ppc-opc.c:896
+#: ppc-opc.c:840
+msgid "offset not a multiple of 16"
+msgstr "offsetul nu este multiplu de 16"
+
+#: ppc-opc.c:860
+msgid "offset not a multiple of 2"
+msgstr "offsetul nu este multiplu de 2"
+
+#: ppc-opc.c:862
+msgid "offset greater than 62"
+msgstr "offset mai mare decât 62"
+
+#: ppc-opc.c:881 ppc-opc.c:927 ppc-opc.c:975
 msgid "offset not a multiple of 4"
 msgstr "offsetul nu este multiplu de 4"
 
-#: ppc-opc.c:869
+#: ppc-opc.c:883
+msgid "offset greater than 124"
+msgstr "offset mai mare decât 124"
+
+#: ppc-opc.c:902
+msgid "offset not a multiple of 8"
+msgstr "offsetul nu este multiplu de 8"
+
+#: ppc-opc.c:904
+msgid "offset greater than 248"
+msgstr "offset mai mare de 248"
+
+#: ppc-opc.c:950
 msgid "offset not between -2048 and 2047"
 msgstr "offsetul nu este între -2048 ºi 2047"
 
-#: ppc-opc.c:894
+#: ppc-opc.c:973
 msgid "offset not between -8192 and 8191"
 msgstr "offsetul nu este între -8192 ºi 8191"
 
-#: ppc-opc.c:922
+#: ppc-opc.c:1011
+msgid "ignoring invalid mfcr mask"
+msgstr "se ignorã mascã mfcr invalidã"
+
+#: ppc-opc.c:1059
 msgid "ignoring least significant bits in branch offset"
 msgstr "se ignorã cei mai puþin semnificanþi biþi în offsetul ramurii(branch)"
 
-#: ppc-opc.c:956 ppc-opc.c:993
+#: ppc-opc.c:1090 ppc-opc.c:1125
 msgid "illegal bitmask"
 msgstr "bitmask ilegal"
 
-#: ppc-opc.c:1066
+#: ppc-opc.c:1192
 msgid "value out of range"
 msgstr "valoare în afara intervalului"
 
-#: ppc-opc.c:1142
+#: ppc-opc.c:1262
 msgid "index register in load range"
 msgstr "registru index în interval de încãrcare"
 
-#: ppc-opc.c:1158
+#: ppc-opc.c:1279
+msgid "source and target register operands must be different"
+msgstr "operanzii regiºtri sursã ºi destinaþie trebuie sã fie diferiþi"
+
+#: ppc-opc.c:1294
 msgid "invalid register operand when updating"
 msgstr "registru de operand invalid în updatare"
 
-#. Mark as non-valid instruction
-#: sparc-dis.c:750
+#: ppc-opc.c:1335
+msgid "target register operand must be even"
+msgstr "operandul registru destinaþie trebuie sã fie par"
+
+#: ppc-opc.c:1350
+msgid "source register operand must be even"
+msgstr "operandul registru sursã trebuie sã fie par"
+
+#. Mark as non-valid instruction.
+#: sparc-dis.c:760
 msgid "unknown"
 msgstr "necunoscut(ã)"
 
-#: sparc-dis.c:825
+#: sparc-dis.c:835
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Eroare internã:  opcode.h sparc greºit: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:836
+#: sparc-dis.c:846
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Eroare internã: opcode.h sparc greºit: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:885
+#: sparc-dis.c:895
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr "Eroare internã:  opcode.h sparc greºit: \"%s\" == \"%s\"\n"
 
-#: v850-dis.c:224
+#: v850-dis.c:221
 #, c-format
 msgid "unknown operand shift: %x\n"
 msgstr "schimbare(shift) de oberand necunoscutã: %x\n"
 
-#: v850-dis.c:236
+#: v850-dis.c:233
 #, c-format
 msgid "unknown pop reg: %d\n"
 msgstr "pop reg necunoscut: %d\n"
@@ -379,7 +709,7 @@ msgstr "valoarea deplas
 
 #: v850-opc.c:69
 msgid "displacement value is out of range"
-msgstr "valoare deplasare în afara intervalului"
+msgstr "deplasare"
 
 #: v850-opc.c:70
 msgid "displacement value is not aligned"
@@ -417,30 +747,42 @@ msgstr "valoare direct
 msgid "immediate value must be even"
 msgstr "valoarea directã(immediate) trebuie sã fie parã"
 
-#: xstormy16-asm.c:74
+#: xstormy16-asm.c:76
 msgid "Bad register in preincrement"
 msgstr "Registru greºit în preincrementare"
 
-#: xstormy16-asm.c:79
+#: xstormy16-asm.c:81
 msgid "Bad register in postincrement"
 msgstr "Registru greºit în postincrementare"
 
-#: xstormy16-asm.c:81
+#: xstormy16-asm.c:83
 msgid "Bad register name"
 msgstr "Nume registru greºit"
 
-#: xstormy16-asm.c:85
+#: xstormy16-asm.c:87
 msgid "Label conflicts with register name"
 msgstr "Eticheta(label) se aflã în conflict cu numele de registru"
 
-#: xstormy16-asm.c:89
+#: xstormy16-asm.c:91
 msgid "Label conflicts with `Rx'"
 msgstr "Eticheta(label) se aflã în conflict cu `Rx'"
 
-#: xstormy16-asm.c:91
+#: xstormy16-asm.c:93
 msgid "Bad immediate expression"
 msgstr "Expresie directã(immediate) greºitã"
 
-#: xstormy16-asm.c:120
+#: xstormy16-asm.c:115
+msgid "No relocation for small immediate"
+msgstr "Nici o relocare pentru mai mic directã(immediate)"
+
+#: xstormy16-asm.c:125
 msgid "Small operand was not an immediate number"
 msgstr "Operandul redus nu a fost un numãr direct(immediate)"
+
+#: xstormy16-asm.c:164
+msgid "Operand is not a symbol"
+msgstr "Operandul nu este simbol"
+
+#: xstormy16-asm.c:172
+msgid "Syntax error: No trailing ')'"
+msgstr "Eroare de sintaxã:Nu existã ')'"
index 56190f840bee2bc0c948f4dd804c1a7cff3fe5dd..ae55351a2849649be36998695f0edd2515ac74d0 100644 (file)
@@ -1,12 +1,12 @@
 # Swedish messages for opcodes.
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-# Christian Rose <menthos@menthos.com>, 2001, 2002.
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Christian Rose <menthos@menthos.com>, 2001, 2002, 2003.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.12.91\n"
-"POT-Creation-Date: 2002-07-23 15:55-0400\n"
-"PO-Revision-Date: 2002-08-03 13:19+0200\n"
+"Project-Id-Version: opcodes 2.14rel030712\n"
+"POT-Creation-Date: 2003-07-11 13:56+0930\n"
+"PO-Revision-Date: 2003-07-16 14:36+0200\n"
 "Last-Translator: Christian Rose <menthos@menthos.com>\n"
 "Language-Team: Swedish <sv@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -25,21 +25,21 @@ msgstr "hopptipset ligger inte p
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "Otillåten limm-referens i sista instruktionen!\n"
 
-#: arm-dis.c:507
+#: arm-dis.c:554
 msgid "<illegal precision>"
 msgstr "<otillåten precision>"
 
-#: arm-dis.c:1010
+#: arm-dis.c:1162
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Okänt registernamn är angivet: %s\n"
 
-#: arm-dis.c:1017
+#: arm-dis.c:1169
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
 msgstr "Okänt disassembleralternativ: %s\n"
 
-#: arm-dis.c:1191
+#: arm-dis.c:1343
 msgid ""
 "\n"
 "The following ARM specific disassembler options are supported for use with\n"
@@ -49,26 +49,26 @@ msgstr ""
 "Följande ARM-specifika disassembleralternativ stöds för användning\n"
 "tillsammans med flaggan -M:\n"
 
-#: avr-dis.c:118 avr-dis.c:128
+#: avr-dis.c:117 avr-dis.c:127
 msgid "undefined"
 msgstr "odefinierad"
 
-#: avr-dis.c:180
+#: avr-dis.c:179
 msgid "Internal disassembler error"
 msgstr "Internt fel i disassembleraren"
 
-#: avr-dis.c:228
+#: avr-dis.c:227
 #, c-format
 msgid "unknown constraint `%c'"
 msgstr "okänd begränsning \"%c\""
 
-#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
-#: openrisc-ibld.c:195 xstormy16-ibld.c:195
+#: cgen-asm.c:348 fr30-ibld.c:195 frv-ibld.c:195 ip2k-ibld.c:195
+#: iq2000-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr "operanden är utanför intervallet (%ld är inte mellan %ld och %ld)"
 
-#: cgen-asm.c:367
+#: cgen-asm.c:369
 #, c-format
 msgid "operand out of range (%lu not between %lu and %lu)"
 msgstr "operanden är utanför intervallet (%lu är inte mellan %lu och %lu)"
@@ -89,129 +89,135 @@ msgstr "Ok
 msgid "Address 0x%x is out of bounds.\n"
 msgstr "Adressen 0x%x ligger utanför tillåtna gränser.\n"
 
-#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
-#: xstormy16-asm.c:231
+#: fr30-asm.c:323 frv-asm.c:626 ip2k-asm.c:574 iq2000-asm.c:460 m32r-asm.c:325
+#: openrisc-asm.c:261 xstormy16-asm.c:284
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr "Okänt fält %d vid tolkning.\n"
 
-#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
-#: xstormy16-asm.c:281
+#: fr30-asm.c:373 frv-asm.c:676 ip2k-asm.c:624 iq2000-asm.c:510 m32r-asm.c:375
+#: openrisc-asm.c:311 xstormy16-asm.c:334
 msgid "missing mnemonic in syntax string"
 msgstr "instruktion saknas i syntaxsträng"
 
 #. We couldn't parse it.
-#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
-#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
-#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
-#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
-#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:812
+#: frv-asm.c:816 frv-asm.c:903 frv-asm.c:1005 ip2k-asm.c:760 ip2k-asm.c:764
+#: ip2k-asm.c:851 ip2k-asm.c:953 iq2000-asm.c:646 iq2000-asm.c:650
+#: iq2000-asm.c:737 iq2000-asm.c:839 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:447 openrisc-asm.c:451
+#: openrisc-asm.c:538 openrisc-asm.c:640 xstormy16-asm.c:470
+#: xstormy16-asm.c:474 xstormy16-asm.c:561 xstormy16-asm.c:663
 msgid "unrecognized instruction"
 msgstr "okänd instruktion"
 
-#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
-#: xstormy16-asm.c:464
+#: fr30-asm.c:556 frv-asm.c:859 ip2k-asm.c:807 iq2000-asm.c:693 m32r-asm.c:558
+#: openrisc-asm.c:494 xstormy16-asm.c:517
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "syntaxfel (tecknet \"%c\" förväntades, hittade \"%c\")"
 
-#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
-#: xstormy16-asm.c:474
+#: fr30-asm.c:566 frv-asm.c:869 ip2k-asm.c:817 iq2000-asm.c:703 m32r-asm.c:568
+#: openrisc-asm.c:504 xstormy16-asm.c:527
 #, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
 msgstr "syntaxfel (tecknet \"%c\" förväntades, hittade slutet på instruktion)"
 
-#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
-#: xstormy16-asm.c:502
+#: fr30-asm.c:594 frv-asm.c:897 ip2k-asm.c:845 iq2000-asm.c:731 m32r-asm.c:596
+#: openrisc-asm.c:532 xstormy16-asm.c:555
 msgid "junk at end of line"
 msgstr "skräp vid slutet på raden"
 
-#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
-#: xstormy16-asm.c:609
+#: fr30-asm.c:701 frv-asm.c:1004 ip2k-asm.c:952 iq2000-asm.c:838
+#: m32r-asm.c:703 openrisc-asm.c:639 xstormy16-asm.c:662
 msgid "unrecognized form of instruction"
 msgstr "okänd instruktionsform"
 
-#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
-#: xstormy16-asm.c:621
+#: fr30-asm.c:713 frv-asm.c:1016 ip2k-asm.c:964 iq2000-asm.c:850
+#: m32r-asm.c:715 openrisc-asm.c:651 xstormy16-asm.c:674
 #, c-format
 msgid "bad instruction `%.50s...'"
 msgstr "felaktig instruktion \"%.50s...\""
 
-#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
-#: xstormy16-asm.c:624
+#: fr30-asm.c:716 frv-asm.c:1019 ip2k-asm.c:967 iq2000-asm.c:853
+#: m32r-asm.c:718 openrisc-asm.c:654 xstormy16-asm.c:677
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr "felaktig instruktion \"%.50s\""
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
-#: xstormy16-dis.c:39
+#: fr30-dis.c:41 frv-dis.c:41 ip2k-dis.c:41 iq2000-dis.c:41 m32r-dis.c:41
+#: mmix-dis.c:284 openrisc-dis.c:41 xstormy16-dis.c:41
 msgid "*unknown*"
 msgstr "*okänd*"
 
-#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
-#: xstormy16-dis.c:169
+#: fr30-dis.c:320 frv-dis.c:371 ip2k-dis.c:329 iq2000-dis.c:192 m32r-dis.c:251
+#: openrisc-dis.c:138 xstormy16-dis.c:171
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
 msgstr "Okänt fält %d vid utskrift av instruktion.\n"
 
-#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
-#: xstormy16-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 ip2k-ibld.c:166 iq2000-ibld.c:166
+#: m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
 #, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
 msgstr "operanden är utanför intervallet (%ld är inte mellan %ld och %lu)"
 
-#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
-#: xstormy16-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 ip2k-ibld.c:179 iq2000-ibld.c:179
+#: m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr "operanden utanför intervallet (%lu inte mellan 0 och %lu)"
 
-#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
-#: xstormy16-ibld.c:678
+#: fr30-ibld.c:730 frv-ibld.c:829 ip2k-ibld.c:607 iq2000-ibld.c:713
+#: m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr "Okänt fält %d vid konstruktion av instruktion.\n"
 
-#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
-#: xstormy16-ibld.c:826
+#: fr30-ibld.c:937 frv-ibld.c:1121 ip2k-ibld.c:684 iq2000-ibld.c:890
+#: m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr "Okänt fält %d vid avkodning av instruktion.\n"
 
-#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
-#: xstormy16-ibld.c:939
+#: fr30-ibld.c:1086 frv-ibld.c:1375 ip2k-ibld.c:761 iq2000-ibld.c:1024
+#: m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr "Okänt fält %d vid hämtning av heltalsoperand.\n"
 
-#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
-#: xstormy16-ibld.c:1032
+#: fr30-ibld.c:1215 frv-ibld.c:1609 ip2k-ibld.c:818 iq2000-ibld.c:1138
+#: m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr "Okänt fält %d vid hämtning av vma-operand.\n"
 
-#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
-#: xstormy16-ibld.c:1134
+#: fr30-ibld.c:1349 frv-ibld.c:1852 ip2k-ibld.c:880 iq2000-ibld.c:1261
+#: m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr "Okänt fält %d vid inställning av heltalsoperand.\n"
 
-#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
-#: xstormy16-ibld.c:1224
+#: fr30-ibld.c:1471 frv-ibld.c:2083 ip2k-ibld.c:930 iq2000-ibld.c:1372
+#: m32r-ibld.c:1176 openrisc-ibld.c:1001 xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr "Okänt fält %d vid inställning av vma-operand.\n"
 
-#: h8300-dis.c:385
+#: frv-asm.c:365
+msgid "register number must be even"
+msgstr "registernumret måste vara jämnt"
+
+#: h8300-dis.c:377
 #, c-format
-msgid "Hmmmm %x"
-msgstr "Hmmmm %x"
+msgid "Hmmmm 0x%x"
+msgstr "Hmmmm 0x%x"
 
-#: h8300-dis.c:396
+#: h8300-dis.c:760
 #, c-format
-msgid "Don't understand %x \n"
-msgstr "Förstår inte %x \n"
+msgid "Don't understand 0x%x \n"
+msgstr "Förstår inte 0x%x \n"
 
 #: h8500-dis.c:143
 #, c-format
@@ -224,10 +230,193 @@ msgstr "kan inte s
 msgid "%02x\t\t*unknown*"
 msgstr "%02x\t\t*okänd*"
 
-#: i386-dis.c:1649
+#: i386-dis.c:1699
 msgid "<internal disassembler error>"
 msgstr "<internt fel i disassembleraren>"
 
+#: ia64-gen.c:295
+#, c-format
+msgid "%s: Error: "
+msgstr "%s: Fel: "
+
+#: ia64-gen.c:308
+#, c-format
+msgid "%s: Warning: "
+msgstr "%s: Varning: "
+
+#: ia64-gen.c:494 ia64-gen.c:728
+#, c-format
+msgid "multiple note %s not handled\n"
+msgstr "multipel anteckning %s hanteras inte\n"
+
+#: ia64-gen.c:605
+msgid "can't find ia64-ic.tbl for reading\n"
+msgstr "kan inte hitta ia64-ic.tbl för läsning\n"
+
+#: ia64-gen.c:810
+#, c-format
+msgid "can't find %s for reading\n"
+msgstr "kan inte hitta %s för läsning\n"
+
+#: ia64-gen.c:1034
+#, c-format
+msgid ""
+"most recent format '%s'\n"
+"appears more restrictive than '%s'\n"
+msgstr ""
+"allra senaste formatet \"%s\"\n"
+"verkar mer restriktivt än \"%s\"\n"
+
+#: ia64-gen.c:1045
+#, c-format
+msgid "overlapping field %s->%s\n"
+msgstr "överlappande fält %s->%s\n"
+
+#: ia64-gen.c:1236
+#, c-format
+msgid "overwriting note %d with note %d (IC:%s)\n"
+msgstr "skriver över anteckning %d med anteckning %d (IC:%s)\n"
+
+#: ia64-gen.c:1435
+#, c-format
+msgid "don't know how to specify %% dependency %s\n"
+msgstr "vet inte hur %%-beroende %s ska anges\n"
+
+#: ia64-gen.c:1457
+#, c-format
+msgid "Don't know how to specify # dependency %s\n"
+msgstr "Vet inte hur #-beroende %s ska anges\n"
+
+#: ia64-gen.c:1496
+#, c-format
+msgid "IC:%s [%s] has no terminals or sub-classes\n"
+msgstr "IC:%s [%s] har inga terminaler eller underklasser\n"
+
+#: ia64-gen.c:1499
+#, c-format
+msgid "IC:%s has no terminals or sub-classes\n"
+msgstr "IC:%s har inga terminaler eller underklasser\n"
+
+#: ia64-gen.c:1508
+#, c-format
+msgid "no insns mapped directly to terminal IC %s [%s]"
+msgstr "inga instruktioner mappade direkt till terminal-IC %s [%s]"
+
+#: ia64-gen.c:1511
+#, c-format
+msgid "no insns mapped directly to terminal IC %s\n"
+msgstr "inga instruktioner mappade direkt till terminal-IC %s\n"
+
+#: ia64-gen.c:1522
+#, c-format
+msgid "class %s is defined but not used\n"
+msgstr "klassen %s är definierad men inte använd\n"
+
+# Misstänkt pluralhack!
+#: ia64-gen.c:1533
+#, c-format
+msgid "Warning: rsrc %s (%s) has no chks%s\n"
+msgstr "Varning: rsrc %s (%s) har inga kontroller%s\n"
+
+#: ia64-gen.c:1537
+#, c-format
+msgid "rsrc %s (%s) has no regs\n"
+msgstr "rsrc %s (%s) har inga register\n"
+
+#: ia64-gen.c:2436
+#, c-format
+msgid "IC note %d in opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr ""
+"IC-anteckning %d i instruktion %s (IC:%s) står i konflikt med resurs %s\n"
+"anteckning %d\n"
+
+#: ia64-gen.c:2464
+#, c-format
+msgid "IC note %d for opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr ""
+"IC-anteckning %d för instruktion %s (IC:%s) står i konflikt med resurs %s\n"
+"anteckning %d\n"
+
+#: ia64-gen.c:2478
+#, c-format
+msgid "opcode %s has no class (ops %d %d %d)\n"
+msgstr "instruktion %s har ingen klass (operationer %d %d %d)\n"
+
+#: ia64-gen.c:2789
+#, c-format
+msgid "unable to change directory to \"%s\", errno = %s\n"
+msgstr "kan inte byta katalog till \"%s\", felnummer = %s\n"
+
+#. We've been passed a w.  Return with an error message so that
+#. cgen will try the next parsing option.
+#: ip2k-asm.c:92
+msgid "W keyword invalid in FR operand slot."
+msgstr "W-nyckelord ogiltigt i FR-operandlucka."
+
+#. Invalid offset present.
+#: ip2k-asm.c:122
+msgid "offset(IP) is not a valid form"
+msgstr "avståndet(IP) är inte en giltig form"
+
+#. Found something there in front of (DP) but it's out
+#. of range.
+#: ip2k-asm.c:175
+msgid "(DP) offset out of range."
+msgstr "(DP) avståndet är utanför intervallet."
+
+#. Found something there in front of (SP) but it's out
+#. of range.
+#: ip2k-asm.c:221
+msgid "(SP) offset out of range."
+msgstr "(SP) avståndet är utanför intervallet."
+
+#: ip2k-asm.c:241
+msgid "illegal use of parentheses"
+msgstr "otillåten användning av parenteser"
+
+#: ip2k-asm.c:248
+msgid "operand out of range (not between 1 and 255)"
+msgstr "operanden utanför intervallet (inte mellan 1 och 255)"
+
+#. Something is very wrong. opindex has to be one of the above.
+#: ip2k-asm.c:273
+msgid "parse_addr16: invalid opindex."
+msgstr "parse_addr16: ogiltigt opindex."
+
+#: ip2k-asm.c:353
+msgid "Byte address required. - must be even."
+msgstr "Byteadress krävs - måste vara jämn."
+
+#: ip2k-asm.c:362
+msgid "cgen_parse_address returned a symbol. Literal required."
+msgstr "cgen_parse_address returnerade en symbol. Literal krävs."
+
+#: ip2k-asm.c:420
+#, c-format
+msgid "%operator operand is not a symbol"
+msgstr "%operator-operand är inte en symbol"
+
+#: ip2k-asm.c:474
+msgid "Attempt to find bit index of 0"
+msgstr "Försök att hitta 0-bitindex"
+
+#: iq2000-asm.c:110 iq2000-asm.c:141
+msgid "immediate value cannot be register"
+msgstr "omedelbart värde kan inte vara register"
+
+#: iq2000-asm.c:120 iq2000-asm.c:151
+msgid "immediate value out of range"
+msgstr "omedelbart värde är utanför intervallet"
+
+#: iq2000-asm.c:180
+msgid "21-bit offset out of range"
+msgstr "21-bitars avstånd utanför intervallet"
+
+#: iq2000-asm.c:205 iq2000-asm.c:235 iq2000-asm.c:272 iq2000-asm.c:305
+#: openrisc-asm.c:96 openrisc-asm.c:155
+msgid "missing `)'"
+msgstr "\")\" saknas"
+
 #: m10200-dis.c:199
 #, c-format
 msgid "unknown\t0x%02x"
@@ -238,7 +427,7 @@ msgstr "ok
 msgid "unknown\t0x%04lx"
 msgstr "okänd\t0x%04lx"
 
-#: m10300-dis.c:685
+#: m10300-dis.c:766
 #, c-format
 msgid "unknown\t0x%04x"
 msgstr "okänd\t0x%04x"
@@ -253,21 +442,131 @@ msgstr "<internt fel i instruktionstabellen: %s %s>\n"
 msgid "<function code %d>"
 msgstr "<funktionskod %d>"
 
-#: m88k-dis.c:255
+#: m88k-dis.c:746
 #, c-format
 msgid "# <dis error: %08x>"
 msgstr "# <disassemblerarfel: %08x>"
 
-#: mips-dis.c:337
+#: mips-dis.c:699
+msgid "# internal error, incomplete extension sequence (+)"
+msgstr "# internt fel, ofullständig ändelsesekvens (+)"
+
+#: mips-dis.c:742
+#, c-format
+msgid "# internal error, undefined extension sequence (+%c)"
+msgstr "# internt fel, odefinierad ändelsesekvens (+%c)"
+
+#: mips-dis.c:1000
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr "# internt fel, okänd modifierare(%c)"
 
-#: mips-dis.c:1209
+#: mips-dis.c:1751
 #, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
 msgstr "# internt disassemblerfel, okänd modifierare (%c)"
 
+#: mips-dis.c:1763
+msgid ""
+"\n"
+"The following MIPS specific disassembler options are supported for use\n"
+"with the -M switch (multiple options should be separated by commas):\n"
+msgstr ""
+"\n"
+"Följande MIPS-specifika disassembleralternativ stöds för användning\n"
+"tillsammans med flaggan -M (flera alternativ kan skiljas åt med komman):\n"
+
+#: mips-dis.c:1767
+msgid ""
+"\n"
+"  gpr-names=ABI            Print GPR names according to  specified ABI.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  gpr-names=ABI            Skriv ut GPR-namn enligt det angivna ABI:t.\n"
+"                           Standard: baserat på den binärfil som\n"
+"                           disassembleras.\n"
+
+#: mips-dis.c:1771
+msgid ""
+"\n"
+"  fpr-names=ABI            Print FPR names according to specified ABI.\n"
+"                           Default: numeric.\n"
+msgstr ""
+"\n"
+"  fpr-names=ABI            Skriv ut FPR-namn enligt det angivna ABI:t.\n"
+"                           Standard: numeriskt.\n"
+
+#: mips-dis.c:1775
+msgid ""
+"\n"
+"  cp0-names=ARCH           Print CP0 register names according to\n"
+"                           specified architecture.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  cp0-names=ARK            Skriv ut CP0-registernamn enligt den angivna\n"
+"                           arkitekturen.\n"
+"                           Standard: baserat på den binärfil som\n"
+"                           disassembleras.\n"
+
+#: mips-dis.c:1780
+msgid ""
+"\n"
+"  hwr-names=ARCH           Print HWR names according to specified \n"
+"\t\t\t   architecture.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  hwr-names=ARK            Skriv ut HWR-namn enligt den angivna \n"
+"\t\t\t   arkitekturen.\n"
+"                           Standard: baserat på den binärfil som\n"
+"                           disassembleras.\n"
+
+#: mips-dis.c:1785
+msgid ""
+"\n"
+"  reg-names=ABI            Print GPR and FPR names according to\n"
+"                           specified ABI.\n"
+msgstr ""
+"\n"
+"  reg-names=ABI            Skriv ut GPR- och FPR-namn enligt det angivna\n"
+"                           ABI:t.\n"
+
+#: mips-dis.c:1789
+msgid ""
+"\n"
+"  reg-names=ARCH           Print CP0 register and HWR names according to\n"
+"                           specified architecture.\n"
+msgstr ""
+"\n"
+"  reg-names=ARK            Skriv ut CP0-register med HWR-namn enligt\n"
+"                           angiven arkitektur.\n"
+
+#: mips-dis.c:1793
+msgid ""
+"\n"
+"  For the options above, the following values are supported for \"ABI\":\n"
+"   "
+msgstr ""
+"\n"
+"  För flaggorna ovan stöds följande värden på \"ABI\":\n"
+"   "
+
+#: mips-dis.c:1798 mips-dis.c:1806 mips-dis.c:1808
+msgid "\n"
+msgstr "\n"
+
+#: mips-dis.c:1800
+msgid ""
+"\n"
+"  For the options above, The following values are supported for \"ARCH\":\n"
+"   "
+msgstr ""
+"\n"
+"  För flaggorna ovan stöds följande värden på \"ARK\":\n"
+"   "
+
 #: mmix-dis.c:34
 #, c-format
 msgid "Bad case %d (%s) in %s:%d\n"
@@ -282,7 +581,7 @@ msgstr "Internt: Ej fels
 msgid "(unknown)"
 msgstr "(okänd)"
 
-#: mmix-dis.c:517
+#: mmix-dis.c:519
 #, c-format
 msgid "*unknown operands type: %d*"
 msgstr "*okänd operandtyp: %d*"
@@ -293,76 +592,116 @@ msgstr "*ok
 #. * aoffsetp by since whatever generated this is broken
 #. * anyway!
 #.
-#: ns32k-dis.c:628
+#: ns32k-dis.c:631
 msgid "$<undefined>"
 msgstr "$<odefinierad>"
 
-#: ppc-opc.c:777 ppc-opc.c:810
+#: ppc-opc.c:781 ppc-opc.c:809
 msgid "invalid conditional option"
 msgstr "ogiltig villkorlig flagga"
 
-#: ppc-opc.c:812
+#: ppc-opc.c:811
 msgid "attempt to set y bit when using + or - modifier"
 msgstr "försök att ställa in y-biten då modifieraren + eller - användes"
 
-#: ppc-opc.c:844 ppc-opc.c:896
+#: ppc-opc.c:840
+msgid "offset not a multiple of 16"
+msgstr "avståndet är inte en multipel av 16"
+
+#: ppc-opc.c:860
+msgid "offset not a multiple of 2"
+msgstr "avståndet är inte en multipel av 2"
+
+#: ppc-opc.c:862
+msgid "offset greater than 62"
+msgstr "avståndet är större än 62"
+
+#: ppc-opc.c:881 ppc-opc.c:927 ppc-opc.c:975
 msgid "offset not a multiple of 4"
 msgstr "avståndet är inte en multipel av 4"
 
-#: ppc-opc.c:869
+#: ppc-opc.c:883
+msgid "offset greater than 124"
+msgstr "avståndet är större än 124"
+
+#: ppc-opc.c:902
+msgid "offset not a multiple of 8"
+msgstr "avståndet är inte en multipel av 8"
+
+#: ppc-opc.c:904
+msgid "offset greater than 248"
+msgstr "avståndet är större än 248"
+
+#: ppc-opc.c:950
 msgid "offset not between -2048 and 2047"
 msgstr "avståndet är inte mellan -2048 och 2047"
 
-#: ppc-opc.c:894
+#: ppc-opc.c:973
 msgid "offset not between -8192 and 8191"
 msgstr "avståndet är inte mellan -8192 och 8191"
 
-#: ppc-opc.c:922
+#: ppc-opc.c:1011
+msgid "ignoring invalid mfcr mask"
+msgstr "ignorerar ogiltig mfcr-mask"
+
+#: ppc-opc.c:1059
 msgid "ignoring least significant bits in branch offset"
 msgstr "ignorerar minst signifikanta bitarna i grenavstånd"
 
-#: ppc-opc.c:956 ppc-opc.c:993
+#: ppc-opc.c:1090 ppc-opc.c:1125
 msgid "illegal bitmask"
 msgstr "otillåten bitmask"
 
-#: ppc-opc.c:1066
+#: ppc-opc.c:1192
 msgid "value out of range"
 msgstr "värdet är utanför intervallet"
 
-#: ppc-opc.c:1142
+#: ppc-opc.c:1262
 msgid "index register in load range"
 msgstr "indexregistret är i inläsningsintervallet"
 
-#: ppc-opc.c:1158
+#: ppc-opc.c:1279
+msgid "source and target register operands must be different"
+msgstr "käll- och målregisteroperander måste vara olika"
+
+#: ppc-opc.c:1294
 msgid "invalid register operand when updating"
 msgstr "ogiltig registeroperand vid uppdatering"
 
-#. Mark as non-valid instruction
-#: sparc-dis.c:750
+#: ppc-opc.c:1335
+msgid "target register operand must be even"
+msgstr "målregisteroperand måste vara jämn"
+
+#: ppc-opc.c:1350
+msgid "source register operand must be even"
+msgstr "källregisteroperand måste vara jämn"
+
+#. Mark as non-valid instruction.
+#: sparc-dis.c:760
 msgid "unknown"
 msgstr "okänd"
 
-#: sparc-dis.c:825
+#: sparc-dis.c:835
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Internt fel:  felaktig sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:836
+#: sparc-dis.c:846
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "Internt fel: felaktig sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:885
+#: sparc-dis.c:895
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr "Internt fel: felaktig sparc-opcode.h: \"%s\" == \"%s\"\n"
 
-#: v850-dis.c:224
+#: v850-dis.c:221
 #, c-format
 msgid "unknown operand shift: %x\n"
 msgstr "okänt operandskifte: %x\n"
 
-#: v850-dis.c:236
+#: v850-dis.c:233
 #, c-format
 msgid "unknown pop reg: %d\n"
 msgstr "okänt pop-register: %d\n"
@@ -416,33 +755,54 @@ msgstr "omedelbara v
 msgid "immediate value must be even"
 msgstr "omedelbara värdet måste vara jämnt"
 
-#: xstormy16-asm.c:74
+#: xstormy16-asm.c:76
 msgid "Bad register in preincrement"
 msgstr "Felaktigt register i förhandsökning"
 
-#: xstormy16-asm.c:79
+#: xstormy16-asm.c:81
 msgid "Bad register in postincrement"
 msgstr "Felaktigt register i efterhandsökning"
 
-#: xstormy16-asm.c:81
+#: xstormy16-asm.c:83
 msgid "Bad register name"
 msgstr "Felaktigt registernamn"
 
-#: xstormy16-asm.c:85
+#: xstormy16-asm.c:87
 msgid "Label conflicts with register name"
-msgstr "Etiketten är i konflikt med registernamn"
+msgstr "Etiketten står i konflikt med registernamn"
 
-#: xstormy16-asm.c:89
+#: xstormy16-asm.c:91
 msgid "Label conflicts with `Rx'"
-msgstr "Etiketten är i konflikt med \"Rx\""
+msgstr "Etiketten står i konflikt med \"Rx\""
 
-#: xstormy16-asm.c:91
+#: xstormy16-asm.c:93
 msgid "Bad immediate expression"
 msgstr "Felaktigt omedelbart uttryck"
 
-#: xstormy16-asm.c:120
+#: xstormy16-asm.c:115
+msgid "No relocation for small immediate"
+msgstr "Ingen omlokalisering för litet omedelbart tal"
+
+#: xstormy16-asm.c:125
 msgid "Small operand was not an immediate number"
 msgstr "Liten operand var inte ett omedelbart tal"
 
+#: xstormy16-asm.c:164
+msgid "Operand is not a symbol"
+msgstr "Operanden är inte en symbol"
+
+#: xstormy16-asm.c:172
+msgid "Syntax error: No trailing ')'"
+msgstr "Syntaxfel: Inget eftersläpande \")\""
+
+#~ msgid "Hmmmm %x"
+#~ msgstr "Hmmmm %x"
+
+#~ msgid "Don't understand %x \n"
+#~ msgstr "Förstår inte %x \n"
+
+#~ msgid "No relocation for small immediate number"
+#~ msgstr "Ingen omlokalisering för litet omedelbart tal"
+
 #~ msgid "unrecognized keyword/register name"
 #~ msgstr "okänt namn på nyckelord/register"
index 75ef049a4ffe572ba7b915194ad91499b9947749..f01f58dbf1597b5d9050704dbe9f729f794f4f0a 100644 (file)
@@ -1,18 +1,18 @@
-# Binutils Opcode Turkish Translation
-# Copyright (C) 2001 Free Software Foundation, Inc.
-# Deniz Akkus Kanca <deniz@arayan.com>, 2001.
+# translation of opcodes-2.14rel030712.tr.po to Turkish
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# Deniz Akkus Kanca <deniz@arayan.com>, 2001,2003.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: opcodes 2.12.91\n"
-"POT-Creation-Date: 2002-07-23 15:55-0400\n"
-"PO-Revision-Date: 2002-07-24 11:26EET\n"
+"Project-Id-Version: opcodes 2.14rel030712\n"
+"POT-Creation-Date: 2003-07-11 13:56+0930\n"
+"PO-Revision-Date: 2003-07-13 22:58+0300\n"
 "Last-Translator: Deniz Akkus Kanca <deniz@arayan.com>\n"
 "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 0.9.5\n"
+"X-Generator: KBabel 1.0\n"
 
 #: alpha-opc.c:335
 msgid "branch operand unaligned"
@@ -26,21 +26,21 @@ msgstr "atlama işareti hizalı değil"
 msgid "Illegal limm reference in last instruction!\n"
 msgstr "Son işlemde geçersiz limm referansı!\n"
 
-#: arm-dis.c:507
+#: arm-dis.c:554
 msgid "<illegal precision>"
 msgstr "<geçersiz kesinlik>"
 
-#: arm-dis.c:1010
+#: arm-dis.c:1162
 #, c-format
 msgid "Unrecognised register name set: %s\n"
 msgstr "Bilinmeyen yazmaç ad kümesi: %s\n"
 
-#: arm-dis.c:1017
+#: arm-dis.c:1169
 #, c-format
 msgid "Unrecognised disassembler option: %s\n"
 msgstr "Bilinmeyen karşıt-çevirici seçeneği: %s\n"
 
-#: arm-dis.c:1191
+#: arm-dis.c:1343
 msgid ""
 "\n"
 "The following ARM specific disassembler options are supported for use with\n"
@@ -50,26 +50,26 @@ msgstr ""
 "Aşağıdaki ARM'a özgü karşıt-çevirici seçenekleri \n"
 "-M seçeneği ile kullanılabilir:\n"
 
-#: avr-dis.c:118 avr-dis.c:128
+#: avr-dis.c:117 avr-dis.c:127
 msgid "undefined"
 msgstr "tanımlanmamış"
 
-#: avr-dis.c:180
+#: avr-dis.c:179
 msgid "Internal disassembler error"
 msgstr "İç karşıt-çevirici hatası "
 
-#: avr-dis.c:228
+#: avr-dis.c:227
 #, c-format
 msgid "unknown constraint `%c'"
 msgstr "`%c' bilinmeyen kısıtı"
 
-#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
-#: openrisc-ibld.c:195 xstormy16-ibld.c:195
+#: cgen-asm.c:348 fr30-ibld.c:195 frv-ibld.c:195 ip2k-ibld.c:195
+#: iq2000-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195
 #, c-format
 msgid "operand out of range (%ld not between %ld and %ld)"
 msgstr "Kapsam dışı terim (%ld, %ld ve %ld arasında değil) "
 
-#: cgen-asm.c:367
+#: cgen-asm.c:369
 #, c-format
 msgid "operand out of range (%lu not between %lu and %lu)"
 msgstr "Kapsam dışı terim (%lu, %lu ve %lu arasında değil)"
@@ -90,129 +90,135 @@ msgstr "Bilinmeyen hata %d\n"
 msgid "Address 0x%x is out of bounds.\n"
 msgstr "0x%x adresi sınırların dışında.\n"
 
-#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
-#: xstormy16-asm.c:231
+#: fr30-asm.c:323 frv-asm.c:626 ip2k-asm.c:574 iq2000-asm.c:460 m32r-asm.c:325
+#: openrisc-asm.c:261 xstormy16-asm.c:284
 #, c-format
 msgid "Unrecognized field %d while parsing.\n"
 msgstr "Ayrıştırma esnasında bilinmeyen alan %d bulundu.\n"
 
-#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
-#: xstormy16-asm.c:281
+#: fr30-asm.c:373 frv-asm.c:676 ip2k-asm.c:624 iq2000-asm.c:510 m32r-asm.c:375
+#: openrisc-asm.c:311 xstormy16-asm.c:334
 msgid "missing mnemonic in syntax string"
 msgstr "biçem dizgesinde ipucu eksik"
 
 #. We couldn't parse it.
-#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
-#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
-#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
-#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
-#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:812
+#: frv-asm.c:816 frv-asm.c:903 frv-asm.c:1005 ip2k-asm.c:760 ip2k-asm.c:764
+#: ip2k-asm.c:851 ip2k-asm.c:953 iq2000-asm.c:646 iq2000-asm.c:650
+#: iq2000-asm.c:737 iq2000-asm.c:839 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:447 openrisc-asm.c:451
+#: openrisc-asm.c:538 openrisc-asm.c:640 xstormy16-asm.c:470
+#: xstormy16-asm.c:474 xstormy16-asm.c:561 xstormy16-asm.c:663
 msgid "unrecognized instruction"
 msgstr "bilinmeyen işlem"
 
-#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
-#: xstormy16-asm.c:464
+#: fr30-asm.c:556 frv-asm.c:859 ip2k-asm.c:807 iq2000-asm.c:693 m32r-asm.c:558
+#: openrisc-asm.c:494 xstormy16-asm.c:517
 #, c-format
 msgid "syntax error (expected char `%c', found `%c')"
 msgstr "biçem hatası (char `%c' beklenirken `%c' bulundu)"
 
-#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
-#: xstormy16-asm.c:474
+#: fr30-asm.c:566 frv-asm.c:869 ip2k-asm.c:817 iq2000-asm.c:703 m32r-asm.c:568
+#: openrisc-asm.c:504 xstormy16-asm.c:527
 #, c-format
 msgid "syntax error (expected char `%c', found end of instruction)"
 msgstr "biçem hatası (char `%c' beklenirken işlem sonu bulundu)"
 
-#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
-#: xstormy16-asm.c:502
+#: fr30-asm.c:594 frv-asm.c:897 ip2k-asm.c:845 iq2000-asm.c:731 m32r-asm.c:596
+#: openrisc-asm.c:532 xstormy16-asm.c:555
 msgid "junk at end of line"
 msgstr "Satır sonu bozuk "
 
-#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
-#: xstormy16-asm.c:609
+#: fr30-asm.c:701 frv-asm.c:1004 ip2k-asm.c:952 iq2000-asm.c:838
+#: m32r-asm.c:703 openrisc-asm.c:639 xstormy16-asm.c:662
 msgid "unrecognized form of instruction"
 msgstr "bilinmeyen işlem türü"
 
-#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
-#: xstormy16-asm.c:621
+#: fr30-asm.c:713 frv-asm.c:1016 ip2k-asm.c:964 iq2000-asm.c:850
+#: m32r-asm.c:715 openrisc-asm.c:651 xstormy16-asm.c:674
 #, c-format
 msgid "bad instruction `%.50s...'"
 msgstr "geçersiz işlem `%.50s...'"
 
-#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
-#: xstormy16-asm.c:624
+#: fr30-asm.c:716 frv-asm.c:1019 ip2k-asm.c:967 iq2000-asm.c:853
+#: m32r-asm.c:718 openrisc-asm.c:654 xstormy16-asm.c:677
 #, c-format
 msgid "bad instruction `%.50s'"
 msgstr "geçersiz işlem `%.50s'"
 
 #. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
-#: xstormy16-dis.c:39
+#: fr30-dis.c:41 frv-dis.c:41 ip2k-dis.c:41 iq2000-dis.c:41 m32r-dis.c:41
+#: mmix-dis.c:284 openrisc-dis.c:41 xstormy16-dis.c:41
 msgid "*unknown*"
 msgstr "*bilinmeyen*"
 
-#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
-#: xstormy16-dis.c:169
+#: fr30-dis.c:320 frv-dis.c:371 ip2k-dis.c:329 iq2000-dis.c:192 m32r-dis.c:251
+#: openrisc-dis.c:138 xstormy16-dis.c:171
 #, c-format
 msgid "Unrecognized field %d while printing insn.\n"
 msgstr "yönerge yazdırılırken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
-#: xstormy16-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 ip2k-ibld.c:166 iq2000-ibld.c:166
+#: m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
 #, c-format
 msgid "operand out of range (%ld not between %ld and %lu)"
 msgstr "Kapsam dışı işlenen (%ld, %ld ve %lu arasında değil) "
 
-#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
-#: xstormy16-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 ip2k-ibld.c:179 iq2000-ibld.c:179
+#: m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
 #, c-format
 msgid "operand out of range (%lu not between 0 and %lu)"
 msgstr "kapsam dışı terim (%lu 0 ve %lu arasında değil) "
 
-#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
-#: xstormy16-ibld.c:678
+#: fr30-ibld.c:730 frv-ibld.c:829 ip2k-ibld.c:607 iq2000-ibld.c:713
+#: m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
 #, c-format
 msgid "Unrecognized field %d while building insn.\n"
 msgstr "Yönerge oluşturulurken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
-#: xstormy16-ibld.c:826
+#: fr30-ibld.c:937 frv-ibld.c:1121 ip2k-ibld.c:684 iq2000-ibld.c:890
+#: m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
 #, c-format
 msgid "Unrecognized field %d while decoding insn.\n"
 msgstr "Yönerge çözümlenirken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
-#: xstormy16-ibld.c:939
+#: fr30-ibld.c:1086 frv-ibld.c:1375 ip2k-ibld.c:761 iq2000-ibld.c:1024
+#: m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
 #, c-format
 msgid "Unrecognized field %d while getting int operand.\n"
 msgstr "`int' terimi alınırken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
-#: xstormy16-ibld.c:1032
+#: fr30-ibld.c:1215 frv-ibld.c:1609 ip2k-ibld.c:818 iq2000-ibld.c:1138
+#: m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
 #, c-format
 msgid "Unrecognized field %d while getting vma operand.\n"
 msgstr "`vma' terimi alınırken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
-#: xstormy16-ibld.c:1134
+#: fr30-ibld.c:1349 frv-ibld.c:1852 ip2k-ibld.c:880 iq2000-ibld.c:1261
+#: m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
 #, c-format
 msgid "Unrecognized field %d while setting int operand.\n"
 msgstr "`int' terimi atanırken bilinmeyen alan %d bulundu.\n"
 
-#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
-#: xstormy16-ibld.c:1224
+#: fr30-ibld.c:1471 frv-ibld.c:2083 ip2k-ibld.c:930 iq2000-ibld.c:1372
+#: m32r-ibld.c:1176 openrisc-ibld.c:1001 xstormy16-ibld.c:1224
 #, c-format
 msgid "Unrecognized field %d while setting vma operand.\n"
 msgstr "`vma' terimi atanırken bilinmeyen alan %d bulundu.\n"
 
-#: h8300-dis.c:385
+#: frv-asm.c:365
+msgid "register number must be even"
+msgstr "yazmaç çift sayı olmalı"
+
+#: h8300-dis.c:377
 #, c-format
-msgid "Hmmmm %x"
-msgstr "Hmmmm %x"
+msgid "Hmmmm 0x%x"
+msgstr "Hmmmm 0x%x"
 
-#: h8300-dis.c:396
+#: h8300-dis.c:760
 #, c-format
-msgid "Don't understand %x \n"
-msgstr "%x anlaşılamadı\n"
+msgid "Don't understand 0x%x \n"
+msgstr "0x%x anlaşılamadı\n"
 
 #: h8500-dis.c:143
 #, c-format
@@ -225,10 +231,188 @@ msgstr "insert %d yaptırılamıyor\n"
 msgid "%02x\t\t*unknown*"
 msgstr "%02x\t\t*bilinmeyen*"
 
-#: i386-dis.c:1649
+#: i386-dis.c:1699
 msgid "<internal disassembler error>"
 msgstr "<iç karşıt-çevirici hatası>"
 
+#: ia64-gen.c:295
+#, c-format
+msgid "%s: Error: "
+msgstr "%s: Hata: "
+
+#: ia64-gen.c:308
+#, c-format
+msgid "%s: Warning: "
+msgstr "%s: Uyarı: "
+
+#: ia64-gen.c:494 ia64-gen.c:728
+#, c-format
+msgid "multiple note %s not handled\n"
+msgstr "çoklu not %s desteklenmiyor\n"
+
+#: ia64-gen.c:605
+msgid "can't find ia64-ic.tbl for reading\n"
+msgstr "ia64-ic.tbl okunmak için bulunamadı\n"
+
+#: ia64-gen.c:810
+#, c-format
+msgid "can't find %s for reading\n"
+msgstr "%s okunmak için bulunamadı\n"
+
+#: ia64-gen.c:1034
+#, c-format
+msgid ""
+"most recent format '%s'\n"
+"appears more restrictive than '%s'\n"
+msgstr ""
+"en son biçem '%s'\n"
+"'%s'dan daha kısıtlayıcı\n"
+
+#: ia64-gen.c:1045
+#, c-format
+msgid "overlapping field %s->%s\n"
+msgstr "üstüste binmiş alan %s->%s\n"
+
+#: ia64-gen.c:1236
+#, c-format
+msgid "overwriting note %d with note %d (IC:%s)\n"
+msgstr "%2$d notu %1$d notunun üstüne yazılıyor (IC:%3$s)\n"
+
+#: ia64-gen.c:1435
+#, c-format
+msgid "don't know how to specify %% dependency %s\n"
+msgstr "%% %s bağımlılığının nasıl tanımlanacağı bilinmiyor\n"
+
+#: ia64-gen.c:1457
+#, c-format
+msgid "Don't know how to specify # dependency %s\n"
+msgstr "# %s bağımlılığının nasıl tanımlanacağı bilinmiyor\n"
+
+#: ia64-gen.c:1496
+#, c-format
+msgid "IC:%s [%s] has no terminals or sub-classes\n"
+msgstr "IC: %s [%s]'nin değişmez simgeleri veya alt sınıfları yok\n"
+
+#: ia64-gen.c:1499
+#, c-format
+msgid "IC:%s has no terminals or sub-classes\n"
+msgstr "IC: %s'nin değişmez simgeleri veya alt sınıfları yok\n"
+
+#: ia64-gen.c:1508
+#, c-format
+msgid "no insns mapped directly to terminal IC %s [%s]"
+msgstr "değişmez simge IC %s [%s]'ye direkt eşleşen işlem yok "
+
+#: ia64-gen.c:1511
+#, c-format
+msgid "no insns mapped directly to terminal IC %s\n"
+msgstr "değişmez simge IC %s'ye direkt eşleşen işlem yok\n"
+
+#: ia64-gen.c:1522
+#, c-format
+msgid "class %s is defined but not used\n"
+msgstr "%s sınıfı tanımlanmış fakat kullanılmamış\n"
+
+#: ia64-gen.c:1533
+#, c-format
+msgid "Warning: rsrc %s (%s) has no chks%s\n"
+msgstr "Uyarı: rsrc %s (%s) içinde kontrol yok %s\n"
+
+#: ia64-gen.c:1537
+#, c-format
+msgid "rsrc %s (%s) has no regs\n"
+msgstr "rsrc %s (%s) içinde yazmaç yok\n"
+
+#: ia64-gen.c:2436
+#, c-format
+msgid "IC note %d in opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr "(IC:%3$s) opkod %2$s içinde IC notu %1$d, %4$s kaynağı %5$d notuyla çelişiyor\n"
+
+#: ia64-gen.c:2464
+#, c-format
+msgid "IC note %d for opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr "(IC:%3$s) opkod %2$s için IC notu %1$d, %4$s kaynağı %5$d notuyla çelişiyor\n"
+
+#: ia64-gen.c:2478
+#, c-format
+msgid "opcode %s has no class (ops %d %d %d)\n"
+msgstr "%s opkodunun sınıfları yok (ops %d %d %d)\n"
+
+#: ia64-gen.c:2789
+#, c-format
+msgid "unable to change directory to \"%s\", errno = %s\n"
+msgstr "\"%s\" dizinine geçilemedi, hatano = %s\n"
+
+#. We've been passed a w.  Return with an error message so that
+#. cgen will try the next parsing option.
+#: ip2k-asm.c:92
+msgid "W keyword invalid in FR operand slot."
+msgstr "FR işlenen slotunda W anahtar kelimesi geçersiz."
+
+#. Invalid offset present.
+#: ip2k-asm.c:122
+msgid "offset(IP) is not a valid form"
+msgstr "görece(IP) geçerli biçimde değil"
+
+#. Found something there in front of (DP) but it's out
+#. of range.
+#: ip2k-asm.c:175
+msgid "(DP) offset out of range."
+msgstr "(DP) görecesi aralık dışı."
+
+#. Found something there in front of (SP) but it's out
+#. of range.
+#: ip2k-asm.c:221
+msgid "(SP) offset out of range."
+msgstr "(SP) görece aralık dışı."
+
+#: ip2k-asm.c:241
+msgid "illegal use of parentheses"
+msgstr "parantezlerin geçersiz kullanımı"
+
+#: ip2k-asm.c:248
+msgid "operand out of range (not between 1 and 255)"
+msgstr "kapsam dışı işlenen (1 ve 255 arasında değil)"
+
+#. Something is very wrong. opindex has to be one of the above.
+#: ip2k-asm.c:273
+msgid "parse_addr16: invalid opindex."
+msgstr "parse_addr16: geçersiz opindeks."
+
+#: ip2k-asm.c:353
+msgid "Byte address required. - must be even."
+msgstr "Bayt adresi gerekli. - çift sayı olmalı."
+
+#: ip2k-asm.c:362
+msgid "cgen_parse_address returned a symbol. Literal required."
+msgstr "cgen_parse_address bir sembol döndürdü. Sabit gerekli."
+
+#: ip2k-asm.c:420
+#, c-format
+msgid "%operator operand is not a symbol"
+msgstr "%operator işleneni sembol değil"
+
+#: ip2k-asm.c:474
+msgid "Attempt to find bit index of 0"
+msgstr "0'ın bit indeksini bulma denemesi"
+
+#: iq2000-asm.c:110 iq2000-asm.c:141
+msgid "immediate value cannot be register"
+msgstr "şimdiki değer yazmaç olamaz"
+
+#: iq2000-asm.c:120 iq2000-asm.c:151
+msgid "immediate value out of range"
+msgstr "şimdiki değer kapsam dışı"
+
+#: iq2000-asm.c:180
+msgid "21-bit offset out of range"
+msgstr "21 bit görece değer aralık dışı"
+
+#: iq2000-asm.c:205 iq2000-asm.c:235 iq2000-asm.c:272 iq2000-asm.c:305
+#: openrisc-asm.c:96 openrisc-asm.c:155
+msgid "missing `)'"
+msgstr "eksik `)'"
+
 #: m10200-dis.c:199
 #, c-format
 msgid "unknown\t0x%02x"
@@ -239,7 +423,7 @@ msgstr "bilinmeyen\t0x%02x"
 msgid "unknown\t0x%04lx"
 msgstr "bilinmeyen\t0x%04lx"
 
-#: m10300-dis.c:685
+#: m10300-dis.c:766
 #, c-format
 msgid "unknown\t0x%04x"
 msgstr "bilinmeyen\t0x%04x"
@@ -254,21 +438,127 @@ msgstr "<işlemci kod tablosunda iç hata: %s %s>\n"
 msgid "<function code %d>"
 msgstr "<işlev kodu %d>"
 
-#: m88k-dis.c:255
+#: m88k-dis.c:746
 #, c-format
 msgid "# <dis error: %08x>"
 msgstr "# <`dis' hatası: %08x>"
 
-#: mips-dis.c:337
+#: mips-dis.c:699
+msgid "# internal error, incomplete extension sequence (+)"
+msgstr "# iç hata, eksik uzatma dizisi (+)"
+
+#: mips-dis.c:742
+#, c-format
+msgid "# internal error, undefined extension sequence (+%c)"
+msgstr "# iç hata, tanımlanmamış uzatma dizisi (+%c)"
+
+#: mips-dis.c:1000
 #, c-format
 msgid "# internal error, undefined modifier(%c)"
 msgstr "#iç hata, tanımlanmamış değiştirici (%c)"
 
-#: mips-dis.c:1209
+#: mips-dis.c:1751
 #, c-format
 msgid "# internal disassembler error, unrecognised modifier (%c)"
 msgstr "#iç karşıt-çevirici hatası, tanımlanmamış değiştirici (%c)"
 
+#: mips-dis.c:1763
+msgid ""
+"\n"
+"The following MIPS specific disassembler options are supported for use\n"
+"with the -M switch (multiple options should be separated by commas):\n"
+msgstr ""
+"\n"
+"Aşağıdaki MIPS'e özgü karşıt-çevirici seçenekleri \n"
+"-M seçeneği ile kullanılabilir (birden fazla seçenek virgülle ayrılmalıdır):\n"
+
+#: mips-dis.c:1767
+msgid ""
+"\n"
+"  gpr-names=ABI            Print GPR names according to  specified ABI.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  gpr-names=ABI            Belirtilen ABI'ye göre GPR isimlerini gösterir.\n"
+"                           Öntanımlı: karşıt-çevrilen ikilik dosyaya göre.\n"
+
+#: mips-dis.c:1771
+msgid ""
+"\n"
+"  fpr-names=ABI            Print FPR names according to specified ABI.\n"
+"                           Default: numeric.\n"
+msgstr ""
+"\n"
+"  fpr-names=ABI            Belirtilen ABI'ye göre FPR isimlerini gösterir.\n"
+"                           Öntanımlı: sayısal.\n"
+
+#: mips-dis.c:1775
+msgid ""
+"\n"
+"  cp0-names=ARCH           Print CP0 register names according to\n"
+"                           specified architecture.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  cp0-names=MİMARİ         Belirtilen mimariye göre CP0 yazmaç isimlerini\n"
+"                           gösterir.\n"
+"                           Öntanımlı: karşıt-çevrilen ikilik dosyaya göre.\n"
+
+#: mips-dis.c:1780
+msgid ""
+"\n"
+"  hwr-names=ARCH           Print HWR names according to specified \n"
+"\t\t\t   architecture.\n"
+"                           Default: based on binary being disassembled.\n"
+msgstr ""
+"\n"
+"  hwr-names=MİMARİ         Belirtilen mimariye göre HWR isimlerini gösterir.\n"
+"                           Öntanımlı: karşıt-çevrilen ikilik dosyaya göre.\n"
+
+#: mips-dis.c:1785
+msgid ""
+"\n"
+"  reg-names=ABI            Print GPR and FPR names according to\n"
+"                           specified ABI.\n"
+msgstr ""
+"\n"
+"  reg-names=ABI            Belirtilen ABI'ye göre GPR ve FPR isimlerini\n"
+"                           gösterir.\n"
+
+#: mips-dis.c:1789
+msgid ""
+"\n"
+"  reg-names=ARCH           Print CP0 register and HWR names according to\n"
+"                           specified architecture.\n"
+msgstr ""
+"\n"
+"  reg-names=MİMARİ         Belirtilen mimariye göre CP0 yazmaç ve HWR\n"
+"                           isimlerini gösterir.\n"
+
+#: mips-dis.c:1793
+msgid ""
+"\n"
+"  For the options above, the following values are supported for \"ABI\":\n"
+"   "
+msgstr ""
+"\n"
+"  Yukarıdaki seçeneklere göre \"ABI\" için aşağıdaki değerler desteklenir:\n"
+"   "
+
+#: mips-dis.c:1798 mips-dis.c:1806 mips-dis.c:1808
+msgid "\n"
+msgstr "\n"
+
+#: mips-dis.c:1800
+msgid ""
+"\n"
+"  For the options above, The following values are supported for \"ARCH\":\n"
+"   "
+msgstr ""
+"\n"
+"  Yukarıdaki seçeneklere göre \"ARCH\" için aşağıdaki değerler desteklenir:\n"
+"   "
+
 #: mmix-dis.c:34
 #, c-format
 msgid "Bad case %d (%s) in %s:%d\n"
@@ -283,7 +573,7 @@ msgstr "İç Hata: Hata ayıklanmamış kod (test eksik): %s:%d"
 msgid "(unknown)"
 msgstr "(bilinmeyen)"
 
-#: mmix-dis.c:517
+#: mmix-dis.c:519
 #, c-format
 msgid "*unknown operands type: %d*"
 msgstr "bilinmeyen işlenen türü: %d*"
@@ -294,76 +584,116 @@ msgstr "bilinmeyen işlenen türü: %d*"
 #. * aoffsetp by since whatever generated this is broken
 #. * anyway!
 #.
-#: ns32k-dis.c:628
+#: ns32k-dis.c:631
 msgid "$<undefined>"
 msgstr "$<tanımlanmamış>"
 
-#: ppc-opc.c:777 ppc-opc.c:810
+#: ppc-opc.c:781 ppc-opc.c:809
 msgid "invalid conditional option"
 msgstr "koşullu seçenek geçersiz "
 
-#: ppc-opc.c:812
+#: ppc-opc.c:811
 msgid "attempt to set y bit when using + or - modifier"
 msgstr "+ veya - değiştiricisini kullanırken y bitini atama denemesi"
 
-#: ppc-opc.c:844 ppc-opc.c:896
+#: ppc-opc.c:840
+msgid "offset not a multiple of 16"
+msgstr "görece 16'nın katı değil"
+
+#: ppc-opc.c:860
+msgid "offset not a multiple of 2"
+msgstr "görece 2'nin katı değil"
+
+#: ppc-opc.c:862
+msgid "offset greater than 62"
+msgstr "görece 62'den büyük"
+
+#: ppc-opc.c:881 ppc-opc.c:927 ppc-opc.c:975
 msgid "offset not a multiple of 4"
 msgstr "görece 4'ün katı değil"
 
-#: ppc-opc.c:869
+#: ppc-opc.c:883
+msgid "offset greater than 124"
+msgstr "görece 124'ten büyük"
+
+#: ppc-opc.c:902
+msgid "offset not a multiple of 8"
+msgstr "görece 8'in katı değil"
+
+#: ppc-opc.c:904
+msgid "offset greater than 248"
+msgstr "görece 248'den büyük"
+
+#: ppc-opc.c:950
 msgid "offset not between -2048 and 2047"
 msgstr "görece -2048 ve 2047 arasında değil"
 
-#: ppc-opc.c:894
+#: ppc-opc.c:973
 msgid "offset not between -8192 and 8191"
 msgstr "görece -8192 ve 8191 arasında değil"
 
-#: ppc-opc.c:922
+#: ppc-opc.c:1011
+msgid "ignoring invalid mfcr mask"
+msgstr "geçersiz mfcr maskesi yoksayıldı"
+
+#: ppc-opc.c:1059
 msgid "ignoring least significant bits in branch offset"
 msgstr "Dal göreli konumunda en önemsiz bitler atlanıyor"
 
-#: ppc-opc.c:956 ppc-opc.c:993
+#: ppc-opc.c:1090 ppc-opc.c:1125
 msgid "illegal bitmask"
 msgstr "geçersiz bitmask "
 
-#: ppc-opc.c:1066
+#: ppc-opc.c:1192
 msgid "value out of range"
 msgstr "değer aralık dışı"
 
-#: ppc-opc.c:1142
+#: ppc-opc.c:1262
 msgid "index register in load range"
 msgstr "yükleme aralığında endeks yazmacı"
 
-#: ppc-opc.c:1158
+#: ppc-opc.c:1279
+msgid "source and target register operands must be different"
+msgstr "kaynak ve hedef yazmaç işlenenleri farklı olmalı"
+
+#: ppc-opc.c:1294
 msgid "invalid register operand when updating"
 msgstr "güncelleme esnasında geçersiz yazmaç terimi bulundu"
 
-#. Mark as non-valid instruction
-#: sparc-dis.c:750
+#: ppc-opc.c:1335
+msgid "target register operand must be even"
+msgstr "hedef yazmaç işleneni çift sayı olmalı"
+
+#: ppc-opc.c:1350
+msgid "source register operand must be even"
+msgstr "kaynak yazmaç işleneni çift sayı olmalı"
+
+#. Mark as non-valid instruction.
+#: sparc-dis.c:760
 msgid "unknown"
 msgstr "bilinmeyen"
 
-#: sparc-dis.c:825
+#: sparc-dis.c:835
 #, c-format
 msgid "Internal error:  bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "İç hata: geçersiz sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:836
+#: sparc-dis.c:846
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 msgstr "İç hata: geçersiz sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
 
-#: sparc-dis.c:885
+#: sparc-dis.c:895
 #, c-format
 msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
 msgstr "İç hata: geçersiz sparc-opcode.h: \"%s\" == \"%s\"\n"
 
-#: v850-dis.c:224
+#: v850-dis.c:221
 #, c-format
 msgid "unknown operand shift: %x\n"
 msgstr "bilinmeyen terim kaydırması: %x\n"
 
-#: v850-dis.c:236
+#: v850-dis.c:233
 #, c-format
 msgid "unknown pop reg: %d\n"
 msgstr "bilinmeyen çek yazmacı: %d\n"
@@ -417,30 +747,42 @@ msgstr "şimdiki değer kapsam dışı ve çift sayı değil"
 msgid "immediate value must be even"
 msgstr "şimdiki değer çift sayı olmalı"
 
-#: xstormy16-asm.c:74
+#: xstormy16-asm.c:76
 msgid "Bad register in preincrement"
 msgstr "Arttırma öncesinde geçersiz yazmaç"
 
-#: xstormy16-asm.c:79
+#: xstormy16-asm.c:81
 msgid "Bad register in postincrement"
 msgstr "Arttırma sonrasında  geçersiz yazmaç "
 
-#: xstormy16-asm.c:81
+#: xstormy16-asm.c:83
 msgid "Bad register name"
 msgstr "Geçersiz yazmaç adı"
 
-#: xstormy16-asm.c:85
+#: xstormy16-asm.c:87
 msgid "Label conflicts with register name"
 msgstr "Etiket, yazmaç adıyla çakışıyor"
 
-#: xstormy16-asm.c:89
+#: xstormy16-asm.c:91
 msgid "Label conflicts with `Rx'"
 msgstr "Etiket, `Rx' ile çakışıyor"
 
-#: xstormy16-asm.c:91
+#: xstormy16-asm.c:93
 msgid "Bad immediate expression"
 msgstr "Hatalı şimdiki ifade"
 
-#: xstormy16-asm.c:120
+#: xstormy16-asm.c:115
+msgid "No relocation for small immediate"
+msgstr "Küçük şimdiki için yerdeğiştirme yok"
+
+#: xstormy16-asm.c:125
 msgid "Small operand was not an immediate number"
 msgstr "Küçük işlenen şimdiki sayı değil"
+
+#: xstormy16-asm.c:164
+msgid "Operand is not a symbol"
+msgstr "İşlenen bir sembol değil"
+
+#: xstormy16-asm.c:172
+msgid "Syntax error: No trailing ')'"
+msgstr "Sözdizim hatası: Sonlandıran ')' yok"
index 3df7dc16b06ad618d5ff0e0d436551c83141217b..b8b8b1ad59231a90185d06226c911b3be8e3529b 100644 (file)
@@ -1,5 +1,6 @@
 /* ppc-dis.c -- Disassemble PowerPC instructions
-   Copyright 1994, 1995, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright 1994, 1995, 2000, 2001, 2002, 2003
+   Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support
 
 This file is part of GDB, GAS, and the GNU binutils.
@@ -214,7 +215,7 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
 
          /* Extract the value from the instruction.  */
          if (operand->extract)
-           value = (*operand->extract) (insn, dialect, (int *) NULL);
+           value = (*operand->extract) (insn, dialect, &invalid);
          else
            {
              value = (insn >> operand->shift) & ((1 << operand->bits) - 1);
index a6e93131ebf5ea987971417c709752213c69d13a..0f04cfb8468bd77262304ce8d09d45433c55b3a7 100644 (file)
 \f
 /* Local insertion and extraction functions.  */
 
-static unsigned long insert_bat
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_bat
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_bba
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_bba
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_bd
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_bd
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_bdm
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_bdm
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_bdp
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_bdp
-  PARAMS ((unsigned long, int, int *));
-static int valid_bo
-  PARAMS ((long, int));
-static unsigned long insert_bo
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_bo
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_boe
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_boe
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_dq
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_dq
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_ds
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_ds
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_de
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_de
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_des
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_des
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_li
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_li
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_mbe
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_mbe
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_mb6
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_mb6
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_nb
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_nb
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_nsi
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_nsi
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_ral
-  PARAMS ((unsigned long, long, int, const char **));
-static unsigned long insert_ram
-  PARAMS ((unsigned long, long, int, const char **));
-static unsigned long insert_raq
-  PARAMS ((unsigned long, long, int, const char **));
-static unsigned long insert_ras
-  PARAMS ((unsigned long, long, int, const char **));
-static unsigned long insert_rbs
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_rbs
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_rsq
-  PARAMS ((unsigned long, long, int, const char **));
-static unsigned long insert_rtq
-  PARAMS ((unsigned long, long, int, const char **));
-static unsigned long insert_sh6
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_sh6
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_spr
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_spr
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_tbr
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_tbr
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_ev2
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_ev2
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_ev4
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_ev4
-  PARAMS ((unsigned long, int, int *));
-static unsigned long insert_ev8
-  PARAMS ((unsigned long, long, int, const char **));
-static long extract_ev8
-  PARAMS ((unsigned long, int, int *));
+static unsigned long insert_bat (unsigned long, long, int, const char **);
+static long extract_bat (unsigned long, int, int *);
+static unsigned long insert_bba (unsigned long, long, int, const char **);
+static long extract_bba (unsigned long, int, int *);
+static unsigned long insert_bd (unsigned long, long, int, const char **);
+static long extract_bd (unsigned long, int, int *);
+static unsigned long insert_bdm (unsigned long, long, int, const char **);
+static long extract_bdm (unsigned long, int, int *);
+static unsigned long insert_bdp (unsigned long, long, int, const char **);
+static long extract_bdp (unsigned long, int, int *);
+static unsigned long insert_bo (unsigned long, long, int, const char **);
+static long extract_bo (unsigned long, int, int *);
+static unsigned long insert_boe (unsigned long, long, int, const char **);
+static long extract_boe (unsigned long, int, int *);
+static unsigned long insert_dq (unsigned long, long, int, const char **);
+static long extract_dq (unsigned long, int, int *);
+static unsigned long insert_ds (unsigned long, long, int, const char **);
+static long extract_ds (unsigned long, int, int *);
+static unsigned long insert_de (unsigned long, long, int, const char **);
+static long extract_de (unsigned long, int, int *);
+static unsigned long insert_des (unsigned long, long, int, const char **);
+static long extract_des (unsigned long, int, int *);
+static unsigned long insert_fxm (unsigned long, long, int, const char **);
+static long extract_fxm (unsigned long, int, int *);
+static unsigned long insert_li (unsigned long, long, int, const char **);
+static long extract_li (unsigned long, int, int *);
+static unsigned long insert_mbe (unsigned long, long, int, const char **);
+static long extract_mbe (unsigned long, int, int *);
+static unsigned long insert_mb6 (unsigned long, long, int, const char **);
+static long extract_mb6 (unsigned long, int, int *);
+static unsigned long insert_nb (unsigned long, long, int, const char **);
+static long extract_nb (unsigned long, int, int *);
+static unsigned long insert_nsi (unsigned long, long, int, const char **);
+static long extract_nsi (unsigned long, int, int *);
+static unsigned long insert_ral (unsigned long, long, int, const char **);
+static unsigned long insert_ram (unsigned long, long, int, const char **);
+static unsigned long insert_raq (unsigned long, long, int, const char **);
+static unsigned long insert_ras (unsigned long, long, int, const char **);
+static unsigned long insert_rbs (unsigned long, long, int, const char **);
+static long extract_rbs (unsigned long, int, int *);
+static unsigned long insert_rsq (unsigned long, long, int, const char **);
+static unsigned long insert_rtq (unsigned long, long, int, const char **);
+static unsigned long insert_sh6 (unsigned long, long, int, const char **);
+static long extract_sh6 (unsigned long, int, int *);
+static unsigned long insert_spr (unsigned long, long, int, const char **);
+static long extract_spr (unsigned long, int, int *);
+static unsigned long insert_tbr (unsigned long, long, int, const char **);
+static long extract_tbr (unsigned long, int, int *);
+static unsigned long insert_ev2 (unsigned long, long, int, const char **);
+static long extract_ev2 (unsigned long, int, int *);
+static unsigned long insert_ev4 (unsigned long, long, int, const char **);
+static long extract_ev4 (unsigned long, int, int *);
+static unsigned long insert_ev8 (unsigned long, long, int, const char **);
+static long extract_ev8 (unsigned long, int, int *);
 \f
 /* The operands table.
 
@@ -341,10 +289,14 @@ const struct powerpc_operand powerpc_operands[] =
   /* The FXM field in an XFX instruction.  */
 #define FXM FRS + 1
 #define FXM_MASK (0xff << 12)
-  { 8, 12, 0, 0, 0 },
+  { 8, 12, insert_fxm, extract_fxm, 0 },
+
+  /* Power4 version for mfcr.  */
+#define FXM4 FXM + 1
+  { 8, 12, insert_fxm, extract_fxm, PPC_OPERAND_OPTIONAL },
 
   /* The L field in a D or X form instruction.  */
-#define L FXM + 1
+#define L FXM4 + 1
   { 1, 21, 0, 0, PPC_OPERAND_OPTIONAL },
 
   /* The LEV field in a POWER SC form instruction.  */
@@ -598,23 +550,20 @@ const struct powerpc_operand powerpc_operands[] =
 
 /*ARGSUSED*/
 static unsigned long
-insert_bat (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value ATTRIBUTE_UNUSED;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
+insert_bat (unsigned long insn,
+           long value ATTRIBUTE_UNUSED,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg ATTRIBUTE_UNUSED)
 {
   return insn | (((insn >> 21) & 0x1f) << 16);
 }
 
 static long
-extract_bat (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid;
+extract_bat (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid)
 {
-  if (invalid != (int *) NULL
-      && ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
+  if (((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
     *invalid = 1;
   return 0;
 }
@@ -627,23 +576,20 @@ extract_bat (insn, dialect, invalid)
 
 /*ARGSUSED*/
 static unsigned long
-insert_bba (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value ATTRIBUTE_UNUSED;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
+insert_bba (unsigned long insn,
+           long value ATTRIBUTE_UNUSED,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg ATTRIBUTE_UNUSED)
 {
   return insn | (((insn >> 16) & 0x1f) << 11);
 }
 
 static long
-extract_bba (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid;
+extract_bba (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid)
 {
-  if (invalid != (int *) NULL
-      && ((insn >> 16) & 0x1f) != ((insn >> 11) & 0x1f))
+  if (((insn >> 16) & 0x1f) != ((insn >> 11) & 0x1f))
     *invalid = 1;
   return 0;
 }
@@ -653,21 +599,19 @@ extract_bba (insn, dialect, invalid)
 
 /*ARGSUSED*/
 static unsigned long
-insert_bd (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
+insert_bd (unsigned long insn,
+          long value,
+          int dialect ATTRIBUTE_UNUSED,
+          const char **errmsg ATTRIBUTE_UNUSED)
 {
   return insn | (value & 0xfffc);
 }
 
 /*ARGSUSED*/
 static long
-extract_bd (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid ATTRIBUTE_UNUSED;
+extract_bd (unsigned long insn,
+           int dialect ATTRIBUTE_UNUSED,
+           int *invalid ATTRIBUTE_UNUSED)
 {
   return ((insn & 0xfffc) ^ 0x8000) - 0x8000;
 }
@@ -687,11 +631,10 @@ extract_bd (insn, dialect, invalid)
 
 /*ARGSUSED*/
 static unsigned long
-insert_bdm (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect;
-     const char **errmsg ATTRIBUTE_UNUSED;
+insert_bdm (unsigned long insn,
+           long value,
+           int dialect,
+           const char **errmsg ATTRIBUTE_UNUSED)
 {
   if ((dialect & PPC_OPCODE_POWER4) == 0)
     {
@@ -709,25 +652,22 @@ insert_bdm (insn, value, dialect, errmsg)
 }
 
 static long
-extract_bdm (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect;
-     int *invalid;
+extract_bdm (unsigned long insn,
+            int dialect,
+            int *invalid)
 {
-  if (invalid != (int *) NULL)
+  if ((dialect & PPC_OPCODE_POWER4) == 0)
     {
-      if ((dialect & PPC_OPCODE_POWER4) == 0)
-       {
-         if (((insn & (1 << 21)) == 0) != ((insn & (1 << 15)) == 0))
-           *invalid = 1;
-       }
-      else
-       {
-         if ((insn & (0x17 << 21)) != (0x06 << 21)
-             && (insn & (0x1d << 21)) != (0x18 << 21))
-           *invalid = 1;
-       }
+      if (((insn & (1 << 21)) == 0) != ((insn & (1 << 15)) == 0))
+       *invalid = 1;
     }
+  else
+    {
+      if ((insn & (0x17 << 21)) != (0x06 << 21)
+         && (insn & (0x1d << 21)) != (0x18 << 21))
+       *invalid = 1;
+    }
+
   return ((insn & 0xfffc) ^ 0x8000) - 0x8000;
 }
 
@@ -737,11 +677,10 @@ extract_bdm (insn, dialect, invalid)
 
 /*ARGSUSED*/
 static unsigned long
-insert_bdp (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect;
-     const char **errmsg ATTRIBUTE_UNUSED;
+insert_bdp (unsigned long insn,
+           long value,
+           int dialect,
+           const char **errmsg ATTRIBUTE_UNUSED)
 {
   if ((dialect & PPC_OPCODE_POWER4) == 0)
     {
@@ -759,34 +698,29 @@ insert_bdp (insn, value, dialect, errmsg)
 }
 
 static long
-extract_bdp (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect;
-     int *invalid;
+extract_bdp (unsigned long insn,
+            int dialect,
+            int *invalid)
 {
-  if (invalid != (int *) NULL)
+  if ((dialect & PPC_OPCODE_POWER4) == 0)
     {
-      if ((dialect & PPC_OPCODE_POWER4) == 0)
-       {
-         if (((insn & (1 << 21)) == 0) == ((insn & (1 << 15)) == 0))
-           *invalid = 1;
-       }
-      else
-       {
-         if ((insn & (0x17 << 21)) != (0x07 << 21)
-             && (insn & (0x1d << 21)) != (0x19 << 21))
-           *invalid = 1;
-       }
+      if (((insn & (1 << 21)) == 0) == ((insn & (1 << 15)) == 0))
+       *invalid = 1;
     }
+  else
+    {
+      if ((insn & (0x17 << 21)) != (0x07 << 21)
+         && (insn & (0x1d << 21)) != (0x19 << 21))
+       *invalid = 1;
+    }
+
   return ((insn & 0xfffc) ^ 0x8000) - 0x8000;
 }
 
 /* Check for legal values of a BO field.  */
 
 static int
-valid_bo (value, dialect)
-     long value;
-     int dialect;
+valid_bo (long value, int dialect)
 {
   if ((dialect & PPC_OPCODE_POWER4) == 0)
     {
@@ -838,29 +772,25 @@ valid_bo (value, dialect)
    the field to an illegal value.  */
 
 static unsigned long
-insert_bo (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect;
-     const char **errmsg;
+insert_bo (unsigned long insn,
+          long value,
+          int dialect,
+          const char **errmsg)
 {
-  if (errmsg != (const char **) NULL
-      && ! valid_bo (value, dialect))
+  if (!valid_bo (value, dialect))
     *errmsg = _("invalid conditional option");
   return insn | ((value & 0x1f) << 21);
 }
 
 static long
-extract_bo (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect;
-     int *invalid;
+extract_bo (unsigned long insn,
+           int dialect,
+           int *invalid)
 {
   long value;
 
   value = (insn >> 21) & 0x1f;
-  if (invalid != (int *) NULL
-      && ! valid_bo (value, dialect))
+  if (!valid_bo (value, dialect))
     *invalid = 1;
   return value;
 }
@@ -870,128 +800,115 @@ extract_bo (insn, dialect, invalid)
    extracting it, we force it to be even.  */
 
 static unsigned long
-insert_boe (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect;
-     const char **errmsg;
+insert_boe (unsigned long insn,
+           long value,
+           int dialect,
+           const char **errmsg)
 {
-  if (errmsg != (const char **) NULL)
-    {
-      if (! valid_bo (value, dialect))
-       *errmsg = _("invalid conditional option");
-      else if ((value & 1) != 0)
-       *errmsg = _("attempt to set y bit when using + or - modifier");
-    }
+  if (!valid_bo (value, dialect))
+    *errmsg = _("invalid conditional option");
+  else if ((value & 1) != 0)
+    *errmsg = _("attempt to set y bit when using + or - modifier");
+
   return insn | ((value & 0x1f) << 21);
 }
 
 static long
-extract_boe (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect;
-     int *invalid;
+extract_boe (unsigned long insn,
+            int dialect,
+            int *invalid)
 {
   long value;
 
   value = (insn >> 21) & 0x1f;
-  if (invalid != (int *) NULL
-      && ! valid_bo (value, dialect))
+  if (!valid_bo (value, dialect))
     *invalid = 1;
   return value & 0x1e;
 }
 
-  /* The DQ field in a DQ form instruction.  This is like D, but the
-     lower four bits are forced to zero. */
+/* The DQ field in a DQ form instruction.  This is like D, but the
+   lower four bits are forced to zero. */
 
 /*ARGSUSED*/
 static unsigned long
-insert_dq (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char ** errmsg ATTRIBUTE_UNUSED;
+insert_dq (unsigned long insn,
+          long value,
+          int dialect ATTRIBUTE_UNUSED,
+          const char **errmsg)
 {
-  if ((value & 0xf) != 0 && errmsg != NULL)
+  if ((value & 0xf) != 0)
     *errmsg = _("offset not a multiple of 16");
   return insn | (value & 0xfff0);
 }
 
 /*ARGSUSED*/
 static long
-extract_dq (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid ATTRIBUTE_UNUSED;
+extract_dq (unsigned long insn,
+           int dialect ATTRIBUTE_UNUSED,
+           int *invalid ATTRIBUTE_UNUSED)
 {
   return ((insn & 0xfff0) ^ 0x8000) - 0x8000;
 }
 
 static unsigned long
-insert_ev2 (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char ** errmsg ATTRIBUTE_UNUSED;
+insert_ev2 (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg)
 {
-  if ((value & 1) != 0 && errmsg != NULL)
+  if ((value & 1) != 0)
     *errmsg = _("offset not a multiple of 2");
-  if ((value > 62) != 0 && errmsg != NULL)
+  if ((value > 62) != 0)
     *errmsg = _("offset greater than 62");
   return insn | ((value & 0x3e) << 10);
 }
 
 static long
-extract_ev2 (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int * invalid ATTRIBUTE_UNUSED;
+extract_ev2 (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid ATTRIBUTE_UNUSED)
 {
   return (insn >> 10) & 0x3e;
 }
 
 static unsigned long
-insert_ev4 (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char ** errmsg ATTRIBUTE_UNUSED;
+insert_ev4 (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg)
 {
-  if ((value & 3) != 0 && errmsg != NULL)
+  if ((value & 3) != 0)
     *errmsg = _("offset not a multiple of 4");
-  if ((value > 124) != 0 && errmsg != NULL)
+  if ((value > 124) != 0)
     *errmsg = _("offset greater than 124");
   return insn | ((value & 0x7c) << 9);
 }
 
 static long
-extract_ev4 (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int * invalid ATTRIBUTE_UNUSED;
+extract_ev4 (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid ATTRIBUTE_UNUSED)
 {
   return (insn >> 9) & 0x7c;
 }
 
 static unsigned long
-insert_ev8 (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char ** errmsg ATTRIBUTE_UNUSED;
+insert_ev8 (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg)
 {
-  if ((value & 7) != 0 && errmsg != NULL)
+  if ((value & 7) != 0)
     *errmsg = _("offset not a multiple of 8");
-  if ((value > 248) != 0 && errmsg != NULL)
+  if ((value > 248) != 0)
     *errmsg = _("offset greater than 248");
   return insn | ((value & 0xf8) << 8);
 }
 
 static long
-extract_ev8 (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int * invalid ATTRIBUTE_UNUSED;
+extract_ev8 (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid ATTRIBUTE_UNUSED)
 {
   return (insn >> 8) & 0xf8;
 }
@@ -1001,23 +918,21 @@ extract_ev8 (insn, dialect, invalid)
 
 /*ARGSUSED*/
 static unsigned long
-insert_ds (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_ds (unsigned long insn,
+          long value,
+          int dialect ATTRIBUTE_UNUSED,
+          const char **errmsg)
 {
-  if ((value & 3) != 0 && errmsg != NULL)
+  if ((value & 3) != 0)
     *errmsg = _("offset not a multiple of 4");
   return insn | (value & 0xfffc);
 }
 
 /*ARGSUSED*/
 static long
-extract_ds (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid ATTRIBUTE_UNUSED;
+extract_ds (unsigned long insn,
+           int dialect ATTRIBUTE_UNUSED,
+           int *invalid ATTRIBUTE_UNUSED)
 {
   return ((insn & 0xfffc) ^ 0x8000) - 0x8000;
 }
@@ -1026,23 +941,21 @@ extract_ds (insn, dialect, invalid)
 
 /*ARGSUSED*/
 static unsigned long
-insert_de (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_de (unsigned long insn,
+          long value,
+          int dialect ATTRIBUTE_UNUSED,
+          const char **errmsg)
 {
-  if ((value > 2047 || value < -2048) && errmsg != NULL)
+  if (value > 2047 || value < -2048)
     *errmsg = _("offset not between -2048 and 2047");
   return insn | ((value << 4) & 0xfff0);
 }
 
 /*ARGSUSED*/
 static long
-extract_de (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid ATTRIBUTE_UNUSED;
+extract_de (unsigned long insn,
+           int dialect ATTRIBUTE_UNUSED,
+           int *invalid ATTRIBUTE_UNUSED)
 {
   return (insn & 0xfff0) >> 4;
 }
@@ -1051,51 +964,107 @@ extract_de (insn, dialect, invalid)
 
 /*ARGSUSED*/
 static unsigned long
-insert_des (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_des (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg)
 {
-  if ((value > 8191 || value < -8192) && errmsg != NULL)
+  if (value > 8191 || value < -8192)
     *errmsg = _("offset not between -8192 and 8191");
-  else if ((value & 3) != 0 && errmsg != NULL)
+  else if ((value & 3) != 0)
     *errmsg = _("offset not a multiple of 4");
   return insn | ((value << 2) & 0xfff0);
 }
 
 /*ARGSUSED*/
 static long
-extract_des (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid ATTRIBUTE_UNUSED;
+extract_des (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid ATTRIBUTE_UNUSED)
 {
   return (((insn >> 2) & 0x3ffc) ^ 0x2000) - 0x2000;
 }
 
+/* FXM mask in mfcr and mtcrf instructions.  */
+
+static unsigned long
+insert_fxm (unsigned long insn,
+           long value,
+           int dialect,
+           const char **errmsg)
+{
+  /* If the optional field on mfcr is missing that means we want to use
+     the old form of the instruction that moves the whole cr.  In that
+     case we'll have VALUE zero.  There doesn't seem to be a way to
+     distinguish this from the case where someone writes mfcr %r3,0.  */
+  if (value == 0)
+    ;
+
+  /* If only one bit of the FXM field is set, we can use the new form
+     of the instruction, which is faster.  */
+  else if ((dialect & PPC_OPCODE_POWER4) != 0 && (value & -value) == value)
+    insn |= 1 << 20;
+
+  /* Any other value on mfcr is an error.  */
+  else if ((insn & (0x3ff << 1)) == 19 << 1)
+    {
+      *errmsg = _("ignoring invalid mfcr mask");
+      value = 0;
+    }
+
+  return insn | ((value & 0xff) << 12);
+}
+
+static long
+extract_fxm (unsigned long insn,
+            int dialect,
+            int *invalid)
+{
+  long mask = (insn >> 12) & 0xff;
+
+  /* Is this a Power4 insn?  */
+  if ((insn & (1 << 20)) != 0)
+    {
+      if ((dialect & PPC_OPCODE_POWER4) == 0)
+       *invalid = 1;
+      else
+       {
+         /* Exactly one bit of MASK should be set.  */
+         if (mask == 0 || (mask & -mask) != mask)
+           *invalid = 1;
+       }
+    }
+
+  /* Check that non-power4 form of mfcr has a zero MASK.  */
+  else if ((insn & (0x3ff << 1)) == 19 << 1)
+    {
+      if (mask != 0)
+       *invalid = 1;
+    }
+
+  return mask;
+}
+
 /* The LI field in an I form instruction.  The lower two bits are
    forced to zero.  */
 
 /*ARGSUSED*/
 static unsigned long
-insert_li (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_li (unsigned long insn,
+          long value,
+          int dialect ATTRIBUTE_UNUSED,
+          const char **errmsg)
 {
-  if ((value & 3) != 0 && errmsg != (const char **) NULL)
+  if ((value & 3) != 0)
     *errmsg = _("ignoring least significant bits in branch offset");
   return insn | (value & 0x3fffffc);
 }
 
 /*ARGSUSED*/
 static long
-extract_li (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid ATTRIBUTE_UNUSED;
+extract_li (unsigned long insn,
+           int dialect ATTRIBUTE_UNUSED,
+           int *invalid ATTRIBUTE_UNUSED)
 {
   return ((insn & 0x3fffffc) ^ 0x2000000) - 0x2000000;
 }
@@ -1106,11 +1075,10 @@ extract_li (insn, dialect, invalid)
    instruction which uses a field of this type.  */
 
 static unsigned long
-insert_mbe (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_mbe (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg)
 {
   unsigned long uval, mask;
   int mb, me, mx, count, last;
@@ -1119,8 +1087,7 @@ insert_mbe (insn, value, dialect, errmsg)
 
   if (uval == 0)
     {
-      if (errmsg != (const char **) NULL)
-       *errmsg = _("illegal bitmask");
+      *errmsg = _("illegal bitmask");
       return insn;
     }
 
@@ -1136,7 +1103,7 @@ insert_mbe (insn, value, dialect, errmsg)
   /* me: location of last 1->0 transition */
   /* count: # transitions */
 
-  for (mx = 0, mask = (long) 1 << 31; mx < 32; ++mx, mask >>= 1)
+  for (mx = 0, mask = 1L << 31; mx < 32; ++mx, mask >>= 1)
     {
       if ((uval & mask) && !last)
        {
@@ -1155,26 +1122,21 @@ insert_mbe (insn, value, dialect, errmsg)
     me = 32;
 
   if (count != 2 && (count != 0 || ! last))
-    {
-      if (errmsg != (const char **) NULL)
-       *errmsg = _("illegal bitmask");
-    }
+    *errmsg = _("illegal bitmask");
 
   return insn | (mb << 6) | ((me - 1) << 1);
 }
 
 static long
-extract_mbe (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid;
+extract_mbe (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid)
 {
   long ret;
   int mb, me;
   int i;
 
-  if (invalid != (int *) NULL)
-    *invalid = 1;
+  *invalid = 1;
 
   mb = (insn >> 6) & 0x1f;
   me = (insn >> 1) & 0x1f;
@@ -1182,15 +1144,15 @@ extract_mbe (insn, dialect, invalid)
     {
       ret = 0;
       for (i = mb; i <= me; i++)
-       ret |= (long) 1 << (31 - i);
+       ret |= 1L << (31 - i);
     }
   else if (mb == me + 1)
     ret = ~0;
   else /* (mb > me + 1) */
     {
-      ret = ~ (long) 0;
+      ret = ~0;
       for (i = me + 1; i < mb; i++)
-       ret &= ~ ((long) 1 << (31 - i));
+       ret &= ~(1L << (31 - i));
     }
   return ret;
 }
@@ -1200,21 +1162,19 @@ extract_mbe (insn, dialect, invalid)
 
 /*ARGSUSED*/
 static unsigned long
-insert_mb6 (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
+insert_mb6 (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg ATTRIBUTE_UNUSED)
 {
   return insn | ((value & 0x1f) << 6) | (value & 0x20);
 }
 
 /*ARGSUSED*/
 static long
-extract_mb6 (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid ATTRIBUTE_UNUSED;
+extract_mb6 (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid ATTRIBUTE_UNUSED)
 {
   return ((insn >> 6) & 0x1f) | (insn & 0x20);
 }
@@ -1223,11 +1183,10 @@ extract_mb6 (insn, dialect, invalid)
    0.  */
 
 static unsigned long
-insert_nb (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_nb (unsigned long insn,
+          long value,
+          int dialect ATTRIBUTE_UNUSED,
+          const char **errmsg)
 {
   if (value < 0 || value > 32)
     *errmsg = _("value out of range");
@@ -1238,10 +1197,9 @@ insert_nb (insn, value, dialect, errmsg)
 
 /*ARGSUSED*/
 static long
-extract_nb (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid ATTRIBUTE_UNUSED;
+extract_nb (unsigned long insn,
+           int dialect ATTRIBUTE_UNUSED,
+           int *invalid ATTRIBUTE_UNUSED)
 {
   long ret;
 
@@ -1258,24 +1216,21 @@ extract_nb (insn, dialect, invalid)
 
 /*ARGSUSED*/
 static unsigned long
-insert_nsi (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
+insert_nsi (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg ATTRIBUTE_UNUSED)
 {
-  return insn | ((- value) & 0xffff);
+  return insn | (-value & 0xffff);
 }
 
 static long
-extract_nsi (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid;
+extract_nsi (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid)
 {
-  if (invalid != (int *) NULL)
-    *invalid = 1;
-  return - (((insn & 0xffff) ^ 0x8000) - 0x8000);
+  *invalid = 1;
+  return -(((insn & 0xffff) ^ 0x8000) - 0x8000);
 }
 
 /* The RA field in a D or X form instruction which is an updating
@@ -1283,11 +1238,10 @@ extract_nsi (insn, dialect, invalid)
    equal the RT field.  */
 
 static unsigned long
-insert_ral (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_ral (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg)
 {
   if (value == 0
       || (unsigned long) value == ((insn >> 21) & 0x1f))
@@ -1299,31 +1253,29 @@ insert_ral (insn, value, dialect, errmsg)
    restrictions.  */
 
 static unsigned long
-insert_ram (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_ram (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg)
 {
   if ((unsigned long) value >= ((insn >> 21) & 0x1f))
     *errmsg = _("index register in load range");
   return insn | ((value & 0x1f) << 16);
 }
 
-  /* The RA field in the DQ form lq instruction, which has special 
-     value restrictions.  */
+/* The RA field in the DQ form lq instruction, which has special 
+   value restrictions.  */
 
 /*ARGSUSED*/
 static unsigned long
-insert_raq (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_raq (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg)
 {
   long rtvalue = (insn & RT_MASK) >> 21;
 
-  if (value == rtvalue && errmsg != NULL)
+  if (value == rtvalue)
     *errmsg = _("source and target register operands must be different");
   return insn | ((value & 0x1f) << 16);
 }
@@ -1333,11 +1285,10 @@ insert_raq (insn, value, dialect, errmsg)
    field may not be zero.  */
 
 static unsigned long
-insert_ras (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_ras (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg)
 {
   if (value == 0)
     *errmsg = _("invalid register operand when updating");
@@ -1352,55 +1303,50 @@ insert_ras (insn, value, dialect, errmsg)
 
 /*ARGSUSED*/
 static unsigned long
-insert_rbs (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value ATTRIBUTE_UNUSED;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
+insert_rbs (unsigned long insn,
+           long value ATTRIBUTE_UNUSED,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg ATTRIBUTE_UNUSED)
 {
   return insn | (((insn >> 21) & 0x1f) << 11);
 }
 
 static long
-extract_rbs (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid;
+extract_rbs (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid)
 {
-  if (invalid != (int *) NULL
-      && ((insn >> 21) & 0x1f) != ((insn >> 11) & 0x1f))
+  if (((insn >> 21) & 0x1f) != ((insn >> 11) & 0x1f))
     *invalid = 1;
   return 0;
 }
 
-  /* The RT field of the DQ form lq instruction, which has special
-     value restrictions.  */
+/* The RT field of the DQ form lq instruction, which has special
+   value restrictions.  */
 
 /*ARGSUSED*/
 static unsigned long
-insert_rtq (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_rtq (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg)
 {
-  if ((value & 1) != 0 && errmsg != NULL)
+  if ((value & 1) != 0)
     *errmsg = _("target register operand must be even");
   return insn | ((value & 0x1f) << 21);
 }
 
-  /* The RS field of the DS form stq instruction, which has special 
-     value restrictions.  */
+/* The RS field of the DS form stq instruction, which has special 
+   value restrictions.  */
 
 /*ARGSUSED*/
 static unsigned long
-insert_rsq (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value ATTRIBUTE_UNUSED;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg;
+insert_rsq (unsigned long insn,
+           long value ATTRIBUTE_UNUSED,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg)
 {
-  if ((value & 1) != 0 && errmsg != NULL)
+  if ((value & 1) != 0)
     *errmsg = _("source register operand must be even");
   return insn | ((value & 0x1f) << 21);
 }
@@ -1409,21 +1355,19 @@ insert_rsq (insn, value, dialect, errmsg)
 
 /*ARGSUSED*/
 static unsigned long
-insert_sh6 (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
+insert_sh6 (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg ATTRIBUTE_UNUSED)
 {
   return insn | ((value & 0x1f) << 11) | ((value & 0x20) >> 4);
 }
 
 /*ARGSUSED*/
 static long
-extract_sh6 (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid ATTRIBUTE_UNUSED;
+extract_sh6 (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid ATTRIBUTE_UNUSED)
 {
   return ((insn >> 11) & 0x1f) | ((insn << 4) & 0x20);
 }
@@ -1432,20 +1376,18 @@ extract_sh6 (insn, dialect, invalid)
    lower 5 bits are stored in the upper 5 and vice- versa.  */
 
 static unsigned long
-insert_spr (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
+insert_spr (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg ATTRIBUTE_UNUSED)
 {
   return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6);
 }
 
 static long
-extract_spr (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid ATTRIBUTE_UNUSED;
+extract_spr (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid ATTRIBUTE_UNUSED)
 {
   return ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
 }
@@ -1461,11 +1403,10 @@ extract_spr (insn, dialect, invalid)
 #define TB (268)
 
 static unsigned long
-insert_tbr (insn, value, dialect, errmsg)
-     unsigned long insn;
-     long value;
-     int dialect ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
+insert_tbr (unsigned long insn,
+           long value,
+           int dialect ATTRIBUTE_UNUSED,
+           const char **errmsg ATTRIBUTE_UNUSED)
 {
   if (value == 0)
     value = TB;
@@ -1473,10 +1414,9 @@ insert_tbr (insn, value, dialect, errmsg)
 }
 
 static long
-extract_tbr (insn, dialect, invalid)
-     unsigned long insn;
-     int dialect ATTRIBUTE_UNUSED;
-     int *invalid ATTRIBUTE_UNUSED;
+extract_tbr (unsigned long insn,
+            int dialect ATTRIBUTE_UNUSED,
+            int *invalid ATTRIBUTE_UNUSED)
 {
   long ret;
 
@@ -1739,7 +1679,7 @@ extract_tbr (insn, dialect, invalid)
 #define XS_MASK XS (0x3f, 0x1ff, 1)
 
 /* A mask for the FXM version of an XFX form instruction.  */
-#define XFXFXM_MASK (X_MASK | (((unsigned long)1) << 20) | (((unsigned long)1) << 11))
+#define XFXFXM_MASK (X_MASK | (1 << 11))
 
 /* An XFX form instruction with the FXM field filled in.  */
 #define XFXM(op, xop, fxm) \
@@ -3286,7 +3226,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
 { "iseleq",  X(31,79),      X_MASK,    PPCISEL,        { RT, RA, RB } },
 { "isel",    XISEL(31,15),  XISEL_MASK,        PPCISEL,        { RT, RA, RB, CRB } },
 
-{ "mfcr",    X(31,19), XRARB_MASK,     COM,            { RT } },
+{ "mfcr",    X(31,19), XRARB_MASK,     NOPOWER4,       { RT } },
+{ "mfcr",    X(31,19), XFXFXM_MASK,    POWER4,         { RT, FXM4 } },
 
 { "lwarx",   X(31,20), X_MASK,         PPC,            { RT, RA, RB } },
 
@@ -3437,7 +3378,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
 
 { "dcbtstlse",X(31,142),X_MASK,                PPCCHLK64,      { CT, RA, RB }},
 
-{ "mtcr",    XFXM(31,144,0xff), XFXFXM_MASK|FXM_MASK, COM,     { RS }},
+{ "mtcr",    XFXM(31,144,0xff), XRARB_MASK, COM,       { RS }},
 { "mtcrf",   X(31,144),        XFXFXM_MASK,    COM,            { FXM, RS } },
 
 { "mtmsr",   X(31,146),        XRARB_MASK,     COM,            { RS } },
index 33121c78b70374fae7f5cc1eb5cbe05a1693508f..42f5151d3f0090bf06de9daeed4f1afb2fd75fe7 100644 (file)
@@ -89,6 +89,10 @@ s390_extract_operand (insn, operand)
   val >>= -bits;
   val &= ((1U << (operand->bits - 1)) << 1) - 1;
 
+  /* Check for special long displacement case.  */
+  if (operand->bits == 20 && operand->shift == 20)
+    val = (val & 0xff) << 12 | (val & 0xfff00) >> 8;
+
   /* Sign extend value if the operand is signed or pc relative.  */
   if ((operand->flags & (S390_OPERAND_SIGNED | S390_OPERAND_PCREL))
       && (val & (1U << (operand->bits - 1))))
index caa9993a88131d6cb5f9adaa8867a8d32257698b..34188e6216f40ab45f8d152e8df288ea3a0a7463 100644 (file)
@@ -34,7 +34,8 @@ enum s390_opcode_cpu_val
   {
     S390_OPCODE_G5 = 0,
     S390_OPCODE_G6,
-    S390_OPCODE_Z900
+    S390_OPCODE_Z900,
+    S390_OPCODE_Z990
   };
 
 struct op_struct
@@ -192,6 +193,8 @@ main (void)
            min_cpu = S390_OPCODE_G6;
          else if (strcmp (cpu_string, "z900") == 0)
            min_cpu = S390_OPCODE_Z900;
+         else if (strcmp (cpu_string, "z990") == 0)
+           min_cpu = S390_OPCODE_Z990;
          else {
            fprintf (stderr, "Couldn't parse cpu string %s\n", cpu_string);
            exit (1);
index a2837833d7443a18072df0adc512344db3a39f61..1a4b276a64327c480eb373d9b5ba2ff5359182b4 100644 (file)
@@ -98,33 +98,35 @@ const struct s390_operand s390_operands[] =
   { 12, 20, S390_OPERAND_DISP },
 #define D_36   25                 /* Displacement starting at position 36 */
   { 12, 36, S390_OPERAND_DISP },
+#define D20_20 26                /* 20 bit displacement starting at 20 */
+  { 20, 20, S390_OPERAND_DISP|S390_OPERAND_SIGNED },
 
-#define L4_8   26                 /* 4 bit length starting at position 8 */
+#define L4_8   27                 /* 4 bit length starting at position 8 */
   { 4, 8, S390_OPERAND_LENGTH },
-#define L4_12  27                 /* 4 bit length starting at position 12 */
+#define L4_12  28                 /* 4 bit length starting at position 12 */
   { 4, 12, S390_OPERAND_LENGTH },
-#define L8_8   28                 /* 8 bit length starting at position 8 */
+#define L8_8   29                 /* 8 bit length starting at position 8 */
   { 8, 8, S390_OPERAND_LENGTH },
 
-#define U4_8   29                 /* 4 bit unsigned value starting at 8 */
+#define U4_8   30                 /* 4 bit unsigned value starting at 8 */
   { 4, 8, 0 },
-#define U4_12  30                 /* 4 bit unsigned value starting at 12 */
+#define U4_12  31                 /* 4 bit unsigned value starting at 12 */
   { 4, 12, 0 },
-#define U4_16  31                 /* 4 bit unsigned value starting at 16 */
+#define U4_16  32                 /* 4 bit unsigned value starting at 16 */
   { 4, 16, 0 },
-#define U4_20  32                 /* 4 bit unsigned value starting at 20 */
+#define U4_20  33                 /* 4 bit unsigned value starting at 20 */
   { 4, 20, 0 },
-#define U8_8   33                 /* 8 bit unsigned value starting at 8 */
+#define U8_8   34                 /* 8 bit unsigned value starting at 8 */
   { 8, 8, 0 },
-#define U8_16  34                 /* 8 bit unsigned value starting at 16 */
+#define U8_16  35                 /* 8 bit unsigned value starting at 16 */
   { 8, 16, 0 },
-#define I16_16 35                 /* 16 bit signed value starting at 16 */
+#define I16_16 36                 /* 16 bit signed value starting at 16 */
   { 16, 16, S390_OPERAND_SIGNED },
-#define U16_16 36                 /* 16 bit unsigned value starting at 16 */
+#define U16_16 37                 /* 16 bit unsigned value starting at 16 */
   { 16, 16, 0 },
-#define J16_16 37                 /* PC relative jump offset at 16 */
+#define J16_16 38                 /* PC relative jump offset at 16 */
   { 16, 16, S390_OPERAND_PCREL },
-#define J32_16 38                 /* PC relative long offset at 16 */
+#define J32_16 39                 /* PC relative long offset at 16 */
   { 32, 16, S390_OPERAND_PCREL }
 };
 
@@ -194,6 +196,7 @@ const struct s390_operand s390_operands[] =
 #define INSTR_RRF_F0FF   4, { F_16,F_24,F_28,0,0,0 }           /* e.g. madbr */
 #define INSTR_RRF_FUFF   4, { F_24,F_16,F_28,U4_20,0,0 }       /* e.g. didbr */
 #define INSTR_RRF_RURR   4, { R_24,R_28,R_16,U4_20,0,0 }       /* e.g. .insn */
+#define INSTR_RRF_R0RR   4, { R_24,R_28,R_16,0,0,0 }           /* e.g. idte  */
 #define INSTR_RRF_U0FF   4, { F_24,U4_16,F_28,0,0,0 }          /* e.g. cfxbr */
 #define INSTR_RRF_U0FR   4, { F_24,U4_16,R_28,0,0,0 }          /* e.g. cfebr */
 #define INSTR_RRF_U0FR   4, { F_24,U4_16,R_28,0,0,0 }          /* e.g. cfxbr */
@@ -205,7 +208,11 @@ const struct s390_operand s390_operands[] =
 #define INSTR_RR_UR      2, { U4_8,R_12,0,0,0,0 }              /* e.g. bcr   */
 #define INSTR_RSE_RRRD   6, { R_8,R_12,D_20,B_16,0,0 }         /* e.g. lmh   */
 #define INSTR_RSE_RURD   6, { R_8,U4_12,D_20,B_16,0,0 }        /* e.g. icmh  */
+#define INSTR_RSL_R0RD   6, { R_8,D_20,B_16,0,0,0 }            /* e.g. tp    */
 #define INSTR_RSI_RRP    4, { R_8,R_12,J16_16,0,0,0 }          /* e.g. brxh  */
+#define INSTR_RSY_RRRD   6, { R_8,R_12,D20_20,B_16,0,0 }       /* e.g. stmy  */
+#define INSTR_RSY_RURD   6, { R_8,U4_12,D20_20,B_16,0,0 }      /* e.g. icmh  */
+#define INSTR_RSY_AARD   6, { A_8,A_12,D20_20,B_16,0,0 }       /* e.g. lamy  */
 #define INSTR_RS_AARD    4, { A_8,A_12,D_20,B_16,0,0 }         /* e.g. lam   */
 #define INSTR_RS_CCRD    4, { C_8,C_12,D_20,B_16,0,0 }         /* e.g. lctl  */
 #define INSTR_RS_R0RD    4, { R_8,D_20,B_16,0,0,0 }            /* e.g. sll   */
@@ -215,11 +222,14 @@ const struct s390_operand s390_operands[] =
 #define INSTR_RXE_RRRD   6, { R_8,D_20,X_12,B_16,0,0 }         /* e.g. lg    */
 #define INSTR_RXF_FRRDF  6, { F_32,F_8,D_20,X_12,B_16,0 }      /* e.g. madb  */
 #define INSTR_RXF_RRRDR  6, { R_32,R_8,D_20,X_12,B_16,0 }      /* e.g. .insn */
+#define INSTR_RXY_RRRD   6, { R_8,D20_20,X_12,B_16,0,0 }       /* e.g. ly    */
+#define INSTR_RXY_FRRD   6, { F_8,D20_20,X_12,B_16,0,0 }       /* e.g. ley   */
 #define INSTR_RX_0RRD    4, { D_20,X_12,B_16,0,0,0 }           /* e.g. be    */
 #define INSTR_RX_FRRD    4, { F_8,D_20,X_12,B_16,0,0 }         /* e.g. ae    */
 #define INSTR_RX_RRRD    4, { R_8,D_20,X_12,B_16,0,0 }         /* e.g. l     */
 #define INSTR_RX_URRD    4, { U4_8,D_20,X_12,B_16,0,0 }        /* e.g. bc    */
 #define INSTR_SI_URD     4, { D_20,B_16,U8_8,0,0,0 }           /* e.g. cli   */
+#define INSTR_SIY_URD    6, { D20_20,B_16,U8_8,0,0,0 }         /* e.g. tmy   */
 #define INSTR_SSE_RDRD   6, { D_20,B_16,D_36,B_32,0,0 }        /* e.g. mvsdk */
 #define INSTR_SS_L0RDRD  6, { D_20,L8_8,B_16,D_36,B_32,0     } /* e.g. mvc   */
 #define INSTR_SS_LIRDRD  6, { D_20,L4_8,B_16,D_36,B_32,U4_12 } /* e.g. srp   */
@@ -253,6 +263,7 @@ const struct s390_operand s390_operands[] =
 #define MASK_RRF_F0FF    { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
 #define MASK_RRF_FUFF    { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_RRF_RURR    { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RRF_R0RR    { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_RRF_U0FF    { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
 #define MASK_RRF_U0FR    { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
 #define MASK_RRF_U0FR    { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
@@ -264,21 +275,28 @@ const struct s390_operand s390_operands[] =
 #define MASK_RR_UR       { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_RSE_RRRD    { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
 #define MASK_RSE_RURD    { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RSL_R0RD    { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
 #define MASK_RSI_RRP     { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_RS_AARD     { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_RS_CCRD     { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_RS_R0RD     { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_RS_RRRD     { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_RS_RURD     { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RSY_RRRD    { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RSY_RURD    { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RSY_AARD    { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
 #define MASK_RXE_FRRD    { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
 #define MASK_RXE_RRRD    { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
 #define MASK_RXF_FRRDF   { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
 #define MASK_RXF_RRRDR   { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RXY_RRRD    { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RXY_FRRD    { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
 #define MASK_RX_0RRD     { 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_RX_FRRD     { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_RX_RRRD     { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_RX_URRD     { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_SI_URD      { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SIY_URD     { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
 #define MASK_SSE_RDRD    { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_SS_L0RDRD   { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
 #define MASK_SS_LIRDRD   { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
@@ -303,11 +321,14 @@ const struct s390_opcode s390_opformats[] =
   { "rs",      OP8(0x00LL),    MASK_RS_RRRD,   INSTR_RS_RRRD,  3, 0 },
   { "rse",     OP8(0x00LL),    MASK_RSE_RRRD,  INSTR_RSE_RRRD, 3, 0 },
   { "rsi",     OP8(0x00LL),    MASK_RSI_RRP,   INSTR_RSI_RRP,  3, 0 },
+  { "rsy",     OP8(0x00LL),    MASK_RSY_RRRD,  INSTR_RSY_RRRD, 3, 3 },
   { "rx",      OP8(0x00LL),    MASK_RX_RRRD,   INSTR_RX_RRRD,  3, 0 },
   { "rxe",     OP8(0x00LL),    MASK_RXE_RRRD,  INSTR_RXE_RRRD, 3, 0 },
   { "rxf",     OP8(0x00LL),    MASK_RXF_RRRDR, INSTR_RXF_RRRDR,3, 0 },
+  { "rxy",     OP8(0x00LL),    MASK_RXY_RRRD,  INSTR_RXY_RRRD, 3, 3 },
   { "s",       OP8(0x00LL),    MASK_S_RD,      INSTR_S_RD,     3, 0 },
   { "si",      OP8(0x00LL),    MASK_SI_URD,    INSTR_SI_URD,   3, 0 },
+  { "siy",     OP8(0x00LL),    MASK_SIY_URD,   INSTR_SIY_URD,  3, 3 },
   { "ss",      OP8(0x00LL),    MASK_SS_RRRDRD, INSTR_SS_RRRDRD,3, 0 },
   { "sse",     OP8(0x00LL),    MASK_SSE_RDRD,  INSTR_SSE_RDRD, 3, 0 },
 };
index f0b7f83d25121b21e87f66970d4c600f5eef6ba3..be08c829dd7b3685d3401f011405a5dccd1df14c 100644 (file)
@@ -109,6 +109,8 @@ b7 lctl RS_CCRD "load control" g5 esa,zarch
 b1 lra RX_RRRD "load real address" g5 esa,zarch
 25 lrdr RR_FF "load rounded (ext. to long)" g5 esa,zarch
 35 lrer RR_FF "load rounded (long to short)" g5 esa,zarch
+25 ldxr RR_FF "load rounded (ext. to long)" g5 esa,zarch
+35 ledr RR_FF "load rounded (long to short)" g5 esa,zarch
 22 ltdr RR_FF "load and test (long)" g5 esa,zarch
 32 lter RR_FF "load and test (short)" g5 esa,zarch
 12 ltr RR_RR "load and test" g5 esa,zarch
@@ -118,7 +120,9 @@ af mc SI_URD "monitor call" g5 esa,zarch
 6c md RX_FRRD "multiply (long)" g5 esa,zarch
 2c mdr RR_FF "multiply (long)" g5 esa,zarch
 7c me RX_FRRD "multiply (short to long)" g5 esa,zarch
+7c mde RX_FRRD "multiply (short to long)" g5 esa,zarch
 3c mer RR_FF "multiply (short to long)" g5 esa,zarch
+3c mder RR_FF "multiply short to long hfp" g5 esa,zarch
 4c mh RX_RRRD "multiply halfword" g5 esa,zarch
 fc mp SS_LLRDRD "multiply decimal" g5 esa,zarch
 1c mr RR_RR "multiply" g5 esa,zarch
@@ -623,3 +627,167 @@ e30000000090 llgc RXE_RRRD "load logical character" z900 zarch
 e30000000091 llgh RXE_RRRD "load logical halfword" z900 zarch
 eb000000001c rllg RSE_RRRD "rotate left single logical 64" z900 zarch
 eb000000001d rll RSE_RRRD "rotate left single logical 32" z900 esa,zarch
+b369 cxr RRE_FF "compare extended hfp" g5 esa,zarch
+b3b6 cxfr RRE_RF "convert from fixed 32 to extended hfp" g5 esa,zarch
+b3b5 cdfr RRE_RF "convert from fixed 32 to long hfp" g5 esa,zarch
+b3b4 cefr RRE_RF "convert from fixed 32 to short hfp" g5 esa,zarch
+b3ba cfxr RRF_U0FR "convert to fixed extended hfp to 32" z900 zarch
+b3b9 cfdr RRF_U0FR "convert to fixed long hfp to 32" z900 zarch
+b3b8 cfer RRF_U0FR "convert to fixed short hfp to 32" z900 zarch
+b362 ltxr RRE_FF "load and test extended hfp" g5 esa,zarch
+b363 lcxr RRE_FF "load complement extended hfp" g5 esa,zarch
+b367 fixr RRF_U0FF "load fp integer extended hfp" g5 esa,zarch
+b37f fidr RRF_U0FF "load fp integer long hfp" g5 esa,zarch
+b377 fier RRF_U0FF "load fp integer short hfp" g5 esa,zarch
+b325 lxdr RRE_FF "load lengthened long to extended hfp" g5 esa,zarch
+ed0000000025 lxd RXE_FRRD "load lengthened long to extended hfp" g5 esa,zarch
+b326 lxer RRE_FF "load lengthened short to extended hfp" g5 esa,zarch
+ed0000000026 lxe RXE_FRRD "load lengthened short to extended hfp" g5 esa,zarch
+b324 lder RRE_FF "load lengthened short to long hfp" g5 esa,zarch
+ed0000000024 lde RXE_FRRD "load lengthened short to long hfp" g5 esa,zarch
+b361 lnxr RRE_FF "load negative long hfp" g5 esa,zarch
+b360 lpxr RRE_FF "load positive long hfp" g5 esa,zarch
+b366 lexr RRE_FF "load rounded extended to short hfp" g5 esa,zarch
+35 ledr RR_FF "load rounded long to short hfp" g5 esa,zarch
+b337 meer RRE_FF "multiply short hfp" g5 esa,zarch
+ed0000000037 mee RXE_FRRD "multiply short hfp" g5 esa,zarch
+b336 sqxr RRE_FF "square root extended hfp" g5 esa,zarch
+ed0000000034 sqe RXE_FRRD "square root short hfp" g5 esa,zarch
+b263 cmpsc RRE_RR "compression call" g5 esa,zarch
+eb00000000c0 tp RSL_R0RD "test decimal" g5 esa,zarch
+b365 lxr RRE_RR "load extended hfp" g5 esa,zarch
+b22e pgin RRE_RR "page in" g5 esa,zarch
+b22f pgout RRE_RR "page out" g5 esa,zarch
+b276 xsch S_00 "cancel subchannel" g5 esa,zarch
+# New long displacement instructions on z990
+e3000000005a ay RXY_RRRD "add with long offset" z990 zarch
+e3000000007a ahy RXY_RRRD "add halfword with long offset" z990 zarch
+e3000000005e aly RXY_RRRD "add logical with long offset" z990 zarch
+eb0000000054 niy SIY_URD "and immediate with long offset" z990 zarch
+e30000000054 ny RXY_RRRD "and with long offset" z990 zarch
+e30000000059 cy RXY_RRRD "compare with long offset" z990 zarch
+eb0000000014 csy RSY_RRRD "compare and swap with long offset" z990 zarch
+eb0000000031 cdsy RSY_RRRD "compare double and swap with long offset" z990 zarch
+e30000000079 chy RXY_RRRD "compare halfword with long offset" z990 zarch
+e30000000055 cly RXY_RRRD "compare logical with long offset" z990 zarch
+eb0000000055 cliy SIY_URD "compare logical immediate with long offset" z990 zarch
+eb0000000021 clmy RSY_RURD "compare logical characters under mask with long offset" z990 zarch
+e30000000006 cvby RXY_RRRD "convert to binary with long offset" z990 zarch
+e30000000026 cvdy RXY_RRRD "convert to decimal with long offset" z990 zarch
+eb0000000057 xiy SIY_URD "exclusive or immediate with long offset" z990 zarch
+e30000000057 xy RXY_RRRD "exclusive or with long offset" z990 zarch
+e30000000073 icy RXY_RRRD "insert character with long offset" z990 zarch
+eb0000000081 icmy RSY_RURD "insert characters with long offset" z990 zarch
+ed0000000065 ldy RXY_FRRD "load (long) with long offset" z990 zarch
+ed0000000064 ley RXY_FRRD "load (short) with long offset" z990 zarch
+e30000000058 ly RXY_RRRD "load with long offset" z990 zarch
+eb000000009a lamy RSY_AARD "load access multiple" z990 zarch
+e30000000071 lay RXY_RRRD "load address with long offset" z990 zarch
+e30000000076 lb RXY_RRRD "load byte with long offset" z990 zarch
+e30000000077 lgb RXY_RRRD "load byte with long offset 64" z990 zarch
+e30000000078 lhy RXY_RRRD "load halfword with long offset" z990 zarch
+eb0000000098 lmy RSY_RRRD "load multiple with long offset" z990 zarch
+e30000000013 lray RXY_RRRD "load real address with long offset" z990 zarch
+eb0000000052 mviy SIY_URD "move immediate with long offset" z990 zarch
+e30000000051 msy RXY_RRRD "multiply single with long offset" z990 zarch
+eb0000000056 oiy SIY_URD "or immediate with long offset" z990 zarch
+e30000000056 oy RXY_RRRD "or with long offset" z990 zarch
+ed0000000067 stdy RXY_FRRD "load (long) with long offset" z990 zarch
+ed0000000066 stey RXY_FRRD "load (short) with long offset" z990 zarch
+e30000000050 sty RXY_RRRD "store with long offset" z990 zarch
+eb000000009b stamy RSY_AARD "store access multiple with long offset" z990 zarch
+e30000000072 stcy RXY_RRRD "store character with long offset" z990 zarch
+eb000000002d stcmy RSY_RURD "store characters under mask with long offset" z990 zarch
+e30000000070 sthy RXY_RRRD "store halfword with long offset" z990 zarch
+eb0000000090 stmy RSY_RRRD "store multiple with long offset" z990 zarch
+e3000000005b sy RXY_RRRD "subtract with long offset" z990 zarch
+e3000000007b shy RXY_RRRD "subtract halfword with long offset" z990 zarch
+e3000000005f sly RXY_RRRD "subtract logical with long offset" z990 zarch
+eb0000000051 tmy SIY_URD "test under mask with long offset" z990 zarch
+# 'old' instructions extended to long displacement
+# these instructions are entered into the opcode table twice.
+e30000000003 lrag RXY_RRRD "load real address with long offset 64" z990 zarch
+e30000000004 lg RXY_RRRD "      load 64" z990 zarch
+e30000000008 ag RXY_RRRD "add with long offset 64" z990 zarch
+e30000000009 sg RXY_RRRD "subtract with long offset 64" z990 zarch
+e3000000000a alg RXY_RRRD "add logical with long offset 64" z990 zarch
+e3000000000b slg RXY_RRRD "subtract logical with long offset 64" z990 zarch
+e3000000000c msg RXY_RRRD "multiply single with long offset 64" z990 zarch
+e3000000000d dsg RXY_RRRD "divide single 64" z990 zarch
+e3000000000e cvbg RXY_RRRD "convert to binary with long offset 64" z990 zarch
+e3000000000f lrvg RXY_RRRD "load reversed 64" z990 zarch
+e30000000014 lgf RXY_RRRD "load 64<32" z990 zarch
+e30000000015 lgh RXY_RRRD "load halfword 64" z990 zarch
+e30000000016 llgf RXY_RRRD "load logical 64<32" z990 zarch
+e30000000017 llgt RXY_RRRD "load logical thirty one bits" z990 zarch
+e30000000018 agf RXY_RRRD "add with long offset 64<32" z990 zarch
+e30000000019 sgf RXY_RRRD "subtract with long offset 64<32" z990 zarch
+e3000000001a algf RXY_RRRD "add logical with long offset 64<32" z990 zarch
+e3000000001b slgf RXY_RRRD "subtract logical with long offset 64<32" z990 zarch
+e3000000001c msgf RXY_RRRD "multiply single with long offset 64<32" z990 zarch
+e3000000001d dsgf RXY_RRRD "divide single 64<32" z990 zarch
+e3000000001e lrv RXY_RRRD "load reversed 32" z990 zarch
+e3000000001f lrvh RXY_RRRD "load reversed 16" z990 zarch
+e30000000020 cg RXY_RRRD "compare with long offset 64" z990 zarch
+e30000000021 clg RXY_RRRD "compare logical with long offset 64" z990 zarch
+e30000000024 stg RXY_RRRD "store with long offset 64" z990 zarch
+e3000000002e cvdg RXY_RRRD "convert to decimal with long offset 64" z990 zarch
+e3000000002f strvg RXY_RRRD "store reversed 64" z990 zarch
+e30000000030 cgf RXY_RRRD "compare with long offset 64<32" z990 zarch
+e30000000031 clgf RXY_RRRD "compare logical with long offset 64<32" z990 zarch
+e3000000003e strv RXY_RRRD "store reversed 32" z990 zarch
+e3000000003f strvh RXY_RRRD "store reversed 64" z990 zarch
+e30000000046 bctg RXY_RRRD "branch on count 64" z990 zarch
+e30000000080 ng RXY_RRRD "and with long offset 64" z990 zarch
+e30000000081 og RXY_RRRD "or with long offset 64" z990 zarch
+e30000000082 xg RXY_RRRD "exclusive or with long offset 64" z990 zarch
+e30000000086 mlg RXY_RRRD "multiply logical 64" z990 zarch
+e30000000087 dlg RXY_RRRD "divide logical 64" z990 zarch
+e30000000088 alcg RXY_RRRD "add logical with carry 64" z990 zarch
+e30000000089 slbg RXY_RRRD "subtract logical with borrow 64" z990 zarch
+e3000000008e stpq RXY_RRRD "store pair to quadword" z990 zarch
+e3000000008f lpq RXY_RRRD "load pair from quadword" z990 zarch
+e30000000090 llgc RXY_RRRD "load logical character" z990 zarch
+e30000000091 llgh RXY_RRRD "load logical halfword" z990 zarch
+e30000000096 ml RXY_RRRD "multiply logical 32" z990 zarch
+e30000000097 dl RXY_RRRD "divide logical 32" z990 zarch
+e30000000098 alc RXY_RRRD "add logical with carry 32" z990 zarch
+e30000000099 slb RXY_RRRD "subtract logical with borrow 32" z990 zarch
+eb0000000004 lmg RSY_RRRD "load multiple with long offset 64" z990 zarch
+eb000000000a srag RSY_RRRD "shift right single 64" z990 zarch
+eb000000000b slag RSY_RRRD "shift left single 64" z990 zarch
+eb000000000c srlg RSY_RRRD "shift right single logical 64" z990 zarch
+eb000000000d sllg RSY_RRRD "shift left single logical 64" z990 zarch
+eb000000000f tracg RSY_RRRD "trace 64" z990 zarch
+eb000000001c rllg RSY_RRRD "rotate left single logical 64" z990 zarch
+eb000000001d rll RSY_RRRD "rotate left single logical 32" z990 zarch
+eb0000000020 clmh RSY_RURD "compare logical characters under mask high with long offset" z990 zarch
+eb0000000024 stmg RSY_RRRD "store multiple with long offset 64" z990 zarch
+eb0000000025 stctg RSY_RRRD "store control 64" z990 zarch
+eb0000000026 stmh RSY_RRRD "store multiple high" z990 zarch
+eb000000002c stcmh RSY_RURD "store characters under mask high with long offset" z990 zarch
+eb000000002f lctlg RSY_RRRD "load control 64" z990 zarch
+eb0000000030 csg RSY_RRRD "compare and swap with long offset 64" z990 zarch
+eb000000003e cdsg RSY_RRRD "compare double and swap with long offset 64" z990 zarch
+eb0000000044 bxhg RSY_RRRD "branch on index high 64" z990 zarch
+eb0000000045 bxleg RSY_RRRD "branch on index low or equal 64" z990 zarch
+eb0000000080 icmh RSY_RURD "insert characters under mask high with long offset" z990 zarch
+eb000000008e mvclu RSY_RRRD "move long unicode" z990 zarch
+eb000000008f clclu RSY_RRRD "compare logical long unicode with long offset" z990 zarch
+eb0000000096 lmh RSY_RRRD "load multiple high" z990 zarch
+# new z990 instructions
+b98a cspg RRE_RR "compare and swap and purge" z990 zarch
+b98e idte RRF_R0RR "invalidate dat table entry" z990 zarch
+b33e madr RRF_F0FF "multiply and add long hfp" z990 esa,zarch
+ed000000003e mad RXF_FRRDF "multiply and add long hfp" z990 esa,zarch
+b32e maer RRF_F0FF "multiply and add short hfp" z990 esa,zarch
+ed000000002e mae RXF_FRRDF "multiply and add shoft hfp" z990 esa,zarch
+b33f msdr RRF_F0FF "multiply and subtract long hfp" z990 esa,zarch
+ed000000003f msd RXF_FRRDF "multiply and subtract long hfp" z990 esa,zarch
+b32f mser RRF_F0FF "mutliply and subtract short hfp" z990 esa,zarch
+ed000000002f mse RXF_FRRDF "multiply and subttract short hfp" z990 esa,zarch
+b92e km RRE_RR "cipher message" z990 esa,zarch
+b92f kmc RRE_RR "cipher message with chaining" z990 esa,zarch
+b93e kimd RRE_RR "compute intermediate message digest" z990 esa,zarch
+b93f klmd RRE_RR "compute last message digest" z990 esa,zarch
+b91e kmac RRE_RR "compute message authentication code" z990 esa,zarch
index f3bc71d26128834a30242ac59e94eade1dcabe49..c51cddd93eac25f2a3d83c4014c7c4eb51093080 100644 (file)
@@ -1,10 +1,15 @@
+2003-07-09  Michael Snyder  <msnyder@redhat.com>
+
+       * configure.in: Add testsuite to extra_subdirs for sh.
+       * configure: Regenerate.
+
 2003-01-23  Nick Clifton  <nickc@redhat.com>
 
        * Add sh2e support:
 
-       2002-04-02  Alexandre Oliva  <aoliva@redhat.com>
+2002-04-02  Alexandre Oliva  <aoliva@redhat.com>
 
-               * sh/gencode.c: Replace sh3e with sh2e except in fsqrt.
+       * sh/gencode.c: Replace sh3e with sh2e except in fsqrt.
 
 2002-08-24  Geoffrey Keating  <geoffk@redhat.com>
 
index 7819fc42541b83a305d073096feeedc45f641648..d6382b640c91823cc2ca84d5ea9d424d0a6b56ca 100755 (executable)
@@ -1450,7 +1450,10 @@ case "${target}" in
   mn10200*-*-*)
        sim_target=mn10200
        ;;
-  sh*-*-*)             sim_target=sh ;;
+  sh*-*-*)
+       sim_target=sh 
+       extra_subdirs="${extra_subdirs} testsuite"
+       ;;
   powerpc*-*-eabi* | powerpc*-*-solaris* | powerpc*-*-sysv4* | \
   powerpc*-*-elf* | powerpc*-*-linux* | powerpc*-*-netbsd* )
        # The PowerPC simulator uses the GCC extension long long as well as
index 4a1b0b54d525be5712645d5010de3fd3c975ea30..da2f20a1bef6f3fb5b29e9bf52dd5a403c6baa96 100644 (file)
@@ -89,7 +89,10 @@ case "${target}" in
   mn10200*-*-*)
        sim_target=mn10200
        ;;
-  sh*-*-*)             sim_target=sh ;;
+  sh*-*-*)
+       sim_target=sh 
+       extra_subdirs="${extra_subdirs} testsuite"
+       ;;
   powerpc*-*-eabi* | powerpc*-*-solaris* | powerpc*-*-sysv4* | \
   powerpc*-*-elf* | powerpc*-*-linux* | powerpc*-*-netbsd* )
        # The PowerPC simulator uses the GCC extension long long as well as
index cd81e6eed8b694c4b0bd06f5b7331947d6f01bbf..3bd23ece655c081bce5244ef8c65f68b678fd159 100644 (file)
@@ -1,3 +1,30 @@
+2003-07-18  Michael Snyder  <msnyder@redhat.com>
+
+       * compile.c (decode): Enhancements for mova.
+       Initialize cst, reg, and rdisp inside the loop, for each
+       new instruction.  Defer correction of the disp2 values until
+       later, and then adjust them by the size of the first operand,
+       rather than the size of the instruction.
+       (sim_resume): For mova, adjust the size of the second operand
+       according to the type of the first operand (INDEXB vs. INDEXW).
+       In cases where there is only one operand, the other two must
+       both be composed on the fly.
+
+2003-07-22  Michael Snyder  <msnyder@redhat.com>
+
+       * compile.c (sim_resume): Revert 6-24 change, it does not
+       work with gdb breakpoints.
+
+2003-07-17  Michael Snyder  <msnyder@redhat.com>
+
+       * compile.c (sim_resume): Handle shll reg, reg and shlr reg, reg.
+       (decode): IMM16 is always zero-extended.
+
+2003-06-24  Michael Snyder  <msnyder@redhat.com>
+
+       * sim-main.h (SIM_WIFSTOPPED, SIM_WSTOPSIG): Define.
+       * compile.c (sim_resume): Use the above to return stop signal.
+
 2003-06-18  Michael Snyder  <msnyder@redhat.com>
 
        * compile.c: Replace "Hitachi" with "Renesas".
index f416695277d40e1cfb43c423b5f426dedc32cbb8..a799d2bed8cca8bbd75d96d4db03a0f5f79c26cf 100644 (file)
@@ -606,6 +606,10 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
          (q->available == AV_H8H  && !h8300hmode))
        continue;
 
+      cst[0]   = cst[1]   = cst[2]   = 0;
+      reg[0]   = reg[1]   = reg[2]   = 0;
+      rdisp[0] = rdisp[1] = rdisp[2] = 0;
+
       while (1)
        {
          op_type looking_for = *nib;
@@ -770,26 +774,11 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
                       (looking_for & MODE) == INDEXB ||
                       (looking_for & MODE) == INDEXW ||
                       (looking_for & MODE) == INDEXL)
-
                {
                  switch (looking_for & SIZE)
                    {
                    case L_2:
                      cst[opnum] = thisnib & 3;
-
-                     /* DISP2 special treatment.  */
-                     if ((looking_for & MODE) == DISP)
-                       {
-                         switch (OP_SIZE (q->how)) {
-                         default: break;
-                         case SW:
-                           cst[opnum] *= 2;
-                           break;
-                         case SL:
-                           cst[opnum] *= 4;
-                           break;
-                         }
-                       }
                      break;
                    case L_8:
                      cst[opnum] = SEXTCHAR (data[len / 2]);
@@ -818,7 +807,9 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
                       (looking_for & SIZE) == L_16U)
                {
                  cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
-                 if ((looking_for & SIZE) != L_16U)
+                 /* Immediates are always unsigned.  */
+                 if ((looking_for & SIZE) != L_16U &&
+                     (looking_for & MODE) != IMM)
                    cst[opnum] = (short) cst[opnum];    /* Sign extend.  */
                }
              else if (looking_for & ABSJMP)
@@ -1070,31 +1061,64 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
                            p->type = X (OP_IMM, SP);
                            p->literal = cst[opnum];
                          }
-                       else if ((x & MODE) == INDEXB ||
-                                (x & MODE) == INDEXW ||
-                                (x & MODE) == INDEXL ||
-                                (x & MODE) == DISP)
+                       else if ((x & MODE) == INDEXB)
                          {
-                           /* Use the instruction to determine 
-                              the operand size.  */
-                           switch (x & MODE) {
-                           case INDEXB:
-                             p->type = X (OP_INDEXB, OP_SIZE (q->how));
-                             break;
-                           case INDEXW:
-                             p->type = X (OP_INDEXW, OP_SIZE (q->how));
-                             break;
-                           case INDEXL:
-                             p->type = X (OP_INDEXL, OP_SIZE (q->how));
-                             break;
-                           case DISP:
-                             p->type = X (OP_DISP,   OP_SIZE (q->how));
-                             break;
-                           }
-
+                           p->type = X (OP_INDEXB, OP_SIZE (q->how));
                            p->literal = cst[opnum];
                            p->reg     = rdisp[opnum];
                          }
+                       else if ((x & MODE) == INDEXW)
+                         {
+                           p->type = X (OP_INDEXW, OP_SIZE (q->how));
+                           p->literal = cst[opnum];
+                           p->reg     = rdisp[opnum];
+                         }
+                       else if ((x & MODE) == INDEXL)
+                         {
+                           p->type = X (OP_INDEXL, OP_SIZE (q->how));
+                           p->literal = cst[opnum];
+                           p->reg     = rdisp[opnum];
+                         }
+                       else if ((x & MODE) == DISP)
+                         {
+                           /* Yuck -- special for mova args.  */
+                           if (strncmp (q->name, "mova", 4) == 0 &&
+                               (x & SIZE) == L_2)
+                             {
+                               /* Mova can have a DISP2 dest, with an
+                                  INDEXB or INDEXW src.  The multiplier
+                                  for the displacement value is determined
+                                  by the src operand, not by the insn.  */
+
+                               switch (OP_KIND (dst->src.type))
+                                 {
+                                 case OP_INDEXB:
+                                   p->type = X (OP_DISP, SB);
+                                   p->literal = cst[opnum];
+                                   break;
+                                 case OP_INDEXW:
+                                   p->type = X (OP_DISP, SW);
+                                   p->literal = cst[opnum] * 2;
+                                   break;
+                                 default:
+                                   goto fail;
+                                 }
+                             }
+                           else
+                             {
+                               p->type = X (OP_DISP,   OP_SIZE (q->how));
+                               p->literal = cst[opnum];
+                               /* DISP2 is special.  */
+                               if ((x & SIZE) == L_2)
+                                 switch (OP_SIZE (q->how))
+                                   {
+                                   case SB:                  break;
+                                   case SW: p->literal *= 2; break;
+                                   case SL: p->literal *= 4; break;
+                                   }
+                             }
+                           p->reg     = rdisp[opnum];
+                         }
                        else if (x & CTRL)
                          {
                            switch (reg[opnum])
@@ -1977,8 +2001,44 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
                (mova/b, mova/w, mova/l).
             4) Add literal value of 1st argument (src).
             5) Store result in 3rd argument (op3).
+         */
+
+         /* Alas, since this is the only instruction with 3 arguments, 
+            decode doesn't handle them very well.  Some fix-up is required.
+
+            a) The size of dst is determined by whether src is 
+               INDEXB or INDEXW.  */
+
+         if (OP_KIND (code->src.type) == OP_INDEXB)
+           code->dst.type = X (OP_KIND (code->dst.type), SB);
+         else if (OP_KIND (code->src.type) == OP_INDEXW)
+           code->dst.type = X (OP_KIND (code->dst.type), SW);
 
+         /* b) If op3 == null, then this is the short form of the insn.
+               Dst is the dispreg of src, and op3 is the 32-bit form
+               of the same register.
          */
+
+         if (code->op3.type == 0)
+           {
+             /* Short form: src == INDEXB/INDEXW, dst == op3 == 0.
+                We get to compose dst and op3 as follows:
+
+                    op3 is a 32-bit register, ID == src.reg.
+                    dst is the same register, but 8 or 16 bits
+                    depending on whether src is INDEXB or INDEXW.
+             */
+
+             code->op3.type = X (OP_REG, SL);
+             code->op3.reg  = code->src.reg;
+             code->op3.literal = 0;
+
+             if (OP_KIND (code->src.type) == OP_INDEXB)
+               code->dst.type = X (OP_REG, SB);
+             else
+               code->dst.type = X (OP_REG, SW);
+           }
+
          if (fetch (sd, &code->dst, &ea))
            goto end;
 
@@ -3151,10 +3211,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
          if (fetch2 (sd, &code->dst, &rd))
            goto end;
 
-         if (code->src.type == X (OP_IMM, SB))
+         if (memcmp (&code->src, &code->dst, sizeof (code->src)) == 0)
+           ea = 1;             /* unary  op */
+         else                  /* binary op */
            fetch (sd, &code->src, &ea);
-         else
-           ea = 1;
 
          if (code->opcode == O (O_SHLL, SB))
            {
@@ -3175,10 +3235,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
          if (fetch2 (sd, &code->dst, &rd))
            goto end;
 
-         if (code->src.type == X (OP_IMM, SW))
-           fetch (sd, &code->src, &ea);
+         if (memcmp (&code->src, &code->dst, sizeof (code->src)) == 0)
+           ea = 1;             /* unary  op */
          else
-           ea = 1;
+           fetch (sd, &code->src, &ea);
 
          if (code->opcode == O (O_SHLL, SW))
            {
@@ -3199,10 +3259,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
          if (fetch2 (sd, &code->dst, &rd))
            goto end;
 
-         if (code->src.type == X (OP_IMM, SL))
-           fetch (sd, &code->src, &ea);
+         if (memcmp (&code->src, &code->dst, sizeof (code->src)) == 0)
+           ea = 1;             /* unary  op */
          else
-           ea = 1;
+           fetch (sd, &code->src, &ea);
 
          if (code->opcode == O (O_SHLL, SL))
            {
@@ -3575,6 +3635,17 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
              sim_engine_set_run_state (sd, sim_exited, 
                                        SIM_WEXITSTATUS (h8_get_reg (sd, 0)));
            }
+#if 0
+         /* Unfortunately this won't really work, because
+            when we take a breakpoint trap, R0 has a "random", 
+            user-defined value.  Don't see any immediate solution.  */
+         else if (SIM_WIFSTOPPED (h8_get_reg (sd, 0)))
+           {
+             /* Pass the stop signal up to gdb.  */
+             sim_engine_set_run_state (sd, sim_stopped, 
+                                       SIM_WSTOPSIG (h8_get_reg (sd, 0)));
+           }
+#endif
          else
            {
              /* Treat it as a sigtrap.  */
index 6acf901d5de0ca8fa9ba53e432778011fd04d049..284a5586d16e6994e6fb0db3162dd40db9aae5da 100644 (file)
@@ -164,7 +164,9 @@ struct sim_state {
 /* Local version of macros for decoding exit status.  
    (included here rather than try to find target version of wait.h)
 */
-#define SIM_WIFEXITED(V) (((V) & 0xff) == 0)
-#define SIM_WEXITSTATUS(V) ((V) >> 8)
+#define SIM_WIFEXITED(V)       (((V) & 0xff) == 0)
+#define SIM_WIFSTOPPED(V)      (!SIM_WIFEXITED (V))
+#define SIM_WEXITSTATUS(V)     (((V) >> 8) & 0xff)
+#define SIM_WSTOPSIG(V)                ((V) & 0x7f)
 
 #endif /* SIM_MAIN_H */
index 007bf466e7f570800ac12b192adfeb519e21d066..b34adb5cf873566a78ee05e6f43421a38f6930f6 100644 (file)
@@ -1,3 +1,51 @@
+2003-07-25  Michael Snyder  <msnyder@redhat.com>
+
+       * gencode.c (pshl): Change < to <= (shift by 16 is allowed).
+       Cast argument of >> to unsigned to prevent sign extension.
+       (psha): Change < to <= (shift by 32 is allowed).        
+
+2003-07-24  Michael Snyder  <msnyder@redhat.com>
+
+       * gencode.c: Fix typo in comment.
+
+2003-07-23  Michael Snyder  <msnyder@redhat.com>
+
+       * gencode.c: A few more fix-ups of refs and defs.
+       (frchg): Raise SIGILL if in double-precision mode.
+       (ldtlb): We don't simulate cache, so this is a no-op.
+       (movsxy_tab): Correct a few bit pattern errors.
+
+2003-07-09  Michael Snyder  <msnyder@redhat.com>
+
+       * gencode.c (prnd): Clear LSW of result to zeros.
+       * gencode.c (pmuls): Expression is mis-parenthesized.
+       * gencode.c (ppi_gensim): For a conditional ppi insn, if the
+       condition is false, we want to return (not break).  A break
+       will take us to the end of the function where registers will
+       be updated, whereas the desired outcome is for nothing to change.
+
+2003-07-03  Michael Snyder  <msnyder@redhat.com>
+
+       * gencode.c (movs): Fix a couple of text transpositions.
+
+2003-06-27  Michael Snyder  <msnyder@redhat.com>
+
+       * gencode.c (op tab): Some fix-ups of refs and defs.
+       (ocbi, ocbp): Cache not simulated, but may cause memory fault.
+       (gensym_caselist): Add default case to switch statement.
+       (expand_ppi_code): Add default case to switch statement.
+       * gencode.c (op tab): Implement movca.l.
+       * gencode.c (op movsxy_tab): Fix an error in the bit pattern.
+       * gencode.c (gensim_caselist): The movy instructions use
+       registers R6 and R7 (not R4 and R5 like the movx insns).
+
+2003-06-27  Michael Snyder  <msnyder@redhat.com>
+
+       * gencode.c (op movsxy_tab): Fix up some copy/paste errors
+       in name: s/REG_x/REG_y/.
+
+       * gencode.c (op tab): Move misplaced semicolon.
+
 2003-02-27  Andrew Cagney  <cagney@redhat.com>
 
        * interp.c (init_dsp, sim_open, sim_create_inferior): Rename _bfd
index 167fdd1ffda3cfbd19274bed5c840729e15470d4..d078fc6cca9080de4d7c161d93f34db246449876 100644 (file)
@@ -195,7 +195,7 @@ op tab[] =
     "SET_SR_T (0);",
   },
 
-  { "", "", "div1 <REG_M>,<REG_N>", "0011nnnnmmmm0100",
+  { "", "nm", "div1 <REG_M>,<REG_N>", "0011nnnnmmmm0100", /* ? MVS */
     "div1 (R, m, n/*, T*/);",
   },
 
@@ -346,7 +346,7 @@ op tab[] =
     "}",
   },
   /* sh2e */
-  { "", "", "fmov.s <FREG_M>,@<REG_N>", "1111nnnnmmmm1010",
+  { "", "n", "fmov.s <FREG_M>,@<REG_N>", "1111nnnnmmmm1010",
     /* sh4 */
     "if (FPSCR_SZ) {",
     "  MA (2);",
@@ -359,7 +359,7 @@ op tab[] =
     "}",
   },
   /* sh2e */
-  { "", "", "fmov.s @<REG_M>,<FREG_N>", "1111nnnnmmmm1000",
+  { "", "m", "fmov.s @<REG_M>,<FREG_N>", "1111nnnnmmmm1000",
     /* sh4 */
     "if (FPSCR_SZ) {",
     "  MA (2);",
@@ -372,7 +372,7 @@ op tab[] =
     "}",
   },
   /* sh2e */
-  { "", "", "fmov.s @<REG_M>+,<FREG_N>", "1111nnnnmmmm1001",
+  { "m", "m", "fmov.s @<REG_M>+,<FREG_N>", "1111nnnnmmmm1001",
     /* sh4 */
     "if (FPSCR_SZ) {",
     "  MA (2);",
@@ -387,7 +387,7 @@ op tab[] =
     "}",
   },
   /* sh2e */
-  { "", "", "fmov.s <FREG_M>,@-<REG_N>", "1111nnnnmmmm1011",
+  { "n", "n", "fmov.s <FREG_M>,@-<REG_N>", "1111nnnnmmmm1011",
     /* sh4 */
     "if (FPSCR_SZ) {",
     "  MA (2);",
@@ -402,7 +402,7 @@ op tab[] =
     "}",
   },
   /* sh2e */
-  { "", "", "fmov.s @(R0,<REG_M>),<FREG_N>", "1111nnnnmmmm0110",
+  { "", "0m", "fmov.s @(R0,<REG_M>),<FREG_N>", "1111nnnnmmmm0110",
     /* sh4 */
     "if (FPSCR_SZ) {",
     "  MA (2);",
@@ -415,7 +415,7 @@ op tab[] =
     "}",
   },
   /* sh2e */
-  { "", "", "fmov.s <FREG_M>,@(R0,<REG_N>)", "1111nnnnmmmm0111",
+  { "", "0n", "fmov.s <FREG_M>,@(R0,<REG_N>)", "1111nnnnmmmm0111",
     /* sh4 */
     "if (FPSCR_SZ) {",
     "  MA (2);",
@@ -442,7 +442,10 @@ op tab[] =
 
   /* sh4 */
   { "", "", "frchg", "1111101111111101",
-    "SET_FPSCR (GET_FPSCR() ^ FPSCR_MASK_FR);",
+    "if (FPSCR_PR)",
+    "  RAISE_EXCEPTION (SIGILL);",
+    "else",
+    "  SET_FPSCR (GET_FPSCR() ^ FPSCR_MASK_FR);",
   },
 
   /* sh4 */
@@ -519,25 +522,25 @@ op tab[] =
     "/* FIXME: user mode */",
   },
 #endif
-  { "", "n", "ldc.l @<REG_N>+,<CREG_M>", "0100nnnnmmmm0111",
+  { "n", "n", "ldc.l @<REG_N>+,<CREG_M>", "0100nnnnmmmm0111",
     "MA (1);",
     "CREG (m) = RLAT (R[n]);",
     "R[n] += 4;",
     "/* FIXME: user mode */",
   },
-  { "", "n", "ldc.l @<REG_N>+,SR", "0100nnnn00000111",
+  { "n", "n", "ldc.l @<REG_N>+,SR", "0100nnnn00000111",
     "MA (1);",
     "SET_SR (RLAT (R[n]));",
     "R[n] += 4;",
     "/* FIXME: user mode */",
   },
-  { "", "n", "ldc.l @<REG_N>+,MOD", "0100nnnn01010111",
+  { "n", "n", "ldc.l @<REG_N>+,MOD", "0100nnnn01010111",
     "MA (1);",
     "SET_MOD (RLAT (R[n]));",
     "R[n] += 4;",
   },
 #if 0
-  { "", "n", "ldc.l @<REG_N>+,DBR", "0100nnnn11110110",
+  { "n", "n", "ldc.l @<REG_N>+,DBR", "0100nnnn11110110",
     "MA (1);",
     "DBR = RLAT (R[n]);",
     "R[n] += 4;",
@@ -556,7 +559,7 @@ op tab[] =
   { "", "n", "lds <REG_N>,<SREG_M>", "0100nnnnssss1010",
     "SREG (m) = R[n];",
   },
-  { "", "n", "lds.l @<REG_N>+,<SREG_M>", "0100nnnnssss0110",
+  { "n", "n", "lds.l @<REG_N>+,<SREG_M>", "0100nnnnssss0110",
     "MA (1);",
     "SREG (m) = RLAT(R[n]);",
     "R[n] += 4;",
@@ -566,22 +569,22 @@ op tab[] =
     "SET_FPSCR(R[n]);",
   },
   /* sh2e / sh-dsp (lds.l @<REG_N>+,DSR) */
-  { "", "n", "lds.l @<REG_N>+,FPSCR", "0100nnnn01100110",
+  { "n", "n", "lds.l @<REG_N>+,FPSCR", "0100nnnn01100110",
     "MA (1);",
     "SET_FPSCR (RLAT(R[n]));",
     "R[n] += 4;",
   },
 
   { "", "", "ldtlb", "0000000000111000",
-    "/* FIXME: XXX*/ abort();",
+    "/* We don't implement cache or tlb, so this is a noop.  */",
   },
 
-  { "", "nm", "mac.l @<REG_M>+,@<REG_N>+", "0000nnnnmmmm1111",
+  { "nm", "nm", "mac.l @<REG_M>+,@<REG_N>+", "0000nnnnmmmm1111",
     "trap (255, R0, PC, memory, maskl, maskw, endianw);",
     "/* FIXME: mac.l support */",
   },
 
-  { "", "nm", "mac.w @<REG_M>+,@<REG_N>+", "0100nnnnmmmm1111",
+  { "nm", "nm", "mac.w @<REG_M>+,@<REG_N>+", "0100nnnnmmmm1111",
     "macw(R0,memory,n,m,endianw);",
   },
 
@@ -607,7 +610,7 @@ op tab[] =
     "R[n] = RSBAT (R0 + R[m]);",
     "L (n);",
   },
-  { "n", "m", "mov.b @<REG_M>+,<REG_N>", "0110nnnnmmmm0100",
+  { "nm", "m", "mov.b @<REG_M>+,<REG_N>", "0110nnnnmmmm0100",
     "MA (1);",
     "R[n] = RSBAT (R[m]);",
     "R[m] += 1;",
@@ -629,7 +632,7 @@ op tab[] =
     "MA (1);",
     "WBAT (R[n] + R0, R[m]);",
   },
-  { "", "nm", "mov.b <REG_M>,@-<REG_N>", "0010nnnnmmmm0100",
+  { "n", "nm", "mov.b <REG_M>,@-<REG_N>", "0010nnnnmmmm0100",
     "MA (1);",
     "R[n] -= 1;",
     "WBAT (R[n], R[m]);",
@@ -683,7 +686,7 @@ op tab[] =
     "MA (1);",
     "WLAT (R0 + R[n], R[m]);",
   },
-  { "", "nm", "mov.l <REG_M>,@-<REG_N>", "0010nnnnmmmm0110",
+  { "n", "nm", "mov.l <REG_M>,@-<REG_N>", "0010nnnnmmmm0110",
     "MA (1) ;",
     "R[n] -= 4;",
     "WLAT (R[n], R[m]);",
@@ -694,8 +697,8 @@ op tab[] =
   },
 
   { "0", "", "mov.w @(<disp>,GBR),R0", "11000101i8*2....",
-    "MA (1)",
-    ";R0 = RSWAT (i + GBR);",
+    "MA (1);",
+    "R0 = RSWAT (i + GBR);",
     "L (0);",
   },
   { "n", "", "mov.w @(<disp>,PC),<REG_N>", "1001nnnni8p2....",
@@ -750,9 +753,10 @@ op tab[] =
     "R0 = ((i + 4 + PH2T (PC)) & ~0x3);",
   },
 
-  { "0", "", "movca.l @R0, <REG_N>", "0000nnnn11000011",
-    "/* FIXME: Not implemented */",
-    "RAISE_EXCEPTION (SIGILL);",
+  { "", "n0", "movca.l R0, @<REG_N>", "0000nnnn11000011",
+    "/* We don't simulate cache, so this insn is identical to mov.  */",
+    "MA (1);",
+    "WLAT (R[n], R[0]);",
   },
 
   { "n", "", "movt <REG_N>", "0000nnnn00101001",
@@ -798,18 +802,18 @@ op tab[] =
     "R[n] = ~R[m];",
   },
 
-  { "0", "", "ocbi @<REG_N>", "0000nnnn10010011",
-    "/* FIXME: Not implemented */",
-    "RAISE_EXCEPTION (SIGILL);",
+  { "", "n", "ocbi @<REG_N>", "0000nnnn10010011",
+    "RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop.  */",
+    "/* FIXME: Cache not implemented */",
   },
 
-  { "0", "", "ocbp @<REG_N>", "0000nnnn10100011",
-    "/* FIXME: Not implemented */",
-    "RAISE_EXCEPTION (SIGILL);",
+  { "", "n", "ocbp @<REG_N>", "0000nnnn10100011",
+    "RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop.  */",
+    "/* FIXME: Cache not implemented */",
   },
 
   { "", "n", "ocbwb @<REG_N>", "0000nnnn10110011",
-    "RSBAT (R[n]); /* Take exceptions like byte load.  */",
+    "RSBAT (R[n]); /* Take exceptions like byte load, otherwise noop.  */",
     "/* FIXME: Cache not implemented */",
   },
 
@@ -880,7 +884,7 @@ op tab[] =
   { "", "n", "setrc <REG_N>", "0100nnnn00010100",
     "SET_RC (R[n]);",
   },
-  { "", "n", "setrc #<imm>", "10000010i8*1....",
+  { "", "", "setrc #<imm>", "10000010i8*1....",
     /* It would be more realistic to let loop_start point to some static
        memory that contains an illegal opcode and then give a bus error when
        the loop is eventually encountered, but it seems not only simpler,
@@ -1137,7 +1141,7 @@ op movsxy_tab[] =
     "DSP_R (m) = RSWAT (R[n]);",
     "R[n] += R[8];",
   },
-  { "n", "n", "<DSP_REG_M>,movs.w @-<REG_N>", "111101NNMMMM0001",
+  { "n", "n", "movs.w <DSP_REG_M>,@-<REG_N>", "111101NNMMMM0001",
     "MA (1);",
     "R[n] -= 2;",
     "WWAT (R[n], DSP_R (m) >> 16);",
@@ -1198,7 +1202,7 @@ op movsxy_tab[] =
     "DSP_GRD (m) = SIGN32 (DSP_R (m));",
     "R[n] += R[8];",
   },
-  { "n", "n", "<DSP_REG_M>,movs.l @-<REG_N>", "111101NNMMMM0011",
+  { "n", "n", "movs.l <DSP_REG_M>,@-<REG_N>", "111101NNMMMM0011",
     "MA (1);",
     "R[n] -= 4;",
     "WLAT (R[n], DSP_R (m));",
@@ -1217,7 +1221,7 @@ op movsxy_tab[] =
     "WLAT (R[n], DSP_R (m));",
     "R[n] += R[8];",
   },
-  { "n", "n", "<DSP_GRD_M>,movs.l @-<REG_N>", "111101NNGGGG0011",
+  { "n", "n", "movs.l <DSP_GRD_M>,@-<REG_N>", "111101NNGGGG0011",
     "MA (1);",
     "R[n] -= 4;",
     "WLAT (R[n], SEXT (DSP_R (m)));",
@@ -1245,7 +1249,7 @@ op movsxy_tab[] =
     "R[n] += ((R[n] & 0xffff) == MOD_ME) ? MOD_DELTA : 2;",
     "iword &= 0xfd53; goto top;",
   },
-  { "n", "n8","movx.w @<REG_x>+REG_8,<DSP_XX>", "111100xxXX001000",
+  { "n", "n8","movx.w @<REG_x>+REG_8,<DSP_XX>", "111100xxXX001100",
     "DSP_R (m) = RSWAT (R[n]) << 16;",
     "R[n] += ((R[n] & 0xffff) == MOD_ME) ? MOD_DELTA : R[8];",
     "iword &= 0xfd53; goto top;",
@@ -1259,7 +1263,7 @@ op movsxy_tab[] =
     "R[n] += ((R[n] & 0xffff) == MOD_ME) ? MOD_DELTA : 2;",
     "iword &= 0xfd53; goto top;",
   },
-  { "n", "n8","movx.w <DSP_Aa>,@<REG_x>+REG_8","111100xxaa101000",
+  { "n", "n8","movx.w <DSP_Aa>,@<REG_x>+REG_8","111100xxaa101100",
     "WWAT (R[n], DSP_R (m) >> 16);",
     "R[n] += ((R[n] & 0xffff) == MOD_ME) ? MOD_DELTA : R[8];",
     "iword &= 0xfd53; goto top;",
@@ -1267,22 +1271,22 @@ op movsxy_tab[] =
   { "", "n", "movy.w @<REG_y>,<DSP_YY>",   "111100yyYY000001",
     "DSP_R (m) = RSWAT (R[n]) << 16;",
   },
-  { "n", "n", "movy.w @<REG_x>+,<DSP_YY>", "111100yyYY000010",
+  { "n", "n", "movy.w @<REG_y>+,<DSP_YY>", "111100yyYY000010",
     "DSP_R (m) = RSWAT (R[n]) << 16;",
     "R[n] += ((R[n] | ~0xffff) == MOD_ME) ? MOD_DELTA : 2;",
   },
-  { "n", "n9","movy.w @<REG_x>+REG_9,<DSP_YY>", "111100yyYY000010",
+  { "n", "n9","movy.w @<REG_y>+REG_9,<DSP_YY>", "111100yyYY000011",
     "DSP_R (m) = RSWAT (R[n]) << 16;",
     "R[n] += ((R[n] | ~0xffff) == MOD_ME) ? MOD_DELTA : R[9];",
   },
-  { "", "n", "movy.w <DSP_Aa>,@<REG_x>",   "111100yyAA010001",
+  { "", "n", "movy.w <DSP_Aa>,@<REG_y>",   "111100yyAA010001",
     "WWAT (R[n], DSP_R (m) >> 16);",
   },
-  { "n", "n", "movy.w <DSP_Aa>,@<REG_x>+", "111100yyAA010010",
+  { "n", "n", "movy.w <DSP_Aa>,@<REG_y>+", "111100yyAA010010",
     "WWAT (R[n], DSP_R (m) >> 16);",
     "R[n] += ((R[n] | ~0xffff) == MOD_ME) ? MOD_DELTA : 2;",
   },
-  { "n", "n9", "movy.w <DSP_Aa>,@<REG_x>+REG_9", "111100yyAA010010",
+  { "n", "n9", "movy.w <DSP_Aa>,@<REG_y>+REG_9", "111100yyAA010011",
     "WWAT (R[n], DSP_R (m) >> 16);",
     "R[n] += ((R[n] | ~0xffff) == MOD_ME) ? MOD_DELTA : R[9];",
   },
@@ -1302,10 +1306,10 @@ op ppi_tab[] =
   { "","", "pshl #<imm>,dz",   "00000iiim16.zzzz",
     "int Sz = DSP_R (z) & 0xffff0000;",
     "",
-    "if (i < 16)",
+    "if (i <= 16)",
     "  res = Sz << i;",
     "else if (i >= 128 - 16)",
-    "  res = Sz >> 128 - i;",
+    "  res = (unsigned) Sz >> 128 - i; /* no sign extension */",
     "else",
     "  {",
     "    RAISE_EXCEPTION (SIGILL);",
@@ -1319,7 +1323,7 @@ op ppi_tab[] =
     "int Sz = DSP_R (z);",
     "int Sz_grd = GET_DSP_GRD (z);",
     "",
-    "if (i < 32)",
+    "if (i <= 32)",
     "  {",
     "    if (i == 32)",
     "      {",
@@ -1358,7 +1362,7 @@ op ppi_tab[] =
     "greater_equal = 0;",
   },
   { "","", "pmuls Se,Sf,Dg",   "0100eeffxxyygguu",
-    "res = (DSP_R (e)) >> 16 * (DSP_R (f) >> 16) * 2;",
+    "res = (DSP_R (e) >> 16) * (DSP_R (f) >> 16) * 2;",
     "if (res == 0x80000000)",
     "  res = 0x7fffffff;",
     "DSP_R (g) = res;",
@@ -1371,7 +1375,7 @@ op ppi_tab[] =
     "int Sy = DSP_R (y);",
     "int Sy_grd = SIGN32 (Sy);",
     "",
-    "res = (DSP_R (e)) >> 16 * (DSP_R (f) >> 16) * 2;",
+    "res = (DSP_R (e) >> 16) * (DSP_R (f) >> 16) * 2;",
     "if (res == 0x80000000)",
     "  res = 0x7fffffff;",
     "DSP_R (g) = res;",
@@ -1390,7 +1394,7 @@ op ppi_tab[] =
     "int Sy = DSP_R (y);",
     "int Sy_grd = SIGN32 (Sy);",
     "",
-    "res = (DSP_R (e)) >> 16 * (DSP_R (f) >> 16) * 2;",
+    "res = (DSP_R (e) >> 16) * (DSP_R (f) >> 16) * 2;",
     "if (res == 0x80000000)",
     "  res = 0x7fffffff;",
     "DSP_R (g) = res;",
@@ -1478,7 +1482,7 @@ op ppi_tab[] =
     "int Sx = DSP_R (x);",
     "int Sx_grd = GET_DSP_GRD (x);",
     "",
-    "res = Sx + 0x8000;",
+    "res = (Sx + 0x8000) & 0xffff0000;",
     "carry = (unsigned) res < (unsigned) Sx;",
     "res_grd = Sx_grd + carry;",
     "COMPUTE_OVERFLOW;",
@@ -1511,7 +1515,7 @@ op ppi_tab[] =
     "int Sy = DSP_R (y);",
     "int Sy_grd = SIGN32 (Sy);",
     "",
-    "res = Sy + 0x8000;",
+    "res = (Sy + 0x8000) & 0xffff0000;",
     "carry = (unsigned) res < (unsigned) Sy;",
     "res_grd = Sy_grd + carry;",
     "COMPUTE_OVERFLOW;",
@@ -1521,10 +1525,10 @@ op ppi_tab[] =
     "int Sx = DSP_R (x) & 0xffff0000;",
     "int Sy = DSP_R (y) >> 16 & 0x7f;",
     "",
-    "if (Sy < 16)",
+    "if (Sy <= 16)",
     "  res = Sx << Sy;",
     "else if (Sy >= 128 - 16)",
-    "  res = Sx >> 128 - Sy;",
+    "  res = (unsigned) Sx >> 128 - Sy;        /* no sign extension */",
     "else",
     "  {",
     "    RAISE_EXCEPTION (SIGILL);",
@@ -1537,7 +1541,7 @@ op ppi_tab[] =
     "int Sx_grd = GET_DSP_GRD (x);",
     "int Sy = DSP_R (y) >> 16 & 0x7f;",
     "",
-    "if (Sy < 32)",
+    "if (Sy <= 32)",
     "  {",
     "    if (Sy == 32)",
     "      {",
@@ -2102,7 +2106,7 @@ filltable (p)
     }
 }
 
-/* Table already contais all the switch case tags for 16-bit opcode double
+/* Table already contains all the switch case tags for 16-bit opcode double
    data transfer (ddt) insns, and the switch case tag for processing parallel
    processing insns (ppi) for code 0xf800 (ppi nopx nopy).  Copy the
    latter tag to represent all combinations of ppi with ddt.  */
@@ -2137,6 +2141,11 @@ gensim_caselist (p)
        {
          switch (*s)
            {
+           default:
+             fprintf (stderr, "gencode/gensim_caselist: illegal char '%c'\n",
+                      *s);
+             exit (1);
+             break;
            case '0':
            case '1':
              s += 2;
@@ -2159,7 +2168,7 @@ gensim_caselist (p)
              s += 2;
              break;
            case 'y':
-             printf ("      int n = ((iword >> 8) & 1) + 4;\n");
+             printf ("      int n = ((iword >> 8) & 1) + 6;\n");
              needn = 1;
              s += 2;
              break;
@@ -2330,6 +2339,11 @@ expand_ppi_code (val, i, s)
     {
       switch (s[0])
        {
+       default:
+         fprintf (stderr, "gencode/expand_ppi_code: Illegal char '%c'\n",
+                  s[0]);
+         exit (2);
+         break;
        /* The last eight bits are disregarded for the switch table.  */
        case 'm':
        case 'x':
@@ -2459,7 +2473,7 @@ ppi_gensim ()
              break;
            case 'c':
              printf ("      if ((((iword >> 8) ^ DSR) & 1) == 0)\n");
-             printf ("\tbreak;\n");
+             printf ("\treturn;\n");
              printf ("    }\n");
              printf ("  case %d:      \n", p->index + 1);
              printf ("    {\n");
index c88c159e946945244f1f57c797e0c79051a07e15..301fe81b2b1580c7641d62f425816cf68f0c4bb6 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-09  Michael Snyder  <msnyder@redhat.com>
+
+       * sim/sh: New directory.  Tests for Renesas sh family.
+
 2003-04-13  Michael Snyder  <msnyder@redhat.com>
 
        * sim/h8300: New directory.  Tests for Renesas h8/300 family.