From owner-svn-src-all@freebsd.org Fri Feb 12 21:12:49 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5105DAA7C3E; Fri, 12 Feb 2016 21:12:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12DC11E10; Fri, 12 Feb 2016 21:12:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1CLCmk8039194; Fri, 12 Feb 2016 21:12:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1CLClTG039190; Fri, 12 Feb 2016 21:12:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201602122112.u1CLClTG039190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 12 Feb 2016 21:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295581 - in head: . lib lib/libpe share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2016 21:12:49 -0000 Author: emaste Date: Fri Feb 12 21:12:47 2016 New Revision: 295581 URL: https://svnweb.freebsd.org/changeset/base/295581 Log: Add libpe for elfcopy(1) PE/COFF support Sponsored by: The FreeBSD Foundation Added: head/lib/libpe/ head/lib/libpe/Makefile (contents, props changed) Modified: head/Makefile.inc1 head/lib/Makefile head/share/mk/src.libnames.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Feb 12 21:06:48 2016 (r295580) +++ head/Makefile.inc1 Fri Feb 12 21:12:47 2016 (r295581) @@ -1638,6 +1638,7 @@ _binutils= gnu/usr.bin/binutils .endif .if ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no" _elftctools= lib/libelftc \ + lib/libpe \ usr.bin/elfcopy \ usr.bin/nm \ usr.bin/size \ @@ -1650,6 +1651,7 @@ _elftctools+= usr.bin/addr2line # If cross-building with an external binutils we still need to build strip for # the target (for at least crunchide). _elftctools= lib/libelftc \ + lib/libpe \ usr.bin/elfcopy .endif Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Fri Feb 12 21:06:48 2016 (r295580) +++ head/lib/Makefile Fri Feb 12 21:12:47 2016 (r295581) @@ -80,6 +80,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libopie \ libpam \ libpcap \ + ${_libpe} \ libpjdlog \ ${_libpmc} \ ${_libproc} \ @@ -184,6 +185,7 @@ _cuse= libcuse .if ${MK_TOOLCHAIN} != "no" _libelftc= libelftc +_libpe= libpe .endif .if ${MK_FILE} != "no" Added: head/lib/libpe/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpe/Makefile Fri Feb 12 21:12:47 2016 (r295581) @@ -0,0 +1,34 @@ +# $FreeBSD$ +.include + +INTERNALLIB= + +ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain + +.PATH: ${ELFTCDIR}/libpe + +LIB= pe + +SRCS= libpe_buffer.c \ + libpe_coff.c \ + libpe_dos.c \ + libpe_init.c \ + libpe_rich.c \ + libpe_section.c \ + libpe_utils.c \ + pe_buffer.c \ + pe_cntl.c \ + pe_coff.c \ + pe_dos.c \ + pe_flag.c \ + pe_init.c \ + pe_rich.c \ + pe_section.c \ + pe_symtab.c \ + pe_update.c + +CFLAGS+=-I${ELFTCDIR}/libpe -I${ELFTCDIR}/common + +MAN= + +.include Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Fri Feb 12 21:06:48 2016 (r295580) +++ head/share/mk/src.libnames.mk Fri Feb 12 21:12:47 2016 (r295581) @@ -39,6 +39,7 @@ _INTERNALLIBS= \ openbsd \ opts \ parse \ + pe \ readline \ sl \ sm \ @@ -367,6 +368,9 @@ LDADD+= ${LDADD_${_l}} LIBELFTCDIR= ${OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc.a +LIBPEDIR= ${OBJTOP}/lib/libpe +LIBPE?= ${LIBPEDIR}/libpe.a + LIBREADLINEDIR= ${OBJTOP}/gnu/lib/libreadline/readline LIBREADLINE?= ${LIBREADLINEDIR}/libreadline.a