From patchwork Wed Oct 22 11:00:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 402040 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 92BF114007B for ; Wed, 22 Oct 2014 22:01:01 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=Oq9fe0uGVTzoAe/fjyK8hqab4NDREzAtyYJiFCtdJt7 x4Q6XGRI/y37zEchuBZvxO+ih6B0wciTSmts6MfmPjK4j9Mhrp0vLyuJLdzDvCpD cSzzY/V27DE+tdByPg0S/y6UWX5il/qllIn3wbNXi+NuCXmpB3E9UpX7SPOjXjSY = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=v0CbVY2KfgmonYO68UkLAqwU6R0=; b=BHeqWuTDpj4LpHxi0 h266wkYVuSioH9scmuEm0/qzxeW7Q610N+/donRG2pnCGCmIVbiNhyyAY0abimoV 2bpWRCkFQGPF2vZtaJBnr38ywNwpRzRvjeedLVQY9RuCHmbh3AvBV14gjnjMEEbg WWhEv4wQGojBPHtBv+u+mMGyco= Received: (qmail 7137 invoked by alias); 22 Oct 2014 11:00:54 -0000 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 Received: (qmail 7126 invoked by uid 89); 22 Oct 2014 11:00:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.161) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 22 Oct 2014 11:00:52 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT3ol15ykJcYwTPLBCxG2Pg6JVq6JhQ== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (ip5f5818d3.dynamic.kabel-deutschland.de [95.88.24.211]) by smtp.strato.de (RZmta 35.10 DYNA|AUTH) with ESMTPSA id 6020b4q9MB0jZGQ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate); Wed, 22 Oct 2014 13:00:45 +0200 (CEST) Message-ID: <54478E55.2070108@gjlay.de> Date: Wed, 22 Oct 2014 13:00:37 +0200 From: Georg-Johann Lay User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: GCC Patches CC: Denis Chertykov , Joern Rennecke Subject: [patch,avr,committed]: Fix __do_global_dtors X-IsSubscribed: yes This patch fixed the wrong pre-increment of .dtors addresses to a post-increment. The first .dtor was bypassed and the last access read beyond __dtors_end. Installed as obvious: http://gcc.gnu.org/r216550 Johann * config/avr/lib1funcs.S (__do_global_dtors): Fix wrong code introduced with 2014-10-21 trunk r216525. Index: config/avr/lib1funcs.S =================================================================== --- config/avr/lib1funcs.S (revision 216549) +++ config/avr/lib1funcs.S (revision 216550) @@ -2502,14 +2502,16 @@ DEFUN __do_global_dtors #endif /* HAVE_EIJMP */ rjmp .L__do_global_dtors_start .L__do_global_dtors_loop: - waddi 28, 1 #ifdef __AVR_HAVE_EIJMP_EICALL__ - adc r16, __zero_reg__ mov r24, r16 #endif /* HAVE_EIJMP */ mov_h r31, r29 mov_l r30, r28 XCALL __tablejump2__ + waddi 28, 1 +#ifdef __AVR_HAVE_EIJMP_EICALL__ + adc r16, __zero_reg__ +#endif /* HAVE_EIJMP */ .L__do_global_dtors_start: cpi r28, pm_lo8(__dtors_end) cpc r29, cdtors_tst_reg @@ -2521,6 +2523,8 @@ DEFUN __do_global_dtors ENDF __do_global_dtors #endif /* L_dtors */ +#undef cdtors_tst_reg + .section .text.libgcc, "ax", @progbits #if !defined (__AVR_TINY__)