Date: Mon, 22 Dec 2014 20:32:24 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r276077 - in vendor/elftoolchain/dist: . ar brandelf common elfcopy libdwarf libelf libelftc mk nm readelf strings test/ar test/ar/plugin test/elfcopy test/elfcopy/plugin test/elfcopy/t... Message-ID: <201412222032.sBMKWOE0044576@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Mon Dec 22 20:32:23 2014 New Revision: 276077 URL: https://svnweb.freebsd.org/changeset/base/276077 Log: Import elftoolchain rev 3130 From svn.code.sf.net/p/elftoolchain/code/trunk Added: vendor/elftoolchain/dist/ar/os.Linux.mk (contents, props changed) vendor/elftoolchain/dist/libdwarf/dwarf_attroffset.3 (contents, props changed) vendor/elftoolchain/dist/libdwarf/dwarf_get_die_infotypes_flag.3 (contents, props changed) vendor/elftoolchain/dist/libdwarf/dwarf_get_section_max_offsets.3 (contents, props changed) vendor/elftoolchain/dist/libdwarf/dwarf_next_types_section.3 (contents, props changed) vendor/elftoolchain/dist/libdwarf/dwarf_sections.c (contents, props changed) vendor/elftoolchain/dist/mk/elftoolchain.tetbase.mk (contents, props changed) vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/ vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/in/ vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/in/strip-empty-1.in.shar vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/out/ vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/out/strip-empty-1.out.shar vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/strip-empty-1.err vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/strip-empty-1.eval vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/strip-empty-1.out vendor/elftoolchain/dist/test/elfcopy/tc/strip-empty-1/strip-empty-1.sh (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/common/die_traverse2.c (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/common/object/ld_symver.o-64-g1.gz (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/ld_symver.o-64-g1.xml.gz (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/ld_symver.o-64-g1.xml.gz (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/ld_symver.o-64-g1.xml.gz (contents, props changed) vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/ld_symver.o-64-g1.xml.gz (contents, props changed) Modified: vendor/elftoolchain/dist/INSTALL vendor/elftoolchain/dist/Makefile vendor/elftoolchain/dist/ar/Makefile vendor/elftoolchain/dist/ar/acpyacc.y vendor/elftoolchain/dist/ar/read.c vendor/elftoolchain/dist/ar/write.c vendor/elftoolchain/dist/brandelf/brandelf.1 vendor/elftoolchain/dist/brandelf/brandelf.c vendor/elftoolchain/dist/common/Makefile vendor/elftoolchain/dist/common/elfdefinitions.h vendor/elftoolchain/dist/elfcopy/archive.c vendor/elftoolchain/dist/elfcopy/main.c vendor/elftoolchain/dist/elfcopy/sections.c vendor/elftoolchain/dist/elfcopy/segments.c vendor/elftoolchain/dist/elfcopy/symbols.c vendor/elftoolchain/dist/libdwarf/Makefile vendor/elftoolchain/dist/libdwarf/Version.map vendor/elftoolchain/dist/libdwarf/_libdwarf.h vendor/elftoolchain/dist/libdwarf/dwarf.3 vendor/elftoolchain/dist/libdwarf/dwarf.h vendor/elftoolchain/dist/libdwarf/dwarf_attr.3 vendor/elftoolchain/dist/libdwarf/dwarf_attr.c vendor/elftoolchain/dist/libdwarf/dwarf_attrval.c vendor/elftoolchain/dist/libdwarf/dwarf_attrval_signed.3 vendor/elftoolchain/dist/libdwarf/dwarf_child.3 vendor/elftoolchain/dist/libdwarf/dwarf_cu.c vendor/elftoolchain/dist/libdwarf/dwarf_die.c vendor/elftoolchain/dist/libdwarf/dwarf_dieoffset.3 vendor/elftoolchain/dist/libdwarf/dwarf_dump.c vendor/elftoolchain/dist/libdwarf/dwarf_errmsg.c vendor/elftoolchain/dist/libdwarf/dwarf_frame.c vendor/elftoolchain/dist/libdwarf/dwarf_highpc.3 vendor/elftoolchain/dist/libdwarf/dwarf_lineno.c vendor/elftoolchain/dist/libdwarf/dwarf_loclist.c vendor/elftoolchain/dist/libdwarf/dwarf_loclist_from_expr.3 vendor/elftoolchain/dist/libdwarf/dwarf_next_cu_header.3 vendor/elftoolchain/dist/libdwarf/dwarf_ranges.c vendor/elftoolchain/dist/libdwarf/libdwarf.h vendor/elftoolchain/dist/libdwarf/libdwarf_arange.c vendor/elftoolchain/dist/libdwarf/libdwarf_attr.c vendor/elftoolchain/dist/libdwarf/libdwarf_die.c vendor/elftoolchain/dist/libdwarf/libdwarf_frame.c vendor/elftoolchain/dist/libdwarf/libdwarf_info.c vendor/elftoolchain/dist/libdwarf/libdwarf_init.c vendor/elftoolchain/dist/libdwarf/libdwarf_lineno.c vendor/elftoolchain/dist/libdwarf/libdwarf_loc.c vendor/elftoolchain/dist/libdwarf/libdwarf_loclist.c vendor/elftoolchain/dist/libdwarf/libdwarf_nametbl.c vendor/elftoolchain/dist/libdwarf/libdwarf_sections.c vendor/elftoolchain/dist/libelf/_libelf.h vendor/elftoolchain/dist/libelf/_libelf_ar.h vendor/elftoolchain/dist/libelf/elf.3 vendor/elftoolchain/dist/libelf/elf_data.c vendor/elftoolchain/dist/libelf/elf_errmsg.c vendor/elftoolchain/dist/libelf/elf_flag.c vendor/elftoolchain/dist/libelf/elf_memory.c vendor/elftoolchain/dist/libelf/elf_next.c vendor/elftoolchain/dist/libelf/elf_open.c vendor/elftoolchain/dist/libelf/elf_rand.c vendor/elftoolchain/dist/libelf/elf_rawfile.c vendor/elftoolchain/dist/libelf/elf_scn.c vendor/elftoolchain/dist/libelf/elf_strptr.c vendor/elftoolchain/dist/libelf/elf_update.c vendor/elftoolchain/dist/libelf/gelf_cap.c vendor/elftoolchain/dist/libelf/gelf_dyn.c vendor/elftoolchain/dist/libelf/gelf_move.c vendor/elftoolchain/dist/libelf/gelf_rel.c vendor/elftoolchain/dist/libelf/gelf_rela.c vendor/elftoolchain/dist/libelf/gelf_sym.c vendor/elftoolchain/dist/libelf/gelf_syminfo.c vendor/elftoolchain/dist/libelf/gelf_symshndx.c vendor/elftoolchain/dist/libelf/libelf.h vendor/elftoolchain/dist/libelf/libelf_align.c vendor/elftoolchain/dist/libelf/libelf_ar.c vendor/elftoolchain/dist/libelf/libelf_ar_util.c vendor/elftoolchain/dist/libelf/libelf_checksum.c vendor/elftoolchain/dist/libelf/libelf_convert.m4 vendor/elftoolchain/dist/libelf/libelf_data.c vendor/elftoolchain/dist/libelf/libelf_ehdr.c vendor/elftoolchain/dist/libelf/libelf_extended.c vendor/elftoolchain/dist/libelf/libelf_memory.c vendor/elftoolchain/dist/libelf/libelf_open.c vendor/elftoolchain/dist/libelf/libelf_phdr.c vendor/elftoolchain/dist/libelf/libelf_xlate.c vendor/elftoolchain/dist/libelftc/elftc_copyfile.c vendor/elftoolchain/dist/libelftc/elftc_demangle.c vendor/elftoolchain/dist/libelftc/libelftc.h vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c vendor/elftoolchain/dist/mk/elftoolchain.lib.mk vendor/elftoolchain/dist/mk/elftoolchain.os.mk vendor/elftoolchain/dist/mk/elftoolchain.prog.mk vendor/elftoolchain/dist/mk/elftoolchain.subdir.mk vendor/elftoolchain/dist/mk/os.Linux.mk vendor/elftoolchain/dist/mk/os.NetBSD.mk vendor/elftoolchain/dist/nm/nm.c vendor/elftoolchain/dist/readelf/readelf.1 vendor/elftoolchain/dist/readelf/readelf.c vendor/elftoolchain/dist/strings/strings.c vendor/elftoolchain/dist/test/ar/Makefile vendor/elftoolchain/dist/test/ar/plugin/Makefile vendor/elftoolchain/dist/test/ar/plugin/Makefile.ardiff vendor/elftoolchain/dist/test/ar/plugin/ardiff.c vendor/elftoolchain/dist/test/ar/plugin/teraser.c vendor/elftoolchain/dist/test/elfcopy/Makefile vendor/elftoolchain/dist/test/elfcopy/plugin/Makefile vendor/elftoolchain/dist/test/elfcopy/plugin/Makefile.ardiff vendor/elftoolchain/dist/test/elfcopy/plugin/ardiff.c vendor/elftoolchain/dist/test/elfcopy/plugin/teraser.c vendor/elftoolchain/dist/test/elfdump/Makefile vendor/elftoolchain/dist/test/libdwarf/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/Makefile.tset vendor/elftoolchain/dist/test/libdwarf/ts/README vendor/elftoolchain/dist/test/libdwarf/ts/common/driver.h vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/dt32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/dt64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/dwarf_attrlist.c vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/ec32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_attrlist/ec64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/dt32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/dt64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/dto64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/dwarf_die_query.c vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/ec32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_die_query/ec64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/dt32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/dt64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/dwarf_form.c vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/ec32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_form/ec64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/Makefile vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/dt32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/dt64-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/dwarf_next_cu_header.c vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/ec32-g1.xml.gz vendor/elftoolchain/dist/test/libdwarf/ts/dwarf_next_cu_header/ec64-g1.xml.gz vendor/elftoolchain/dist/test/libelf/Makefile vendor/elftoolchain/dist/test/libelf/tset/Makefile vendor/elftoolchain/dist/test/libelf/tset/elf_update/update.m4 vendor/elftoolchain/dist/test/libelftc/Makefile vendor/elftoolchain/dist/test/libelftc/tset/Makefile vendor/elftoolchain/dist/test/libelftc/tset/Makefile.tset vendor/elftoolchain/dist/test/libelftc/tset/elftc_string_table/string_table.m4 vendor/elftoolchain/dist/test/nm/Makefile vendor/elftoolchain/dist/test/nm/ts/Makefile vendor/elftoolchain/dist/test/tet/Makefile Modified: vendor/elftoolchain/dist/INSTALL ============================================================================== --- vendor/elftoolchain/dist/INSTALL Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/INSTALL Mon Dec 22 20:32:23 2014 (r276077) @@ -19,6 +19,7 @@ operating systems. NetBSD_ v5.0.2 i386 OpenBSD_ v5.0 i386 Ubuntu_ GNU/Linux 10.04LTS i386 & x86_64 + Ubuntu_ GNU/Linux 12.04LTS i386 & x86_64 ================= ======== ======================= .. _DragonFly BSD: http://www.dragonflybsd.org/ @@ -114,6 +115,26 @@ Prerequisites - Building additional documentation is not currently supported under OpenBSD. +:OpenBSD 5.4: + - The following packages are pre-requisites for building the + sources on OpenBSD 5.4: + + =================== ===================================== + **Package** **Description** + =================== ===================================== + ``libarchive`` An archive access library. + =================== ===================================== + + The following command line may be used to install the necessary + pre-requisites:: + + # pkg_add libarchive + + - The test suites cannot currently be built under OpenBSD. + + - Building additional documentation is not currently supported + under OpenBSD. + :NetBSD 5.0.2: - The core libraries and utilities should build out of the box on a stock install of NetBSD. @@ -174,16 +195,16 @@ Prerequisites % sudo apt-get install pgf -:Ubuntu GNU/Linux 11.10: +:Ubuntu GNU/Linux 12.04: - The following packages are pre-requisites for building the - sources on Ubuntu GNU/Linux 11.10: + sources on Ubuntu GNU/Linux 12.04: =================== ===================================== **Package** **Description** =================== ===================================== ``bison`` Parser generator. + ``build-essential`` Basic build tools. ``flex`` Lexical analyser. - ``gcc`` C compiler. ``libarchive-dev`` Archive access library. ``libexpat1-dev`` An XML processing library. ``m4`` Macro processor. @@ -195,7 +216,7 @@ Prerequisites The following command line may be used to install the necessary pre-requisites:: - % sudo apt-get install bison flex gcc libarchive-dev \ + % sudo apt-get install bison build-essential flex libarchive-dev \ m4 pmake - To build and run the test suite: @@ -210,7 +231,7 @@ Prerequisites % sudo apt-get install libexpat1-dev python-yaml sharutils - Builds of additional documentation are not currently supported - under Ubuntu GNU/Linux 11.10. + under Ubuntu GNU/Linux 12.04. .. _Test Execution Toolkit: http://tetworks.opengroup.org/ .. _OpenGroup: http://www.opengroup.org/ @@ -276,7 +297,7 @@ website`_. .. _project website: http://elftoolchain.sourceforge.net/ -.. $Id: INSTALL 2777 2012-12-12 17:21:36Z jkoshy $ +.. $Id: INSTALL 3020 2014-04-17 15:52:31Z jkoshy $ .. Local Variables: .. mode: rst Modified: vendor/elftoolchain/dist/Makefile ============================================================================== --- vendor/elftoolchain/dist/Makefile Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/Makefile Mon Dec 22 20:32:23 2014 (r276077) @@ -1,4 +1,4 @@ -# $Id: Makefile 2872 2013-01-07 13:57:54Z jkoshy $ +# $Id: Makefile 3016 2014-04-10 16:01:42Z jkoshy $ TOP= . @@ -15,7 +15,8 @@ SUBDIR += libdwarf SUBDIR += libelftc # Build the tools needed for the rest of the build. -SUBDIR += isa + +# SUBDIR += isa # ('isa' does not build on all platforms yet). # Build tools after the libraries. SUBDIR += addr2line Modified: vendor/elftoolchain/dist/ar/Makefile ============================================================================== --- vendor/elftoolchain/dist/ar/Makefile Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/ar/Makefile Mon Dec 22 20:32:23 2014 (r276077) @@ -1,4 +1,4 @@ -# $Id: Makefile 2741 2012-12-10 18:47:00Z jkoshy $ +# $Id: Makefile 3107 2014-12-20 08:31:58Z kaiwang27 $ TOP= .. @@ -9,8 +9,8 @@ YSRC= acpyacc.y WARNS?= 5 -DPADD= ${LIBARCHIVE} ${LIBELFTC} ${LIBELF} -LDADD= -larchive -lelftc -lelf +DPADD= ${LIBARCHIVE} ${LIBELFTC} ${LIBELF} ${LIBZ} +LDADD= -larchive -lelftc -lelf -lz CFLAGS+=-I. -I${.CURDIR} Modified: vendor/elftoolchain/dist/ar/acpyacc.y ============================================================================== --- vendor/elftoolchain/dist/ar/acpyacc.y Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/ar/acpyacc.y Mon Dec 22 20:32:23 2014 (r276077) @@ -253,13 +253,12 @@ arscp_open(char *fname) if ((a = archive_read_new()) == NULL) bsdar_errc(bsdar, 0, "archive_read_new failed"); - archive_read_support_compression_none(a); archive_read_support_format_ar(a); - AC(archive_read_open_file(a, fname, DEF_BLKSZ)); + AC(archive_read_open_filename(a, fname, DEF_BLKSZ)); if ((r = archive_read_next_header(a, &entry))) bsdar_warnc(bsdar, 0, "%s", archive_error_string(a)); AC(archive_read_close(a)); - ACV(archive_read_finish(a)); + ACV(archive_read_free(a)); if (r != ARCHIVE_OK) return; arscp_create(fname, fname); @@ -317,7 +316,7 @@ arscp_create(char *in, char *out) archive_write_set_format_ar_svr4(a); AC(archive_write_open_fd(a, ofd)); AC(archive_write_close(a)); - ACV(archive_write_finish(a)); + ACV(archive_write_free(a)); } /* Override the previous target, if any. */ Added: vendor/elftoolchain/dist/ar/os.Linux.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/elftoolchain/dist/ar/os.Linux.mk Mon Dec 22 20:32:23 2014 (r276077) @@ -0,0 +1,9 @@ +.if ${OS_DISTRIBUTION} == "Ubuntu" +.if ${OS_DISTRIBUTION_VERSION} >= 14 +# Ubuntu Trusty Tahr and later. + +# Use the --nounput option to flex(1), to prevent unused functions from +# being generated. +LFLAGS += --nounput +.endif +.endif Modified: vendor/elftoolchain/dist/ar/read.c ============================================================================== --- vendor/elftoolchain/dist/ar/read.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/ar/read.c Mon Dec 22 20:32:23 2014 (r276077) @@ -39,7 +39,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: read.c 2229 2011-11-27 13:25:37Z jkoshy $"); +ELFTC_VCSID("$Id: read.c 3102 2014-10-29 21:09:01Z jkoshy $"); /* * Handle read modes: 'x', 't' and 'p'. @@ -68,9 +68,8 @@ ar_read_archive(struct bsdar *bsdar, int if ((a = archive_read_new()) == NULL) bsdar_errc(bsdar, 0, "archive_read_new failed"); - archive_read_support_compression_none(a); archive_read_support_format_ar(a); - AC(archive_read_open_file(a, bsdar->filename, DEF_BLKSZ)); + AC(archive_read_open_filename(a, bsdar->filename, DEF_BLKSZ)); out = bsdar->output; @@ -188,5 +187,5 @@ ar_read_archive(struct bsdar *bsdar, int } } AC(archive_read_close(a)); - ACV(archive_read_finish(a)); + ACV(archive_read_free(a)); } Modified: vendor/elftoolchain/dist/ar/write.c ============================================================================== --- vendor/elftoolchain/dist/ar/write.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/ar/write.c Mon Dec 22 20:32:23 2014 (r276077) @@ -41,7 +41,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: write.c 2496 2012-04-24 02:33:40Z jkoshy $"); +ELFTC_VCSID("$Id: write.c 3102 2014-10-29 21:09:01Z jkoshy $"); #define _ARMAG_LEN 8 /* length of the magic string */ #define _ARHDR_LEN 60 /* length of the archive header */ @@ -259,7 +259,6 @@ read_objs(struct bsdar *bsdar, const cha if ((a = archive_read_new()) == NULL) bsdar_errc(bsdar, 0, "archive_read_new failed"); - archive_read_support_compression_none(a); archive_read_support_format_ar(a); AC(archive_read_open_filename(a, archive, DEF_BLKSZ)); for (;;) { @@ -349,7 +348,7 @@ read_objs(struct bsdar *bsdar, const cha TAILQ_INSERT_TAIL(&bsdar->v_obj, obj, objs); } AC(archive_read_close(a)); - ACV(archive_read_finish(a)); + ACV(archive_read_free(a)); } /* @@ -732,7 +731,6 @@ write_objs(struct bsdar *bsdar) archive_write_set_format_ar_bsd(a); else archive_write_set_format_ar_svr4(a); - archive_write_set_compression_none(a); AC(archive_write_open_filename(a, bsdar->filename)); @@ -795,7 +793,7 @@ write_objs(struct bsdar *bsdar) } AC(archive_write_close(a)); - ACV(archive_write_finish(a)); + ACV(archive_write_free(a)); } /* Modified: vendor/elftoolchain/dist/brandelf/brandelf.1 ============================================================================== --- vendor/elftoolchain/dist/brandelf/brandelf.1 Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/brandelf/brandelf.1 Mon Dec 22 20:32:23 2014 (r276077) @@ -26,9 +26,9 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/usr.bin/brandelf/brandelf.1,v 1.17 2007/03/09 14:36:18 ru Exp $ -.\" $Id: brandelf.1 2245 2011-11-29 08:11:00Z jkoshy $ +.\" $Id: brandelf.1 3101 2014-10-27 22:24:40Z jkoshy $ .\" -.Dd November 29, 2011 +.Dd October 27, 2014 .Dt BRANDELF 1 .Os .Sh NAME @@ -90,7 +90,9 @@ Supported ABIs include and .Dq Li Tru64 . .It Fl v -Turns on verbose output. +This option is accepted for compatibility with other versions of +.Nm , +but is otherwise ignored. .It Fl V | Fl -version Print a version identifier and exit. .El Modified: vendor/elftoolchain/dist/brandelf/brandelf.c ============================================================================== --- vendor/elftoolchain/dist/brandelf/brandelf.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/brandelf/brandelf.c Mon Dec 22 20:32:23 2014 (r276077) @@ -46,7 +46,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: brandelf.c 2324 2011-12-12 06:36:27Z jkoshy $"); +ELFTC_VCSID("$Id: brandelf.c 3101 2014-10-27 22:24:40Z jkoshy $"); static int elftype(const char *); static const char *iselftype(int); @@ -96,7 +96,7 @@ main(int argc, char **argv) Elf_Kind kind; int type = ELFOSABI_NONE; int retval = 0; - int ch, change = 0, verbose = 0, force = 0, listed = 0; + int ch, change = 0, force = 0, listed = 0; if (elf_version(EV_CURRENT) == EV_NONE) errx(EXIT_FAILURE, "elf_version error"); @@ -124,7 +124,7 @@ main(int argc, char **argv) listed = 1; break; case 'v': - verbose = 1; + /* This flag is ignored. */ break; case 't': if (force) @@ -256,7 +256,6 @@ Usage: %s [options] file...\n\ -h | --help Print a usage message and exit.\n\ -l List known ELF ABI names.\n\ -t ABI Set the ELF ABI to the value named by \"ABI\".\n\ - -v Be verbose.\n\ -V | --version Print a version identifier and exit.\n" static void Modified: vendor/elftoolchain/dist/common/Makefile ============================================================================== --- vendor/elftoolchain/dist/common/Makefile Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/common/Makefile Mon Dec 22 20:32:23 2014 (r276077) @@ -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 @@ all depend obj: clean clobber: rm -f ${CLEANFILES} +cleandepend: + rm -f .depend + .include "${TOP}/mk/elftoolchain.inc.mk" Modified: vendor/elftoolchain/dist/common/elfdefinitions.h ============================================================================== --- vendor/elftoolchain/dist/common/elfdefinitions.h Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/common/elfdefinitions.h Mon Dec 22 20:32:23 2014 (r276077) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfdefinitions.h 2950 2013-06-15 13:36:02Z jkoshy $ + * $Id: elfdefinitions.h 3110 2014-12-20 08:32:46Z kaiwang27 $ */ /* @@ -770,6 +770,8 @@ _ELF_DEFINE_EM(EM_ETPU, 178, "Freescale Extended Time Processing Unit") \ _ELF_DEFINE_EM(EM_SLE9X, 179, \ "Infineon Technologies SLE9X core") \ +_ELF_DEFINE_EM(EM_AARCH64, 183, \ + "AArch64 (64-bit ARM)") \ _ELF_DEFINE_EM(EM_AVR32, 185, \ "Atmel Corporation 32-bit microprocessor family") \ _ELF_DEFINE_EM(EM_STM8, 186, \ @@ -819,7 +821,8 @@ enum { EM__LAST__ }; -/* Older synonyms. */ +/* Other synonyms. */ +#define EM_AMD64 EM_X86_64 #define EM_ARC_A5 EM_ARC_COMPACT /* @@ -2112,11 +2115,11 @@ typedef struct { /* 64-bit entry. */ typedef struct { - Elf64_Word l_name; - Elf64_Word l_time_stamp; - Elf64_Word l_checksum; - Elf64_Word l_version; - Elf64_Word l_flags; + Elf64_Word l_name; /* The name of a shared object. */ + Elf64_Word l_time_stamp; /* 32-bit timestamp. */ + Elf64_Word l_checksum; /* Checksum of visible symbols, sizes. */ + Elf64_Word l_version; /* Interface version string index. */ + Elf64_Word l_flags; /* Flags (LL_*). */ } Elf64_Lib; #define _ELF_DEFINE_LL_FLAGS() \ @@ -2364,12 +2367,12 @@ typedef struct { /* 64 bit PHDR entry. */ typedef struct { Elf64_Word p_type; /* Type of segment. */ - Elf64_Word p_flags; /* File offset to segment. */ - Elf64_Off p_offset; /* Virtual address in memory. */ - Elf64_Addr p_vaddr; /* Physical address (if relevant). */ - Elf64_Addr p_paddr; /* Size of segment in file. */ - Elf64_Xword p_filesz; /* Size of segment in memory. */ - Elf64_Xword p_memsz; /* Segment flags. */ + Elf64_Word p_flags; /* Segment flags. */ + Elf64_Off p_offset; /* File offset to segment. */ + Elf64_Addr p_vaddr; /* Virtual address in memory. */ + Elf64_Addr p_paddr; /* Physical address (if relevant). */ + Elf64_Xword p_filesz; /* Size of segment in file. */ + Elf64_Xword p_memsz; /* Size of segment in memory. */ Elf64_Xword p_align; /* Alignment constraints. */ } Elf64_Phdr; @@ -2453,11 +2456,11 @@ typedef struct { typedef struct { Elf64_Word st_name; /* index of symbol's name */ - unsigned char st_info; /* value for the symbol */ - unsigned char st_other; /* size of associated data */ - Elf64_Half st_shndx; /* type and binding attributes */ - Elf64_Addr st_value; /* visibility */ - Elf64_Xword st_size; /* index of related section */ + unsigned char st_info; /* type and binding attributes */ + unsigned char st_other; /* visibility */ + Elf64_Half st_shndx; /* index of related section */ + Elf64_Addr st_value; /* value for the symbol */ + Elf64_Xword st_size; /* size of associated data */ } Elf64_Sym; #define ELF32_ST_BIND(I) ((I) >> 4) Modified: vendor/elftoolchain/dist/elfcopy/archive.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/archive.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/elfcopy/archive.c Mon Dec 22 20:32:23 2014 (r276077) @@ -40,7 +40,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: archive.c 2370 2011-12-29 12:48:12Z jkoshy $"); +ELFTC_VCSID("$Id: archive.c 3102 2014-10-29 21:09:01Z jkoshy $"); #define _ARMAG_LEN 8 /* length of ar magic string */ #define _ARHDR_LEN 60 /* length of ar header */ @@ -350,12 +350,11 @@ ac_detect_ar(int ifd) r = -1; if ((a = archive_read_new()) == NULL) return (0); - archive_read_support_compression_none(a); archive_read_support_format_ar(a); if (archive_read_open_fd(a, ifd, 10240) == ARCHIVE_OK) r = archive_read_next_header(a, &entry); archive_read_close(a); - archive_read_finish(a); + archive_read_free(a); return (r == ARCHIVE_OK); } @@ -386,7 +385,6 @@ ac_read_objs(struct elfcopy *ecp, int if err(EXIT_FAILURE, "lseek failed"); if ((a = archive_read_new()) == NULL) errx(EXIT_FAILURE, "%s", archive_error_string(a)); - archive_read_support_compression_none(a); archive_read_support_format_ar(a); AC(archive_read_open_fd(a, ifd, 10240)); for(;;) { @@ -435,7 +433,7 @@ ac_read_objs(struct elfcopy *ecp, int if } } AC(archive_read_close(a)); - ACV(archive_read_finish(a)); + ACV(archive_read_free(a)); } static void @@ -449,7 +447,6 @@ ac_write_objs(struct elfcopy *ecp, int o if ((a = archive_write_new()) == NULL) errx(EXIT_FAILURE, "%s", archive_error_string(a)); archive_write_set_format_ar_svr4(a); - archive_write_set_compression_none(a); AC(archive_write_open_fd(a, ofd)); /* Write the archive symbol table, even if it's empty. */ @@ -491,7 +488,7 @@ ac_write_objs(struct elfcopy *ecp, int o } AC(archive_write_close(a)); - ACV(archive_write_finish(a)); + ACV(archive_write_free(a)); } static void Modified: vendor/elftoolchain/dist/elfcopy/main.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/main.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/elfcopy/main.c Mon Dec 22 20:32:23 2014 (r276077) @@ -40,7 +40,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: main.c 2970 2013-12-01 15:22:12Z kaiwang27 $"); +ELFTC_VCSID("$Id: main.c 3111 2014-12-20 08:33:01Z kaiwang27 $"); enum options { @@ -1109,7 +1109,8 @@ strip_main(struct elfcopy *ecp, int argc if (ecp->strip == 0 && ((ecp->flags & DISCARD_LOCAL) == 0) && - ((ecp->flags & DISCARD_LLABEL) == 0)) + ((ecp->flags & DISCARD_LLABEL) == 0) && + lookup_symop_list(ecp, NULL, SYMOP_STRIP) == NULL) ecp->strip = STRIP_ALL; if (optind == argc) strip_usage(); Modified: vendor/elftoolchain/dist/elfcopy/sections.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/sections.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/elfcopy/sections.c Mon Dec 22 20:32:23 2014 (r276077) @@ -35,7 +35,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: sections.c 2358 2011-12-19 18:22:32Z kaiwang27 $"); +ELFTC_VCSID("$Id: sections.c 3126 2014-12-21 08:03:31Z kaiwang27 $"); static void add_gnu_debuglink(struct elfcopy *ecp); static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc); @@ -372,6 +372,14 @@ create_scn(struct elfcopy *ecp) is_remove_reloc_sec(ecp, ish.sh_info)) continue; + /* + * Section groups should be removed if symbol table will + * be removed. (section group's signature stored in symbol + * table) + */ + if (ish.sh_type == SHT_GROUP && ecp->strip == STRIP_ALL) + continue; + /* Get section flags set by user. */ sec_flags = get_section_flags(ecp, name); @@ -762,8 +770,8 @@ resync_sections(struct elfcopy *ecp) s->off = roundup(off, s->align); } else { if (s->loadable) - warnx("moving loadable section," - "is this intentional?"); + warnx("moving loadable section %s, " + "is this intentional?", s->name); s->off = roundup(off, s->align); } @@ -1139,12 +1147,6 @@ add_to_shstrtab(struct elfcopy *ecp, con struct section *s; s = ecp->shstrtab; - if (s->buf == NULL) { - insert_to_strtab(s, ""); - insert_to_strtab(s, ".symtab"); - insert_to_strtab(s, ".strtab"); - insert_to_strtab(s, ".shstrtab"); - } insert_to_strtab(s, name); } @@ -1206,6 +1208,11 @@ init_shstrtab(struct elfcopy *ecp) s->loadable = 0; s->type = SHT_STRTAB; s->vma = 0; + + insert_to_strtab(s, ""); + insert_to_strtab(s, ".symtab"); + insert_to_strtab(s, ".strtab"); + insert_to_strtab(s, ".shstrtab"); } void Modified: vendor/elftoolchain/dist/elfcopy/segments.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/segments.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/elfcopy/segments.c Mon Dec 22 20:32:23 2014 (r276077) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: segments.c 2542 2012-08-12 16:14:15Z kaiwang27 $"); +ELFTC_VCSID("$Id: segments.c 3113 2014-12-20 08:33:29Z kaiwang27 $"); static void insert_to_inseg_list(struct segment *seg, struct section *sec); @@ -72,13 +72,15 @@ add_to_inseg_list(struct elfcopy *ecp, s */ loadable = 0; STAILQ_FOREACH(seg, &ecp->v_seg, seg_list) { - if (s->off < seg->off) + if (s->off < seg->off || (s->vma < seg->addr && !s->pseudo)) continue; if (s->off + s->sz > seg->off + seg->fsz && s->type != SHT_NOBITS) continue; if (s->off + s->sz > seg->off + seg->msz) continue; + if (s->vma + s->sz > seg->addr + seg->msz) + continue; insert_to_inseg_list(seg, s); if (seg->type == PT_LOAD) @@ -96,7 +98,7 @@ adjust_addr(struct elfcopy *ecp) struct section *s, *s0; struct segment *seg; struct sec_action *sac; - uint64_t dl, lma, old_vma, start, end; + uint64_t dl, lma, start, end; int found, i; /* @@ -113,8 +115,6 @@ adjust_addr(struct elfcopy *ecp) s->lma += ecp->change_addr; if (!s->pseudo) { - old_vma = s->vma; - /* Apply global VMA adjustment. */ if (ecp->change_addr != 0) s->vma += ecp->change_addr; @@ -438,7 +438,7 @@ copy_phdr(struct elfcopy *ecp) seg->fsz = seg->msz = 0; for (i = 0; i < seg->nsec; i++) { s = seg->v_sec[i]; - seg->msz = s->off + s->sz - seg->off; + seg->msz = s->vma + s->sz - seg->addr; if (s->type != SHT_NOBITS) seg->fsz = seg->msz; } Modified: vendor/elftoolchain/dist/elfcopy/symbols.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/symbols.c Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/elfcopy/symbols.c Mon Dec 22 20:32:23 2014 (r276077) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: symbols.c 2971 2013-12-01 15:22:21Z kaiwang27 $"); +ELFTC_VCSID("$Id: symbols.c 3019 2014-04-17 14:53:40Z jkoshy $"); /* Symbol table buffer structure. */ struct symbuf { @@ -300,7 +300,7 @@ generate_symbols(struct elfcopy *ecp) GElf_Sym sym; Elf_Data* id; Elf_Scn *is; - size_t ishstrndx, namelen, ndx, nsyms, sc, symndx; + size_t ishstrndx, namelen, ndx, sc, symndx; int ec, elferr, i; if (elf_getshstrndx(ecp->ein, &ishstrndx) == 0) @@ -320,7 +320,6 @@ generate_symbols(struct elfcopy *ecp) st_buf->lcap = 64; st_buf->lsz = 1; /* '\0' at start. */ st_buf->gsz = 0; - nsyms = 0; ecp->symtab->sz = 0; ecp->strtab->sz = 0; Modified: vendor/elftoolchain/dist/libdwarf/Makefile ============================================================================== --- vendor/elftoolchain/dist/libdwarf/Makefile Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/libdwarf/Makefile Mon Dec 22 20:32:23 2014 (r276077) @@ -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 @@ SRCS= \ 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 @@ MAN= dwarf.3 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 @@ MAN= dwarf.3 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 @@ MAN= dwarf.3 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 @@ MAN= dwarf.3 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 @@ MLINKS+= \ 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 @@ MLINKS+= \ 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 @@ MLINKS+= \ 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 @@ MLINKS+= \ 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 @@ MLINKS+= \ 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 \ Modified: vendor/elftoolchain/dist/libdwarf/Version.map ============================================================================== --- vendor/elftoolchain/dist/libdwarf/Version.map Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/libdwarf/Version.map Mon Dec 22 20:32:23 2014 (r276077) @@ -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 @@ global: dwarf_arrayorder; dwarf_attr; dwarf_attrlist; + dwarf_attroffset; dwarf_attrval_flag; dwarf_attrval_signed; dwarf_attrval_string; @@ -116,6 +117,8 @@ global: 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 @@ global: 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 @@ global: dwarf_hasattr; dwarf_hasform; dwarf_highpc; + dwarf_highpc_b; dwarf_init; dwarf_line_srcfileno; dwarf_lineaddr; @@ -166,6 +172,7 @@ global: 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 @@ global: 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 @@ global: dwarf_seterrarg; dwarf_seterrhand; dwarf_siblingof; + dwarf_siblingof_b; dwarf_srcfiles; dwarf_srclang; dwarf_srclines; Modified: vendor/elftoolchain/dist/libdwarf/_libdwarf.h ============================================================================== --- vendor/elftoolchain/dist/libdwarf/_libdwarf.h Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/libdwarf/_libdwarf.h Mon Dec 22 20:32:23 2014 (r276077) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2007 John Birrell (jb@freebsd.org) - * Copyright (c) 2009-2011 Kai Wang + * Copyright (c) 2009-2014 Kai Wang * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _libdwarf.h 2075 2011-10-27 03:47:28Z jkoshy $ + * $Id: _libdwarf.h 3106 2014-12-19 16:00:58Z kaiwang27 $ */ #ifndef __LIBDWARF_H_ @@ -89,6 +89,7 @@ extern struct _libdwarf_globals _libdwar goto gen_fail; \ } while(0) +typedef struct _Dwarf_CU *Dwarf_CU; struct _Dwarf_AttrDef { uint64_t ad_attrib; /* DW_AT_XXX */ @@ -147,14 +148,6 @@ struct _Dwarf_Die { STAILQ_ENTRY(_Dwarf_Die) die_pro_next; /* Next die in pro-die list. */ }; -struct _Dwarf_Loclist { - Dwarf_Locdesc **ll_ldlist; /* Array of Locdesc pointer. */ - int ll_ldlen; /* Number of Locdesc. */ - Dwarf_Unsigned ll_offset; /* Offset in .debug_loc section. */ - Dwarf_Unsigned ll_length; /* Length (in bytes) of the loclist. */ - TAILQ_ENTRY(_Dwarf_Loclist) ll_next; /* Next loclist in list. */ -}; - struct _Dwarf_P_Expr_Entry { Dwarf_Loc ee_loc; /* Location expression. */ Dwarf_Unsigned ee_sym; /* Optional related reloc sym index. */ @@ -265,6 +258,8 @@ struct _Dwarf_Cie { Dwarf_Half cie_version; /* CIE version. */ uint8_t *cie_augment; /* CIE augmentation (UTF-8). */ Dwarf_Unsigned cie_ehdata; /* Optional EH Data. */ + uint8_t cie_addrsize; /* Address size. (DWARF4) */ + uint8_t cie_segmentsize; /* Segment size. (DWARF4) */ Dwarf_Unsigned cie_caf; /* Code alignment factor. */ Dwarf_Signed cie_daf; /* Data alignment factor. */ Dwarf_Unsigned cie_ra; /* Return address register. */ @@ -333,11 +328,14 @@ struct _Dwarf_CU { uint64_t cu_lineno_offset; /* Offset into .debug_lineno. */ uint8_t cu_pointer_size;/* Number of bytes in pointer. */ uint8_t cu_dwarf_size; /* CU section dwarf size. */ + Dwarf_Sig8 cu_type_sig; /* Type unit's signature. */ + uint64_t cu_type_offset; /* Type unit's type offset. */ Dwarf_Off cu_next_offset; /* Offset to the next CU. */ uint64_t cu_1st_offset; /* First DIE offset. */ int cu_pass2; /* Two pass DIE traverse. */ Dwarf_LineInfo cu_lineinfo; /* Ptr to Dwarf_LineInfo. */ Dwarf_Abbrev cu_abbrev_hash; /* Abbrev hash table. */ + Dwarf_Bool cu_is_info; /* Compilation/type unit flag. */ STAILQ_ENTRY(_Dwarf_CU) cu_next; /* Next compilation unit. */ }; @@ -399,17 +397,21 @@ struct _Dwarf_Debug { Dwarf_Section *dbg_section; /* Dwarf section list. */ Dwarf_Section *dbg_info_sec; /* Pointer to info section. */ Dwarf_Off dbg_info_off; /* Current info section offset. */ + Dwarf_Section *dbg_types_sec; /* Pointer to type section. */ + Dwarf_Off dbg_types_off; /* Current types section offset. */ Dwarf_Unsigned dbg_seccnt; /* Total number of dwarf sections. */ int dbg_mode; /* Access mode. */ int dbg_pointer_size; /* Object address size. */ int dbg_offset_size; /* DWARF offset size. */ int dbg_info_loaded; /* Flag indicating all CU loaded. */ + int dbg_types_loaded; /* Flag indicating all TU loaded. */ Dwarf_Half dbg_machine; /* ELF machine architecture. */ Dwarf_Handler dbg_errhand; /* Error handler. */ Dwarf_Ptr dbg_errarg; /* Argument to the error handler. */ STAILQ_HEAD(, _Dwarf_CU) dbg_cu;/* List of compilation units. */ + STAILQ_HEAD(, _Dwarf_CU) dbg_tu;/* List of type units. */ Dwarf_CU dbg_cu_current; /* Ptr to the current CU. */ - TAILQ_HEAD(, _Dwarf_Loclist) dbg_loclist; /* List of location list. */ + Dwarf_CU dbg_tu_current; /* Ptr to the current TU. */ Dwarf_NameSec dbg_globals; /* Ptr to pubnames lookup section. */ Dwarf_NameSec dbg_pubtypes; /* Ptr to pubtypes lookup section. */ Dwarf_NameSec dbg_weaks; /* Ptr to weaknames lookup section. */ @@ -532,13 +534,15 @@ int _dwarf_elf_get_section_info(void *, Dwarf_Obj_Access_Section *, int *); void _dwarf_expr_cleanup(Dwarf_P_Debug); int _dwarf_expr_into_block(Dwarf_P_Expr, Dwarf_Error *); +Dwarf_Section *_dwarf_find_next_types_section(Dwarf_Debug, Dwarf_Section *); Dwarf_Section *_dwarf_find_section(Dwarf_Debug, const char *); void _dwarf_frame_cleanup(Dwarf_Debug); int _dwarf_frame_fde_add_inst(Dwarf_P_Fde, Dwarf_Small, Dwarf_Unsigned, Dwarf_Unsigned, Dwarf_Error *); int _dwarf_frame_gen(Dwarf_P_Debug, Dwarf_Error *); -int _dwarf_frame_get_fop(Dwarf_Debug, uint8_t *, Dwarf_Unsigned, - Dwarf_Frame_Op **, Dwarf_Signed *, Dwarf_Error *); +int _dwarf_frame_get_fop(Dwarf_Debug, uint8_t, uint8_t *, + Dwarf_Unsigned, Dwarf_Frame_Op **, Dwarf_Signed *, + Dwarf_Error *); int _dwarf_frame_get_internal_table(Dwarf_Fde, Dwarf_Addr, Dwarf_Regtable3 **, Dwarf_Addr *, Dwarf_Error *); int _dwarf_frame_interal_table_init(Dwarf_Debug, Dwarf_Error *); @@ -553,9 +557,12 @@ Dwarf_Unsigned _dwarf_get_reloc_type(Dwa int _dwarf_get_reloc_size(Dwarf_Debug, Dwarf_Unsigned); void _dwarf_info_cleanup(Dwarf_Debug); int _dwarf_info_first_cu(Dwarf_Debug, Dwarf_Error *); +int _dwarf_info_first_tu(Dwarf_Debug, Dwarf_Error *); int _dwarf_info_gen(Dwarf_P_Debug, Dwarf_Error *); -int _dwarf_info_load(Dwarf_Debug, int, Dwarf_Error *); +int _dwarf_info_load(Dwarf_Debug, Dwarf_Bool, Dwarf_Bool, + Dwarf_Error *); int _dwarf_info_next_cu(Dwarf_Debug, Dwarf_Error *); +int _dwarf_info_next_tu(Dwarf_Debug, Dwarf_Error *); void _dwarf_info_pro_cleanup(Dwarf_P_Debug); int _dwarf_init(Dwarf_Debug, Dwarf_Unsigned, Dwarf_Handler, Dwarf_Ptr, Dwarf_Error *); @@ -563,20 +570,19 @@ int _dwarf_lineno_gen(Dwarf_P_Debug, Dw int _dwarf_lineno_init(Dwarf_Die, uint64_t, Dwarf_Error *); void _dwarf_lineno_cleanup(Dwarf_LineInfo); void _dwarf_lineno_pro_cleanup(Dwarf_P_Debug); -int _dwarf_loc_fill_locdesc(Dwarf_Debug, Dwarf_Locdesc *, uint8_t *, - uint64_t, uint8_t, Dwarf_Error *); +int _dwarf_loc_fill_locdesc(Dwarf_Debug, Dwarf_Locdesc *, + uint8_t *, uint64_t, uint8_t, uint8_t, uint8_t, + Dwarf_Error *); int _dwarf_loc_fill_locexpr(Dwarf_Debug, Dwarf_Locdesc **, - uint8_t *, uint64_t, uint8_t, Dwarf_Error *); + uint8_t *, uint64_t, uint8_t, uint8_t, uint8_t, + Dwarf_Error *); int _dwarf_loc_add(Dwarf_Die, Dwarf_Attribute, Dwarf_Error *); int _dwarf_loc_expr_add_atom(Dwarf_Debug, uint8_t *, uint8_t *, Dwarf_Small, Dwarf_Unsigned, Dwarf_Unsigned, int *, Dwarf_Error *); int _dwarf_loclist_find(Dwarf_Debug, Dwarf_CU, uint64_t, - Dwarf_Loclist *, Dwarf_Error *); -void _dwarf_loclist_cleanup(Dwarf_Debug); -void _dwarf_loclist_free(Dwarf_Loclist); -int _dwarf_loclist_add(Dwarf_Debug, Dwarf_CU, uint64_t, - Dwarf_Loclist *, Dwarf_Error *); + Dwarf_Locdesc ***, Dwarf_Signed *, Dwarf_Unsigned *, + Dwarf_Error *); void _dwarf_macinfo_cleanup(Dwarf_Debug); int _dwarf_macinfo_gen(Dwarf_P_Debug, Dwarf_Error *); int _dwarf_macinfo_init(Dwarf_Debug, Dwarf_Error *); @@ -633,6 +639,7 @@ void _dwarf_strtab_cleanup(Dwarf_Debug) int _dwarf_strtab_gen(Dwarf_P_Debug, Dwarf_Error *); char *_dwarf_strtab_get_table(Dwarf_Debug); int _dwarf_strtab_init(Dwarf_Debug, Dwarf_Error *); +void _dwarf_type_unit_cleanup(Dwarf_Debug); void _dwarf_write_block(void *, uint64_t *, uint8_t *, uint64_t); int _dwarf_write_block_alloc(uint8_t **, uint64_t *, uint64_t *, uint8_t *, uint64_t, Dwarf_Error *); Modified: vendor/elftoolchain/dist/libdwarf/dwarf.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf.3 Mon Dec 22 19:53:55 2014 (r276076) +++ vendor/elftoolchain/dist/libdwarf/dwarf.3 Mon Dec 22 20:32:23 2014 (r276077) @@ -21,9 +21,9 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: dwarf.3 2075 2011-10-27 03:47:28Z jkoshy $ +.\" $Id: dwarf.3 3130 2014-12-21 20:06:29Z jkoshy $ .\" -.Dd September 17, 2011 +.Dd December 21, 2014 .Os .Dt DWARF 3 .Sh NAME @@ -217,6 +217,8 @@ attribute. Retrieve an attribute descriptor. .It Fn dwarf_attrlist Retrieve attribute descriptors for a debugging information entry. +.It Fn dwarf_attroffset +Retrieve the section-relative offset of an attribute descriptor. .It Fn dwarf_attrval_flag Retrieve a .Dv DW_AT_FORM_flag @@ -309,10 +311,17 @@ Retrieve range information from an FDE d .El .It Compilation Units .Bl -tag -compact -.It Fn dwarf_get_cu_die_offset_given_cu_header_offset +.It Xo +.Fn dwarf_get_cu_die_offset_given_cu_header_offset , +.Fn dwarf_get_cu_die_offset_given_cu_header_offset_b +.Xc Retrieve the offset of the debugging information entry for a -compilation unit. -.It Fn dwarf_next_cu_header , Fn dwarf_next_cu_header_b +compilation or type unit. +.It Xo +.Fn dwarf_next_cu_header , +.Fn dwarf_next_cu_header_b , +.Fn dwarf_next_cu_header_c +.Xc Step through compilation units in a debug context. .El .It Debugging Information Entries @@ -329,13 +338,15 @@ Returns the attribute for a debugging information entry. .It Fn dwarf_dieoffset Retrieves the offset for a debugging information entry. -.It Fn dwarf_highpc +.It Fn dwarf_get_die_infotypes_flag +Indicate the originating section for a debugging information entry. +.It Fn dwarf_highpc , Fn dwarf_highpc_b Return the highest PC value for a debugging information entry. .It Fn dwarf_lowpc Return the lowest PC value for a debugging information entry. -.It Fn dwarf_offdie +.It Fn dwarf_offdie , Fn dwarf_offdie_b Retrieve a debugging information entry given an offset. -.It Fn dwarf_siblingof +.It Fn dwarf_siblingof , Fn dwarf_siblingof_b *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412222032.sBMKWOE0044576>