From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 4BFA23858425 for ; Fri, 13 Jan 2023 13:10:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4BFA23858425 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673615434; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=kbMGkxjY+6Cq3AE6XZB5WLphcnxM0WhN3vNaeysmrhA=; b=PG6FMybPY2Lwhdb9Hxjqs8h01WjM1ew/3eN15Z36cEOzWW38YuK/hlJtOPytk4xAONcdhw yE274qtIR5vrlHUZ/CeMnCh4egKAPFD/jLj/iNuD4ZPINWiUPmYymLOT3zMu2QcYTJ4BpY mufDMHO2Z+grxsrjKCg0r5UN8uMrY78= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-649-vJ-xypf3NEids0oNVLaCtA-1; Fri, 13 Jan 2023 08:10:33 -0500 X-MC-Unique: vJ-xypf3NEids0oNVLaCtA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1FE113C0DDA2; Fri, 13 Jan 2023 13:10:33 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.39.193.197]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E958F53A0; Fri, 13 Jan 2023 13:10:32 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id B628EA807C3; Fri, 13 Jan 2023 14:10:31 +0100 (CET) Date: Fri, 13 Jan 2023 14:10:31 +0100 From: Corinna Vinschen To: Xianmiao Qu Cc: newlib@sourceware.org Subject: Re: [PATCH] libgloss: csky: use atexit to call fini-array functions. Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: Xianmiao Qu , newlib@sourceware.org References: <20230113124647.75628-1-cooper.qu@linux.alibaba.com> MIME-Version: 1.0 In-Reply-To: <20230113124647.75628-1-cooper.qu@linux.alibaba.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Please don't CC me. I'm subscribed to the newlib ML anyway. Thanks. On Jan 13 20:46, Xianmiao Qu wrote: > __libc_fini_array should be called upon exit to call the > global termination functions in fini-array, use atexit to > register it at __start. > --- > libgloss/csky/crt0.S | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libgloss/csky/crt0.S b/libgloss/csky/crt0.S > index a0651a734..49f7da364 100644 > --- a/libgloss/csky/crt0.S > +++ b/libgloss/csky/crt0.S > @@ -150,6 +150,8 @@ __start: > * Assember start up done, C codes start here. > */ > __goto_c: > + lrw r0, __libc_fini_array # Register global termination functions > + jbsr atexit # to be called upon exit > /*jsri main*/ > lrw r5, __libc_init_array > jsr r5 > -- > 2.32.1 (Apple Git-133) Pushed. Thanks, Corinna