From patchwork Fri Nov 18 17:48:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 126457 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id F0488B722F for ; Sat, 19 Nov 2011 04:48:45 +1100 (EST) Received: (qmail 17215 invoked by alias); 18 Nov 2011 17:48:44 -0000 Received: (qmail 17198 invoked by uid 22791); 18 Nov 2011 17:48:41 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from c2beaomr07.btconnect.com (HELO mail.btconnect.com) (213.123.26.185) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Nov 2011 17:48:25 +0000 Received: from host81-138-1-83.in-addr.btopenworld.com (EHLO thor.office) ([81.138.1.83]) by c2beaomr07.btconnect.com with ESMTP id FFG19685; Fri, 18 Nov 2011 17:48:23 +0000 (GMT) Message-Id: <9B90055E-5374-4B02-8396-75502119DC89@sandoe-acoustics.co.uk> From: Iain Sandoe To: GCC Patches Mime-Version: 1.0 (Apple Message framework v936) Subject: [Patch] make it possible for the target to rename ".tm_clone_table" Date: Fri, 18 Nov 2011 17:48:22 +0000 Cc: Richard Henderson , Mike Stump X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0303.4EC69A66.0072, actions=tag X-Junkmail-Premium-Raw: score=8/50, refid=2.7.2:2011.11.18.164518:17:8.129, ip=81.138.1.83, rules=__HAS_MSGID, __SANE_MSGID, __MSGID_APPLEMAIL, __TO_MALFORMED_2, __CT, __CTYPE_HAS_BOUNDARY, __CTYPE_MULTIPART, CTYPE_MULTIPART_NO_QUOTE, __CTYPE_MULTIPART_MIXED, __MIME_VERSION, __MIME_VERSION_APPLEMAIL, __MULTIPLE_RCPTS_CC_X2, __HAS_X_MAILER, __X_MAILER_APPLEMAIL, TXT_ATTACHED, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_2000_2999, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, __USER_AGENT_APPLEMAIL, RDNS_SUSP, BODY_SIZE_7000_LESS, NO_URI_FOUND, MIME_TEXT_ONLY_MP_MIXED, MULTIPLE_RCPTS X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B020B.4EC69A68.00AF, ss=1, fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=multiengine X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org At least Darwin needs a different name for the tm_clone_table section. I'm wondering what a target without named sections does for this - is there some reason it needs to be in a separate section (from data)... ... perhaps what I'm missing here will help understand why the clone tests fail on *x68*-darwin :-) comments/OK for trunk? Iain gcc: * defaults.h (TM_CLONE_TABLE_SECTION_NAME): Provide default tm clone section name. * varasm.c (dump_tm_clone_pairs): Use TM_CLONE_TABLE_SECTION_NAME. * config/darwin.h (TM_CLONE_TABLE_SECTION_NAME): Define. Index: gcc/defaults.h =================================================================== --- gcc/defaults.h (revision 181476) +++ gcc/defaults.h (working copy) @@ -392,6 +392,14 @@ see the files COPYING3 and COPYING.RUNTIME respect #endif #endif +/* If we have named sections, provide a name for the transaction clone + table section. */ +#if defined (TARGET_ASM_NAMED_SECTION) +#ifndef TM_CLONE_TABLE_SECTION_NAME +#define TM_CLONE_TABLE_SECTION_NAME ".tm_clone_table" +#endif +#endif + /* If we have named section and we support weak symbols, then use the .jcr section for recording java classes which need to be registered at program start-up time. */ Index: gcc/varasm.c =================================================================== --- gcc/varasm.c (revision 181476) +++ gcc/varasm.c (working copy) @@ -5961,7 +5961,9 @@ dump_tm_clone_pairs (VEC(tm_alias_pair,heap) *tm_a if (!switched) { - switch_to_section (get_named_section (NULL, ".tm_clone_table", 3)); + switch_to_section (get_named_section (NULL, + TM_CLONE_TABLE_SECTION_NAME, + 3)); assemble_align (POINTER_SIZE); switched = true; } Index: gcc/config/darwin.h =================================================================== --- gcc/config/darwin.h (revision 181476) +++ gcc/config/darwin.h (working copy) @@ -692,6 +680,10 @@ extern GTY(()) section * darwin_sections[NUM_DARWI #define TARGET_ASM_UNIQUE_SECTION darwin_unique_section #undef TARGET_ASM_FUNCTION_RODATA_SECTION #define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section + +#undef TM_CLONE_TABLE_SECTION_NAME +#define TM_CLONE_TABLE_SECTION_NAME "__DATA,__tm_clone_table" + #undef TARGET_ASM_RELOC_RW_MASK #define TARGET_ASM_RELOC_RW_MASK machopic_reloc_rw_mask