From patchwork Wed Jun 9 14:28:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 55098 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 9B580B7D5B for ; Thu, 10 Jun 2010 00:29:10 +1000 (EST) Received: (qmail 27097 invoked by alias); 9 Jun 2010 14:28:57 -0000 Received: (qmail 27038 invoked by uid 22791); 9 Jun 2010 14:28:55 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-pv0-f175.google.com (HELO mail-pv0-f175.google.com) (74.125.83.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Jun 2010 14:28:51 +0000 Received: by pvc7 with SMTP id 7so262979pvc.20 for ; Wed, 09 Jun 2010 07:28:49 -0700 (PDT) Received: by 10.115.133.38 with SMTP id k38mr4089803wan.200.1276093728377; Wed, 09 Jun 2010 07:28:48 -0700 (PDT) Received: from localhost.localdomain (99-57-141-118.lightspeed.sntcca.sbcglobal.net [99.57.141.118]) by mx.google.com with ESMTPS id n32sm64946153wae.22.2010.06.09.07.28.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 09 Jun 2010 07:28:47 -0700 (PDT) From: Khem Raj To: gcc-patches@gcc.gnu.org Cc: Khem Raj Subject: [PATCH, libstdc++-v3] PR 44461: Explicitly mention the section where inline assembly is emitted for __cxa_end_cleanup Date: Wed, 9 Jun 2010 07:28:38 -0700 Message-Id: <1276093718-30563-1-git-send-email-raj.khem@gmail.com> To: gcc-patches@gcc.gnu.org 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 This patch fixes PR 44461 where in some cases __cxa_end_cleanup was not emitted in .text section. Thanks -Khem 2010-06-07 Khem Raj PR libstdc++/44461 * libsupc++/eh_arm.cc (__cxa_end_cleanup): Use .pushsection/.popsection to emit inline assembly into .text section. Index: gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc =================================================================== --- gcc-4.5.orig/libstdc++-v3/libsupc++/eh_arm.cc 2010-06-04 23:20:18.000000000 -0700 +++ gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc 2010-06-08 11:27:34.247541722 -0700 @@ -157,22 +157,26 @@ __gnu_end_cleanup(void) // Assembly wrapper to call __gnu_end_cleanup without clobbering r1-r3. // Also push r4 to preserve stack alignment. #ifdef __thumb__ -asm (".global __cxa_end_cleanup\n" +asm (" .pushsection .text.__cxa_end_cleanup\n" +" .global __cxa_end_cleanup\n" " .type __cxa_end_cleanup, \"function\"\n" " .thumb_func\n" "__cxa_end_cleanup:\n" " push\t{r1, r2, r3, r4}\n" " bl\t__gnu_end_cleanup\n" " pop\t{r1, r2, r3, r4}\n" -" bl\t_Unwind_Resume @ Never returns\n"); +" bl\t_Unwind_Resume @ Never returns\n" +" .popsection\n"); #else -asm (".global __cxa_end_cleanup\n" +asm (" .pushsection .text.__cxa_end_cleanup\n" +" .global __cxa_end_cleanup\n" " .type __cxa_end_cleanup, \"function\"\n" "__cxa_end_cleanup:\n" " stmfd\tsp!, {r1, r2, r3, r4}\n" " bl\t__gnu_end_cleanup\n" " ldmfd\tsp!, {r1, r2, r3, r4}\n" -" bl\t_Unwind_Resume @ Never returns\n"); +" bl\t_Unwind_Resume @ Never returns\n" +" .popsection\n"); #endif #endif