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 7F1E33858C39 for ; Wed, 3 Jan 2024 17:57:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F1E33858C39 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 7F1E33858C39 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=1704304631; cv=none; b=lA8BcRgEjYac/qfms8/nbCdon5/oYej3BthTrZy+pm16XIuf2dA9P4Lky2mzyJ86JpIwvMZ0lfr2W0Mf2JdIvtM97z5E56Kli26M73NFa2M4htaZSxjUaZCCEzxCBtthbITZ03ISFjZsUj46xNkO//Sr+8aSIKSVQtZwpOdsOXY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704304631; c=relaxed/simple; bh=dIf1sb5u0OTEfKyW8UoXwgWmOVgvdBxi7aUJAedPIm0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BUbCjIwRUoGaqU0dRJyPuy3ACQGOef4wAQD7YQ6aakj1Pw+x/KvRcMsg6RQfG97h1R719lWlwRKNLHDWKkRG9YBf9ejW4c0nk4Mwa8kLv71I8kSeiLnos7rKyO/kkwRPxbdsSktfW9VEJbFpNodIue8p5rT+EF5QiRP4t1njNI4= 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=q8o5zagPFNapMV/bv/dItAQffV DSzKyzEbkNw51lQxk2H6Q5OkEe1QIHnFIdKwrlH5nhXMJ865u/e+GaI/rJMItxQpFrNyM9Na1dtOs 2lf7wL1oEQOlD91Jb0Zv2YpACYldiNlA5YN7HkapcyfuoOhSMCMqLXKMf59bZIE6OeOzQ20+EBC8M f/KOAvTLa3anmNo1mQE6fIbDqnhmDXncDjctVF+SRY252C8mPCRPC6wEJJTKgJw1nTK32i8vz94LF bDv4I4hqIn2HVxoTNzOpJLqpLrJBuf/aI1zH5kbofcZRshanse3p05LwmkZbbR7GiSL6FjJuNZjZe +HAR7gOQ==; Received: from [95.42.20.142] (port=43848 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 1rL5U7-0009hZ-1C; Wed, 03 Jan 2024 19:57:08 +0200 From: Dimitar Dimitrov To: newlib@sourceware.org Cc: Dimitar Dimitrov Subject: [PATCH v2 2/2] libgloss: pru: Trim crt0-minrt.o Date: Wed, 3 Jan 2024 19:56:55 +0200 Message-ID: <20240103175655.1394938-2-dimitar@dinux.eu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240103175655.1394938-1-dimitar@dinux.eu> References: <20240103175655.1394938-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