rpms/frysk/devel frysk-0.4-elfutils-fixesout.patch, NONE, 1.1 frysk-0.4-elfutils-head.patch, NONE, 1.1 frysk-0.4-elfutils-ldadd.patch, NONE, 1.1 frysk-0.4-elfutils-louser.patch, NONE, 1.1 frysk-0.4-elfutils-maphack.patch, NONE, 1.1 frysk-0.4-elfutils-offt.patch, NONE, 1.1 frysk-0.4-elfutils-rpmout.patch, NONE, 1.1 frysk-0.4-sodwfl.patch, NONE, 1.1 frysk.spec, 1.158, 1.159 frysk-0.4-elfutilsdeps.patch, 1.1, NONE frysk-0.4-elfutilsfstat.patch, 1.1, NONE

cagney cagney at fedoraproject.org
Thu Mar 25 22:53:57 UTC 2010


Author: cagney

Update of /cvs/pkgs/rpms/frysk/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv32438/devel

Modified Files:
	frysk.spec 
Added Files:
	frysk-0.4-elfutils-fixesout.patch 
	frysk-0.4-elfutils-head.patch frysk-0.4-elfutils-ldadd.patch 
	frysk-0.4-elfutils-louser.patch 
	frysk-0.4-elfutils-maphack.patch frysk-0.4-elfutils-offt.patch 
	frysk-0.4-elfutils-rpmout.patch frysk-0.4-sodwfl.patch 
Removed Files:
	frysk-0.4-elfutilsdeps.patch frysk-0.4-elfutilsfstat.patch 
Log Message:
* Thu Mar 25 2010 Andrew Cagney <cagney [at] fedoraproject.org> - 0.4-21
- Merge 0.145 elfutils and local fixes.  This is Plan B, Plan A was to
  use the installed elfutils.


frysk-0.4-elfutils-fixesout.patch:
 libdwfl/ChangeLog              |   36 --------------------------
 libdwfl/dwfl_module_addrsym.c  |   43 ++++++++-----------------------
 libdwfl/dwfl_module_getdwarf.c |   56 ++++++++++-------------------------------
 libdwfl/dwfl_module_getsrc.c   |    2 -
 libelf/ChangeLog               |    5 ---
 libelf/elf_getdata_rawchunk.c  |    2 -
 6 files changed, 27 insertions(+), 117 deletions(-)

--- NEW FILE frysk-0.4-elfutils-fixesout.patch ---
diff --git b/libdwfl/ChangeLog a/libdwfl/ChangeLog
index e1d00f1..01a2537 100644
--- b/libdwfl/ChangeLog
+++ a/libdwfl/ChangeLog
@@ -1,39 +1,3 @@
-2008-06-19  Andrew Cagney  <cagney at redhat.com>
-
-	* dwfl_module_addrsym.c (dwfl_module_addrsym): Correctly update
-	min_label.
-
-2008-06-07  Andrew Cagney  <cagney at redhat.com>
-
-	* dwfl_module_getdwarf.c (open_elf): Don't align the module's load
-	address.  Bug frysk/6599, redhat/450218.
-
-	* dwfl_module_getsrc.c (dwfl_module_getsrc): Remove bias from
-	address.  Fix frysk/6600, redhat/450229.
-	
-
-2008-05-21  Petr Machata  <pmachata at redhat.com>
-
-	* dwfl_module_getdwarf.c (open_elf): Assume that debuginfo of EXEC
-	files has the same bias as the main file.
-
-2008-04-02  Petr Machata  <pmachata at redhat.com>
-
-	* dwfl_module_getdwarf.c (find_debuginfo): Return DWFL_E_CB when
-	the callback results in an error.
-	(find_file): Likewise.
-
-2008-03-24  Stan Cox  <scox at redhat.com>
-
-	* dwfl_module_getdwarf.c (load_symtab): Keep looking for an external
-	symbol table even if we have a .dynsym.  Should be fixed post 0.133.
-
-2008-03-13  Tim Moore  <timoore at redhat.com>
-
-	* dwfl_module_addrsym.c (dwfl_module_addrsym): Start min_label
-	from 0 to allow sizeless symbols below the address. Choose the
-	best sizeless symbol.
-
 2008-02-19  Roland McGrath  <roland at redhat.com>
 
 	* relocate.c (relocate_section): Check for an unhandled relocation
diff --git b/libdwfl/dwfl_module_addrsym.c a/libdwfl/dwfl_module_addrsym.c
index 77033a6..f16de11 100644
--- b/libdwfl/dwfl_module_addrsym.c
+++ a/libdwfl/dwfl_module_addrsym.c
@@ -49,13 +49,10 @@
 
 #include "libdwflP.h"
 
-#include <stdio.h>
-
 const char *
 dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr,
 		     GElf_Sym *closest_sym, GElf_Word *shndxp)
 {
-  // fprintf(stderr, "looking up %lx\n", (long) addr);
   int syments = INTUSE(dwfl_module_getsymtab) (mod);
   if (syments < 0)
     return NULL;
@@ -111,7 +108,7 @@ dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr,
   GElf_Word sizeless_shndx = SHN_UNDEF;
 
   /* Keep track of the lowest address a relevant sizeless symbol could have.  */
-  GElf_Addr min_label = 0;
+  GElf_Addr min_label = addr;
 
   /* Look through the symbol table for a matching symbol.  */
   for (int i = 1; i < syments; ++i)
@@ -119,20 +116,15 @@ dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr,
       GElf_Sym sym;
       GElf_Word shndx;
       const char *name = INTUSE(dwfl_module_getsym) (mod, i, &sym, &shndx);
-      // fprintf(stderr, "symbol %s at 0x%lx 0x%ld\n", name, (long) sym.st_value, (long) sym.st_size);
-      /* Even if we don't choose this symbol, its existence excludes
-	 any sizeless symbol (assembly label) that is below its upper
-	 bound.  */
-      if (name != NULL && sym.st_value <= addr
-	  && sym.st_value + sym.st_size > min_label) {
-	min_label = sym.st_value + sym.st_size;
-	// fprintf(stderr, "  min to %s size ends at %lx\n", name, (long) min_label);
-      }
       if (name != NULL
 	  && sym.st_value <= addr
 	  && (sym.st_size == 0 || addr - sym.st_value < sym.st_size))
 	{
-	  // fprintf(stderr, "  candidate %s at 0x%lx 0x%ld\n", name, (long) sym.st_value, (long) sym.st_size);
+	  /* Even if we don't choose this symbol, its existence
+	     excludes any sizeless symbol (assembly label) that
+	     is inside its bounds.  */
+	  if (sym.st_value + sym.st_size > addr)
+	    min_label = sym.st_value + sym.st_size;
 
 	  /* This symbol is a better candidate than the current one
 	     if it's a named symbol, not a section or file symbol,
@@ -148,7 +140,6 @@ dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr,
 		{
 		  if (sym.st_size != 0)
 		    {
-		      // fprintf(stderr, "  closest %s at %lx\n", name, (long)sym.st_value);
 		      *closest_sym = sym;
 		      closest_shndx = shndx;
 		      closest_name = name;
@@ -159,29 +150,17 @@ dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr,
 			 st_size.  If no symbol with proper size includes
 			 the address, we'll use the closest one that is in
 			 the same section as ADDR.  */
-                      if (sizeless_name == NULL
-                          || sizeless_sym.st_value < sym.st_value
-                          || (sizeless_sym.st_value == sym.st_value
-                              && strcmp(name, sizeless_name) < 0))
-                        {
-			  // fprintf(stderr, "  sizeless %s at %lx\n", name, (long)sym.st_value);
-                          sizeless_sym = sym;
-                          sizeless_shndx = shndx;
-                          sizeless_name = name;
-                        }
+		      sizeless_sym = sym;
+		      sizeless_shndx = shndx;
+		      sizeless_name = name;
 		    }
 		}
 	      /* When the beginning of its range is no closer,
-		 the end of its range might be.
-                 If symbols are identical, choose the first one in
-		 alphabetical order */
+		 the end of its range might be.  */
 	      else if (sym.st_size != 0
 		       && closest_sym->st_value == sym.st_value
-		       && (closest_sym->st_size > sym.st_size
-                           || (closest_sym->st_size == sym.st_size
-                               && strcmp(name, closest_name) < 0)))
+		       && closest_sym->st_size > sym.st_size)
 		{
-		  // fprintf(stderr, "  alt closest %s at %lx\n", name, (long)sym.st_value);
 		  *closest_sym = sym;
 		  closest_shndx = shndx;
 		  closest_name = name;
diff --git b/libdwfl/dwfl_module_getdwarf.c a/libdwfl/dwfl_module_getdwarf.c
index 1d75754..7dd9b53 100644
--- b/libdwfl/dwfl_module_getdwarf.c
+++ a/libdwfl/dwfl_module_getdwarf.c
@@ -82,26 +82,19 @@ open_elf (Dwfl_Module *mod, struct dwfl_file *file)
     }
 
   file->bias = 0;
-  if (mod->e_type == ET_EXEC && file == &mod->debug)
-    /* Prelink can change ET_EXEC's first loadable address, but it
-       will not touch .text or any section where symbol information is
-       relevant.  Assume debugbias is the same as the main file.  */
-    file->bias = mod->main.bias;
-  else
-    for (uint_fast16_t i = 0; i < ehdr->e_phnum; ++i)
-      {
-	GElf_Phdr ph_mem;
-	GElf_Phdr *ph = gelf_getphdr (file->elf, i, &ph_mem);
-	if (ph == NULL)
-	  goto elf_error;
-	if (ph->p_type == PT_LOAD)
-	  {
-	    // Align the vaddr.
-	    Dwarf_Addr vaddr = ph->p_vaddr & -ph->p_align;
-	    file->bias = (mod->low_addr - vaddr);
-	    break;
-	  }
-      }
+  for (uint_fast16_t i = 0; i < ehdr->e_phnum; ++i)
+    {
+      GElf_Phdr ph_mem;
+      GElf_Phdr *ph = gelf_getphdr (file->elf, i, &ph_mem);
+      if (ph == NULL)
+	goto elf_error;
+      if (ph->p_type == PT_LOAD)
+	{
+	  file->bias = ((mod->low_addr & -ph->p_align)
+			- (ph->p_vaddr & -ph->p_align));
+	  break;
+	}
+    }
 
   mod->e_type = ehdr->e_type;
 
@@ -124,15 +117,6 @@ find_file (Dwfl_Module *mod)
   mod->main.fd = (*mod->dwfl->callbacks->find_elf) (MODCB_ARGS (mod),
 						    &mod->main.name,
 						    &mod->main.elf);
-
-  /* Bail out on error, but if there was a pre-primed file name left
-     behind by the callback, try to open that file name.  */
-  if (mod->main.fd < 0 && mod->main.name == NULL)
-    {
-      mod->elferr = DWFL_E_CB;
-      return;
-    }
-
   mod->elferr = open_elf (mod, &mod->main);
 
   if (mod->elferr == DWFL_E_NOERROR && !mod->main.valid)
@@ -222,12 +206,6 @@ find_debuginfo (Dwfl_Module *mod)
 							   debuglink_file,
 							   debuglink_crc,
 							   &mod->debug.name);
-
-  /* Bail out on error, but if there was a pre-primed file name left
-     behind by the callback, try to open that file name.  */
-  if (mod->debug.fd < 0 && mod->debug.name == NULL)
-    return DWFL_E_CB;
-
   return open_elf (mod, &mod->debug);
 }
 
@@ -240,7 +218,6 @@ load_symtab (struct dwfl_file *file, struct dwfl_file **symfile,
 	     Elf_Scn **symscn, Elf_Scn **xndxscn,
 	     size_t *syments, GElf_Word *strshndx)
 {
-  bool symtab = false;
   Elf_Scn *scn = NULL;
   while ((scn = elf_nextscn (file->elf, scn)) != NULL)
     {
@@ -249,7 +226,6 @@ load_symtab (struct dwfl_file *file, struct dwfl_file **symfile,
 	switch (shdr->sh_type)
 	  {
 	  case SHT_SYMTAB:
-	    symtab = true;
 	    *symscn = scn;
 	    *symfile = file;
 	    *strshndx = shdr->sh_link;
@@ -259,8 +235,6 @@ load_symtab (struct dwfl_file *file, struct dwfl_file **symfile,
 	    break;
 
 	  case SHT_DYNSYM:
-	    if (symtab)
-	      break;
 	    /* Use this if need be, but keep looking for SHT_SYMTAB.  */
 	    *symscn = scn;
 	    *symfile = file;
@@ -270,7 +244,7 @@ load_symtab (struct dwfl_file *file, struct dwfl_file **symfile,
 
 	  case SHT_SYMTAB_SHNDX:
 	    *xndxscn = scn;
-            if (symtab)
+	    if (*symscn != NULL)
 	      return DWFL_E_NOERROR;
 	    break;
 
@@ -279,7 +253,7 @@ load_symtab (struct dwfl_file *file, struct dwfl_file **symfile,
 	  }
     }
 
-  if (symtab)
+  if (*symscn != NULL)
     /* We found one, though no SHT_SYMTAB_SHNDX to go with it.  */
     return DWFL_E_NOERROR;
 
diff --git b/libdwfl/dwfl_module_getsrc.c a/libdwfl/dwfl_module_getsrc.c
index a413189..84c7eaa 100644
--- b/libdwfl/dwfl_module_getsrc.c
+++ a/libdwfl/dwfl_module_getsrc.c
@@ -63,8 +63,6 @@ dwfl_module_getsrc (Dwfl_Module *mod, Dwarf_Addr addr)
     error = __libdwfl_cu_getsrclines (cu);
   if (likely (error == DWFL_E_NOERROR))
     {
-      /* Remove bias.  */
-      addr = addr - bias;
       /* The lines are sorted by address, so we can use binary search.  */
       size_t l = 0, u = cu->die.cu->lines->nlines;
       while (l < u)
diff --git b/libelf/ChangeLog a/libelf/ChangeLog
index b7aeee4..ef7b37a 100644
--- b/libelf/ChangeLog
+++ a/libelf/ChangeLog
@@ -1,8 +1,3 @@
-2008-03-13  Tim Moore  <timoore at redhat.com>
-
-	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Cast offset and
-	size computation to uint64_t.
-
 2008-02-19  Roland McGrath  <roland at redhat.com>
 
 	* elf.h: Update from glibc.
diff --git b/libelf/elf_getdata_rawchunk.c a/libelf/elf_getdata_rawchunk.c
index 1b1b003..bea0f3f 100644
--- b/libelf/elf_getdata_rawchunk.c
+++ a/libelf/elf_getdata_rawchunk.c
@@ -79,7 +79,7 @@ elf_getdata_rawchunk (elf, offset, size, type)
     }
 
   if (unlikely (size > elf->maximum_size
-		|| (uint64_t)(elf->maximum_size - size) < (uint64_t)offset))
+		|| (off64_t) (elf->maximum_size - size) < offset))
     {
       /* Invalid request.  */
       __libelf_seterrno (ELF_E_INVALID_OP);

frysk-0.4-elfutils-head.patch:
 b/.gitignore                             |   28 
 b/AUTHORS                                |    2 
 b/ChangeLog                              |   67 
 b/Makefile.am                            |    6 
 b/NEWS                                   |  118 
 b/README                                 |    6 
 b/THANKS                                 |    2 
 b/TODO                                   |   34 
 b/backends/ChangeLog                     |  134 
 b/backends/Makefile.am                   |   68 
 b/backends/alpha_init.c                  |    1 
 b/backends/alpha_symbol.c                |   46 
 b/backends/arm_attrs.c                   |  242 +
 b/backends/arm_auxv.c                    |   46 
 b/backends/arm_corenote.c                |   73 
 b/backends/arm_init.c                    |   10 
 b/backends/arm_regs.c                    |  117 
 b/backends/arm_retval.c                  |  137 
 b/backends/arm_symbol.c                  |   73 
 b/backends/i386_cfi.c                    |   65 
 b/backends/i386_corenote.c               |   11 
 b/backends/i386_init.c                   |    4 
 b/backends/i386_reloc.def                |    6 
 b/backends/i386_syscall.c                |   47 
 b/backends/ia64_retval.c                 |   36 
 b/backends/ia64_symbol.c                 |    6 
 b/backends/linux-core-note.c             |   62 
 b/backends/ppc64_init.c                  |    3 
 b/backends/ppc64_retval.c                |   27 
 b/backends/ppc_attrs.c                   |   12 
 b/backends/ppc_corenote.c                |    7 
 b/backends/ppc_init.c                    |    1 
 b/backends/ppc_retval.c                  |   46 
 b/backends/ppc_syscall.c                 |   50 
 b/backends/sparc_init.c                  |    6 
 b/backends/sparc_reloc.def               |  164 
 b/backends/sparc_retval.c                |   37 
 b/backends/sparc_symbol.c                |   79 
 b/backends/x86_64_cfi.c                  |   60 
 b/backends/x86_64_corenote.c             |    5 
 b/backends/x86_64_init.c                 |    4 
 b/backends/x86_64_reloc.def              |    9 
 b/backends/x86_64_retval.c               |    7 
 b/backends/x86_64_syscall.c              |   47 
 b/backends/x86_corenote.c                |   48 
 b/config/ChangeLog                       |   36 
 b/config/Makefile.am                     |   23 
 b/config/elfutils.spec.in                |   89 
 b/config/eu.am                           |   60 
 b/config/known-dwarf.awk                 |   55 
 b/config/version.h.in                    |   58 
 b/configure.ac                           |  239 -
 b/lib/ChangeLog                          |   34 
 b/lib/Makefile.am                        |   15 
 b/lib/eu-config.h                        |  203 +
 b/lib/system.h                           |   14 
 b/libasm/ChangeLog                       |   13 
 b/libasm/Makefile.am                     |   36 
 b/libasm/asm_error.c                     |  112 
 b/libcpu/ChangeLog                       |   73 
 b/libcpu/Makefile.am                     |   25 
 b/libcpu/defs/i386                       |   53 
 b/libcpu/i386_disasm.c                   |  226 -
 b/libcpu/i386_parse.y                    |   54 
 b/libdw/ChangeLog                        |  335 +
 b/libdw/Makefile.am                      |   47 
 b/libdw/cfi.c                            |  500 ++
 b/libdw/cfi.h                            |  250 +
 b/libdw/cie.c                            |  193 +
 b/libdw/dwarf.h                          |  109 
 b/libdw/dwarf_aggregate_size.c           |  243 +
 b/libdw/dwarf_arrayorder.c               |    8 
 b/libdw/dwarf_begin_elf.c                |    3 
 b/libdw/dwarf_bitoffset.c                |    8 
 b/libdw/dwarf_bitsize.c                  |    8 
 b/libdw/dwarf_bytesize.c                 |    8 
 b/libdw/dwarf_cfi_addrframe.c            |   78 
 b/libdw/dwarf_cfi_end.c                  |   70 
 b/libdw/dwarf_decl_column.c              |    4 
 b/libdw/dwarf_decl_file.c                |    9 
 b/libdw/dwarf_decl_line.c                |    9 
 b/libdw/dwarf_end.c                      |    8 
 b/libdw/dwarf_entry_breakpoints.c        |    4 
 b/libdw/dwarf_error.c                    |   84 
 b/libdw/dwarf_formaddr.c                 |    8 
 b/libdw/dwarf_formflag.c                 |    8 
 b/libdw/dwarf_formref_die.c              |    7 
 b/libdw/dwarf_formstring.c               |   12 
 b/libdw/dwarf_formudata.c                |   65 
 b/libdw/dwarf_frame_cfa.c                |   96 
 b/libdw/dwarf_frame_info.c               |   74 
 b/libdw/dwarf_frame_register.c           |  142 
 b/libdw/dwarf_getaranges.c               |   36 
 b/libdw/dwarf_getattrs.c                 |   33 
 b/libdw/dwarf_getcfi.c                   |   94 
 b/libdw/dwarf_getcfi_elf.c               |  336 +
 b/libdw/dwarf_getlocation.c              |  322 +
 b/libdw/dwarf_getmacros.c                |   46 
 b/libdw/dwarf_getpubnames.c              |   15 
 b/libdw/dwarf_getscopevar.c              |    6 
 b/libdw/dwarf_getsrc_file.c              |   19 
 b/libdw/dwarf_getsrclines.c              |   32 
 b/libdw/dwarf_hasattr_integrate.c        |    2 
 b/libdw/dwarf_haschildren.c              |    4 
 b/libdw/dwarf_next_cfi.c                 |  234 +
 b/libdw/dwarf_nextcu.c                   |   17 
 b/libdw/dwarf_ranges.c                   |  108 
 b/libdw/dwarf_srclang.c                  |    9 
 b/libdw/encoded-value.h                  |  202 +
 b/libdw/fde.c                            |  306 +
 b/libdw/frame-cache.c                    |   87 
 b/libdw/libdw.h                          |  176 
 b/libdw/libdw.map                        |   56 
 b/libdw/libdwP.h                         |  228 +
 b/libdw/libdw_form.c                     |    9 
 b/libdw/memory-access.h                  |   61 
 b/libdwfl/ChangeLog                      |  426 ++
 b/libdwfl/Makefile.am                    |   49 
 b/libdwfl/argp-std.c                     |   65 
 b/libdwfl/bzip2.c                        |    4 
 b/libdwfl/core-file.c                    |  472 ++
 b/libdwfl/derelocate.c                   |   29 
 b/libdwfl/dwfl_addrmodule.c              |   32 
 b/libdwfl/dwfl_build_id_find_debuginfo.c |   22 
 b/libdwfl/dwfl_build_id_find_elf.c       |   26 
 b/libdwfl/dwfl_end.c                     |   22 
 b/libdwfl/dwfl_error.c                   |   87 
 b/libdwfl/dwfl_getdwarf.c                |   38 
 b/libdwfl/dwfl_getmodules.c              |   54 
 b/libdwfl/dwfl_module.c                  |   77 
 b/libdwfl/dwfl_module_addrsym.c          |   47 
 b/libdwfl/dwfl_module_build_id.c         |   43 
 b/libdwfl/dwfl_module_dwarf_cfi.c        |   92 
 b/libdwfl/dwfl_module_eh_cfi.c           |   78 
 b/libdwfl/dwfl_module_getdwarf.c         |  118 
 b/libdwfl/dwfl_module_getelf.c           |   88 
 b/libdwfl/dwfl_module_getsrc.c           |    5 
 b/libdwfl/dwfl_module_getsym.c           |   26 
 b/libdwfl/dwfl_module_report_build_id.c  |    5 
 b/libdwfl/dwfl_report_elf.c              |   32 
 b/libdwfl/dwfl_segment_report_module.c   |  661 +++
 b/libdwfl/find-debuginfo.c               |   40 
 b/libdwfl/gzip.c                         |  316 +
 b/libdwfl/image-header.c                 |  124 
 b/libdwfl/libdwfl.h                      |   68 
 b/libdwfl/libdwflP.h                     |  140 
 b/libdwfl/link_map.c                     |  865 ++++
 b/libdwfl/linux-kernel-modules.c         |   84 
 b/libdwfl/linux-proc-maps.c              |   15 
 b/libdwfl/lzma.c                         |    4 
 b/libdwfl/offline.c                      |   27 
 b/libdwfl/open.c                         |  203 +
 b/libdwfl/relocate.c                     |   36 
 b/libdwfl/segment.c                      |  322 +
 b/libebl/ChangeLog                       |   97 
 b/libebl/Makefile.am                     |   31 
 b/libebl/ebl-hooks.h                     |   18 
 b/libebl/ebl_check_special_section.c     |   65 
 b/libebl/ebl_syscall_abi.c               |   66 
 b/libebl/eblabicfi.c                     |   63 
 b/libebl/eblauxvinfo.c                   |    9 
 b/libebl/eblcorenote.c                   |   14 
 b/libebl/eblcorenotetypename.c           |    2 
 b/libebl/ebldynamictagname.c             |    4 
 b/libebl/eblobjnote.c                    |    9 
 b/libebl/eblobjnotetypename.c            |    3 
 b/libebl/eblopenbackend.c                |   49 
 b/libebl/eblreloctypename.c              |    4 
 b/libebl/eblstrtab.c                     |   22 
 b/libebl/eblsymbolbindingname.c          |    8 
 b/libebl/eblsymboltypename.c             |    8 
 b/libebl/libebl.h                        |   55 
 b/libebl/libeblP.h                       |    8 
 b/libelf/ChangeLog                       |  261 +
 b/libelf/Makefile.am                     |   35 
 b/libelf/common.h                        |    1 
 b/libelf/elf.h                           |  161 
 b/libelf/elf32_checksum.c                |   27 
 b/libelf/elf32_getehdr.c                 |   46 
 b/libelf/elf32_getphdr.c                 |   48 
 b/libelf/elf32_getshdr.c                 |  345 +
 b/libelf/elf32_newphdr.c                 |   32 
 b/libelf/elf32_offscn.c                  |   12 
 b/libelf/elf32_updatefile.c              |  215 -
 b/libelf/elf32_updatenull.c              |   30 
 b/libelf/elf_begin.c                     |   86 
 b/libelf/elf_error.c                     |   83 
 b/libelf/elf_getarhdr.c                  |   17 
 b/libelf/elf_getdata.c                   |   85 
 b/libelf/elf_getdata_rawchunk.c          |   15 
 b/libelf/elf_getphdrnum.c                |  116 
 b/libelf/elf_getshdrnum.c                |  111 
 b/libelf/elf_getshdrstrndx.c             |  205 +
 b/libelf/elf_next.c                      |   16 
 b/libelf/elf_rand.c                      |    6 
 b/libelf/elf_rawfile.c                   |    8 
 b/libelf/elf_readall.c                   |   24 
 b/libelf/elf_strptr.c                    |   19 
 b/libelf/elf_update.c                    |    4 
 b/libelf/gelf_getehdr.c                  |   19 
 b/libelf/gelf_getphdr.c                  |   23 
 b/libelf/gelf_getshdr.c                  |    6 
 b/libelf/gelf_update_phdr.c              |   18 
 b/libelf/gelf_update_shdr.c              |    6 
 b/libelf/libelf.h                        |   24 
 b/libelf/libelf.map                      |   10 
 b/libelf/libelfP.h                       |  104 
 b/libelf/note_xlate.h                    |    4 
 b/m4/ChangeLog                           |   13 
 b/m4/Makefile.am                         |    4 
 b/m4/zip.m4                              |   18 
 b/po/ChangeLog                           |    6 
 b/po/Makevars                            |    2 
 b/po/POTFILES.in                         |   20 
 b/po/de.po                               | 5629 +++++++++++++++++++++++++++++
 b/po/es.po                               | 5932 +++++++++++++++++++++++++++++++
 b/po/fr.po                               | 5612 +++++++++++++++++++++++++++++
 b/po/it.po                               | 5545 ++++++++++++++++++++++++++++
 b/po/ja.po                               | 5865 ++++++++++++++++++++++++++++++
 b/po/nl.po                               | 5610 +++++++++++++++++++++++++++++
 b/po/ru.po                               | 5570 +++++++++++++++++++++++++++++
 b/po/zh_CN.po                            | 5610 +++++++++++++++++++++++++++++
 b/src/ChangeLog                          |  432 ++
 b/src/Makefile.am                        |   51 
 b/src/addr2line.c                        |  206 -
 b/src/ar.c                               |   71 
 b/src/debugpred.h                        |    4 
 b/src/elfcmp.c                           |   80 
 b/src/elflint.c                          |  325 +
 b/src/findtextrel.c                      |   10 
 b/src/ld.c                               |   11 
 b/src/ld.h                               |    4 
 b/src/ldgeneric.c                        |   12 
 b/src/nm.c                               |   58 
 b/src/objdump.c                          |  194 -
 b/src/ranlib.c                           |    8 
 b/src/readelf.c                          | 1848 ++++++++-
 b/src/size.c                             |   27 
 b/src/strings.c                          |   10 
 b/src/strip.c                            |  582 +--
 b/src/unstrip.c                          |   20 
 b/tests/ChangeLog                        |  109 
 b/tests/Makefile.am                      |   49 
 b/tests/addrcfi.c                        |  207 +
 b/tests/asm-tst9.c                       |   12 
 b/tests/dwarf-getmacros.c                |   64 
 b/tests/dwfl-bug-getmodules.c            |   74 
 b/tests/early-offscn.c                   |   60 
 b/tests/run-addrname-test.sh             |  161 
 b/tests/run-dwarf-getmacros.sh           |  296 +
 b/tests/run-dwfl-addr-sect.sh            |    9 
 b/tests/run-early-offscn.sh              |   32 
 b/tests/run-strings-test.sh              |    5 
 b/tests/run-strip-test.sh                |    9 
 b/tests/run-strip-test8.sh               |    5 
 b/tests/test-subr.sh                     |    5 
 b/tests/testfile16.bz2                   |binary
 b/tests/testfile16.debug.bz2             |binary
 b/tests/testfile44.S.bz2                 |binary
 b/tests/testfile44.expect.bz2            |binary
 b/tests/testfile45.S.bz2                 |binary
 b/tests/testfile45.expect.bz2            |binary
 b/tests/testfile47.bz2                   |binary
 b/tests/testfile48.bz2                   |binary
 b/tests/testfile48.debug.bz2             |binary
 b/tests/testfile49.bz2                   |binary
 b/tests/testfile50.bz2                   |binary
 b/tests/testfile51.bz2                   |binary
 libelf/elf_getshnum.c                    |   97 
 libelf/elf_getshstrndx.c                 |  203 -
 270 files changed, 63378 insertions(+), 3312 deletions(-)

--- NEW FILE frysk-0.4-elfutils-head.patch ---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..163d790
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,28 @@
+*~
+#*
+*#
+.#*
+=*
+.glimpse_*
+autom4te.*
+*.o
+*.so
+*.a
+*.orig
+*.patch
+*.rej
+Makefile.in
+*/Makefile.in
+aclocal.m4
+INSTALL
+config.h.in
+config/config.guess
+config/config.sub
+config/depcomp
+config/install-sh
+config/missing
+config/ylwrap
+configure
+elfutils.spec
+*.pot
+libdw/known-dwarf.h
diff --git a/AUTHORS b/AUTHORS
index 29b776f..ef3c543 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,2 +1,4 @@
 For Now:
 Ulrich Drepper.
+Roland McGrath
+Petr Machata
diff --git a/ChangeLog b/ChangeLog
index fee15a4..c00ae18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,70 @@
+2009-09-21  Ulrich Drepper  <drepper at redhat.com>
+
+	* configure.ac: Update for more modern autoconf.
+
+2009-08-26  Roland McGrath  <roland at redhat.com>
+
+	* configure.ac (zip_LIBS): Check for liblzma too.
+
+2009-04-19  Roland McGrath  <roland at redhat.com>
+
+	* configure.ac (eu_version): Round down here, not in version.h macros.
+
+2009-04-17  Roland McGrath  <roland at redhat.com>
+
+	* configure.ac (eu_version): Compute number 1000 times larger,
+	let $PACKAGE_VERSION be x.y.z as well as x.y (implied x.y.0).
+
+2009-01-23  Roland McGrath  <roland at redhat.com>
+
+	* configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
+
+	* configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
+	building with compiler support but no working runtime support.
+
+2009-01-22  Ulrich Drepper  <drepper at redhat.com>
+
+	* Makefile.am (rpm): The tarball is now bzip2-compressed.
+
+2009-01-10  Ulrich Drepper  <drepper at redhat.com>
+
+	* configure.ac: Require gcc with TLS support.
+	Rename USE_TLS to USE_LOCKS.  The option is renamed to
+	--enable-thread-safety.
+
+2009-01-08  Roland McGrath  <roland at redhat.com>
+
+	* configure.ac (eu_ZIPLIB): Moved to m4/zip.am.
+
+2009-01-05  Roland McGrath  <roland at redhat.com>
+
+	* configure.ac (eu_ZIPLIB): New macro.
+	Use it to test for -lz, -lbz2, set .am ZLIB, BZLIB, zip_LIBS.
+
+2008-12-30  Ulrich Drepper  <drepper at redhat.com>
+
+	* configure.ac: We need automake 1.8 now.
+
+2008-12-24  Roland McGrath  <roland at redhat.com>
+
+	* configure.ac: Use automake flags dist-bzip2 no-dist-gzip,
+	distribute only in .tar.bz2 form now.
+
+2008-12-16  Roland McGrath  <roland at redhat.com>
+
+	* Makefile.am (pkginclude_HEADERS): New variable, install version.h.
+	* configure.ac: Create it, substituting @eu_version@ with
+	PACKAGE_VERSION canonicalized to four digits of decimal.
+
+2008-08-25  Roland McGrath  <roland at redhat.com>
+
+	* configure.ac (--enable-tls): Set AM_CONDITIONAL USE_TLS too.
+
+2008-08-21  Roland McGrath  <roland at redhat.com>
+
+	* configure.ac (AH_BOTTOM): Emit #include <eu-config.h> and
+	move the contents to lib/eu-config.h instead of keeping them here.
+
 2007-12-20  Ulrich Drepper  <drepper at redhat.com>
 
 	* configure.ac: Add support for --enable-debugpred.
diff --git a/Makefile.am b/Makefile.am
index 9306fe6..4decc55 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 ## Process this file with automake to create Makefile.in
 ## Configure input file for elfutils.
 ##
-## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
+## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006, 2008, 2009 Red Hat, Inc.
 ## This file is part of Red Hat elfutils.
 ##
 ## Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -27,6 +27,8 @@
 ##
 ACLOCAL_AMFLAGS = -I m4
 
+pkginclude_HEADERS = version.h
+
 # Add doc back when we have some real content.
 SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \
 	  src po tests
@@ -44,7 +46,7 @@ distcheck-hook:
 	chmod -R u+w $(distdir)
 
 rpm: dist
-	rpmbuild -ts --sign elfutils- at PACKAGE_VERSION@.tar.gz
+	rpmbuild -ts --sign elfutils- at PACKAGE_VERSION@.tar.bz2
 
 # Tell version 3.79 and up of GNU make to not build goals in this
 # directory in parallel.
diff --git a/NEWS b/NEWS
index 2c644dc..77ea4cb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,121 @@
+Version 0.145:
+
+Fix build with --disable-dependency-tracking.
+
+Fix build with most recent glibc headers.
+
+libelf: More robust to bogus section headers.
+
+libdw: Fix CFI decoding.
+
+libdwfl: Fix address bias returned by CFI accessors.
+	 Fix core file module layout identification.
+
+readelf: Fix CFI decoding.
+
+Version 0.144:
+
+libelf: New function elf_getphdrnum.
+	Now support using more than 65536 program headers in a file.
+
+libdw: New function dwarf_aggregate_size for computing (constant) type
+       sizes, including array_type cases with nontrivial calculation.
+
+readelf: Don't give errors for missing info under -a.
+	 Handle Linux "VMCOREINFO" notes under -n.
+
+Version 0.143:
+
+libdw: Various convenience functions for individual attributes now use
+       dwarf_attr_integrate to look up indirect inherited attributes.
+       Location expression handling now supports DW_OP_implicit_value.
+
+libdwfl: Support automatic decompression of files in XZ format,
+	 and of Linux kernel images made with bzip2 or LZMA (as well as gzip).
+
+Version 0.142:
+
+libelf: Add elf_getshdrnum alias for elf_getshnum and elf_getshdrstrndx alias
+        for elf_getshstrndx and deprecate original names.  Sun screwed up
+        their implementation and asked for a solution.
+
+libebl: Add support for STB_GNU_UNIQUE.
+
+elflint: Add support for STB_GNU_UNIQUE.
+
[...74960 lines suppressed...]
+unix 1
+__ELF__ 1
+__DECIMAL_BID_FORMAT__ 1
+macro2 ble
+EOF
+
+exit 0
diff --git a/tests/run-dwfl-addr-sect.sh b/tests/run-dwfl-addr-sect.sh
index 69280f5..f33a6e4 100755
--- a/tests/run-dwfl-addr-sect.sh
+++ b/tests/run-dwfl-addr-sect.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2007 Red Hat, Inc.
+# Copyright (C) 2007-2009 Red Hat, Inc.
 # This file is part of Red Hat elfutils.
 #
 # Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -25,13 +25,16 @@
 
 . $srcdir/test-subr.sh
 
-testfiles testfile43
+testfiles testfile43 testfile50
 
-export LC_ALL=C
 testrun_compare ./dwfl-addr-sect -e testfile43 0x64 0x8 0x98 <<\EOF
 address 0x64 => module "" section 4 + 0
 address 0x8 => module "" section 1 + 0x8
 address 0x98 => module "" section 7 + 0
 EOF
 
+testrun_compare ./dwfl-addr-sect -e testfile50 0x1 <<\EOF
+address 0x1 => module "" section 1 + 0x1
+EOF
+
 exit 0
diff --git a/tests/run-early-offscn.sh b/tests/run-early-offscn.sh
new file mode 100755
index 0000000..70be219
--- /dev/null
+++ b/tests/run-early-offscn.sh
@@ -0,0 +1,32 @@
+#! /bin/sh
+# Copyright (C) 2008 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>.
+
+. $srcdir/test-subr.sh
+
+testfiles testfile
+
+testrun ./early-offscn testfile 0x500
+
+exit 0
diff --git a/tests/run-strings-test.sh b/tests/run-strings-test.sh
index cfd9d23..a5dac63 100755
--- a/tests/run-strings-test.sh
+++ b/tests/run-strings-test.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006 Red Hat, Inc.
+# Copyright (C) 2005, 2006, 2008 Red Hat, Inc.
 # This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper at redhat.com>, 2005.
 #
@@ -29,9 +29,6 @@
 files="testfile `seq 2 9 | while read n; do echo testfile$n; done`"
 testfiles $files
 
-LC_ALL=C
-export LC_ALL
-
 testrun_compare ../src/strings -tx -f $files <<\EOF
 testfile:      f4 /lib/ld-linux.so.2
 testfile:     1c9 __gmon_start__
diff --git a/tests/run-strip-test.sh b/tests/run-strip-test.sh
index 480101e..e056f89 100755
--- a/tests/run-strip-test.sh
+++ b/tests/run-strip-test.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2002, 2003, 2005, 2007 Red Hat, Inc.
+# Copyright (C) 1999, 2000, 2002, 2003, 2005, 2007, 2008 Red Hat, Inc.
 # This file is part of Red Hat elfutils.
 # Written by Ulrich Drepper <drepper at redhat.com>, 1999.
 #
@@ -30,7 +30,8 @@ original=${original:-testfile11}
 stripped=${stripped:-testfile7}
 debugout=${debugfile:+-f testfile.debug.temp -F $debugfile}
 
-testfiles $original $stripped $debugfile
+testfiles $original
+test x$stripped = xtestfile.temp || testfiles $stripped $debugfile
 
 tempfiles testfile.temp testfile.debug.temp testfile.unstrip
 
@@ -56,4 +57,8 @@ testrun ../src/unstrip -o testfile.unstrip testfile.temp testfile.debug.temp
 testrun ../src/elfcmp --hash-inexact $original testfile.unstrip
 }
 
+tempfiles testfile.sections
+testrun ../src/readelf -S testfile.temp > testfile.sections || status=$?
+fgrep ' .debug_' testfile.sections && status=1
+
 exit $status
diff --git a/tests/run-strip-test8.sh b/tests/run-strip-test8.sh
new file mode 100755
index 0000000..fb9fa08
--- /dev/null
+++ b/tests/run-strip-test8.sh
@@ -0,0 +1,5 @@
+original=testfile47
+stripped=testfile48
+debugfile=testfile48.debug
+
+. $srcdir/run-strip-test.sh
diff --git a/tests/test-subr.sh b/tests/test-subr.sh
index 7fda05a..cb34b93 100644
--- a/tests/test-subr.sh
+++ b/tests/test-subr.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2007 Red Hat, Inc.
+# Copyright (C) 2005, 2007, 2008 Red Hat, Inc.
 # This file is part of Red Hat elfutils.
 #
 # Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -30,6 +30,9 @@
 
 set -e
 
+#LC_ALL=C
+#export LC_ALL
+
 remove_files=
 trap 'rm -f $remove_files' 0
 
diff --git a/tests/testfile16.bz2 b/tests/testfile16.bz2
index 909e225..4d7160c 100644
Binary files a/tests/testfile16.bz2 and b/tests/testfile16.bz2 differ
diff --git a/tests/testfile16.debug.bz2 b/tests/testfile16.debug.bz2
index 48d651f..f02a972 100644
Binary files a/tests/testfile16.debug.bz2 and b/tests/testfile16.debug.bz2 differ
diff --git a/tests/testfile44.S.bz2 b/tests/testfile44.S.bz2
index cbd0da3..4e87434 100644
Binary files a/tests/testfile44.S.bz2 and b/tests/testfile44.S.bz2 differ
diff --git a/tests/testfile44.expect.bz2 b/tests/testfile44.expect.bz2
index 2347aea..b3937b9 100644
Binary files a/tests/testfile44.expect.bz2 and b/tests/testfile44.expect.bz2 differ
diff --git a/tests/testfile45.S.bz2 b/tests/testfile45.S.bz2
index 91b4795..00e819e 100644
Binary files a/tests/testfile45.S.bz2 and b/tests/testfile45.S.bz2 differ
diff --git a/tests/testfile45.expect.bz2 b/tests/testfile45.expect.bz2
index 06b4d9b..b8b33e9 100644
Binary files a/tests/testfile45.expect.bz2 and b/tests/testfile45.expect.bz2 differ
diff --git a/tests/testfile47.bz2 b/tests/testfile47.bz2
new file mode 100644
index 0000000..334bd6c
Binary files /dev/null and b/tests/testfile47.bz2 differ
diff --git a/tests/testfile48.bz2 b/tests/testfile48.bz2
new file mode 100644
index 0000000..da0d9da
Binary files /dev/null and b/tests/testfile48.bz2 differ
diff --git a/tests/testfile48.debug.bz2 b/tests/testfile48.debug.bz2
new file mode 100644
index 0000000..7b84c4c
Binary files /dev/null and b/tests/testfile48.debug.bz2 differ
diff --git a/tests/testfile49.bz2 b/tests/testfile49.bz2
new file mode 100644
index 0000000..8741a6b
Binary files /dev/null and b/tests/testfile49.bz2 differ
diff --git a/tests/testfile50.bz2 b/tests/testfile50.bz2
new file mode 100644
index 0000000..fce4332
Binary files /dev/null and b/tests/testfile50.bz2 differ
diff --git a/tests/testfile51.bz2 b/tests/testfile51.bz2
new file mode 100755
index 0000000..5ff45c6
Binary files /dev/null and b/tests/testfile51.bz2 differ

frysk-0.4-elfutils-ldadd.patch:
 frysk-core/Makefile.am          |    2 ++
 frysk-gtk/Makefile.am           |    2 ++
 frysk-gui/Makefile.am           |    2 ++
 frysk-imports/tests/Makefile.am |    3 ++-
 frysk-sys/Makefile.am           |    2 ++
 5 files changed, 10 insertions(+), 1 deletion(-)

--- NEW FILE frysk-0.4-elfutils-ldadd.patch ---
diff -up frysk-0.4/frysk-core/Makefile.am.elfutilsin frysk-0.4/frysk-core/Makefile.am
--- frysk-0.4/frysk-core/Makefile.am.elfutilsin	2010-03-23 21:33:19.000000000 -0400
+++ frysk-0.4/frysk-core/Makefile.am	2010-03-23 21:33:20.000000000 -0400
@@ -68,6 +68,8 @@ GEN_GCJ_LDADD_LIST += -lstdc++
 # Stub bfd_getb32 and bfd_getl32 for PPC64.  Unconditionally
 # link -lbfd_get just for simplification.
 GEN_GCJ_LDADD_LIST += -laudit
+GEN_GCJ_LDADD_LIST += -lbz2
+GEN_GCJ_LDADD_LIST += -lz
 
 # For TestExec.java
 pkglib_PROGRAMS += frysk/pkglibdir/funit-exec-alias
diff -up frysk-0.4/frysk-gtk/Makefile.am.elfutilsin frysk-0.4/frysk-gtk/Makefile.am
--- frysk-0.4/frysk-gtk/Makefile.am.elfutilsin	2010-03-23 21:44:42.000000000 -0400
+++ frysk-0.4/frysk-gtk/Makefile.am	2010-03-23 21:45:02.000000000 -0400
@@ -64,6 +64,8 @@ GEN_GCJ_LDADD_LIST += \
 GEN_GCJ_LDADD_LIST += -lstdc++
 # For auditing
 GEN_GCJ_LDADD_LIST += -laudit
+GEN_GCJ_LDADD_LIST += -lbz2
+GEN_GCJ_LDADD_LIST += -lz
 
 # Hack, need to compile this entire sub-tree with JNI.
 AM_GCJFLAGS += -fjni 
diff -up frysk-0.4/frysk-gui/Makefile.am.elfutilsin frysk-0.4/frysk-gui/Makefile.am
--- frysk-0.4/frysk-gui/Makefile.am.elfutilsin	2008-06-09 14:03:07.000000000 -0400
+++ frysk-0.4/frysk-gui/Makefile.am	2010-03-23 21:33:20.000000000 -0400
@@ -77,6 +77,8 @@ GEN_GCJ_LDADD_LIST += -L../frysk-gtk/Egg
 GEN_GCJ_LDADD_LIST += -L../frysk-gtk/tlwidgets
 GEN_GCJ_LDADD_LIST += $(FRYSK_GUI_LIBS)
 GEN_GCJ_LDADD_LIST += -laudit
+GEN_GCJ_LDADD_LIST += -lbz2
+GEN_GCJ_LDADD_LIST += -lz
 
 # Skip the JUnit tests (exit with status 77) when there is no display; bug #3012.
 #TESTS_ENVIRONMENT = ( test $$tst != TestRunner || test -n "$$DISPLAY" || exit 77 ) && 
diff -up frysk-0.4/frysk-imports/tests/Makefile.am.elfutilsin frysk-0.4/frysk-imports/tests/Makefile.am
--- frysk-0.4/frysk-imports/tests/Makefile.am.elfutilsin	2008-06-09 14:03:07.000000000 -0400
+++ frysk-0.4/frysk-imports/tests/Makefile.am	2010-03-23 21:33:20.000000000 -0400
@@ -491,5 +491,6 @@ frysk4796_dwfltest_CFLAGS = -I$(top_srcd
 frysk4796_dwfltest_LDADD = -ldl $(top_builddir)/elfutils/libasm/libasm.a \
 $(top_builddir)/elfutils/libdw/libdw.a \
 $(top_builddir)/elfutils/libebl/libebl.a \
-$(top_builddir)/elfutils/libelf/libelf.a
+$(top_builddir)/elfutils/libelf/libelf.a \
+-lz -lbz2
 systests_PASS_PROGRAM += frysk4796/dwfltest
diff -up frysk-0.4/frysk-sys/Makefile.am.elfutilsin frysk-0.4/frysk-sys/Makefile.am
--- frysk-0.4/frysk-sys/Makefile.am.elfutilsin	2008-06-09 14:03:07.000000000 -0400
+++ frysk-0.4/frysk-sys/Makefile.am	2010-03-23 21:33:20.000000000 -0400
@@ -65,6 +65,8 @@ GEN_GCJ_LDADD_LIST += ../frysk-imports/l
                  ../frysk-imports/libunwind-ppc64/src/.libs/libunwind-ppc64.a
 endif
 GEN_GCJ_LDADD_LIST += -lstdc++ -laudit
+GEN_GCJ_LDADD_LIST += -lbz2
+GEN_GCJ_LDADD_LIST += -lz
 
 # Force a few dependencies
 lib/unwind/cni/Unwind%.cxx: lib/unwind/Unwind%.java lib/unwind/cni/UnwindH.hxx

frysk-0.4-elfutils-louser.patch:
 DwOp.shenum |    2 ++
 1 file changed, 2 insertions(+)

--- NEW FILE frysk-0.4-elfutils-louser.patch ---
diff -up frysk-0.4/frysk-sys/lib/dwfl/DwOp.shenum.elfutilsin frysk-0.4/frysk-sys/lib/dwfl/DwOp.shenum
--- frysk-0.4/frysk-sys/lib/dwfl/DwOp.shenum.elfutilsin	2008-06-09 14:03:07.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/DwOp.shenum	2010-03-23 21:33:20.000000000 -0400
@@ -43,6 +43,8 @@
 
 CC=${CC:-gcc}
 $CC -dD -E $(dirname $0)/../../../frysk-imports/elfutils/libdw/dwarf.h | awk '
+    /lo_user/ { next }
+    /hi_user/ { next }
     /DW_OP_.* = / {
 	p = $1
 	v = gensub(",","","",$3)

frysk-0.4-elfutils-maphack.patch:
 Makefile.rules |    1 +
 1 file changed, 1 insertion(+)

--- NEW FILE frysk-0.4-elfutils-maphack.patch ---
diff -up frysk-0.4/frysk-common/Makefile.rules.elfutils-maphack frysk-0.4/frysk-common/Makefile.rules
--- frysk-0.4/frysk-common/Makefile.rules.elfutils-maphack	2010-03-25 16:11:21.000000000 -0400
+++ frysk-0.4/frysk-common/Makefile.rules	2010-03-25 16:12:05.000000000 -0400
@@ -477,6 +477,7 @@ lib$(GEN_DIRNAME)-jni.so: $(JNI_ARCHIVE_
 lib$(GEN_DIRNAME)-jni.so: lib$(GEN_DIRNAME)-jni.a
 	soname=`basename $@` ; \
 	$(CC) -shared -o $@.tmp \
+	        -Wl,--version-script,$(top_srcdir)/../frysk-imports/elfutils/libdw/libdw.map \
 		-Wl,--whole-archive \
 		-Wl,$< \
 		$(JNI_ARCHIVE_LIST:%=-Wl,%) \

frysk-0.4-elfutils-offt.patch:
 elf_getdata_rawchunk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE frysk-0.4-elfutils-offt.patch ---
2008-03-13  Tim Moore  <timoore at redhat.com>

	* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Cast offset and
	size computation to uint64_t.

diff --git b/libelf/elf_getdata_rawchunk.c a/libelf/elf_getdata_rawchunk.c
index 1b1b003..bea0f3f 100644
--- b/libelf/elf_getdata_rawchunk.c
+++ a/libelf/elf_getdata_rawchunk.c
@@ -79,7 +79,7 @@ elf_getdata_rawchunk (elf, offset, size, type)
     }
 
   if (unlikely (size > elf->maximum_size
-		|| (off64_t) (elf->maximum_size - size) < offset))
+		|| (uint64_t)(elf->maximum_size - size) < (uint64_t)offset))
     {
       /* Invalid request.  */
       __libelf_seterrno (ELF_E_INVALID_OP);

frysk-0.4-elfutils-rpmout.patch:
 ../base/frysk/frysk-imports/elfutils/INSTALL                           |only
 ../base/frysk/frysk-imports/elfutils/Makefile.in                       |only
 ../base/frysk/frysk-imports/elfutils/aclocal.m4                        |only
 ../base/frysk/frysk-imports/elfutils/autom4te.cache                    |only
 ../base/frysk/frysk-imports/elfutils/backends/Makefile.in              |only
 ../base/frysk/frysk-imports/elfutils/config.h.in                       |only
 ../base/frysk/frysk-imports/elfutils/config/Makefile.in                |only
 ../base/frysk/frysk-imports/elfutils/config/config.guess               |only
 ../base/frysk/frysk-imports/elfutils/config/config.sub                 |only
 ../base/frysk/frysk-imports/elfutils/config/depcomp                    |only
 ../base/frysk/frysk-imports/elfutils/config/install-sh                 |only
 ../base/frysk/frysk-imports/elfutils/config/missing                    |only
 ../base/frysk/frysk-imports/elfutils/config/ylwrap                     |only
 ../base/frysk/frysk-imports/elfutils/configure                         |only
 ../base/frysk/frysk-imports/elfutils/debugfiles.list                   |only
 ../base/frysk/frysk-imports/elfutils/debuglinks.list                   |only
 ../base/frysk/frysk-imports/elfutils/debugsources.list                 |only
 ../base/frysk/frysk-imports/elfutils/elfutils.spec                     |only
 ../base/frysk/frysk-imports/elfutils/lib/Makefile.in                   |only
 ../base/frysk/frysk-imports/elfutils/libasm/Makefile.in                |only
 ../base/frysk/frysk-imports/elfutils/libcpu/Makefile.in                |only
 ../base/frysk/frysk-imports/elfutils/libcpu/i386_lex.c                 |only
 ../base/frysk/frysk-imports/elfutils/libcpu/i386_parse.c               |only
 ../base/frysk/frysk-imports/elfutils/libcpu/i386_parse.h               |only
 ../base/frysk/frysk-imports/elfutils/libdw/Makefile.in                 |only
 ../base/frysk/frysk-imports/elfutils/libdwfl/Makefile.in               |only
 ../base/frysk/frysk-imports/elfutils/libebl/Makefile.in                |only
 ../base/frysk/frysk-imports/elfutils/libelf/Makefile.in                |only
 ../base/frysk/frysk-imports/elfutils/m4/Makefile.in                    |only
 ../base/frysk/frysk-imports/elfutils/po/elfutils.pot                   |only
 ../base/frysk/frysk-imports/elfutils/po/stamp-po                       |only
 ../base/frysk/frysk-imports/elfutils/src/Makefile.in                   |only
 ../base/frysk/frysk-imports/elfutils/src/elflint.c.orig                |only
 ../base/frysk/frysk-imports/elfutils/src/ldlex.c                       |only
 ../base/frysk/frysk-imports/elfutils/src/ldscript.c                    |only
 ../base/frysk/frysk-imports/elfutils/src/ldscript.h                    |only
 ../base/frysk/frysk-imports/elfutils/src/readelf.c.orig                |only
 ../base/frysk/frysk-imports/elfutils/src/strip.c.orig                  |only
 ../base/frysk/frysk-imports/elfutils/tests/Makefile.in                 |only
 ../base/frysk/frysk-imports/elfutils/tests/testfile16.symtab.bz2       |only
 ../base/frysk/frysk-imports/elfutils/tests/testfile16.symtab.debug.bz2 |only
 ./.cvsignore                                                           |only
 ./.git                                                                 |only
 ./.mtn-ignore                                                          |only
 ./config/.cvsignore                                                    |only
 ./doc                                                                  |only
 ./lib/.cvsignore                                                       |only
 ./lib/xstrdup.c                                                        |only
 ./libasm/.cvsignore                                                    |only
 ./libcpu/.cvsignore                                                    |only
 ./libcpu/defs/i386.doc                                                 |only
 ./libdw/.cvsignore                                                     |only
 ./libdwarf                                                             |only
 ./libdwfl/.cvsignore                                                   |only
 ./libebl/.cvsignore                                                    |only
 ./libelf/.cvsignore                                                    |only
 ./libelf/elf32_getphdr.c                                               |   10 
 ./libelf/elf32_getshdr.c                                               |   13 
 ./libelf/elf32_newphdr.c                                               |    6 
 ./libelf/elf32_updatefile.c                                            |    7 
 ./libelf/elf_begin.c                                                   |   46 --
 ./libelf/elf_getarsym.c                                                |    3 
 ./libelf/elf_getshstrndx.c                                             |   38 --
 ./libelf/elf_newscn.c                                                  |   10 
 ./libelf/gelf_getdyn.c                                                 |    6 
 ./libelf/gelf_getlib.c                                                 |    3 
 ./libelf/gelf_getmove.c                                                |    3 
 ./libelf/gelf_getrel.c                                                 |   12 
 ./libelf/gelf_getrela.c                                                |   12 
 ./libelf/gelf_getsym.c                                                 |    6 
 ./libelf/gelf_getsyminfo.c                                             |    3 
 ./libelf/gelf_getsymshndx.c                                            |   10 
 ./libelf/gelf_getversym.c                                              |    3 
 ./libelf/gelf_update_dyn.c                                             |   12 
 ./libelf/gelf_update_lib.c                                             |    9 
 ./libelf/gelf_update_move.c                                            |    2 
 ./libelf/gelf_update_rel.c                                             |   12 
 ./libelf/gelf_update_rela.c                                            |   12 
 ./libelf/gelf_update_sym.c                                             |   12 
 ./libelf/gelf_update_syminfo.c                                         |    9 
 ./libelf/gelf_update_symshndx.c                                        |   12 
 ./libelf/gelf_update_versym.c                                          |    2 
 ./libelf/libelfP.h                                                     |    9 
 ./m4/.cvsignore                                                        |only
 ./po/.cvsignore                                                        |only
 ./src/.cvsignore                                                       |only
 ./src/elflint.c                                                        |  101 +----
 ./src/readelf.c                                                        |   92 +----
 ./src/strip.c                                                          |  171 ++--------
 ./tests/.cvsignore                                                     |only
 ./tests/configure.ac                                                   |only
 ./tests/run-strip-test5.sh                                             |    4 
 ./tests/show-ciefde.c                                                  |only
 93 files changed, 183 insertions(+), 467 deletions(-)

--- NEW FILE frysk-0.4-elfutils-rpmout.patch ---
Only in ../base/frysk/frysk-imports/elfutils: aclocal.m4
Only in ../base/frysk/frysk-imports/elfutils: autom4te.cache
Only in ../base/frysk/frysk-imports/elfutils/backends: Makefile.in
Only in ../base/frysk/frysk-imports/elfutils/config: config.guess
Only in ../base/frysk/frysk-imports/elfutils/config: config.sub
Only in ./config: .cvsignore
Only in ../base/frysk/frysk-imports/elfutils/config: depcomp
Only in ../base/frysk/frysk-imports/elfutils/config: install-sh
Only in ../base/frysk/frysk-imports/elfutils/config: Makefile.in
Only in ../base/frysk/frysk-imports/elfutils/config: missing
Only in ../base/frysk/frysk-imports/elfutils/config: ylwrap
Only in ../base/frysk/frysk-imports/elfutils: config.h.in
Only in ../base/frysk/frysk-imports/elfutils: configure
Only in .: .cvsignore
Only in ../base/frysk/frysk-imports/elfutils: debugfiles.list
Only in ../base/frysk/frysk-imports/elfutils: debuglinks.list
Only in ../base/frysk/frysk-imports/elfutils: debugsources.list
Only in .: doc
Only in ../base/frysk/frysk-imports/elfutils: elfutils.spec
Only in .: .git
Only in ../base/frysk/frysk-imports/elfutils: INSTALL
Only in ./lib: .cvsignore
Only in ../base/frysk/frysk-imports/elfutils/lib: Makefile.in
Only in ./lib: xstrdup.c
Only in ./libasm: .cvsignore
Only in ../base/frysk/frysk-imports/elfutils/libasm: Makefile.in
Only in ./libcpu: .cvsignore
Only in ./libcpu/defs: i386.doc
Only in ../base/frysk/frysk-imports/elfutils/libcpu: i386_lex.c
Only in ../base/frysk/frysk-imports/elfutils/libcpu: i386_parse.c
Only in ../base/frysk/frysk-imports/elfutils/libcpu: i386_parse.h
Only in ../base/frysk/frysk-imports/elfutils/libcpu: Makefile.in
Only in ./libdw: .cvsignore
Only in ../base/frysk/frysk-imports/elfutils/libdw: Makefile.in
Only in .: libdwarf
Only in ./libdwfl: .cvsignore
Only in ../base/frysk/frysk-imports/elfutils/libdwfl: Makefile.in
Only in ./libebl: .cvsignore
Only in ../base/frysk/frysk-imports/elfutils/libebl: Makefile.in
Only in ./libelf: .cvsignore
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/elf32_getphdr.c ./libelf/elf32_getphdr.c
--- ../base/frysk/frysk-imports/elfutils/libelf/elf32_getphdr.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/elf32_getphdr.c	2010-03-25 14:41:45.000000000 -0400
@@ -116,16 +116,6 @@
 
       if (elf->map_address != NULL)
 	{
-	  /* First see whether the information in the ELF header is
-	     valid and it does not ask for too much.  */
-	  if (unlikely (ehdr->e_phoff >= elf->maximum_size)
-	      || unlikely (ehdr->e_phoff + size > elf->maximum_size))
-	    {
-	      /* Something is wrong.  */
-	      __libelf_seterrno (ELF_E_INVALID_PHDR);
-	      goto out;
-	    }
-
 	  /* All the data is already mapped.  Use it.  */
 	  void *file_phdr = ((char *) elf->map_address
 			     + elf->start_offset + ehdr->e_phoff);
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/elf32_getshdr.c ./libelf/elf32_getshdr.c
--- ../base/frysk/frysk-imports/elfutils/libelf/elf32_getshdr.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/elf32_getshdr.c	2010-03-25 14:41:45.000000000 -0400
@@ -101,8 +101,7 @@
 	goto out;
 
       size_t shnum;
-      if (INTUSE (elf_getshnum) (elf, &shnum) != 0
-	  || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr)))
+      if (INTUSE (elf_getshnum) (elf, &shnum) != 0)
 	goto out;
       size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr));
 
@@ -119,16 +118,6 @@
 
       if (elf->map_address != NULL)
 	{
-	  /* First see whether the information in the ELF header is
-	     valid and it does not ask for too much.  */
-	  if (unlikely (ehdr->e_shoff >= elf->maximum_size)
-	      || unlikely (ehdr->e_shoff + size > elf->maximum_size))
-	    {
-	      /* Something is wrong.  */
-	      __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-	      goto free_and_out;
-	    }
-
 	  ElfW2(LIBELFBITS,Shdr) *notcvt;
 
 	  /* All the data is already mapped.  If we could use it
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/elf32_newphdr.c ./libelf/elf32_newphdr.c
--- ../base/frysk/frysk-imports/elfutils/libelf/elf32_newphdr.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/elf32_newphdr.c	2010-03-25 14:41:45.000000000 -0400
@@ -124,12 +124,6 @@
   else if (elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phnum != count
 	   || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL)
     {
-      if (unlikely (count > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr))))
-	{
-	  result = NULL;
-	  goto out;
-	}
-
       /* Allocate a new program header with the appropriate number of
 	 elements.  */
       result = (ElfW2(LIBELFBITS,Phdr) *)
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/elf32_updatefile.c ./libelf/elf32_updatefile.c
--- ../base/frysk/frysk-imports/elfutils/libelf/elf32_updatefile.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/elf32_updatefile.c	2010-03-25 14:41:45.000000000 -0400
@@ -212,9 +212,6 @@
   /* Write all the sections.  Well, only those which are modified.  */
   if (shnum > 0)
     {
-      if (unlikely (shnum > SIZE_MAX / sizeof (Elf_Scn *)))
- 	return 1;
-
       Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns;
       Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *));
       char *const shdr_start = ((char *) elf->map_address + elf->start_offset
@@ -585,10 +582,6 @@
   /* Write all the sections.  Well, only those which are modified.  */
   if (shnum > 0)
     {
-      if (unlikely (shnum > SIZE_MAX / (sizeof (Elf_Scn *)
-					+ sizeof (ElfW2(LIBELFBITS,Shdr)))))
-	return 1;
-
       off_t shdr_offset = elf->start_offset + ehdr->e_shoff;
 #if EV_NUM != 2
       xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR];
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/elf_begin.c ./libelf/elf_begin.c
--- ../base/frysk/frysk-imports/elfutils/libelf/elf_begin.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/elf_begin.c	2010-03-25 14:41:45.000000000 -0400
@@ -155,8 +155,7 @@
 
       if (unlikely (result == 0) && ehdr.e32->e_shoff != 0)
 	{
-	  if (unlikely (ehdr.e32->e_shoff >= maxsize)
-	      || unlikely (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize))
+	  if (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize)
 	    /* Cannot read the first section header.  */
 	    return 0;
 
@@ -204,8 +203,7 @@
 
       if (unlikely (result == 0) && ehdr.e64->e_shoff != 0)
 	{
-	  if (unlikely (ehdr.e64->e_shoff >= maxsize)
-	      || unlikely (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize))
+	  if (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)
 	    /* Cannot read the first section header.  */
 	    return 0;
 
@@ -277,15 +275,6 @@
     /* Could not determine the number of sections.  */
     return NULL;
 
-  /* Check for too many sections.  */
-  if (e_ident[EI_CLASS] == ELFCLASS32)
-    {
-      if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf32_Shdr)))
-	return NULL;
-    }
-  else if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf64_Shdr)))
-    return NULL;
-
   /* We can now allocate the memory.  */
   Elf *elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent,
 			   ELF_K_ELF, scncnt * sizeof (Elf_Scn));
@@ -319,31 +308,13 @@
 	{
 	  /* We can use the mmapped memory.  */
 	  elf->state.elf32.ehdr = ehdr;
-
-	  if (unlikely (ehdr->e_shoff >= maxsize)
-	      || unlikely (ehdr->e_shoff
-			   + scncnt * sizeof (Elf32_Shdr) > maxsize))
-	    {
-	    free_and_out:
-	      free (elf);
-	      __libelf_seterrno (ELF_E_INVALID_FILE);
-	      return NULL;
-	    }
 	  elf->state.elf32.shdr
 	    = (Elf32_Shdr *) ((char *) ehdr + ehdr->e_shoff);
-
 	  if (ehdr->e_phnum > 0)
-	    {
 	    /* Assign a value only if there really is a program
 	       header.  Otherwise the value remains NULL.  */
-	      if (unlikely (ehdr->e_phoff >= maxsize)
-		  || unlikely (ehdr->e_phoff
-			       + ehdr->e_phnum
-			       * sizeof (Elf32_Phdr) > maxsize))
-		goto free_and_out;
 	    elf->state.elf32.phdr
 	      = (Elf32_Phdr *) ((char *) ehdr + ehdr->e_phoff);
-	    }
 
 	  for (size_t cnt = 0; cnt < scncnt; ++cnt)
 	    {
@@ -425,26 +396,13 @@
 	{
 	  /* We can use the mmapped memory.  */
 	  elf->state.elf64.ehdr = ehdr;
-
-	  if (unlikely (ehdr->e_shoff >= maxsize)
-	      || unlikely (ehdr->e_shoff
-			   + scncnt * sizeof (Elf32_Shdr) > maxsize))
-	    goto free_and_out;
 	  elf->state.elf64.shdr
 	    = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff);
-
 	  if (ehdr->e_phnum > 0)
-	    {
 	    /* Assign a value only if there really is a program
 	       header.  Otherwise the value remains NULL.  */
-	      if (unlikely (ehdr->e_phoff >= maxsize)
-		  || unlikely (ehdr->e_phoff
-			       + ehdr->e_phnum
-			       * sizeof (Elf32_Phdr) > maxsize))
-		goto free_and_out;
 	    elf->state.elf64.phdr
 	      = (Elf64_Phdr *) ((char *) ehdr + ehdr->e_phoff);
-	    }
 
 	  for (size_t cnt = 0; cnt < scncnt; ++cnt)
 	    {
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/elf_getarsym.c ./libelf/elf_getarsym.c
--- ../base/frysk/frysk-imports/elfutils/libelf/elf_getarsym.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/elf_getarsym.c	2010-03-17 16:06:09.000000000 -0400
@@ -179,9 +179,6 @@
       size_t index_size = atol (tmpbuf);
 
       if (SARMAG + sizeof (struct ar_hdr) + index_size > elf->maximum_size
-#if SIZE_MAX <= 4294967295U
-	  || n >= SIZE_MAX / sizeof (Elf_Arsym)
-#endif
 	  || n * sizeof (uint32_t) > index_size)
 	{
 	  /* This index table cannot be right since it does not fit into
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/elf_getshstrndx.c ./libelf/elf_getshstrndx.c
--- ../base/frysk/frysk-imports/elfutils/libelf/elf_getshstrndx.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/elf_getshstrndx.c	2010-03-25 14:41:45.000000000 -0400
@@ -125,25 +125,10 @@
 	      if (elf->map_address != NULL
 		  && elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA
 		  && (ALLOW_UNALIGNED
-		      || (((size_t) ((char *) elf->map_address
-			   + elf->start_offset + offset))
+		      || (((size_t) ((char *) elf->map_address + offset))
 			  & (__alignof__ (Elf32_Shdr) - 1)) == 0))
-		{
-		  /* First see whether the information in the ELF header is
-		     valid and it does not ask for too much.  */
-		  if (unlikely (offset + sizeof (Elf32_Shdr)
-				> elf->maximum_size))
-		    {
-		      /* Something is wrong.  */
-		      __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-		      result = -1;
-		      goto out;
-		    }
-
 		/* We can directly access the memory.  */
-		  num = ((Elf32_Shdr *) (elf->map_address + elf->start_offset
-					 + offset))->sh_link;
-		}
+		num = ((Elf32_Shdr *) (elf->map_address + offset))->sh_link;
 	      else
 		{
 		  /* We avoid reading in all the section headers.  Just read
@@ -178,25 +163,10 @@
 	      if (elf->map_address != NULL
 		  && elf->state.elf64.ehdr->e_ident[EI_DATA] == MY_ELFDATA
 		  && (ALLOW_UNALIGNED
-		      || (((size_t) ((char *) elf->map_address
-			   + elf->start_offset + offset))
+		      || (((size_t) ((char *) elf->map_address + offset))
 			  & (__alignof__ (Elf64_Shdr) - 1)) == 0))
-		{
-		  /* First see whether the information in the ELF header is
-		     valid and it does not ask for too much.  */
-		  if (unlikely (offset + sizeof (Elf64_Shdr)
-				> elf->maximum_size))
-		    {
-		      /* Something is wrong.  */
-		      __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER);
-		      result = -1;
-		      goto out;
-		    }
-
 		/* We can directly access the memory.  */
-		  num = ((Elf64_Shdr *) (elf->map_address
-			 + elf->start_offset + offset))->sh_link;
-		}
+		num = ((Elf64_Shdr *) (elf->map_address + offset))->sh_link;
 	      else
 		{
 		  /* We avoid reading in all the section headers.  Just read
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/elf_newscn.c ./libelf/elf_newscn.c
--- ../base/frysk/frysk-imports/elfutils/libelf/elf_newscn.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/elf_newscn.c	2010-03-17 16:06:09.000000000 -0400
@@ -104,18 +104,10 @@
   else
     {
       /* We must allocate a new element.  */
-      Elf_ScnList *newp = NULL;
+      Elf_ScnList *newp;
 
       assert (elf->state.elf.scnincr > 0);
 
-      if (
-#if SIZE_MAX <= 4294967295U
-	  likely (elf->state.elf.scnincr
-		  < SIZE_MAX / 2 / sizeof (Elf_Scn) - sizeof (Elf_ScnList))
-#else
-	  1
-#endif
-	  )
       newp = (Elf_ScnList *) calloc (sizeof (Elf_ScnList)
 				     + ((elf->state.elf.scnincr *= 2)
 					* sizeof (Elf_Scn)), 1);
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_getdyn.c ./libelf/gelf_getdyn.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_getdyn.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_getdyn.c	2010-03-17 16:06:09.000000000 -0400
@@ -93,8 +93,7 @@
 	 table entries has to be adopted.  The user better has provided
 	 a buffer where we can store the information.  While copying the
 	 data we are converting the format.  */
-      if (INVALID_NDX (ndx, Elf32_Dyn)
-	  || unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
@@ -115,8 +114,7 @@
 
       /* The data is already in the correct form.  Just make sure the
 	 index is OK.  */
-      if (INVALID_NDX (ndx, GElf_Dyn)
-	  || unlikely ((ndx + 1) * sizeof (GElf_Dyn) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (GElf_Dyn) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_getlib.c ./libelf/gelf_getlib.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_getlib.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_getlib.c	2010-03-17 16:06:09.000000000 -0400
@@ -86,8 +86,7 @@
   /* The data is already in the correct form.  Just make sure the
      index is OK.  */
   GElf_Lib *result = NULL;
-  if (INVALID_NDX (ndx, GElf_Lib)
-      || unlikely ((ndx + 1) * sizeof (GElf_Lib) > data->d_size))
+  if (unlikely ((ndx + 1) * sizeof (GElf_Lib) > data->d_size))
     __libelf_seterrno (ELF_E_INVALID_INDEX);
   else
     {
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_getmove.c ./libelf/gelf_getmove.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_getmove.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_getmove.c	2010-03-17 16:06:09.000000000 -0400
@@ -83,8 +83,7 @@
 
   /* The data is already in the correct form.  Just make sure the
      index is OK.  */
-  if (INVALID_NDX (ndx, GElf_Move)
-      || unlikely ((ndx + 1) * sizeof (GElf_Move) > data->d_size))
+  if (unlikely ((ndx + 1) * sizeof (GElf_Move) > data->d_size))
     {
       __libelf_seterrno (ELF_E_INVALID_INDEX);
       goto out;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_getrela.c ./libelf/gelf_getrela.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_getrela.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_getrela.c	2010-03-17 16:06:09.000000000 -0400
@@ -71,6 +71,12 @@
   if (data_scn == NULL)
     return NULL;
 
+  if (unlikely (ndx < 0))
+    {
+      __libelf_seterrno (ELF_E_INVALID_INDEX);
+      return NULL;
+    }
+
   if (unlikely (data_scn->d.d_type != ELF_T_RELA))
     {
       __libelf_seterrno (ELF_E_INVALID_HANDLE);
@@ -87,8 +93,7 @@
   if (scn->elf->class == ELFCLASS32)
     {
       /* We have to convert the data.  */
-      if (INVALID_NDX (ndx, Elf32_Rela)
-	  || unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  result = NULL;
@@ -109,8 +114,7 @@
     {
       /* Simply copy the data after we made sure we are actually getting
 	 correct data.  */
-      if (INVALID_NDX (ndx, Elf64_Rela)
-	  || unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  result = NULL;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_getrel.c ./libelf/gelf_getrel.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_getrel.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_getrel.c	2010-03-17 16:06:09.000000000 -0400
@@ -71,6 +71,12 @@
   if (data_scn == NULL)
     return NULL;
 
+  if (unlikely (ndx < 0))
+    {
+      __libelf_seterrno (ELF_E_INVALID_INDEX);
+      return NULL;
+    }
+
   if (unlikely (data_scn->d.d_type != ELF_T_REL))
     {
       __libelf_seterrno (ELF_E_INVALID_HANDLE);
@@ -87,8 +93,7 @@
   if (scn->elf->class == ELFCLASS32)
     {
       /* We have to convert the data.  */
-      if (INVALID_NDX (ndx, Elf32_Rel)
-	  || unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  result = NULL;
@@ -108,8 +113,7 @@
     {
       /* Simply copy the data after we made sure we are actually getting
 	 correct data.  */
-      if (INVALID_NDX (ndx, Elf64_Rel)
-	  || unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  result = NULL;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_getsym.c ./libelf/gelf_getsym.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_getsym.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_getsym.c	2010-03-17 16:06:09.000000000 -0400
@@ -90,8 +90,7 @@
 	 table entries has to be adopted.  The user better has provided
 	 a buffer where we can store the information.  While copying the
 	 data we are converting the format.  */
-      if (INVALID_NDX (ndx, Elf32_Sym)
-	  || unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data->d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data->d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
@@ -120,8 +119,7 @@
 
       /* The data is already in the correct form.  Just make sure the
 	 index is OK.  */
-      if (INVALID_NDX (ndx, GElf_Sym)
-	  || unlikely ((ndx + 1) * sizeof (GElf_Sym) > data->d_size))
+      if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > data->d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_getsyminfo.c ./libelf/gelf_getsyminfo.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_getsyminfo.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_getsyminfo.c	2010-03-17 16:06:09.000000000 -0400
@@ -84,8 +84,7 @@
 
   /* The data is already in the correct form.  Just make sure the
      index is OK.  */
-  if (INVALID_NDX (ndx, GElf_Syminfo)
-      || unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data->d_size))
+  if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data->d_size))
     {
       __libelf_seterrno (ELF_E_INVALID_INDEX);
       goto out;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_getsymshndx.c ./libelf/gelf_getsymshndx.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_getsymshndx.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_getsymshndx.c	2010-03-17 16:06:09.000000000 -0400
@@ -90,9 +90,7 @@
      section index table.  */
   if (likely (shndxdata_scn != NULL))
     {
-      if (INVALID_NDX (ndx, Elf32_Word)
-	  || unlikely ((ndx + 1) * sizeof (Elf32_Word)
-		       > shndxdata_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf32_Word) > shndxdata_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
@@ -112,8 +110,7 @@
 	 table entries has to be adopted.  The user better has provided
 	 a buffer where we can store the information.  While copying the
 	 data we are converting the format.  */
-      if (INVALID_NDX (ndx, Elf32_Sym)
-	  || unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata->d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata->d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
@@ -142,8 +139,7 @@
 
       /* The data is already in the correct form.  Just make sure the
 	 index is OK.  */
-      if (INVALID_NDX (ndx, GElf_Sym)
-	  || unlikely ((ndx + 1) * sizeof (GElf_Sym) > symdata->d_size))
+      if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > symdata->d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_getversym.c ./libelf/gelf_getversym.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_getversym.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_getversym.c	2010-03-17 16:06:09.000000000 -0400
@@ -92,8 +92,7 @@
 
   /* The data is already in the correct form.  Just make sure the
      index is OK.  */
-  if (INVALID_NDX (ndx, GElf_Versym)
-      || unlikely ((ndx + 1) * sizeof (GElf_Versym) > data->d_size))
+  if (unlikely ((ndx + 1) * sizeof (GElf_Versym) > data->d_size))
     {
       __libelf_seterrno (ELF_E_INVALID_INDEX);
       result = NULL;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_dyn.c ./libelf/gelf_update_dyn.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_dyn.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_update_dyn.c	2010-03-17 16:06:09.000000000 -0400
@@ -71,6 +71,12 @@
   if (data == NULL)
     return 0;
 
+  if (unlikely (ndx < 0))
+    {
+      __libelf_seterrno (ELF_E_INVALID_INDEX);
+      return 0;
+    }
+
   if (unlikely (data_scn->d.d_type != ELF_T_DYN))
     {
       /* The type of the data better should match.  */
@@ -96,8 +102,7 @@
 	}
 
       /* Check whether we have to resize the data buffer.  */
-      if (INVALID_NDX (ndx, Elf32_Dyn)
-	  || unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
@@ -111,8 +116,7 @@
   else
     {
       /* Check whether we have to resize the data buffer.  */
-      if (INVALID_NDX (ndx, Elf64_Dyn)
-	  || unlikely ((ndx + 1) * sizeof (Elf64_Dyn) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf64_Dyn) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_lib.c ./libelf/gelf_update_lib.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_lib.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_update_lib.c	2010-03-17 16:06:09.000000000 -0400
@@ -68,6 +68,12 @@
   if (data == NULL)
     return 0;
 
+  if (unlikely (ndx < 0))
+    {
+      __libelf_seterrno (ELF_E_INVALID_INDEX);
+      return 0;
+    }
+
   Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
   if (unlikely (data_scn->d.d_type != ELF_T_LIB))
     {
@@ -81,8 +87,7 @@
 
   /* Check whether we have to resize the data buffer.  */
   int result = 0;
-  if (INVALID_NDX (ndx, Elf64_Lib)
-      || unlikely ((ndx + 1) * sizeof (Elf64_Lib) > data_scn->d.d_size))
+  if (unlikely ((ndx + 1) * sizeof (Elf64_Lib) > data_scn->d.d_size))
     __libelf_seterrno (ELF_E_INVALID_INDEX);
   else
     {
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_move.c ./libelf/gelf_update_move.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_move.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_update_move.c	2010-03-17 16:06:09.000000000 -0400
@@ -75,7 +75,7 @@
   assert (sizeof (GElf_Move) == sizeof (Elf64_Move));
 
   /* Check whether we have to resize the data buffer.  */
-  if (INVALID_NDX (ndx, GElf_Move)
+  if (unlikely (ndx < 0)
       || unlikely ((ndx + 1) * sizeof (GElf_Move) > data_scn->d.d_size))
     {
       __libelf_seterrno (ELF_E_INVALID_INDEX);
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_rela.c ./libelf/gelf_update_rela.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_rela.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_update_rela.c	2010-03-17 16:06:09.000000000 -0400
@@ -68,6 +68,12 @@
   if (dst == NULL)
     return 0;
 
+  if (unlikely (ndx < 0))
+    {
+      __libelf_seterrno (ELF_E_INVALID_INDEX);
+      return 0;
+    }
+
   if (unlikely (data_scn->d.d_type != ELF_T_RELA))
     {
       /* The type of the data better should match.  */
@@ -95,8 +101,7 @@
 	}
 
       /* Check whether we have to resize the data buffer.  */
-      if (INVALID_NDX (ndx, Elf32_Rela)
-	  || unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
@@ -112,8 +117,7 @@
   else
     {
       /* Check whether we have to resize the data buffer.  */
-      if (INVALID_NDX (ndx, Elf64_Rela)
-	  || unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_rel.c ./libelf/gelf_update_rel.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_rel.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_update_rel.c	2010-03-17 16:06:09.000000000 -0400
@@ -68,6 +68,12 @@
   if (dst == NULL)
     return 0;
 
+  if (unlikely (ndx < 0))
+    {
+      __libelf_seterrno (ELF_E_INVALID_INDEX);
+      return 0;
+    }
+
   if (unlikely (data_scn->d.d_type != ELF_T_REL))
     {
       /* The type of the data better should match.  */
@@ -93,8 +99,7 @@
 	}
 
       /* Check whether we have to resize the data buffer.  */
-      if (INVALID_NDX (ndx, Elf32_Rel)
-	  || unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
@@ -109,8 +114,7 @@
   else
     {
       /* Check whether we have to resize the data buffer.  */
-      if (INVALID_NDX (ndx, Elf64_Rel)
-	  || unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_sym.c ./libelf/gelf_update_sym.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_sym.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_update_sym.c	2010-03-17 16:06:09.000000000 -0400
@@ -72,6 +72,12 @@
   if (data == NULL)
     return 0;
 
+  if (unlikely (ndx < 0))
+    {
+      __libelf_seterrno (ELF_E_INVALID_INDEX);
+      return 0;
+    }
+
   if (unlikely (data_scn->d.d_type != ELF_T_SYM))
     {
       /* The type of the data better should match.  */
@@ -96,8 +102,7 @@
 	}
 
       /* Check whether we have to resize the data buffer.  */
-      if (INVALID_NDX (ndx, Elf32_Sym)
-	  || unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
@@ -120,8 +125,7 @@
   else
     {
       /* Check whether we have to resize the data buffer.  */
-      if (INVALID_NDX (ndx, Elf64_Sym)
-	  || unlikely ((ndx + 1) * sizeof (Elf64_Sym) > data_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > data_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_syminfo.c ./libelf/gelf_update_syminfo.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_syminfo.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_update_syminfo.c	2010-03-17 16:06:09.000000000 -0400
@@ -72,6 +72,12 @@
   if (data == NULL)
     return 0;
 
+  if (unlikely (ndx < 0))
+    {
+      __libelf_seterrno (ELF_E_INVALID_INDEX);
+      return 0;
+    }
+
   if (unlikely (data_scn->d.d_type != ELF_T_SYMINFO))
     {
       /* The type of the data better should match.  */
@@ -87,8 +93,7 @@
   rwlock_wrlock (scn->elf->lock);
 
   /* Check whether we have to resize the data buffer.  */
-  if (INVALID_NDX (ndx, GElf_Syminfo)
-      || unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data_scn->d.d_size))
+  if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data_scn->d.d_size))
     {
       __libelf_seterrno (ELF_E_INVALID_INDEX);
       goto out;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_symshndx.c ./libelf/gelf_update_symshndx.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_symshndx.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_update_symshndx.c	2010-03-17 16:06:09.000000000 -0400
@@ -77,6 +77,12 @@
   if (symdata == NULL)
     return 0;
 
+  if (unlikely (ndx < 0))
+    {
+      __libelf_seterrno (ELF_E_INVALID_INDEX);
+      return 0;
+    }
+
   if (unlikely (symdata_scn->d.d_type != ELF_T_SYM))
     {
       /* The type of the data better should match.  */
@@ -122,8 +128,7 @@
 	}
 
       /* Check whether we have to resize the data buffer.  */
-      if (INVALID_NDX (ndx, Elf32_Sym)
-	  || unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
@@ -146,8 +151,7 @@
   else
     {
       /* Check whether we have to resize the data buffer.  */
-      if (INVALID_NDX (ndx, Elf64_Sym)
-	  || unlikely ((ndx + 1) * sizeof (Elf64_Sym) > symdata_scn->d.d_size))
+      if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > symdata_scn->d.d_size))
 	{
 	  __libelf_seterrno (ELF_E_INVALID_INDEX);
 	  goto out;
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_versym.c ./libelf/gelf_update_versym.c
--- ../base/frysk/frysk-imports/elfutils/libelf/gelf_update_versym.c	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/gelf_update_versym.c	2010-03-17 16:06:09.000000000 -0400
@@ -75,7 +75,7 @@
   assert (sizeof (GElf_Versym) == sizeof (Elf64_Versym));
 
   /* Check whether we have to resize the data buffer.  */
-  if (INVALID_NDX (ndx, GElf_Versym)
+  if (unlikely (ndx < 0)
       || unlikely ((ndx + 1) * sizeof (GElf_Versym) > data_scn->d.d_size))
     {
       __libelf_seterrno (ELF_E_INVALID_INDEX);
diff -r -u ../base/frysk/frysk-imports/elfutils/libelf/libelfP.h ./libelf/libelfP.h
--- ../base/frysk/frysk-imports/elfutils/libelf/libelfP.h	2008-04-17 09:23:47.000000000 -0400
+++ ./libelf/libelfP.h	2010-03-25 14:41:45.000000000 -0400
@@ -596,13 +596,4 @@
 /* Align offset to 4 bytes as needed for note name and descriptor data.  */
 #define NOTE_ALIGN(n)	(((n) + 3) & -4U)
 
-/* Convenience macro.  Assumes int NDX and TYPE with size at least
-   2 bytes.  */
-#if SIZE_MAX > 4294967295U
-# define INVALID_NDX(ndx, type) unlikely (ndx < 0)
-#else
-# define INVALID_NDX(ndx, type) \
-  unlikely ((unsigned int) (ndx) >= SIZE_MAX / sizeof (type))
-#endif
-
 #endif  /* libelfP.h */
Only in ../base/frysk/frysk-imports/elfutils/libelf: Makefile.in
Only in ./m4: .cvsignore
Only in ../base/frysk/frysk-imports/elfutils/m4: Makefile.in
Only in ../base/frysk/frysk-imports/elfutils: Makefile.in
Only in .: .mtn-ignore
Only in ./po: .cvsignore
Only in ../base/frysk/frysk-imports/elfutils/po: elfutils.pot
Only in ../base/frysk/frysk-imports/elfutils/po: stamp-po
Only in ./src: .cvsignore
diff -r -u ../base/frysk/frysk-imports/elfutils/src/elflint.c ./src/elflint.c
--- ../base/frysk/frysk-imports/elfutils/src/elflint.c	2008-04-17 09:23:47.000000000 -0400
+++ ./src/elflint.c	2010-03-25 14:41:45.000000000 -0400
@@ -131,9 +131,6 @@
 /* Array to count references in section groups.  */
 static int *scnref;
 
-/* Number of sections.  */
-static unsigned int shnum;
-
 
 int
 main (int argc, char *argv[])
@@ -323,19 +320,10 @@
 {
   GElf_Shdr shdr_mem;
   GElf_Shdr *shdr;
-  const char *ret;
-
-  if ((unsigned int) idx > shnum)
-    return "<invalid>";
 
   shdr = gelf_getshdr (elf_getscn (ebl->elf, idx), &shdr_mem);
-  if (shdr == NULL)
-    return "<invalid>";
 
-  ret = elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
-  if (ret == NULL)
-    return "<invalid>";
-  return ret;
+  return elf_strptr (ebl->elf, shstrndx, shdr->sh_name);
 }
 
 
@@ -357,6 +345,10 @@
   (sizeof (valid_e_machine) / sizeof (valid_e_machine[0]))
 
 
+/* Number of sections.  */
+static unsigned int shnum;
+
+
 static void
 check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size)
 {
@@ -618,8 +610,7 @@
 	  }
       }
 
-  size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT);
-  if (shdr->sh_entsize != sh_entsize)
+  if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT))
     ERROR (gettext ("\
 section [%2u] '%s': entry size is does not match ElfXX_Sym\n"),
 	   idx, section_name (ebl, idx));
@@ -657,7 +648,7 @@
 	       xndxscnidx, section_name (ebl, xndxscnidx));
     }
 
-  for (size_t cnt = 1; cnt < shdr->sh_size / sh_entsize; ++cnt)
+  for (size_t cnt = 1; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
     {
       sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx);
       if (sym == NULL)
@@ -675,8 +666,7 @@
       else
 	{
 	  name = elf_strptr (ebl->elf, shdr->sh_link, sym->st_name);
-	  assert (name != NULL
-		  || strshdr->sh_type != SHT_STRTAB);
+	  assert (name != NULL);
 	}
 
       if (sym->st_shndx == SHN_XINDEX)
@@ -1006,11 +996,9 @@
     {
       GElf_Shdr rcshdr_mem;
       const GElf_Shdr *rcshdr = gelf_getshdr (scn, &rcshdr_mem);
+      assert (rcshdr != NULL);
 
-      if (rcshdr == NULL)
-	break;
-
-      if (rcshdr->sh_type == SHT_DYNAMIC && rcshdr->sh_entsize)
+      if (rcshdr->sh_type == SHT_DYNAMIC)
 	{
 	  /* Found the dynamic section.  Look through it.  */
 	  Elf_Data *d = elf_getdata (scn, NULL);
@@ -1020,9 +1008,7 @@
 	    {
 	      GElf_Dyn dyn_mem;
 	      GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem);
-
-	      if (dyn == NULL)
-		break;
+	      assert (dyn != NULL);
 
 	      if (dyn->d_tag == DT_RELCOUNT)
 		{
@@ -1036,9 +1022,7 @@
 		      /* Does the number specified number of relative
 			 relocations exceed the total number of
 			 relocations?  */
-		      if (shdr->sh_entsize != 0
-			  && dyn->d_un.d_val > (shdr->sh_size
-						/ shdr->sh_entsize))
+		      if (dyn->d_un.d_val > shdr->sh_size / shdr->sh_entsize)
 			ERROR (gettext ("\
 section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"),
 			       idx, section_name (ebl, idx),
@@ -1198,8 +1182,7 @@
 	}
     }
 
-  size_t sh_entsize = gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT);
-  if (shdr->sh_entsize != sh_entsize)
+  if (shdr->sh_entsize != gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT))
     ERROR (gettext (reltype == ELF_T_RELA ? "\
 section [%2d] '%s': section entry size does not match ElfXX_Rela\n" : "\
 section [%2d] '%s': section entry size does not match ElfXX_Rel\n"),
@@ -1422,8 +1405,7 @@
   Elf_Data *symdata = elf_getdata (symscn, NULL);
   enum load_state state = state_undecided;
 
-  size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT);
-  for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
+  for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
     {
       GElf_Rela rela_mem;
       GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem);
@@ -1473,8 +1455,7 @@
   Elf_Data *symdata = elf_getdata (symscn, NULL);
   enum load_state state = state_undecided;
 
-  size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT);
-  for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
+  for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
     {
       GElf_Rel rel_mem;
       GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem);
@@ -1577,8 +1558,7 @@
 	   shdr->sh_link, section_name (ebl, shdr->sh_link),
 	   idx, section_name (ebl, idx));
 
-  size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT);
-  if (shdr->sh_entsize != sh_entsize)
+  if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT))
     ERROR (gettext ("\
 section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"),
 	   idx, section_name (ebl, idx));
@@ -1588,7 +1568,7 @@
 	   idx, section_name (ebl, idx));
 
   bool non_null_warned = false;
-  for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt)
+  for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
     {
       GElf_Dyn dyn_mem;
       GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem);
@@ -1869,8 +1849,6 @@
 	   idx, section_name (ebl, idx));
 
   if (symshdr != NULL
-      && shdr->sh_entsize
-      && symshdr->sh_entsize
       && (shdr->sh_size / shdr->sh_entsize
 	  < symshdr->sh_size / symshdr->sh_entsize))
     ERROR (gettext ("\
@@ -1897,12 +1875,6 @@
     }
 
   Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL);
-  if (data == NULL)
-    {
-      ERROR (gettext ("section [%2d] '%s': cannot get section data\n"),
- 	     idx, section_name (ebl, idx));
-      return;
-    }
 
   if (*((Elf32_Word *) data->d_buf) != 0)
     ERROR (gettext ("symbol 0 should have zero extended section index\n"));
@@ -1945,7 +1917,7 @@
 
   size_t maxidx = nchain;
 
-  if (symshdr != NULL && symshdr->sh_entsize != 0)
+  if (symshdr != NULL)
     {
       size_t symsize = symshdr->sh_size / symshdr->sh_entsize;
 
@@ -1956,28 +1928,18 @@
       maxidx = symsize;
     }
 
-  Elf32_Word *buf = (Elf32_Word *) data->d_buf;
-  Elf32_Word *end = (Elf32_Word *) ((char *) data->d_buf + shdr->sh_size);
   size_t cnt;
   for (cnt = 2; cnt < 2 + nbucket; ++cnt)
-    {
-      if (buf + cnt >= end)
-	break;
-      else if (buf[cnt] >= maxidx)
+    if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
       ERROR (gettext ("\
 section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
 	     idx, section_name (ebl, idx), cnt - 2);
-    }
 
   for (; cnt < 2 + nbucket + nchain; ++cnt)
-    {
-      if (buf + cnt >= end)
-	break;
-      else if (buf[cnt] >= maxidx)
+    if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx)
       ERROR (gettext ("\
 section [%2d] '%s': hash chain reference %zu out of bounds\n"),
 	     idx, section_name (ebl, idx), cnt - 2 - nbucket);
-    }
 }
 
 
@@ -2007,28 +1969,18 @@
       maxidx = symsize;
     }
 
-  Elf64_Xword *buf = (Elf64_Xword *) data->d_buf;
-  Elf64_Xword *end = (Elf64_Xword *) ((char *) data->d_buf + shdr->sh_size);
   size_t cnt;
   for (cnt = 2; cnt < 2 + nbucket; ++cnt)
-    {
-      if (buf + cnt >= end)
-	break;
-      else if (buf[cnt] >= maxidx)
+    if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
       ERROR (gettext ("\
 section [%2d] '%s': hash bucket reference %zu out of bounds\n"),
 	     idx, section_name (ebl, idx), cnt - 2);
-    }
 
   for (; cnt < 2 + nbucket + nchain; ++cnt)
-    {
-      if (buf + cnt >= end)
-	break;
-      else if (buf[cnt] >= maxidx)
+    if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx)
       ERROR (gettext ("\
 section [%2d] '%s': hash chain reference %" PRIu64 " out of bounds\n"),
-	       idx, section_name (ebl, idx), (uint64_t) cnt - 2 - nbucket);
-    }
+	     idx, section_name (ebl, idx), (uint64_t) (cnt - 2 - nbucket));
 }
 
 
@@ -2053,7 +2005,7 @@
   if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))
     {
       ERROR (gettext ("\
-section [%2d] '%s': hash table section is too small (is %ld, expected at least %ld)\n"),
+section [%2d] '%s': hash table section is too small (is %ld, expected at least%ld)\n"),
 	     idx, section_name (ebl, idx), (long int) shdr->sh_size,
 	     (long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)));
       return;
@@ -2725,9 +2677,8 @@
 
   /* The number of elements in the version symbol table must be the
      same as the number of symbols.  */
-  if (shdr->sh_entsize && symshdr->sh_entsize
-      && (shdr->sh_size / shdr->sh_entsize
-	  != symshdr->sh_size / symshdr->sh_entsize))
+  if (shdr->sh_size / shdr->sh_entsize
+      != symshdr->sh_size / symshdr->sh_entsize)
     ERROR (gettext ("\
 section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\n"),
 	   idx, section_name (ebl, idx),
Only in ../base/frysk/frysk-imports/elfutils/src: elflint.c.orig
Only in ../base/frysk/frysk-imports/elfutils/src: ldlex.c
Only in ../base/frysk/frysk-imports/elfutils/src: ldscript.c
Only in ../base/frysk/frysk-imports/elfutils/src: ldscript.h
Only in ../base/frysk/frysk-imports/elfutils/src: Makefile.in
diff -r -u ../base/frysk/frysk-imports/elfutils/src/readelf.c ./src/readelf.c
--- ../base/frysk/frysk-imports/elfutils/src/readelf.c	2008-04-17 09:23:47.000000000 -0400
+++ ./src/readelf.c	2010-03-25 14:41:45.000000000 -0400
@@ -1111,8 +1111,6 @@
   Elf32_Word *grpref = (Elf32_Word *) data->d_buf;
 
   GElf_Sym sym_mem;
-  GElf_Sym *sym = gelf_getsym (symdata, shdr->sh_info, &sym_mem);
-
   printf ((grpref[0] & GRP_COMDAT)
 	  ? ngettext ("\
 \nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n",
@@ -1125,8 +1123,8 @@
 		      data->d_size / sizeof (Elf32_Word) - 1),
 	  elf_ndxscn (scn),
 	  elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
-	  (sym == NULL ? NULL
-	   : elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name))
+	  elf_strptr (ebl->elf, symshdr->sh_link,
+		      gelf_getsym (symdata, shdr->sh_info, &sym_mem)->st_name)
 	  ?: gettext ("<INVALID SYMBOL>"),
 	  data->d_size / sizeof (Elf32_Word) - 1);
 
@@ -1277,8 +1275,7 @@
 handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
 {
   int class = gelf_getclass (ebl->elf);
-  GElf_Shdr glink_mem;
-  GElf_Shdr *glink;
+  GElf_Shdr glink;
   Elf_Data *data;
   size_t cnt;
   size_t shstrndx;
@@ -1293,11 +1290,6 @@
     error (EXIT_FAILURE, 0,
 	   gettext ("cannot get section header string table index"));
 
-  glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
-  if (glink == NULL)
-    error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-	   elf_ndxscn (scn));
-
   printf (ngettext ("\
 \nDynamic segment contains %lu entry:\n Addr: %#0*" PRIx64 "  Offset: %#08" PRIx64 "  Link to section: [%2u] '%s'\n",
 		    "\
@@ -1307,7 +1299,9 @@
 	  class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
 	  shdr->sh_offset,
 	  (int) shdr->sh_link,
-	  elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+	  elf_strptr (ebl->elf, shstrndx,
+		      gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+				    &glink)->sh_name));
   fputs_unlocked (gettext ("  Type              Value\n"), stdout);
 
   for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
@@ -1807,13 +1801,6 @@
     error (EXIT_FAILURE, 0,
 	   gettext ("cannot get section header string table index"));
 
-  GElf_Shdr glink_mem;
-  GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-				   &glink_mem);
-  if (glink == NULL)
-    error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-	   elf_ndxscn (scn));
-
   /* Now we can compute the number of entries in the section.  */
   unsigned int nsyms = data->d_size / (class == ELFCLASS32
 				       ? sizeof (Elf32_Sym)
@@ -1824,12 +1811,15 @@
 		    nsyms),
 	  (unsigned int) elf_ndxscn (scn),
 	  elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms);
+  GElf_Shdr glink;
   printf (ngettext (" %lu local symbol  String table: [%2u] '%s'\n",
 		    " %lu local symbols  String table: [%2u] '%s'\n",
 		    shdr->sh_info),
 	  (unsigned long int) shdr->sh_info,
 	  (unsigned int) shdr->sh_link,
-	  elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+	  elf_strptr (ebl->elf, shstrndx,
+		      gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+				    &glink)->sh_name));
 
   fputs_unlocked (class == ELFCLASS32
 		  ? gettext ("\
@@ -2065,13 +2055,7 @@
     error (EXIT_FAILURE, 0,
 	   gettext ("cannot get section header string table index"));
 
-  GElf_Shdr glink_mem;
-  GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-				   &glink_mem);
-  if (glink == NULL)
-    error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-	   elf_ndxscn (scn));
-
+  GElf_Shdr glink;
   printf (ngettext ("\
 \nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 "  Offset: %#08" PRIx64 "  Link to section: [%2u] '%s'\n",
 		    "\
@@ -2082,7 +2066,9 @@
 	  class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
 	  shdr->sh_offset,
 	  (unsigned int) shdr->sh_link,
-	  elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+	  elf_strptr (ebl->elf, shstrndx,
+		      gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+				    &glink)->sh_name));
 
   unsigned int offset = 0;
   for (int cnt = shdr->sh_info; --cnt >= 0; )
@@ -2135,14 +2121,8 @@
     error (EXIT_FAILURE, 0,
 	   gettext ("cannot get section header string table index"));
 
-  GElf_Shdr glink_mem;
-  GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-				   &glink_mem);
-  if (glink == NULL)
-    error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-	   elf_ndxscn (scn));
-
   int class = gelf_getclass (ebl->elf);
+  GElf_Shdr glink;
   printf (ngettext ("\
 \nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 "  Offset: %#08" PRIx64 "  Link to section: [%2u] '%s'\n",
 		    "\
@@ -2154,7 +2134,9 @@
 	  class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
 	  shdr->sh_offset,
 	  (unsigned int) shdr->sh_link,
-	  elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+	  elf_strptr (ebl->elf, shstrndx,
+		      gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+				    &glink)->sh_name));
 
   unsigned int offset = 0;
   for (int cnt = shdr->sh_info; --cnt >= 0; )
@@ -2416,14 +2398,8 @@
       filename = NULL;
     }
 
-  GElf_Shdr glink_mem;
-  GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
-				   &glink_mem);
-  if (glink == NULL)
-    error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"),
-	   elf_ndxscn (scn));
-
   /* Print the header.  */
+  GElf_Shdr glink;
   printf (ngettext ("\
 \nVersion symbols section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 "  Offset: %#08" PRIx64 "  Link to section: [%2u] '%s'",
 		    "\
@@ -2435,7 +2411,9 @@
 	  class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
 	  shdr->sh_offset,
 	  (unsigned int) shdr->sh_link,
-	  elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+	  elf_strptr (ebl->elf, shstrndx,
+		      gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+				    &glink)->sh_name));
 
   /* Now we can finally look at the actual contents of this section.  */
   for (unsigned int cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt)
@@ -2487,17 +2465,7 @@
   for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt)
     ++counts[lengths[cnt]];
 
-  GElf_Shdr glink_mem;
-  GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf,
-					       shdr->sh_link),
-				   &glink_mem);
-  if (glink == NULL)
-    {
-      error (0, 0, gettext ("invalid sh_link value in section %Zu"),
-	     elf_ndxscn (scn));
-      return;
-    }
-
+  GElf_Shdr glink;
   printf (ngettext ("\
 \nHistogram for bucket list length in section [%2u] '%s' (total of %d bucket):\n Addr: %#0*" PRIx64 "  Offset: %#08" PRIx64 "  Link to section: [%2u] '%s'\n",
 		    "\
@@ -2510,7 +2478,9 @@
 	  shdr->sh_addr,
 	  shdr->sh_offset,
 	  (unsigned int) shdr->sh_link,
-	  elf_strptr (ebl->elf, shstrndx, glink->sh_name));
+	  elf_strptr (ebl->elf, shstrndx,
+		      gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link),
+				    &glink)->sh_name));
 
   if (extrastr != NULL)
     fputs (extrastr, stdout);
@@ -4069,16 +4039,6 @@
       return;
     }
 
-  GElf_Shdr glink_mem;
-  GElf_Shdr *glink;
-  glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem);
-  if (glink == NULL)
-    {
-      error (0, 0, gettext ("invalid sh_link value in section %Zu"),
-	     elf_ndxscn (scn));
-      return;
-    }
-
   printf (ngettext ("\
 \nDWARF section '%s' at offset %#" PRIx64 " contains %zu entry:\n",
 		    "\
Only in ../base/frysk/frysk-imports/elfutils/src: readelf.c.orig
diff -r -u ../base/frysk/frysk-imports/elfutils/src/strip.c ./src/strip.c
--- ../base/frysk/frysk-imports/elfutils/src/strip.c	2008-04-17 09:23:47.000000000 -0400
+++ ./src/strip.c	2010-03-25 14:41:45.000000000 -0400
@@ -400,7 +400,6 @@
     Elf_Scn *newscn;
     struct Ebl_Strent *se;
     Elf32_Word *newsymidx;
-    void *debug_data;
   } *shdr_info = NULL;
   Elf_Scn *scn;
   size_t cnt;
@@ -544,11 +543,6 @@
       goto fail_close;
     }
 
-  if (shstrndx >= shnum)
-    goto illformed;
-
-#define elf_assert(test) do { if (!(test)) goto illformed; } while (0)
-
   /* Storage for section information.  We leave room for two more
      entries since we unconditionally create a section header string
      table.  Maybe some weird tool created an ELF file without one.
@@ -570,7 +564,7 @@
     {
       /* This should always be true (i.e., there should not be any
 	 holes in the numbering).  */
-      elf_assert (elf_ndxscn (scn) == cnt);
+      assert (elf_ndxscn (scn) == cnt);
 
       shdr_info[cnt].scn = scn;
 
@@ -583,7 +577,6 @@
 					shdr_info[cnt].shdr.sh_name);
       if (shdr_info[cnt].name == NULL)
 	{
-	illformed:
 	  error (0, 0, gettext ("illformed file '%s'"), fname);
 	  goto fail_close;
 	}
@@ -593,8 +586,6 @@
 
       /* Remember the shdr.sh_link value.  */
       shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link;
-      if (shdr_info[cnt].old_sh_link >= shnum)
-	goto illformed;
 
       /* Sections in files other than relocatable object files which
 	 are not loaded can be freely moved by us.  In relocatable
@@ -607,7 +598,7 @@
 	 appropriate reference.  */
       if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX))
 	{
-	  elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
+	  assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0);
 	  shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt;
 	}
       else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP))
@@ -624,12 +615,7 @@
 	  for (inner = 1;
 	       inner < shdr_info[cnt].data->d_size / sizeof (Elf32_Word);
 	       ++inner)
-	    {
-	      if (grpref[inner] < shnum)
 	    shdr_info[grpref[inner]].group_idx = cnt;
-	      else
-		goto illformed;
-	    }
 
 	  if (inner == 1 || (inner == 2 && (grpref[0] & GRP_COMDAT) == 0))
 	    /* If the section group contains only one element and this
@@ -640,7 +626,7 @@
 	}
       else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym))
 	{
-	  elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
+	  assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0);
 	  shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt;
 	}
 
@@ -648,7 +634,7 @@
 	 discarded right away.  */
       if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0)
 	{
-	  elf_assert (shdr_info[cnt].group_idx != 0);
+	  assert (shdr_info[cnt].group_idx != 0);
 
 	  if (shdr_info[shdr_info[cnt].group_idx].idx == 0)
 	    {
@@ -723,15 +709,11 @@
 	    {
 	      /* If a relocation section is marked as being removed make
 		 sure the section it is relocating is removed, too.  */
-	      if (shdr_info[cnt].shdr.sh_type == SHT_REL
+	      if ((shdr_info[cnt].shdr.sh_type == SHT_REL
 		   || shdr_info[cnt].shdr.sh_type == SHT_RELA)
-		{
-		  if (shdr_info[cnt].shdr.sh_info >= shnum)
-		    goto illformed;
-		  else if (shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
+		  && shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0)
 		shdr_info[cnt].idx = 1;
 	    }
-	    }
 
 	  if (shdr_info[cnt].idx == 1)
 	    {
@@ -756,7 +738,7 @@
 		  if (shdr_info[cnt].symtab_idx != 0
 		      && shdr_info[shdr_info[cnt].symtab_idx].data == NULL)
 		    {
-		      elf_assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
+		      assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB);
 
 		      shdr_info[shdr_info[cnt].symtab_idx].data
 			= elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
@@ -796,9 +778,6 @@
 		      else if (scnidx == SHN_XINDEX)
 			scnidx = xndx;
 
-		      if (scnidx >= shnum)
-			goto illformed;
-
 		      if (shdr_info[scnidx].idx == 0)
 			{
 			  /* Mark this section as used.  */
@@ -830,16 +809,12 @@
 		}
 
 	      /* Handle references through sh_info.  */
-	      if (SH_INFO_LINK_P (&shdr_info[cnt].shdr))
-		{
-		  if (shdr_info[cnt].shdr.sh_info >= shnum)
-		    goto illformed;
-		  else if ( shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
+	      if (SH_INFO_LINK_P (&shdr_info[cnt].shdr)
+		  && shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0)
 		{
 		  shdr_info[shdr_info[cnt].shdr.sh_info].idx = 1;
 		  changes |= shdr_info[cnt].shdr.sh_info < cnt;
 		}
-		}
 
 	      /* Mark the section as investigated.  */
 	      shdr_info[cnt].idx = 2;
@@ -852,37 +827,6 @@
      The ones that are not removed in the stripped file are SHT_NOBITS.  */
   if (debug_fname != NULL)
     {
-      /* libbfd and apps using it don't cope with separate debuginfo objects
-	 with relocation sections against SHT_NOBITS .symtab/.strtab
-	 - libbfd isn't able to look up the .symtab/.strtab in the stripped
-	 object instead.  As a workaround, emit .symtab/.strtab in both
-	 places.  */
-      for (cnt = 1; cnt < shnum; ++cnt)
-	{
-	  if (shdr_info[cnt].idx == 0
-	      && (shdr_info[cnt].shdr.sh_type == SHT_REL
-		  || shdr_info[cnt].shdr.sh_type == SHT_RELA)
-	      && (shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) == 0)
-	    {
-	      Elf32_Word symtabidx = shdr_info[cnt].old_sh_link;
-	      struct shdr_info *si = &shdr_info[symtabidx];
-	      si->debug_data = "";
-	      shdr_info[si->old_sh_link].debug_data = "";
-	      if (si->symtab_idx)
-		shdr_info[si->symtab_idx].debug_data = "";
-
-	      if (si->shdr.sh_type != SHT_SYMTAB
-		  || (si->shdr.sh_flags & SHF_ALLOC)
-		  || shdr_info[si->old_sh_link].shdr.sh_type != SHT_STRTAB
-		  || (shdr_info[si->old_sh_link].shdr.sh_flags & SHF_ALLOC)
-		  || (si->symtab_idx
-		      && (shdr_info[si->symtab_idx].shdr.sh_flags
-			  & SHF_ALLOC)))
-		error (EXIT_FAILURE, 0,
-		       gettext ("invalid symtab/strtab referenced by nonallocated section"));
-	    }
-	}
-
       for (cnt = 1; cnt < shnum; ++cnt)
 	{
 	  scn = elf_newscn (debugelf);
@@ -892,7 +836,6 @@
 		   elf_errmsg (-1));
 
 	  bool discard_section = (shdr_info[cnt].idx > 0
-				  && shdr_info[cnt].debug_data == NULL
 				  && shdr_info[cnt].shdr.sh_type != SHT_NOTE
 				  && cnt != ehdr->e_shstrndx);
 
@@ -923,13 +866,6 @@
 	  *debugdata = *shdr_info[cnt].data;
 	  if (discard_section)
 	    debugdata->d_buf = NULL;
-	  else if (shdr_info[cnt].debug_data != NULL)
-	    {
-	      shdr_info[cnt].debug_data = xmalloc (debugdata->d_size);
-	      memcpy (shdr_info[cnt].debug_data, debugdata->d_buf,
-		      debugdata->d_size);
-	      debugdata->d_buf = shdr_info[cnt].debug_data;
-	    }
 	}
 
       /* Finish the ELF header.  Fill in the fields not handled by
@@ -978,7 +914,7 @@
 	  error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"),
 		 elf_errmsg (-1));
 
-	elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
+	assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
 
 	/* Add this name to the section header string table.  */
 	shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0);
@@ -1015,7 +951,7 @@
 	error (EXIT_FAILURE, 0,
 	       gettext ("while create section header section: %s"),
 	       elf_errmsg (-1));
-      elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
+      assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx);
 
       shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn);
       if (shdr_info[cnt].data == NULL)
@@ -1071,7 +1007,7 @@
     error (EXIT_FAILURE, 0,
 	   gettext ("while create section header section: %s"),
 	   elf_errmsg (-1));
-  elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
+  assert (elf_ndxscn (shdr_info[cnt].newscn) == idx);
 
   /* Finalize the string table and fill in the correct indices in the
      section headers.  */
@@ -1121,7 +1057,7 @@
 	    shdr_info[shdr_info[cnt].shdr.sh_info].idx;
 
 	/* Get the data from the old file if necessary.  We already
-	   created the data for the section header string table.  */
+           created the data for the section header string table.  */
 	if (cnt < shnum)
 	  {
 	    if (shdr_info[cnt].data == NULL)
@@ -1161,20 +1097,20 @@
 		    shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
 					     NULL);
 
-		    elf_assert ((versiondata->d_size / sizeof (Elf32_Word))
+		    assert ((versiondata->d_size / sizeof (Elf32_Word))
 			    >= shdr_info[cnt].data->d_size / elsize);
 		  }
 
 		if (shdr_info[cnt].version_idx != 0)
 		  {
-		    elf_assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
+		    assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM);
 		    /* This section has associated version
 		       information.  We have to modify that
 		       information, too.  */
 		    versiondata = elf_getdata (shdr_info[shdr_info[cnt].version_idx].scn,
 					       NULL);
 
-		    elf_assert ((versiondata->d_size / sizeof (GElf_Versym))
+		    assert ((versiondata->d_size / sizeof (GElf_Versym))
 			    >= shdr_info[cnt].data->d_size / elsize);
 		  }
 
@@ -1229,7 +1165,7 @@
 		      sec = shdr_info[sym->st_shndx].idx;
 		    else
 		      {
-			elf_assert (shndxdata != NULL);
+			assert (shndxdata != NULL);
 
 			sec = shdr_info[xshndx].idx;
 		      }
@@ -1250,7 +1186,7 @@
 			    nxshndx = sec;
 			  }
 
-			elf_assert (sec < SHN_LORESERVE || shndxdata != NULL);
+			assert (sec < SHN_LORESERVE || shndxdata != NULL);
 
 			if ((inner != destidx || nshndx != sym->st_shndx
 			     || (shndxdata != NULL && nxshndx != xshndx))
@@ -1273,7 +1209,7 @@
 		    else
 		      /* This is a section symbol for a section which has
 			 been removed.  */
-		      elf_assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION);
+		      assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION);
 		  }
 
 		if (destidx != inner)
@@ -1348,13 +1284,6 @@
 	      if (shdr_info[shdr_info[cnt].old_sh_link].newsymidx == NULL)
 		continue;
 
-	      /* If the symbol table is not discarded, but additionally
-		 duplicated in separate debug file and this section
-		 is discarded, don't adjust anything.  */
-	      if (shdr_info[cnt].idx == 0
-		  && shdr_info[shdr_info[cnt].old_sh_link].debug_data != NULL)
-		continue;
-
 	      Elf32_Word *newsymidx
 		= shdr_info[shdr_info[cnt].old_sh_link].newsymidx;
 	      Elf_Data *d = elf_getdata (shdr_info[cnt].idx == 0
@@ -1413,13 +1342,6 @@
 	      if (shdr_info[symtabidx].newsymidx == NULL)
 		continue;
 
-	      /* If the symbol table is not discarded, but additionally
-		 duplicated in separate debug file and this section
-		 is discarded, don't adjust anything.  */
-	      if (shdr_info[cnt].idx == 0
-		  && shdr_info[symtabidx].debug_data != NULL)
-		continue;
-
 	      assert (shdr_info[cnt].idx > 0);
 
 	      /* The hash section in the new file.  */
@@ -1466,11 +1388,11 @@
 		    {
 		      GElf_Sym sym_mem;
 		      GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
-		      elf_assert (sym != NULL);
+		      assert (sym != NULL);
 
 		      const char *name = elf_strptr (elf, strshndx,
 						     sym->st_name);
-		      elf_assert (name != NULL);
+		      assert (name != NULL);
 		      size_t hidx = elf_hash (name) % nbucket;
 
 		      if (bucket[hidx] == 0)
@@ -1489,7 +1411,7 @@
 	      else
 		{
 		  /* Alpha and S390 64-bit use 64-bit SHT_HASH entries.  */
-		  elf_assert (shdr_info[cnt].shdr.sh_entsize
+		  assert (shdr_info[cnt].shdr.sh_entsize
 			  == sizeof (Elf64_Xword));
 
 		  Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf;
@@ -1520,11 +1442,11 @@
 		    {
 		      GElf_Sym sym_mem;
 		      GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
-		      elf_assert (sym != NULL);
+		      assert (sym != NULL);
 
 		      const char *name = elf_strptr (elf, strshndx,
 						     sym->st_name);
-		      elf_assert (name != NULL);
+		      assert (name != NULL);
 		      size_t hidx = elf_hash (name) % nbucket;
 
 		      if (bucket[hidx] == 0)
@@ -1539,7 +1461,7 @@
 			  chain[hidx] = inner;
 			}
 		    }
-		}
+	        }
 	    }
 	  else if (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym)
 	    {
@@ -1552,13 +1474,6 @@
 	      if (shdr_info[symtabidx].newsymidx == NULL)
 		continue;
 
-	      /* If the symbol table is not discarded, but additionally
-		 duplicated in separate debug file and this section
-		 is discarded, don't adjust anything.  */
-	      if (shdr_info[cnt].idx == 0
-		  && shdr_info[symtabidx].debug_data != NULL)
-		continue;
-
 	      assert (shdr_info[cnt].idx > 0);
 
 	      /* The symbol version section in the new file.  */
@@ -1601,27 +1516,20 @@
 	  else if (shdr_info[cnt].shdr.sh_type == SHT_GROUP)
 	    {
 	      /* Check whether the associated symbol table changed.  */
-	      if (shdr_info[shdr_info[cnt].old_sh_link].newsymidx == NULL)
-		continue;
-
-	      /* If the symbol table is not discarded, but additionally
-		 duplicated in separate debug file and this section
-		 is discarded, don't adjust anything.  */
-	      if (shdr_info[cnt].idx == 0
-		  && shdr_info[shdr_info[cnt].old_sh_link].debug_data != NULL)
-		continue;
-
-	      /* Yes the symbol table changed.  Update the section
-		 header of the section group.  */
-	      scn = elf_getscn (newelf, shdr_info[cnt].idx);
-	      GElf_Shdr shdr_mem;
-	      GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
-	      assert (shdr != NULL);
+	      if (shdr_info[shdr_info[cnt].old_sh_link].newsymidx != NULL)
+		{
+		  /* Yes the symbol table changed.  Update the section
+		     header of the section group.  */
+		  scn = elf_getscn (newelf, shdr_info[cnt].idx);
+		  GElf_Shdr shdr_mem;
+		  GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
+		  assert (shdr != NULL);
 
-	      size_t stabidx = shdr_info[cnt].old_sh_link;
-	      shdr->sh_info = shdr_info[stabidx].newsymidx[shdr->sh_info];
+		  size_t stabidx = shdr_info[cnt].old_sh_link;
+		  shdr->sh_info = shdr_info[stabidx].newsymidx[shdr->sh_info];
 
-	      (void) gelf_update_shdr (scn, shdr);
+		  (void) gelf_update_shdr (scn, shdr);
+		}
 	    }
 	}
     }
@@ -1751,10 +1659,7 @@
 	 table indices.  */
       if (any_symtab_changes)
 	for (cnt = 1; cnt <= shdridx; ++cnt)
-	  {
-	    free (shdr_info[cnt].newsymidx);
-	    free (shdr_info[cnt].debug_data);
-	  }
+	  free (shdr_info[cnt].newsymidx);
 
       /* Free the memory.  */
       if ((shnum + 2) * sizeof (struct shdr_info) > MAX_STACK_ALLOC)
Only in ../base/frysk/frysk-imports/elfutils/src: strip.c.orig
Only in ./tests: configure.ac
Only in ./tests: .cvsignore
Only in ../base/frysk/frysk-imports/elfutils/tests: Makefile.in
diff -r -u ../base/frysk/frysk-imports/elfutils/tests/run-strip-test5.sh ./tests/run-strip-test5.sh
--- ../base/frysk/frysk-imports/elfutils/tests/run-strip-test5.sh	2008-04-17 09:23:47.000000000 -0400
+++ ./tests/run-strip-test5.sh	2010-03-17 16:06:09.000000000 -0400
@@ -1,5 +1,5 @@
 original=testfile8
-stripped=testfile16.symtab
-debugfile=testfile16.symtab.debug
+stripped=testfile16
+debugfile=testfile16.debug
 
 . $srcdir/run-strip-test.sh
Only in ./tests: show-ciefde.c
Only in ../base/frysk/frysk-imports/elfutils/tests: testfile16.symtab.bz2
Only in ../base/frysk/frysk-imports/elfutils/tests: testfile16.symtab.debug.bz2

frysk-0.4-sodwfl.patch:
 frysk-common/Makefile.rules         |   13 ++-----------
 frysk-core/Makefile.am              |    6 +-----
 frysk-gtk/Makefile.am               |    6 +-----
 frysk-gui/Makefile.am               |    6 +-----
 frysk-imports/Makefile.am           |    6 ------
 frysk-imports/bootstrap.sh          |   12 ------------
 frysk-imports/configure.ac          |    2 +-
 frysk-imports/tests/Makefile.am     |    9 ++-------
 frysk-sys/Makefile.am               |   13 ++-----------
 frysk-sys/lib/dwfl/DwAccess.shenum  |    2 +-
 frysk-sys/lib/dwfl/DwAt.shenum      |    2 +-
 frysk-sys/lib/dwfl/DwAte.shenum     |    2 +-
 frysk-sys/lib/dwfl/DwDs.shenum      |    2 +-
 frysk-sys/lib/dwfl/DwDsc.shenum     |    2 +-
 frysk-sys/lib/dwfl/DwEnd.shenum     |    2 +-
 frysk-sys/lib/dwfl/DwInl.shenum     |    2 +-
 frysk-sys/lib/dwfl/DwOp.shenum      |    3 ++-
 frysk-sys/lib/dwfl/DwOrd.shenum     |    2 +-
 frysk-sys/lib/dwfl/DwTag.shenum     |    2 +-
 frysk-sys/lib/dwfl/cni/DwarfDie.cxx |    5 +++--
 frysk-sys/lib/dwfl/jni/DwarfDie.cxx |    4 ++--
 21 files changed, 26 insertions(+), 77 deletions(-)

--- NEW FILE frysk-0.4-sodwfl.patch ---
diff -up frysk-0.4/frysk-common/Makefile.rules.sodwfl frysk-0.4/frysk-common/Makefile.rules
--- frysk-0.4/frysk-common/Makefile.rules.sodwfl	2010-03-24 19:58:07.000000000 -0400
+++ frysk-0.4/frysk-common/Makefile.rules	2010-03-24 21:52:51.000000000 -0400
@@ -164,16 +164,9 @@ AM_CXXFLAGS = \
 	-I$(srcdir) \
 	-I$(srcdir)/../frysk-imports/include \
 	-I$(top_builddir) \
-        -I$(srcdir)/../frysk-imports/elfutils/libasm \
-        -I$(srcdir)/../frysk-imports/elfutils/libebl \
-	-I$(srcdir)/../frysk-imports/elfutils/libelf \
-	-I$(srcdir)/../frysk-imports/elfutils/libdw \
-	-I$(srcdir)/../frysk-imports/elfutils/libdwfl \
+	-I/usr/include/elfutils \
 	-I$(srcdir)/../frysk-imports/libunwind/include \
-	-I$(top_builddir)/../frysk-imports/libunwind-i386/include \
-	-I$(top_builddir)/../frysk-imports/libunwind-x86_64/include \
-	-I$(top_builddir)/../frysk-imports/libunwind-ppc64/include \
-	-I$(top_builddir)/../frysk-imports/libunwind-ppc32/include \
+	-I$(top_builddir)/../frysk-imports/libunwind/include \
 	-fPIC \
 	$(ZZZ)
 
@@ -399,12 +392,10 @@ Runner:
 	echo "#!/bin/sh"					>> $@.tmp
 	echo ""	     						>> $@.tmp
 	echo "# some pre-definitions"				>> $@.tmp
-	echo "elfutils=$(frysk_imports)/elfutils"		>> $@.tmp
 	echo "java=\"$(JAVA) $(GEN_GCJ_NO_SIGCHLD_FLAGS)\""	>> $@.tmp
 	echo ""	     						>> $@.tmp
 	echo "# hack to hopefully find the right libstdc++.so"  >> $@.tmp
 	echo "export LD_LIBRARY_PATH=$(frysk_sys)\\"		>> $@.tmp
-	echo ":\$${elfutils}/backends\\"			>> $@.tmp
 	echo ":/usr/lib64:/usr/lib"				>> $@.tmp
 	echo ""	     						>> $@.tmp
 	echo "# Set up classpath"				>> $@.tmp
diff -up frysk-0.4/frysk-core/Makefile.am.sodwfl frysk-0.4/frysk-core/Makefile.am
--- frysk-0.4/frysk-core/Makefile.am.sodwfl	2010-03-24 22:12:26.000000000 -0400
+++ frysk-0.4/frysk-core/Makefile.am	2010-03-24 22:13:13.000000000 -0400
@@ -53,11 +53,6 @@ GEN_GCJ_LDADD_LIST += ../frysk-imports/l
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libfrysk-junit.a
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libfrysk-getopt.a
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libfrysk-jdom.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libasm/libasm.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libdwfl/libdwfl.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libdw/libdw.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libebl/libebl.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libelf/libelf.a
 if USE_LIBUNWIND
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libunwind-i386/src/.libs/libunwind-x86.a \
                  ../frysk-imports/libunwind-x86_64/src/.libs/libunwind-x86_64.a \
@@ -68,6 +63,7 @@ GEN_GCJ_LDADD_LIST += -lstdc++
 # Stub bfd_getb32 and bfd_getl32 for PPC64.  Unconditionally
 # link -lbfd_get just for simplification.
 GEN_GCJ_LDADD_LIST += -laudit
+GEN_GCJ_LDADD_LIST += -lasm -ldw -lebl -lelf
 
 # For TestExec.java
 pkglib_PROGRAMS += frysk/pkglibdir/funit-exec-alias
diff -up frysk-0.4/frysk-gtk/Makefile.am.sodwfl frysk-0.4/frysk-gtk/Makefile.am
--- frysk-0.4/frysk-gtk/Makefile.am.sodwfl	2010-03-24 22:15:40.000000000 -0400
+++ frysk-0.4/frysk-gtk/Makefile.am	2010-03-24 22:16:36.000000000 -0400
@@ -51,11 +51,6 @@ GEN_GCJ_LDADD_LIST += ../frysk-sys/libfr
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libfrysk-junit.a 
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libfrysk-getopt.a
 GEN_GCJ_LDADD_LIST += $(FRYSK_GTK_LIBS)
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libasm/libasm.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libdwfl/libdwfl.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libdw/libdw.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libebl/libebl.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libelf/libelf.a
 GEN_GCJ_LDADD_LIST += \
 	../frysk-imports/libunwind-i386/src/.libs/libunwind-x86.a \
 	../frysk-imports/libunwind-x86_64/src/.libs/libunwind-x86_64.a \
@@ -64,6 +59,7 @@ GEN_GCJ_LDADD_LIST += \
 GEN_GCJ_LDADD_LIST += -lstdc++
 # For auditing
 GEN_GCJ_LDADD_LIST += -laudit
+GEN_GCJ_LDADD_LIST += -lasm -ldw -lebl -lelf
 
 # Hack, need to compile this entire sub-tree with JNI.
 AM_GCJFLAGS += -fjni 
diff -up frysk-0.4/frysk-gui/Makefile.am.sodwfl frysk-0.4/frysk-gui/Makefile.am
--- frysk-0.4/frysk-gui/Makefile.am.sodwfl	2010-03-24 22:15:44.000000000 -0400
+++ frysk-0.4/frysk-gui/Makefile.am	2010-03-24 22:16:21.000000000 -0400
@@ -60,11 +60,6 @@ GEN_GCJ_LDADD_LIST += ../frysk-imports/l
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libfrysk-junit.a 
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libfrysk-getopt.a 
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libfrysk-jline.a 
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libasm/libasm.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libdwfl/libdwfl.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libdw/libdw.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libebl/libebl.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libelf/libelf.a
 if USE_LIBUNWIND
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libunwind-i386/src/.libs/libunwind-x86.a \
                  ../frysk-imports/libunwind-x86_64/src/.libs/libunwind-x86_64.a \
@@ -77,6 +72,7 @@ GEN_GCJ_LDADD_LIST += -L../frysk-gtk/Egg
 GEN_GCJ_LDADD_LIST += -L../frysk-gtk/tlwidgets
 GEN_GCJ_LDADD_LIST += $(FRYSK_GUI_LIBS)
 GEN_GCJ_LDADD_LIST += -laudit
+GEN_GCJ_LDADD_LIST += -lasm -ldw -lebl -lelf
 
 # Skip the JUnit tests (exit with status 77) when there is no display; bug #3012.
 #TESTS_ENVIRONMENT = ( test $$tst != TestRunner || test -n "$$DISPLAY" || exit 77 ) && 
diff -up frysk-0.4/frysk-imports/bootstrap.sh.sodwfl frysk-0.4/frysk-imports/bootstrap.sh
--- frysk-0.4/frysk-imports/bootstrap.sh.sodwfl	2008-06-09 14:03:07.000000000 -0400
+++ frysk-0.4/frysk-imports/bootstrap.sh	2010-03-24 19:58:07.000000000 -0400
@@ -51,18 +51,6 @@ FILE_LIST="\
 ./common/Makefile.gen.sh $FILE_LIST
 
 (
-    cd elfutils
-    echo "Running aclocal ... for elfutils"
-    aclocal -I m4
-    echo "Running autoconf ... for elfutils"
-    autoconf -Werror
-    echo "Running autoheader ... for elfutils"
-    autoheader -Werror
-    echo "Running automake ... for elfutils"
-    automake -Werror --add-missing 
-)
-
-(
     cd antlr
     echo "Running autoconf ... for antlr"
     autoconf -Werror -f
diff -up frysk-0.4/frysk-imports/configure.ac.sodwfl frysk-0.4/frysk-imports/configure.ac
--- frysk-0.4/frysk-imports/configure.ac.sodwfl	2008-06-09 14:03:07.000000000 -0400
+++ frysk-0.4/frysk-imports/configure.ac	2010-03-24 19:58:07.000000000 -0400
@@ -61,6 +61,6 @@ AC_CONFIG_FILES([
 # list of configured subdirectories so that it can be included in
 # "make dist" (or the recursive "make distdir").
 
-AC_CONFIG_SUBDIRS([elfutils libunwind libunwind-i386 libunwind-x86_64 libunwind-ppc32 libunwind-ppc64])
+AC_CONFIG_SUBDIRS([libunwind libunwind-i386 libunwind-x86_64 libunwind-ppc32 libunwind-ppc64])
 
 AC_OUTPUT
diff -up frysk-0.4/frysk-imports/Makefile.am.sodwfl frysk-0.4/frysk-imports/Makefile.am
--- frysk-0.4/frysk-imports/Makefile.am.sodwfl	2008-06-09 14:03:07.000000000 -0400
+++ frysk-0.4/frysk-imports/Makefile.am	2010-03-24 19:58:07.000000000 -0400
@@ -58,7 +58,6 @@ LIBUNWIND_ARCH_DIRS = libunwind-i386 lib
 CHECK_SUBDIRS = \
 	jline \
 	junit \
-	elfutils \
 	getopt \
 	tests \
 	$(LIBUNWIND_DIR)
@@ -86,11 +85,6 @@ GEN_CLASSPATH += getopt.jar
 GEN_CLASSPATH += junit.jar
 GEN_GCJ_LDADD_LIST += libfrysk-getopt.a
 GEN_GCJ_LDADD_LIST += libfrysk-junit.a
-GEN_GCJ_LDADD_LIST += ./elfutils/libasm/libasm.a
-GEN_GCJ_LDADD_LIST += ./elfutils/libdwfl/libdwfl.a
-GEN_GCJ_LDADD_LIST += ./elfutils/libdw/libdw.a
-GEN_GCJ_LDADD_LIST += ./elfutils/libebl/libebl.a
-GEN_GCJ_LDADD_LIST += ./elfutils/libelf/libelf.a
 GEN_GCJ_LDADD_LIST += -lstdc++
 GEN_GCJ_LDADD_LIST += ./libunwind-i386/src/.libs/libunwind-x86.a
 GEN_GCJ_LDADD_LIST += ./libunwind-x86_64/src/.libs/libunwind-x86_64.a
diff -up frysk-0.4/frysk-imports/tests/Makefile.am.sodwfl frysk-0.4/frysk-imports/tests/Makefile.am
--- frysk-0.4/frysk-imports/tests/Makefile.am.sodwfl	2008-06-09 14:03:07.000000000 -0400
+++ frysk-0.4/frysk-imports/tests/Makefile.am	2010-03-24 19:58:07.000000000 -0400
@@ -463,7 +463,6 @@ systests_PASS_PROGRAM += frysk4217/attac
 systests_PASS_PROGRAM += frysk4330/stopkills
 
 # test if /proc/PID/maps has r-xp permissions for the VDSO entry
-frysk4704_vdso_permissions_CFLAGS =  -I$(top_srcdir)/elfutils/libelf
 systests_PASS_PROGRAM += frysk4704/vdso-permissions
 
 # A final variable/inner class test.
@@ -486,10 +485,6 @@ frysk4742/java.sh:
 		\| grep Referee > $@
 	chmod a+x $@
 
-frysk4796_dwfltest_CFLAGS = -I$(top_srcdir)/elfutils/libdwfl \
--I$(top_srcdir)/elfutils/libdw -I$(top_srcdir)/elfutils/libelf
-frysk4796_dwfltest_LDADD = -ldl $(top_builddir)/elfutils/libasm/libasm.a \
-$(top_builddir)/elfutils/libdw/libdw.a \
-$(top_builddir)/elfutils/libebl/libebl.a \
-$(top_builddir)/elfutils/libelf/libelf.a
+frysk4796_dwfltest_LDADD = -ldl -lasm -ldw -lebl -lelf
+frysk4796_dwfltest_CFLAGS = -I/usr/include/elfutils
 systests_PASS_PROGRAM += frysk4796/dwfltest
diff -up frysk-0.4/frysk-sys/lib/dwfl/cni/DwarfDie.cxx.sodwfl frysk-0.4/frysk-sys/lib/dwfl/cni/DwarfDie.cxx
--- frysk-0.4/frysk-sys/lib/dwfl/cni/DwarfDie.cxx.sodwfl	2010-03-24 21:49:32.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/cni/DwarfDie.cxx	2010-03-24 21:49:53.000000000 -0400
@@ -36,9 +36,10 @@
 // modification, you must delete this exception statement from your
 // version and license this file solely under the GPL without
 // exception.
-#include <libdw.h>
+
+#include <elfutils/libdw.h>
 #include <gcj/cni.h>
-#include <dwarf.h>
+#include <elfutils/../dwarf.h>
 #include <stdio.h>
 #include <alloca.h>
 #include <stdlib.h>
diff -up frysk-0.4/frysk-sys/lib/dwfl/DwAccess.shenum.sodwfl frysk-0.4/frysk-sys/lib/dwfl/DwAccess.shenum
--- frysk-0.4/frysk-sys/lib/dwfl/DwAccess.shenum.sodwfl	2010-03-24 20:13:34.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/DwAccess.shenum	2010-03-24 22:08:31.000000000 -0400
@@ -42,7 +42,7 @@
 # in.
 
 CC=${CC:-gcc}
-$CC -dD -E $(dirname $0)/../../../frysk-imports/elfutils/libdw/dwarf.h | awk '
+$CC -dD -E /usr/include/dwarf.h | awk '
     /DW_ACCESS_.* = / {
 	p = $1
 	v = gensub(",","","",$3)
diff -up frysk-0.4/frysk-sys/lib/dwfl/DwAte.shenum.sodwfl frysk-0.4/frysk-sys/lib/dwfl/DwAte.shenum
--- frysk-0.4/frysk-sys/lib/dwfl/DwAte.shenum.sodwfl	2010-03-24 20:14:07.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/DwAte.shenum	2010-03-24 20:14:22.000000000 -0400
@@ -42,7 +42,7 @@
 # in.
 
 CC=${CC:-gcc}
-$CC -dD -E $(dirname $0)/../../../frysk-imports/elfutils/libdw/dwarf.h | awk '
+$CC -dD -E /usr/include/dwarf.h | awk '
     /DW_ATE_.* = / {
 	p = $1
 	v = gensub(",","","",$3)
diff -up frysk-0.4/frysk-sys/lib/dwfl/DwAt.shenum.sodwfl frysk-0.4/frysk-sys/lib/dwfl/DwAt.shenum
--- frysk-0.4/frysk-sys/lib/dwfl/DwAt.shenum.sodwfl	2010-03-24 20:11:25.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/DwAt.shenum	2010-03-24 20:11:49.000000000 -0400
@@ -42,7 +42,7 @@
 # in.
 
 CC=${CC:-gcc}
-$CC -dD -E $(dirname $0)/../../../frysk-imports/elfutils/libdw/dwarf.h | awk '
+$CC -dD -E /usr/include/dwarf.h | awk '
     /DW_AT_.* = / {
 	p = $1
 	v = gensub(",","","",$3)
diff -up frysk-0.4/frysk-sys/lib/dwfl/DwDsc.shenum.sodwfl frysk-0.4/frysk-sys/lib/dwfl/DwDsc.shenum
--- frysk-0.4/frysk-sys/lib/dwfl/DwDsc.shenum.sodwfl	2010-03-24 20:17:00.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/DwDsc.shenum	2010-03-24 20:17:24.000000000 -0400
@@ -42,7 +42,7 @@
 # in.
 
 CC=${CC:-gcc}
-$CC -dD -E $(dirname $0)/../../../frysk-imports/elfutils/libdw/dwarf.h | awk '
+$CC -dD -E /usr/include/dwarf.h | awk '
     /DW_DSC_.* = / {
 	p = $1
 	v = gensub(",","","",$3)
diff -up frysk-0.4/frysk-sys/lib/dwfl/DwDs.shenum.sodwfl frysk-0.4/frysk-sys/lib/dwfl/DwDs.shenum
--- frysk-0.4/frysk-sys/lib/dwfl/DwDs.shenum.sodwfl	2010-03-24 20:16:10.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/DwDs.shenum	2010-03-24 20:16:28.000000000 -0400
@@ -42,7 +42,7 @@
 # in.
 
 CC=${CC:-gcc}
-$CC -dD -E $(dirname $0)/../../../frysk-imports/elfutils/libdw/dwarf.h | awk '
+$CC -dD -E /usr/include/dwarf.h | awk '
     /DW_DS_.* = / {
 	p = $1
 	v = gensub(",","","",$3)
diff -up frysk-0.4/frysk-sys/lib/dwfl/DwEnd.shenum.sodwfl frysk-0.4/frysk-sys/lib/dwfl/DwEnd.shenum
--- frysk-0.4/frysk-sys/lib/dwfl/DwEnd.shenum.sodwfl	2010-03-24 20:18:38.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/DwEnd.shenum	2010-03-24 20:18:53.000000000 -0400
@@ -42,7 +42,7 @@
 # in.
 
 CC=${CC:-gcc}
-$CC -dD -E $(dirname $0)/../../../frysk-imports/elfutils/libdw/dwarf.h | awk '
+$CC -dD -E /usr/include/dwarf.h | awk '
     /DW_END_.* = / {
 	p = $1
 	v = gensub(",","","",$3)
diff -up frysk-0.4/frysk-sys/lib/dwfl/DwInl.shenum.sodwfl frysk-0.4/frysk-sys/lib/dwfl/DwInl.shenum
--- frysk-0.4/frysk-sys/lib/dwfl/DwInl.shenum.sodwfl	2010-03-24 20:08:28.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/DwInl.shenum	2010-03-24 20:09:47.000000000 -0400
@@ -42,7 +42,7 @@
 # in.
 
 CC=${CC:-gcc}
-$CC -dD -E $(dirname $0)/../../../frysk-imports/elfutils/libdw/dwarf.h | awk '
+$CC -dD -E /usr/include/dwarf.h | awk '
     /DW_INL_.* = / {
 	p = $1
 	v = gensub(",","","",$3)
diff -up frysk-0.4/frysk-sys/lib/dwfl/DwOp.shenum.sodwfl frysk-0.4/frysk-sys/lib/dwfl/DwOp.shenum
--- frysk-0.4/frysk-sys/lib/dwfl/DwOp.shenum.sodwfl	2010-03-24 20:17:35.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/DwOp.shenum	2010-03-24 20:23:06.000000000 -0400
@@ -42,7 +42,8 @@
 # in.
 
 CC=${CC:-gcc}
-$CC -dD -E $(dirname $0)/../../../frysk-imports/elfutils/libdw/dwarf.h | awk '
+$CC -dD -E /usr/include/dwarf.h | awk '
+    /lo_user/ || /hi_user/ { next }
     /DW_OP_.* = / {
 	p = $1
 	v = gensub(",","","",$3)
diff -up frysk-0.4/frysk-sys/lib/dwfl/DwOrd.shenum.sodwfl frysk-0.4/frysk-sys/lib/dwfl/DwOrd.shenum
--- frysk-0.4/frysk-sys/lib/dwfl/DwOrd.shenum.sodwfl	2010-03-24 20:15:46.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/DwOrd.shenum	2010-03-24 20:15:59.000000000 -0400
@@ -42,7 +42,7 @@
 # in.
 
 CC=${CC:-gcc}
-$CC -dD -E $(dirname $0)/../../../frysk-imports/elfutils/libdw/dwarf.h | awk '
+$CC -dD -E /usr/include/dwarf.h | awk '
     /DW_ORD_.* = / {
 	p = $1
 	v = gensub(",","","",$3)
diff -up frysk-0.4/frysk-sys/lib/dwfl/DwTag.shenum.sodwfl frysk-0.4/frysk-sys/lib/dwfl/DwTag.shenum
--- frysk-0.4/frysk-sys/lib/dwfl/DwTag.shenum.sodwfl	2010-03-24 20:11:19.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/DwTag.shenum	2010-03-24 20:12:11.000000000 -0400
@@ -42,7 +42,7 @@
 # in.
 
 CC=${CC:-gcc}
-$CC -dD -E $(dirname $0)/../../../frysk-imports/elfutils/libdw/dwarf.h | awk '
+$CC -dD -E /usr/include/dwarf.h | awk '
     /DW_TAG_/ {
 	p = $1
 	v = gensub(",","","",$3)
diff -up frysk-0.4/frysk-sys/lib/dwfl/jni/DwarfDie.cxx.sodwfl frysk-0.4/frysk-sys/lib/dwfl/jni/DwarfDie.cxx
--- frysk-0.4/frysk-sys/lib/dwfl/jni/DwarfDie.cxx.sodwfl	2010-03-24 21:45:24.000000000 -0400
+++ frysk-0.4/frysk-sys/lib/dwfl/jni/DwarfDie.cxx	2010-03-24 21:46:01.000000000 -0400
@@ -40,8 +40,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <libdw.h>
-#include <dwarf.h>
+#include <elfutils/libdw.h>
+#include <elfutils/../dwarf.h>
 
 #include "jni.hxx"
 
diff -up frysk-0.4/frysk-sys/Makefile.am.sodwfl frysk-0.4/frysk-sys/Makefile.am
--- frysk-0.4/frysk-sys/Makefile.am.sodwfl	2010-03-24 20:04:31.000000000 -0400
+++ frysk-0.4/frysk-sys/Makefile.am	2010-03-24 21:56:41.000000000 -0400
@@ -53,11 +53,6 @@ GEN_GCJ_LDADD_LIST += ../frysk-imports/l
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libfrysk-junit.a
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libfrysk-getopt.a
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libfrysk-jdom.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libasm/libasm.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libdwfl/libdwfl.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libdw/libdw.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libebl/libebl.a
-GEN_GCJ_LDADD_LIST += ../frysk-imports/elfutils/libelf/libelf.a
 if USE_LIBUNWIND
 GEN_GCJ_LDADD_LIST += ../frysk-imports/libunwind-i386/src/.libs/libunwind-x86.a \
                  ../frysk-imports/libunwind-x86_64/src/.libs/libunwind-x86_64.a \
@@ -65,6 +60,8 @@ GEN_GCJ_LDADD_LIST += ../frysk-imports/l
                  ../frysk-imports/libunwind-ppc64/src/.libs/libunwind-ppc64.a
 endif
 GEN_GCJ_LDADD_LIST += -lstdc++ -laudit
+GEN_GCJ_LDADD_LIST += -lasm -ldw -lebl -lelf
+
 
 # Force a few dependencies
 lib/unwind/cni/Unwind%.cxx: lib/unwind/Unwind%.java lib/unwind/cni/UnwindH.hxx
@@ -74,12 +71,6 @@ lib/unwind/Unwind%.java: lib/unwind/Unwi
 # Depend on these runtimes.
 JNI_LIBRARY_LIST += -lstdc++
 JNI_LIBRARY_LIST += -laudit
-# Bundle in the local elfutils code.
-JNI_ARCHIVE_LIST += ../frysk-imports/elfutils/libasm/libasm_pic.a
-JNI_ARCHIVE_LIST += ../frysk-imports/elfutils/libdwfl/libdwfl_pic.a
-JNI_ARCHIVE_LIST += ../frysk-imports/elfutils/libdw/libdw_pic.a
-JNI_ARCHIVE_LIST += ../frysk-imports/elfutils/libelf/libelf_pic.a
-JNI_ARCHIVE_LIST += ../frysk-imports/elfutils/libebl/libebl.a
 # Bundle in the local libunwind code.
 JNI_OBJECT_LIST += ../frysk-imports/libunwind-i386/src/{,dwarf/,mi/,x86/}.libs/*.o
 JNI_OBJECT_LIST += ../frysk-imports/libunwind-x86_64/src/{,dwarf/,mi/,x86_64/}.libs/*.o


Index: frysk.spec
===================================================================
RCS file: /cvs/pkgs/rpms/frysk/devel/frysk.spec,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -p -r1.158 -r1.159
--- frysk.spec	25 Mar 2010 16:41:34 -0000	1.158
+++ frysk.spec	25 Mar 2010 22:53:57 -0000	1.159
@@ -1,7 +1,7 @@
 Summary:	Execution analysis and debugging tool-suite.
 Name:		frysk
 Version:	0.4
-Release:	20%{?dist}
+Release:	21%{?dist}
 
 # antlrv2 is Public Domain; antlrv3 is BSD.
 # getopt is GPLv2 with exception
@@ -17,7 +17,7 @@ URL:		http://sourceware.org/frysk
 Source:		ftp://sourceware.org/pub/frysk/%{name}-%{version}.tar.bz2
 
 # Import unreleased fixes
-Patch0:	 	    frysk-0.4-head.patch
+Patch0:	 	frysk-0.4-head.patch
 
 # Local fixes.
 Patch1:		frysk-0.4-bash-dollar-star.patch
@@ -34,10 +34,20 @@ Patch10:	frysk-0.4-noelfmem.patch
 Patch100:	frysk-0.4-aclocaljavac.patch
 
 # Do not push these upstream
-Patch1001:	frysk-0.4-elfutilsdeps.patch
-Patch1002:	frysk-0.4-elfutilsfstat.patch
 Patch1003:	frysk-0.4-nogtkwerror.patch
 
+# Use installed elfutils
+Patch666:	frysk-0.4-sodwfl.patch
+
+# revert to 0.133 removing local and fedora rpm fixes
+Patch1004:	frysk-0.4-elfutils-fixesout.patch
+Patch1005:	frysk-0.4-elfutils-rpmout.patch
+Patch1006:	frysk-0.4-elfutils-head.patch
+Patch1007:	frysk-0.4-elfutils-offt.patch
+Patch1100:	frysk-0.4-elfutils-maphack.patch
+Patch1101:	frysk-0.4-elfutils-ldadd.patch
+Patch1102:	frysk-0.4-elfutils-louser.patch
+
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 BuildRequires:  gcc-java >= 4.1.2
@@ -59,6 +69,10 @@ BuildRequires:	transfig >= 3.2.0 
 BuildRequires:	gnome-python2-gconf
 BuildRequires:	audit-libs-devel
 BuildRequires:	autoconf automake libtool
+BuildRequires:	bison >= 1.875
+BuildRequires:	flex >= 2.5.4a
+BuildRequires:	zlib-devel >= 1.2.2.3
+BuildRequires:	bzip2-devel
 # Some generation scripts are being written in python
 BuildRequires:	python
 
@@ -148,10 +162,23 @@ mv frysk-core/frysk/util/ProcStopUtil.ja
 %patch100 -p1 -z .aclocaljavac
 %endif
 
-%patch1001 -p1 -z .elfutilsdeps
-%patch1002 -p1 -z .elfutilsfstat
 %patch1003 -p1 -z .nogtkwerror
 
+%if %{fedora}0 >= 200
+rm -rf frysk-imports/elfutils
+%patch666 -p1 -z .sodwfl
+%else
+cd frysk-imports/elfutils
+%patch1004 -p1 -z .elfutils-fixesout
+%patch1005 -p1 -z .elfutils-rpmout
+%patch1006 -p1 -z .elfutils-head
+%patch1007 -p1 -z .elfutils-offt
+cd ../..
+%patch1100 -p1 -z .elfutils-maphack
+%patch1101 -p1 -z .elfutils-ldadd
+%patch1102 -p1 -z .elfutils-louser
+%endif
+
 echo "%{version}-%{release}" > frysk-common/version.in
 
 ./bootstrap.sh
@@ -321,6 +348,10 @@ rm -rf %{buildroot}
 %{_mandir}/man1/frysk.1.gz
 
 %changelog
+* Thu Mar 25 2010 Andrew Cagney <cagney [at] fedoraproject.org> - 0.4-21
+- Merge 0.145 elfutils and local fixes.  This is Plan B, Plan A was to
+  use the installed elfutils.
+
 * Thu Mar 25 2010 Andrew Cagney <cagney [at] fedoraproject.org> - 0.4-20
 - Don't use elf_from_remote_memory - frysk-0.4-noelfmem.patch.
 


--- frysk-0.4-elfutilsdeps.patch DELETED ---


--- frysk-0.4-elfutilsfstat.patch DELETED ---



More information about the scm-commits mailing list