From owner-svn-src-head@freebsd.org Wed Oct 11 19:26:40 2017 Return-Path: Delivered-To: svn-src-head@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 CF5F5E34D0E; Wed, 11 Oct 2017 19:26:40 +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 904D074150; Wed, 11 Oct 2017 19:26:40 +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 v9BJQdq2041827; Wed, 11 Oct 2017 19:26:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9BJQdNa041824; Wed, 11 Oct 2017 19:26:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201710111926.v9BJQdNa041824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 11 Oct 2017 19:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324536 - head/contrib/llvm/projects/libunwind/src X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/llvm/projects/libunwind/src X-SVN-Commit-Revision: 324536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Oct 2017 19:26:40 -0000 Author: emaste Date: Wed Oct 11 19:26:39 2017 New Revision: 324536 URL: https://svnweb.freebsd.org/changeset/base/324536 Log: libunwind: use upstream patch to disable executable stacks arm uses '@' as a comment character, and cannot use @progbits in the .section directive. Apply the upstream noexec stach change which avoids this issue. Obtained from: LLVM r277868 Modified: head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S head/contrib/llvm/projects/libunwind/src/assembly.h Modified: head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S ============================================================================== --- head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S Wed Oct 11 18:25:05 2017 (r324535) +++ head/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S Wed Oct 11 19:26:39 2017 (r324536) @@ -528,4 +528,5 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind15Regis #endif - .section .note.GNU-stack,"",@progbits +NO_EXEC_STACK_DIRECTIVE + Modified: head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S ============================================================================== --- head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S Wed Oct 11 18:25:05 2017 (r324535) +++ head/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S Wed Oct 11 19:26:39 2017 (r324536) @@ -470,4 +470,5 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext) #endif - .section .note.GNU-stack,"",@progbits +NO_EXEC_STACK_DIRECTIVE + Modified: head/contrib/llvm/projects/libunwind/src/assembly.h ============================================================================== --- head/contrib/llvm/projects/libunwind/src/assembly.h Wed Oct 11 18:25:05 2017 (r324535) +++ head/contrib/llvm/projects/libunwind/src/assembly.h Wed Oct 11 19:26:39 2017 (r324536) @@ -35,19 +35,34 @@ #define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name) #if defined(__APPLE__) + #define SYMBOL_IS_FUNC(name) +#define NO_EXEC_STACK_DIRECTIVE + #elif defined(__ELF__) + #if defined(__arm__) #define SYMBOL_IS_FUNC(name) .type name,%function #else #define SYMBOL_IS_FUNC(name) .type name,@function #endif + +#if defined(__GNU__) || defined(__ANDROID__) || defined(__FreeBSD__) +#define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits #else +#define NO_EXEC_STACK_DIRECTIVE +#endif + +#else + #define SYMBOL_IS_FUNC(name) \ .def name SEPARATOR \ .scl 2 SEPARATOR \ .type 32 SEPARATOR \ .endef + +#define NO_EXEC_STACK_DIRECTIVE + #endif #define DEFINE_LIBUNWIND_FUNCTION(name) \