From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from server28.superhosting.bg (server28.superhosting.bg [217.174.156.11]) by sourceware.org (Postfix) with ESMTPS id AEF943858CD1 for ; 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 ) id 1rLRNo-0002pS-2B; Thu, 04 Jan 2024 19:20:05 +0200 From: Dimitar Dimitrov To: newlib@sourceware.org Cc: Dimitar Dimitrov 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 List-Id: 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 --- libgloss/pru/crt0-minrt.S | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) 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 -- 2.43.0