From owner-svn-src-head@FreeBSD.ORG Thu Aug 26 13:04:16 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99CF410656A7; Thu, 26 Aug 2010 13:04:16 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89C858FC13; Thu, 26 Aug 2010 13:04:16 +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 o7QD4GKJ043591; Thu, 26 Aug 2010 13:04:16 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7QD4GF6043589; Thu, 26 Aug 2010 13:04:16 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201008261304.o7QD4GF6043589@svn.freebsd.org> From: Rui Paulo Date: Thu, 26 Aug 2010 13:04:16 +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: r211844 - head/contrib/gcc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 26 Aug 2010 13:04:16 -0000 Author: rpaulo Date: Thu Aug 26 13:04:16 2010 New Revision: 211844 URL: http://svn.freebsd.org/changeset/base/211844 Log: Mark __DTOR_LIST__, __EH_FRAME_BEGIN__ and __CTOR_END__ as used to avoid segfaults when building with clang. This comes (partly) from the LLVM svn r41105. Modified: head/contrib/gcc/crtstuff.c Modified: head/contrib/gcc/crtstuff.c ============================================================================== --- head/contrib/gcc/crtstuff.c Thu Aug 26 13:00:29 2010 (r211843) +++ head/contrib/gcc/crtstuff.c Thu Aug 26 13:04:16 2010 (r211844) @@ -191,11 +191,11 @@ DTOR_LIST_BEGIN; #elif defined(DTORS_SECTION_ASM_OP) asm (DTORS_SECTION_ASM_OP); STATIC func_ptr __DTOR_LIST__[1] - __attribute__ ((aligned(sizeof(func_ptr)))) + __attribute__ ((used, aligned(sizeof(func_ptr)))) = { (func_ptr) (-1) }; #else STATIC func_ptr __DTOR_LIST__[1] - __attribute__((section(".dtors"), aligned(sizeof(func_ptr)))) + __attribute__((used, section(".dtors"), aligned(sizeof(func_ptr)))) = { (func_ptr) (-1) }; #endif /* __DTOR_LIST__ alternatives */ @@ -203,7 +203,7 @@ STATIC func_ptr __DTOR_LIST__[1] /* Stick a label at the beginning of the frame unwind info so we can register and deregister it with the exception handling library code. */ STATIC EH_FRAME_SECTION_CONST char __EH_FRAME_BEGIN__[] - __attribute__((section(EH_FRAME_SECTION_NAME), aligned(4))) + __attribute__((used, section(EH_FRAME_SECTION_NAME), aligned(4))) = { }; #endif /* USE_EH_FRAME_REGISTRY */ @@ -459,11 +459,11 @@ CTOR_LIST_END; static func_ptr force_to_data[1] __attribute__ ((__used__)) = { }; asm (CTORS_SECTION_ASM_OP); STATIC func_ptr __CTOR_END__[1] - __attribute__((aligned(sizeof(func_ptr)))) + __attribute__((used, aligned(sizeof(func_ptr)))) = { (func_ptr) 0 }; #else STATIC func_ptr __CTOR_END__[1] - __attribute__((section(".ctors"), aligned(sizeof(func_ptr)))) + __attribute__((used, section(".ctors"), aligned(sizeof(func_ptr)))) = { (func_ptr) 0 }; #endif