From patchwork Fri Nov 18 18:30:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 126468 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 9C52EB7237 for ; Sat, 19 Nov 2011 05:31:09 +1100 (EST) Received: (qmail 8045 invoked by alias); 18 Nov 2011 18:31:07 -0000 Received: (qmail 8031 invoked by uid 22791); 18 Nov 2011 18:31:06 -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 c2bthomr07.btconnect.com (HELO mail.btconnect.com) (213.123.20.125) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Nov 2011 18:30:42 +0000 Received: from host81-138-1-83.in-addr.btopenworld.com (EHLO thor.office) ([81.138.1.83]) by c2bthomr07.btconnect.com with ESMTP id FIY87264; Fri, 18 Nov 2011 18:30:40 +0000 (GMT) Cc: GCC Patches , Richard Henderson , Mike Stump Message-Id: <26A6FF58-00D1-453F-9248-2B97962C0012@sandoe-acoustics.co.uk> From: Iain Sandoe To: Rainer Orth In-Reply-To: Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: [Patch] make it possible for the target to rename ".tm_clone_table" Date: Fri, 18 Nov 2011 18:30:38 +0000 References: <9B90055E-5374-4B02-8396-75502119DC89@sandoe-acoustics.co.uk> X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0301.4EC6A44F.0026, actions=TAG X-Junkmail-Premium-Raw: score=8/50, refid=2.7.2:2011.11.18.172714:17:8.129, ip=81.138.1.83, rules=__MULTIPLE_RCPTS_CC_X2, __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, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __HAS_X_MAILER, __X_MAILER_APPLEMAIL, TXT_ATTACHED, __ANY_URI, __URI_NO_WWW, __URI_NO_PATH, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_3000_3999, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, __USER_AGENT_APPLEMAIL, RDNS_SUSP, BODY_SIZE_7000_LESS, MIME_TEXT_ONLY_MP_MIXED, MULTIPLE_RCPTS X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B0208.4EC6A451.0009, ss=1, re=0.000, fgs=0, ip=0.0.0.0, so=2011-07-25 19:15:43, dmn=2011-05-27 18:58:46, 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 On 18 Nov 2011, at 18:12, Rainer Orth wrote: > Iain Sandoe writes: > >>> This, together with the unconditional use in varasm.c, will lead >>> to a >>> bootstrap failure on Tru64 UNIX, which lacks named sections >>> completely. >> >> right, it was worrying me what a target without named sections does - >> ... I can easily remove the #if defined (TARGET_ASM_NAMED_SECTION) >> ... what happens when the code runs then? > > We ICE like this: > > /vol/gcc/src/hg/trunk/local/libitm/testsuite/libitm.c/cancel.c:55:1: > internal > compiler error: in default_no_named_section, at varasm.c:6293 > > I should probably file a PR, but there's still no proper bugzilla > component for trans-mem. well ... what about this instead then? Iain 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,13 @@ dump_tm_clone_pairs (VEC(tm_alias_pair,heap) *tm_a if (!switched) { - switch_to_section (get_named_section (NULL, ".tm_clone_table", 3)); +#if defined (TARGET_ASM_NAMED_SECTION) + switch_to_section (get_named_section (NULL, + TM_CLONE_TABLE_SECTION_NAME, + 3)); +#else + switch_to_section (data_section); +#endif 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