PERFORCE change 100445 for review

John Birrell jb at FreeBSD.org
Sun Jul 2 20:48:31 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=100445

Change 100445 by jb at jb_freebsd2 on 2006/07/02 20:48:21

	Update libdwarf to libdwarf-20041112 which matches the one in ports.
	It contains a few updates since Sun started using it in OpenSolaris.
	
	Curiously, it looks like OpenSolaris only uses this library on Intel
	architecture. They just distributed a shared library on Sparc
	which must be encumbered. That's just a guess.

Affected files ...

.. //depot/projects/dtrace/src/contrib/libdwarf/CHANGES#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/COPYING#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/ChangeLog#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/LIBDWARFCOPYRIGHT#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/Makefile.in#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/NEWS#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/README#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/bldDWindex.sh#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/cmplrs/dwarf_addr_finder.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/config.guess#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/config.h.in#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/config.sub#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/configure#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/configure.in#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf.v2.mm#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf.v2.ps#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_abbrev.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_abbrev.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_addr_finder.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_alloc.c#3 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_alloc.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_arange.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_arange.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_base_types.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_die_deliv.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_die_deliv.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_error.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_error.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_form.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_frame.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_frame.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_funcs.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_funcs.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_global.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_global.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_incl.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_init_finish.c#4 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_leb.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_line.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_line.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_loc.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_loc.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_macro.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_macro.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_opaque.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_print_lines.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_query.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_sort_line.c#3 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_string.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_stubs.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_types.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_types.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_util.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_util.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_vars.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_vars.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_weaks.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/dwarf_weaks.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/index.v2.mm#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/index.v2.ps#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/install.sh#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/libdwarf.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/libdwarf2.1.mm#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/libdwarf2.1.ps#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/libdwarf2p.1.mm#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/libdwarf2p.1.ps#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/libdwarfdefs.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/mips_extensions.mm#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/mips_extensions.ps#1 add
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_alloc.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_alloc.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_arange.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_arange.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_die.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_die.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_encode_nm.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_encode_nm.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_error.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_error.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_expr.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_expr.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_finish.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_forms.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_frame.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_frame.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_funcs.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_incl.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_init.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_line.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_line.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_macinfo.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_macinfo.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_opaque.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_pubnames.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_reloc.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_reloc.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_reloc_stream.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_reloc_stream.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_reloc_symbolic.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_reloc_symbolic.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_section.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_section.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_types.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_types.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_util.h#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_vars.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/pro_weaks.c#2 edit
.. //depot/projects/dtrace/src/contrib/libdwarf/t.c#1 add

Differences ...

==== //depot/projects/dtrace/src/contrib/libdwarf/COPYING#2 (text) ====

@@ -26,6 +26,6 @@
 	These documents are substantial revisions, done at SGI, of
 	previous libdwarf work.  
 
-$Source: /plroot/cmplrs.src/v7.4.2m/.RCS/PL/libdwarf/RCS/COPYING,v $
+$Source: /plroot/cmplrs.src/v7.4.4m/.RCS/PL/libdwarf/RCS/COPYING,v $
 $Revision: 1.2 $
 $Date: 2001/01/16 17:08:36 $

==== //depot/projects/dtrace/src/contrib/libdwarf/ChangeLog#2 (text) ====

@@ -1,8 +1,55 @@
+2004-11-21 David Anderson <davea at sgi.com>
+     *  configure.in libdwarfdefs.h: Now tests more precisely for __uint32_t
+	and __uint64_t (previous test was not sufficient for debian/mips). 
+	Regenerated configure config.h.in.
+
+2004-10-28 David Anderson <davea at sgi.com>
+      * LIBDWARFCOPYRIGHT Makefile.in NEWS config.h dwarf_abbrev.c 
+        dwarf_abbrev.h dwarf_addr_finder.c dwarf_alloc.c dwarf_alloc.h
+        dwarf_arange.c dwarf_arange.h dwarf_base_types.h dwarf_die_deliv.c
+        dwarf_die_deliv.h dwarf_error.c dwarf_error.h dwarf_form.c
+        dwarf_frame.c dwarf_frame.h dwarf_funcs.c dwarf_funcs.h
+        dwarf_global.c dwarf_global.h dwarf_incl.h dwarf_init_finish.c
+	dwarf_leb.c dwarf_line.c dwarf_line.h dwarf_loc.c dwarf_loc.h
+	dwarf_macro.c dwarf_macro.h dwarf_opaque.h dwarf_print_lines.c
+	dwarf_query.c dwarf_sort_line.c dwarf_string.c dwarf_stubs.c
+	dwarf_types.c dwarf_types.h dwarf_util.c dwarf_util.h
+	dwarf_vars.c dwarf_vars.h dwarf_weaks.c dwarf_weaks.h
+	libdwarfdefs.h pro_alloc.c pro_alloc.h pro_arange.c pro_arange.h
+	pro_die.c pro_die.h pro_encode_nm.c pro_encode_nm.h pro_error.c
+	pro_error.h pro_expr.c pro_expr.h pro_finish.c pro_forms.c
+	pro_frame.c pro_frame.h pro_funcs.c pro_funcs.h pro_incl.h
+	pro_init.c pro_line.c pro_line.h pro_macinfo.c pro_macinfo.h
+	pro_opaque.h pro_pubnames.c pro_pubnames.h pro_reloc.c
+	pro_reloc.h pro_reloc_stream.c pro_reloc_stream.h pro_reloc_symbolic.c
+	pro_reloc_symbolic.h pro_section.c pro_section.h pro_types.c
+	pro_types.h pro_util.c pro_util.h pro_vars.c pro_vars.h
+	pro_weaks.c pro_weaks.h: Copyright update with
+        2004 and new SGI official address.
+
+2004-10-26 David Anderson <davea at sgi.com>
+      * acconfig.h: removed. Was old style autoconf usage.
+      * configure.in: Updated AC_DEFINE usage, adding args 2 & 3.
+      * config.guess: Updated. timestamp='2004-06-11'.
+      * config.sub: Updated.  timestamp='2004-03-12'.
+      * configure config.h.in: regenerated with autoconf 2.58.
+
+2004-06-09  David Anderson <davea at sgi.com>
+      * dwarf_frame.c (_dwarf_exec_frame_instr):
+        Was not setting ru_offset to 1 in DW_CFA_def_cfa_offset 
+        case, now it does.
+
+2004-02-24  David Anderson <davea at sgi.com>
+      * dwarf_frame.c (_dwarf_exec_frame_instr):
+        DW_CFA_def_cfa_register case, was setting offset, which
+        is incorrect. Thanks to Tom Hughes <thh at cyberscience.com>
+        for pointing this out.
+
 2004-02-03 David Anderson <davea at sgi.com>
       * dwarf_util.h:  DECODE_LEB128_UWORD DECODE_LEB128_SWORD
         were simply wrong if  Dwarf_Word or
-        Dwarf_Sword longer than 4 bytes. Upper bits left random and
-        large values not extracted correcty.
+        Dwarf_Sword longer than 4 bytes. Upper bits left random. 
+        Large values not extracted correctly.
 
 2004-01-15 David Anderson <davea at sgi.com>
       * dwarf_alloc.c pro_alloc.c pro_init.c: changing BSD-ish bzero()

==== //depot/projects/dtrace/src/contrib/libdwarf/LIBDWARFCOPYRIGHT#2 (text) ====

@@ -1,4 +1,4 @@
-  Copyright (C) 2000 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000,2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License
@@ -20,7 +20,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307,
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/cmplrs/dwarf_addr_finder.h#2 (text) ====

@@ -1,6 +1,6 @@
 /*
    dwarf_addr_finder.h
-   $Source: /plroot/cmplrs.src/v7.4.2m/.RCS/PL/include/cmplrs/RCS/dwarf_addr_finder.h,v $
+   $Source: /plroot/cmplrs.src/v7.4.4m/.RCS/PL/include/cmplrs/RCS/dwarf_addr_finder.h,v $
    $Date: 2002/06/11 17:49:06 $
 
    Defines user interface.

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf.h#2 (text) ====

@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000, 2001, 2003, 2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License
@@ -21,7 +21,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307,
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com
@@ -41,10 +41,19 @@
 
 /*
 	dwarf.h   DWARF  debugging information values
-	$Revision: 1.29 $    $Date: 2003/02/05 22:57:01 $    
+	$Revision: 1.31 $    $Date: 2004/10/27 23:24:15 $    
 
 	The comment "DWARF3" appears where there are
-	new entries from DWARF3.
+	new entries from DWARF3, and other comments apply
+	where extension entries appear.
+
+ 	A few extension names have omitted the 'vendor id'
+        (See chapter 7, "Vendor Extensibility"). Please
+	always use a 'vendor id' string in extension names.
+
+	Vendors should use a vendor string in names and
+	whereever possible avoid duplicating values used by
+	other vendor extensions 
 
 */
 
@@ -86,7 +95,7 @@
 #define DW_TAG_file_type		0x29
 #define DW_TAG_friend			0x2a
 #define DW_TAG_namelist			0x2b
-	/* Previous releases of this header had the following
+	/* Early releases of this header had the following
 	   misspelled with a trailing 's' */
 #define DW_TAG_namelist_item		0x2c /* DWARF3/2 spelling */
 #define DW_TAG_namelist_items		0x2c /* SGI misspelling/typo */
@@ -113,23 +122,30 @@
 #define DW_TAG_imported_unit		0x3d  /* DWARF3 */
 #define DW_TAG_mutable_type		0x3e  /* DWARF3 */
 #define DW_TAG_lo_user			0x4080
+
 #define DW_TAG_MIPS_loop		0x4081
-#define DW_TAG_hi_user			0xffff
+
+/* HP extensions: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz  */
+#define DW_TAG_HP_array_descriptor      0x4090 /* HP */
 
-/* The following 3 are GNU extensions 
-   The TAG names are as if the extensions were dwarf standard,
-   not extensions.
-*/
-#define DW_TAG_format_label             0x4101 /* for FORTRAN 77, Fortran 90 */
-#define DW_TAG_function_template        0x4102 /* for C++ */
-#define DW_TAG_class_template           0x4103 /* for C++ */
+/* GNU extensions.  The first 3 missing the GNU_. */
+#define DW_TAG_format_label             0x4101 /* GNU. Fortran. */
+#define DW_TAG_function_template        0x4102 /* GNU. For C++ */
+#define DW_TAG_class_template           0x4103 /* GNU. For C++ */
+#define DW_TAG_GNU_BINCL                0x4104 /* GNU */
+#define DW_TAG_GNU_EINCL                0x4105 /* GNU */
 
 /* The following 3 are extensions to support UPC */
 #define DW_TAG_upc_shared_type          0x8765 /* UPC */
 #define DW_TAG_upc_strict_type          0x8766 /* UPC */
 #define DW_TAG_upc_relaxed_type         0x8767 /* UPC */
 
+/* PGI (STMicroelectronics) extensions. */
+#define DW_TAG_PGI_kanji_type           0xa000 /* PGI */
+#define DW_TAG_PGI_interface_block      0xa020 /* PGI */
 
+#define DW_TAG_hi_user			0xffff
+
 #define DW_children_no			0
 #define DW_children_yes			1
 
@@ -232,35 +248,65 @@
 #define DW_AT_call_file				0x58 /* DWARF3 */
 #define DW_AT_call_line				0x59 /* DWARF3 */
 #define DW_AT_description			0x5a /* DWARF3 */
+/* HP extensions. */
+#define DW_AT_HP_block_index                    0x2000  /* HP */
+
 #define DW_AT_lo_user				0x2000
-#define DW_AT_MIPS_fde				0x2001
-#define DW_AT_MIPS_loop_begin			0x2002
-#define DW_AT_MIPS_tail_loop_begin		0x2003
-#define DW_AT_MIPS_epilog_begin			0x2004
-#define DW_AT_MIPS_loop_unroll_factor		0x2005
-#define DW_AT_MIPS_software_pipeline_depth	0x2006
-#define DW_AT_MIPS_linkage_name			0x2007
-#define DW_AT_MIPS_stride		        0x2008
-#define DW_AT_MIPS_abstract_name	        0x2009
-#define DW_AT_MIPS_clone_origin		        0x200a
-#define DW_AT_MIPS_has_inlines		        0x200b
-#define DW_AT_MIPS_stride_byte		        0x200c
-#define DW_AT_MIPS_stride_elem		        0x200d
-#define DW_AT_MIPS_ptr_dopetype			0x200e
-#define DW_AT_MIPS_allocatable_dopetype		0x200f
-#define DW_AT_MIPS_assumed_shape_dopetype	0x2010
-#define DW_AT_MIPS_assumed_size			0x2011
+
+#define DW_AT_MIPS_fde				0x2001 /* MIPS/SGI */
+#define DW_AT_MIPS_loop_begin			0x2002 /* MIPS/SGI */
+#define DW_AT_MIPS_tail_loop_begin		0x2003 /* MIPS/SGI */
+#define DW_AT_MIPS_epilog_begin			0x2004 /* MIPS/SGI */
+#define DW_AT_MIPS_loop_unroll_factor		0x2005 /* MIPS/SGI */
+#define DW_AT_MIPS_software_pipeline_depth	0x2006 /* MIPS/SGI */
+#define DW_AT_MIPS_linkage_name			0x2007 /* MIPS/SGI */
+#define DW_AT_MIPS_stride		        0x2008 /* MIPS/SGI */
+#define DW_AT_MIPS_abstract_name	        0x2009 /* MIPS/SGI */
+#define DW_AT_MIPS_clone_origin		        0x200a /* MIPS/SGI */
+#define DW_AT_MIPS_has_inlines		        0x200b /* MIPS/SGI */
+#define DW_AT_MIPS_stride_byte		        0x200c /* MIPS/SGI */
+#define DW_AT_MIPS_stride_elem		        0x200d /* MIPS/SGI */
+#define DW_AT_MIPS_ptr_dopetype			0x200e /* MIPS/SGI */
+#define DW_AT_MIPS_allocatable_dopetype		0x200f /* MIPS/SGI */
+#define DW_AT_MIPS_assumed_shape_dopetype	0x2010 /* MIPS/SGI */
+#define DW_AT_MIPS_assumed_size			0x2011 /* MIPS/SGI */
+
+/* HP extensions. */
+#if 0
+#define DW_AT_HP_unmodifiable                   0x2001 /* conflict: MIPS */
+#define DW_AT_HP_actuals_stmt_list              0x2010 /* conflict: MIPS */
+#define DW_AT_HP_proc_per_section               0x2011 /* conflict: MIPS */
+#endif
+#define DW_AT_HP_raw_data_ptr                   0x2012 /* HP */
+#define DW_AT_HP_pass_by_reference              0x2013 /* HP */
+#define DW_AT_HP_opt_level                      0x2014 /* HP */
+#define DW_AT_HP_prof_version_id                0x2015 /* HP */
+#define DW_AT_HP_opt_flags                      0x2016 /* HP */
+#define DW_AT_HP_cold_region_low_pc             0x2017 /* HP */
+#define DW_AT_HP_cold_region_high_pc            0x2018 /* HP */
+#define DW_AT_HP_all_variables_modifiable       0x2019 /* HP */
+#define DW_AT_HP_linkage_name                   0x201a /* HP */
+#define DW_AT_HP_prof_flags                     0x201b /* HP */
+
+
+/* GNU extensions. */
+#define DW_AT_sf_names                          0x2101 /* GNU */
+#define DW_AT_src_info                          0x2102 /* GNU */
+#define DW_AT_mac_info                          0x2103 /* GNU */
+#define DW_AT_src_coords                        0x2104 /* GNU */
+#define DW_AT_body_begin                        0x2105 /* GNU */
+#define DW_AT_body_end                          0x2106 /* GNU */
+#define DW_AT_GNU_vector                        0x2107 /* GNU */
+
+/* VMS extensions. */
+#define DW_AT_VMS_rtnbeg_pd_address             0x2201 /* VMS */
+
+/* PGI (STMicroelectronics) extensions. */
+#define DW_AT_PGI_lbase                         0x3a00 /* PGI */
+#define DW_AT_PGI_soffset                       0x3a01 /* PGI */
+#define DW_AT_PGI_lstride                       0x3a02 /* PGI */
 
 
-/* GNU extensions, currently not used in dwarf2 by egcs 
-   Mostly dwarf1 extensions not needed in dwarf2?
-*/
-#define DW_AT_sf_names                          0x2101
-#define DW_AT_src_info                          0x2102
-#define DW_AT_mac_info                          0x2103
-#define DW_AT_src_coords                        0x2104
-#define DW_AT_body_begin                        0x2105
-#define DW_AT_body_end                          0x2106
 /* UPC extension */
 #define DW_AT_upc_threads_scaled                0x3210 /* UPC */
 
@@ -416,7 +462,22 @@
 #define DW_OP_call2			0x98 /* DWARF3 */
 #define DW_OP_call4			0x99 /* DWARF3 */
 #define DW_OP_call_ref			0x9a /* DWARF3 */
+
+    /* GNU extensions. */
+#define DW_OP_GNU_push_tls_address      0xe0 /* GNU */
 #define DW_OP_lo_user			0xe0
+
+    /* HP extensions. */
+#if 0
+#define DW_OP_HP_unknown                0xe0 /* HP conflict: GNU */
+#endif
+#define DW_OP_HP_is_value               0xe1 /* HP */
+#define DW_OP_HP_fltconst4              0xe2 /* HP */
+#define DW_OP_HP_fltconst8              0xe3 /* HP */
+#define DW_OP_HP_mod_range              0xe4 /* HP */
+#define DW_OP_HP_unmod_range            0xe5 /* HP */
+#define DW_OP_HP_tls                    0xe6 /* HP */
+
 #define DW_OP_hi_user			0xff
 
 #define DW_ATE_address			0x1
@@ -428,7 +489,20 @@
 #define DW_ATE_unsigned			0x7
 #define DW_ATE_unsigned_char		0x8
 #define DW_ATE_imaginary_float		0x9  /* DWARF3 */
+
+/* HP Floating point extensions. */
+#define DW_ATE_HP_float80             0x80 /* (80 bit). HP */
+
 #define DW_ATE_lo_user			0x80
+
+/* HP Floating point extensions. */
+#define DW_ATE_HP_complex_float80     0x81 /* Complex (80 bit). HP  */    
+#define DW_ATE_HP_float128            0x82 /* (128 bit). HP */
+#define DW_ATE_HP_complex_float128    0x83 /* Complex (128 bit). HP */
+#define DW_ATE_HP_floathpintel        0x84 /* (82 bit IA64). HP */
+#define DW_ATE_HP_imaginary_float80   0x85 /* HP */
+#define DW_ATE_HP_imaginary_float128  0x86 /* HP */
+
 #define DW_ATE_hi_user			0xff
 
 #define DW_ACCESS_public		1
@@ -459,7 +533,7 @@
 #define DW_LANG_Fortran95		0x000e /* DWARF3 */
 #define DW_LANG_PLI			0x000f /* DWARF3 */
 #define DW_LANG_lo_user			0x8000
-#define DW_LANG_Mips_Assembler		0x8001
+#define DW_LANG_Mips_Assembler		0x8001 /* MIPS   */
 #define DW_LANG_Upc                     0x8765 /* UPC */
 #define DW_LANG_hi_user			0xffff
 
@@ -472,7 +546,8 @@
 #define DW_CC_normal			0x1
 #define DW_CC_program			0x2
 #define DW_CC_nocall			0x3
-#define DW_CC_lo_user			0x40
+#define DW_CC_lo_user			0x40 
+
 #define DW_CC_hi_user			0xff
 
 #define DW_INL_not_inlined		0
@@ -502,6 +577,19 @@
 #define DW_LNE_end_sequence		1
 #define DW_LNE_set_address		2
 #define DW_LNE_define_file		3
+
+/* HP extensions. */
+#define DW_LNE_HP_negate_is_UV_update       0x11 /* 17 HP */
+#define DW_LNE_HP_push_context              0x12 /* 18 HP */
+#define DW_LNE_HP_pop_context               0x13 /* 19 HP */
+#define DW_LNE_HP_set_file_line_column      0x14 /* 20 HP */
+#define DW_LNE_HP_set_routine_name          0x15 /* 21 HP */
+#define DW_LNE_HP_set_sequence              0x16 /* 22 HP */
+#define DW_LNE_HP_negate_post_semantics     0x17 /* 23 HP */
+#define DW_LNE_HP_negate_function_exit      0x18 /* 24 HP */
+#define DW_LNE_HP_negate_front_end_logical  0x19 /* 25 HP */
+#define DW_LNE_HP_define_proc               0x20 /* 32 HP */
+
 #define DW_LNE_lo_user			128 /* DWARF3 */
 #define DW_LNE_hi_user			255 /* DWARF3 */
 
@@ -511,7 +599,7 @@
 #define DW_MACINFO_end_file		4
 #define DW_MACINFO_vendor_ext		255
 
-#define DW_CFA_advance_loc        0x40
+#define DW_CFA_advance_loc        0x40 
 #define DW_CFA_offset             0x80
 #define DW_CFA_restore            0xc0
 #define DW_CFA_extended           0
@@ -538,11 +626,14 @@
 #define DW_CFA_def_cfa_offset_sf 0x13      /* DWARF3 */
 
 #define DW_CFA_low_user          0x1c
-#define DW_CFA_MIPS_advance_loc8 0x1d
+
+/* SGI/MIPS extension. */
+#define DW_CFA_MIPS_advance_loc8 0x1d   /* MIPS */
 
-/* the following two from egcs-1.1.2 */
-#define DW_CFA_GNU_window_save   0x2d 
-#define DW_CFA_GNU_args_size     0x2e
+/* GNU extensions. */
+#define DW_CFA_GNU_window_save   0x2d  /* GNU */
+#define DW_CFA_GNU_args_size     0x2e /* GNU */
+#define DW_CFA_GNU_negative_offset_extended  0x2f /* GNU */
 
 #define DW_CFA_high_user         0x3f
 

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_abbrev.c#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000,2001 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000,2001,2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_abbrev.h#2 (text) ====

@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_addr_finder.c#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000,2002,2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_alloc.c#3 (text) ====

@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com
@@ -41,9 +41,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#if defined(sun)
 #include <malloc.h>
-#endif
 
 /*
     These files are included to get the sizes

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_alloc.h#2 (text) ====

@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_arange.c#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000,2002,2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_arange.h#2 (text) ====

@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_base_types.h#2 (text) ====

@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_die_deliv.c#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000,2001,2002,2003 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000,2001,2002,2003,2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_die_deliv.h#2 (text) ====

@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_error.c#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000,2002,2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_error.h#2 (text) ====

@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_form.c#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000,2002,2004  Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_frame.c#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000,2002,2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com
@@ -602,9 +602,9 @@
 		    return DW_DLV_ERROR;
 		}
 
-		reg[DW_FRAME_CFA_COL].ru_is_off = 0;
 		reg[DW_FRAME_CFA_COL].ru_register = reg_no;
-		reg[DW_FRAME_CFA_COL].ru_offset = 0;
+		/* Do NOT set ru_offset or ru_is_off here. 
+	           See dwarf2/3 spec.  */
 		fp_register = reg_no;
 		break;
 	    }
@@ -618,6 +618,9 @@
 		    *returned_error = (DW_DLE_DF_NO_CIE_AUGMENTATION);
 		    return DW_DLV_ERROR;
 		}
+		/* Do set ru_is_off here, as here
+	           factored_N_value counts.  */
+	        reg[DW_FRAME_CFA_COL].ru_is_off = 1;  
 		reg[DW_FRAME_CFA_COL].ru_offset = factored_N_value;
 
 		fp_offset = factored_N_value;

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_frame.h#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000, 2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_funcs.c#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000,2002,2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_funcs.h#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000, 2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_global.c#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000,2002,2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_global.h#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000, 2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_incl.h#2 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000, 2002 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000, 2002, 2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com

==== //depot/projects/dtrace/src/contrib/libdwarf/dwarf_init_finish.c#4 (text) ====

@@ -1,6 +1,6 @@
 /*
 
-  Copyright (C) 2000,2002,2003 Silicon Graphics, Inc.  All Rights Reserved.
+  Copyright (C) 2000,2002,2003,2004 Silicon Graphics, Inc.  All Rights Reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2.1 of the GNU Lesser General Public License 
@@ -22,7 +22,7 @@
   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
   USA.
 
-  Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
+  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
   Mountain View, CA 94043, or:
 
   http://www.sgi.com
@@ -52,20 +52,12 @@
 #endif
 #endif /* !defined(__SGI_FAST_LIBELF) */
 
-#include <gelf.h>
-#include <strings.h>
-#if defined(sun)
-#include <sys/elf_386.h>
-#endif
-
 #include <stdio.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(sun)
 #include <malloc.h>
-#endif
 
 #include "dwarf_incl.h"
 
@@ -244,8 +236,6 @@
     }
 #endif /* !defined(__SGI_FAST_LIBELF) */
 
-    dbg->de_nelfsecs = section_count;
-
     if (is_64bit && machine != EM_MIPS) {
         /* MIPS/IRIX makes pointer size and length size 8 for -64.
            Other platforms make length 4 always. */
@@ -686,62 +676,7 @@
     return (DW_DLV_OK);
 }
 
-static Dwarf_Small *
-_dwarf_reloc_section(Dwarf_Debug dbg, Dwarf_Half scnidx, Elf_Data *scndata,
-    Dwarf_Error *error)
-{
-	Elf_Data *reldata;
-	GElf_Rela rela;
-	Elf_Scn *scn;
-	GElf_Shdr shdr;
-	char *newdata;
-	int ridx, rscnidx;
-
-	for (rscnidx = 0; rscnidx < dbg->de_nelfsecs; rscnidx++) {
-		if ((scn = elf_getscn(dbg->de_elf, rscnidx)) == NULL ||
-		    gelf_getshdr(scn, &shdr) == NULL) {
-			_dwarf_error(dbg, error, DW_DLE_LEE);
-			return (NULL);
-		}
-
-		if (shdr.sh_type == SHT_RELA &&
-		    shdr.sh_info == scnidx)
-			break;
-	}
-
-	if (rscnidx == dbg->de_nelfsecs)
-		return (scndata->d_buf);
-
-	if ((reldata = elf_getdata(scn, NULL)) == NULL) {
-		_dwarf_error(dbg, error, DW_DLE_LEE);
-		return (NULL);
-	}
 
-	if ((newdata = malloc(scndata->d_size)) == NULL) {
-		_dwarf_error(dbg, error, DW_DLE_MAF);
-		return (NULL);
-	}
-
-	bcopy(scndata->d_buf, newdata, scndata->d_size);
-
-	for (ridx = 0; ridx < shdr.sh_size / sizeof (GElf_Rela); ridx++) {
-		if (gelf_getrela(reldata, ridx, &rela) == NULL)
-			continue;
-
-		if (GELF_R_TYPE(rela.r_info) != R_386_32 &&
-		    GELF_R_TYPE(rela.r_info) != R_386_GOTPC) {
-			fprintf(stderr, "achtung: tell simmonmt at eng about "
-			    "unexpected reloc type %d\n", 
-			    GELF_R_TYPE(rela.r_info));
-			continue;
-		}
-
-		*(uint32_t *)(newdata + rela.r_offset) = rela.r_addend;
-	}
-
-	return ((Dwarf_Small *)newdata);
-}

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list