public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* elfutils 0.127 merge happening tomorrow early morning.
@ 2007-04-26 21:17 Nurdin Premji
  2007-04-27 22:29 ` Nurdin Premji
  0 siblings, 1 reply; 2+ messages in thread
From: Nurdin Premji @ 2007-04-26 21:17 UTC (permalink / raw)
  To: frysk

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

I will be merging elfutils 0.127 to head tomorrow early morning.
Attached is the patch that will be merged, I've tested against x86_64 
and x86 with no regressions.
My testing included running make check, frysk-import/TestRunner, 
frysk-core/TestRunner and make check inside the elfutils branch. Results 
are the same before and after this patch.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mergeelf.diff --]
[-- Type: text/x-patch; name="mergeelf.diff", Size: 215884 bytes --]

Index: frysk-imports/elfutils/INSTALL
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/INSTALL,v
retrieving revision 1.3
diff -u -u -r1.3 INSTALL
--- frysk-imports/elfutils/INSTALL	26 Apr 2007 15:18:41 -0000	1.3
+++ frysk-imports/elfutils/INSTALL	26 Apr 2007 19:47:24 -0000
@@ -1,27 +1,43 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
 Basic Installation
 ==================
 
-   These are generic installation instructions.
+These are generic installation instructions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
 those values to create a `Makefile' in each directory of the package.
 It may also create one or more `.h' files containing system-dependent
 definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, a file
-`config.cache' that saves the results of its tests to speed up
-reconfiguring, and a file `config.log' containing compiler output
-(useful mainly for debugging `configure').
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
 
    If you need to do unusual things to compile the package, please try
 to figure out how `configure' could check whether to do them, and mail
 diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If at some point `config.cache'
-contains results you don't want to keep, you may remove or edit it.
-
-   The file `configure.in' is used to create `configure' by a program
-called `autoconf'.  You only need `configure.in' if you want to change
-it or regenerate `configure' using a newer version of `autoconf'.
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
 
 The simplest way to compile this package is:
 
@@ -54,20 +70,22 @@
 Compilers and Options
 =====================
 
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  You can give `configure'
-initial values for variables by setting them in the environment.  Using
-a Bourne-compatible shell, you can do that on the command line like
-this:
-     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
 
-Or on systems that have the `env' program, you can do it like this:
-     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+   *Note Defining Variables::, for more details.
 
 Compiling For Multiple Architectures
 ====================================
 
-   You can compile the package for more than one kind of computer at the
+You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
 own directory.  To do this, you must use a version of `make' that
 supports the `VPATH' variable, such as GNU `make'.  `cd' to the
@@ -75,28 +93,28 @@
 the `configure' script.  `configure' automatically checks for the
 source code in the directory that `configure' is in and in `..'.
 
-   If you have to use a `make' that does not supports the `VPATH'
-variable, you have to compile the package for one architecture at a time
-in the source code directory.  After you have installed the package for
-one architecture, use `make distclean' before reconfiguring for another
-architecture.
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
 
 Installation Names
 ==================
 
-   By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc.  You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
 
    In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
+options like `--bindir=DIR' to specify different values for particular
 kinds of files.  Run `configure --help' for a list of the directories
 you can set and what kinds of files go in them.
 
@@ -107,7 +125,7 @@
 Optional Features
 =================
 
-   Some packages pay attention to `--enable-FEATURE' options to
+Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
 is something like `gnu-as' or `x' (for the X Window System).  The
@@ -122,48 +140,86 @@
 Specifying the System Type
 ==========================
 
-   There may be some features `configure' can not figure out
-automatically, but needs to determine by the type of host the package
-will run on.  Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
-`--host=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name with three fields:
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
      CPU-COMPANY-SYSTEM
 
-See the file `config.sub' for the possible values of each field.  If
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
 `config.sub' isn't included in this package, then this package doesn't
-need to know the host type.
+need to know the machine type.
 
-   If you are building compiler tools for cross-compiling, you can also
-use the `--target=TYPE' option to select the type of system they will
-produce code for and the `--build=TYPE' option to select the type of
-system on which you are compiling the package.
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
 
 Sharing Defaults
 ================
 
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
 A warning: not all `configure' scripts look for a site script.
 
-Operation Controls
+Defining Variables
 ==================
 
-   `configure' recognizes the following options to control how it
-operates.
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
 
-`--cache-file=FILE'
-     Use and save the results of the tests in FILE instead of
-     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
-     debugging `configure'.
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).  Here is a another example:
+
+     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
 
 `--help'
+`-h'
      Print a summary of the options to `configure', and exit.
 
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
 `--quiet'
 `--silent'
 `-q'
@@ -175,8 +231,6 @@
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
-`--version'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
 
-`configure' also accepts some other, not widely useful, options.
Index: frysk-imports/elfutils/NEWS
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/NEWS,v
retrieving revision 1.7
diff -u -u -r1.7 NEWS
--- frysk-imports/elfutils/NEWS	26 Apr 2007 15:18:41 -0000	1.7
+++ frysk-imports/elfutils/NEWS	26 Apr 2007 19:47:24 -0000
@@ -1,6 +1,9 @@
-Version 0.127-UNFINISHED:
+Version 0.127:
 
-libdwfl: new function dwfl_module_addrsym
+libdw: new function dwarf_getsrcdirs
+
+libdwfl: new functions dwfl_module_addrsym, dwfl_report_begin_add,
+	 dwfl_module_address_section
 
 Version 0.126:
 
Index: frysk-imports/elfutils/configure.ac
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/configure.ac,v
retrieving revision 1.7
diff -u -u -r1.7 configure.ac
--- frysk-imports/elfutils/configure.ac	26 Apr 2007 15:18:41 -0000	1.7
+++ frysk-imports/elfutils/configure.ac	26 Apr 2007 19:47:24 -0000
@@ -16,7 +16,7 @@
 dnl along with this program; if not, write to the Free Software Foundation,
 dnl Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 dnl
-AC_INIT([Red Hat elfutils],[0.126],[http://bugzilla.redhat.com/bugzilla/],
+AC_INIT([Red Hat elfutils],[0.127],[http://bugzilla.redhat.com/bugzilla/],
 	[elfutils])
 
 AC_CONFIG_AUX_DIR([config])
Index: frysk-imports/elfutils/backends/ChangeLog
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/backends/ChangeLog,v
retrieving revision 1.9
diff -u -u -r1.9 ChangeLog
--- frysk-imports/elfutils/backends/ChangeLog	26 Apr 2007 15:18:41 -0000	1.9
+++ frysk-imports/elfutils/backends/ChangeLog	26 Apr 2007 19:47:24 -0000
@@ -3,6 +3,11 @@
 	* Makefile.am: Work around a bug in GNU make -jN by mentioning *.map.
 	* Makefile.am: Mention the *.o files.
 
+2007-04-01  Roland McGrath  <roland@redhat.com>
+
+	* x86_64_regs.c (x86_64_register_info): Add more registers from newer
+	ABI spec.
+
 2007-01-11  Roland McGrath  <roland@redhat.com>
 
 	* ia64_symbol.c (ia64_machine_section_flag_check): New function.
Index: frysk-imports/elfutils/backends/x86_64_regs.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/backends/x86_64_regs.c,v
retrieving revision 1.3
diff -u -u -r1.3 x86_64_regs.c
--- frysk-imports/elfutils/backends/x86_64_regs.c	26 Apr 2007 15:18:41 -0000	1.3
+++ frysk-imports/elfutils/backends/x86_64_regs.c	26 Apr 2007 19:47:25 -0000
@@ -1,5 +1,5 @@
 /* Register names and numbers for x86-64 DWARF.
-   Copyright (C) 2005, 2006 Red Hat, Inc.
+   Copyright (C) 2005, 2006, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
 
    Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -29,6 +29,7 @@
 
 #include <assert.h>
 #include <dwarf.h>
+#include <string.h>
 
 #define BACKEND x86_64_
 #include "libebl_CPU.h"
@@ -40,9 +41,9 @@
 		      int *bits, int *type)
 {
   if (name == NULL)
-    return 49;
+    return 67;
 
-  if (regno < 0 || regno > 48 || namelen < 6)
+  if (regno < 0 || regno > 66 || namelen < 7)
     return -1;
 
   *prefix = "%";
@@ -51,10 +52,7 @@
   if (regno < 17)
     {
       *setname = "integer";
-      if (regno == 16 || regno == 6 || regno == 7)
-	*type = DW_ATE_address;
-      else
-	*type = DW_ATE_signed;
+      *type = DW_ATE_signed;
     }
   else if (regno < 33)
     {
@@ -67,11 +65,15 @@
       *type = DW_ATE_float;
       *bits = 80;
     }
-  else
+  else if (regno < 49)
+    *setname = "MMX";
+  else if (regno > 49 && regno < 60)
     {
-      *setname = "MMX";
-      *bits = 64;
+      *setname = "segment";
+      *bits = 16;
     }
+  else
+    *setname = "control";
 
   switch (regno)
     {
@@ -80,7 +82,9 @@
 	  "ax", "dx", "cx", "bx", "si", "di", "bp", "sp"
 	};
 
-    case 0 ... 7:
+    case 6 ... 7:
+      *type = DW_ATE_address;
+    case 0 ... 5:
       name[0] = 'r';
       name[1] = baseregs[regno][0];
       name[2] = baseregs[regno][1];
@@ -101,6 +105,7 @@
       break;
 
     case 16:
+      *type = DW_ATE_address;
       name[0] = 'r';
       name[1] = 'i';
       name[2] = 'p';
@@ -137,6 +142,37 @@
       name[2] = regno - 41 + '0';
       namelen = 3;
       break;
+
+    case 50 ... 55:
+      name[0] = "ecsdfg"[regno - 50];
+      name[1] = 's';
+      namelen = 2;
+      break;
+
+    case 58 ... 59:
+      *type = DW_ATE_address;
+      *bits = 64;
+      name[0] = regno - 58 + 'f';
+      return stpcpy (&name[1], "s.base") + 1 - name;
+
+    case 49:
+      return stpcpy (name, "rflags") + 1 - name;
+    case 62:
+      return stpcpy (name, "tr") + 1 - name;
+    case 63:
+      return stpcpy (name, "ldtr") + 1 - name;
+    case 64:
+      return stpcpy (name, "mxcsr") + 1 - name;
+
+    case 65 ... 66:
+      name[0] = 'f';
+      name[1] = "cs"[regno - 65];
+      name[2] = 'w';
+      namelen = 3;
+      break;
+
+    default:
+      return 0;
     }
 
   name[namelen++] = '\0';
Index: frysk-imports/elfutils/config/config.guess
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/config/config.guess,v
retrieving revision 1.3
diff -u -u -r1.3 config.guess
--- frysk-imports/elfutils/config/config.guess	26 Apr 2007 15:18:41 -0000	1.3
+++ frysk-imports/elfutils/config/config.guess	26 Apr 2007 19:47:26 -0000
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2004-06-11'
+timestamp='2005-07-08'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -17,13 +17,15 @@
 #
 # 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+
 # Originally written by Per Bothner <per@bothner.com>.
 # Please send patches to <config-patches@gnu.org>.  Submit a context
 # diff and a properly formatted ChangeLog entry.
@@ -53,7 +55,7 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -66,11 +68,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -123,7 +125,7 @@
 	;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
@@ -196,64 +198,20 @@
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
-	exit 0 ;;
-    amd64:OpenBSD:*:*)
-	echo x86_64-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    cats:OpenBSD:*:*)
-	echo arm-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    luna88k:OpenBSD:*:*)
-    	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    macppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvmeppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mipseb-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sun3:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
     *:ekkoBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     macppc:MirBSD:*:*)
 	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:MirBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -306,40 +264,43 @@
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
-    Alpha*:OpenVMS:*:*)
-	echo alpha-hp-vms
-	exit 0 ;;
+	exit ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# Should we change UNAME_MACHINE based on the output of uname instead
 	# of the specific Alpha model?
 	echo alpha-pc-interix
-	exit 0 ;;
+	exit ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
-	exit 0 ;;
+	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
-	exit 0;;
+	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
+	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-morphos
-	exit 0 ;;
+	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
-	exit 0 ;;
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
     *:OS400:*:*)
         echo powerpc-ibm-os400
-	exit 0 ;;
+	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
+	exit ;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -347,32 +308,32 @@
 	else
 		echo pyramid-pyramid-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
-	exit 0 ;;
+	exit ;;
     DRS?6000:unix:4.0:6*)
 	echo sparc-icl-nx6
-	exit 0 ;;
-    DRS?6000:UNIX_SV:4.2*:7*)
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     i86pc:SunOS:5.*:*)
 	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
 	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
 	    Series*|S4*)
@@ -381,10 +342,10 @@
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
+	exit ;;
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -396,10 +357,10 @@
 		echo sparc-sun-sunos${UNAME_RELEASE}
 		;;
 	esac
-	exit 0 ;;
+	exit ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # "atarist" or "atariste" at least should have a processor
@@ -410,40 +371,40 @@
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
         echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
         echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
+	exit ;;
     RISC*:ULTRIX:*:*)
 	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -467,32 +428,33 @@
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c \
-	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && exit 0
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
 	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
-	exit 0 ;;
+	exit ;;
     Motorola:*:4.3:PL8-*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
-	exit 0 ;;
+	exit ;;
     m88k:CX/UX:7*:*)
 	echo m88k-harris-cxux7
-	exit 0 ;;
+	exit ;;
     m88k:*:4*:R4*)
 	echo m88k-motorola-sysv4
-	exit 0 ;;
+	exit ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -508,29 +470,29 @@
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit 0 ;;
+ 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
-	exit 0 ;;
+	exit ;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
 	echo m88k-tektronix-sysv3
-	exit 0 ;;
+	exit ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
 	echo m68k-tektronix-bsd
-	exit 0 ;;
+	exit ;;
     *:IRIX*:*:*)
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
+	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
 	echo i386-ibm-aix
-	exit 0 ;;
+	exit ;;
     ia64:AIX:*:*)
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
@@ -538,7 +500,7 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 		eval $set_cc_for_build
@@ -553,14 +515,18 @@
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-		echo rs6000-ibm-aix3.2.5
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
 	else
 		echo rs6000-ibm-aix3.2
 	fi
-	exit 0 ;;
+	exit ;;
     *:AIX:*:[45])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
@@ -574,28 +540,28 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
-	exit 0 ;;
+	exit ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
-	exit 0 ;;
+	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
+	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
-	exit 0 ;;
+	exit ;;
     DPX/2?00:B.O.S.:*:*)
 	echo m68k-bull-sysv3
-	exit 0 ;;
+	exit ;;
     9000/[34]??:4.3bsd:1.*:*)
 	echo m68k-hp-bsd
-	exit 0 ;;
+	exit ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
-	exit 0 ;;
+	exit ;;
     9000/[34678]??:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	case "${UNAME_MACHINE}" in
@@ -657,9 +623,19 @@
 	esac
 	if [ ${HP_ARCH} = "hppa2.0w" ]
 	then
-	    # avoid double evaluation of $set_cc_for_build
-	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep __LP64__ >/dev/null
 	    then
 		HP_ARCH="hppa2.0w"
 	    else
@@ -667,11 +643,11 @@
 	    fi
 	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     ia64:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ia64-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     3050*:HI-UX:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -699,166 +675,166 @@
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
 	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
+	exit ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
 	echo hppa1.1-hp-bsd
-	exit 0 ;;
+	exit ;;
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
-	exit 0 ;;
+	exit ;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 	echo hppa1.0-hp-mpeix
-	exit 0 ;;
+	exit ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 	echo hppa1.1-hp-osf
-	exit 0 ;;
+	exit ;;
     hp8??:OSF1:*:*)
 	echo hppa1.0-hp-osf
-	exit 0 ;;
+	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
 	else
 	    echo ${UNAME_MACHINE}-unknown-osf1
 	fi
-	exit 0 ;;
+	exit ;;
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
-	exit 0 ;;
+	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit 0 ;;
+        exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit 0 ;;
+        exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit 0 ;;
+        exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit 0 ;;
+        exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit 0 ;;
+        exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*[A-Z]90:*:*:*)
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
 	      -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     *:UNICOS/mp:*:*)
-	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
+        exit ;;
     5000:UNIX_System_V:4.*:*)
         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
         FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
         echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit 0 ;;
+	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sparc*:BSD/OS:*:*)
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:FreeBSD:*:*)
-	# Determine whether the default compiler uses glibc.
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#if __GLIBC__ >= 2
-	LIBC=gnu
-	#else
-	LIBC=
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
-	# FreeBSD's kernel, but not the complete OS.
-	case ${LIBC} in gnu) kernel_only='k' ;; esac
-	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
-	exit 0 ;;
+	exit ;;
     i*:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
-	exit 0 ;;
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
-	exit 0 ;;
+	exit ;;
     x86:Interix*:[34]*)
 	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-	exit 0 ;;
+	exit ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 	echo i${UNAME_MACHINE}-pc-mks
-	exit 0 ;;
+	exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
 	# UNAME_MACHINE based on the output of uname instead of i386?
 	echo i586-pc-interix
-	exit 0 ;;
+	exit ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
-	exit 0 ;;
+	exit ;;
+    amd64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
-	exit 0 ;;
+	exit ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     *:GNU:*:*)
 	# the GNU system
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
+	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
 	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit 0 ;;
+	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
-	exit 0 ;;
+	exit ;;
     arm*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     cris:Linux:*:*)
 	echo cris-axis-linux-gnu
-	exit 0 ;;
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     m32r*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     m68*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     mips:Linux:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -876,7 +852,7 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
     mips64:Linux:*:*)
 	eval $set_cc_for_build
@@ -895,14 +871,14 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
     ppc:Linux:*:*)
 	echo powerpc-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     ppc64:Linux:*:*)
 	echo powerpc64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -916,7 +892,7 @@
 	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit 0 ;;
+	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -924,25 +900,25 @@
 	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
 	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
-	exit 0 ;;
+	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
 	echo hppa64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
-	exit 0 ;;
+	exit ;;
     sh64*:Linux:*:*)
     	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     x86_64:Linux:*:*)
 	echo x86_64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     i*86:Linux:*:*)
 	# The BFD linker knows what the default object file format is, so
 	# first see if it will tell us. cd to the root directory to prevent
@@ -960,15 +936,15 @@
 		;;
 	  a.out-i386-linux)
 		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit 0 ;;
+		exit ;;
 	  coff-i386)
 		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit 0 ;;
+		exit ;;
 	  "")
 		# Either a pre-BFD a.out linker (linux-gnuoldld) or
 		# one that does not give us useful --help.
 		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit 0 ;;
+		exit ;;
 	esac
 	# Determine whether the default compiler is a.out or elf
 	eval $set_cc_for_build
@@ -996,15 +972,18 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
 	;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 	# earlier versions are messed up and put the nodename in both
 	# sysname and nodename.
 	echo i386-sequent-sysv4
-	exit 0 ;;
+	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
         # Unixware is an offshoot of SVR4, but it has its own version
         # number series starting with 2...
@@ -1012,27 +991,27 @@
 	# I just have to hope.  -- rms.
         # Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
     i*86:OS/2:*:*)
 	# If we were able to find `uname', then EMX Unix compatibility
 	# is probably installed.
 	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit 0 ;;
+	exit ;;
     i*86:XTS-300:*:STOP)
 	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
+	exit ;;
     i*86:atheos:*:*)
 	echo ${UNAME_MACHINE}-unknown-atheos
-	exit 0 ;;
-	i*86:syllable:*:*)
+	exit ;;
+    i*86:syllable:*:*)
 	echo ${UNAME_MACHINE}-pc-syllable
-	exit 0 ;;
+	exit ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
 	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     i*86:*DOS:*:*)
 	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
+	exit ;;
     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
 	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -1040,15 +1019,16 @@
 	else
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
 	fi
-	exit 0 ;;
-    i*86:*:5:[78]*)
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 	esac
 	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1066,73 +1046,73 @@
 	else
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
-	exit 0 ;;
+	exit ;;
     pc:*:*:*)
 	# Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
         # the processor, so we play safe by assuming i386.
 	echo i386-pc-msdosdjgpp
-        exit 0 ;;
+        exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
-	exit 0 ;;
+	exit ;;
     paragon:*:*:*)
 	echo i860-intel-osf1
-	exit 0 ;;
+	exit ;;
     i860:*:4.*:*) # i860-SVR4
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
 	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
 	else # Add other i860-SVR4 vendors below as they are discovered.
 	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
 	fi
-	exit 0 ;;
+	exit ;;
     mini*:CTIX:SYS*5:*)
 	# "miniframe"
 	echo m68010-convergent-sysv
-	exit 0 ;;
+	exit ;;
     mc68k:UNIX:SYSTEM5:3.51m)
 	echo m68k-convergent-sysv
-	exit 0 ;;
+	exit ;;
     M680?0:D-NIX:5.3:*)
 	echo m68k-diab-dnix
-	exit 0 ;;
+	exit ;;
     M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
+          && { echo i486-ncr-sysv4; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
-	exit 0 ;;
+	exit ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1140,68 +1120,73 @@
 	else
 		echo ns32k-sni-sysv
 	fi
-	exit 0 ;;
+	exit ;;
     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                       # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
-        exit 0 ;;
+        exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes@openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
 	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
+	exit ;;
     *:*:*:FTX*)
 	# From seanf@swdc.stratus.com.
 	echo i860-stratus-sysv4
-	exit 0 ;;
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
     *:VOS:*:*)
 	# From Paul.Green@stratus.com.
 	echo hppa1.1-stratus-vos
-	exit 0 ;;
+	exit ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
-	exit 0 ;;
+	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
 	        echo mips-nec-sysv${UNAME_RELEASE}
 	else
 	        echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit 0 ;;
+        exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
-	exit 0 ;;
+	exit ;;
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
 	echo powerpc-apple-beos
-	exit 0 ;;
+	exit ;;
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
-	exit 0 ;;
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-5:SUPER-UX:*:*)
 	echo sx5-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-6:SUPER-UX:*:*)
 	echo sx6-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Rhapsody:*:*)
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Darwin:*:*)
-	case `uname -p` in
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
 	    *86) UNAME_PROCESSOR=i686 ;;
-	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
 	if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1209,22 +1194,25 @@
 		UNAME_MACHINE=pc
 	fi
 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
-	exit 0 ;;
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
-	exit 0 ;;
+	exit ;;
     BS2000:POSIX*:*:*)
 	echo bs2000-siemens-sysv
-	exit 0 ;;
+	exit ;;
     DS/*:UNIX_System_V:*:*)
 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
@@ -1235,31 +1223,44 @@
 	    UNAME_MACHINE="$cputype"
 	fi
 	echo ${UNAME_MACHINE}-unknown-plan9
-	exit 0 ;;
+	exit ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
-	exit 0 ;;
+	exit ;;
     *:TENEX:*:*)
 	echo pdp10-unknown-tenex
-	exit 0 ;;
+	exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 	echo pdp10-dec-tops20
-	exit 0 ;;
+	exit ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
 	echo pdp10-xkl-tops20
-	exit 0 ;;
+	exit ;;
     *:TOPS-20:*:*)
 	echo pdp10-unknown-tops20
-	exit 0 ;;
+	exit ;;
     *:ITS:*:*)
 	echo pdp10-unknown-its
-	exit 0 ;;
+	exit ;;
     SEI:*:*:SEIUX)
         echo mips-sei-seiux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:DragonFly:*:*)
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit 0 ;;
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1291,7 +1292,7 @@
 #endif
 
 #if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
+  printf ("arm-acorn-riscix\n"); exit (0);
 #endif
 
 #if defined (hp300) && !defined (hpux)
@@ -1380,11 +1381,12 @@
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
 
 # Apollos put the system type in the environment.
 
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1393,22 +1395,22 @@
     case `getsysinfo -f cpu_type` in
     c1*)
 	echo c1-convex-bsd
-	exit 0 ;;
+	exit ;;
     c2*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     c34*)
 	echo c34-convex-bsd
-	exit 0 ;;
+	exit ;;
     c38*)
 	echo c38-convex-bsd
-	exit 0 ;;
+	exit ;;
     c4*)
 	echo c4-convex-bsd
-	exit 0 ;;
+	exit ;;
     esac
 fi
 
@@ -1419,7 +1421,9 @@
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
Index: frysk-imports/elfutils/config/config.sub
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/config/config.sub,v
retrieving revision 1.3
diff -u -u -r1.3 config.sub
--- frysk-imports/elfutils/config/config.sub	26 Apr 2007 15:18:41 -0000	1.3
+++ frysk-imports/elfutils/config/config.sub	26 Apr 2007 19:47:26 -0000
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2004-03-12'
+timestamp='2005-07-08'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,14 +21,15 @@
 #
 # 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.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+
 # Please send patches to <config-patches@gnu.org>.  Submit a context
 # diff and a properly formatted ChangeLog entry.
 #
@@ -70,7 +71,7 @@
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -83,11 +84,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -99,7 +100,7 @@
     *local*)
        # First pass through any local machine types.
        echo $1
-       exit 0;;
+       exit ;;
 
     * )
        break ;;
@@ -145,7 +146,7 @@
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis)
+	-apple | -axis | -knuth | -cray)
 		os=
 		basic_machine=$1
 		;;
@@ -231,13 +232,14 @@
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
 	| fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
-	| m32r | m32rle | m68000 | m68k | m88k | mcore \
+	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
@@ -246,6 +248,7 @@
 	| mips64vr4100 | mips64vr4100el \
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
 	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
@@ -254,23 +257,28 @@
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| ms1 \
 	| msp430 \
 	| ns16k | ns32k \
-	| openrisc | or32 \
+	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
-	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b \
 	| strongarm \
 	| tahoe | thumb | tic4x | tic80 | tron \
 	| v850 | v850e \
 	| we32k \
-	| x86 | xscale | xstormy16 | xtensa \
+	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
 	| z8k)
 		basic_machine=$basic_machine-unknown
 		;;
+	m32c)
+		basic_machine=$basic_machine-unknown
+		;;
 	m6811 | m68hc11 | m6812 | m68hc12)
 		# Motorola 68HC11/12.
 		basic_machine=$basic_machine-unknown
@@ -298,9 +306,9 @@
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* \
-	| bs2000-* \
+	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | cydra-* \
+	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
 	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
@@ -310,7 +318,7 @@
 	| ip2k-* | iq2000-* \
 	| m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | mcore-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
@@ -319,6 +327,7 @@
 	| mips64vr4100-* | mips64vr4100el-* \
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
 	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
@@ -326,27 +335,32 @@
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| ms1-* \
 	| msp430-* \
-	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
 	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
 	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
 	| tahoe-* | thumb-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tron-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-	| xtensa-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa-* \
 	| ymp-* \
 	| z8k-*)
 		;;
+	m32c-*)
+		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
 	386bsd)
@@ -445,6 +459,10 @@
 		basic_machine=j90-cray
 		os=-unicos
 		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
 	cr16c)
 		basic_machine=cr16c-unknown
 		os=-elf
@@ -452,6 +470,9 @@
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
 	cris | cris-* | etrax*)
 		basic_machine=cris-axis
 		;;
@@ -481,6 +502,10 @@
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
 	dpx20 | dpx20-*)
 		basic_machine=rs6000-bull
 		os=-bosx
@@ -659,10 +684,6 @@
 	mips3*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 		;;
-	mmix*)
-		basic_machine=mmix-knuth
-		os=-mmixware
-		;;
 	monitor)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -743,10 +764,6 @@
 	np1)
 		basic_machine=np1-gould
 		;;
-	nv1)
-		basic_machine=nv1-cray
-		os=-unicosmp
-		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -754,9 +771,8 @@
 		basic_machine=hppa1.1-oki
 		os=-proelf
 		;;
-	or32 | or32-*)
+	openrisc | openrisc-*)
 		basic_machine=or32-unknown
-		os=-coff
 		;;
 	os400)
 		basic_machine=powerpc-ibm
@@ -1029,6 +1045,10 @@
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
@@ -1059,6 +1079,9 @@
 	romp)
 		basic_machine=romp-ibm
 		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
 	rs6000)
 		basic_machine=rs6000-ibm
 		;;
@@ -1075,12 +1098,9 @@
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
 	sparc | sparcv8 | sparcv9 | sparcv9b)
 		basic_machine=sparc-sun
 		;;
@@ -1167,7 +1187,8 @@
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1185,7 +1206,7 @@
 		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 		;;
 	-mac*)
@@ -1294,6 +1315,9 @@
 	-kaos*)
 		os=-kaos
 		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
 	-none)
 		;;
 	*)
@@ -1371,9 +1395,15 @@
 	*-be)
 		os=-beos
 		;;
+	*-haiku)
+		os=-haiku
+		;;
 	*-ibm)
 		os=-aix
 		;;
+    	*-knuth)
+		os=-mmixware
+		;;
 	*-wec)
 		os=-proelf
 		;;
@@ -1539,7 +1569,7 @@
 esac
 
 echo $basic_machine$os
-exit 0
+exit
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
Index: frysk-imports/elfutils/config/depcomp
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/config/depcomp,v
retrieving revision 1.3
diff -u -u -r1.3 depcomp
--- frysk-imports/elfutils/config/depcomp	26 Apr 2007 15:18:41 -0000	1.3
+++ frysk-imports/elfutils/config/depcomp	26 Apr 2007 19:47:26 -0000
@@ -1,7 +1,9 @@
 #! /bin/sh
-
 # depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+scriptversion=2005-07-09.11
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 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
@@ -15,8 +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.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -25,22 +27,45 @@
 
 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
 
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
   exit 1
 fi
-# `libtool' can also be set to `yes' or `no'.
-
-if test -z "$depfile"; then
-   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
-   dir=`echo "$object" | sed 's,/.*$,/,'`
-   if test "$dir" = "$object"; then
-      dir=
-   fi
-   # FIXME: should be _deps on DOS.
-   depfile="$dir.deps/$base"
-fi
 
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
 
 rm -f "$tmpdepfile"
@@ -172,19 +197,25 @@
 
 aix)
   # The C for AIX Compiler uses -M and outputs the dependencies
-  # in a .u file.  This file always lives in the current directory.
-  # Also, the AIX compiler puts `$object:' at the start of each line;
-  # $object doesn't have directory information.
-  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
   tmpdepfile="$stripped.u"
-  outname="$stripped.o"
   if test "$libtool" = yes; then
     "$@" -Wc,-M
   else
     "$@" -M
   fi
-
   stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
   if test $stat -eq 0; then :
   else
     rm -f "$tmpdepfile"
@@ -192,6 +223,7 @@
   fi
 
   if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
     # Each line is of the form `foo.o: dependent.h'.
     # Do two passes, one to just change these to
     # `$object: dependent.h' and one to simply `dependent.h:'.
@@ -206,38 +238,96 @@
   rm -f "$tmpdepfile"
   ;;
 
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
 tru64)
-   # The Tru64 AIX compiler uses -MD to generate dependencies as a side
+   # The Tru64 compiler uses -MD to generate dependencies as a side
    # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
    # dependencies in `foo.d' instead, so we check for that too.
    # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
 
-   base=`echo "$object" | sed -e 's/\.o$/.d/' -e 's/\.lo$/.d/'`
-   tmpdepfile1="$base.o.d"
-   tmpdepfile2="$base.d"
    if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mecanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
       "$@" -Wc,-MD
    else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
       "$@" -MD
    fi
 
    stat=$?
    if test $stat -eq 0; then :
    else
-      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
       exit $stat
    fi
 
-   if test -f "$tmpdepfile1"; then
-      tmpdepfile="$tmpdepfile1"
-   else
-      tmpdepfile="$tmpdepfile2"
-   fi
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
    if test -f "$tmpdepfile"; then
       sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a space and a tab in the [].
-      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
    else
       echo "#dummy" > "$depfile"
    fi
@@ -250,34 +340,42 @@
 
 dashmstdout)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  test -z "$dashmflag" && dashmflag=-M
-  ( IFS=" "
-    case " $* " in
-    *" --mode=compile "*) # this is libtool, let us make it quiet
-      for arg
-      do # cycle over the arguments
-        case "$arg" in
-	"--mode=compile")
-	  # insert --quiet before "--mode=compile"
-	  set fnord "$@" --quiet
-	  shift # fnord
-	  ;;
-	esac
-	set fnord "$@" "$arg"
-	shift # fnord
-	shift # "$arg"
-      done
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
       ;;
     esac
-    "$@" $dashmflag | sed 's:^[^:]*\:[ 	]*:'"$object"'\: :' > "$tmpdepfile"
-  ) &
-  proc=$!
-  "$@"
-  stat=$?
-  wait "$proc"
-  if test "$stat" != 0; then exit $stat; fi
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
   tr ' ' '
@@ -295,33 +393,37 @@
   ;;
 
 makedepend)
-  # X makedepend
-  (
-    shift
-    cleared=no
-    for arg in "$@"; do
-      case $cleared in no)
-        set ""; shift
-	cleared=yes
-      esac
-      case "$arg" in
-        -D*|-I*)
-	  set fnord "$@" "$arg"; shift;;
-	-*)
-	  ;;
-	*)
-	  set fnord "$@" "$arg"; shift;;
-      esac
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
     done
-    obj_suffix="`echo $object | sed 's/^.*\././'`"
-    touch "$tmpdepfile"
-    ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
-  ) &
-  proc=$!
-  "$@"
-  stat=$?
-  wait "$proc"
-  if test "$stat" != 0; then exit $stat; fi
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
   sed '1,2d' "$tmpdepfile" | tr ' ' '
@@ -334,35 +436,40 @@
 
 cpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  ( IFS=" "
-    case " $* " in
-    *" --mode=compile "*)
-      for arg
-      do # cycle over the arguments
-        case $arg in
-	"--mode=compile")
-	  # insert --quiet before "--mode=compile"
-	  set fnord "$@" --quiet
-	  shift # fnord
-	  ;;
-	esac
-	set fnord "$@" "$arg"
-	shift # fnord
-	shift # "$arg"
-      done
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
       ;;
     esac
-    "$@" -E |
-    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
     sed '$ s: \\$::' > "$tmpdepfile"
-  ) &
-  proc=$!
-  "$@"
-  stat=$?
-  wait "$proc"
-  if test "$stat" != 0; then exit $stat; fi
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
   cat < "$tmpdepfile" >> "$depfile"
@@ -372,49 +479,27 @@
 
 msvisualcpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
+  # always write the preprocessed file to stdout, regardless of -o,
   # because we must use -o when running libtool.
-  ( IFS=" "
-    case " $* " in
-    *" --mode=compile "*)
-      for arg
-      do # cycle over the arguments
-        case $arg in
-	"--mode=compile")
-	  # insert --quiet before "--mode=compile"
-	  set fnord "$@" --quiet
-	  shift # fnord
-	  ;;
-	esac
-	set fnord "$@" "$arg"
-	shift # fnord
-	shift # "$arg"
-      done
-      ;;
-    esac
-    for arg
-    do
-      case "$arg" in
-      "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
 	set fnord "$@"
 	shift
 	shift
 	;;
-      *)
+    *)
 	set fnord "$@" "$arg"
 	shift
 	shift
 	;;
-      esac
-    done
-    "$@" -E |
-    sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
-  ) &
-  proc=$!
-  "$@"
-  stat=$?
-  wait "$proc"
-  if test "$stat" != 0; then exit $stat; fi
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
   . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
@@ -434,3 +519,12 @@
 esac
 
 exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
Index: frysk-imports/elfutils/config/elfutils.spec.in
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/config/elfutils.spec.in,v
retrieving revision 1.7
diff -u -u -r1.7 elfutils.spec.in
--- frysk-imports/elfutils/config/elfutils.spec.in	26 Apr 2007 15:18:41 -0000	1.7
+++ frysk-imports/elfutils/config/elfutils.spec.in	26 Apr 2007 19:47:26 -0000
@@ -1,5 +1,5 @@
 # -*- rpm-spec-*-
-Summary: A collection of utilities and DSOs to handle compiled objects.
+Summary: A collection of utilities and DSOs to handle compiled objects
 Name: elfutils
 Version: @PACKAGE_VERSION@
 Release: 1
@@ -179,8 +179,10 @@
 %{_libdir}/libelf.a
 
 %changelog
-* Fri Mar 30 2007 Nurdin Premji <npremji@redhat.com> 0.127-UNFINISHED-1
-- libdwfl: new function dwfl_module_addrsym
+* Wed Apr 18 2007 Ulrich Drepper <drepper@redhat.com> 0.127-1
+- libdw: new function dwarf_getsrcdirs
+- libdwfl: new functions dwfl_module_addrsym, dwfl_report_begin_add,
+	 dwfl_module_address_section
 
 * Mon Feb  5 2007 Ulrich Drepper <drepper@redhat.com> 0.126-1
 - new program: ar
Index: frysk-imports/elfutils/config/install-sh
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/config/install-sh,v
retrieving revision 1.3
diff -u -u -r1.3 install-sh
--- frysk-imports/elfutils/config/install-sh	26 Apr 2007 15:18:41 -0000	1.3
+++ frysk-imports/elfutils/config/install-sh	26 Apr 2007 19:47:26 -0000
@@ -1,19 +1,38 @@
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2005-05-14.22
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
@@ -23,13 +42,11 @@
 # from scratch.  It can only install one file at a time, a restriction
 # shared with many OS's install programs.
 
-
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
 doit="${DOITPROG-}"
 
-
 # put in absolute paths if you don't have them in your path; or use env. vars.
 
 mvprog="${MVPROG-mv}"
@@ -41,211 +58,266 @@
 rmprog="${RMPROG-rm}"
 mkdirprog="${MKDIRPROG-mkdir}"
 
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
 chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+chowncmd=
+chgrpcmd=
+stripcmd=
 rmcmd="$rmprog -f"
 mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	:
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-		chmodcmd=""
-	else
-		instcmd=$mkdirprog
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		:
-	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		:
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		:
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
 
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-	'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
+    -t) dstarg=$2
+	shift
+	shift
+	continue;;
 
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
+    -T) no_target_directory=true
 	shift
+	continue;;
 
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		:
-	fi
+    --version) echo "$0 $scriptversion"; exit $?;;
 
-	pathcomp="${pathcomp}/"
+    *)  # When -d is used, all remaining arguments are directories to create.
+	# When -t is used, the destination is already specified.
+	test -n "$dir_arg$dstarg" && break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+	for arg
+	do
+          if test -n "$dstarg"; then
+	    # $@ is not empty: it contains at least $arg.
+	    set fnord "$@" "$dstarg"
+	    shift # fnord
+	  fi
+	  shift # arg
+	  dstarg=$arg
+	done
+	break;;
+  esac
 done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		:
-	fi
-
-# Make a temp file name in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
 
-	$doit $instcmd $src $dsttmp &&
-
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
-
-# Now rename the file to the real destination.
-
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
 
-fi &&
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
+
+    if test -d "$dst"; then
+      mkdircmd=:
+      chmodcmd=
+    else
+      mkdircmd=$mkdirprog
+    fi
+  else
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
 
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dstarg: Is a directory" >&2
+	exit 1
+      fi
+      dst=$dst/`basename "$src"`
+    fi
+  fi
+
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+  # Make sure that the destination directory exists.
+
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+	 '
+    IFS="${IFS-$defaultIFS}"
+
+    oIFS=$IFS
+    # Some sh's can't handle IFS=/ for some reason.
+    IFS='%'
+    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    shift
+    IFS=$oIFS
+
+    pathcomp=
+
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      shift
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp"
+	# mkdir can fail with a `File exist' error in case several
+	# install-sh are creating the directory concurrently.  This
+	# is OK.
+	test -d "$pathcomp" || exit
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
+
+  if test -n "$dir_arg"; then
+    $doit $mkdircmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+  else
+    dstfile=`basename "$dst"`
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+    trap '(exit $?); exit' 1 2 13 15
+
+    # Copy the file name to the temp name.
+    $doit $cpprog "$src" "$dsttmp" &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+      || {
+	   # The rename failed, perhaps because mv can't rename something else
+	   # to itself, or perhaps because mv is so ancient that it does not
+	   # support -f.
+
+	   # Now remove or move aside any old file at destination location.
+	   # We try this two ways since rm can't unlink itself on some
+	   # systems and the destination file might be busy for other
+	   # reasons.  In this case, the final cleanup might fail but the new
+	   # file should still install successfully.
+	   {
+	     if test -f "$dstdir/$dstfile"; then
+	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+	       || {
+		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		 (exit 1); exit 1
+	       }
+	     else
+	       :
+	     fi
+	   } &&
+
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+	 }
+    }
+  fi || { (exit 1); exit 1; }
+done
 
-exit 0
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+  (exit 0); exit 0
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
Index: frysk-imports/elfutils/config/missing
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/config/missing,v
retrieving revision 1.3
diff -u -u -r1.3 missing
--- frysk-imports/elfutils/config/missing	26 Apr 2007 15:18:41 -0000	1.3
+++ frysk-imports/elfutils/config/missing	26 Apr 2007 19:47:26 -0000
@@ -1,6 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
-# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -15,8 +19,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.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -38,18 +42,24 @@
   configure_ac=configure.in
 fi
 
+msg="missing on your system"
+
 case "$1" in
 --run)
   # Try to run requested program, and just exit if it succeeds.
   run=
   shift
   "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
   ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
 
   -h|--h|--he|--hel|--help)
     echo "\
@@ -74,11 +84,15 @@
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
   tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
     ;;
 
   -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing 0.4 - GNU automake"
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
     ;;
 
   -*)
@@ -87,14 +101,44 @@
     exit 1
     ;;
 
-  aclocal*)
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
        exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
     fi
+    ;;
+esac
 
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+  aclocal*)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
          to install the \`Automake' and \`Perl' packages.  Grab them from
          any GNU archive site."
@@ -102,13 +146,8 @@
     ;;
 
   autoconf)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
          \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
          archive site."
@@ -116,13 +155,8 @@
     ;;
 
   autoheader)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
          from any GNU archive site."
@@ -140,13 +174,8 @@
     ;;
 
   automake*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
          You might want to install the \`Automake' and \`Perl' packages.
          Grab them from any GNU archive site."
@@ -156,16 +185,11 @@
     ;;
 
   autom4te)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
          proper tools for further handling them.
-         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+         You can get \`$1' as part of \`Autoconf' from any GNU
          archive site."
 
     file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
@@ -185,7 +209,7 @@
 
   bison|yacc)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
          in order for those modifications to take effect.  You can get
          \`Bison' from any GNU archive site."
@@ -215,7 +239,7 @@
 
   lex|flex)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
          in order for those modifications to take effect.  You can get
          \`Flex' from any GNU archive site."
@@ -237,13 +261,8 @@
     ;;
 
   help2man)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
 	 you modified a dependency of a manual page.  You may need the
 	 \`Help2man' package in order for those modifications to take
 	 effect.  You can get \`Help2man' from any GNU archive site."
@@ -262,54 +281,52 @@
     ;;
 
   makeinfo)
-    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
-       # We have makeinfo, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
          indirectly affecting the aspect of the manual.  The spurious
          call might also be the consequence of using a buggy \`make' (AIX,
          DU, IRIX).  You might want to install the \`Texinfo' package or
          the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
     file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
     if test -z "$file"; then
-      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
-    fi
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
     touch $file
     ;;
 
   tar)
     shift
-    if test -n "$run"; then
-      echo 1>&2 "ERROR: \`tar' requires --run"
-      exit 1
-    fi
 
     # We have already tried tar in the generic part.
     # Look for gnutar/gtar before invocation to avoid ugly error
     # messages.
     if (gnutar --version > /dev/null 2>&1); then
-       gnutar ${1+"$@"} && exit 0
+       gnutar "$@" && exit 0
     fi
     if (gtar --version > /dev/null 2>&1); then
-       gtar ${1+"$@"} && exit 0
+       gtar "$@" && exit 0
     fi
     firstarg="$1"
     if shift; then
 	case "$firstarg" in
 	*o*)
 	    firstarg=`echo "$firstarg" | sed s/o//`
-	    tar "$firstarg" ${1+"$@"} && exit 0
+	    tar "$firstarg" "$@" && exit 0
 	    ;;
 	esac
 	case "$firstarg" in
 	*h*)
 	    firstarg=`echo "$firstarg" | sed s/h//`
-	    tar "$firstarg" ${1+"$@"} && exit 0
+	    tar "$firstarg" "$@" && exit 0
 	    ;;
 	esac
     fi
@@ -323,10 +340,10 @@
 
   *)
     echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
          proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequirements for installing
+         it often tells you about the needed prerequisites for installing
          this package.  You may also peek at any GNU archive site, in case
          some other package would contain this missing \`$1' program."
     exit 1
@@ -334,3 +351,10 @@
 esac
 
 exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
Index: frysk-imports/elfutils/config/mkinstalldirs
===================================================================
RCS file: frysk-imports/elfutils/config/mkinstalldirs
diff -N frysk-imports/elfutils/config/mkinstalldirs
--- frysk-imports/elfutils/config/mkinstalldirs	26 Apr 2007 15:18:41 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,101 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-# $Id: mkinstalldirs,v 1.4 2007/04/26 15:18:41 npremji Exp $
-
-errstatus=0
-dirmode=""
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
-
-# 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 ;;
-     -- ) shift; break ;;			# stop option processing
-     -* ) echo "${usage}" 1>&2; exit 1 ;;	# unknown option
-     * )  break ;;				# first non-opt arg
-   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
-	  errstatus=$lasterr
-	else
-	  if test ! -z "$dirmode"; then
-	     echo "chmod $dirmode $pathcomp"
-
-	     lasterr=""
-	     chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-	     if test ! -z "$lasterr"; then
-	       errstatus=$lasterr
-	     fi
-	  fi
-	fi
-     fi
-
-     pathcomp="$pathcomp/"
-   done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 3
-# End:
-# mkinstalldirs ends here
Index: frysk-imports/elfutils/libdw/ChangeLog
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdw/ChangeLog,v
retrieving revision 1.7
diff -u -u -r1.7 ChangeLog
--- frysk-imports/elfutils/libdw/ChangeLog	26 Apr 2007 15:18:42 -0000	1.7
+++ frysk-imports/elfutils/libdw/ChangeLog	26 Apr 2007 19:47:27 -0000
@@ -1,7 +1,43 @@
+2007-04-16  Roland McGrath  <roland@redhat.com>
+
+	* libdw.map (ELFUTILS_0.127): Add dwfl_module_address_section.
+
+2007-04-05  Roland McGrath  <roland@redhat.com>
+
+	* dwarf_getsrcdirs.c: New file.
+	* Makefile.am (libdw_a_SOURCES): Add it.
+	* libdw.h: Declare dwarf_getsrcdirs.
+	* libdw.map (ELFUTILS_0.127): Add it.
+
+	* libdwP.h (struct Dwarf_Files_s): New member ndirs.
+	* dwarf_getsrclines.c (dwarf_getsrclines): Don't clobber NDIRLIST to
+	zero before we use it to check for DWARF_E_INVALID_DIR_IDX.
+	Save DIRARRAY in the Dwarf_Files.
+
+	* dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
+	address to check for all-ones base address entry.  Check directly.
+	Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
+
+2007-03-25  Roland McGrath  <roland@redhat.com>
+
+	* dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
+	Return NULL when freeing RESULT on error.
+	(global_read, scngrp_read): Check return value from check_section,
+	break out of loop after it has freed RESULT.
+	(valid_p): Handle null argument.
+
+2007-03-12  Roland McGrath  <roland@redhat.com>
+
+	* libdw.map (ELFUTILS_0.127): Add dwfl_report_begin_add.
+
 2007-03-04  Roland McGrath  <roland@redhat.com>
 
-       * libdw.map (ELFUTILS_0.127): New version set, inherits from
-       ELFUTILS_0.126.  Add dwfl_module_addrsym.
+	* libdw.map (ELFUTILS_0.127): New version set, inherits from
+	ELFUTILS_0.126.  Add dwfl_module_addrsym.
+
+2007-02-10  Roland McGrath  <roland@redhat.com>
+
+	* dwarf.h (DW_OP_fbreg): Comment fix.
 
 2007-02-03  Roland McGrath  <roland@redhat.com>
 
Index: frysk-imports/elfutils/libdw/Makefile.am
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdw/Makefile.am,v
retrieving revision 1.3
diff -u -u -r1.3 Makefile.am
--- frysk-imports/elfutils/libdw/Makefile.am	26 Apr 2007 15:18:42 -0000	1.3
+++ frysk-imports/elfutils/libdw/Makefile.am	26 Apr 2007 19:47:27 -0000
@@ -1,6 +1,6 @@
 ## Process this file with automake to create Makefile.in
 ##
-## Copyright (C) 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
+## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
 ## This file is part of Red Hat elfutils.
 ##
 ## Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -73,7 +73,7 @@
 		  dwarf_lineendsequence.c dwarf_lineblock.c \
 		  dwarf_lineprologueend.c dwarf_lineepiloguebegin.c \
 		  dwarf_onesrcline.c dwarf_formblock.c \
-		  dwarf_getsrcfiles.c dwarf_filesrc.c \
+		  dwarf_getsrcfiles.c dwarf_filesrc.c dwarf_getsrcdirs.c \
 		  dwarf_getlocation.c dwarf_getstring.c dwarf_offabbrev.c \
 		  dwarf_getaranges.c dwarf_onearange.c dwarf_getarangeinfo.c \
 		  dwarf_getarange_addr.c dwarf_getattrs.c dwarf_formflag.c \
Index: frysk-imports/elfutils/libdw/dwarf.h
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdw/dwarf.h,v
retrieving revision 1.3
diff -u -u -r1.3 dwarf.h
--- frysk-imports/elfutils/libdw/dwarf.h	26 Apr 2007 15:18:42 -0000	1.3
+++ frysk-imports/elfutils/libdw/dwarf.h	26 Apr 2007 19:47:27 -0000
@@ -1,5 +1,5 @@
 /* This file defines standard DWARF types, structures, and macros.
-   Copyright (C) 2000, 2002, 2005, 2006 Red Hat, Inc.
+   Copyright (C) 2000, 2002, 2005, 2006, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
 
    Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -418,7 +418,7 @@
     DW_OP_breg30 = 0x8e,	/* Base register 30.  */
     DW_OP_breg31 = 0x8f,	/* Base register 31.  */
     DW_OP_regx = 0x90,		/* Unsigned LEB128 register.  */
-    DW_OP_fbreg = 0x91,		/* Signed LEB128 register.  */
+    DW_OP_fbreg = 0x91,		/* Signed LEB128 offset.  */
     DW_OP_bregx = 0x92,		/* ULEB128 register followed by SLEB128 off. */
     DW_OP_piece = 0x93,		/* ULEB128 size of piece addressed. */
     DW_OP_deref_size = 0x94,	/* 1-byte size of data retrieved.  */
Index: frysk-imports/elfutils/libdw/dwarf_begin_elf.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdw/dwarf_begin_elf.c,v
retrieving revision 1.3
diff -u -u -r1.3 dwarf_begin_elf.c
--- frysk-imports/elfutils/libdw/dwarf_begin_elf.c	26 Apr 2007 15:18:42 -0000	1.3
+++ frysk-imports/elfutils/libdw/dwarf_begin_elf.c	26 Apr 2007 19:47:28 -0000
@@ -1,5 +1,5 @@
 /* Create descriptor from ELF descriptor for processing file.
-   Copyright (C) 2002, 2003, 2004, 2005 Red Hat, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -84,7 +84,7 @@
 #define ndwarf_scnnames (sizeof (dwarf_scnnames) / sizeof (dwarf_scnnames[0]))
 
 
-static void
+static Dwarf *
 check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp)
 {
   GElf_Shdr shdr_mem;
@@ -105,7 +105,7 @@
      a section which isn't part of the section group.  */
   if (! inscngrp && (shdr->sh_flags & SHF_GROUP) != 0)
     /* Ignore the section.  */
-    return;
+    return result;
 
 
   /* We recognize the DWARF section by their names.  This is not very
@@ -118,7 +118,7 @@
 	 invalid.  */
       __libdw_seterrno (DWARF_E_INVALID_ELF);
       free (result);
-      return;
+      return NULL;
     }
 
 
@@ -140,6 +140,8 @@
 
 	break;
       }
+
+  return result;
 }
 
 
@@ -153,9 +155,11 @@
      XXX Which sections are absolutely necessary?  Add tests if
      necessary.  For now we require only .debug_info.  Hopefully this
      is correct.  */
-  if (unlikely (result->sectiondata[IDX_debug_info] == NULL))
+  if (likely (result != NULL)
+      && unlikely (result->sectiondata[IDX_debug_info] == NULL))
     {
       __libdw_seterrno (DWARF_E_NO_DWARF);
+      free (result);
       result = NULL;
     }
 
@@ -168,8 +172,8 @@
 {
   Elf_Scn *scn = NULL;
 
-  while ((scn = elf_nextscn (elf, scn)) != NULL)
-    check_section (result, ehdr, scn, false);
+  while (result != NULL && (scn = elf_nextscn (elf, scn)) != NULL)
+    result = check_section (result, ehdr, scn, false);
 
   return valid_p (result);
 }
@@ -204,7 +208,9 @@
 	  return NULL;
 	}
 
-      check_section (result, ehdr, scn, true);
+      result = check_section (result, ehdr, scn, true);
+      if (result == NULL)
+	break;
     }
 
   return valid_p (result);
Index: frysk-imports/elfutils/libdw/dwarf_getsrcdirs.c
===================================================================
RCS file: frysk-imports/elfutils/libdw/dwarf_getsrcdirs.c
diff -N frysk-imports/elfutils/libdw/dwarf_getsrcdirs.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ frysk-imports/elfutils/libdw/dwarf_getsrcdirs.c	26 Apr 2007 19:47:29 -0000
@@ -0,0 +1,69 @@
+/* Find include directories in source file information.
+   Copyright (C) 2007 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   In addition, as a special exception, Red Hat, Inc. gives You the
+   additional right to link the code of Red Hat elfutils with code licensed
+   under any Open Source Initiative certified open source license
+   (http://www.opensource.org/licenses/index.php) which requires the
+   distribution of source code with any binary distribution and to
+   distribute linked combinations of the two.  Non-GPL Code permitted under
+   this exception must only link to the code of Red Hat elfutils through
+   those well defined interfaces identified in the file named EXCEPTION
+   found in the source code files (the "Approved Interfaces").  The files
+   of Non-GPL Code may instantiate templates or use macros or inline
+   functions from the Approved Interfaces without causing the resulting
+   work to be covered by the GNU General Public License.  Only Red Hat,
+   Inc. may make changes or additions to the list of Approved Interfaces.
+   Red Hat's grant of this exception is conditioned upon your not adding
+   any new exceptions.  If you wish to add a new Approved Interface or
+   exception, please contact Red Hat.  You must obey the GNU General Public
+   License in all respects for all of the Red Hat elfutils code and other
+   code used in conjunction with Red Hat elfutils except the Non-GPL Code
+   covered by this exception.  If you modify this file, you may extend this
+   exception to your version of the file, but you are not obligated to do
+   so.  If you do not wish to provide this exception without modification,
+   you must delete this exception statement from your version and license
+   this file solely under the GPL without exception.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "libdwP.h"
+
+
+int
+dwarf_getsrcdirs (files, result, ndirs)
+     Dwarf_Files *files;
+     const char *const **result;
+     size_t *ndirs;
+{
+  if (files == NULL)
+    return -1;
+
+  *result = (void *) &files->info[files->nfiles];
+  *ndirs = files->ndirs;
+  return 0;
+}
Index: frysk-imports/elfutils/libdw/dwarf_getsrclines.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdw/dwarf_getsrclines.c,v
retrieving revision 1.3
diff -u -u -r1.3 dwarf_getsrclines.c
--- frysk-imports/elfutils/libdw/dwarf_getsrclines.c	26 Apr 2007 15:18:42 -0000	1.3
+++ frysk-imports/elfutils/libdw/dwarf_getsrclines.c	26 Apr 2007 19:47:29 -0000
@@ -1,5 +1,5 @@
 /* Return line number information of CU.
-   Copyright (C) 2004, 2005 Red Hat, Inc.
+   Copyright (C) 2004, 2005, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2004.
 
@@ -256,13 +256,10 @@
       /* Rearrange the list in array form.  */
       struct dirlist **dirarray
 	= (struct dirlist **) alloca (ndirlist * sizeof (*dirarray));
-      while (ndirlist-- > 0)
-	{
-	  dirarray[ndirlist] = dirlist;
-	  dirlist = dirlist->next;
-	}
+      for (unsigned int n = ndirlist; n-- > 0; dirlist = dirlist->next)
+	dirarray[n] = dirlist;
 
-        /* Now read the files.  */
+      /* Now read the files.  */
       struct filelist null_file =
 	{
 	  .info =
@@ -618,8 +615,11 @@
       /* Put all the files in an array.  */
       Dwarf_Files *files = libdw_alloc (dbg, Dwarf_Files,
 					sizeof (Dwarf_Files)
-					+ nfilelist * sizeof (Dwarf_Fileinfo),
-				       1);
+					+ nfilelist * sizeof (Dwarf_Fileinfo)
+					+ (ndirlist + 1) * sizeof (char *),
+					1);
+      const char **dirs = (void *) &files->info[nfilelist];
+
       files->nfiles = nfilelist;
       while (nfilelist-- > 0)
 	{
@@ -628,6 +628,12 @@
 	}
       assert (filelist == NULL);
 
+      /* Put all the directory strings in an array.  */
+      files->ndirs = ndirlist;
+      for (unsigned int i = 0; i < ndirlist; ++i)
+	dirs[i] = dirarray[i]->dir;
+      dirs[ndirlist] = NULL;
+
       /* Remember the debugging descriptor.  */
       files->dbg = dbg;
 
Index: frysk-imports/elfutils/libdw/dwarf_ranges.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdw/dwarf_ranges.c,v
retrieving revision 1.3
diff -u -u -r1.3 dwarf_ranges.c
--- frysk-imports/elfutils/libdw/dwarf_ranges.c	26 Apr 2007 15:18:42 -0000	1.3
+++ frysk-imports/elfutils/libdw/dwarf_ranges.c	26 Apr 2007 19:47:30 -0000
@@ -1,5 +1,5 @@
 /* Enumerate the PC ranges covered by a DIE.
-   Copyright (C) 2005 Red Hat, Inc.
+   Copyright (C) 2005, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
 
    Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -141,18 +141,21 @@
     {
       begin = read_8ubyte_unaligned_inc (die->cu->dbg, readp);
       end = read_8ubyte_unaligned_inc (die->cu->dbg, readp);
+      if (begin == (uint64_t) -1l) /* Base address entry.  */
+	{
+	  *basep = end;
+	  goto next;
+	}
     }
   else
     {
-      begin = (Dwarf_Sword) read_4sbyte_unaligned_inc (die->cu->dbg,
-						       readp);
+      begin = read_4ubyte_unaligned_inc (die->cu->dbg, readp);
       end = read_4ubyte_unaligned_inc (die->cu->dbg, readp);
-    }
-
-  if (begin == (Dwarf_Addr) -1l) /* Base address entry.  */
-    {
-      *basep = end;
-      goto next;
+      if (begin == (uint32_t) -1) /* Base address entry.  */
+	{
+	  *basep = end;
+	  goto next;
+	}
     }
 
   if (begin == 0 && end == 0) /* End of list entry.  */
Index: frysk-imports/elfutils/libdw/libdw.h
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdw/libdw.h,v
retrieving revision 1.6
diff -u -u -r1.6 libdw.h
--- frysk-imports/elfutils/libdw/libdw.h	26 Apr 2007 15:18:42 -0000	1.6
+++ frysk-imports/elfutils/libdw/libdw.h	26 Apr 2007 19:47:30 -0000
@@ -1,5 +1,5 @@
 /* Interfaces for libdw.
-   Copyright (C) 2002, 2004, 2005, 2006 Red Hat, Inc.
+   Copyright (C) 2002, 2004, 2005, 2006, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
 
    Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -473,6 +473,14 @@
 extern const char *dwarf_filesrc (Dwarf_Files *file, size_t idx,
 				  Dwarf_Word *mtime, Dwarf_Word *length);
 
+/* Return the directory list used in the file information extracted.
+   (*RESULT)[0] is the CU's DW_AT_comp_dir value, and may be null.
+   (*RESULT)[0..*NDIRS-1] are the compile-time include directory path
+   encoded by the compiler.  */
+extern int dwarf_getsrcdirs (Dwarf_Files *files,
+			     const char *const **result, size_t *ndirs)
+  __nonnull_attribute__ (2, 3);
+
 
 /* Return location expression, decoded as a list of operations.  */
 extern int dwarf_getlocation (Dwarf_Attribute *attr, Dwarf_Op **expr,
Index: frysk-imports/elfutils/libdw/libdw.map
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdw/libdw.map,v
retrieving revision 1.6
diff -u -u -r1.6 libdw.map
--- frysk-imports/elfutils/libdw/libdw.map	26 Apr 2007 15:18:42 -0000	1.6
+++ frysk-imports/elfutils/libdw/libdw.map	26 Apr 2007 19:47:30 -0000
@@ -156,7 +156,11 @@
 
 ELFUTILS_0.127 {
   global:
+    dwarf_getsrcdirs;
+
     dwfl_module_addrsym;
+    dwfl_report_begin_add;
+    dwfl_module_address_section;
 
   local:
     *;
Index: frysk-imports/elfutils/libdw/libdwP.h
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdw/libdwP.h,v
retrieving revision 1.3
diff -u -u -r1.3 libdwP.h
--- frysk-imports/elfutils/libdw/libdwP.h	26 Apr 2007 15:18:42 -0000	1.3
+++ frysk-imports/elfutils/libdw/libdwP.h	26 Apr 2007 19:47:30 -0000
@@ -1,5 +1,5 @@
 /* Internal definitions for libdwarf.
-   Copyright (C) 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -209,6 +209,7 @@
 struct Dwarf_Files_s
   {
     Dwarf *dbg;
+    unsigned int ndirs;
     unsigned int nfiles;
     struct Dwarf_Fileinfo_s
     {
@@ -216,6 +217,7 @@
       Dwarf_Word mtime;
       Dwarf_Word length;
     } info[0];
+    /* nfiles of those, followed by char *[ndirs].  */
   };
 typedef struct Dwarf_Fileinfo_s Dwarf_Fileinfo;
 
Index: frysk-imports/elfutils/libdwfl/ChangeLog
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdwfl/ChangeLog,v
retrieving revision 1.8
diff -u -u -r1.8 ChangeLog
--- frysk-imports/elfutils/libdwfl/ChangeLog	26 Apr 2007 15:18:43 -0000	1.8
+++ frysk-imports/elfutils/libdwfl/ChangeLog	26 Apr 2007 19:47:30 -0000
@@ -1,11 +1,67 @@
+2007-04-16  Roland McGrath  <roland@redhat.com>
+
+	* derelocate.c (cache_sections): Apply bias to sh_addr.
+	(compare_secrefs): Fix address comparison to avoid signed overflow.
+	(find_section): New function, broken out of ...
+	(dwfl_module_relocate_address): ... here, call it.
+	(check_module): New function, broken out of ...
+	(dwfl_module_relocate_address): ... here, call it.
+	(dwfl_module_address_section): New function.
+	* libdwfl.h: Declare it.
+
+2007-03-26  Roland McGrath  <roland@redhat.com>
+
+	* dwfl_module.c (__libdwfl_module_free): Free MOD itself.
+
+2007-03-18  Roland McGrath  <roland@redhat.com>
+
+	* dwfl_module_getdwarf.c (find_debuglink): New function, broken out of
+	(find_debuginfo): ... here.  Call it.
+	Don't return error for libelf errors finding .gnu_debuglink section.
+
+2007-03-12  Roland McGrath  <roland@redhat.com>
+
+	* dwfl_module.c (dwfl_report_begin_add): New function broken out of ...
+	(dwfl_report_begin): ... here.  Call it.
+	* libdwfl.h: Declare it.
+	* libdwflP.h: Add INTDECL.
+
+	* elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
+
+	* offline.c: Comment typo fix.
+
 2007-03-04  Roland McGrath  <roland@redhat.com>
 
-       * dwfl_module_addrname.c (dwfl_module_addrname): Just call
-       dwfl_module_addrsym.  Guts moved to ...
-       * dwfl_module_addrsym.c: ... here; new file.
-       * Makefile.am (libdwfl_a_SOURCES): Add it.
-       * libdwfl.h: Declare dwfl_module_addrsym.
-       * libdwflP.h: Add INTDECL.
+	* linux-kernel-modules.c (KERNEL_MODNAME): New macro for "kernel".
+	(find_kernel_elf): New function, broken out of ...
+	(report_kernel): ... here.  Call it.
+	(dwfl_linux_kernel_find_elf): Use it for module named KERNEL_MODNAME.
+	(intuit_kernel_bounds): New function, grovel /proc/kallsyms to guess
+	virtual address bounds of kernel from symbols rounded to page size.
+	(dwfl_linux_kernel_report_kernel): Use that if it works, before
+	resorting to report_kernel.
+
+	* dwfl_module_getdwarf.c (open_elf): Set MOD->e_type to ET_DYN for an
+	ET_EXEC file with nonzero bias.
+
+	* dwfl_module_addrname.c (dwfl_module_addrname): Just call
+	dwfl_module_addrsym.  Guts moved to ...
+	* dwfl_module_addrsym.c: ... here; new file.
+	* Makefile.am (libdwfl_a_SOURCES): Add it.
+	* libdwfl.h: Declare dwfl_module_addrsym.
+	* libdwflP.h: Add INTDECL.
+
+2007-03-03  Roland McGrath  <roland@redhat.com>
+
+	* dwfl_module.c (free_file): New function, broken out of ...
+	(__libdwfl_module_free): ... here.  In it, close fd after elf_end.
+
+	* dwfl_module_getdwarf.c (open_elf): Close fd and reset to -1
+	on libelf failure.
+
+2007-03-02  Roland McGrath  <roland@redhat.com>
+
+	* linux-kernel-modules.c: Fix bogus error test for asprintf call.
 
 2007-02-02  Roland McGrath  <roland@redhat.com>
 
Index: frysk-imports/elfutils/libdwfl/Makefile.am
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdwfl/Makefile.am,v
retrieving revision 1.5
diff -u -u -r1.5 Makefile.am
--- frysk-imports/elfutils/libdwfl/Makefile.am	26 Apr 2007 15:18:43 -0000	1.5
+++ frysk-imports/elfutils/libdwfl/Makefile.am	26 Apr 2007 19:47:30 -0000
@@ -67,7 +67,7 @@
 		    libdwfl_crc32.c libdwfl_crc32_file.c \
 		    elf-from-memory.c \
 		    dwfl_module_getsym.c \
-		    dwfl_module_addrname.c dwfl_module_addrsym.c\
+		    dwfl_module_addrname.c dwfl_module_addrsym.c \
 		    dwfl_module_return_value_location.c \
 		    dwfl_module_register_names.c
 
Index: frysk-imports/elfutils/libdwfl/derelocate.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdwfl/derelocate.c,v
retrieving revision 1.4
diff -u -u -r1.4 derelocate.c
--- frysk-imports/elfutils/libdwfl/derelocate.c	26 Apr 2007 15:18:43 -0000	1.4
+++ frysk-imports/elfutils/libdwfl/derelocate.c	26 Apr 2007 19:47:30 -0000
@@ -75,7 +75,14 @@
   struct secref *const *p1 = a;
   struct secref *const *p2 = b;
 
-  return (*p1)->start - (*p2)->start;
+  /* No signed difference calculation is correct here, since the
+     terms are unsigned and could be more than INT64_MAX apart.  */
+  if ((*p1)->start < (*p2)->start)
+    return -1;
+  if ((*p1)->start > (*p2)->start)
+    return 1;
+
+  return 0;
 }
 
 static int
@@ -120,8 +127,8 @@
 	  struct secref *newref = alloca (sizeof *newref);
 	  newref->scn = scn;
 	  newref->name = name;
-	  newref->start = shdr->sh_addr;
-	  newref->end = shdr->sh_addr + shdr->sh_size;
+	  newref->start = shdr->sh_addr + mod->symfile->bias;
+	  newref->end = newref->start + shdr->sh_size;
 	  newref->next = refs;
 	  refs = newref;
 	  ++nrefs;
@@ -224,25 +231,41 @@
   return sections->refs[idx].name;
 }
 
-int
-dwfl_module_relocate_address (Dwfl_Module *mod, Dwarf_Addr *addr)
+/* Check that MOD is valid and make sure its relocation has been done.  */
+static bool
+check_module (Dwfl_Module *mod)
 {
-  if (mod == NULL)
-    return -1;
+  if (INTUSE(dwfl_module_getsymtab) (mod) < 0)
+    {
+      Dwfl_Error error = dwfl_errno ();
+      if (error != DWFL_E_NO_SYMTAB)
+	{
+	  __libdwfl_seterrno (error);
+	  return true;
+	}
+    }
 
   if (mod->dw == NULL)
     {
       Dwarf_Addr bias;
       if (INTUSE(dwfl_module_getdwarf) (mod, &bias) == NULL)
-	return -1;
+	{
+	  Dwfl_Error error = dwfl_errno ();
+	  if (error != DWFL_E_NO_DWARF)
+	    {
+	      __libdwfl_seterrno (error);
+	      return true;
+	    }
+	}
     }
 
-  if (mod->e_type != ET_REL)
-    {
-      *addr -= mod->debug.bias;
-      return 0;
-    }
+  return false;
+}
 
+/* Find the index in MOD->reloc_info.refs containing *ADDR.  */
+static int
+find_section (Dwfl_Module *mod, Dwarf_Addr *addr)
+{
   if (unlikely (mod->reloc_info == NULL) && cache_sections (mod) < 0)
     return -1;
 
@@ -275,4 +298,34 @@
   __libdw_seterrno (DWARF_E_NO_MATCH);
   return -1;
 }
+
+int
+dwfl_module_relocate_address (Dwfl_Module *mod, Dwarf_Addr *addr)
+{
+  if (check_module (mod))
+    return -1;
+
+  if (mod->e_type != ET_REL)
+    {
+      *addr -= mod->debug.bias;
+      return 0;
+    }
+
+  return find_section (mod, addr);
+}
 INTDEF (dwfl_module_relocate_address)
+
+Elf_Scn *
+dwfl_module_address_section (Dwfl_Module *mod, Dwarf_Addr *address,
+			     Dwarf_Addr *bias)
+{
+  if (check_module (mod))
+    return NULL;
+
+  int idx = find_section (mod, address);
+  if (idx < 0)
+    return NULL;
+
+  *bias = mod->symfile->bias;
+  return mod->reloc_info->refs[idx].scn;
+}
Index: frysk-imports/elfutils/libdwfl/dwfl_module.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdwfl/dwfl_module.c,v
retrieving revision 1.7
diff -u -u -r1.7 dwfl_module.c
--- frysk-imports/elfutils/libdwfl/dwfl_module.c	26 Apr 2007 15:18:43 -0000	1.7
+++ frysk-imports/elfutils/libdwfl/dwfl_module.c	26 Apr 2007 19:47:31 -0000
@@ -1,6 +1,6 @@
 /* Maintenance of module list in libdwfl.
-Copyright (C) 2005, 2006 Red Hat, Inc.
-This file is part of Red Hat elfutils.
+   Copyright (C) 2005, 2006, 2007 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
 
 Red Hat elfutils is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by the
@@ -64,6 +64,17 @@
 {
 }
 
+static void
+free_file (struct dwfl_file *file)
+{
+  if (file->elf != NULL)
+    {
+      elf_end (file->elf);
+      if (file->fd != -1)
+	close (file->fd);
+    }
+}
+
 void
 internal_function
 __libdwfl_module_free (Dwfl_Module *mod)
@@ -87,29 +98,31 @@
 if (mod->ebl != NULL)
 ebl_closebackend (mod->ebl);
 
-if (mod->debug.elf != mod->main.elf && mod->debug.elf != NULL)
-elf_end (mod->debug.elf);
-if (mod->main.elf != NULL)
-elf_end (mod->main.elf);
-
-  if (mod->debug.fd != mod->main.fd && mod->debug.fd != -1)
-    close (mod->debug.fd);
-  if (mod->main.fd != -1)
-    close (mod->main.fd);
+  if (mod->debug.elf != mod->main.elf)
+    free_file (&mod->debug);
+  free_file (&mod->main);
 
-free (mod->name);
+  free (mod->name);
+  free (mod);
 }
 
 void
+dwfl_report_begin_add (Dwfl *dwfl)
+{
+  if (dwfl->modules != NULL)
+    free (dwfl->modules);
+  dwfl->modules = NULL;
+  dwfl->nmodules = 0;
+}
+INTDEF (dwfl_report_begin_add)
+
+void
 dwfl_report_begin (Dwfl *dwfl)
 {
-for (Dwfl_Module *m = dwfl->modulelist; m != NULL; m = m->next)
-m->gc = true;
+  INTUSE(dwfl_report_begin_add) (dwfl);
 
-if (dwfl->modules != NULL)
-free (dwfl->modules);
-dwfl->modules = NULL;
-dwfl->nmodules = 0;
+  for (Dwfl_Module *m = dwfl->modulelist; m != NULL; m = m->next)
+    m->gc = true;
 
 dwfl->offline_next_address = OFFLINE_REDZONE;
 }
Index: frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c,v
retrieving revision 1.4
diff -u -u -r1.4 dwfl_module_getdwarf.c
--- frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c	26 Apr 2007 15:18:43 -0000	1.4
+++ frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c	26 Apr 2007 19:47:31 -0000
@@ -1,5 +1,5 @@
 /* Find debugging and symbol information for a module in libdwfl.
-   Copyright (C) 2005, 2006 Red Hat, Inc.
+   Copyright (C) 2005, 2006, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
 
    Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -69,9 +69,12 @@
 
   GElf_Ehdr ehdr_mem, *ehdr = gelf_getehdr (file->elf, &ehdr_mem);
   if (ehdr == NULL)
-    return DWFL_E (LIBELF, elf_errno ());
-
-  mod->e_type = ehdr->e_type;
+    {
+    elf_error:
+      close (file->fd);
+      file->fd = -1;
+      return DWFL_E_LIBELF;
+    }
 
   file->bias = 0;
   for (uint_fast16_t i = 0; i < ehdr->e_phnum; ++i)
@@ -79,7 +82,7 @@
       GElf_Phdr ph_mem;
       GElf_Phdr *ph = gelf_getphdr (file->elf, i, &ph_mem);
       if (ph == NULL)
-	return DWFL_E_LIBELF;
+	goto elf_error;
       if (ph->p_type == PT_LOAD)
 	{
 	  file->bias = ((mod->low_addr & -ph->p_align)
@@ -88,6 +91,12 @@
 	}
     }
 
+  mod->e_type = ehdr->e_type;
+
+  /* Relocatable Linux kernels are ET_EXEC but act like ET_DYN.  */
+  if (mod->e_type == ET_EXEC && file->bias != 0)
+    mod->e_type = ET_DYN;
+
   return DWFL_E_NOERROR;
 }
 
@@ -106,74 +115,77 @@
   mod->elferr = open_elf (mod, &mod->main);
 }
 
-/* Find the separate debuginfo file for this module and open libelf on it.
-   When we return success, MOD->debug is set up.  */
-static Dwfl_Error
-find_debuginfo (Dwfl_Module *mod)
+/* Search an ELF file for a ".gnu_debuglink" section.  */
+static const char *
+find_debuglink (Elf *elf, GElf_Word *crc)
 {
-  if (mod->debug.elf != NULL)
-    return DWFL_E_NOERROR;
-
   size_t shstrndx;
-  if (elf_getshstrndx (mod->main.elf, &shstrndx) < 0)
-    return DWFL_E_LIBELF;
+  if (elf_getshstrndx (elf, &shstrndx) < 0)
+    return NULL;
 
-  Elf_Scn *scn = elf_getscn (mod->main.elf, 0);
-  if (scn == NULL)
-    return DWFL_E_LIBELF;
-  do
+  Elf_Scn *scn = NULL;
+  while ((scn = elf_nextscn (elf, scn)) != NULL)
     {
-      GElf_Shdr shdr_mem, *shdr = gelf_getshdr (scn, &shdr_mem);
+      GElf_Shdr shdr_mem;
+      GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
       if (shdr == NULL)
-	return DWFL_E_LIBELF;
+	return NULL;
 
-      const char *name = elf_strptr (mod->main.elf, shstrndx, shdr->sh_name);
+      const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
       if (name == NULL)
-	return DWFL_E_LIBELF;
+	return NULL;
 
       if (!strcmp (name, ".gnu_debuglink"))
 	break;
+    }
 
-      scn = elf_nextscn (mod->main.elf, scn);
-    } while (scn != NULL);
+  if (scn == NULL)
+    return NULL;
 
-  const char *debuglink_file = NULL;
-  GElf_Word debuglink_crc = 0;
-  if (scn != NULL)
+  /* Found the .gnu_debuglink section.  Extract its contents.  */
+  Elf_Data *rawdata = elf_rawdata (scn, NULL);
+  if (rawdata == NULL)
+    return NULL;
+
+  Elf_Data crcdata =
     {
-      /* Found the .gnu_debuglink section.  Extract its contents.  */
-      Elf_Data *rawdata = elf_rawdata (scn, NULL);
-      if (rawdata == NULL)
-	return DWFL_E_LIBELF;
+      .d_type = ELF_T_WORD,
+      .d_buf = crc,
+      .d_size = sizeof *crc,
+      .d_version = EV_CURRENT,
+    };
+  Elf_Data conv =
+    {
+      .d_type = ELF_T_WORD,
+      .d_buf = rawdata->d_buf + rawdata->d_size - sizeof *crc,
+      .d_size = sizeof *crc,
+      .d_version = EV_CURRENT,
+    };
 
-      Elf_Data crcdata =
-	{
-	  .d_type = ELF_T_WORD,
-	  .d_buf = &debuglink_crc,
-	  .d_size = sizeof debuglink_crc,
-	  .d_version = EV_CURRENT,
-	};
-      Elf_Data conv =
-	{
-	  .d_type = ELF_T_WORD,
-	  .d_buf = rawdata->d_buf + rawdata->d_size - sizeof debuglink_crc,
-	  .d_size = sizeof debuglink_crc,
-	  .d_version = EV_CURRENT,
-	};
-
-      GElf_Ehdr ehdr_mem;
-      GElf_Ehdr *ehdr = gelf_getehdr (mod->main.elf, &ehdr_mem);
-      if (ehdr == NULL)
-	return DWFL_E_LIBELF;
-
-      Elf_Data *d = gelf_xlatetom (mod->main.elf, &crcdata, &conv,
-				   ehdr->e_ident[EI_DATA]);
-      if (d == NULL)
-	return DWFL_E_LIBELF;
-      assert (d == &crcdata);
+  GElf_Ehdr ehdr_mem;
+  GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
+  if (ehdr == NULL)
+    return NULL;
 
-      debuglink_file = rawdata->d_buf;
-    }
+  Elf_Data *d = gelf_xlatetom (elf, &crcdata, &conv, ehdr->e_ident[EI_DATA]);
+  if (d == NULL)
+    return NULL;
+  assert (d == &crcdata);
+
+  return rawdata->d_buf;
+}
+
+
+/* Find the separate debuginfo file for this module and open libelf on it.
+   When we return success, MOD->debug is set up.  */
+static Dwfl_Error
+find_debuginfo (Dwfl_Module *mod)
+{
+  if (mod->debug.elf != NULL)
+    return DWFL_E_NOERROR;
+
+  GElf_Word debuglink_crc = 0;
+  const char *debuglink_file = find_debuglink (mod->main.elf, &debuglink_crc);
 
   mod->debug.fd = (*mod->dwfl->callbacks->find_debuginfo) (MODCB_ARGS (mod),
 							   mod->main.name,
Index: frysk-imports/elfutils/libdwfl/elf-from-memory.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdwfl/elf-from-memory.c,v
retrieving revision 1.4
diff -u -u -r1.4 elf-from-memory.c
--- frysk-imports/elfutils/libdwfl/elf-from-memory.c	26 Apr 2007 15:18:43 -0000	1.4
+++ frysk-imports/elfutils/libdwfl/elf-from-memory.c	26 Apr 2007 19:47:31 -0000
@@ -1,5 +1,5 @@
 /* Reconstruct an ELF file by reading the segments out of remote memory.
-   Copyright (C) 2005, 2006 Red Hat, Inc.
+   Copyright (C) 2005, 2006, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
 
    Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -154,7 +154,7 @@
 
     case ELFCLASS64:
       xlatefrom.d_size = sizeof (Elf64_Ehdr);
-      if (elf32_xlatetom (&xlateto, &xlatefrom, buffer[EI_DATA]) == NULL)
+      if (elf64_xlatetom (&xlateto, &xlatefrom, buffer[EI_DATA]) == NULL)
 	goto libelf_error;
       phoff = ehdr.e64.e_phoff;
       phnum = ehdr.e64.e_phnum;
Index: frysk-imports/elfutils/libdwfl/libdwfl.h
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdwfl/libdwfl.h,v
retrieving revision 1.8
diff -u -u -r1.8 libdwfl.h
--- frysk-imports/elfutils/libdwfl/libdwfl.h	26 Apr 2007 15:18:43 -0000	1.8
+++ frysk-imports/elfutils/libdwfl/libdwfl.h	26 Apr 2007 19:47:31 -0000
@@ -156,6 +156,14 @@
 					    void *arg),
 			    void *arg);
 
+/* Start reporting additional modules to the library.  No calls but
+   dwfl_report_* can be made on DWFL until dwfl_report_end is called.
+   This is like dwfl_report_begin, but all the old modules are kept on.
+   More dwfl_report_* calls can follow to add more modules.
+   When dwfl_report_end is called, no old modules will be removed.  */
+extern void dwfl_report_begin_add (Dwfl *dwfl);
+
+
 /* Return the name of the module, and for each non-null argument store
    interesting details: *USERDATA is a location for storing your own
    pointer, **USERDATA is initially null; *START and *END give the address
@@ -338,6 +346,15 @@
 					GElf_Sym *sym, GElf_Word *shndxp)
   __nonnull_attribute__ (3);
 
+/* Find the ELF section that *ADDRESS lies inside and return it.
+   On success, adjusts *ADDRESS to be relative to the section,
+   and sets *BIAS to the difference between addresses used in
+   the returned section's headers and run-time addresses.  */
+extern Elf_Scn *dwfl_module_address_section (Dwfl_Module *mod,
+					     Dwarf_Addr *address,
+					     Dwarf_Addr *bias)
+  __nonnull_attribute__ (2, 3);
+
 
 /*** Dwarf access functions ***/
 
Index: frysk-imports/elfutils/libdwfl/libdwflP.h
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdwfl/libdwflP.h,v
retrieving revision 1.6
diff -u -u -r1.6 libdwflP.h
--- frysk-imports/elfutils/libdwfl/libdwflP.h	26 Apr 2007 15:18:43 -0000	1.6
+++ frysk-imports/elfutils/libdwfl/libdwflP.h	26 Apr 2007 19:47:32 -0000
@@ -277,6 +277,7 @@
 INTDECL (dwfl_module_getsrc)
 INTDECL (dwfl_report_elf)
 INTDECL (dwfl_report_begin)
+INTDECL (dwfl_report_begin_add)
 INTDECL (dwfl_report_module)
 INTDECL (dwfl_report_offline)
 INTDECL (dwfl_report_end)
Index: frysk-imports/elfutils/libdwfl/linux-kernel-modules.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdwfl/linux-kernel-modules.c,v
retrieving revision 1.4
diff -u -u -r1.4 linux-kernel-modules.c
--- frysk-imports/elfutils/libdwfl/linux-kernel-modules.c	26 Apr 2007 15:18:43 -0000	1.4
+++ frysk-imports/elfutils/libdwfl/linux-kernel-modules.c	26 Apr 2007 19:47:32 -0000
@@ -63,8 +63,11 @@
 #include <fts.h>
 
 
+#define KERNEL_MODNAME	"kernel"
+
 #define MODULEDIRFMT	"/lib/modules/%s"
 
+#define KSYMSFILE	"/proc/kallsyms"
 #define MODULELIST	"/proc/modules"
 #define	SECADDRDIRFMT	"/sys/module/%s/sections/"
 #define MODULE_SECT_NAME_LEN 32	/* Minimum any linux/module.h has had.  */
@@ -116,29 +119,45 @@
 }
 
 static int
+find_kernel_elf (Dwfl *dwfl, const char *release, char **fname)
+{
+  if ((release[0] == '/'
+       ? asprintf (fname, "%s/vmlinux", release)
+       : asprintf (fname, "/boot/vmlinux-%s", release)) < 0)
+    return -1;
+
+  int fd = try_kernel_name (dwfl, fname);
+  if (fd < 0 && release[0] != '/')
+    {
+      free (*fname);
+      if (asprintf (fname, MODULEDIRFMT "/vmlinux", release) < 0)
+	return -1;
+      fd = try_kernel_name (dwfl, fname);
+    }
+
+  return fd;
+}
+
+static int
 report_kernel (Dwfl *dwfl, const char *release,
 	       int (*predicate) (const char *module, const char *file))
 {
   if (dwfl == NULL)
     return -1;
 
-  char *fname;
-  if ((release[0] == '/'
-       ? asprintf (&fname, "%s/vmlinux", release)
-       : asprintf (&fname, "/boot/vmlinux-%s", release)) < 0)
-    return -1;
-  int fd = try_kernel_name (dwfl, &fname);
-  if (fd < 0 && release[0] != '/')
+  if (release == NULL)
     {
-      free (fname);
-      if (asprintf (&fname, MODULEDIRFMT "/vmlinux", release) < 0)
-	return -1;
-      fd = try_kernel_name (dwfl, &fname);
+      release = kernel_release ();
+      if (release == NULL)
+	return errno;
     }
 
+  char *fname;
+  int fd = find_kernel_elf (dwfl, release, &fname);
+
   int result = 0;
   if (fd < 0)
-    result = ((predicate != NULL && !(*predicate) ("kernel", NULL))
+    result = ((predicate != NULL && !(*predicate) (KERNEL_MODNAME, NULL))
 	      ? 0 : errno ?: ENOENT);
   else
     {
@@ -147,14 +166,15 @@
       if (predicate != NULL)
 	{
 	  /* Let the predicate decide whether to use this one.  */
-	  int want = (*predicate) ("kernel", fname);
+	  int want = (*predicate) (KERNEL_MODNAME, fname);
 	  if (want < 0)
 	    result = errno;
 	  report = want > 0;
 	}
 
       if (report
-	  && INTUSE(dwfl_report_elf) (dwfl, "kernel", fname, fd, 0) == NULL)
+	  && INTUSE(dwfl_report_elf) (dwfl, KERNEL_MODNAME,
+				      fname, fd, 0) == NULL)
 	{
 	  close (fd);
 	  result = -1;
@@ -177,13 +197,6 @@
 				  int (*predicate) (const char *module,
 						    const char *file))
 {
-  if (release == NULL)
-    {
-      release = kernel_release ();
-      if (release == NULL)
-	return errno;
-    }
-
   /* First report the kernel.  */
   int result = report_kernel (dwfl, release, predicate);
   if (result == 0)
@@ -279,15 +292,87 @@
 INTDEF (dwfl_linux_kernel_report_offline)
 
 
-/* Find the ELF file for the running kernel and dwfl_report_elf it.  */
+/* Grovel around to guess the bounds of the runtime kernel image.  */
+static int
+intuit_kernel_bounds (Dwarf_Addr *start, Dwarf_Addr *end)
+{
+  FILE *f = fopen (KSYMSFILE, "r");
+  if (f == NULL)
+    return errno;
+
+  (void) __fsetlocking (f, FSETLOCKING_BYCALLER);
+
+  char *line = NULL;
+  size_t linesz = 0;
+  size_t n = getline (&line, &linesz, f);
+  Dwarf_Addr first;
+  char *p = NULL;
+  int result = 0;
+  if (n > 0 && (first = strtoull (line, &p, 16)) > 0 && p > line)
+    {
+      Dwarf_Addr last = 0;
+      while ((n = getline (&line, &linesz, f)) > 1 && line[n - 2] != ']')
+	{
+	  p = NULL;
+	  last = strtoull (line, &p, 16);
+	  if (p == NULL || p == line || last == 0)
+	    {
+	      result = -1;
+	      break;
+	    }
+	}
+      if ((n == 0 && feof_unlocked (f)) || (n > 1 && line[n - 2] == ']'))
+	{
+	  Dwarf_Addr round_kernel = sysconf (_SC_PAGE_SIZE);
+	  first &= -(Dwarf_Addr) round_kernel;
+	  last += round_kernel - 1;
+	  last &= -(Dwarf_Addr) round_kernel;
+	  *start = first;
+	  *end = last;
+	  result = 0;
+	}
+    }
+  free (line);
+
+  if (result == -1)
+    result = ferror_unlocked (f) ? errno : ENOEXEC;
+
+  fclose (f);
+
+  return result;
+}
+
 int
 dwfl_linux_kernel_report_kernel (Dwfl *dwfl)
 {
-  const char *release = kernel_release ();
-  if (release == NULL)
-    return errno;
+  Dwarf_Addr start;
+  Dwarf_Addr end;
+  inline int report (void)
+    {
+      return INTUSE(dwfl_report_module) (dwfl, KERNEL_MODNAME,
+					 start, end) == NULL ? -1 : 0;
+    }
+
+  /* This is a bit of a kludge.  If we already reported the kernel,
+     don't bother figuring it out again--it never changes.  */
+  for (Dwfl_Module *m = dwfl->modulelist; m != NULL; m = m->next)
+    if (!strcmp (m->name, KERNEL_MODNAME))
+      {
+	start = m->low_addr;
+	end = m->high_addr;
+	return report ();
+      }
+
+  /* Try to figure out the bounds of the kernel image without
+     looking for any vmlinux file.  */
+  int result = intuit_kernel_bounds (&start, &end);
+  if (result == 0)
+    return report ();
+  if (result != ENOENT)
+    return result;
 
-  return report_kernel (dwfl, release, NULL);
+  /* Find the ELF file for the running kernel and dwfl_report_elf it.  */
+  return report_kernel (dwfl, NULL, NULL);
 }
 INTDEF (dwfl_linux_kernel_report_kernel)
 
@@ -306,6 +391,9 @@
   if (release == NULL)
     return errno;
 
+  if (!strcmp (module_name, KERNEL_MODNAME))
+    return find_kernel_elf (mod->dwfl, release, file_name);
+
   /* Do "find /lib/modules/`uname -r`/kernel -name MODULE_NAME.ko".  */
 
   char *modulesdir[] = { NULL, NULL };
@@ -416,7 +504,7 @@
  Dwarf_Addr *addr)
 {
   char *sysfile;
-  if (asprintf (&sysfile, SECADDRDIRFMT "%s", modname, secname))
+  if (asprintf (&sysfile, SECADDRDIRFMT "%s", modname, secname) < 0)
     return ENOMEM;
 
   FILE *f = fopen (sysfile, "r");
Index: frysk-imports/elfutils/libdwfl/offline.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libdwfl/offline.c,v
retrieving revision 1.4
diff -u -u -r1.4 offline.c
--- frysk-imports/elfutils/libdwfl/offline.c	26 Apr 2007 15:18:43 -0000	1.4
+++ frysk-imports/elfutils/libdwfl/offline.c	26 Apr 2007 19:47:32 -0000
@@ -52,7 +52,7 @@
 
 /* Since dwfl_report_elf lays out the sections already, this will only be
    called when the section headers of the debuginfo file are being
-   consulted instead, or for a section located at zeron.  With binutils
+   consulted instead, or for a section located at zero.  With binutils
    strip-to-debug, the symbol table is in the debuginfo file and relocation
    looks there.  */
 int
Index: frysk-imports/elfutils/libebl/ChangeLog
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libebl/ChangeLog,v
retrieving revision 1.6
diff -u -u -r1.6 ChangeLog
--- frysk-imports/elfutils/libebl/ChangeLog	26 Apr 2007 15:18:43 -0000	1.6
+++ frysk-imports/elfutils/libebl/ChangeLog	26 Apr 2007 19:47:32 -0000
@@ -1,3 +1,8 @@
+2007-03-10  Roland McGrath  <roland@redhat.com>
+
+	* eblcorenote.c (ebl_core_note): For normally-zero types,
+	print in hex if not zero.
+
 2007-01-11  Roland McGrath  <roland@redhat.com>
 
 	* ebl-hooks.h (machine_section_flag_check): New hook.
Index: frysk-imports/elfutils/libebl/eblcorenote.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libebl/eblcorenote.c,v
retrieving revision 1.3
diff -u -u -r1.3 eblcorenote.c
--- frysk-imports/elfutils/libebl/eblcorenote.c	26 Apr 2007 15:18:43 -0000	1.3
+++ frysk-imports/elfutils/libebl/eblcorenote.c	26 Apr 2007 19:47:32 -0000
@@ -1,5 +1,5 @@
 /* Print contents of core note.
-   Copyright (C) 2002, 2004, 2005 Red Hat, Inc.
+   Copyright (C) 2002, 2004, 2005, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -173,14 +173,7 @@
 
 	    switch (atype)
 	      {
-	      case AT_NULL:
-	      case AT_IGNORE:
-	      case AT_IGNOREPPC:
-	      case AT_NOTELF:
-	      default:
-		printf ("    %s\n", at);
-		break;
-
+		/* Decimal.  */
 	      case AT_EXECFD:
 	      case AT_PHENT:
 	      case AT_PHNUM:
@@ -202,6 +195,20 @@
 		printf ("    %s: %jd\n", at, val);
 		break;
 
+		/* Normally zero.  */
+	      case AT_NULL:
+	      case AT_IGNORE:
+	      case AT_IGNOREPPC:
+	      case AT_NOTELF:
+	      default:
+		if (val == 0)
+		  {
+		    printf ("    %s\n", at);
+		    break;
+		  }
+		/* Fall through.  */
+
+		/* Hex.  */
 	      case AT_PHDR:
 	      case AT_BASE:
 	      case AT_FLAGS:	/* XXX Print flags?  */
Index: frysk-imports/elfutils/libelf/ChangeLog
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libelf/ChangeLog,v
retrieving revision 1.6
diff -u -u -r1.6 ChangeLog
--- frysk-imports/elfutils/libelf/ChangeLog	26 Apr 2007 15:18:43 -0000	1.6
+++ frysk-imports/elfutils/libelf/ChangeLog	26 Apr 2007 19:47:33 -0000
@@ -1,3 +1,18 @@
+2007-03-18  Roland McGrath  <roland@redhat.com>
+
+	* elf_begin.c (get_shnum): Fix test for e_shoff being out of bounds.
+	Return zero when the section headers do not fit within MAXSIZE.
+
+2007-03-09  Roland McGrath  <roland@redhat.com>
+
+	* libelfP.h (LIBELF_EV_IDX): New macro.
+	(__libelf_type_align): New macro.
+	[! ALLOW_UNALIGNED]: Declare __libc_type_aligns array.
+	* elf_getdata.c (shtype_map): Convert to just Elf_Type[][].
+	(convert_data, __libelf_set_rawdata): Use that, __libelf_type_align,
+	and __libelf_type_sizes, in place of old table.
+	(__libc_type_aligns): New const variable.
+
 2007-02-04  Ulrich Drepper  <drepper@redhat.com>
 
 	* Makefile (libelf.so): Build with -z relro.
Index: frysk-imports/elfutils/libelf/elf_begin.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libelf/elf_begin.c,v
retrieving revision 1.5
diff -u -u -r1.5 elf_begin.c
--- frysk-imports/elfutils/libelf/elf_begin.c	26 Apr 2007 15:18:43 -0000	1.5
+++ frysk-imports/elfutils/libelf/elf_begin.c	26 Apr 2007 19:47:36 -0000
@@ -158,7 +158,7 @@
 	  if (unlikely (ehdr.e32->e_shoff >= maxsize)
 	      || unlikely (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize))
 	    /* Cannot read the first section header.  */
-	    return (size_t) -1l;
+	    return 0;
 
 	  if (likely (map_address != NULL) && e_ident[EI_DATA] == MY_ELFDATA
 	      && (ALLOW_UNALIGNED
@@ -191,6 +191,11 @@
 	      result = size;
 	    }
 	}
+
+      /* If the section headers were truncated, pretend none were there.  */
+      if (ehdr.e32->e_shoff > maxsize
+	  || maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr) * result)
+	result = 0;
     }
   else
     {
@@ -202,7 +207,7 @@
 	  if (unlikely (ehdr.e64->e_shoff >= maxsize)
 	      || unlikely (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize))
 	    /* Cannot read the first section header.  */
-	    return (size_t) -1l;
+	    return 0;
 
 	  Elf64_Xword size;
 	  if (likely (map_address != NULL) && e_ident[EI_DATA] == MY_ELFDATA
@@ -238,6 +243,11 @@
 
 	  result = size;
 	}
+
+      /* If the section headers were truncated, pretend none were there.  */
+      if (ehdr.e64->e_shoff > maxsize
+	  || maxsize - ehdr.e64->e_shoff < sizeof (Elf64_Shdr) * result)
+	result = 0;
     }
 
   return result;
Index: frysk-imports/elfutils/libelf/elf_getdata.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libelf/elf_getdata.c,v
retrieving revision 1.4
diff -u -u -r1.4 elf_getdata.c
--- frysk-imports/elfutils/libelf/elf_getdata.c	26 Apr 2007 15:18:43 -0000	1.4
+++ frysk-imports/elfutils/libelf/elf_getdata.c	26 Apr 2007 19:47:36 -0000
@@ -1,5 +1,5 @@
 /* Return the next data element from the section after possibly converting it.
-   Copyright (C) 1998-2005, 2006 Red Hat, Inc.
+   Copyright (C) 1998-2005, 2006, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1998.
 
@@ -63,13 +63,6 @@
 #include "elf-knowledge.h"
 
 
-#if _STRING_ARCH_unaligned
-# define ALLOW_ALIGNED	1
-#else
-# define ALLOW_ALIGNED	0
-#endif
-
-
 #define TYPEIDX(Sh_Type) \
   (Sh_Type >= SHT_NULL && Sh_Type < SHT_NUM				      \
    ? Sh_Type								      \
@@ -77,95 +70,73 @@
       ? SHT_NUM + Sh_Type - SHT_GNU_HASH				      \
       : 0))
 
-static const struct
-{
-  Elf_Type type;
-  size_t size;
-#if ALLOW_ALIGNED
-# define AL(val)
-#else
-  size_t align;
-# define AL(val), val
-#endif
-} shtype_map[EV_NUM - 1][ELFCLASSNUM - 1][TYPEIDX (SHT_HISUNW) + 1] =
-{
-  [EV_CURRENT - 1] =
+/* Associate section types with libelf types.  */
+static const Elf_Type shtype_map[EV_NUM - 1][TYPEIDX (SHT_HISUNW) + 1] =
+  {
+    [EV_CURRENT - 1] =
+    {
+      [SHT_SYMTAB] = ELF_T_SYM,
+      [SHT_RELA] = ELF_T_RELA,
+      [SHT_HASH] = ELF_T_WORD,
+      [SHT_DYNAMIC] = ELF_T_DYN,
+      [SHT_REL] = ELF_T_REL,
+      [SHT_DYNSYM] = ELF_T_SYM,
+      [SHT_INIT_ARRAY] = ELF_T_ADDR,
+      [SHT_FINI_ARRAY] = ELF_T_ADDR,
+      [SHT_PREINIT_ARRAY] = ELF_T_ADDR,
+      [SHT_GROUP] = ELF_T_WORD,
+      [SHT_SYMTAB_SHNDX] = ELF_T_WORD,
+      [TYPEIDX (SHT_GNU_verdef)] = ELF_T_VDEF,
+      [TYPEIDX (SHT_GNU_verneed)] = ELF_T_VNEED,
+      [TYPEIDX (SHT_GNU_versym)] = ELF_T_HALF,
+      [TYPEIDX (SHT_SUNW_syminfo)] = ELF_T_SYMINFO,
+      [TYPEIDX (SHT_SUNW_move)] = ELF_T_MOVE,
+      [TYPEIDX (SHT_GNU_LIBLIST)] = ELF_T_LIB,
+      [TYPEIDX (SHT_GNU_HASH)] = ELF_T_GNUHASH,
+    }
+  };
+
+#if !ALLOW_UNALIGNED
+/* Associate libelf types with their internal alignment requirements.  */
+const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] =
   {
-    [ELFCLASS32 - 1] =
+# define TYPE_ALIGNS(Bits)						      \
+    {									      \
+      [ELF_T_ADDR] = __alignof__ (ElfW2(Bits,Addr)),			      \
+      [ELF_T_HALF] = __alignof__ (ElfW2(Bits,Half)),			      \
+      [ELF_T_WORD] = __alignof__ (ElfW2(Bits,Word)),			      \
+      [ELF_T_SYM] = __alignof__ (ElfW2(Bits,Sym)),			      \
+      [ELF_T_SYMINFO] = __alignof__ (ElfW2(Bits,Syminfo)),		      \
+      [ELF_T_REL] = __alignof__ (ElfW2(Bits,Rel)),			      \
+      [ELF_T_RELA] = __alignof__ (ElfW2(Bits,Rela)),			      \
+      [ELF_T_DYN] = __alignof__ (ElfW2(Bits,Dyn)),			      \
+      [ELF_T_VDEF] = __alignof__ (ElfW2(Bits,Verdef)),			      \
+      [ELF_T_VDAUX] = __alignof__ (ElfW2(Bits,Verdaux)),		      \
+      [ELF_T_VNEED] = __alignof__ (ElfW2(Bits,Verneed)),		      \
+      [ELF_T_VNAUX] = __alignof__ (ElfW2(Bits,Vernaux)),		      \
+      [ELF_T_MOVE] = __alignof__ (ElfW2(Bits,Move)),			      \
+      [ELF_T_LIB] = __alignof__ (ElfW2(Bits,Lib)),			      \
+    }
+    [EV_CURRENT - 1] =
     {
-      /* Associate section types with libelf types, their sizes and
-	 alignment.  SHT_GNU_verdef is special since the section does
-	 not contain entries of only one size.  */
-#define DEFINE(Bits) \
-      [SHT_SYMTAB] = { ELF_T_SYM, sizeof (ElfW2(Bits,Sym))		      \
-		       AL (__alignof__ (ElfW2(Bits,Sym))) },		      \
-      [SHT_RELA] = { ELF_T_RELA, sizeof (ElfW2(Bits,Rela))		      \
-		       AL (__alignof__ (ElfW2(Bits,Rela))) },		      \
-      [SHT_HASH] = { ELF_T_WORD, sizeof (ElfW2(Bits,Word))		      \
-		       AL (__alignof__ (ElfW2(Bits,Word))) },		      \
-      [SHT_DYNAMIC] = { ELF_T_DYN, sizeof (ElfW2(Bits,Dyn))		      \
-		       AL (__alignof__ (ElfW2(Bits,Dyn))) },		      \
-      [SHT_REL] = { ELF_T_REL, sizeof (ElfW2(Bits,Rel))			      \
-		       AL (__alignof__ (ElfW2(Bits,Rel))) },		      \
-      [SHT_DYNSYM] = { ELF_T_SYM, sizeof (ElfW2(Bits,Sym))		      \
-		       AL (__alignof__ (ElfW2(Bits,Sym))) },		      \
-      [SHT_INIT_ARRAY] = { ELF_T_ADDR, sizeof (ElfW2(Bits,Addr))	      \
-			   AL (__alignof__ (ElfW2(Bits,Addr))) },	      \
-      [SHT_FINI_ARRAY] = { ELF_T_ADDR, sizeof (ElfW2(Bits,Addr))	      \
-			   AL (__alignof__ (ElfW2(Bits,Addr))) },	      \
-      [SHT_PREINIT_ARRAY] = { ELF_T_ADDR, sizeof (ElfW2(Bits,Addr))	      \
-			      AL (__alignof__ (ElfW2(Bits,Addr))) },	      \
-      [SHT_GROUP] = { ELF_T_WORD, sizeof (Elf32_Word)			      \
-		      AL (__alignof__ (Elf32_Word)) },			      \
-      [SHT_SYMTAB_SHNDX] = { ELF_T_WORD, sizeof (Elf32_Word)		      \
-			     AL (__alignof__ (Elf32_Word)) },		      \
-      [TYPEIDX (SHT_GNU_verdef)] = { ELF_T_VDEF, 1 AL (1) },		      \
-      [TYPEIDX (SHT_GNU_verneed)] = { ELF_T_VNEED,			      \
-				      sizeof (ElfW2(Bits,Verneed))	      \
-				      AL (__alignof__ (ElfW2(Bits,Verneed)))},\
-      [TYPEIDX (SHT_GNU_versym)] = { ELF_T_HALF, sizeof (ElfW2(Bits,Versym))  \
-				     AL (__alignof__ (ElfW2(Bits,Versym))) }, \
-      [TYPEIDX (SHT_SUNW_syminfo)] = { ELF_T_SYMINFO,			      \
-				       sizeof (ElfW2(Bits,Syminfo))	      \
-				       AL(__alignof__ (ElfW2(Bits,Syminfo)))},\
-      [TYPEIDX (SHT_SUNW_move)] = { ELF_T_MOVE, sizeof (ElfW2(Bits,Move))     \
-				    AL (__alignof__ (ElfW2(Bits,Move))) },    \
-      [TYPEIDX (SHT_GNU_LIBLIST)] = { ELF_T_LIB, sizeof (ElfW2(Bits,Lib))     \
-				      AL (__alignof__ (ElfW2(Bits,Lib))) }
-      DEFINE (32),
-      [TYPEIDX (SHT_GNU_HASH)] = { ELF_T_WORD, sizeof (Elf32_Word)
-				   AL (__alignof__ (Elf32_Word)) }
-    },
-    [ELFCLASS64 - 1] =
-    {
-      DEFINE (64),
-      [TYPEIDX (SHT_GNU_HASH)] = { ELF_T_GNUHASH, 1
-				   AL (__alignof__ (Elf64_Xword)) }
+      [ELFCLASS32 - 1] = TYPE_ALIGNS (32),
+      [ELFCLASS64 - 1] = TYPE_ALIGNS (64),
     }
-  }
-};
+# undef TYPE_ALIGNS
+  };
+#endif
 
 
 /* Convert the data in the current section.  */
 static void
 convert_data (Elf_Scn *scn, int version __attribute__ ((unused)), int eclass,
-	      int data, size_t size, size_t type)
+	      int data, size_t size, Elf_Type type)
 {
-#if ALLOW_ALIGNED
-  /* No need to compute the alignment requirement of the host.  */
-  const size_t align = 1;
-#else
-# if EV_NUM != 2
-  size_t align = shtype_map[version - 1][eclass - 1][type].align;
-# else
-  size_t align = shtype_map[0][eclass - 1][type].align;
-# endif
-#endif
+  const size_t align = __libelf_type_align (eclass, type);
 
   if (data == MY_ELFDATA)
     {
-      if (ALLOW_ALIGNED
-	  || (((size_t) ((char *) scn->rawdata_base)) & (align - 1)) == 0)
+      if (((((size_t) (char *) scn->rawdata_base)) & (align - 1)) == 0)
 	/* No need to copy, we can use the raw data.  */
 	scn->data_base = scn->rawdata_base;
       else
@@ -266,11 +237,12 @@
 	}
       else
 	{
-#if EV_NUM != 2
-	  entsize = shtype_map[__libelf_version - 1][elf->class - 1][TYPEIDX (type)].size;
-#else
-	  entsize = shtype_map[0][elf->class - 1][TYPEIDX (type)].size;
-#endif
+	  Elf_Type t = shtype_map[LIBELF_EV_IDX][TYPEIDX (type)];
+	  if (t == ELF_T_VDEF
+	      || (t == ELF_T_GNUHASH && elf->class == ELFCLASS64))
+	    entsize = 1;
+	  else
+	    entsize = __libelf_type_sizes[LIBELF_EV_IDX][elf->class - 1][t];
 	}
 
       /* We assume it is an array of bytes if it is none of the structured
@@ -343,15 +315,7 @@
 	   ? ELF_T_WORD : ELF_T_XWORD);
     }
   else
-    {
-#if EV_NUM != 2
-      scn->rawdata.d.d_type =
-	shtype_map[__libelf_version - 1][elf->class - 1][TYPEIDX (type)].type;
-#else
-      scn->rawdata.d.d_type =
-	shtype_map[0][elf->class - 1][TYPEIDX (type)].type;
-#endif
-    }
+    scn->rawdata.d.d_type = shtype_map[LIBELF_EV_IDX][TYPEIDX (type)];
   scn->rawdata.d.d_off = 0;
   scn->rawdata.d.d_align = align;
   if (elf->class == ELFCLASS32
Index: frysk-imports/elfutils/libelf/libelfP.h
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libelf/libelfP.h,v
retrieving revision 1.4
diff -u -u -r1.4 libelfP.h
--- frysk-imports/elfutils/libelf/libelfP.h	26 Apr 2007 15:18:43 -0000	1.4
+++ frysk-imports/elfutils/libelf/libelfP.h	26 Apr 2007 19:47:38 -0000
@@ -1,5 +1,5 @@
 /* Internal interfaces for libelf.
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Red Hat, Inc.
+   Copyright (C) 1998,1999,2000,2001,2002,2003,2005,2006,2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
 
@@ -423,6 +423,22 @@
 /* Nonzero if the version was set.  */
 extern int __libelf_version_initialized attribute_hidden;
 
+/* Index for __libelf_type_sizes et al.  */
+#if EV_NUM == 2
+# define LIBELF_EV_IDX	0
+#else
+# define LIBELF_EV_IDX	(__libelf_version - 1)
+#endif
+
+#if !ALLOW_UNALIGNED
+/* Array with alignment requirements of the internal types indexed by ELF
+   version, binary class, and type. */
+extern const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] attribute_hidden;
+# define __libelf_type_align(class, type)	\
+    (__libelf_type_aligns[LIBELF_EV_IDX][class][type] ?: 1)
+#else
+# define __libelf_type_align(class, type)	1
+#endif
 
 /* The libelf API does not have such a function but it is still useful.
    Get the memory size for the given type.
Index: frysk-imports/elfutils/libelf-po/ChangeLog
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libelf-po/ChangeLog,v
retrieving revision 1.3
diff -u -u -r1.3 ChangeLog
--- frysk-imports/elfutils/libelf-po/ChangeLog	26 Apr 2007 15:18:44 -0000	1.3
+++ frysk-imports/elfutils/libelf-po/ChangeLog	26 Apr 2007 19:47:38 -0000
@@ -1,3 +1,8 @@
+2007-04-18  Ulrich Drepper  <drepper@redhat.com>
+
+	* Makefile.in.in: Remove MKINSTALLDIRS.
+	Define mkinstalldirs to mkdir -p.
+
 2005-05-07  Ulrich Drepper  <drepper@redhat.com>
 
 	* Makefile.in.in (XGETTEXT_OPTIONS): Define.
Index: frysk-imports/elfutils/libelf-po/Makefile.in.in
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/libelf-po/Makefile.in.in,v
retrieving revision 1.3
diff -u -u -r1.3 Makefile.in.in
--- frysk-imports/elfutils/libelf-po/Makefile.in.in	26 Apr 2007 15:18:44 -0000	1.3
+++ frysk-imports/elfutils/libelf-po/Makefile.in.in	26 Apr 2007 19:47:38 -0000
@@ -27,8 +27,7 @@
 
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
+mkinstalldirs = mkdir -p
 
 GMSGFMT = @GMSGFMT@
 MSGFMT = @MSGFMT@
Index: frysk-imports/elfutils/po/ChangeLog
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/po/ChangeLog,v
retrieving revision 1.3
diff -u -u -r1.3 ChangeLog
--- frysk-imports/elfutils/po/ChangeLog	26 Apr 2007 15:18:44 -0000	1.3
+++ frysk-imports/elfutils/po/ChangeLog	26 Apr 2007 19:47:39 -0000
@@ -1,3 +1,8 @@
+2007-04-18  Ulrich Drepper  <drepper@redhat.com>
+
+	* Makefile.in.in: Remove MKINSTALLDIRS.
+	Define mkinstalldirs to mkdir -p.
+
 2006-04-04  Roland McGrath  <roland@redhat.com>
 
 	* POTFILES.in: Comment out lib/xstrdup.c, not distributed any more.
Index: frysk-imports/elfutils/po/Makefile.in.in
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/po/Makefile.in.in,v
retrieving revision 1.3
diff -u -u -r1.3 Makefile.in.in
--- frysk-imports/elfutils/po/Makefile.in.in	26 Apr 2007 15:18:44 -0000	1.3
+++ frysk-imports/elfutils/po/Makefile.in.in	26 Apr 2007 19:47:39 -0000
@@ -27,8 +27,7 @@
 
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
+mkinstalldirs = mkdir -p
 
 GMSGFMT = @GMSGFMT@
 MSGFMT = @MSGFMT@
Index: frysk-imports/elfutils/src/ChangeLog
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/src/ChangeLog,v
retrieving revision 1.6
diff -u -u -r1.6 ChangeLog
--- frysk-imports/elfutils/src/ChangeLog	26 Apr 2007 15:18:44 -0000	1.6
+++ frysk-imports/elfutils/src/ChangeLog	26 Apr 2007 19:47:39 -0000
@@ -1,3 +1,15 @@
+2007-02-15  Ulrich Drepper  <drepper@redhat.com>
+
+	* readelf.c: Remove unused code.  Add a few consts.
+
+2007-02-15  Roland McGrath  <roland@redhat.com>
+
+	* readelf.c (print_debug): Fix brainos in SHDR test.
+
+2007-02-05  Roland McGrath  <roland@redhat.com>
+
+	* ar.c: Include <limits.h>, since we use LONG_MAX.
+
 2007-02-05  Ulrich Drepper  <drepper@redhat.com>
 
 	* ar.c: Add ugly hack to work around gcc complaining that we
Index: frysk-imports/elfutils/src/ar.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/src/ar.c,v
retrieving revision 1.2
diff -u -u -r1.2 ar.c
--- frysk-imports/elfutils/src/ar.c	26 Apr 2007 15:18:44 -0000	1.2
+++ frysk-imports/elfutils/src/ar.c	26 Apr 2007 19:47:39 -0000
@@ -33,6 +33,7 @@
 #include <fcntl.h>
 #include <gelf.h>
 #include <libintl.h>
+#include <limits.h>
 #include <locale.h>
 #include <mcheck.h>
 #include <search.h>
Index: frysk-imports/elfutils/src/elflint.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/src/elflint.c,v
retrieving revision 1.5
diff -u -u -r1.5 elflint.c
--- frysk-imports/elfutils/src/elflint.c	26 Apr 2007 15:18:44 -0000	1.5
+++ frysk-imports/elfutils/src/elflint.c	26 Apr 2007 19:47:40 -0000
@@ -1884,9 +1884,9 @@
       if (buf + cnt >= end)
 	break;
       else if (buf[cnt] >= maxidx)
-	ERROR (gettext ("\
+      ERROR (gettext ("\
 section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
-	       idx, section_name (ebl, idx), cnt - 2);
+	     idx, section_name (ebl, idx), cnt - 2);
     }
 
   for (; cnt < 2 + nbucket + nchain; ++cnt)
@@ -1894,9 +1894,9 @@
       if (buf + cnt >= end)
 	break;
       else if (buf[cnt] >= maxidx)
-	ERROR (gettext ("\
+      ERROR (gettext ("\
 section [%2d] '%s': hash chain reference %zu out of bounds\n"),
-	       idx, section_name (ebl, idx), cnt - 2 - nbucket);
+	     idx, section_name (ebl, idx), cnt - 2 - nbucket);
     }
 }
 
@@ -1935,9 +1935,9 @@
       if (buf + cnt >= end)
 	break;
       else if (buf[cnt] >= maxidx)
-	ERROR (gettext ("\
+      ERROR (gettext ("\
 section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
-	       idx, section_name (ebl, idx), cnt - 2);
+	     idx, section_name (ebl, idx), cnt - 2);
     }
 
   for (; cnt < 2 + nbucket + nchain; ++cnt)
@@ -1945,7 +1945,7 @@
       if (buf + cnt >= end)
 	break;
       else if (buf[cnt] >= maxidx)
-	ERROR (gettext ("\
+      ERROR (gettext ("\
 section [%2d] '%s': hash chain reference %" PRIu64 " out of bounds\n"),
 	       idx, section_name (ebl, idx), (uint64_t) cnt - 2 - nbucket);
     }
Index: frysk-imports/elfutils/src/ldlex.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/src/ldlex.c,v
retrieving revision 1.4
diff -u -u -r1.4 ldlex.c
--- frysk-imports/elfutils/src/ldlex.c	26 Apr 2007 15:18:44 -0000	1.4
+++ frysk-imports/elfutils/src/ldlex.c	26 Apr 2007 19:47:42 -0000
@@ -20,7 +20,7 @@
 /* A lexical scanner generated by flex*/
 
 /* Scanner skeleton version:
- * $Header: /cvs/frysk/frysk-imports/elfutils/src/ldlex.c,v 1.4 2007/04/26 15:18:44 npremji Exp $
+ * $Header: /cvs/frysk/frysk-imports/elfutils/src/ldlex.c,v 1.1.1.2 2007/04/26 17:20:59 npremji Exp $
  */
 
 #define FLEX_SCANNER
@@ -1026,9 +1026,9 @@
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
 char *yytext;
-#line 1 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 1 "../../../redhat/stock-elfutils/src/ldlex.l"
 #define INITIAL 0
-#line 2 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 2 "../../../redhat/stock-elfutils/src/ldlex.l"
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -1264,7 +1264,7 @@
 	register char *yy_cp = NULL, *yy_bp = NULL;
 	register int yy_act;
 
-#line 96 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 96 "../../../redhat/stock-elfutils/src/ldlex.l"
 
 				if (unlikely (ld_scan_version_script))
 				  {
@@ -1369,7 +1369,7 @@
 yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 103 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 103 "../../../redhat/stock-elfutils/src/ldlex.l"
 { BEGIN (handle_ifdef ()); }
 	YY_BREAK
 case 2:
@@ -1377,7 +1377,7 @@
 yy_c_buf_p = yy_cp = yy_bp + 5;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 104 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 104 "../../../redhat/stock-elfutils/src/ldlex.l"
 { eat_to_eol (true);
 				  push_state (skip_to_endif);
 				  BEGIN (IGNORE); }
@@ -1387,7 +1387,7 @@
 yy_c_buf_p = yy_cp = yy_bp + 8;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 107 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 107 "../../../redhat/stock-elfutils/src/ldlex.l"
 { eat_to_eol (false);
 				  push_state (skip_to_endif);
 				  BEGIN (IGNORE); }
@@ -1397,7 +1397,7 @@
 yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 110 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 110 "../../../redhat/stock-elfutils/src/ldlex.l"
 { eat_to_eol (true) ; }
 	YY_BREAK
 case 5:
@@ -1405,7 +1405,7 @@
 yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 112 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 112 "../../../redhat/stock-elfutils/src/ldlex.l"
 { eat_to_eol (false);
 				  push_state (skip_to_endif); }
 	YY_BREAK
@@ -1414,7 +1414,7 @@
 yy_c_buf_p = yy_cp = yy_bp + 5;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 114 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 114 "../../../redhat/stock-elfutils/src/ldlex.l"
 { eat_to_eol (true);
 				  assert (prepdepth > 0);
 				  if (prepstate[prepdepth - 1] == skip_if)
@@ -1430,7 +1430,7 @@
 yy_c_buf_p = yy_cp = yy_bp + 8;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 123 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 123 "../../../redhat/stock-elfutils/src/ldlex.l"
 { assert (prepdepth > 0);
 				  if (prepstate[prepdepth - 1] == skip_if)
 				    {
@@ -1445,113 +1445,113 @@
 yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 131 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 131 "../../../redhat/stock-elfutils/src/ldlex.l"
 { eat_to_eol (true);
 				  BEGIN (pop_state ()); }
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 133 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 133 "../../../redhat/stock-elfutils/src/ldlex.l"
 { /* nothing */ }
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 136 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 136 "../../../redhat/stock-elfutils/src/ldlex.l"
 { eat_comment (); }
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 138 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 138 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kALIGN; }
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 139 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 139 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kAS_NEEDED; }
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 140 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 140 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kENTRY; }
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 141 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 141 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kEXCLUDE_FILE; }
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 142 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 142 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kGLOBAL; }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 143 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 143 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kGROUP; }
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 144 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 144 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kINPUT; }
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 145 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 145 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kINTERP; }
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 146 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 146 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kKEEP; }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 147 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 147 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kLOCAL; }
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 148 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 148 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kOUTPUT_FORMAT; }
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 149 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 149 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kPAGESIZE; }
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 150 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 150 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kPROVIDE; }
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 151 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 151 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kSEARCH_DIR; }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 152 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 152 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kSEGMENT; }
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 153 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 153 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kSIZEOF_HEADERS; }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 154 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 154 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kSORT; }
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 155 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 155 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return kVERSION; }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 157 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 157 "../../../redhat/stock-elfutils/src/ldlex.l"
 { int cnt = 1 ;
 				  ldlval.num = 0;
 				  while (cnt < yyleng - 1)
@@ -1560,82 +1560,82 @@
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 163 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 163 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return '{'; }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 164 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 164 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return '}'; }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 165 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 165 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return '('; }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 166 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 166 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return ')'; }
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 167 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 167 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return ':'; }
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 168 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 168 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return ';'; }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 169 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 169 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return '='; }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 170 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 170 "../../../redhat/stock-elfutils/src/ldlex.l"
 { ldlval.op = exp_plus; return kADD_OP; }
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 171 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 171 "../../../redhat/stock-elfutils/src/ldlex.l"
 { ldlval.op = exp_minus; return kADD_OP; }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 172 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 172 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return '*'; }
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 173 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 173 "../../../redhat/stock-elfutils/src/ldlex.l"
 { ldlval.op = exp_div; return kMUL_OP; }
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 174 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 174 "../../../redhat/stock-elfutils/src/ldlex.l"
 { ldlval.op = exp_mod; return kMUL_OP; }
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 175 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 175 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return '&'; }
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 176 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 176 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return '|'; }
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 178 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 178 "../../../redhat/stock-elfutils/src/ldlex.l"
 { return ','; }
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 180 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 180 "../../../redhat/stock-elfutils/src/ldlex.l"
 { char *endp;
 				  ldlval.num = strtoumax (yytext, &endp, 0);
 				  if (*endp != '\0')
@@ -1652,31 +1652,31 @@
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 194 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 194 "../../../redhat/stock-elfutils/src/ldlex.l"
 { ldlval.str = obstack_strndup (&ld_state.smem,
 								yytext, yyleng);
 				  return kID; }
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 198 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 198 "../../../redhat/stock-elfutils/src/ldlex.l"
 { ldlval.str = obstack_strndup (&ld_state.smem,
 								yytext, yyleng);
 				  return kFILENAME; }
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 202 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 202 "../../../redhat/stock-elfutils/src/ldlex.l"
 { /* IGNORE */ }
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 204 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 204 "../../../redhat/stock-elfutils/src/ldlex.l"
 { invalid_char (*yytext); }
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 206 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 206 "../../../redhat/stock-elfutils/src/ldlex.l"
 ECHO;
 	YY_BREAK
 #line 1683 "ldlex.c"
@@ -2562,7 +2562,7 @@
 	return 0;
 	}
 #endif
-#line 206 "/home/drepper/devel/elfutils/src/ldlex.l"
+#line 206 "../../../redhat/stock-elfutils/src/ldlex.l"
 
 
 static void
Index: frysk-imports/elfutils/src/ldscript.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/src/ldscript.c,v
retrieving revision 1.4
diff -u -u -r1.4 ldscript.c
--- frysk-imports/elfutils/src/ldscript.c	26 Apr 2007 15:18:44 -0000	1.4
+++ frysk-imports/elfutils/src/ldscript.c	26 Apr 2007 19:47:43 -0000
@@ -126,7 +126,7 @@
 
 
 /* Copy the first part of user declarations.  */
-#line 1 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 1 "../../../redhat/stock-elfutils/src/ldscript.y"
 
 /* Parser for linker scripts.
    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
@@ -216,7 +216,7 @@
 #endif
 
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 71 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 71 "../../../redhat/stock-elfutils/src/ldscript.y"
 typedef union YYSTYPE {
   uintmax_t num;
   enum expression_tag op;
@@ -1370,12 +1370,12 @@
   switch (yyn)
     {
         case 3:
-#line 145 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 145 "../../../redhat/stock-elfutils/src/ldscript.y"
     { add_versions ((yyvsp[0].version)); }
     break;
 
   case 6:
-#line 153 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 153 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      if (likely (ld_state.entry == NULL))
 			ld_state.entry = (yyvsp[-2].str);
@@ -1383,14 +1383,14 @@
     break;
 
   case 7:
-#line 158 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 158 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      ld_new_searchdir ((yyvsp[-2].str));
 		    }
     break;
 
   case 8:
-#line 162 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 162 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      if (likely (ld_state.pagesize == 0))
 			ld_state.pagesize = (yyvsp[-2].num);
@@ -1398,7 +1398,7 @@
     break;
 
   case 9:
-#line 167 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 167 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      if (likely (ld_state.interp == NULL)
 			  && ld_state.file_type != dso_file_type)
@@ -1407,14 +1407,14 @@
     break;
 
   case 10:
-#line 173 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 173 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      new_segment ((yyvsp[-3].num), (yyvsp[-1].output_rule));
 		    }
     break;
 
   case 11:
-#line 177 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 177 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      fputs_unlocked (gettext ("mode for segment invalid\n"),
 				      stderr);
@@ -1423,7 +1423,7 @@
     break;
 
   case 12:
-#line 183 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 183 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      /* First little optimization.  If there is only one
 			 file in the group don't do anything.  */
@@ -1437,27 +1437,27 @@
     break;
 
   case 13:
-#line 194 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 194 "../../../redhat/stock-elfutils/src/ldscript.y"
     { add_inputfiles ((yyvsp[-1].filename_list)); }
     break;
 
   case 14:
-#line 196 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 196 "../../../redhat/stock-elfutils/src/ldscript.y"
     { add_inputfiles (mark_as_needed ((yyvsp[-1].filename_list))); }
     break;
 
   case 15:
-#line 198 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 198 "../../../redhat/stock-elfutils/src/ldscript.y"
     { add_versions ((yyvsp[-1].version)); }
     break;
 
   case 16:
-#line 200 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 200 "../../../redhat/stock-elfutils/src/ldscript.y"
     { /* XXX TODO */ }
     break;
 
   case 17:
-#line 204 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 204 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyvsp[0].output_rule)->next = (yyvsp[-1].output_rule)->next;
 		      (yyval.output_rule) = (yyvsp[-1].output_rule)->next = (yyvsp[0].output_rule);
@@ -1465,12 +1465,12 @@
     break;
 
   case 18:
-#line 209 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 209 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.output_rule) = (yyvsp[0].output_rule); }
     break;
 
   case 19:
-#line 213 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 213 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.output_rule) = new_output_rule (output_assignment);
 		      (yyval.output_rule)->val.assignment = (yyvsp[-1].assignment);
@@ -1478,7 +1478,7 @@
     break;
 
   case 20:
-#line 218 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 218 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.output_rule) = new_output_rule (output_section);
 		      (yyval.output_rule)->val.section.name = (yyvsp[-3].str);
@@ -1493,7 +1493,7 @@
     break;
 
   case 21:
-#line 230 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 230 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      /* This is a short cut for "ID { *(ID) }".  */
 		      (yyval.output_rule) = new_output_rule (output_section);
@@ -1518,17 +1518,17 @@
     break;
 
   case 22:
-#line 254 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 254 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.assignment) = new_assignment ((yyvsp[-2].str), (yyvsp[0].expr), false); }
     break;
 
   case 23:
-#line 256 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 256 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.assignment) = new_assignment ((yyvsp[-3].str), (yyvsp[-1].expr), true); }
     break;
 
   case 24:
-#line 260 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 260 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyvsp[0].input_rule)->next = (yyvsp[-1].input_rule)->next;
 		      (yyval.input_rule) = (yyvsp[-1].input_rule)->next = (yyvsp[0].input_rule);
@@ -1536,12 +1536,12 @@
     break;
 
   case 25:
-#line 265 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 265 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.input_rule) = (yyvsp[0].input_rule); }
     break;
 
   case 26:
-#line 269 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 269 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.input_rule) = new_input_rule (input_section);
 		      (yyval.input_rule)->val.section = (yyvsp[0].filemask_section_name);
@@ -1549,7 +1549,7 @@
     break;
 
   case 27:
-#line 274 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 274 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyvsp[-1].filemask_section_name)->keep_flag = true;
 
@@ -1559,7 +1559,7 @@
     break;
 
   case 28:
-#line 281 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 281 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.input_rule) = new_input_rule (input_assignment);
 		      (yyval.input_rule)->val.assignment = (yyvsp[-1].assignment);
@@ -1567,7 +1567,7 @@
     break;
 
   case 29:
-#line 288 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 288 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.filemask_section_name) = (struct filemask_section_name *)
 			obstack_alloc (&ld_state.smem, sizeof (*(yyval.filemask_section_name)));
@@ -1579,27 +1579,27 @@
     break;
 
   case 30:
-#line 299 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 299 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.sectionname) = new_input_section_name ((yyvsp[0].str), false); }
     break;
 
   case 31:
-#line 301 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 301 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.sectionname) = new_input_section_name ((yyvsp[-1].str), true); }
     break;
 
   case 32:
-#line 305 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 305 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.str) = (yyvsp[-1].str); }
     break;
 
   case 33:
-#line 307 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 307 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.str) = NULL; }
     break;
 
   case 34:
-#line 311 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 311 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.expr) = new_expr (exp_align);
 		      (yyval.expr)->val.child = (yyvsp[-1].expr);
@@ -1607,12 +1607,12 @@
     break;
 
   case 35:
-#line 316 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 316 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.expr) = (yyvsp[-1].expr); }
     break;
 
   case 36:
-#line 318 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 318 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.expr) = new_expr (exp_mult);
 		      (yyval.expr)->val.binary.left = (yyvsp[-2].expr);
@@ -1621,7 +1621,7 @@
     break;
 
   case 37:
-#line 324 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 324 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.expr) = new_expr ((yyvsp[-1].op));
 		      (yyval.expr)->val.binary.left = (yyvsp[-2].expr);
@@ -1630,7 +1630,7 @@
     break;
 
   case 38:
-#line 330 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 330 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.expr) = new_expr ((yyvsp[-1].op));
 		      (yyval.expr)->val.binary.left = (yyvsp[-2].expr);
@@ -1639,7 +1639,7 @@
     break;
 
   case 39:
-#line 336 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 336 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.expr) = new_expr (exp_and);
 		      (yyval.expr)->val.binary.left = (yyvsp[-2].expr);
@@ -1648,7 +1648,7 @@
     break;
 
   case 40:
-#line 342 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 342 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.expr) = new_expr (exp_or);
 		      (yyval.expr)->val.binary.left = (yyvsp[-2].expr);
@@ -1657,7 +1657,7 @@
     break;
 
   case 41:
-#line 348 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 348 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.expr) = new_expr (exp_num);
 		      (yyval.expr)->val.num = (yyvsp[0].num);
@@ -1665,7 +1665,7 @@
     break;
 
   case 42:
-#line 353 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 353 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyval.expr) = new_expr (exp_id);
 		      (yyval.expr)->val.str = (yyvsp[0].str);
@@ -1673,17 +1673,17 @@
     break;
 
   case 43:
-#line 358 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 358 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.expr) = new_expr (exp_sizeof_headers); }
     break;
 
   case 44:
-#line 360 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 360 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.expr) = new_expr (exp_pagesize); }
     break;
 
   case 45:
-#line 364 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 364 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyvsp[0].filename_list)->next = (yyvsp[-2].filename_list)->next;
 		      (yyval.filename_list) = (yyvsp[-2].filename_list)->next = (yyvsp[0].filename_list);
@@ -1691,12 +1691,12 @@
     break;
 
   case 46:
-#line 369 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 369 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.filename_list) = (yyvsp[0].filename_list); }
     break;
 
   case 49:
-#line 377 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 377 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      /* First little optimization.  If there is only one
 			 file in the group don't do anything.  */
@@ -1710,17 +1710,17 @@
     break;
 
   case 50:
-#line 388 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 388 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.filename_list) = mark_as_needed ((yyvsp[-1].filename_list)); }
     break;
 
   case 51:
-#line 390 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 390 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.filename_list) = new_filename_listelem ((yyvsp[0].str)); }
     break;
 
   case 52:
-#line 395 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 395 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyvsp[0].version)->next = (yyvsp[-1].version)->next;
 		      (yyval.version) = (yyvsp[-1].version)->next = (yyvsp[0].version);
@@ -1728,12 +1728,12 @@
     break;
 
   case 53:
-#line 400 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 400 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.version) = (yyvsp[0].version); }
     break;
 
   case 54:
-#line 404 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 404 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyvsp[-2].version)->versionname = "";
 		      (yyvsp[-2].version)->parentname = NULL;
@@ -1742,7 +1742,7 @@
     break;
 
   case 55:
-#line 410 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 410 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyvsp[-2].version)->versionname = (yyvsp[-4].str);
 		      (yyvsp[-2].version)->parentname = NULL;
@@ -1751,7 +1751,7 @@
     break;
 
   case 56:
-#line 416 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 416 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      (yyvsp[-3].version)->versionname = (yyvsp[-5].str);
 		      (yyvsp[-3].version)->parentname = (yyvsp[-1].str);
@@ -1760,27 +1760,27 @@
     break;
 
   case 57:
-#line 425 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 425 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.version) = merge_versions ((yyvsp[-1].version), (yyvsp[0].version)); }
     break;
 
   case 58:
-#line 427 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 427 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.version) = (yyvsp[0].version); }
     break;
 
   case 59:
-#line 431 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 431 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.version) = new_version (NULL, (yyvsp[0].id_list)); }
     break;
 
   case 60:
-#line 433 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 433 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.version) = new_version ((yyvsp[0].id_list), NULL); }
     break;
 
   case 61:
-#line 438 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 438 "../../../redhat/stock-elfutils/src/ldscript.y"
     {
 		      struct id_list *newp = new_id_listelem ((yyvsp[-1].str));
 		      newp->next = (yyvsp[-2].id_list)->next;
@@ -1789,27 +1789,27 @@
     break;
 
   case 62:
-#line 444 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 444 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.id_list) = new_id_listelem ((yyvsp[-1].str)); }
     break;
 
   case 63:
-#line 448 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 448 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.str) = (yyvsp[0].str); }
     break;
 
   case 64:
-#line 450 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 450 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.str) = (yyvsp[0].str); }
     break;
 
   case 65:
-#line 454 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 454 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.str) = (yyvsp[0].str); }
     break;
 
   case 66:
-#line 456 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 456 "../../../redhat/stock-elfutils/src/ldscript.y"
     { (yyval.str) = NULL; }
     break;
 
@@ -2086,7 +2086,7 @@
 }
 
 
-#line 459 "/home/drepper/devel/elfutils/src/ldscript.y"
+#line 459 "../../../redhat/stock-elfutils/src/ldscript.y"
 
 
 static void
Index: frysk-imports/elfutils/src/ldscript.h
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/src/ldscript.h,v
retrieving revision 1.3
diff -u -u -r1.3 ldscript.h
--- frysk-imports/elfutils/src/ldscript.h	26 Apr 2007 15:18:44 -0000	1.3
+++ frysk-imports/elfutils/src/ldscript.h	26 Apr 2007 19:47:43 -0000
@@ -1,9 +1,7 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+/* A Bison parser, made by GNU Bison 2.1.  */
 
-/* Skeleton interface for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+/* Skeleton parser for Yacc-like parsing with Bison,
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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
@@ -20,18 +18,10 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
 
 /* Tokens.  */
 #ifndef YYTOKENTYPE
@@ -100,10 +90,9 @@
 
 
 
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-#line 71 "/home/drepper/devel/elfutils/src/ldscript.y"
-{
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 71 "../../../redhat/stock-elfutils/src/ldscript.y"
+typedef union YYSTYPE {
   uintmax_t num;
   enum expression_tag op;
   char *str;
@@ -116,10 +105,9 @@
   struct filename_list *filename_list;
   struct version *version;
   struct id_list *id_list;
-}
-/* Line 1529 of yacc.c.  */
-#line 122 "ldscript.h"
-	YYSTYPE;
+} YYSTYPE;
+/* Line 1447 of yacc.c.  */
+#line 111 "ldscript.h"
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1
@@ -127,3 +115,5 @@
 
 extern YYSTYPE ldlval;
 
+
+
Index: frysk-imports/elfutils/src/readelf.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/src/readelf.c,v
retrieving revision 1.5
diff -u -u -r1.5 readelf.c
--- frysk-imports/elfutils/src/readelf.c	26 Apr 2007 15:18:44 -0000	1.5
+++ frysk-imports/elfutils/src/readelf.c	26 Apr 2007 19:47:44 -0000
@@ -518,7 +518,7 @@
 {
   if (e_type <= ET_CORE)
     {
-      static const char *knowntypes[] =
+      static const char *const knowntypes[] =
       {
 	N_("NONE (None)"),
 	N_("REL (Relocatable file)"),
@@ -2678,7 +2678,7 @@
 static const char *
 dwarf_tag_string (unsigned int tag)
 {
-  static const char *known_tags[]  =
+  static const char *const known_tags[]  =
     {
       [DW_TAG_array_type] = "array_type",
       [DW_TAG_class_type] = "class_type",
@@ -2783,7 +2783,7 @@
 static const char *
 dwarf_attr_string (unsigned int attrnum)
 {
-  static const char *known_attrs[] =
+  static const char *const known_attrs[] =
     {
       [DW_AT_sibling] = "sibling",
       [DW_AT_location] = "location",
@@ -2997,7 +2997,7 @@
 static const char *
 dwarf_form_string (unsigned int form)
 {
-  static const char *known_forms[] =
+  static const char *const known_forms[] =
     {
       [DW_FORM_addr] = "addr",
       [DW_FORM_block2] = "block2",
@@ -3040,7 +3040,7 @@
 static const char *
 dwarf_lang_string (unsigned int lang)
 {
-  static const char *known[] =
+  static const char *const known[] =
     {
       [DW_LANG_C89] = "ISO C89",
       [DW_LANG_C] = "C",
@@ -3083,7 +3083,7 @@
 static const char *
 dwarf_inline_string (unsigned int code)
 {
-  static const char *known[] =
+  static const char *const known[] =
     {
       [DW_INL_not_inlined] = "not_inlined",
       [DW_INL_inlined] = "inlined",
@@ -3101,7 +3101,7 @@
 static const char *
 dwarf_encoding_string (unsigned int code)
 {
-  static const char *known[] =
+  static const char *const known[] =
     {
       [DW_ATE_void] = "void",
       [DW_ATE_address] = "address",
@@ -3138,7 +3138,7 @@
 static const char *
 dwarf_access_string (unsigned int code)
 {
-  static const char *known[] =
+  static const char *const known[] =
     {
       [DW_ACCESS_public] = "public",
       [DW_ACCESS_protected] = "protected",
@@ -3155,7 +3155,7 @@
 static const char *
 dwarf_visibility_string (unsigned int code)
 {
-  static const char *known[] =
+  static const char *const known[] =
     {
       [DW_VIS_local] = "local",
       [DW_VIS_exported] = "exported",
@@ -3172,7 +3172,7 @@
 static const char *
 dwarf_virtuality_string (unsigned int code)
 {
-  static const char *known[] =
+  static const char *const known[] =
     {
       [DW_VIRTUALITY_none] = "none",
       [DW_VIRTUALITY_virtual] = "virtual",
@@ -3189,7 +3189,7 @@
 static const char *
 dwarf_identifier_case_string (unsigned int code)
 {
-  static const char *known[] =
+  static const char *const known[] =
     {
       [DW_ID_case_sensitive] = "sensitive",
       [DW_ID_up_case] = "up_case",
@@ -3207,7 +3207,7 @@
 static const char *
 dwarf_calling_convention_string (unsigned int code)
 {
-  static const char *known[] =
+  static const char *const known[] =
     {
       [DW_CC_normal] = "normal",
       [DW_CC_program] = "program",
@@ -3231,7 +3231,7 @@
 static const char *
 dwarf_ordering_string (unsigned int code)
 {
-  static const char *known[] =
+  static const char *const known[] =
     {
       [DW_ORD_row_major] = "row_major",
       [DW_ORD_col_major] = "col_major"
@@ -3247,7 +3247,7 @@
 static const char *
 dwarf_discr_list_string (unsigned int code)
 {
-  static const char *known[] =
+  static const char *const known[] =
     {
       [DW_DSC_label] = "label",
       [DW_DSC_range] = "range"
@@ -3264,7 +3264,7 @@
 print_ops (Dwarf *dbg, int indent, int indentrest,
 	   unsigned int addrsize, Dwarf_Word len, const unsigned char *data)
 {
-  static const char *known[] =
+  static const char *const known[] =
     {
       [DW_OP_addr] = "addr",
       [DW_OP_deref] = "deref",
@@ -4087,97 +4087,9 @@
 	  goto do_return;
 	}
 
-#if 1
-      const char *tagstr = dwarf_tag_string (tag);
-#else
-      static const char *const lowtags[] =
-	{
-	  [DW_TAG_array_type] = "array_type",
-	  [DW_TAG_class_type] = "class_type",
-	  [DW_TAG_entry_point] = "entry_point",
-	  [DW_TAG_enumeration_type] = "enumeration_type",
-	  [DW_TAG_formal_parameter] = "formal_parameter",
-	  [DW_TAG_imported_declaration] = "imported_declaration",
-	  [DW_TAG_label] = "label",
-	  [DW_TAG_lexical_block] = "lexical_block",
-	  [DW_TAG_member] = "member",
-	  [DW_TAG_pointer_type] = "pointer_type",
-	  [DW_TAG_reference_type] = "reference_type",
-	  [DW_TAG_compile_unit] = "compile_unit",
-	  [DW_TAG_string_type] = "string_type",
-	  [DW_TAG_structure_type] = "structure_type",
-	  [DW_TAG_subroutine_type] = "subroutine_type",
-	  [DW_TAG_typedef] = "typedef",
-	  [DW_TAG_union_type] = "union_type",
-	  [DW_TAG_unspecified_parameters] = "unspecified_parameters",
-	  [DW_TAG_variant] = "variant",
-	  [DW_TAG_common_block] = "common_block",
-	  [DW_TAG_common_inclusion] = "common_inclusion",
-	  [DW_TAG_inheritance] = "inheritance",
-	  [DW_TAG_inlined_subroutine] = "inlined_subroutine",
-	  [DW_TAG_module] = "module",
-	  [DW_TAG_ptr_to_member_type] = "ptr_to_member_type",
-	  [DW_TAG_set_type] = "set_type",
-	  [DW_TAG_subrange_type] = "subrange_type",
-	  [DW_TAG_with_stmt] = "with_stmt",
-	  [DW_TAG_access_declaration] = "access_declaration",
-	  [DW_TAG_base_type] = "base_type",
-	  [DW_TAG_catch_block] = "catch_block",
-	  [DW_TAG_const_type] = "const_type",
-	  [DW_TAG_constant] = "constant",
-	  [DW_TAG_enumerator] = "enumerator",
-	  [DW_TAG_file_type] = "file_type",
-	  [DW_TAG_friend] = "friend",
-	  [DW_TAG_namelist] = "namelist",
-	  [DW_TAG_namelist_item] = "namelist_item",
-	  [DW_TAG_packed_type] = "packed_type",
-	  [DW_TAG_subprogram] = "subprogram",
-	  [DW_TAG_template_type_param] = "template_type_param",
-	  [DW_TAG_template_value_param] = "template_value_param",
-	  [DW_TAG_thrown_type] = "thrown_type",
-	  [DW_TAG_try_block] = "try_block",
-	  [DW_TAG_variant_part] = "variant_part",
-	  [DW_TAG_variable] = "variable",
-	  [DW_TAG_volatile_type] = "volatile_type"
-	};
-
-      const char *tagstr;
-      switch (tag)
-	{
-	case DW_TAG_lo_user:
-	  tagstr = "lo_user";
-	  break;
-
-	case DW_TAG_MIPS_loop:
-	  tagstr = "MIPS_loop";
-	  break;
-
-	case DW_TAG_format_label:
-	  tagstr = "format_label";
-	  break;
-
-	case DW_TAG_function_template:
-	  tagstr = "function_template";
-	  break;
-
-	case DW_TAG_class_template:
-	  tagstr = "class_template";
-	  break;
-	case DW_TAG_hi_user:
-	  tagstr = "hi_user";
-	  break;
-
-	default:
-	  if (tag < (int) (sizeof (lowtags) / sizeof (lowtags[0])))
-	    tagstr = lowtags[tag];
-	  else
-	    tagstr = "???";
-	  break;
-	}
-#endif
-
       printf (" [%6" PRIx64 "]  %*s%s\n",
-	      (uint64_t) offset, (int) (level * 2), "", tagstr);
+	      (uint64_t) offset, (int) (level * 2), "",
+	      dwarf_tag_string (tag));
 
       /* Print the attribute values.  */
       args.level = level;
@@ -4993,7 +4905,7 @@
       GElf_Shdr shdr_mem;
       GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
 
-      if (shdr != NULL || shdr->sh_type != SHT_PROGBITS)
+      if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
 	{
 	  static const struct
 	  {
Index: frysk-imports/elfutils/tests/ChangeLog
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/tests/ChangeLog,v
retrieving revision 1.16
diff -u -u -r1.16 ChangeLog
--- frysk-imports/elfutils/tests/ChangeLog	26 Apr 2007 15:18:44 -0000	1.16
+++ frysk-imports/elfutils/tests/ChangeLog	26 Apr 2007 19:47:45 -0000
@@ -39,6 +39,30 @@
 
 	* line2addr.c (main): Avoid using sscanf() to prevent a warning.
 
+2007-04-16  Roland McGrath  <roland@redhat.com>
+
+	* dwfl-addr-sect.c: New file.
+	* Makefile.am (noinst_PROGRAMS): Add it.
+	(dwfl_addr_sect_LDADD): New variable.
+
+2007-04-05  Roland McGrath  <roland@redhat.com>
+
+	* get-files.c: Test dwarf_getsrcdirs.
+	* run-get-files.sh: Update expected output.
+
+2007-04-01  Roland McGrath  <roland@redhat.com>
+
+	* run-allregs.sh: Updated expected output for x86_64.
+
+2007-03-04  Roland McGrath  <roland@redhat.com>
+
+	* dwfl-bug-fd-leak.c: New file.
+	* Makefile.am (noinst_PROGRAMS, TESTS): Add it.
+	(dwfl_bug_fd_leak_LDADD): New variable.
+
+	* dwflmodtest.c: Test dwfl_getmodules before and after getdwarf,
+	show what files have been located.
+
 2007-02-02  Roland McGrath  <roland@redhat.com>
 
 	* run-addrname-test.sh: New file.
Index: frysk-imports/elfutils/tests/Makefile.am
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/tests/Makefile.am,v
retrieving revision 1.12
diff -u -u -r1.12 Makefile.am
--- frysk-imports/elfutils/tests/Makefile.am	26 Apr 2007 15:18:44 -0000	1.12
+++ frysk-imports/elfutils/tests/Makefile.am	26 Apr 2007 19:47:45 -0000
@@ -58,7 +58,8 @@
 		  get-aranges allfcts line2addr addrscopes funcscopes \
 		  show-abbrev hash newscn ecp dwflmodtest \
 		  find-prologues funcretval allregs rdwrmmap \
-		  dwfl-bug-addr-overflow arls dwfl-bug-fd-leak
+		  dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \
+		  dwfl-addr-sect
 # get-ciefde
 asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
 	    asm-tst6 asm-tst7 asm-tst8 asm-tst9
@@ -204,6 +205,8 @@
 dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
 arls_LDADD = $(libelf) $(libmudflap)
 dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
+dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl
 
 CLEANFILES = xxx *.gcno *.gcda *gconv
 
Index: frysk-imports/elfutils/tests/dwfl-addr-sect.c
===================================================================
RCS file: frysk-imports/elfutils/tests/dwfl-addr-sect.c
diff -N frysk-imports/elfutils/tests/dwfl-addr-sect.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ frysk-imports/elfutils/tests/dwfl-addr-sect.c	26 Apr 2007 19:47:46 -0000
@@ -0,0 +1,85 @@
+/* Test program for libdwfl ... foo
+   Copyright (C) 2007 Red Hat, Inc.
+   This file is part of Red Hat elfutils.
+
+   Red Hat elfutils 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; version 2 of the License.
+
+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
+
+   Red Hat elfutils is an included package of the Open Invention Network.
+   An included package of the Open Invention Network is a package for which
+   Open Invention Network licensees cross-license their patents.  No patent
+   license is granted, either expressly or impliedly, by designation as an
+   included package.  Should you wish to participate in the Open Invention
+   Network licensing program, please visit www.openinventionnetwork.com
+   <http://www.openinventionnetwork.com>.  */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <stdlib.h>
+#include <string.h>
+#include <error.h>
+#include <locale.h>
+#include <argp.h>
+#include ELFUTILS_HEADER(dwfl)
+#include <dwarf.h>
+
+
+static void
+handle_address (Dwfl *dwfl, Dwarf_Addr address)
+{
+  Dwfl_Module *mod = dwfl_addrmodule (dwfl, address);
+  Dwarf_Addr adjusted = address;
+  Dwarf_Addr bias;
+  Elf_Scn *scn = dwfl_module_address_section (mod, &adjusted, &bias);
+  if (scn == NULL)
+    error (EXIT_FAILURE, 0, "%#" PRIx64 ": dwfl_module_address_section: %s",
+	   address, dwfl_errmsg (-1));
+  printf ("address %#" PRIx64 " => module \"%s\" section %zu + %#" PRIx64 "\n",
+	  address,
+	  dwfl_module_info (mod, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
+	  elf_ndxscn (scn), adjusted);
+}
+
+int
+main (int argc, char **argv)
+{
+  /* We use no threads here which can interfere with handling a stream.  */
+  (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER);
+
+  /* Set locale.  */
+  (void) setlocale (LC_ALL, "");
+
+  int remaining;
+  Dwfl *dwfl = NULL;
+  (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, &dwfl);
+  assert (dwfl != NULL);
+
+  int result = 0;
+  for (; remaining < argc; ++remaining)
+    {
+      char *endp;
+      uintmax_t addr = strtoumax (argv[remaining], &endp, 0);
+      if (endp != argv[remaining])
+	handle_address (dwfl, addr);
+      else
+	result = 1;
+    }
+
+  dwfl_end (dwfl);
+
+  return result;
+}
Index: frysk-imports/elfutils/tests/dwflmodtest.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/tests/dwflmodtest.c,v
retrieving revision 1.3
diff -u -u -r1.3 dwflmodtest.c
--- frysk-imports/elfutils/tests/dwflmodtest.c	26 Apr 2007 15:18:44 -0000	1.3
+++ frysk-imports/elfutils/tests/dwflmodtest.c	26 Apr 2007 19:47:46 -0000
@@ -1,5 +1,5 @@
 /* Test program for libdwfl basic module tracking, relocation.
-   Copyright (C) 2005 Red Hat, Inc.
+   Copyright (C) 2005, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
 
    Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -163,6 +163,25 @@
 }
 
 static int
+list_module (Dwfl_Module *mod __attribute__ ((unused)),
+	     void **userdata __attribute__ ((unused)),
+	     const char *name, Dwarf_Addr base,
+	     void *arg __attribute__ ((unused)))
+{
+  Dwarf_Addr start;
+  Dwarf_Addr end;
+  const char *file;
+  const char *debug;
+  if (dwfl_module_info (mod, NULL, &start, &end,
+			NULL, NULL, &file, &debug) != name
+      || start != base)
+    abort ();
+  printf ("module: %30s %08" PRIx64 "..%08" PRIx64 " %s %s\n",
+	  name, start, end, file, debug);
+  return DWARF_CB_OK;
+}
+
+static int
 print_module (Dwfl_Module *mod __attribute__ ((unused)),
 	      void **userdata __attribute__ ((unused)),
 	      const char *name, Dwarf_Addr base,
@@ -252,11 +271,24 @@
 
   ptrdiff_t p = 0;
   do
+    p = dwfl_getmodules (dwfl, &list_module, NULL, p);
+  while (p > 0);
+  if (p < 0)
+    error (2, 0, "dwfl_getmodules: %s", dwfl_errmsg (-1));
+
+  do
     p = dwfl_getdwarf (dwfl, &print_module, &show_functions, p);
   while (p > 0);
   if (p < 0)
     error (2, 0, "dwfl_getdwarf: %s", dwfl_errmsg (-1));
 
+  p = 0;
+  do
+    p = dwfl_getmodules (dwfl, &list_module, NULL, p);
+  while (p > 0);
+  if (p < 0)
+    error (2, 0, "dwfl_getmodules: %s", dwfl_errmsg (-1));
+
   dwfl_end (dwfl);
 
   return 0;
Index: frysk-imports/elfutils/tests/get-files.c
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/tests/get-files.c,v
retrieving revision 1.3
diff -u -u -r1.3 get-files.c
--- frysk-imports/elfutils/tests/get-files.c	26 Apr 2007 15:18:44 -0000	1.3
+++ frysk-imports/elfutils/tests/get-files.c	26 Apr 2007 19:47:46 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2004, 2005 Red Hat, Inc.
+/* Copyright (C) 2002, 2004, 2005, 2007 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -84,6 +84,22 @@
 	      break;
 	    }
 
+	  const char *const *dirs;
+	  size_t ndirs;
+	  if (dwarf_getsrcdirs (files, &dirs, &ndirs) != 0)
+	    {
+	      printf ("%s: cannot get include directories\n", argv[cnt]);
+	      result = 1;
+	      break;
+	    }
+
+	  if (dirs[0] == NULL)
+	    puts (" dirs[0] = (null)");
+	  else
+	    printf (" dirs[0] = \"%s\"\n", dirs[0]);
+	  for (size_t i = 1; i < ndirs; ++i)
+	    printf (" dirs[%zu] = \"%s\"\n", i, dirs[i]);
+
 	  for (size_t i = 0; i < nfiles; ++i)
 	    printf (" file[%zu] = \"%s\"\n", i,
 		    dwarf_filesrc (files, i, NULL, NULL));
Index: frysk-imports/elfutils/tests/run-allregs.sh
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/tests/run-allregs.sh,v
retrieving revision 1.3
diff -u -u -r1.3 run-allregs.sh
--- frysk-imports/elfutils/tests/run-allregs.sh	26 Apr 2007 15:18:44 -0000	1.3
+++ frysk-imports/elfutils/tests/run-allregs.sh	26 Apr 2007 19:47:47 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006 Red Hat, Inc.
+# Copyright (C) 2005, 2006, 2007 Red Hat, Inc.
 # This file is part of Red Hat elfutils.
 #
 # Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -132,6 +132,22 @@
 	 30: %xmm13 (xmm13), unsigned 128 bits
 	 31: %xmm14 (xmm14), unsigned 128 bits
 	 32: %xmm15 (xmm15), unsigned 128 bits
+control registers:
+	 49: %rflags (rflags), unsigned 64 bits
+	 62: %tr (tr), unsigned 64 bits
+	 63: %ldtr (ldtr), unsigned 64 bits
+	 64: %mxcsr (mxcsr), unsigned 64 bits
+	 65: %fcw (fcw), unsigned 64 bits
+	 66: %fsw (fsw), unsigned 64 bits
+segment registers:
+	 50: %es (es), unsigned 16 bits
+	 51: %cs (cs), unsigned 16 bits
+	 52: %ss (ss), unsigned 16 bits
+	 53: %ds (ds), unsigned 16 bits
+	 54: %fs (fs), unsigned 16 bits
+	 55: %gs (gs), unsigned 16 bits
+	 58: %fs.base (fs.base), address 64 bits
+	 59: %gs.base (gs.base), address 64 bits
 x87 registers:
 	 33: %st0 (st0), float 80 bits
 	 34: %st1 (st1), float 80 bits
Index: frysk-imports/elfutils/tests/run-get-files.sh
===================================================================
RCS file: /cvs/frysk/frysk-imports/elfutils/tests/run-get-files.sh,v
retrieving revision 1.3
diff -u -u -r1.3 run-get-files.sh
--- frysk-imports/elfutils/tests/run-get-files.sh	26 Apr 2007 15:18:44 -0000	1.3
+++ frysk-imports/elfutils/tests/run-get-files.sh	26 Apr 2007 19:47:47 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2004, 2005 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2004, 2005, 2007 Red Hat, Inc.
 # This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper@redhat.com>, 1999.
 #
@@ -30,9 +30,11 @@
 
 testrun_compare ./get-files testfile testfile2 <<\EOF
 cuhl = 11, o = 0, asz = 4, osz = 4, ncu = 191
+ dirs[0] = "/home/drepper/gnu/new-bu/build/ttt"
  file[0] = "???"
  file[1] = "/home/drepper/gnu/new-bu/build/ttt/m.c"
 cuhl = 11, o = 114, asz = 4, osz = 4, ncu = 5617
+ dirs[0] = "/home/drepper/gnu/new-bu/build/ttt"
  file[0] = "???"
  file[1] = "/home/drepper/gnu/new-bu/build/ttt/b.c"
  file[2] = "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stddef.h"
@@ -46,9 +48,11 @@
  file[10] = "/usr/include/_G_config.h"
  file[11] = "/usr/include/gconv.h"
 cuhl = 11, o = 412, asz = 4, osz = 4, ncu = 5752
+ dirs[0] = "/home/drepper/gnu/new-bu/build/ttt"
  file[0] = "???"
  file[1] = "/home/drepper/gnu/new-bu/build/ttt/f.c"
 cuhl = 11, o = 0, asz = 4, osz = 4, ncu = 2418
+ dirs[0] = "/shoggoth/drepper"
  file[0] = "???"
  file[1] = "/shoggoth/drepper/b.c"
  file[2] = "/home/geoffk/objs/laurel-000912-branch/lib/gcc-lib/powerpc-unknown-linux-gnu/2.96-laurel-000912/include/stddef.h"
@@ -59,9 +63,11 @@
  file[7] = "/usr/include/libio.h"
  file[8] = "/usr/include/_G_config.h"
 cuhl = 11, o = 213, asz = 4, osz = 4, ncu = 2521
+ dirs[0] = "/shoggoth/drepper"
  file[0] = "???"
  file[1] = "/shoggoth/drepper/f.c"
 cuhl = 11, o = 267, asz = 4, osz = 4, ncu = 2680
+ dirs[0] = "/shoggoth/drepper"
  file[0] = "???"
  file[1] = "/shoggoth/drepper/m.c"
 EOF

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: elfutils 0.127 merge happening tomorrow early morning.
  2007-04-26 21:17 elfutils 0.127 merge happening tomorrow early morning Nurdin Premji
@ 2007-04-27 22:29 ` Nurdin Premji
  0 siblings, 0 replies; 2+ messages in thread
From: Nurdin Premji @ 2007-04-27 22:29 UTC (permalink / raw)
  To: frysk

Nurdin Premji wrote:
> I will be merging elfutils 0.127 to head tomorrow early morning.
> Attached is the patch that will be merged, I've tested against x86_64 
> and x86 with no regressions.
> My testing included running make check, frysk-import/TestRunner, 
> frysk-core/TestRunner and make check inside the elfutils branch. 
> Results are the same before and after this patch.
Done.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-27 14:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-26 21:17 elfutils 0.127 merge happening tomorrow early morning Nurdin Premji
2007-04-27 22:29 ` Nurdin Premji

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).