Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/elftoolchain/dist Import latest elftoolchain co...



details:   https://anonhg.NetBSD.org/src/rev/2533b38121ec
branches:  trunk
changeset: 343671:2533b38121ec
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 20 02:42:00 2016 +0000

description:
Import latest elftoolchain components needed for CTF from FreeBSD

diffstat:

 external/bsd/elftoolchain/dist/common/Makefile                          |    5 +-
 external/bsd/elftoolchain/dist/common/native-elf-format                 |    8 +-
 external/bsd/elftoolchain/dist/libdwarf/Makefile                        |   15 +-
 external/bsd/elftoolchain/dist/libdwarf/Version.map                     |   13 +-
 external/bsd/elftoolchain/dist/libdwarf/dwarf_attroffset.3              |   88 ++++++
 external/bsd/elftoolchain/dist/libdwarf/dwarf_get_die_infotypes_flag.3  |   75 +++++
 external/bsd/elftoolchain/dist/libdwarf/dwarf_get_section_max_offsets.3 |  118 ++++++++
 external/bsd/elftoolchain/dist/libdwarf/dwarf_next_types_section.3      |  136 ++++++++++
 external/bsd/elftoolchain/dist/libdwarf/dwarf_sections.c                |  113 ++++++++
 external/bsd/elftoolchain/dist/libdwarf/os.NetBSD.mk                    |    2 +
 10 files changed, 567 insertions(+), 6 deletions(-)

diffs (truncated from 769 to 300 lines):

diff -r 05ecffe38374 -r 2533b38121ec external/bsd/elftoolchain/dist/common/Makefile
--- a/external/bsd/elftoolchain/dist/common/Makefile    Sat Feb 20 02:39:47 2016 +0000
+++ b/external/bsd/elftoolchain/dist/common/Makefile    Sat Feb 20 02:42:00 2016 +0000
@@ -1,4 +1,4 @@
-# Id: Makefile 2606 2012-10-02 17:52:57Z jkoshy 
+# Id: Makefile 3022 2014-04-17 18:05:58Z jkoshy 
 
 TOP=   ..
 
@@ -12,4 +12,7 @@
 clean clobber:
        rm -f ${CLEANFILES}
 
+cleandepend:
+       rm -f .depend
+
 .include "${TOP}/mk/elftoolchain.inc.mk"
diff -r 05ecffe38374 -r 2533b38121ec external/bsd/elftoolchain/dist/common/native-elf-format
--- a/external/bsd/elftoolchain/dist/common/native-elf-format   Sat Feb 20 02:39:47 2016 +0000
+++ b/external/bsd/elftoolchain/dist/common/native-elf-format   Sat Feb 20 02:42:00 2016 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Id: native-elf-format 2064 2011-10-26 15:12:32Z jkoshy 
+# Id: native-elf-format 3293 2016-01-07 19:26:27Z emaste 
 #
 # Find the native ELF format for a host platform by compiling a
 # test object and examining the resulting object.
@@ -19,7 +19,7 @@
 echo "/* Generated by ${program} on `date` */"
 
 cc -c ${tmp_c} -o ${tmp_o}
-readelf -h ${tmp_o} | awk '
+LC_ALL=C readelf -h ${tmp_o} | awk '
 $1 ~ "Class:" {
         sub("ELF","",$2); elfclass = $2;
     }
@@ -33,7 +33,9 @@
 $1 ~ "Machine:" {
         if (match($0, "Intel.*386")) {
             elfarch = "EM_386";
-        } else if (match($0, ".*X86-64")) {
+        } else if (match($0, "MIPS")) {
+            elfarch = "EM_MIPS";
+        } else if (match($0, ".*[xX]86-64")) {
             elfarch = "EM_X86_64";
         } else {
             elfarch = "unknown";
diff -r 05ecffe38374 -r 2533b38121ec external/bsd/elftoolchain/dist/libdwarf/Makefile
--- a/external/bsd/elftoolchain/dist/libdwarf/Makefile  Sat Feb 20 02:39:47 2016 +0000
+++ b/external/bsd/elftoolchain/dist/libdwarf/Makefile  Sat Feb 20 02:42:00 2016 +0000
@@ -1,4 +1,4 @@
-# Id: Makefile 2937 2013-04-27 04:48:23Z jkoshy 
+# Id: Makefile 3097 2014-09-02 22:10:18Z kaiwang27 
 
 TOP=   ${.CURDIR}/..
 
@@ -42,6 +42,7 @@
        dwarf_pubtypes.c        \
        dwarf_ranges.c          \
        dwarf_reloc.c           \
+       dwarf_sections.c        \
        dwarf_seterror.c        \
        dwarf_str.c             \
        dwarf_types.c           \
@@ -115,6 +116,7 @@
        dwarf_add_weakname.3                            \
        dwarf_attr.3                                    \
        dwarf_attrlist.3                                \
+       dwarf_attroffset.3                              \
        dwarf_attrval_signed.3                          \
        dwarf_child.3                                   \
        dwarf_dealloc.3                                 \
@@ -154,6 +156,7 @@
        dwarf_get_cie_info.3                            \
        dwarf_get_cie_of_fde.3                          \
        dwarf_get_cu_die_offset.3                       \
+       dwarf_get_die_infotypes_flag.3                  \
        dwarf_get_elf.3                                 \
        dwarf_get_fde_at_pc.3                           \
        dwarf_get_fde_info_for_all_regs.3               \
@@ -175,6 +178,7 @@
        dwarf_get_relocation_info.3                     \
        dwarf_get_relocation_info_count.3               \
        dwarf_get_section_bytes.3                       \
+       dwarf_get_section_max_offsets.3                 \
        dwarf_get_str.3                                 \
        dwarf_get_types.3                               \
        dwarf_get_vars.3                                \
@@ -192,6 +196,7 @@
        dwarf_new_expr.3                                \
        dwarf_new_fde.3                                 \
        dwarf_next_cu_header.3                          \
+       dwarf_next_types_section.3                      \
        dwarf_object_init.3                             \
        dwarf_producer_init.3                           \
        dwarf_producer_set_isa.3                        \
@@ -220,7 +225,9 @@
        dwarf_attrval_signed.3  dwarf_attrval_string.3  \
        dwarf_attrval_signed.3  dwarf_attrval_unsigned.3 \
        dwarf_child.3   dwarf_offdie.3                  \
+       dwarf_child.3   dwarf_offdie_b.3                \
        dwarf_child.3   dwarf_siblingof.3               \
+       dwarf_child.3   dwarf_siblingof_b.3             \
        dwarf_dealloc.3 dwarf_fde_cie_list_dealloc.3    \
        dwarf_dealloc.3 dwarf_funcs_dealloc.3           \
        dwarf_dealloc.3 dwarf_globals_dealloc.3         \
@@ -234,6 +241,7 @@
        dwarf_dieoffset.3       dwarf_die_CU_offset.3   \
        dwarf_dieoffset.3       dwarf_die_CU_offset_range.3 \
        dwarf_dieoffset.3       dwarf_get_cu_die_offset_given_cu_header_offset.3 \
+       dwarf_dieoffset.3       dwarf_get_cu_die_offset_given_cu_header_offset_b.3 \
        dwarf_finish.3          dwarf_object_finish.3   \
        dwarf_formref.3 dwarf_global_formref.3          \
        dwarf_formudata.3       dwarf_formsdata.3       \
@@ -273,6 +281,7 @@
        dwarf_get_pubtypes.3    dwarf_pubtype_name_offsets.3 \
        dwarf_get_pubtypes.3    dwarf_pubtypename.3     \
        dwarf_get_ranges.3      dwarf_get_ranges_a.3    \
+       dwarf_get_section_max_offsets.3 dwarf_get_section_max_offsets_b.3 \
        dwarf_get_types.3       dwarf_type_die_offset.3 \
        dwarf_get_types.3       dwarf_type_cu_offset.3  \
        dwarf_get_types.3       dwarf_type_name_offsets.3 \
@@ -291,6 +300,7 @@
        dwarf_highpc.3  dwarf_bitoffset.3               \
        dwarf_highpc.3  dwarf_bitsize.3                 \
        dwarf_highpc.3  dwarf_bytesize.3                \
+       dwarf_highpc.3  dwarf_highpc_b.3                \
        dwarf_highpc.3  dwarf_lowpc.3                   \
        dwarf_highpc.3  dwarf_srclang.3                 \
        dwarf_lineno.3  dwarf_lineaddr.3                \
@@ -302,6 +312,9 @@
        dwarf_lineno.3  dwarf_line_srcfileno.3          \
        dwarf_loclist.3 dwarf_loclist_n.3               \
        dwarf_loclist_from_expr.3 dwarf_loclist_from_expr_a.3 \
+       dwarf_loclist_from_expr.3 dwarf_loclist_from_expr_b.3 \
+       dwarf_next_cu_header.3 dwarf_next_cu_header_b.3 \
+       dwarf_next_cu_header.3 dwarf_next_cu_header_c.3 \
        dwarf_producer_init.3 dwarf_producer_init_b.3   \
        dwarf_seterrarg.3       dwarf_seterrhand.3      \
        dwarf_set_frame_cfa_value.3 dwarf_set_frame_rule_initial_value.3 \
diff -r 05ecffe38374 -r 2533b38121ec external/bsd/elftoolchain/dist/libdwarf/Version.map
--- a/external/bsd/elftoolchain/dist/libdwarf/Version.map       Sat Feb 20 02:39:47 2016 +0000
+++ b/external/bsd/elftoolchain/dist/libdwarf/Version.map       Sat Feb 20 02:42:00 2016 +0000
@@ -1,4 +1,4 @@
-/* Id: Version.map 2576 2012-09-13 09:16:11Z jkoshy  */
+/* Id: Version.map 3085 2014-09-02 22:08:23Z kaiwang27  */
 
 R1.0 {
 global:
@@ -39,6 +39,7 @@
        dwarf_arrayorder;
        dwarf_attr;
        dwarf_attrlist;
+       dwarf_attroffset;
        dwarf_attrval_flag;
        dwarf_attrval_signed;
        dwarf_attrval_string;
@@ -116,6 +117,8 @@
        dwarf_get_cie_of_fde;
        dwarf_get_cu_die_offset;
        dwarf_get_cu_die_offset_given_cu_header_offset;
+       dwarf_get_cu_die_offset_given_cu_header_offset_b;
+       dwarf_get_die_infotypes_flag;
        dwarf_get_elf;
        dwarf_get_fde_at_pc;
        dwarf_get_fde_info_for_all_regs3;
@@ -139,6 +142,8 @@
        dwarf_get_relocation_info;
        dwarf_get_relocation_info_count;
        dwarf_get_section_bytes;
+       dwarf_get_section_max_offsets;
+       dwarf_get_section_max_offsets_b;
        dwarf_get_str;
        dwarf_get_types;
        dwarf_get_vars;
@@ -152,6 +157,7 @@
        dwarf_hasattr;
        dwarf_hasform;
        dwarf_highpc;
+       dwarf_highpc_b;
        dwarf_init;
        dwarf_line_srcfileno;
        dwarf_lineaddr;
@@ -166,6 +172,7 @@
        dwarf_loclist;
        dwarf_loclist_from_expr;
        dwarf_loclist_from_expr_a;
+       dwarf_loclist_from_expr_b;
        dwarf_loclist_n;
        dwarf_lowpc;
        dwarf_new_die;
@@ -173,9 +180,12 @@
        dwarf_new_fde;
        dwarf_next_cu_header;
        dwarf_next_cu_header_b;
+       dwarf_next_cu_header_c;
+       dwarf_next_types_section;
        dwarf_object_finish;
        dwarf_object_init;
        dwarf_offdie;
+       dwarf_offdie_b;
        dwarf_producer_finish;
        dwarf_producer_init;
        dwarf_producer_init_b;
@@ -196,6 +206,7 @@
        dwarf_seterrarg;
        dwarf_seterrhand;
        dwarf_siblingof;
+       dwarf_siblingof_b;
        dwarf_srcfiles;
        dwarf_srclang;
        dwarf_srclines;
diff -r 05ecffe38374 -r 2533b38121ec external/bsd/elftoolchain/dist/libdwarf/dwarf_attroffset.3
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/elftoolchain/dist/libdwarf/dwarf_attroffset.3        Sat Feb 20 02:42:00 2016 +0000
@@ -0,0 +1,88 @@
+.\"    $NetBSD: dwarf_attroffset.3,v 1.1.1.1 2016/02/20 02:42:01 christos Exp $
+.\"
+.\" Copyright (c) 2014 Kai Wang
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" Id: dwarf_attroffset.3 3115 2014-12-20 18:26:46Z jkoshy 
+.\"
+.Dd December 20, 2014
+.Os
+.Dt DWARF_ATTROFFSET 3
+.Sh NAME
+.Nm dwarf_attroffset
+.Nd retrieve the section-relative offset of an attribute descriptor
+.Sh LIBRARY
+.Lb libdwarf
+.Sh SYNOPSIS
+.In libdwarf.h
+.Ft int
+.Fo dwarf_attroffset
+.Fa "Dwarf_Attribute at"
+.Fa "Dwarf_Off *ret_off"
+.Fa "Dwarf_Error *err"
+.Fc
+.Sh DESCRIPTION
+Function
+.Fn dwarf_attroffset
+retrieves the section-relative offset of the attribute descriptor
+referenced by argument
+.Ar at .
+.Pp
+Argument
+.Ar ret_off
+should point to a location that is to hold the returned
+section-relative offset.
+If argument
+.Ar err
+is non-NULL, it is used to return an error descriptor in case of an
+error.
+.Sh RETURN VALUES
+On success, function
+.Fn dwarf_attroffset
+returns
+.Dv DW_DLV_OK .
+.Pp
+In case of an error, it returns
+.Dv DW_DLV_ERROR
+and sets argument
+.Ar err .
+.Sh COMPATIBILITY
+This function is an extension to the
+.Xr DWARF 3
+API.
+.Sh ERRORS
+The
+.Fn dwarf_attroffset
+function may fail with the following errors:
+.Bl -tag -width ".Bq Er DW_DLE_ARGUMENT"
+.It Bq Er DW_DLE_ARGUMENT
+Either of the arguments
+.Ar at
+or
+.Ar ret_off



Home | Main Index | Thread Index | Old Index