From patchwork Tue May 21 17:07:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitar Dimitrov X-Patchwork-Id: 90627 Return-Path: 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 E76DC384AB59 for ; Tue, 21 May 2024 17:08:13 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from server28.superhosting.bg (server28.superhosting.bg [217.174.156.11]) by sourceware.org (Postfix) with ESMTPS id 363E43858D1E for ; Tue, 21 May 2024 17:07:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 363E43858D1E 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 363E43858D1E 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=1716311268; cv=none; b=PNlRH1dAszpkLgIWtQvfk1ychptiVh+mCqnHkiuGFrH3LuQHOopK8l2vO3mFU1R6y3o9UvIOR0IZDxr+ql7SrSJFUyfJFHohDI8pbfn/JMAxcwW358CZta7BUrHZyzn99zusRYhaLw3DHeWyqV13Z0+e2h3c1OK3xWE5wLPdKEA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716311268; c=relaxed/simple; bh=BHIsCHORwOEWA4voc9eDwjMhFH0Wzgiy/4Ggs0pzkbE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=U0k9E7YsLEzzhjXD+E+WII3EOhtu8yIMAId2ecdb8kz/I3fQ1ES7BG65e36m+XlM0gWWFKWTw7Y/LiW6Pe0++cDdA9U6aE/5hgo1nW81oy/LfMGPeg1GGZLFoFydfcZHzCOAHSXJSer56iIwoxtuIB1cewK9x1AYTOsTmgeoBGs= 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: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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BNinAkXhQe9Q2l7VaciWhIjgdHlpOOXvekwWqWJ8rLg=; b=P1RyAPfofnPPwPOUtYcL4osfWL GmOaEeSxTUdH8iTUVQ4AagXlq2KFEoWrKMm4BN+VuQTr9k8pVyUeRj9QmE2OSxN9N7FX9A7Nedkq/ OHNVcHPPsTCyZD+WTe/GJzBuS6AeYSyVbcXk96xMClH7d6DR1C8nKRBWngolSqhvoZHxguW/ro0tm 8ToG2GVS0hDZ+cYqG2UInG6LO9RultvkK0ryeMGAe9d3xwBGCVp1UKqEZVJogV8xlqUrI0MQCFsJl nakiQriKAJ8NaGxbfHw/y25T6GovXm/XX3u2wFr/9nOzONttoS9alPHx+MxZU5eDn2sAalUfdRFjm Hxqn0Edg==; Received: from 95-42-20-142.ip.btc-net.bg ([95.42.20.142]:59254 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 1s9Sxi-00093o-2x; Tue, 21 May 2024 20:07:45 +0300 From: Dimitar Dimitrov To: binutils@sourceware.org Cc: Dimitar Dimitrov Subject: [PATCH] ld: pru: Increase the default memory region sizes Date: Tue, 21 May 2024 20:07:36 +0300 Message-ID: <20240521170736.470577-1-dimitar@dinux.eu> X-Mailer: git-send-email 2.45.0 MIME-Version: 1.0 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, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org The default memory region sizes for PRU were set somewhat arbitrarily to the sizes of the most popular BeagleBone board with AM33x SoC. But the PRU toolchain documentation has always instructed to use SoC-specific spec files to override the defaults and set the correct memory sizes [1]. The small default memory sizes can cause IMEM memory region overflow even for simple printf("Hello world") programs, as usually done by Autotools checks. The stdio is simply too big to fit in 8K instruction memory. This can confuse the check and lead to wrong feature selection during configure [2]. Fix by bumping the default DMEM and IMEM memory sizes. There is no need to backport this patch. Issue was caught with a feature-rich newlib build used for daily CI. The release builds of the PRU toolchain use stripped newlib configuration, which does not overflow the IMEM region, even for 8K. Ok for master? [1] https://github.com/dinuxbg/gnuprumcu [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115158 Signed-off-by: Dimitar Dimitrov --- ld/emulparams/pruelf.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ld/emulparams/pruelf.sh b/ld/emulparams/pruelf.sh index 48e9a3a3bea..7ed5d33bcb6 100644 --- a/ld/emulparams/pruelf.sh +++ b/ld/emulparams/pruelf.sh @@ -11,9 +11,9 @@ COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" EMBEDDED=yes TEXT_ORIGIN=0x20000000 -TEXT_LENGTH=8K +TEXT_LENGTH=256K DATA_ORIGIN=0x0 -DATA_LENGTH=8K +DATA_LENGTH=256K ENTRY=_start EXTRA_EM_FILE=pruelf