CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Thu Apr 29 17:38:08 UTC 2021 Modified Files: src/external/bsd/elftoolchain/dist/common: elfdefinitions.h Log Message: Add a version control system marker. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.6 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.7 --- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.6 Thu Apr 8 19:37:43 2021 +++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h Thu Apr 29 17:38:08 2021 @@ -1,3 +1,5 @@ +/* $NetBSD: elfdefinitions.h,v 1.7 2021/04/29 17:38:08 jkoshy Exp $ */ + /*- * Copyright (c) 2010,2021 Joseph Koshy * All rights reserved.
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Sat Apr 24 09:42:00 UTC 2021 Removed Files: src/external/bsd/elftoolchain/dist/common: native-elf-format os.Linux.mk Log Message: Remove files that no longer exist upstream. To generate a diff of this commit: cvs rdiff -u -r1.2 -r0 \ src/external/bsd/elftoolchain/dist/common/native-elf-format \ src/external/bsd/elftoolchain/dist/common/os.Linux.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Thu Apr 8 19:37:43 UTC 2021 Modified Files: src/external/bsd/elftoolchain/dist/common: elfdefinitions.h Log Message: Update Elftoolchain 'common/elfdefinitions.h' to upstream r3943. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.5 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.6 --- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.5 Sun Mar 7 14:53:59 2021 +++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h Thu Apr 8 19:37:43 2021 @@ -1,7 +1,5 @@ -/* $NetBSD: elfdefinitions.h,v 1.5 2021/03/07 14:53:59 jkoshy Exp $ */ - /*- - * Copyright (c) 2010 Joseph Koshy + * Copyright (c) 2010,2021 Joseph Koshy * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,2969 +23,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: elfdefinitions.h 3916 2020-12-12 11:26:53Z jkoshy - */ - -/* - * These definitions are based on: - * - The public specification of the ELF format as defined in the - * October 2009 draft of System V ABI. - * See: http://www.sco.com/developers/gabi/latest/ch4.intro.html - * - The May 1998 (version 1.5) draft of "The ELF-64 object format". - * - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips, - * ia64, powerpc, and RISC-V processors. - * - The "Linkers and Libraries Guide", from Sun Microsystems. + * Id: elfdefinitions.h 3942 2021-04-05 12:16:03Z jkoshy */ #ifndef _ELFDEFINITIONS_H_ #define _ELFDEFINITIONS_H_ -#include - -/* - * Types of capabilities. - */ - -#define _ELF_DEFINE_CAPABILITIES()\ -_ELF_DEFINE_CA(CA_SUNW_NULL, 0, "ignored") \ -_ELF_DEFINE_CA(CA_SUNW_HW_1, 1, "hardware capability") \ -_ELF_DEFINE_CA(CA_SUNW_SW_1, 2, "software capability") - -#undef _ELF_DEFINE_CA -#define _ELF_DEFINE_CA(N, V, DESCR) N = V , -enum { - _ELF_DEFINE_CAPABILITIES() - CA__LAST__ -}; - -/* - * Flags used with dynamic linking entries. - */ - -#define _ELF_DEFINE_DYN_FLAGS() \ -_ELF_DEFINE_DF(DF_ORIGIN, 0x1, \ - "object being loaded may refer to $ORIGIN") \ -_ELF_DEFINE_DF(DF_SYMBOLIC, 0x2, \ - "search library for references before executable") \ -_ELF_DEFINE_DF(DF_TEXTREL, 0x4, \ - "relocation entries may modify text segment") \ -_ELF_DEFINE_DF(DF_BIND_NOW, 0x8, \ - "process relocation entries at load time") \ -_ELF_DEFINE_DF(DF_STATIC_TLS, 0x10, \ - "uses static thread-local storage") \ -_ELF_DEFINE_DF(DF_1_BIND_NOW, 0x1, \ - "process relocation entries at load time") \ -_ELF_DEFINE_DF(DF_1_GLOBAL, 0x2, \ - "unused") \ -_ELF_DEFINE_DF(DF_1_GROUP, 0x4, \ - "object is a member of a group") \ -_ELF_DEFINE_DF(DF_1_NODELETE, 0x8, \ - "object cannot be deleted from a process") \ -_ELF_DEFINE_DF(DF_1_LOADFLTR, 0x10, \ - "immediate load filtees")\ -_ELF_DEFINE_DF(DF_1_INITFIRST, 0x20, \ - "initialize object first")\ -_ELF_DEFINE_DF(DF_1_NOOPEN, 0x40, \ - "disallow dlopen()") \ -_ELF_DEFINE_DF(DF_1_ORIGIN, 0x80, \ - "object being loaded may refer to $ORIGIN") \ -_ELF_DEFINE_DF(DF_1_DIRECT, 0x100, \ - "direct bindings enabled")\ -_ELF_DEFINE_DF(DF_1_INTERPOSE, 0x400, \ - "object is interposer") \ -_ELF_DEFINE_DF(DF_1_NODEFLIB, 0x800, \ - "ignore default library search path") \ -_ELF_DEFINE_DF(DF_1_NODUMP, 0x1000, \ - "disallow dldump()") \ -_ELF_DEFINE_DF(DF_1_CONFALT,0x2000, \ - "object is a configuration alternative") \ -_ELF_DEFINE_DF(DF_1_ENDFILTEE, 0x4000, \ - "filtee terminates filter search") \ -_ELF_DEFINE_DF(DF_1_DISPRELDNE, 0x8000, \ - "displacement relocation done")\ -_ELF_DEFINE_DF(DF_1_DISPRELPND, 0x1, \ - "displacement relocation pending") -#undef _ELF_DEFINE_DF -#define _ELF_DEFINE_DF(N, V, DESCR) N = V , -enum { - _ELF_DEFINE_DYN_FLAGS() - DF__LAST__ -}; - - -/* - * Dynamic linking entry types. - */ - -#define _ELF_DEFINE_DYN_TYPES() \ -_ELF_DEFINE_DT(DT_NULL, 0, "end of array") \ -_ELF_DEFINE_DT(DT_NEEDED, 1, "names a needed library") \ -_ELF_DEFINE_DT(DT_PLTRELSZ, 2, \ - "size in bytes of associated relocation entries") \ -_ELF_DEFINE_DT(DT_PLTGOT, 3, \ - "address associated with the procedure linkage table") \ -_ELF_DEFINE_DT(DT_HASH, 4, \ - "address of the symbol hash table")\ -_ELF_DEFINE_DT(DT_STRTAB, 5, \ - "address of the string table") \ -_ELF_DEFINE_DT(DT_SYMTAB,
CVS commit: src/external/bsd/elftoolchain
Module Name:src Committed By: jkoshy Date: Wed Apr 7 20:32:55 UTC 2021 Modified Files: src/external/bsd/elftoolchain: Makefile Log Message: Traverse the Elftoolchain 'common' module before the rest of the imported hierarchy. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/Makefile diff -u src/external/bsd/elftoolchain/Makefile:1.2 src/external/bsd/elftoolchain/Makefile:1.3 --- src/external/bsd/elftoolchain/Makefile:1.2 Tue Apr 6 19:44:24 2021 +++ src/external/bsd/elftoolchain/Makefile Wed Apr 7 20:32:54 2021 @@ -1,5 +1,6 @@ -# $NetBSD: Makefile,v 1.2 2021/04/06 19:44:24 jkoshy Exp $ +# $NetBSD: Makefile,v 1.3 2021/04/07 20:32:54 jkoshy Exp $ SUBDIR= common +SUBDIR+= .WAIT # 'common' should be processed first. SUBDIR+= lib .include
CVS commit: src/external/bsd/elftoolchain/lib
Module Name:src Committed By: jkoshy Date: Wed Apr 7 20:31:16 UTC 2021 Modified Files: src/external/bsd/elftoolchain/lib: Makefile Log Message: Ensure that the 'libelf' directory is traversed before 'libdwarf'. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/elftoolchain/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/lib/Makefile diff -u src/external/bsd/elftoolchain/lib/Makefile:1.1 src/external/bsd/elftoolchain/lib/Makefile:1.2 --- src/external/bsd/elftoolchain/lib/Makefile:1.1 Sun Mar 9 16:58:04 2014 +++ src/external/bsd/elftoolchain/lib/Makefile Wed Apr 7 20:31:16 2021 @@ -1,3 +1,6 @@ -# $NetBSD: Makefile,v 1.1 2014/03/09 16:58:04 christos Exp $ -SUBDIR= libelf libdwarf +# $NetBSD: Makefile,v 1.2 2021/04/07 20:31:16 jkoshy Exp $ +SUBDIR= libelf +SUBDIR+= .WAIT # Process 'libelf' before 'libdwarf'. +SUBDIR+= libdwarf + .include
CVS commit: src/external/bsd/elftoolchain
Module Name:src Committed By: jkoshy Date: Tue Apr 6 19:44:24 UTC 2021 Modified Files: src/external/bsd/elftoolchain: Makefile Log Message: Mirror upstream build steps: traverse 'common' before traversing 'lib'. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/elftoolchain/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/Makefile diff -u src/external/bsd/elftoolchain/Makefile:1.1 src/external/bsd/elftoolchain/Makefile:1.2 --- src/external/bsd/elftoolchain/Makefile:1.1 Sun Mar 9 16:58:03 2014 +++ src/external/bsd/elftoolchain/Makefile Tue Apr 6 19:44:24 2021 @@ -1,3 +1,5 @@ -# $NetBSD: Makefile,v 1.1 2014/03/09 16:58:03 christos Exp $ -SUBDIR=lib +# $NetBSD: Makefile,v 1.2 2021/04/06 19:44:24 jkoshy Exp $ +SUBDIR= common +SUBDIR+= lib + .include
CVS commit: src/external/bsd/elftoolchain/common
Module Name:src Committed By: jkoshy Date: Tue Apr 6 19:40:20 UTC 2021 Added Files: src/external/bsd/elftoolchain/common: Makefile src/external/bsd/elftoolchain/common/sys: Makefile Log Message: Prepare for and to be installed into ${DESTDIR}/usr/include. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/common/Makefile cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/common/sys/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/bsd/elftoolchain/common/Makefile diff -u /dev/null src/external/bsd/elftoolchain/common/Makefile:1.1 --- /dev/null Tue Apr 6 19:40:20 2021 +++ src/external/bsd/elftoolchain/common/Makefile Tue Apr 6 19:40:19 2021 @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1 2021/04/06 19:40:19 jkoshy Exp $ + +.include + +TOP= ${.CURDIR}/../dist +SRCDIR= ${TOP}/common + +.PATH: ${SRCDIR} + +SUBDIR= sys + +INCS= elfdefinitions.h +INCSDIR= /usr/include + +.PHONY: all clean clobber depend obj + +all depend: + +clean clobber: + rm -f ${CLEANFILES} + +cleandepend: + rm -f ${.OBJDIR}/.depend + +.include +.include Index: src/external/bsd/elftoolchain/common/sys/Makefile diff -u /dev/null src/external/bsd/elftoolchain/common/sys/Makefile:1.1 --- /dev/null Tue Apr 6 19:40:20 2021 +++ src/external/bsd/elftoolchain/common/sys/Makefile Tue Apr 6 19:40:19 2021 @@ -0,0 +1,28 @@ +# $NetBSD: Makefile,v 1.1 2021/04/06 19:40:19 jkoshy Exp $ + +.include + +TOP= ${.CURDIR}/../../dist +SRCDIR= ${TOP}/common/sys + +.PATH: ${SRCDIR} + +INCS= elfdefinitions.h +INCSDIR= /usr/include/sys + +elfdefinitions.h: elfdefinitions.m4 elfconstants.m4 + ${TOOL_M4} -I${SRCDIR} -D SRCDIR=${SRCDIR} ${M4FLAGS} \ + elfdefinitions.m4 > ${.TARGET} + +.PHONY: all clean clobber depend + +all depend: elfdefinitions.h + +clean clobber: + rm -f ${INCS} + +cleandepend: + rm -f ${.OBJDIR}/.depend + +.include +.include
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Tue Apr 6 19:28:26 UTC 2021 Modified Files: src/external/bsd/elftoolchain/dist/common: Makefile Log Message: Sync with upstream r3943. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/dist/common/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/Makefile diff -u src/external/bsd/elftoolchain/dist/common/Makefile:1.2 src/external/bsd/elftoolchain/dist/common/Makefile:1.3 --- src/external/bsd/elftoolchain/dist/common/Makefile:1.2 Thu Nov 26 21:52:00 2020 +++ src/external/bsd/elftoolchain/dist/common/Makefile Tue Apr 6 19:28:25 2021 @@ -1,7 +1,9 @@ -# Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy +# Id: Makefile 3938 2021-04-04 18:16:18Z jkoshy TOP= .. +SUBDIR= sys + INCS= elfdefinitions.h INCSDIR= /usr/include @@ -16,3 +18,4 @@ cleandepend: rm -f ${.OBJDIR}/.depend .include "${TOP}/mk/elftoolchain.inc.mk" +.include "${TOP}/mk/elftoolchain.subdir.mk"
CVS commit: src/external/bsd/elftoolchain/dist/common/sys
Module Name:src Committed By: jkoshy Date: Tue Apr 6 18:38:04 UTC 2021 Added Files: src/external/bsd/elftoolchain/dist/common/sys: Makefile elfconstants.m4 elfdefinitions.m4 Log Message: Add files present in upstream revision r3943. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/dist/common/sys/Makefile \ src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4 \ src/external/bsd/elftoolchain/dist/common/sys/elfdefinitions.m4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/bsd/elftoolchain/dist/common/sys/Makefile diff -u /dev/null src/external/bsd/elftoolchain/dist/common/sys/Makefile:1.1 --- /dev/null Tue Apr 6 18:38:04 2021 +++ src/external/bsd/elftoolchain/dist/common/sys/Makefile Tue Apr 6 18:38:04 2021 @@ -0,0 +1,25 @@ +# Id: Makefile 3943 2021-04-05 17:03:34Z jkoshy + +TOP= ../.. + +SRCS= elfdefinitions.m4 elfconstants.m4 +INCS= elfdefinitions.h +INCSDIR= /usr/include/sys + +CLEANFILES= ${INCS} + +.PHONY: all clean clobber depend obj + +all: ${INCS} + +elfdefinitions.h: elfdefinitions.m4 elfconstants.m4 + m4 -I${.CURDIR} -D SRCDIR=${.CURDIR} ${M4FLAGS} \ + elfdefinitions.m4 > ${.TARGET} + +depend cleandepend: + +clean clobber: + rm -f ${CLEANFILES} + +.include "${TOP}/mk/elftoolchain.inc.mk" +.include "${TOP}/mk/elftoolchain.m4.mk" Index: src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4 diff -u /dev/null src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4:1.1 --- /dev/null Tue Apr 6 18:38:04 2021 +++ src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4 Tue Apr 6 18:38:04 2021 @@ -0,0 +1,2592 @@ +# Copyright (c) 2010,2021 Joseph Koshy +# 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. + +# These definitions are based on: +# - The public specification of the ELF format as defined in the +# October 2009 draft of System V ABI. +# See: http://www.sco.com/developers/gabi/latest/ch4.intro.html +# - The May 1998 (version 1.5) draft of "The ELF-64 object format". +# - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips, +# ia64, powerpc, and RISC-V processors. +# - The "Linkers and Libraries Guide", from Sun Microsystems. + +define(`VCSID_ELFCONSTANTS_M4', + `Id: elfconstants.m4 3939 2021-04-04 20:15:13Z jkoshy') + +# +# Types of capabilities. +# +define(`DEFINE_CAPABILITIES',` +DEFINE_CAPABILITY(`CA_SUNW_NULL', 0, `ignored') +DEFINE_CAPABILITY(`CA_SUNW_HW_1', 1, `hardware capability') +DEFINE_CAPABILITY(`CA_SUNW_SW_1', 2, `software capability')') + +# +# Flags used with dynamic linking entries. +# +define(`DEFINE_DYN_FLAGS',` +DEFINE_DYN_FLAG(`DF_ORIGIN', 0x1, + `object being loaded may refer to `$ORIGIN'') +DEFINE_DYN_FLAG(`DF_SYMBOLIC', 0x2, + `search library for references before executable') +DEFINE_DYN_FLAG(`DF_TEXTREL', 0x4, + `relocation entries may modify text segment') +DEFINE_DYN_FLAG(`DF_BIND_NOW', 0x8, + `process relocation entries at load time') +DEFINE_DYN_FLAG(`DF_STATIC_TLS', 0x10, + `uses static thread-local storage') +DEFINE_DYN_FLAG(`DF_1_BIND_NOW', 0x1, + `process relocation entries at load time') +DEFINE_DYN_FLAG(`DF_1_GLOBAL', 0x2, + `unused') +DEFINE_DYN_FLAG(`DF_1_GROUP', 0x4, + `object is a member of a group') +DEFINE_DYN_FLAG(`DF_1_NODELETE', 0x8, + `object cannot be deleted from a process') +DEFINE_DYN_FLAG(`DF_1_LOADFLTR', 0x10, + `immediate load filtees') +DEFINE_DYN_FLAG(`DF_1_INITFIRST', 0x20, + `initialize object first') +DEFINE_DYN_FLAG(`DF_1_NOOPEN', 0x40, + `disallow dlopen()')
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Wed Mar 10 21:36:29 UTC 2021 Modified Files: src/external/bsd/elftoolchain/dist/common: _elftc.h Log Message: Update to upstream elftoolchain revision r3933. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/elftoolchain/dist/common/_elftc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/_elftc.h diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.7 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.8 --- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.7 Thu Nov 26 21:01:47 2020 +++ src/external/bsd/elftoolchain/dist/common/_elftc.h Wed Mar 10 21:36:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: _elftc.h,v 1.7 2020/11/26 21:01:47 jkoshy Exp $ */ +/* $NetBSD: _elftc.h,v 1.8 2021/03/10 21:36:29 jkoshy Exp $ */ /*- * Copyright (c) 2009 Joseph Koshy @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: _elftc.h 3894 2020-11-20 18:02:53Z jkoshy + * Id: _elftc.h 3933 2021-03-10 21:09:49Z jkoshy */ /** @@ -384,6 +384,10 @@ extern const char *__progname; #include #include +#ifndef roundup2 +#define roundup2 roundup +#endif + #define ELFTC_BYTE_ORDER _BYTE_ORDER #define ELFTC_BYTE_ORDER_LITTLE_ENDIAN _LITTLE_ENDIAN #define ELFTC_BYTE_ORDER_BIG_ENDIAN _BIG_ENDIAN
CVS commit: src/external/bsd/elftoolchain/dist/libelf
Module Name:src Committed By: jkoshy Date: Mon Mar 8 20:55:06 UTC 2021 Modified Files: src/external/bsd/elftoolchain/dist/libelf: elf.3 elf_begin.3 elf_cntl.3 elf_end.3 elf_errmsg.3 elf_fill.3 elf_flagdata.3 elf_getarhdr.3 elf_getarsym.3 elf_getbase.3 elf_getdata.3 elf_getident.3 elf_getphdrnum.3 elf_getphnum.3 elf_getscn.3 elf_getshdrnum.3 elf_getshdrstrndx.3 elf_getshnum.3 elf_getshstrndx.3 elf_hash.3 elf_kind.3 elf_memory.3 elf_next.3 elf_open.3 elf_rand.3 elf_rawfile.3 elf_strptr.3 elf_update.3 elf_version.3 gelf.3 gelf_checksum.3 gelf_fsize.3 gelf_getcap.3 gelf_getclass.3 gelf_getdyn.3 gelf_getehdr.3 gelf_getmove.3 gelf_getphdr.3 gelf_getrel.3 gelf_getrela.3 gelf_getshdr.3 gelf_getsym.3 gelf_getsyminfo.3 gelf_getsymshndx.3 gelf_newehdr.3 gelf_newphdr.3 gelf_update_ehdr.3 gelf_xlatetof.3 Log Message: Update libelf's manual pages to upstream revision [r3928]. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/elftoolchain/dist/libelf/elf.3 cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/elftoolchain/dist/libelf/elf_begin.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_cntl.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_end.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_errmsg.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_fill.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_flagdata.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getarhdr.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getarsym.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getbase.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getdata.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getident.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getphdrnum.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getphnum.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getscn.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getshdrnum.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getshdrstrndx.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getshnum.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_getshstrndx.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_hash.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_kind.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_memory.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_next.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_open.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_rand.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_strptr.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_update.3 \ src/external/bsd/elftoolchain/dist/libelf/elf_version.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getcap.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getdyn.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getehdr.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getmove.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getphdr.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getrel.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getrela.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getshdr.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getsym.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getsyminfo.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_getsymshndx.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_newehdr.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_newphdr.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_update_ehdr.3 \ src/external/bsd/elftoolchain/dist/libelf/gelf_xlatetof.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libelf/elf.3 diff -u src/external/bsd/elftoolchain/dist/libelf/elf.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf.3:1.5 --- src/external/bsd/elftoolchain/dist/libelf/elf.3:1.4 Thu Apr 28 07:06:11 2016 +++ src/external/bsd/elftoolchain/dist/libelf/elf.3 Mon Mar 8 20:55:06 2021 @@ -1,6 +1,6 @@ -.\" $NetBSD: elf.3,v 1.4 2016/04/28 07:06:11 wiz Exp $ +.\" $NetBSD: elf.3,v 1.5 2021/03/08 20:55:06 jkoshy Exp $ .\" -.\" Copyright (c) 2006-2008,2011 Joseph Koshy. All rights reserved. +.\" Copyright (c) 2006-2008,2011,2019 Joseph Koshy. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,11 +23,11 @@
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Sun Mar 7 14:53:59 UTC 2021 Modified Files: src/external/bsd/elftoolchain/dist/common: elfdefinitions.h Log Message: Sync with Elftoolchain [r3916]: update the list of known EM_* values. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.4 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.5 --- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.4 Thu Nov 19 20:58:30 2020 +++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h Sun Mar 7 14:53:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: elfdefinitions.h,v 1.4 2020/11/19 20:58:30 jkoshy Exp $ */ +/* $NetBSD: elfdefinitions.h,v 1.5 2021/03/07 14:53:59 jkoshy Exp $ */ /*- * Copyright (c) 2010 Joseph Koshy @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: elfdefinitions.h 3858 2020-05-11 22:53:38Z emaste + * Id: elfdefinitions.h 3916 2020-12-12 11:26:53Z jkoshy */ /* @@ -873,7 +873,34 @@ _ELF_DEFINE_EM(EM_KMX32,211, _ELF_DEFINE_EM(EM_KMX16,212, "KM211 KMX16 16-bit processor") \ _ELF_DEFINE_EM(EM_KMX8, 213, "KM211 KMX8 8-bit processor") \ _ELF_DEFINE_EM(EM_KVARC,214, "KM211 KMX32 KVARC processor") \ -_ELF_DEFINE_EM(EM_RISCV,243, "RISC-V") +_ELF_DEFINE_EM(EM_CDP, 215, "Paneve CDP architecture family") \ +_ELF_DEFINE_EM(EM_COGE, 216, "Cognitive Smart Memory Processor") \ +_ELF_DEFINE_EM(EM_COOL, 217, "Bluechip Systems CoolEngine") \ +_ELF_DEFINE_EM(EM_NORC, 218, "Nanoradio Optimized RISC")\ +_ELF_DEFINE_EM(EM_CSR_KALIMBA, 219,\ + "CSR Kalimba architecture family") \ +_ELF_DEFINE_EM(EM_Z80, 220, "Zilog Z80") \ +_ELF_DEFINE_EM(EM_VISIUM, 221,\ + "Controls and Data Services VISIUMcore processor") \ +_ELF_DEFINE_EM(EM_FT32, 222,\ + "FTDI Chip FT32 high performance 32-bit RISC architecture") \ +_ELF_DEFINE_EM(EM_MOXIE,223, "Moxie processor family") \ +_ELF_DEFINE_EM(EM_AMDGPU, 224, "AMD GPU architecture")\ +_ELF_DEFINE_EM(EM_RISCV,243, "RISC-V") \ +_ELF_DEFINE_EM(EM_LANAI,244, "Lanai processor") \ +_ELF_DEFINE_EM(EM_CEVA, 245,\ + "CEVA Processor Architecture Family") \ +_ELF_DEFINE_EM(EM_CEVA_X2, 246, "CEVA X2 Processor Family") \ +_ELF_DEFINE_EM(EM_BPF, 247,\ + "Linux BPF – in-kernel virtual machine") \ +_ELF_DEFINE_EM(EM_GRAPHCORE_IPU,248,\ + "Graphcore Intelligent Processing Unit") \ +_ELF_DEFINE_EM(EM_IMG1, 249, "Imagination Technologies") \ +_ELF_DEFINE_EM(EM_NFP, 250,\ + "Netronome Flow Processor (NFP)") \ +_ELF_DEFINE_EM(EM_CSKY, 252, "C-SKY processor family") \ +_ELF_DEFINE_EM(EM_65816,257, "WDC 65816/65C816")\ +_ELF_DEFINE_EM(EM_KF32, 259, "ChipON KungFu 32") #undef _ELF_DEFINE_EM #define _ELF_DEFINE_EM(N, V, DESCR) N = V ,
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Mon Nov 30 22:26:30 UTC 2020 Modified Files: src/external/bsd/elftoolchain/dist/common: uthash.h Log Message: Unbreak the lint build (sync to elftoolchain [r3912]). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/dist/common/uthash.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/uthash.h diff -u src/external/bsd/elftoolchain/dist/common/uthash.h:1.3 src/external/bsd/elftoolchain/dist/common/uthash.h:1.4 --- src/external/bsd/elftoolchain/dist/common/uthash.h:1.3 Wed Nov 18 22:23:05 2020 +++ src/external/bsd/elftoolchain/dist/common/uthash.h Mon Nov 30 22:26:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: uthash.h,v 1.3 2020/11/18 22:23:05 jkoshy Exp $ */ +/* $NetBSD: uthash.h,v 1.4 2020/11/30 22:26:30 jkoshy Exp $ */ /* Copyright (c) 2003-2018, Troy D. Hanson http://troydhanson.github.com/uthash/ @@ -76,6 +76,8 @@ typedef unsigned char uint8_t; #endif #elif defined(__GNUC__) && !defined(__VXWORKS__) #include +#elif defined(__lint__) +#include #else typedef unsigned int uint32_t; typedef unsigned char uint8_t;
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Thu Nov 26 21:52:00 UTC 2020 Modified Files: src/external/bsd/elftoolchain/dist/common: Makefile native-elf-format os.Linux.mk Log Message: Sync with elftoolchain upstream. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/bsd/elftoolchain/dist/common/Makefile \ src/external/bsd/elftoolchain/dist/common/native-elf-format cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/bsd/elftoolchain/dist/common/os.Linux.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/Makefile diff -u src/external/bsd/elftoolchain/dist/common/Makefile:1.1.1.2 src/external/bsd/elftoolchain/dist/common/Makefile:1.2 --- src/external/bsd/elftoolchain/dist/common/Makefile:1.1.1.2 Sat Feb 20 02:42:01 2016 +++ src/external/bsd/elftoolchain/dist/common/Makefile Thu Nov 26 21:52:00 2020 @@ -1,4 +1,4 @@ -# Id: Makefile 3022 2014-04-17 18:05:58Z jkoshy +# Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy TOP= .. @@ -7,12 +7,12 @@ INCSDIR= /usr/include .PHONY: all clean clobber depend obj -all depend obj: +all depend: clean clobber: rm -f ${CLEANFILES} cleandepend: - rm -f .depend + rm -f ${.OBJDIR}/.depend .include "${TOP}/mk/elftoolchain.inc.mk" Index: src/external/bsd/elftoolchain/dist/common/native-elf-format diff -u src/external/bsd/elftoolchain/dist/common/native-elf-format:1.1.1.2 src/external/bsd/elftoolchain/dist/common/native-elf-format:1.2 --- src/external/bsd/elftoolchain/dist/common/native-elf-format:1.1.1.2 Sat Feb 20 02:42:01 2016 +++ src/external/bsd/elftoolchain/dist/common/native-elf-format Thu Nov 26 21:52:00 2020 @@ -1,6 +1,6 @@ #!/bin/sh # -# Id: native-elf-format 3293 2016-01-07 19:26:27Z emaste +# Id: native-elf-format 3893 2020-11-20 17:11:04Z jkoshy # # Find the native ELF format for a host platform by compiling a # test object and examining the resulting object. @@ -9,7 +9,7 @@ # information statically at compile time. program=`basename $0` -tmp_c=`mktemp -u nefXX`.c +tmp_c=`mktemp ${MAKEOBJDIRPREFIX+"-p ${MAKEOBJDIRPREFIX}"} -u nefXX`.c tmp_o=`echo ${tmp_c} | sed -e 's/.c$/.o/'` trap "rm -f ${tmp_c} ${tmp_o}" 0 1 2 3 15 @@ -35,8 +35,12 @@ $1 ~ "Machine:" { elfarch = "EM_386"; } else if (match($0, "MIPS")) { elfarch = "EM_MIPS"; -} else if (match($0, ".*[xX]86-64")) { +} else if (match($0, ".*[xX]86[-_]64")) { elfarch = "EM_X86_64"; +} else if (match($0, "PowerPC64")) { +elfarch = "EM_PPC64"; + } else if (match($0, "ARM")) { + elfarch = "EM_ARM"; } else { elfarch = "unknown"; } Index: src/external/bsd/elftoolchain/dist/common/os.Linux.mk diff -u src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.1.1.1 src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.2 --- src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.1.1.1 Sun Mar 9 16:25:59 2014 +++ src/external/bsd/elftoolchain/dist/common/os.Linux.mk Thu Nov 26 21:52:00 2020 @@ -1,13 +1,15 @@ # # Build recipes for Linux based operating systems. # -# Id: os.Linux.mk 2064 2011-10-26 15:12:32Z jkoshy +# Id: os.Linux.mk 3594 2018-04-11 18:26:50Z jkoshy _NATIVE_ELF_FORMAT = native-elf-format -.BEGIN: ${_NATIVE_ELF_FORMAT}.h +.if !make(obj) +.BEGIN: ${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h -${_NATIVE_ELF_FORMAT}.h: +${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h: ${.CURDIR}/${_NATIVE_ELF_FORMAT} > ${.TARGET} || rm ${.TARGET} +.endif -CLEANFILES += ${_NATIVE_ELF_FORMAT}.h +CLEANFILES += ${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Thu Nov 26 21:01:47 UTC 2020 Modified Files: src/external/bsd/elftoolchain/dist/common: _elftc.h Log Message: Restore an overlooked 'Id' line. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/elftoolchain/dist/common/_elftc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/_elftc.h diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.6 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.7 --- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.6 Sat Nov 21 21:04:25 2020 +++ src/external/bsd/elftoolchain/dist/common/_elftc.h Thu Nov 26 21:01:47 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $ */ +/* $NetBSD: _elftc.h,v 1.7 2020/11/26 21:01:47 jkoshy Exp $ */ /*- * Copyright (c) 2009 Joseph Koshy @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $ + * Id: _elftc.h 3894 2020-11-20 18:02:53Z jkoshy */ /**
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Sat Nov 21 21:04:25 UTC 2020 Modified Files: src/external/bsd/elftoolchain/dist/common: _elftc.h Log Message: Sync '_elftc.h' with the upstream elftoolchain project. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/elftoolchain/dist/common/_elftc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/_elftc.h diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.5 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.6 --- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.5 Sun Mar 13 03:47:41 2016 +++ src/external/bsd/elftoolchain/dist/common/_elftc.h Sat Nov 21 21:04:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: _elftc.h,v 1.5 2016/03/13 03:47:41 christos Exp $ */ +/* $NetBSD: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $ */ /*- * Copyright (c) 2009 Joseph Koshy @@ -25,11 +25,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: _elftc.h 3244 2015-08-31 19:53:08Z emaste + * $Id: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $ */ /** - ** Miscellanous definitions needed by multiple components. + ** Miscellaneous definitions needed by multiple components. **/ #ifndef _ELFTC_H @@ -284,49 +284,34 @@ struct name { \ /* * VCS Ids. + * + * The marker below is intended to be replaced with a project-specific + * definition of the ELFTC_VCSID macro. */ +#ifndef ELFTC_VCSID +#define ELFTC_VCSID(ID) /**/ +#endif + #ifndef ELFTC_VCSID -#if defined(__DragonFly__) -#define ELFTC_VCSID(ID) __RCSID(ID) -#endif +#if defined(__DragonFly__) || defined(__NetBSD__) -#if defined(__FreeBSD__) -#define ELFTC_VCSID(ID) __FBSDID(ID) -#endif +#define ELFTC_VCSID(ID) __RCSID(ID) -#if defined(__APPLE__) || defined(__GLIBC__) || defined(__GNU__) || \ -defined(__linux__) -#if defined(__GNUC__) -#define ELFTC_VCSID(ID) __asm__(".ident\t\"" ID "\"") -#else -#define ELFTC_VCSID(ID) /**/ -#endif -#endif +#elif defined(__FreeBSD__) -#if defined(__minix) -#if defined(__GNUC__) -#define ELFTC_VCSID(ID) __asm__(".ident\t\"" ID "\"") -#else -#define ELFTC_VCSID(ID) /**/ -#endif /* __GNU__ */ -#endif +#define ELFTC_VCSID(ID) __FBSDID(ID) -#if defined(__NetBSD__) -#define ELFTC_VCSID(ID) __RCSID(ID) -#endif +#elif defined(__APPLE__) || defined(__OpenBSD__) || defined(__GLIBC__) || \ +defined(__GNU__) || defined(__linux__) || defined(__minix) -#if defined(__OpenBSD__) #if defined(__GNUC__) #define ELFTC_VCSID(ID) __asm__(".ident\t\"" ID "\"") #else #define ELFTC_VCSID(ID) /**/ -#endif /* __GNUC__ */ #endif -#ifndef ELFTC_VCSID -#define ELFTC_VCSID(ID) /**/ #endif #endif /* ELFTC_VCSID */ @@ -344,7 +329,7 @@ struct name { \ #define ELFTC_GETPROGNAME() getprogname() -#endif /* __DragonFly__ || __FreeBSD__ || __minix || __NetBSD__ */ +#endif /* __APPLE__ || __DragonFly__ || __FreeBSD__ || __minix || __NetBSD__ */ #if defined(__GLIBC__) || defined(__linux__) @@ -372,12 +357,41 @@ extern const char *__progname; #endif /* ELFTC_GETPROGNAME */ -#ifndef HAVE_NBTOOL_CONFIG_H -/** - ** Per-OS configuration. - **/ +/* + * Per-OS configuration. + * + * The following symbols are supported by this configuration fragment, + * although not all the OSes so referenced are fully supported. + * + * Cross-compilation: + * + * HAVE_NBTOOL_CONFIG_H : cross-compiling NetBSD tools on various OSes. + * + * Native compilation: + * + * __APPLE__ : compiling under Mac OS X. + * __DragonFly__ : compiling under DragonFlyBSD. + * __GLIBC__ : compiling under GNU based systems, such as GNU/kFreeBSD. + * __linux__ : compiling under GNU/Linux systems. + * __FreeBSD__ : compiling under FreeBSD. + * __minix : compiling under Minix3. + * __NetBSD__: compiling (native) under NetBSD. + * __OpenBSD__ : compiling under OpenBSD. + */ -#if defined(__APPLE__) +#if defined(HAVE_NBTOOL_CONFIG_H) + +#include +#include + +#define ELFTC_BYTE_ORDER _BYTE_ORDER +#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN _LITTLE_ENDIAN +#define ELFTC_BYTE_ORDER_BIG_ENDIAN _BIG_ENDIAN + +#define ELFTC_HAVE_MMAP1 +#define ELFTC_HAVE_STRMODE 1 + +#elif defined(__APPLE__) #include #define htobe32(x) OSSwapHostToBigInt32(x) @@ -391,10 +405,8 @@ extern const char *__progname; #define ELFTC_HAVE_STRMODE 1 #define ELFTC_NEED_BYTEORDER_EXTENSIONS 1 -#endif /* __APPLE__ */ - -#if defined(__DragonFly__) +#elif defined(__DragonFly__) #include #include @@ -405,9 +417,7 @@ extern const char *__progname; #define ELFTC_HAVE_MMAP1 -#endif - -#if defined(__GLIBC__) || defined(__linux__) +#elif defined(__GLIBC__) || defined(__linux__) #include @@ -427,10 +437,7 @@ extern const char *__progname; #define roundup2 roundup -#endif /* __GLIBC__ || __linux__ */ - - -#if defined(__FreeBSD__)
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Thu Nov 19 20:58:30 UTC 2020 Modified Files: src/external/bsd/elftoolchain/dist/common: elfdefinitions.h Log Message: Update 'elfdefinitions.h' to elftoolchain revision [r3891]. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.3 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.4 --- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.3 Sat Feb 20 02:43:41 2016 +++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h Thu Nov 19 20:58:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: elfdefinitions.h,v 1.3 2016/02/20 02:43:41 christos Exp $ */ +/* $NetBSD: elfdefinitions.h,v 1.4 2020/11/19 20:58:30 jkoshy Exp $ */ /*- * Copyright (c) 2010 Joseph Koshy @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: elfdefinitions.h 3392 2016-02-05 19:51:22Z emaste + * Id: elfdefinitions.h 3858 2020-05-11 22:53:38Z emaste */ /* @@ -35,7 +35,7 @@ * See: http://www.sco.com/developers/gabi/latest/ch4.intro.html * - The May 1998 (version 1.5) draft of "The ELF-64 object format". * - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips, - * ia64, and powerpc processors. + * ia64, powerpc, and RISC-V processors. * - The "Linkers and Libraries Guide", from Sun Microsystems. */ @@ -74,7 +74,39 @@ _ELF_DEFINE_DF(DF_TEXTREL, 0x4, _ELF_DEFINE_DF(DF_BIND_NOW, 0x8, \ "process relocation entries at load time") \ _ELF_DEFINE_DF(DF_STATIC_TLS, 0x10, \ - "uses static thread-local storage") + "uses static thread-local storage") \ +_ELF_DEFINE_DF(DF_1_BIND_NOW, 0x1, \ + "process relocation entries at load time") \ +_ELF_DEFINE_DF(DF_1_GLOBAL, 0x2, \ + "unused") \ +_ELF_DEFINE_DF(DF_1_GROUP, 0x4, \ + "object is a member of a group") \ +_ELF_DEFINE_DF(DF_1_NODELETE, 0x8, \ + "object cannot be deleted from a process") \ +_ELF_DEFINE_DF(DF_1_LOADFLTR, 0x10, \ + "immediate load filtees")\ +_ELF_DEFINE_DF(DF_1_INITFIRST, 0x20, \ + "initialize object first")\ +_ELF_DEFINE_DF(DF_1_NOOPEN, 0x40, \ + "disallow dlopen()") \ +_ELF_DEFINE_DF(DF_1_ORIGIN, 0x80, \ + "object being loaded may refer to $ORIGIN") \ +_ELF_DEFINE_DF(DF_1_DIRECT, 0x100, \ + "direct bindings enabled")\ +_ELF_DEFINE_DF(DF_1_INTERPOSE, 0x400, \ + "object is interposer") \ +_ELF_DEFINE_DF(DF_1_NODEFLIB, 0x800, \ + "ignore default library search path") \ +_ELF_DEFINE_DF(DF_1_NODUMP, 0x1000, \ + "disallow dldump()") \ +_ELF_DEFINE_DF(DF_1_CONFALT,0x2000, \ + "object is a configuration alternative") \ +_ELF_DEFINE_DF(DF_1_ENDFILTEE, 0x4000, \ + "filtee terminates filter search") \ +_ELF_DEFINE_DF(DF_1_DISPRELDNE, 0x8000, \ + "displacement relocation done")\ +_ELF_DEFINE_DF(DF_1_DISPRELPND, 0x1, \ + "displacement relocation pending") #undef _ELF_DEFINE_DF #define _ELF_DEFINE_DF(N, V, DESCR) N = V , enum { @@ -155,6 +187,8 @@ _ELF_DEFINE_DT(DT_SUNW_FILTER, 0x60 "offset of string naming standard filtees") \ _ELF_DEFINE_DT(DT_SUNW_CAP, 0x6010UL, \ "address of hardware capabilities section") \ +_ELF_DEFINE_DT(DT_SUNW_ASLR,0x6023UL, \ + "Address Space Layout Randomization flag") \ _ELF_DEFINE_DT(DT_HIOS, 0x6000UL, \ "end of OS-specific types") \ _ELF_DEFINE_DT(DT_VALRNGLO, 0x6D00UL, \ @@ -186,6 +220,10 @@ _ELF_DEFINE_DT(DT_ADDRRNGLO,0x6F "start of range using the d_ptr field")\ _ELF_DEFINE_DT(DT_GNU_HASH, 0x6EF5UL, \ "GNU style hash tables") \ +_ELF_DEFINE_DT(DT_TLSDESC_PLT, 0x6EF6UL, \ + "location of PLT entry for TLS descriptor resolver calls") \ +_ELF_DEFINE_DT(DT_TLSDESC_GOT, 0x6EF7UL, \ + "location of GOT entry used by TLS descriptor resolver PLT entry") \ _ELF_DEFINE_DT(DT_GNU_CONFLICT, 0x6EF8UL, \ "address of conflict section") \ _ELF_DEFINE_DT(DT_GNU_LIBLIST, 0x6EF9UL, \ @@ -271,7 +309,7 @@ _ELF_DEFINE_DT(DT_MIPS_DELTA_RELOC, 0x70 _ELF_DEFINE_DT(DT_MIPS_DELTA_RELOC_NO, 0x701CUL, \ "number of entries in DT_MIPS_DELTA_RELOC") \ _ELF_DEFINE_DT(DT_MIPS_DELTA_SYM, 0x701DUL, \ - "Delta symbols refered by Delta relocations") \ + "Delta symbols referred by Delta relocations") \ _ELF_DEFINE_DT(DT_MIPS_DELTA_SYM_NO, 0x701EUL, \ "number of entries in DT_MIPS_DELTA_SYM") \ _ELF_DEFINE_DT(DT_MIPS_DELTA_CLASSSYM, 0x7020UL, \ @@ -422,6 +460,22 @@
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: jkoshy Date: Wed Nov 18 22:23:05 UTC 2020 Modified Files: src/external/bsd/elftoolchain/dist/common: utarray.h uthash.h Log Message: Sync 'utarray.h' and 'uthash.h' with elftoolchain revision [r3891]. This change upgrades these files to UT{HASH,ARRAY}_VERSION 2.1.0. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/dist/common/utarray.h \ src/external/bsd/elftoolchain/dist/common/uthash.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/utarray.h diff -u src/external/bsd/elftoolchain/dist/common/utarray.h:1.2 src/external/bsd/elftoolchain/dist/common/utarray.h:1.3 --- src/external/bsd/elftoolchain/dist/common/utarray.h:1.2 Sun Mar 9 16:58:03 2014 +++ src/external/bsd/elftoolchain/dist/common/utarray.h Wed Nov 18 22:23:05 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: utarray.h,v 1.2 2014/03/09 16:58:03 christos Exp $ */ +/* $NetBSD: utarray.h,v 1.3 2020/11/18 22:23:05 jkoshy Exp $ */ /* -Copyright (c) 2008-2013, Troy D. Hanson http://uthash.sourceforge.net +Copyright (c) 2008-2018, Troy D. Hanson http://troydhanson.github.com/uthash/ All rights reserved. Redistribution and use in source and binary forms, with or without @@ -23,28 +23,30 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* Id: utarray.h 2694 2012-11-24 17:11:58Z kaiwang27 */ - -/* a dynamic array implementation using macros - * see http://uthash.sourceforge.net/utarray +/* a dynamic array implementation using macros */ #ifndef UTARRAY_H #define UTARRAY_H -#define UTARRAY_VERSION 1.9.7 +#define UTARRAY_VERSION 2.1.0 + +#include /* size_t */ +#include /* memset, etc */ +#include /* exit */ #ifdef __GNUC__ -#define _UNUSED_ __attribute__ ((__unused__)) +#define UTARRAY_UNUSED __attribute__((__unused__)) #else -#define _UNUSED_ +#define UTARRAY_UNUSED #endif -#include /* size_t */ -#include /* memset, etc */ -#include /* exit */ +#ifdef oom +#error "The name of macro 'oom' has been changed to 'utarray_oom'. Please update your code." +#define utarray_oom() oom() +#endif -#ifndef oom -#define oom() exit(-1) +#ifndef utarray_oom +#define utarray_oom() exit(-1) #endif typedef void (ctor_f)(void *dst, const void *src); @@ -65,13 +67,13 @@ typedef struct { #define utarray_init(a,_icd) do { \ memset(a,0,sizeof(UT_array)); \ - (a)->icd=*_icd; \ + (a)->icd = *(_icd); \ } while(0) #define utarray_done(a) do { \ if ((a)->n) { \ if ((a)->icd.dtor) { \ - size_t _ut_i; \ + unsigned _ut_i; \ for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \ (a)->icd.dtor(utarray_eltptr(a,_ut_i)); \ } \ @@ -82,7 +84,10 @@ typedef struct { } while(0) #define utarray_new(a,_icd) do { \ - a=(UT_array*)malloc(sizeof(UT_array)); \ + (a) = (UT_array*)malloc(sizeof(UT_array)); \ + if ((a) == NULL) { \ +utarray_oom();\ + } \ utarray_init(a,_icd); \ } while(0) @@ -92,9 +97,14 @@ typedef struct { } while(0) #define utarray_reserve(a,by) do {\ - if (((a)->i+by) > ((a)->n)) { \ -while(((a)->i+by) > ((a)->n)) { (a)->n = ((a)->n ? (2*(a)->n) : 8); } \ -if ( ((a)->d=(char*)realloc((a)->d, (a)->n*(a)->icd.sz)) == NULL) oom(); \ + if (((a)->i+(by)) > (a)->n) { \ +char *utarray_tmp;\ +while (((a)->i+(by)) > (a)->n) { (a)->n = ((a)->n ? (2*(a)->n) : 8); }\ +utarray_tmp=(char*)realloc((a)->d, (a)->n*(a)->icd.sz); \ +if (utarray_tmp == NULL) {\ + utarray_oom(); \ +}
CVS commit: src/external/bsd/elftoolchain/dist/libdwarf
Module Name:src Committed By: christos Date: Sat Feb 10 23:46:44 UTC 2018 Modified Files: src/external/bsd/elftoolchain/dist/libdwarf: dwarf_attrval.c Log Message: remove more unreachable code. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c diff -u src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.9 src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.10 --- src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.9 Sat Feb 10 18:39:29 2018 +++ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Sat Feb 10 18:46:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dwarf_attrval.c,v 1.9 2018/02/10 23:39:29 christos Exp $ */ +/* $NetBSD: dwarf_attrval.c,v 1.10 2018/02/10 23:46:44 christos Exp $ */ /*- * Copyright (c) 2007 John Birrell (j...@freebsd.org) @@ -28,7 +28,7 @@ #include "_libdwarf.h" -__RCSID("$NetBSD: dwarf_attrval.c,v 1.9 2018/02/10 23:39:29 christos Exp $"); +__RCSID("$NetBSD: dwarf_attrval.c,v 1.10 2018/02/10 23:46:44 christos Exp $"); ELFTC_VCSID("Id: dwarf_attrval.c 3159 2015-02-15 21:43:27Z emaste "); int @@ -201,13 +201,9 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw *valp = at->u[0].u64; break; default: - if (at->at_die != die) - dwarf_dealloc(dbg, at->at_die, DW_DLA_DIE); DWARF_SET_ERROR(dbg, err, DW_DLE_ATTR_FORM_BAD); return (DW_DLV_ERROR); } - if (at->at_die != die) - dwarf_dealloc(dbg, at->at_die, DW_DLA_DIE); return (DW_DLV_OK); }
CVS commit: src/external/bsd/elftoolchain/dist/libdwarf
Module Name:src Committed By: christos Date: Sat Feb 10 23:39:29 UTC 2018 Modified Files: src/external/bsd/elftoolchain/dist/libdwarf: dwarf_attrval.c Log Message: Convert to full recursive attr/die lookup instead of one level since gcc 6 creates indirect attributes that point to indirect attributes. The code is smaller this way too :-) To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c diff -u src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.8 src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.9 --- src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.8 Thu Mar 31 11:53:33 2016 +++ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Sat Feb 10 18:39:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dwarf_attrval.c,v 1.8 2016/03/31 15:53:33 christos Exp $ */ +/* $NetBSD: dwarf_attrval.c,v 1.9 2018/02/10 23:39:29 christos Exp $ */ /*- * Copyright (c) 2007 John Birrell (j...@freebsd.org) @@ -28,7 +28,7 @@ #include "_libdwarf.h" -__RCSID("$NetBSD: dwarf_attrval.c,v 1.8 2016/03/31 15:53:33 christos Exp $"); +__RCSID("$NetBSD: dwarf_attrval.c,v 1.9 2018/02/10 23:39:29 christos Exp $"); ELFTC_VCSID("Id: dwarf_attrval.c 3159 2015-02-15 21:43:27Z emaste "); int @@ -141,23 +141,13 @@ dwarf_attrval_signed(Dwarf_Die die, Dwar return (DW_DLV_OK); } -static Dwarf_Attribute -dwarf_indirect_find(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half attr, -Dwarf_Unsigned val) -{ - Dwarf_Die die1; - - if ((die1 = _dwarf_die_find(die, val)) == NULL) - return NULL; - - return _dwarf_attr_find(die1, attr); -} - int dwarf_attrval_unsigned(Dwarf_Die die, Dwarf_Half attr, Dwarf_Unsigned *valp, Dwarf_Error *err) { Dwarf_Attribute at; Dwarf_Debug dbg; + Dwarf_Die die1; + int rv; dbg = die != NULL ? die->die_dbg : NULL; @@ -167,13 +157,7 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw } *valp = 0; - - if ((at = _dwarf_attr_find(die, attr)) == NULL && attr != DW_AT_type) { - DWARF_SET_ERROR(dbg, err, DW_DLE_NO_ENTRY); - return (DW_DLV_NO_ENTRY); - } - - if (at == NULL && + if ((at = _dwarf_attr_find(die, attr)) == NULL && ((at = _dwarf_attr_find(die, DW_AT_specification)) != NULL || (at = _dwarf_attr_find(die, DW_AT_abstract_origin)) != NULL)) { switch (at->at_form) { @@ -182,8 +166,15 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw case DW_FORM_ref4: case DW_FORM_ref8: case DW_FORM_ref_udata: - at = dwarf_indirect_find(dbg, die, attr, at->u[0].u64); - break; + if ((die1 = _dwarf_die_find(die, at->u[0].u64)) == NULL) + { +at = NULL; +break; + } + rv = dwarf_attrval_unsigned(die1, attr, valp, err); + if (die != die1) +dwarf_dealloc(dbg, die1, DW_DLA_DIE); + return rv; default: DWARF_SET_ERROR(dbg, err, DW_DLE_ATTR_FORM_BAD); return (DW_DLV_ERROR);
CVS commit: src/external/bsd/elftoolchain/dist/libdwarf
Module Name:src Committed By: christos Date: Thu Nov 30 19:45:53 UTC 2017 Modified Files: src/external/bsd/elftoolchain/dist/libdwarf: dwarf.h Log Message: add more DW_ATE_ constants To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/dist/libdwarf/dwarf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libdwarf/dwarf.h diff -u src/external/bsd/elftoolchain/dist/libdwarf/dwarf.h:1.3 src/external/bsd/elftoolchain/dist/libdwarf/dwarf.h:1.4 --- src/external/bsd/elftoolchain/dist/libdwarf/dwarf.h:1.3 Fri Feb 19 21:43:41 2016 +++ src/external/bsd/elftoolchain/dist/libdwarf/dwarf.h Thu Nov 30 14:45:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dwarf.h,v 1.3 2016/02/20 02:43:41 christos Exp $ */ +/* $NetBSD: dwarf.h,v 1.4 2017/11/30 19:45:53 christos Exp $ */ /*- * Copyright (c) 2007 John Birrell (j...@freebsd.org) @@ -436,22 +436,42 @@ #define DW_OP_GNU_addr_index 0xfb #define DW_OP_GNU_const_index 0xfc -#define DW_ATE_address 0x1 -#define DW_ATE_boolean 0x2 -#define DW_ATE_complex_float 0x3 -#define DW_ATE_float 0x4 -#define DW_ATE_signed 0x5 -#define DW_ATE_signed_char 0x6 -#define DW_ATE_unsigned 0x7 -#define DW_ATE_unsigned_char 0x8 -#define DW_ATE_imaginary_float 0x9 -#define DW_ATE_packed_decimal 0xa -#define DW_ATE_numeric_string 0xb -#define DW_ATE_edited 0xc -#define DW_ATE_signed_fixed 0xd -#define DW_ATE_unsigned_fixed 0xe -#define DW_ATE_decimal_float 0xf -#define DW_ATE_lo_user 0x80 +#define DW_ATE_address 0x01 +#define DW_ATE_boolean 0x02 +#define DW_ATE_complex_float 0x03 +#define DW_ATE_float 0x04 +#define DW_ATE_signed 0x05 +#define DW_ATE_signed_char 0x06 +#define DW_ATE_unsigned 0x07 +#define DW_ATE_unsigned_char 0x08 +#define DW_ATE_imaginary_float 0x09 +#define DW_ATE_packed_decimal 0x0a +#define DW_ATE_numeric_string 0x0b +#define DW_ATE_edited 0x0c +#define DW_ATE_signed_fixed 0x0d +#define DW_ATE_unsigned_fixed 0x0e +#define DW_ATE_decimal_float 0x0f +#define DW_ATE_UTF 0x10 + +#define DW_ATE_lo_user 0x80 + +#define DW_ATE_HP_float80 0x80 /* FP (80 bit) */ +#define DW_ATE_HP_complex_float80 0x81 /* Complex FP (80 bit) */ +#define DW_ATE_HP_float128 0x82 /* FP (128 bit) */ +#define DW_ATE_HP_complex_float128 0x83 /* Complex FP (128 bit) */ +#define DW_ATE_HP_floathpintel 0x84 /* FP (82 bit IA64) */ +#define DW_ATE_HP_imaginary_float80 0x85 +#define DW_ATE_HP_imaginary_float128 0x86 +#define DW_ATE_HP_VAX_float 0x88 /* FP (F, G) */ +#define DW_ATE_HP_VAX_float_d 0x89 /* FP (D) */ +#define DW_ATE_HP_packed_decimal 0x8a /* Cobol */ +#define DW_ATE_HP_zoned_decimal 0x8b /* Cobol */ +#define DW_ATE_HP_edited 0x8c /* Cobol */ +#define DW_ATE_HP_signed_fixed 0x8d /* Cobol */ +#define DW_ATE_HP_unsigned_fixed 0x8e /* Cobol */ +#define DW_ATE_HP_VAX_complex_float 0x8f /* Complex FP (F, G) */ +#define DW_ATE_HP_VAX_complex_float_d 0x90 /* Complex FP (D) */ + #define DW_ATE_hi_user 0xff #define DW_ACCESS_public 0x01
CVS commit: src/external/bsd/elftoolchain/dist/libelf
Module Name:src Committed By: wiz Date: Thu Apr 28 07:06:12 UTC 2016 Modified Files: src/external/bsd/elftoolchain/dist/libelf: elf.3 Log Message: Replace Xr to itself with Nm. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/dist/libelf/elf.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libelf/elf.3 diff -u src/external/bsd/elftoolchain/dist/libelf/elf.3:1.3 src/external/bsd/elftoolchain/dist/libelf/elf.3:1.4 --- src/external/bsd/elftoolchain/dist/libelf/elf.3:1.3 Sat Feb 20 02:43:42 2016 +++ src/external/bsd/elftoolchain/dist/libelf/elf.3 Thu Apr 28 07:06:11 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: elf.3,v 1.3 2016/02/20 02:43:42 christos Exp $ +.\" $NetBSD: elf.3,v 1.4 2016/04/28 07:06:11 wiz Exp $ .\" .\" Copyright (c) 2006-2008,2011 Joseph Koshy. All rights reserved. .\" @@ -52,7 +52,7 @@ section numbering. This manual page serves to provide an overview of the functionality in the ELF library. Further information may found in the manual pages for individual -.Xr ELF 3 +.Nm functions that comprise the library. .Ss ELF Concepts As described in @@ -93,7 +93,7 @@ This version number determines the layou of an ELF file and the semantics associated with these. .Ss Data Representation And Translation The -.Xr ELF 3 +.Nm library distinguishes between .Dq native representations of ELF data structures and their @@ -111,7 +111,7 @@ and follow different constraints on obje constraints. .Pp Accordingly, the -.Xr ELF 3 +.Nm library offers translation facilities .Xr ( elf32_xlatetof 3 , .Xr elf32_xlatetom 3 ,
CVS commit: src/external/bsd/elftoolchain/dist/libdwarf
Module Name:src Committed By: christos Date: Thu Mar 31 15:53:33 UTC 2016 Modified Files: src/external/bsd/elftoolchain/dist/libdwarf: dwarf_attrval.c Log Message: Delay freeing the die where the indirect attribute is found. Found by jemalloc J, see: https://mail-index.netbsd.org/current-users/2016/03/28/msg029130.html To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c diff -u src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.7 src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.8 --- src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.7 Fri Mar 18 10:58:18 2016 +++ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Thu Mar 31 11:53:33 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dwarf_attrval.c,v 1.7 2016/03/18 14:58:18 christos Exp $ */ +/* $NetBSD: dwarf_attrval.c,v 1.8 2016/03/31 15:53:33 christos Exp $ */ /*- * Copyright (c) 2007 John Birrell (j...@freebsd.org) @@ -28,7 +28,7 @@ #include "_libdwarf.h" -__RCSID("$NetBSD: dwarf_attrval.c,v 1.7 2016/03/18 14:58:18 christos Exp $"); +__RCSID("$NetBSD: dwarf_attrval.c,v 1.8 2016/03/31 15:53:33 christos Exp $"); ELFTC_VCSID("Id: dwarf_attrval.c 3159 2015-02-15 21:43:27Z emaste "); int @@ -146,14 +146,11 @@ dwarf_indirect_find(Dwarf_Debug dbg, Dwa Dwarf_Unsigned val) { Dwarf_Die die1; - Dwarf_Attribute at; if ((die1 = _dwarf_die_find(die, val)) == NULL) return NULL; - at = _dwarf_attr_find(die1, attr); - dwarf_dealloc(dbg, die1, DW_DLA_DIE); - return at; + return _dwarf_attr_find(die1, attr); } int @@ -213,9 +210,13 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw *valp = at->u[0].u64; break; default: + if (at->at_die != die) + dwarf_dealloc(dbg, at->at_die, DW_DLA_DIE); DWARF_SET_ERROR(dbg, err, DW_DLE_ATTR_FORM_BAD); return (DW_DLV_ERROR); } + if (at->at_die != die) + dwarf_dealloc(dbg, at->at_die, DW_DLA_DIE); return (DW_DLV_OK); }
CVS commit: src/external/bsd/elftoolchain/dist/libdwarf
Module Name:src Committed By: christos Date: Thu Mar 17 18:52:26 UTC 2016 Modified Files: src/external/bsd/elftoolchain/dist/libdwarf: dwarf_attrval.c Log Message: Handle DW_AT_specification better; also don't core-dump if at == NULL. XXX: Is that right? To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c diff -u src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.4 src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.5 --- src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.4 Fri Feb 19 21:43:41 2016 +++ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Thu Mar 17 14:52:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dwarf_attrval.c,v 1.4 2016/02/20 02:43:41 christos Exp $ */ +/* $NetBSD: dwarf_attrval.c,v 1.5 2016/03/17 18:52:26 christos Exp $ */ /*- * Copyright (c) 2007 John Birrell (j...@freebsd.org) @@ -28,7 +28,7 @@ #include "_libdwarf.h" -__RCSID("$NetBSD: dwarf_attrval.c,v 1.4 2016/02/20 02:43:41 christos Exp $"); +__RCSID("$NetBSD: dwarf_attrval.c,v 1.5 2016/03/17 18:52:26 christos Exp $"); ELFTC_VCSID("Id: dwarf_attrval.c 3159 2015-02-15 21:43:27Z emaste "); int @@ -141,12 +141,25 @@ dwarf_attrval_signed(Dwarf_Die die, Dwar return (DW_DLV_OK); } +static Dwarf_Attribute +dwarf_indirect_find(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Half attr, +Dwarf_Unsigned val) +{ + Dwarf_Die die1; + Dwarf_Attribute at; + + if ((die1 = _dwarf_die_find(die, val)) == NULL) + return NULL; + + at = _dwarf_attr_find(die1, attr); + dwarf_dealloc(dbg, die1, DW_DLA_DIE); + return at; +} + int dwarf_attrval_unsigned(Dwarf_Die die, Dwarf_Half attr, Dwarf_Unsigned *valp, Dwarf_Error *err) { Dwarf_Attribute at; - Dwarf_Die die1; - Dwarf_Unsigned val; Dwarf_Debug dbg; dbg = die != NULL ? die->die_dbg : NULL; @@ -163,7 +176,6 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw return (DW_DLV_NO_ENTRY); } - die1 = NULL; if (at == NULL && (at = _dwarf_attr_find(die, DW_AT_abstract_origin)) != NULL) { switch (at->at_form) { @@ -172,14 +184,7 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw case DW_FORM_ref4: case DW_FORM_ref8: case DW_FORM_ref_udata: - val = at->u[0].u64; - if ((die1 = _dwarf_die_find(die, val)) == NULL || - (at = _dwarf_attr_find(die1, attr)) == NULL) { -if (die1 != NULL) - dwarf_dealloc(dbg, die1, DW_DLA_DIE); -DWARF_SET_ERROR(dbg, err, DW_DLE_NO_ENTRY); -return (DW_DLV_NO_ENTRY); - } + at = dwarf_indirect_find(dbg, die, attr, at->u[0].u64); break; default: DWARF_SET_ERROR(dbg, err, DW_DLE_ATTR_FORM_BAD); @@ -187,6 +192,16 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw } } + if (at == NULL && + (at = _dwarf_attr_find(die, DW_AT_specification)) != NULL) { + at = dwarf_indirect_find(dbg, die, attr, at->u[0].u64); + } + + if (at == NULL) { + DWARF_SET_ERROR(dbg, err, DW_DLE_NO_ENTRY); + return (DW_DLV_NO_ENTRY); + } + switch (at->at_form) { case DW_FORM_addr: case DW_FORM_data1: @@ -202,14 +217,10 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw *valp = at->u[0].u64; break; default: - if (die1 != NULL) - dwarf_dealloc(dbg, die1, DW_DLA_DIE); + out: DWARF_SET_ERROR(dbg, err, DW_DLE_ATTR_FORM_BAD); return (DW_DLV_ERROR); } - if (die1 != NULL) - dwarf_dealloc(dbg, die1, DW_DLA_DIE); - return (DW_DLV_OK); }
CVS commit: src/external/bsd/elftoolchain/dist/libdwarf
Module Name:src Committed By: christos Date: Thu Mar 17 19:02:38 UTC 2016 Modified Files: src/external/bsd/elftoolchain/dist/libdwarf: dwarf_attrval.c Log Message: remove unused label. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c diff -u src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.5 src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.6 --- src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.5 Thu Mar 17 14:52:26 2016 +++ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Thu Mar 17 15:02:38 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dwarf_attrval.c,v 1.5 2016/03/17 18:52:26 christos Exp $ */ +/* $NetBSD: dwarf_attrval.c,v 1.6 2016/03/17 19:02:38 christos Exp $ */ /*- * Copyright (c) 2007 John Birrell (j...@freebsd.org) @@ -28,7 +28,7 @@ #include "_libdwarf.h" -__RCSID("$NetBSD: dwarf_attrval.c,v 1.5 2016/03/17 18:52:26 christos Exp $"); +__RCSID("$NetBSD: dwarf_attrval.c,v 1.6 2016/03/17 19:02:38 christos Exp $"); ELFTC_VCSID("Id: dwarf_attrval.c 3159 2015-02-15 21:43:27Z emaste "); int @@ -217,7 +217,6 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw *valp = at->u[0].u64; break; default: - out: DWARF_SET_ERROR(dbg, err, DW_DLE_ATTR_FORM_BAD); return (DW_DLV_ERROR); }
CVS commit: src/external/bsd/elftoolchain/dist/libdwarf
Module Name:src Committed By: christos Date: Fri Mar 18 14:58:18 UTC 2016 Modified Files: src/external/bsd/elftoolchain/dist/libdwarf: dwarf_attrval.c Log Message: tidy up: parse DW_AT_specification like DW_AT_abstract_origin To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c diff -u src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.6 src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.7 --- src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.6 Thu Mar 17 15:02:38 2016 +++ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Fri Mar 18 10:58:18 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dwarf_attrval.c,v 1.6 2016/03/17 19:02:38 christos Exp $ */ +/* $NetBSD: dwarf_attrval.c,v 1.7 2016/03/18 14:58:18 christos Exp $ */ /*- * Copyright (c) 2007 John Birrell (j...@freebsd.org) @@ -28,7 +28,7 @@ #include "_libdwarf.h" -__RCSID("$NetBSD: dwarf_attrval.c,v 1.6 2016/03/17 19:02:38 christos Exp $"); +__RCSID("$NetBSD: dwarf_attrval.c,v 1.7 2016/03/18 14:58:18 christos Exp $"); ELFTC_VCSID("Id: dwarf_attrval.c 3159 2015-02-15 21:43:27Z emaste "); int @@ -177,7 +177,8 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw } if (at == NULL && - (at = _dwarf_attr_find(die, DW_AT_abstract_origin)) != NULL) { + ((at = _dwarf_attr_find(die, DW_AT_specification)) != NULL || + (at = _dwarf_attr_find(die, DW_AT_abstract_origin)) != NULL)) { switch (at->at_form) { case DW_FORM_ref1: case DW_FORM_ref2: @@ -192,11 +193,6 @@ dwarf_attrval_unsigned(Dwarf_Die die, Dw } } - if (at == NULL && - (at = _dwarf_attr_find(die, DW_AT_specification)) != NULL) { - at = dwarf_indirect_find(dbg, die, attr, at->u[0].u64); - } - if (at == NULL) { DWARF_SET_ERROR(dbg, err, DW_DLE_NO_ENTRY); return (DW_DLV_NO_ENTRY);
CVS commit: src/external/bsd/elftoolchain/dist/common
Module Name:src Committed By: christos Date: Sun Mar 13 03:47:41 UTC 2016 Modified Files: src/external/bsd/elftoolchain/dist/common: _elftc.h Log Message: Don't use os-specific defines when cross-compiling. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/elftoolchain/dist/common/_elftc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/_elftc.h diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.4 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.5 --- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.4 Fri Feb 19 21:43:41 2016 +++ src/external/bsd/elftoolchain/dist/common/_elftc.h Sat Mar 12 22:47:41 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: _elftc.h,v 1.4 2016/02/20 02:43:41 christos Exp $ */ +/* $NetBSD: _elftc.h,v 1.5 2016/03/13 03:47:41 christos Exp $ */ /*- * Copyright (c) 2009 Joseph Koshy @@ -372,6 +372,7 @@ extern const char *__progname; #endif /* ELFTC_GETPROGNAME */ +#ifndef HAVE_NBTOOL_CONFIG_H /** ** Per-OS configuration. **/ @@ -462,11 +463,7 @@ extern const char *__progname; #define ELFTC_HAVE_MMAP1 #define ELFTC_HAVE_STRMODE 1 -#if __NetBSD_Version__ <= 599002100 -/* from src/doc/CHANGES: flex(1): Import flex-2.5.35 [christos 20091025] */ -/* and 5.99.21 was from Wed Oct 21 21:28:36 2009 UTC */ -# define ELFTC_BROKEN_YY_NO_INPUT 1 -#endif + #endif /* __NetBSD __ */ @@ -487,4 +484,18 @@ extern const char *__progname; #endif /* __OpenBSD__ */ +#else /* Crosscompiling for NetBSD tools */ + +#include +#include + +#define ELFTC_BYTE_ORDER _BYTE_ORDER +#define ELFTC_BYTE_ORDER_LITTLE_ENDIAN _LITTLE_ENDIAN +#define ELFTC_BYTE_ORDER_BIG_ENDIAN _BIG_ENDIAN + +#define ELFTC_HAVE_MMAP1 +#define ELFTC_HAVE_STRMODE 1 + +#endif /* NBTOOL_CONFIG_H */ + #endif /* _ELFTC_H */
CVS commit: src/external/bsd/elftoolchain/dist/libdwarf
Module Name:src Committed By: hannken Date: Mon Mar 7 14:32:02 UTC 2016 Modified Files: src/external/bsd/elftoolchain/dist/libdwarf: libdwarf_elf_init.c Log Message: Relocation of type SHT_REL must use the current value as addend. Fixes ctfconvert for i386 where section .debug_info uses this relocation. Ok: Christos Zoulas To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_elf_init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_elf_init.c diff -u src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_elf_init.c:1.3 src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_elf_init.c:1.4 --- src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_elf_init.c:1.3 Sat Feb 20 02:43:41 2016 +++ src/external/bsd/elftoolchain/dist/libdwarf/libdwarf_elf_init.c Mon Mar 7 14:32:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: libdwarf_elf_init.c,v 1.3 2016/02/20 02:43:41 christos Exp $ */ +/* $NetBSD: libdwarf_elf_init.c,v 1.4 2016/03/07 14:32:02 hannken Exp $ */ /*- * Copyright (c) 2009 Kai Wang @@ -28,7 +28,7 @@ #include "_libdwarf.h" -__RCSID("$NetBSD: libdwarf_elf_init.c,v 1.3 2016/02/20 02:43:41 christos Exp $"); +__RCSID("$NetBSD: libdwarf_elf_init.c,v 1.4 2016/03/07 14:32:02 hannken Exp $"); ELFTC_VCSID("Id: libdwarf_elf_init.c 3161 2015-02-15 21:43:36Z emaste "); static const char *debug_name[] = { @@ -54,7 +54,8 @@ static const char *debug_name[] = { static void _dwarf_elf_write_reloc(Dwarf_Debug dbg, Elf_Data *symtab_data, int endian, -void *buf, uint64_t offset, GElf_Xword r_info, GElf_Sxword r_addend) +void *buf, uint64_t offset, GElf_Xword r_info, GElf_Sxword r_addend, +int is_rel) { GElf_Sym sym; int size; @@ -63,6 +64,14 @@ _dwarf_elf_write_reloc(Dwarf_Debug dbg, return; if ((size = _dwarf_get_reloc_size(dbg, GELF_R_TYPE(r_info))) == 0) return; /* Unknown or non-absolute relocation. */ + if (is_rel) { + uint64_t roffset = offset; + + if (endian == ELFDATA2MSB) + r_addend = _dwarf_read_msb(buf, , size); + else + r_addend = _dwarf_read_lsb(buf, , size); + } if (endian == ELFDATA2MSB) _dwarf_write_msb(buf, , sym.st_value + r_addend, size); else @@ -79,7 +88,7 @@ _dwarf_elf_apply_rel_reloc(Dwarf_Debug d j = 0; while (gelf_getrel(rel_data, j++, ) != NULL) _dwarf_elf_write_reloc(dbg, symtab_data, endian, buf, - rel.r_offset, rel.r_info, 0); + rel.r_offset, rel.r_info, 0, 1); } static void @@ -92,7 +101,7 @@ _dwarf_elf_apply_rela_reloc(Dwarf_Debug j = 0; while (gelf_getrela(rel_data, j++, ) != NULL) _dwarf_elf_write_reloc(dbg, symtab_data, endian, buf, - rela.r_offset, rela.r_info, rela.r_addend); + rela.r_offset, rela.r_info, rela.r_addend, 0); } static int
CVS commit: src/external/bsd/elftoolchain/lib
Module Name:src Committed By: christos Date: Sat Feb 20 02:44:02 UTC 2016 Modified Files: src/external/bsd/elftoolchain/lib/libdwarf: Makefile src/external/bsd/elftoolchain/lib/libelf: Makefile Log Message: bump version To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/lib/libdwarf/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/lib/libelf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/lib/libdwarf/Makefile diff -u src/external/bsd/elftoolchain/lib/libdwarf/Makefile:1.3 src/external/bsd/elftoolchain/lib/libdwarf/Makefile:1.4 --- src/external/bsd/elftoolchain/lib/libdwarf/Makefile:1.3 Tue Jan 5 08:07:46 2016 +++ src/external/bsd/elftoolchain/lib/libdwarf/Makefile Fri Feb 19 21:44:02 2016 @@ -86,7 +86,7 @@ CPPFLAGS+= -I. -I${SRCDIR} -I${TOP}/comm LIBDPLIBS+= elf ${.CURDIR}/../libelf -SHLIB_MAJOR= 1 +SHLIB_MAJOR= 2 SHLIB_MINOR= 0 MAN= dwarf.3 \ Index: src/external/bsd/elftoolchain/lib/libelf/Makefile diff -u src/external/bsd/elftoolchain/lib/libelf/Makefile:1.2 src/external/bsd/elftoolchain/lib/libelf/Makefile:1.3 --- src/external/bsd/elftoolchain/lib/libelf/Makefile:1.2 Sun Mar 9 14:11:37 2014 +++ src/external/bsd/elftoolchain/lib/libelf/Makefile Fri Feb 19 21:44:02 2016 @@ -70,7 +70,7 @@ GENSRCS= libelf_fsize.c libelf_msize.c l CLEANFILES+= ${GENSRCS} CPPFLAGS+= -I. -I${SRCDIR} -I${TOP}/common -SHLIB_MAJOR= 1 +SHLIB_MAJOR= 2 SHLIB_MINOR= 0 MAN= elf.3 \
CVS commit: src/external/bsd/elftoolchain/dist/libelf
Module Name:src Committed By: christos Date: Mon Feb 1 02:16:48 UTC 2016 Modified Files: src/external/bsd/elftoolchain/dist/libelf: _libelf_config.h Log Message: For the tools version we determine our own arch, we don't need to figure it out at runtime in the linux case. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h diff -u src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h:1.3 src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h:1.4 --- src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h:1.3 Tue Sep 29 15:43:39 2015 +++ src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h Sun Jan 31 21:16:48 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: _libelf_config.h,v 1.3 2015/09/29 19:43:39 christos Exp $ */ +/* $NetBSD: _libelf_config.h,v 1.4 2016/02/01 02:16:48 christos Exp $ */ /*- * Copyright (c) 2008-2011 Joseph Koshy @@ -156,6 +156,7 @@ * kernel such as GNU/kFreeBSD. */ +#ifndef HAVE_NBTOOL_CONFIG_H #if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) #if defined(__linux__) @@ -177,3 +178,4 @@ #endif #endif /* defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) */ +#endif /* HAVE_NBTOOL_CONFIG_H */
CVS commit: src/external/bsd/elftoolchain/dist/libelf
Module Name:src Committed By: christos Date: Tue Sep 29 22:14:14 UTC 2015 Modified Files: src/external/bsd/elftoolchain/dist/libelf: libelf.h Log Message: fix the native build To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/dist/libelf/libelf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libelf/libelf.h diff -u src/external/bsd/elftoolchain/dist/libelf/libelf.h:1.3 src/external/bsd/elftoolchain/dist/libelf/libelf.h:1.4 --- src/external/bsd/elftoolchain/dist/libelf/libelf.h:1.3 Tue Sep 29 15:43:39 2015 +++ src/external/bsd/elftoolchain/dist/libelf/libelf.h Tue Sep 29 18:14:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: libelf.h,v 1.3 2015/09/29 19:43:39 christos Exp $ */ +/* $NetBSD: libelf.h,v 1.4 2015/09/29 22:14:14 christos Exp $ */ /*- * Copyright (c) 2006,2008-2010 Joseph Koshy @@ -39,8 +39,10 @@ #if HAVE_NBTOOL_CONFIG_H # include #elif defined(__NetBSD__) +# include # include #elif defined(__FreeBSD__) +# include # include # include #else
CVS commit: src/external/bsd/elftoolchain/dist
Module Name:src Committed By: christos Date: Tue Sep 29 19:43:39 UTC 2015 Modified Files: src/external/bsd/elftoolchain/dist/common: _elftc.h src/external/bsd/elftoolchain/dist/libelf: _libelf_config.h libelf.h Log Message: make this tools friendly. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/dist/common/_elftc.h cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h \ src/external/bsd/elftoolchain/dist/libelf/libelf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/common/_elftc.h diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.2 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.3 --- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.2 Sun Mar 9 12:58:03 2014 +++ src/external/bsd/elftoolchain/dist/common/_elftc.h Tue Sep 29 15:43:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: _elftc.h,v 1.2 2014/03/09 16:58:03 christos Exp $ */ +/* $NetBSD: _elftc.h,v 1.3 2015/09/29 19:43:39 christos Exp $ */ /*- * Copyright (c) 2009 Joseph Koshy @@ -317,6 +317,10 @@ struct name { \ #endif /* __GNUC__ */ #endif +#ifndef ELFTC_VCSID +#define ELFTC_VCSID(ID) /**/ +#endif + #endif /* ELFTC_VCSID */ /* Index: src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h diff -u src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h:1.2 src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h:1.3 --- src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h:1.2 Sun Mar 9 12:58:04 2014 +++ src/external/bsd/elftoolchain/dist/libelf/_libelf_config.h Tue Sep 29 15:43:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: _libelf_config.h,v 1.2 2014/03/09 16:58:04 christos Exp $ */ +/* $NetBSD: _libelf_config.h,v 1.3 2015/09/29 19:43:39 christos Exp $ */ /*- * Copyright (c) 2008-2011 Joseph Koshy @@ -115,7 +115,7 @@ #endif /* __minix */ -#ifdef __NetBSD__ +#if defined(__NetBSD__) || defined(HAVE_NBTOOL_CONFIG_H) #include @@ -135,7 +135,7 @@ #define Elf_Note Elf64_Nhdr #endif -#endif /* __NetBSD__ */ +#endif /* __NetBSD__ || HAVE_NBTOOL_CONFIG_H */ #if defined(__OpenBSD__) Index: src/external/bsd/elftoolchain/dist/libelf/libelf.h diff -u src/external/bsd/elftoolchain/dist/libelf/libelf.h:1.2 src/external/bsd/elftoolchain/dist/libelf/libelf.h:1.3 --- src/external/bsd/elftoolchain/dist/libelf/libelf.h:1.2 Sun Mar 9 12:58:04 2014 +++ src/external/bsd/elftoolchain/dist/libelf/libelf.h Tue Sep 29 15:43:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: libelf.h,v 1.2 2014/03/09 16:58:04 christos Exp $ */ +/* $NetBSD: libelf.h,v 1.3 2015/09/29 19:43:39 christos Exp $ */ /*- * Copyright (c) 2006,2008-2010 Joseph Koshy @@ -35,12 +35,16 @@ # include "nbtool_config.h" #endif -#include -#ifdef __NetBSD__ -#include + +#if HAVE_NBTOOL_CONFIG_H +# include +#elif defined(__NetBSD__) +# include +#elif defined(__FreeBSD__) +# include +# include #else -#include -#include +# error "Unsupported platform" #endif /* Library private data structures */
CVS commit: src/external/bsd/elftoolchain/dist/libdwarf
Module Name:src Committed By: martin Date: Wed Jan 14 09:29:28 UTC 2015 Modified Files: src/external/bsd/elftoolchain/dist/libdwarf: dwarf_attrval.c Log Message: Add missing break, following upstream. Reported by Henning Petersen in PR bin/49567. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c diff -u src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.2 src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.3 --- src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.2 Sun Mar 9 16:58:03 2014 +++ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Wed Jan 14 09:29:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dwarf_attrval.c,v 1.2 2014/03/09 16:58:03 christos Exp $ */ +/* $NetBSD: dwarf_attrval.c,v 1.3 2015/01/14 09:29:27 martin Exp $ */ /*- * Copyright (c) 2007 John Birrell (j...@freebsd.org) @@ -28,7 +28,7 @@ #include _libdwarf.h -__RCSID($NetBSD: dwarf_attrval.c,v 1.2 2014/03/09 16:58:03 christos Exp $); +__RCSID($NetBSD: dwarf_attrval.c,v 1.3 2015/01/14 09:29:27 martin Exp $); ELFTC_VCSID(Id: dwarf_attrval.c 2072 2011-10-27 03:26:49Z jkoshy ); int @@ -128,6 +128,7 @@ dwarf_attrval_signed(Dwarf_Die die, Dwar break; case DW_FORM_data4: *valp = (int32_t) at-u[0].s64; + break; case DW_FORM_data8: case DW_FORM_sdata: *valp = at-u[0].s64;
CVS commit: src/external/bsd/elftoolchain/dist/libelf
Module Name:src Committed By: christos Date: Fri Apr 18 02:28:06 UTC 2014 Modified Files: src/external/bsd/elftoolchain/dist/libelf: libelf_align.c Log Message: lint has __alignof__ too. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/elftoolchain/dist/libelf/libelf_align.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libelf/libelf_align.c diff -u src/external/bsd/elftoolchain/dist/libelf/libelf_align.c:1.2 src/external/bsd/elftoolchain/dist/libelf/libelf_align.c:1.3 --- src/external/bsd/elftoolchain/dist/libelf/libelf_align.c:1.2 Sun Mar 9 12:58:04 2014 +++ src/external/bsd/elftoolchain/dist/libelf/libelf_align.c Thu Apr 17 22:28:06 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: libelf_align.c,v 1.2 2014/03/09 16:58:04 christos Exp $ */ +/* $NetBSD: libelf_align.c,v 1.3 2014/04/18 02:28:06 christos Exp $ */ /*- * Copyright (c) 2006,2008 Joseph Koshy @@ -38,7 +38,7 @@ #include _libelf.h -__RCSID($NetBSD: libelf_align.c,v 1.2 2014/03/09 16:58:04 christos Exp $); +__RCSID($NetBSD: libelf_align.c,v 1.3 2014/04/18 02:28:06 christos Exp $); ELFTC_VCSID(Id: libelf_align.c 2225 2011-11-26 18:55:54Z jkoshy ); struct align { @@ -46,7 +46,7 @@ struct align { int a64; }; -#ifdef __GNUC__ +#if defined(__GNUC__) || defined(__lint__) #define MALIGN(N) { \ .a32 = __alignof__(Elf32_##N), \ .a64 = __alignof__(Elf64_##N) \
CVS commit: src/external/bsd/elftoolchain/lib
Module Name:src Committed By: christos Date: Sun Mar 9 18:11:38 UTC 2014 Modified Files: src/external/bsd/elftoolchain/lib/libdwarf: Makefile src/external/bsd/elftoolchain/lib/libelf: Makefile Log Message: add SHLIB_MINOR To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/elftoolchain/lib/libdwarf/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/elftoolchain/lib/libelf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/lib/libdwarf/Makefile diff -u src/external/bsd/elftoolchain/lib/libdwarf/Makefile:1.1 src/external/bsd/elftoolchain/lib/libdwarf/Makefile:1.2 --- src/external/bsd/elftoolchain/lib/libdwarf/Makefile:1.1 Sun Mar 9 12:58:04 2014 +++ src/external/bsd/elftoolchain/lib/libdwarf/Makefile Sun Mar 9 14:11:37 2014 @@ -88,6 +88,7 @@ LDADD+= -lelf DPADD+= ${LIBELF} SHLIB_MAJOR= 1 +SHLIB_MINOR= 0 MAN= dwarf.3 \ dwarf_add_arange.3\ Index: src/external/bsd/elftoolchain/lib/libelf/Makefile diff -u src/external/bsd/elftoolchain/lib/libelf/Makefile:1.1 src/external/bsd/elftoolchain/lib/libelf/Makefile:1.2 --- src/external/bsd/elftoolchain/lib/libelf/Makefile:1.1 Sun Mar 9 12:58:04 2014 +++ src/external/bsd/elftoolchain/lib/libelf/Makefile Sun Mar 9 14:11:37 2014 @@ -71,6 +71,7 @@ CLEANFILES+= ${GENSRCS} CPPFLAGS+= -I. -I${SRCDIR} -I${TOP}/common SHLIB_MAJOR= 1 +SHLIB_MINOR= 0 MAN= elf.3 \ elf_begin.3 \