From patchwork Fri Oct 1 17:06:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 66448 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 DAD8FB70E0 for ; Sat, 2 Oct 2010 03:07:08 +1000 (EST) Received: (qmail 25600 invoked by alias); 1 Oct 2010 17:07:04 -0000 Received: (qmail 25583 invoked by uid 22791); 1 Oct 2010 17:07:03 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from g1t0027.austin.hp.com (HELO g1t0027.austin.hp.com) (15.216.28.34) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Oct 2010 17:06:55 +0000 Received: from g1t0038.austin.hp.com (g1t0038.austin.hp.com [16.236.32.44]) by g1t0027.austin.hp.com (Postfix) with ESMTP id D9C543849F; Fri, 1 Oct 2010 17:06:53 +0000 (UTC) Received: from lucas.cup.hp.com (lucas.cup.hp.com [15.244.97.116]) by g1t0038.austin.hp.com (Postfix) with ESMTP id 7B15A3016E; Fri, 1 Oct 2010 17:06:53 +0000 (UTC) Received: (from sje@localhost) by lucas.cup.hp.com (8.11.1 (PHNE_35485)/8.11.1) id o91H6qG11940; Fri, 1 Oct 2010 10:06:52 -0700 (PDT) Date: Fri, 1 Oct 2010 10:06:52 -0700 (PDT) From: Steve Ellcey Message-Id: <201010011706.o91H6qG11940@lucas.cup.hp.com> To: gcc-patches@gcc.gnu.org, hubicka@gcc.gnu.org Subject: [patch, committed, ia64] Patch to fix IA64 HP-UX bootstrap, PR 44716 Reply-to: sje@cup.hp.com Mime-Version: 1.0 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 I am checking in the attached patch to fix the IA64 HP-UX bootstrap failure. The bootstrap failure described in PR 44716 is caused by a bug in the HP linker which causes a segfault when a function in .text.unlikely calls a function in .text. I think there is also a bug in GCC causing functions that never used to be put into .text.unlikely to be put there. This GCC bug is covered under a separate bug (PR 45781). This patch stops GCC from using .text.unlikely and .text.hot on IA64 HP-UX and allows us to bootstrap. Honza, should we close this bug since we have PR 45781 to describe the generic question of whether or not we are putting the right things in .text.unlikely? Steve Ellcey sje@cup.hp.com 2010-10-01 Steve Ellcey PR 44716 * config/ia64/hpux.h (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Define. (HOT_TEXT_SECTION_NAME): Define. Index: config/ia64/hpux.h =================================================================== --- config/ia64/hpux.h (revision 164824) +++ config/ia64/hpux.h (working copy) @@ -215,3 +215,14 @@ do { \ #undef HANDLE_PRAGMA_PACK_PUSH_POP #define HANDLE_PRAGMA_PACK_PUSH_POP + +/* The HP-UX linker has a bug that causes calls from functions in + .text.unlikely to functions in .text to cause a segfault. Until + it is fixed, prevent code from being put into .text.unlikely or + .text.hot. */ + +#undef UNLIKELY_EXECUTED_TEXT_SECTION_NAME +#define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text" + +#undef HOT_TEXT_SECTION_NAME +#define HOT_TEXT_SECTION_NAME ".text"