From owner-svn-src-all@FreeBSD.ORG Tue Feb 15 22:03:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E764106566B; Tue, 15 Feb 2011 22:03:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C2888FC12; Tue, 15 Feb 2011 22:03:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1FM39XP046838; Tue, 15 Feb 2011 22:03:09 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1FM39ej046832; Tue, 15 Feb 2011 22:03:09 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201102152203.p1FM39ej046832@svn.freebsd.org> From: Dimitry Andric Date: Tue, 15 Feb 2011 22:03:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218723 - in head: cddl/lib/libzpool lib/liblzma lib/libmd lib/libz secure/lib/libcrypto X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 15 Feb 2011 22:03:10 -0000 Author: dim Date: Tue Feb 15 22:03:09 2011 New Revision: 218723 URL: http://svn.freebsd.org/changeset/base/218723 Log: Fix some leftover binaries and shared libraries in the system that still have an executable stack, due to linking in hand-assembled .S or .s files, that have no .GNU-stack sections: RWX --- --- /lib/libcrypto.so.6 RWX --- --- /lib/libmd.so.5 RWX --- --- /lib/libz.so.6 RWX --- --- /lib/libzpool.so.2 RWX --- --- /usr/lib/liblzma.so.5 These were found using scanelf, from the sysutils/pax-utils port. Reviewed by: kib Modified: head/cddl/lib/libzpool/Makefile head/lib/liblzma/Makefile head/lib/libmd/Makefile head/lib/libz/Makefile head/secure/lib/libcrypto/Makefile Modified: head/cddl/lib/libzpool/Makefile ============================================================================== --- head/cddl/lib/libzpool/Makefile Tue Feb 15 22:01:39 2011 (r218722) +++ head/cddl/lib/libzpool/Makefile Tue Feb 15 22:03:09 2011 (r218723) @@ -14,6 +14,7 @@ .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc64" .PATH: ${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} ATOMIC_SRCS= opensolaris_atomic.S +ACFLAGS+= -Wa,--noexecstack .else .PATH: ${.CURDIR}/../../../sys/cddl/compat/opensolaris/kern ATOMIC_SRCS= opensolaris_atomic.c Modified: head/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Tue Feb 15 22:01:39 2011 (r218722) +++ head/lib/liblzma/Makefile Tue Feb 15 22:03:09 2011 (r218723) @@ -78,6 +78,7 @@ SRCS+= check.c \ .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386" SRCS+= crc32_x86.S \ crc64_x86.S +ACFLAGS+= -Wa,--noexecstack .else SRCS+= crc32_fast.c \ crc64_fast.c Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Tue Feb 15 22:01:39 2011 (r218722) +++ head/lib/libmd/Makefile Tue Feb 15 22:03:09 2011 (r218723) @@ -43,11 +43,14 @@ CFLAGS+= -I${.CURDIR} .if exists(${MACHINE_ARCH}/sha.S) SRCS+= sha.S -CFLAGS+= -DSHA1_ASM -DELF +CFLAGS+= -DSHA1_ASM .endif .if exists(${MACHINE_ARCH}/rmd160.S) SRCS+= rmd160.S -CFLAGS+= -DRMD160_ASM -DELF +CFLAGS+= -DRMD160_ASM +.endif +.if exists(${MACHINE_ARCH}/sha.S) || exists(${MACHINE_ARCH}/rmd160.S) +ACFLAGS+= -DELF -Wa,--noexecstack .endif md2hl.c: mdXhl.c Modified: head/lib/libz/Makefile ============================================================================== --- head/lib/libz/Makefile Tue Feb 15 22:01:39 2011 (r218722) +++ head/lib/libz/Makefile Tue Feb 15 22:03:09 2011 (r218723) @@ -39,12 +39,14 @@ SRCS+= zutil.c .PATH: ${.CURDIR}/contrib/asm686 SRCS+= match.S CFLAGS+= -DASMV -DNO_UNDERLINE +ACFLAGS+= -Wa,--noexecstack .endif .if ${MACHINE_ARCH} == "amd64" .PATH: ${.CURDIR}/contrib/gcc_gvmat64 SRCS+= gvmat64.S CFLAGS+= -DASMV -DNO_UNDERLINE +ACFLAGS+= -Wa,--noexecstack .endif VERSION_DEF= ${.CURDIR}/Versions.def Modified: head/secure/lib/libcrypto/Makefile ============================================================================== --- head/secure/lib/libcrypto/Makefile Tue Feb 15 22:01:39 2011 (r218722) +++ head/secure/lib/libcrypto/Makefile Tue Feb 15 22:03:09 2011 (r218723) @@ -345,6 +345,10 @@ INCSDIR= ${INCLUDEDIR}/openssl CSTD= gnu89 +.if !empty(SRCS:M*.s) +AFLAGS+= --noexecstack +.endif + CLEANFILES= buildinf.h opensslconf.h evp.h buildinf.h: ${.CURDIR}/Makefile