Message ID | 20240104171952.1409897-2-dimitar@dinux.eu |
---|---|
State | New |
Headers |
Return-Path: <newlib-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0CC4438582AD for <patchwork@sourceware.org>; Thu, 4 Jan 2024 17:21:07 +0000 (GMT) X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from server28.superhosting.bg (server28.superhosting.bg [217.174.156.11]) by sourceware.org (Postfix) with ESMTPS id AEF943858CD1 for <newlib@sourceware.org>; Thu, 4 Jan 2024 17:20:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AEF943858CD1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dinux.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinux.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AEF943858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.174.156.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704388809; cv=none; b=Zz1TfyV/4hr1dzT1q/Mb8Roy1C+00ZqVDApzvvGzq8+f8K55EujT8eCku0RAy1E2525ZuTahlQvQg7trYoEzoj2hBhoa1cC/YdjxM/gAXdRlHAEuMV+Iy/1tIug7tH30ZGqUFMuGIlXrWvNrBgYYq1nIfSaM7P+2k3F0cYabyP8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704388809; c=relaxed/simple; bh=dIf1sb5u0OTEfKyW8UoXwgWmOVgvdBxi7aUJAedPIm0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BWnXv7thGs5IF4s7cwdv7EohpTxRsO+KIGZzkXwpjfNkrrrkTQGsGKR2cii8LZYfzt1LrEzWL5d9eBbVMi4dICvVf68/ndJStuuuw/yYe/xBFt4VkeJBwXzFRLAyVE69vfdUwCAwoq1GyKlQqYW7HYzNXmv+BpGfEfu0ztp+aK4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dinux.eu; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9sU3sm7UEw14zDOPhCF05Eu5/9RgzDoIIt0fYlzqTPs=; b=EGX+Mf9u3jlnhLHMuPvVQOLqXu UosifUWL96KMGh7EZ1X9U2LVHEUcFNyg0F/+Q34Qnjg8FXZTksxmSkuxA80g6v7oJDQF7VnWlfq2u NHxSfoYxVPn+XMU1eU9Hu5y/1HISksWqd7q/5QfbyROOj1bcKB7kckJjCWrxc2m2JtjWB+k1qU+9I 1shw1sG/Gm+xouL1W0gkTe7I0MxgsD0EJ2dZfGucznxvKNmyvtHSkDMS8KiyByPCYjfVZKwWkzrI8 or58TDvI2EsV4yhljakDlVgm98OtoeciDKmbceEaD5AABFh9lIch7ET/xADMfPU9h3iFM9T5PIaHh 4/aEPQWw==; Received: from 95-42-20-142.ip.btc-net.bg ([95.42.20.142]:56714 helo=kendros.lan) by server28.superhosting.bg with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from <dimitar@dinux.eu>) id 1rLRNo-0002pS-2B; Thu, 04 Jan 2024 19:20:05 +0200 From: Dimitar Dimitrov <dimitar@dinux.eu> To: newlib@sourceware.org Cc: Dimitar Dimitrov <dimitar@dinux.eu> Subject: [PATCH v3 2/2] libgloss: pru: Trim crt0-minrt.o Date: Thu, 4 Jan 2024 19:19:52 +0200 Message-ID: <20240104171952.1409897-2-dimitar@dinux.eu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104171952.1409897-1-dimitar@dinux.eu> References: <20240104171952.1409897-1-dimitar@dinux.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server28.superhosting.bg X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dinux.eu X-Get-Message-Sender-Via: server28.superhosting.bg: authenticated_id: dimitar@dinux.eu X-Authenticated-Sender: server28.superhosting.bg: dimitar@dinux.eu X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list <newlib.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/newlib>, <mailto:newlib-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/newlib/> List-Post: <mailto:newlib@sourceware.org> List-Help: <mailto:newlib-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/newlib>, <mailto:newlib-request@sourceware.org?subject=subscribe> Errors-To: newlib-bounces+patchwork=sourceware.org@sourceware.org |
Series |
[v3,1/2] libgloss: merge pru into top-level Makefile
|
|
Commit Message
Dimitar Dimitrov
Jan. 4, 2024, 5:19 p.m. UTC
Strip a few more instructions from crt0-minrt.S:
- Remove "halt" and rely on the infinite loop after main()'s return.
- Remove main()'s argc and argv argument initialization. Host loader
does not set them, and typical firmware does not use them, either.
- Remove the __dso_handle symbol.
This should be safe because the default crt0.S is fully standards
compliant. Whereas crt0-minrt.S has been documented from the beginning
to intentionally miss features in order to reduce firmware size, while
still enabling typical PRU firmware to operate.
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
libgloss/pru/crt0-minrt.S | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
Comments
On Thu, Jan 04, 2024 at 07:19:52PM +0200, Dimitar Dimitrov wrote: > Strip a few more instructions from crt0-minrt.S: > - Remove "halt" and rely on the infinite loop after main()'s return. > - Remove main()'s argc and argv argument initialization. Host loader > does not set them, and typical firmware does not use them, either. > - Remove the __dso_handle symbol. > > This should be safe because the default crt0.S is fully standards > compliant. Whereas crt0-minrt.S has been documented from the beginning > to intentionally miss features in order to reduce firmware size, while > still enabling typical PRU firmware to operate. > > Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu> > --- > libgloss/pru/crt0-minrt.S | 15 +-------------- > 1 file changed, 1 insertion(+), 14 deletions(-) Ping. Regards, Dimitar
should you be listed in newlib/MAINTAINERS for pru ? -mike
On Sat, Jan 20, 2024 at 08:46:36AM -0500, Mike Frysinger wrote: > should you be listed in newlib/MAINTAINERS for pru ? > -mike Yes, I would be honoured. I've been running and monitoring CI for the GNU toolchain for PRU, including newlib, for a few years. And I intend to continue doing so. Thanks, Dimitar
On 20 Jan 2024 17:15, Dimitar Dimitrov wrote: > On Sat, Jan 20, 2024 at 08:46:36AM -0500, Mike Frysinger wrote: > > should you be listed in newlib/MAINTAINERS for pru ? > > Yes, I would be honoured. > > I've been running and monitoring CI for the GNU toolchain for PRU, > including newlib, for a few years. And I intend to continue doing so. send a patch for Corinna & Jeff to approve :) do you have push access to newlib now ? might be worth asking for that too so you can be added to the "write privileges after getting approval" section. -mike
On Jan 20 13:57, Mike Frysinger wrote: > On 20 Jan 2024 17:15, Dimitar Dimitrov wrote: > > On Sat, Jan 20, 2024 at 08:46:36AM -0500, Mike Frysinger wrote: > > > should you be listed in newlib/MAINTAINERS for pru ? > > > > Yes, I would be honoured. > > > > I've been running and monitoring CI for the GNU toolchain for PRU, > > including newlib, for a few years. And I intend to continue doing so. > > send a patch for Corinna & Jeff to approve :) > > do you have push access to newlib now ? might be worth asking for that too > so you can be added to the "write privileges after getting approval" section. > -mike libgloss isn't my playfield, so I was deferring this to Jeff. Personally I have no problems with that. For the time being, I was trying to merge the patches but the first patch to the build system already fails to apply cleanly. ANy chance to regenerate it relative to current main? Thanks, Corinna
On 22 Jan 2024 11:04, Corinna Vinschen wrote: > On Jan 20 13:57, Mike Frysinger wrote: > > On 20 Jan 2024 17:15, Dimitar Dimitrov wrote: > > > On Sat, Jan 20, 2024 at 08:46:36AM -0500, Mike Frysinger wrote: > > > > should you be listed in newlib/MAINTAINERS for pru ? > > > > > > Yes, I would be honoured. > > > > > > I've been running and monitoring CI for the GNU toolchain for PRU, > > > including newlib, for a few years. And I intend to continue doing so. > > > > send a patch for Corinna & Jeff to approve :) > > > > do you have push access to newlib now ? might be worth asking for that too > > so you can be added to the "write privileges after getting approval" section. > > libgloss isn't my playfield, so I was deferring this to Jeff. any value in carving out a more specific libgloss/MAINTAINERS ? i'd be happy to be a "global" maintainer there ... just not in newlib :). -mike
On Mon, Jan 22, 2024 at 5:04 AM Corinna Vinschen <vinschen@redhat.com> wrote: > On Jan 20 13:57, Mike Frysinger wrote: > > On 20 Jan 2024 17:15, Dimitar Dimitrov wrote: > > > On Sat, Jan 20, 2024 at 08:46:36AM -0500, Mike Frysinger wrote: > > > > should you be listed in newlib/MAINTAINERS for pru ? > > > > > > Yes, I would be honoured. > > > > > > I've been running and monitoring CI for the GNU toolchain for PRU, > > > including newlib, for a few years. And I intend to continue doing so. > > > > send a patch for Corinna & Jeff to approve :) > > > > do you have push access to newlib now ? might be worth asking for that > too > > so you can be added to the "write privileges after getting approval" > section. > > -mike > > libgloss isn't my playfield, so I was deferring this to Jeff. > Personally I have no problems with that. > I'm fine too. I'll add Dimitar for pru to newlib/MAINTAINERS file. I don't offhand know the process for getting push access to newlib. > For the time being, I was trying to merge the patches but the > first patch to the build system already fails to apply cleanly. > ANy chance to regenerate it relative to current main? > > > Thanks, > Corinna > >
On Jan 22 12:27, Mike Frysinger wrote: > On 22 Jan 2024 11:04, Corinna Vinschen wrote: > > On Jan 20 13:57, Mike Frysinger wrote: > > > On 20 Jan 2024 17:15, Dimitar Dimitrov wrote: > > > > On Sat, Jan 20, 2024 at 08:46:36AM -0500, Mike Frysinger wrote: > > > > > should you be listed in newlib/MAINTAINERS for pru ? > > > > > > > > Yes, I would be honoured. > > > > > > > > I've been running and monitoring CI for the GNU toolchain for PRU, > > > > including newlib, for a few years. And I intend to continue doing so. > > > > > > send a patch for Corinna & Jeff to approve :) > > > > > > do you have push access to newlib now ? might be worth asking for that too > > > so you can be added to the "write privileges after getting approval" section. > > > > libgloss isn't my playfield, so I was deferring this to Jeff. > > any value in carving out a more specific libgloss/MAINTAINERS ? > i'd be happy to be a "global" maintainer there ... just not in newlib :). That sounds really good to me. Jeff? Corinna
On Tue, Jan 23, 2024 at 4:04 AM Corinna Vinschen <vinschen@redhat.com> wrote: > On Jan 22 12:27, Mike Frysinger wrote: > > On 22 Jan 2024 11:04, Corinna Vinschen wrote: > > > On Jan 20 13:57, Mike Frysinger wrote: > > > > On 20 Jan 2024 17:15, Dimitar Dimitrov wrote: > > > > > On Sat, Jan 20, 2024 at 08:46:36AM -0500, Mike Frysinger wrote: > > > > > > should you be listed in newlib/MAINTAINERS for pru ? > > > > > > > > > > Yes, I would be honoured. > > > > > > > > > > I've been running and monitoring CI for the GNU toolchain for PRU, > > > > > including newlib, for a few years. And I intend to continue doing > so. > > > > > > > > send a patch for Corinna & Jeff to approve :) > > > > > > > > do you have push access to newlib now ? might be worth asking for > that too > > > > so you can be added to the "write privileges after getting approval" > section. > > > > > > libgloss isn't my playfield, so I was deferring this to Jeff. > > > > any value in carving out a more specific libgloss/MAINTAINERS ? > > i'd be happy to be a "global" maintainer there ... just not in newlib :). > > That sounds really good to me. Jeff? > > I agree. -- Jeff J. > Corinna > >
diff --git a/libgloss/pru/crt0-minrt.S b/libgloss/pru/crt0-minrt.S index 60647d372..fa5e80af4 100644 --- a/libgloss/pru/crt0-minrt.S +++ b/libgloss/pru/crt0-minrt.S @@ -38,22 +38,9 @@ _start: /* DATA and BSS are handled by the loader, so nothing to do here. */ - /* Just in case main() tries to access argc, argv[] and envp. */ - zero r14, 3 * 4 - - /* Call main. */ + /* Call main. Assume argc and argv are not used with -minrt! */ call main /* We should never reach here. */ _crt_exit: - halt jmp _crt_exit - - /* PRU obviously has no shared libraries, but dso_handle - helps to achieve better GCC test coverage. Besides, - it should be free with minrt. */ - .section .data - .global __dso_handle - .weak __dso_handle -__dso_handle: - .long 0