From patchwork Wed Dec 21 09:48:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Gingold X-Patchwork-Id: 132607 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 C4B11B70F7 for ; Wed, 21 Dec 2011 20:48:31 +1100 (EST) Received: (qmail 4135 invoked by alias); 21 Dec 2011 09:48:28 -0000 Received: (qmail 4122 invoked by uid 22791); 21 Dec 2011 09:48:27 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Dec 2011 09:48:14 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 16FAB290006 for ; Wed, 21 Dec 2011 10:48:14 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3-SpDSg04-9G for ; Wed, 21 Dec 2011 10:48:14 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 05920290001 for ; Wed, 21 Dec 2011 10:48:13 +0100 (CET) From: Tristan Gingold Subject: [committed] VMS: always default to .text section Date: Wed, 21 Dec 2011 10:48:12 +0100 Message-Id: <816DE467-AE45-40DF-A737-23F99851F0E8@adacore.com> To: GCC Patches Mime-Version: 1.0 (Apple Message framework v1251.1) 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 Hi, like the HP-UX linker, the VMS linker doesn't deal well with named text sections. So, always default to .text section on both Alpha and ia64 VMS. Committed on trunk. Tristan. 2011-12-21 Tristan Gingold * config/vms/vms-protos.h (vms_function_section): New prototype. * config/vms/vms.c (vms_function_section): New function. * config/vms/vms.h (TARGET_ASM_FUNCTION_SECTION): Define. Index: gcc/config/vms/vms-protos.h =================================================================== --- gcc/config/vms/vms-protos.h (revision 182566) +++ gcc/config/vms/vms-protos.h (working copy) @@ -22,3 +22,10 @@ /* vms.c */ void vms_patch_builtins (void); + +#ifdef TREE_CODE +extern section *vms_function_section (tree decl ATTRIBUTE_UNUSED, + enum node_frequency freq ATTRIBUTE_UNUSED, + bool startup ATTRIBUTE_UNUSED, + bool exit ATTRIBUTE_UNUSED); +#endif /* TREE_CODE */ Index: gcc/config/vms/vms.c =================================================================== --- gcc/config/vms/vms.c (revision 182566) +++ gcc/config/vms/vms.c (working copy) @@ -180,4 +180,15 @@ } } +/* Always default to .text section. */ + +section * +vms_function_section (tree decl ATTRIBUTE_UNUSED, + enum node_frequency freq ATTRIBUTE_UNUSED, + bool startup ATTRIBUTE_UNUSED, + bool exit ATTRIBUTE_UNUSED) +{ + return NULL; +} + #include "gt-vms.h" Index: gcc/config/vms/vms.h =================================================================== --- gcc/config/vms/vms.h (revision 182566) +++ gcc/config/vms/vms.h (working copy) @@ -61,3 +61,7 @@ #define SIZE_TYPE "unsigned int" #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "int" + +/* VMS doesn't support other sections than .text for code. */ + +#define TARGET_ASM_FUNCTION_SECTION vms_function_section