From patchwork Sat May 20 20:55:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784176 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=awmH5y/D; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKkg6KGyz20PS for ; Sun, 21 May 2023 22:33:47 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 30581846D8; Sun, 21 May 2023 14:33:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="awmH5y/D"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A71298478A; Sat, 20 May 2023 22:56:04 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0457884707 for ; Sat, 20 May 2023 22:56:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-64d24136685so1496178b3a.1 for ; Sat, 20 May 2023 13:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616158; x=1687208158; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eBQPn1ttd5RL2hcc0XHcIkM9VoBio8IrpHrpkQHtGcc=; b=awmH5y/DbC4B2JA7M9iMCK7PMlJE8HWdMNpfAmiD+lH+dXqCQ57ulwcXmY1giK3aKO qpd0ShmVyyqZVY9z4VjQGvywgpmTFDFVWSgZ+0camkr2tBsPCwyUIY7rP14GvKvmKVnh wd6Njrd8qtv6dz6DiMQYU18mAIHCYgoALBo3nSRW5kEWSuW3IMvWo8lQGqhZ3zLp3q/l K/S5fflk+wMBYYJmLULWbwH2aJQRa8vfqPyyXjD9G5YMN68EDEN+bNVXo59+otPTtR1z bDNgfNqdgxL1UWaW7o9EVORpqkb/2Ix99+VPxhMmAxlWo1YOhx2SBjbCsT4jPVP11e5E mUOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616158; x=1687208158; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eBQPn1ttd5RL2hcc0XHcIkM9VoBio8IrpHrpkQHtGcc=; b=aAOBFoRcpQfDe33y4tpdA6P8CiQLDQl5oMTQSZlNRSYQZ5YKhbRV9h2ZMAm8fiJ6Zj Dek3wUMiqkJvVOX4BE9/fWktTg3HczEKk66KMsrClmyXaS2s43EK4z7YHC/g2NrKKGZV P39IzQ+ZL4dchyqwupakyeJv8s0VoX0DlrTWZ9V8qCNIe+M1HSTQFHJPW37tRsAVLuXI U8ydrWOSVj/jjGGF5PItSHNJS3FrZTPc5uz1ZeaAHTvlgvAVl0p1Y67CIdOSwaRIoVRu 6NSFHr/pTdD/7TN/CDNpIOCobaEVke3SirXes4l6OssXNF58oFcNSB4FpxA6+tpjgy/0 W/cQ== X-Gm-Message-State: AC+VfDzdI+Mrhsd+oXGpe418UFqw77tVRwuZfbwvntb/AtHDZVeOuDYg CkxlxLLM/FRx/OGAxAPPtaJbq4IXQQIeINhV X-Google-Smtp-Source: ACHHUZ4IVeSEeECh+OjSxDFmI5ZV0je1AiszujElFda+Byh9gAq2NThdlUyNdUnCcY4J0sm0ndyh9A== X-Received: by 2002:a05:6a00:4c0a:b0:63c:56f5:5053 with SMTP id ea10-20020a056a004c0a00b0063c56f55053mr13596296pfb.13.1684616158126; Sat, 20 May 2023 13:55:58 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.55.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:55:57 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Tom Rini , Heinrich Schuchardt , Kever Yang , =?utf-8?q?Marek_Beh=C3=BAn?= , =?utf-8?q?Pali_Roh=C3=A1r?= , Quentin Schulz , Simon Glass Subject: [RFC PATCH 01/10] makefile: Fix symbol typo in binary_size_check Date: Sat, 20 May 2023 14:55:38 -0600 Message-Id: <20230520205547.1009254-2-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The start-of-image marker symbol is `__image_copy_start`; by searching for `_image_copy_start` instead, this check can accidentally match `_image_copy_start_ofs`. Signed-off-by: Sam Edwards Reviewed-by: Tom Rini --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a5ab5e3da9..19017cbfa0 100644 --- a/Makefile +++ b/Makefile @@ -1262,7 +1262,7 @@ OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \ binary_size_check: u-boot-nodtb.bin FORCE @file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \ map_size=$(shell cat u-boot.map | \ - awk '/_image_copy_start/ {start = $$1} /_image_binary_end/ {end = $$1} END {if (start != "" && end != "") print "ibase=16; " toupper(end) " - " toupper(start)}' \ + awk '/__image_copy_start/ {start = $$1} /_image_binary_end/ {end = $$1} END {if (start != "" && end != "") print "ibase=16; " toupper(end) " - " toupper(start)}' \ | sed 's/0X//g' \ | bc); \ if [ "" != "$$map_size" ]; then \ From patchwork Sat May 20 20:55:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784177 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=VCaYW3G4; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKkw0KZcz20PS for ; Sun, 21 May 2023 22:34:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 78A6D847BE; Sun, 21 May 2023 14:33:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="VCaYW3G4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 859E0846F5; Sat, 20 May 2023 22:56:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4C02184788 for ; Sat, 20 May 2023 22:56:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-64d3e5e5980so1833330b3a.2 for ; Sat, 20 May 2023 13:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616159; x=1687208159; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=InoEq+AaL26nnJdM5Lq2etOtlaMr9y3SfybpWyCn+Fw=; b=VCaYW3G4He6pbb2ocH0SeSigzg4RBqB88X09jjOiZV4QPfxXurTpzo5gapCb22j7/l B7mit349Wi4w5Hk4H95de8KMBsmWlsLD6TWbBL7Wt5mOT7HgcmZy4OVr5Asxcrx2Ilh9 9imHy0s5EDRBDkydX7jN8iM8n1t1oupSp2yFsDWKV3D/9jtlUyp/n27fcYjBmFya0s+O BX4tjSEpgxCLJZNEmaFmWKaXSXihnEHgzwajVRq2GW2neZ3GxHcOLR4UalUQeNpdDCGL I9IBXO9FrxI4jXlT103Ff6Uhe6MFvzGSyiZo2gzYk3tL6nDuVtLVsoJsNgIUzbhPvtxx 6DdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616159; x=1687208159; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=InoEq+AaL26nnJdM5Lq2etOtlaMr9y3SfybpWyCn+Fw=; b=Hpc9oGJ9O63fzDLSu11qdvrMKptY3LtrD+QQm2eaZmiSMBdrFbQcsYb4/apBj/Asz7 RZrM4+aD3aUNYUYhA2LQfkSmacydpdDuNQBYgdDqbhYAQ97QvcY6pv8jPN0nMBNVn77W gv4NCWtzexEQ0ruOdndFoP399tmQqwKgikLPvF/KnyTcLw29OIr9DeI6bCVn1cAbPh+E Q/F781+X7XdvSNLEoRpyNe/YGHRvX+J1aJJ3yezZmaayYAmY29UqHghpx6rAxjyWUKXO sCBKfpz2vo2CztoBbCLn3RFcLYdy4PK9MYzKqL8Yd9c/VuLMgl2nahjy2uNbsTIa+Hw1 iOVw== X-Gm-Message-State: AC+VfDxK9PVaohJ54EywomUgESZhd0xmcEMPKIjZgFGOqtM+AqdQsEbN 9GEqAp3/c2zXAj14pqE9/FqNZttekR7zBJnV X-Google-Smtp-Source: ACHHUZ5fyVXxL5mr3aX+9P7s4PRrTTxASI/77ao/IeS+7NtHQZHEvi8df9RVNpCoSwcy9rZkU3jm+Q== X-Received: by 2002:a05:6a00:190f:b0:64d:4a94:1a60 with SMTP id y15-20020a056a00190f00b0064d4a941a60mr3182751pfi.18.1684616159365; Sat, 20 May 2023 13:55:59 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:55:58 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Tom Rini Subject: [RFC PATCH 02/10] arm: set alignment properly for asm funcs Date: Sat, 20 May 2023 14:55:39 -0600 Message-Id: <20230520205547.1009254-3-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean ARM requires a 4-byte alignment on all ARM code (though this requirement is relaxed to 2-byte for some THUMB code) and we should be explicit about that here. GAS has its own fix for this[1] that forces proper alignment on any section containing assembled instructions, but this is not universal: Clang's and other gaslike assemblers lack this implicit alignment. Whether or not this is considered a bug in those assemblers, it is better to ask directly for what we want. [1]: https://sourceware.org/bugzilla/show_bug.cgi?id=12931 Signed-off-by: Sam Edwards --- arch/arm/include/asm/linkage.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/linkage.h b/arch/arm/include/asm/linkage.h index dbe4b4e31a..73bf25ba4e 100644 --- a/arch/arm/include/asm/linkage.h +++ b/arch/arm/include/asm/linkage.h @@ -1,7 +1,7 @@ #ifndef __ASM_LINKAGE_H #define __ASM_LINKAGE_H -#define __ALIGN .align 0 -#define __ALIGN_STR ".align 0" +#define __ALIGN .p2align 2 +#define __ALIGN_STR ".p2align 2" #endif From patchwork Sat May 20 20:55:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784178 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=Bun+vp9/; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKlB15f6z20PS for ; Sun, 21 May 2023 22:34:14 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A6E47847C8; Sun, 21 May 2023 14:33:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Bun+vp9/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A22C846E2; Sat, 20 May 2023 22:56:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CC8D884794 for ; Sat, 20 May 2023 22:56:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-64d3491609fso1265651b3a.3 for ; Sat, 20 May 2023 13:56:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616160; x=1687208160; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RMpdJRBjBEIUca7q3ZTUw9UgCheItfbwXFX/+RJx0L0=; b=Bun+vp9/avhm79n9eC87KiPwVcAAAxVoNyVDcSQ9aE9x4IbYKiy7fQYoSs9NUcwRI9 mNpiiblzP/jEWnKNXkwzhdIGHTPy0+WV08jWkHVhaZbiGwaFALyzjsuYkFzj12XCTcyH gL5aZ+hh4IYILqFCga5hI+oqORmHTJY/5z4d319qUkRX3iQSnMVZiQHdOI8LZWyaxc2e StvIMlVSGhXMNNwSMoi5SMM48QvNjtgEkMKQx8SggiX1HDJbMFZY+4M5tYMvEbaeu4aH vVK1vZnyemLu00TOd+5sreYu2VE/UxC/zxquiTxJBF0Wh6/DGJT4vA6ixRRjnBZY1l5i SMHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616160; x=1687208160; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RMpdJRBjBEIUca7q3ZTUw9UgCheItfbwXFX/+RJx0L0=; b=lFhTJ1AoV9U9ls4bAvUMTjdtP3zBtn+qr6uMOBaeYMwfjURiquiyVqYLPzwOk4WALn 5rUTGQCy6ZIL+lN0btsQxQ9BCf8qBfgad/wzmNDU5dOFqPskm5h702RXbTpScAMz6oUe hh1TfiI0uXRuMs3+gL+tlARf5K2YhWUIyJae97abN6msktb59i+/woABpo33Y/J7IfKD jFuosaWZZfcq2uleJhRqUg/t4YjQ/r2BUf+X0ASgo4jyyD8Gs0/QjW9cPYwjz8Lf8oxe 1gdWjfZuuJqJN4EGC05T5S1I9c5fkpnndD1QK0izvK9K3uZm1IB6W5AkF9qqbUnR/BXJ W9Gw== X-Gm-Message-State: AC+VfDzwnPYE8fAPyRIjo/McM40/wt2ifTGvPcClKc8U7/LjDuNtUGGW dtdJ3Y/wy5SCKpOhbT6BbhqveHxMfnwVHWYl X-Google-Smtp-Source: ACHHUZ5Y7Ur10BN2tl0i3dP8EXYVgaDVZrVRYkgkOnIlJx0xJvd+SKsc6i1xUdsijJaCXgWpS0gqVA== X-Received: by 2002:a05:6a00:1486:b0:645:d02d:9a83 with SMTP id v6-20020a056a00148600b00645d02d9a83mr9041833pfu.17.1684616160567; Sat, 20 May 2023 13:56:00 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:56:00 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Nathan Barrett-Morrison , Philip Oberfichtner , Tom Rini Subject: [RFC PATCH 03/10] arm: exclude eabi_compat from LTO Date: Sat, 20 May 2023 14:55:40 -0600 Message-Id: <20230520205547.1009254-4-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean These symbols need to survive the IR-level dead function elimination pass, since nothing at the IR level is referencing them (calls to these are inserted later, at codegen time). Signed-off-by: Sam Edwards --- arch/arm/lib/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 62cf80f373..d65dc33f5b 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -88,6 +88,7 @@ obj-$(CONFIG_DEBUG_LL) += debug.o # For EABI conformant tool chains, provide eabi_compat() ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) extra-y += eabi_compat.o +CFLAGS_REMOVE_eabi_compat.o := $(LTO_CFLAGS) endif # some files can only build in ARM or THUMB2, not THUMB1 From patchwork Sat May 20 20:55:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784179 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=oUy+zX4f; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKlQ62XPz20PS for ; Sun, 21 May 2023 22:34:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0AA99847D5; Sun, 21 May 2023 14:33:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="oUy+zX4f"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 30FCD84780; Sat, 20 May 2023 22:56:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AE314846D8 for ; Sat, 20 May 2023 22:56:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-64d2f99c8c3so1443228b3a.0 for ; Sat, 20 May 2023 13:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616161; x=1687208161; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sDRxRNJo0+rOWNtcYLrqJrJ8KeW1CK++dHyK3ftEx5I=; b=oUy+zX4fZBNuWul9ULXdkdQEXfndByWSTwZ+vVoj4OYzyeqpY4aVcwtfog95ap/VYp aIeWmHRXA0I2mOg5iuPvsj5pB0rhzBsDLQ9vuldWtZJjSDluxEh5xvVpUhkTfzCJnrT1 m6pAw6wdENY9yTHIg4pVA+Fnn9Ixcghm98/aoN/QfWCIQnYazd++tKSOuBqAMBz/DFlV VCLDNbw4b9tQMvNVMm03NI68qNi9iEY7TbzIr2/d/c67vt/jp4GwBmRvTKTTQJnnRcme q+2SYJ3jnRlYMKvsLMWEX3xZPMo7HF7dnH2AGa+giKtgAtp3glWARleT7547edpFHYEt /CqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616161; x=1687208161; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sDRxRNJo0+rOWNtcYLrqJrJ8KeW1CK++dHyK3ftEx5I=; b=SPS0cYImu6gituK6r59iestmuau0XnWrBpGKv0e5SMSas7qDqbbed4VuMdZfjF7Jvj /mQPLWny647SUcn1NpTkenwxCySE9d62V14QR4m5uQOcWvFUrwbKcUTDxsvKE9tZV336 cHDOlEFmqrcpNcufoE3D6+vbiMAMHsm+Jv6EarQuTAlgN43vjsXU+4GczNA34UA58iLF cgEYXpyQZz6j7K+hVdUiDgVSAVQRvcXWvGGfG2iTTVyOzX6jOpDPry+Sh84WNLYBCofe XrMc+1LygOzMQg9ZOk+MPxaBHA4TXZO+031lZd6FyBWn4/zBCYGZbkoTZHzqYIU6LNIz ztUw== X-Gm-Message-State: AC+VfDzKutewAhbvRrEZSzrsVxN/FpIzW4Rx9GQNgemo4UGneu6KvEfM MKrC70IoBcqVj6DStSSndBDn1HiWG/HtcObL X-Google-Smtp-Source: ACHHUZ7OdA6rOc9wmoO3zU+6ZOGg/H1VcS67LKskNMoT6+0NzaiXiD5ozgX+/1Tg4sLjiHt8clCA6Q== X-Received: by 2002:a05:6a00:2408:b0:643:7fcf:836d with SMTP id z8-20020a056a00240800b006437fcf836dmr7858128pfh.25.1684616161599; Sat, 20 May 2023 13:56:01 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.56.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:56:01 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Tom Rini Subject: [RFC PATCH 04/10] arm: add __aeabi_memclr in eabi_compat Date: Sat, 20 May 2023 14:55:41 -0600 Message-Id: <20230520205547.1009254-5-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This is sometimes used by LLVM's code generator. Signed-off-by: Sam Edwards --- arch/arm/lib/eabi_compat.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c index f7029918d4..059ca07265 100644 --- a/arch/arm/lib/eabi_compat.c +++ b/arch/arm/lib/eabi_compat.c @@ -35,3 +35,8 @@ void __aeabi_memset(void *dest, size_t n, int c) { (void) memset(dest, c, n); } + +void __aeabi_memclr(void *dest, size_t n) +{ + (void)memset(dest, 0, n); +} From patchwork Sat May 20 20:55:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784180 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=c1IG32Yz; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKlg6X5cz20PS for ; Sun, 21 May 2023 22:34:39 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 49A94847E3; Sun, 21 May 2023 14:33:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="c1IG32Yz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB51F847B5; Sat, 20 May 2023 22:56:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CD45184707 for ; Sat, 20 May 2023 22:56:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-64d426e63baso1297165b3a.0 for ; Sat, 20 May 2023 13:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616163; x=1687208163; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2cRpA8jEpN1qE+cZxGqIfompyMGVIcoXqM7l/Yg/N84=; b=c1IG32YzSFiOYj+kDhbJj7OctdvdFbvVWRmT+X6+iyOk8+dd6esYoyG0re7T/b2O7l QM0xoQXzuyDxcxhEJHCgIEUcoe2f8+tTh4jqCvS2XfYE3hDkD2bDzdeD2JzctZFv001w J36q9G5qlijYQM4ykIbAx+nxEN1vVSd+ylBRZs3Ztnf4gBt/hDy1i48HansfAr4Jv8Ao IA8HOw3pzV3PIJh3KDzY4wGQYrrkDEMjwt2ZXoWeIUiOT88uMaopH6CrFd3XL/u1mnKA YlemHdp/Smv8HeLNajOxIPmtp9qrnAgXsryMlnLeOqyAxJZtzMEmn7SLjDDRsmIwBakE uGfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616163; x=1687208163; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2cRpA8jEpN1qE+cZxGqIfompyMGVIcoXqM7l/Yg/N84=; b=EM9uEWNepEWBru4c3DA+09HoLedgUf36bejIj8MSt5CSxkFITjeQj04UwvqWyET+NP 9PnkAkMzsFzbkZr6MXLIiigsim7gLF7s44HLiDRp2rfj8cFKP59M35o35c6ZCA8jNJpP 2BNjBbWb3i7YEKFoZTpgH5Rpeq5nXmIyRfEF2rWy7XRdnhjV0CwI2XQbjqsJE1vqd/NN mI48nWpVGxEhcLNadxp0HTX96Xe34uadmegFO9PAFyry8obasiKsObEsvHqg0/HA7eyN mwOvGWw8PJKXONUVouyKQauLVnHFqfqRZJp9PbPrOJK087kjB+FcOkvqUlUMRAmrHCyY j2cg== X-Gm-Message-State: AC+VfDy82OkYqVwMJFuek5sMTY4TKufASkvX+UtBJxlpTN25nyX00/fN OBhVMzZyQayUnj+eAhyAK2ThJ0cfcmNPqcUw X-Google-Smtp-Source: ACHHUZ5/HMY0XpkgPD+MRwrpqYiwhDAugj7VO2yiaI6IB6sn73Re4Of6yDrjFoOuHlAxzUTgpWu0RQ== X-Received: by 2002:a05:6a20:3c8e:b0:100:a201:83ce with SMTP id b14-20020a056a203c8e00b00100a20183cemr6837831pzj.9.1684616162790; Sat, 20 May 2023 13:56:02 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:56:02 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Tom Rini Subject: [RFC PATCH 05/10] arm: add aligned-memory aliases to eabi_compat Date: Sat, 20 May 2023 14:55:42 -0600 Message-Id: <20230520205547.1009254-6-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean These are sometimes used by LLVM's code-generator, when it can guarantee that the memory buffer being passed is aligned on a (4- or 8-byte) boundary. They can safely be aliases to the unaligned versions. Signed-off-by: Sam Edwards --- arch/arm/lib/eabi_compat.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c index 059ca07265..d00f68a3f6 100644 --- a/arch/arm/lib/eabi_compat.c +++ b/arch/arm/lib/eabi_compat.c @@ -31,12 +31,24 @@ void __aeabi_memcpy(void *dest, const void *src, size_t n) (void) memcpy(dest, src, n); } +void __aeabi_memcpy4(void *dest, const void *src, size_t n) __alias(__aeabi_memcpy); + +void __aeabi_memcpy8(void *dest, const void *src, size_t n) __alias(__aeabi_memcpy); + void __aeabi_memset(void *dest, size_t n, int c) { (void) memset(dest, c, n); } +void __aeabi_memset4(void *dest, size_t n, int c) __alias(__aeabi_memset); + +void __aeabi_memset8(void *dest, size_t n, int c) __alias(__aeabi_memset); + void __aeabi_memclr(void *dest, size_t n) { (void)memset(dest, 0, n); } + +void __aeabi_memclr4(void *dest, size_t n) __alias(__aeabi_memclr); + +void __aeabi_memclr8(void *dest, size_t n) __alias(__aeabi_memclr); From patchwork Sat May 20 20:55:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784181 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=fEPoHlbc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKlx2H7Cz20PS for ; Sun, 21 May 2023 22:34:53 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3C4AD846CC; Sun, 21 May 2023 14:33:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fEPoHlbc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BC48D847A7; Sat, 20 May 2023 22:56:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EF3E1846F5 for ; Sat, 20 May 2023 22:56:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-64d4e45971bso344026b3a.2 for ; Sat, 20 May 2023 13:56:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616164; x=1687208164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZP7oZBOt2Y9JmvV73KeVyNK6urOc+A4hAt44mjvMR3E=; b=fEPoHlbcil6hLB81UWeN0B8/guB+zuuYRyvhWSv7rpTr/R2E8tTrCjoyS4aX5r5qeN ga5XtgF7PlS6Qlil+FQQ4ZN7O8R4EUB8/39cJ8bhyIoJ8cTslo6Xr2qsbs80nuerrYtf Uf8KIbQA518SClbS3xt+3kiADYprSY0oGndOBq1KLZ14Lk9gSDMV2/xwhGVgFxv12eiq bDohGKd4rn1T7AjjAbjbwqzYafxxwmsTnuQxCy+aKsEePM2p/1UfH9jDs6+O1kEy5Lej lcPeqAAiwLerGiKONeAOK63skoWCHNzip8QDrH90ZvpvuBPpetwK/vbJeO4Wk5kngw9D Q1Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616164; x=1687208164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZP7oZBOt2Y9JmvV73KeVyNK6urOc+A4hAt44mjvMR3E=; b=QXR3ccTqT50tLjKDo/P/Hq7M1e1iRWNA+CZtJ9dBGfzch93DsmPjwDfeCz9qQps5E9 SzpVJjo8bHo2uLkyjZWTEZWKmGpegIa1GOimsQE2EGp5K6FdN0Ns1xsP0rW28AFG3qBD 9jc317dtzllxdPjAC9keBKBJF87nWVtbbQq2YPLzNVjaeL90xZK15KJyH4m5rp5U1tV5 C8F44fmOpMjn14cjr5JjhZ5JodtAGelO3g5qc1UgawCdBWSKQxpA3LKuroEJ9wQF1oas TaCgs6L1UnHWX1A2G56an2F4PLt91MacD8a6pEu0VwfyBWEu4u1ZBmB2b9ar53NcvyAA NY+Q== X-Gm-Message-State: AC+VfDzgpCSTrT2mZ3vyCKqEoaVdXYV2xqwqy6996LyG/EUOPNJo68fT /LWQeqoIgszEC2ryV48OfjzDXlBZj45nMgJ9 X-Google-Smtp-Source: ACHHUZ5XieHxdwbInaXsVDPq99xNqfdFrsgst+R2IPXXPjKpS4G38q5tEQWE4novSnoMWKIpgyweMw== X-Received: by 2002:a05:6a00:14c4:b0:644:d220:64ac with SMTP id w4-20020a056a0014c400b00644d22064acmr8906717pfu.2.1684616164059; Sat, 20 May 2023 13:56:04 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:56:03 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Andrew Scull , Simon Glass , Tom Rini Subject: [RFC PATCH 06/10] arm: discard .gnu.version* sections Date: Sat, 20 May 2023 14:55:43 -0600 Message-Id: <20230520205547.1009254-7-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean These are often a consequence of --pie, but they aren't actually used in the runtime relocation code. It is better to discard them than to aggregate them, because they tend to be of different types, and this upsets some linkers (e.g. LLD). Signed-off-by: Sam Edwards --- arch/arm/cpu/u-boot.lds | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index fc4f63d834..8cdf08a730 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -229,6 +229,12 @@ SECTIONS KEEP(*(.__bss_end)); } + /* + * LLD's --pie may synthesize these sections, even if they are empty; + * discard them, for we do not need version symbols + */ + /DISCARD/ : { *(.gnu.version*) } + .dynsym _image_binary_end : { *(.dynsym) } .dynbss : { *(.dynbss) } .dynstr : { *(.dynstr*) } From patchwork Sat May 20 20:55:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784183 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=WsB6Jpg1; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKmP6z78z20PV for ; Sun, 21 May 2023 22:35:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C970B85727; Sun, 21 May 2023 14:33:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="WsB6Jpg1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D84F5846F5; Sat, 20 May 2023 22:56:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DF3BB84788 for ; Sat, 20 May 2023 22:56:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-64d30ab1ef2so1464819b3a.2 for ; Sat, 20 May 2023 13:56:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616165; x=1687208165; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Tn7urIgJf8m5/8oTPK6brELqOJOqEqfQPKODBqgTxUw=; b=WsB6Jpg1Oewyh9koKnUlysLHn8Cm0MMIyocJ6UixMFz00nj5SwI1ToPmNdgOcLTgEM TQFrIAl+7a8BZRbac1Lzf4jwHSqKfxADpZn7IVmz6MzmMRQudMJ6obUZmLX8pMqUNtZs zurOZA0zK337sOCuDa4ukvBJmisPEZYHzzS41POssvnbdUY6YX4M9TwuaeuAKeDvNh9N zxW9gsbi/Hhkg6S0uEUCUOfJGVeWhUyU+KoD8NHY9fmi+vnZstDqpAUi7Q8yUuie1QWc cAbAR9UDUd6QnxoHxhmAZLlxFVWcRqi+Q3uEyAuOAKf+psXd+GOMb7UJZIV19iU3fGCk 5nWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616165; x=1687208165; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tn7urIgJf8m5/8oTPK6brELqOJOqEqfQPKODBqgTxUw=; b=g9Eo+3TU3IRQXHSP3nD8Z/Pq+CBs6SCMbk/vXL999EkGp0tLH3cyQI85y+10r6RTai V4WPgF8ljjL3C04J0QGpbTwh0pvVkeBjSiQO+kixe0ZWp5z+mf0m9IbVX6tUfiHPklPn 0TyMuVOh4fhgOF0WAqarOGIEh5kQZRUMvZGH+Ne+paZ1V41XN02CH1S+z+15oSKeIvFx PzC8l5kvzFOilQrs6cWSMA+DIvduZ+8VS4dHoKbX2zz22W+Y/nVXyJIg0feQcENRx0+Y ddcqK4suNItCR+L5AQMnQzCbiAiEJmTyI1wKApv38MC6E8d3gbDRLSUOhidLZ/nQvgXs A48A== X-Gm-Message-State: AC+VfDxgpNlwWpdylkTjDzsW9Mt/+xrBUB0NMr/wvcUWwn2JmTnHMNP8 tUaWocRX+xkAhz5b/kmRjST9B2RxFPbo7Ymb X-Google-Smtp-Source: ACHHUZ7v54PAl5dPHiBNp8OH+j5tWzymf01ZwkkGHga5xiLdVAbs9k8ASIjWCCmO5yb39IbFxReADg== X-Received: by 2002:a05:6a00:194d:b0:643:bb16:7ca6 with SMTP id s13-20020a056a00194d00b00643bb167ca6mr9348370pfk.21.1684616165154; Sat, 20 May 2023 13:56:05 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.56.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:56:04 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Heinrich Schuchardt , Ilias Apalodimas , Tom Rini Subject: [RFC PATCH 07/10] arm: efi_loader: discard hash, unwind information Date: Sat, 20 May 2023 14:55:44 -0600 Message-Id: <20230520205547.1009254-8-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean LLD tends to put these at the very beginning of the file, only for the .text 0x0 directive to end up going backward and overlapping them, creating an error. Since they don't appear to be used at runtime, just discard them. Signed-off-by: Sam Edwards --- arch/arm/lib/elf_arm_efi.lds | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/lib/elf_arm_efi.lds b/arch/arm/lib/elf_arm_efi.lds index 767ebda635..0b6cc5bcb6 100644 --- a/arch/arm/lib/elf_arm_efi.lds +++ b/arch/arm/lib/elf_arm_efi.lds @@ -62,5 +62,8 @@ SECTIONS *(.dynstr) *(.note.gnu.build-id) *(.comment) + *(.hash) + *(.gnu.hash) + *(.ARM.exidx) } } From patchwork Sat May 20 20:55:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784182 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=EQYzpuxr; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKm96m4yz20Pq for ; Sun, 21 May 2023 22:35:05 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 86B14855D9; Sun, 21 May 2023 14:33:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="EQYzpuxr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8D512846F5; Sat, 20 May 2023 22:56:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 37A6E84789 for ; Sat, 20 May 2023 22:56:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-64d2a87b9daso1896338b3a.0 for ; Sat, 20 May 2023 13:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616166; x=1687208166; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nl3gakFoi0RQKBL/1E8GfxDylTMGLlWdo70J5sqBhkQ=; b=EQYzpuxrjOI0axoQJGT1/hFPxBR4c1230E8bdyJA1RG4ndZ1ZV/5L7QGRvki0qxOop aNE14zYQREpZtvR1h6+J6u/wcr1kzXFYvY8odkx8+gSwjyhLih5iaf7+6UKC6ifQcVf1 k5NtuzltYggz0QQspZHFbYqPYy6IRRpSTepLSQv/CBwSQ/NQ/qb3r41xv7gHZt3O1Tn3 rnwWpMi9S145CevMwoOEA0KJyBw1K30kvd1e9EhnIOCIjrl1lvYDOkZnAZnRQw303HeB 6fStDv3QjOfLH6rxm5mIeZqMMTTz9iHMZuzqyybfDVX2bX518DdHI/FRMkcfRgScyPlw fe0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616166; x=1687208166; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nl3gakFoi0RQKBL/1E8GfxDylTMGLlWdo70J5sqBhkQ=; b=citWW2psWA80Jm4XC75e2R02V9n8AO3H8Gtg1Uu3qaCgfyjFWyfKJhxEnfFzEFiGvP k1NRuxtslzFcQkFBHqialjlvbKpmrmYDRO/qL+ns7AJj0OY1dtbvuL7oxPHW6tlKmRwn eQwWfssWyOq7FDv03bJQfcx1SdO08bbJfh/DNykjPLaqjTbtGSe/7pVuMcZ5XkSOZmBY Fb1gYyguZlSDHjNggikwpZknGljkQBF5LlcYfX1gwfiTEw+mjrw0ZqnnmOZtQPrVqp0G SU0zlm26AZUS+Sdn7FBdSpeuCxdWnG6hbfiBibH3rI7PDT399+6BKVqFx/raCq7sIbPg DbmA== X-Gm-Message-State: AC+VfDzSI/DyUBslY1AxU98J7GTS84gpGoMhS3nwFEx9EsIleOsRl5Yn XvHtdnmDCu15eig7UUnP6+2aKNKux8TfD0y+ X-Google-Smtp-Source: ACHHUZ5vspCYBm67YKWU/l1w0GnLEGJwGoO00ExzIsbAKY+1QfQR2yuizOfPZPl5ttF44q4vbR4yRA== X-Received: by 2002:a05:6a00:2484:b0:64d:5c4c:7e20 with SMTP id c4-20020a056a00248400b0064d5c4c7e20mr854324pfv.26.1684616166419; Sat, 20 May 2023 13:56:06 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.56.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:56:05 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Heinrich Schuchardt , Heinrich Schuchardt , Ilias Apalodimas , Tom Rini Subject: [RFC PATCH 08/10] arm: efi_loader: move .dynamic out of .text in EFI Date: Sat, 20 May 2023 14:55:45 -0600 Message-Id: <20230520205547.1009254-9-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This is not proper: A .text section is SHT_PROGBITS, while the .dynamic section is SHT_DYNAMIC. Attempting to combine them like this creates a section type mismatch. It does seem that GNU ld does not complain, but LLVM's lld considers this an error. Signed-off-by: Sam Edwards Cc: Heinrich Schuchardt --- arch/arm/lib/elf_aarch64_efi.lds | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/lib/elf_aarch64_efi.lds b/arch/arm/lib/elf_aarch64_efi.lds index 5dd9809169..986f13936d 100644 --- a/arch/arm/lib/elf_aarch64_efi.lds +++ b/arch/arm/lib/elf_aarch64_efi.lds @@ -24,10 +24,9 @@ SECTIONS *(.gnu.linkonce.t.*) *(.srodata) *(.rodata*) - . = ALIGN(16); - *(.dynamic); . = ALIGN(512); } + .dynamic : { *(.dynamic) } .rela.dyn : { *(.rela.dyn) } .rela.plt : { *(.rela.plt) } .rela.got : { *(.rela.got) } From patchwork Sat May 20 20:55:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784184 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=l+6UGOGK; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKmd5fpNz20PV for ; Sun, 21 May 2023 22:35:29 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0A112857CF; Sun, 21 May 2023 14:33:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="l+6UGOGK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2417084780; Sat, 20 May 2023 22:56:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 58AB9847BD for ; Sat, 20 May 2023 22:56:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-64d2da69fdfso2709676b3a.0 for ; Sat, 20 May 2023 13:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616167; x=1687208167; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Zx9z5QFGwPVQBv1lsXC/s7kELhiNp8EKSQebZkMIJc4=; b=l+6UGOGK46A/v3qWoGaAfeUczmfaZ8hFeul4uycnWuBpAiQux94QeYLqXvIM9Z+Iqf 1tQVIol1pDl7u/QgjicQTOvCMqKk/NkNmJw8Mu29MJXvcfaur9oIOoIx7GTrwDm0BI20 D37+0bzoGwhmrcr2RgEfIJZVTMtAbTubCxwjA+FZ/KiWqnSO+gXjmhvLK2gdPsyva9EI Oqu0ad3gDBaDFIamkMOfYk4HUX5rojibndDbyibLp2yQ5Le7pIUZQCEeuoKAtJFs9j5e 4Mkxz5iK2XJ4B4yNCadgoFTXNWb5mCQGsdZneFyJRygUJ61/kkOo3r0zreZE6EahNHRj rR0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616167; x=1687208167; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zx9z5QFGwPVQBv1lsXC/s7kELhiNp8EKSQebZkMIJc4=; b=boUFeroEKFt4IbEsuzmQdp85J1c2wAi9qWwRi8C/SJntBo2frSCJoKV5j/4M1qkUBN MKgl2Umo7tG0POgvrzzSXkLpT9iudRjH1iDua+jeZB6eDIr9oc/zaCR4hAeiCgigDD5K p6FUnegN1D1otQcyjCIEb+8DHr9b3jnhcbNtWpByTNDMpGUfeKywMhND08JbzmRYhFsQ VUHsvn29VLflqhNwNeLM/OEDw0AYUoBaThxlY9RuskTB3+aXN/XWEQMAl7oZ5pQac7zs Q6PZlRwPzGawNYjXinHYAUiMf6LS5zw7UPxhKeWnML/MPSst4YfJA2Kcr+I7xp37+b73 A6zg== X-Gm-Message-State: AC+VfDyY1B8GMYU9Eg9iv1xfx9byN2CA3rcTnkRTS2BXVLActRemWCzT HYbThIh5buMm7fRaWjcrPRgUb12D3vLS8lbX X-Google-Smtp-Source: ACHHUZ6OrRXpSXAUggCvuD8vbaL3cZPvbp+PDnu6HfAMU/ZBGfH6Du1LpBoBNncLUxAEdGuVJkknMQ== X-Received: by 2002:a05:6a00:1803:b0:63a:ea82:b7b7 with SMTP id y3-20020a056a00180300b0063aea82b7b7mr7964771pfa.28.1684616167476; Sat, 20 May 2023 13:56:07 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.56.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:56:07 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Andrew Scull , Simon Glass , Tom Rini Subject: [RFC PATCH 09/10] arm: discard all .dyn* sections Date: Sat, 20 May 2023 14:55:46 -0600 Message-Id: <20230520205547.1009254-10-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This makes the output ELF friendlier to llvm-objcopy, which otherwise complains about discarding .dynsym when it's (potentially) referenced by .rel.dyn. Since u-boot doesn't actually make use of a dynamic linker, and these sections are only here because we're building --pie, it's best to discard what we don't need. Signed-off-by: Sam Edwards --- arch/arm/cpu/u-boot.lds | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index 8cdf08a730..bd4650bd86 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -235,10 +235,13 @@ SECTIONS */ /DISCARD/ : { *(.gnu.version*) } - .dynsym _image_binary_end : { *(.dynsym) } - .dynbss : { *(.dynbss) } - .dynstr : { *(.dynstr*) } - .dynamic : { *(.dynamic*) } + /* + * Not needed at runtime: relocations are done directly on .rel.dyn, + * and we're self-relocating so we don't need compatibility with an + * external dynamic linker. + */ + /DISCARD/ : { *(.dyn*) } + .plt : { *(.plt*) } .interp : { *(.interp*) } .gnu.hash : { *(.gnu.hash) } From patchwork Sat May 20 20:55:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 1784185 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=dQLJo3oY; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QPKms5xZWz20PV for ; Sun, 21 May 2023 22:35:41 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E6257857D2; Sun, 21 May 2023 14:33:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dQLJo3oY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7632F84707; Sat, 20 May 2023 22:56:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 27EE684704 for ; Sat, 20 May 2023 22:56:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=cfsworks@gmail.com Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-64d4e45971bso344051b3a.2 for ; Sat, 20 May 2023 13:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684616169; x=1687208169; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=npbOZTvo6CyEwEHfIYo9hmBWql3kBCjBmLI9n4EHqKA=; b=dQLJo3oYdoyQd42FL0Jme/wia1PAvM2tWTbg12jRzEGq8kX1w3gsghAlmt+W4aJyRq YTsJHl5U6DBu0HKfBtkc7kCBiP+w0ROKI0BYmrYMTVnhEurlO1oJWgR+YTBHjBOcSiXP DoXhZnuuwGjJb+JgWBpl5FqFZGSSZj1rxkUi3QiJyzWlbzeaLq10oke+4JPiudLV+tyN 8hD7lImh64yR4DG6gVET9dixfLqds+392JJnJ7q7EeSYiUaTN+SGrGtoxfGVAz6kcTQt 0D5FOeITo/Gsgg9I7Yt8VwXoVnk9TytDS1KghmiHkZWcDxXtsYo1OEeEg/7xaz1uGkW0 Jh+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684616169; x=1687208169; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=npbOZTvo6CyEwEHfIYo9hmBWql3kBCjBmLI9n4EHqKA=; b=LNScyRwBzEJWQZ0v1F7QoGYkPu+Eb/uUr6cj/hpNBl5CMrAEO9E/YYeiD9Zxnh0eIp ecnxfxBlBDRrzIBqpgyaPSGM2AXJoKlEnh/8bZfbW6FX21110rTwCFQFlTemJeqi+Tgd yR2uJJ1NXfAzwmxEXasvm3QqSBejmGI8ECGh2iD8IMc+BgMPCz+RMwVbzjATy5Y6dDJe osqIroQyP+J2JV7qG3DGF5zi2JBdKougzN281Wjut5mO/QOF2ubw8+XLsMA9NONWALuR x/9ur7YzwjhxssPY33c+8xLWN7akSApOWIFs9BX0KJJLY/9KDtk6EbMs2eaT6k3R7X+7 S47Q== X-Gm-Message-State: AC+VfDykYdITN5eliXgvddIqK7EO+9TDQnHu9AWVuKdo+v9JMDBo6Dnk 6IAyVJNLmZyf4bvdjuNozYgcQRZuX6W975iA X-Google-Smtp-Source: ACHHUZ5syJk9hk6DO5FOz837knXuuagSKHaj2Fm/TVePPpQ3yPguiqeOMrBbZyqfgLioWMwbxLKTUA== X-Received: by 2002:a05:6a00:a28:b0:625:efa4:4c01 with SMTP id p40-20020a056a000a2800b00625efa44c01mr8867414pfh.3.1684616169072; Sat, 20 May 2023 13:56:09 -0700 (PDT) Received: from celestia.nettie.lan (static-198-54-134-172.cust.tzulo.com. [198.54.134.172]) by smtp.gmail.com with ESMTPSA id j17-20020a62e911000000b0064d413caea6sm1651045pfh.179.2023.05.20.13.56.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 13:56:08 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: u-boot@lists.denx.de Cc: Sam Edwards , Albert ARIBAUD , Alper Nebi Yasak , Andrew Scull , Kever Yang , Michal Simek , Nathan Barrett-Morrison , Peng Fan , Philip Oberfichtner , Philipp Tomsich , Simon Glass , Tom Rini Subject: [RFC PATCH 10/10] arm: migrate away from sections.c Date: Sat, 20 May 2023 14:55:47 -0600 Message-Id: <20230520205547.1009254-11-CFSworks@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230520205547.1009254-1-CFSworks@gmail.com> References: <20230520205547.1009254-1-CFSworks@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 21 May 2023 14:33:27 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This patch effectively reverts 3ebd1cbc49f0005092d69cf0d9a6e64d7a1c300b. The approach taken in that commit was to have the section-marking symbols generated into empty sections by the compiler, for the linker script to include at the correct location. The rationale was that at the time, the linker considered linker-assigned symbols to be dynamic when they were in PIC (PIEs or shared libraries), which meant they were represented at runtime by a R_ARM_ABS32 relocation (by symbol name) rather than by M_ARM_RELATIVE. That commit landed in March 2013, but GNU ld later changed its behavior on 2016-02-23 to default linker-assigned symbols to dynamic only in shared libraries (not PIE), so this approach is unnecessary. I am removing it, because: 1) It required keeping sections.c in sync with multiple linker scripts. 2) It added complexity to the linker scripts, making them less readable. 3) It added unnecessary sections to the output, which can't be merged because the sections are sometimes of different types. 4) The linker may insert sections not explicitly named in the script somewhere between explicit sections; having the marker symbols outside of the sections they were marking meant the markers could end up with an unintended section inserted within that region. Signed-off-by: Sam Edwards Cc: Albert ARIBAUD --- arch/arm/cpu/armv8/spl_data.c | 4 +- arch/arm/cpu/armv8/u-boot-spl.lds | 26 +++---- arch/arm/cpu/armv8/u-boot.lds | 48 ++++--------- arch/arm/cpu/u-boot.lds | 88 +++++------------------- arch/arm/lib/Makefile | 2 - arch/arm/lib/sections.c | 36 ---------- arch/arm/mach-rockchip/u-boot-tpl-v8.lds | 26 ++----- arch/arm/mach-zynq/u-boot.lds | 73 ++++---------------- 8 files changed, 59 insertions(+), 244 deletions(-) delete mode 100644 arch/arm/lib/sections.c diff --git a/arch/arm/cpu/armv8/spl_data.c b/arch/arm/cpu/armv8/spl_data.c index 8f1231c86e..017b117183 100644 --- a/arch/arm/cpu/armv8/spl_data.c +++ b/arch/arm/cpu/armv8/spl_data.c @@ -6,8 +6,8 @@ #include #include -char __data_save_start[0] __section(".__data_save_start"); -char __data_save_end[0] __section(".__data_save_end"); +extern char __data_save_start[0]; +extern char __data_save_end[0]; u32 cold_reboot_flag = 1; diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds index 7cb9d73124..137113a823 100644 --- a/arch/arm/cpu/armv8/u-boot-spl.lds +++ b/arch/arm/cpu/armv8/u-boot-spl.lds @@ -40,9 +40,9 @@ SECTIONS #ifdef CONFIG_SPL_RECOVER_DATA_SECTION .data_save : { - *(.__data_save_start) + __data_save_start = .; . = SIZEOF(.data); - *(.__data_save_end) + __data_save_end = .; } >.sram #endif @@ -51,30 +51,20 @@ SECTIONS KEEP(*(SORT(__u_boot_list*))); } >.sram - .image_copy_end : { - . = ALIGN(8); - *(.__image_copy_end) - } >.sram + . = ALIGN(8); - .end : { - . = ALIGN(8); - *(.__end) - } >.sram + __image_copy_end = .; + _end = .; _image_binary_end = .; - .bss_start (NOLOAD) : { - . = ALIGN(8); - KEEP(*(.__bss_start)); - } >.sdram + . = ALIGN(8); .bss (NOLOAD) : { + __bss_start = .; *(.bss*) . = ALIGN(8); - } >.sdram - - .bss_end (NOLOAD) : { - KEEP(*(.__bss_end)); + __bss_end = .; } >.sdram /DISCARD/ : { *(.rela*) } diff --git a/arch/arm/cpu/armv8/u-boot.lds b/arch/arm/cpu/armv8/u-boot.lds index fb6a30c922..c14c3365a8 100644 --- a/arch/arm/cpu/armv8/u-boot.lds +++ b/arch/arm/cpu/armv8/u-boot.lds @@ -23,7 +23,7 @@ SECTIONS . = ALIGN(8); .text : { - *(.__image_copy_start) + __image_copy_start = .; CPUDIR/start.o (.text*) } @@ -42,13 +42,9 @@ SECTIONS } #ifdef CONFIG_ARMV8_PSCI - .__secure_start : #ifndef CONFIG_ARMV8_SECURE_BASE - ALIGN(CONSTANT(COMMONPAGESIZE)) + . = ALIGN(CONSTANT(COMMONPAGESIZE)); #endif - { - KEEP(*(.__secure_start)) - } #ifndef CONFIG_ARMV8_SECURE_BASE #define __ARMV8_SECURE_BASE @@ -57,8 +53,8 @@ SECTIONS #define __ARMV8_SECURE_BASE CONFIG_ARMV8_SECURE_BASE #endif .secure_text __ARMV8_SECURE_BASE : - AT(ADDR(.__secure_start) + SIZEOF(.__secure_start)) { + __secure_start = .; *(._secure.text) . = ALIGN(8); __secure_svc_tbl_start = .; @@ -79,23 +75,20 @@ SECTIONS AT(LOADADDR(.secure_data) + SIZEOF(.secure_data)) #endif { - KEEP(*(.__secure_stack_start)) + __secure_stack_start = .; . = . + CONFIG_ARMV8_PSCI_NR_CPUS * ARM_PSCI_STACK_SIZE; . = ALIGN(CONSTANT(COMMONPAGESIZE)); - KEEP(*(.__secure_stack_end)) + __secure_stack_end = .; } #ifndef __ARMV8_PSCI_STACK_IN_RAM . = LOADADDR(.secure_stack); #endif - .__secure_end : AT(ADDR(.__secure_end)) { - KEEP(*(.__secure_end)) - LONG(0x1d1071c); /* Must output something to reset LMA */ - } + __secure_end = .; #endif . = ALIGN(8); @@ -126,42 +119,25 @@ SECTIONS . = ALIGN(8); - .image_copy_end : - { - *(.__image_copy_end) - } + __image_copy_end = .; . = ALIGN(8); - .rel_dyn_start : - { - *(.__rel_dyn_start) - } - .rela.dyn : { + __rel_dyn_start = .; *(.rela*) - } - - .rel_dyn_end : - { - *(.__rel_dyn_end) + __rel_dyn_end = .; } _end = .; . = ALIGN(8); - .bss_start : { - KEEP(*(.__bss_start)); - } - .bss : { + __bss_start = .; *(.bss*) - . = ALIGN(8); - } - - .bss_end : { - KEEP(*(.__bss_end)); + . = ALIGN(8); + __bss_end = .; } /DISCARD/ : { *(.dynsym) } diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index bd4650bd86..f0e58f4d72 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -40,24 +40,18 @@ SECTIONS . = ALIGN(4); .text : { - *(.__image_copy_start) + __image_copy_start = .; *(.vectors) CPUDIR/start.o (.text*) } /* This needs to come before *(.text*) */ - .__efi_runtime_start : { - *(.__efi_runtime_start) - } - .efi_runtime : { + __efi_runtime_start = .; *(.text.efi_runtime*) *(.rodata.efi_runtime*) *(.data.efi_runtime*) - } - - .__efi_runtime_stop : { - *(.__efi_runtime_stop) + __efi_runtime_stop = .; } .text_rest : @@ -68,13 +62,9 @@ SECTIONS #ifdef CONFIG_ARMV7_NONSEC /* Align the secure section only if we're going to use it in situ */ - .__secure_start #ifndef CONFIG_ARMV7_SECURE_BASE - ALIGN(CONSTANT(COMMONPAGESIZE)) + . = ALIGN(CONSTANT(COMMONPAGESIZE)); #endif - : { - KEEP(*(.__secure_start)) - } #ifndef CONFIG_ARMV7_SECURE_BASE #define __ARMV7_SECURE_BASE @@ -84,8 +74,8 @@ SECTIONS #endif .secure_text __ARMV7_SECURE_BASE : - AT(ADDR(.__secure_start) + SIZEOF(.__secure_start)) { + __secure_start = .; *(._secure.text) } @@ -103,7 +93,7 @@ SECTIONS AT(LOADADDR(.secure_data) + SIZEOF(.secure_data)) #endif { - KEEP(*(.__secure_stack_start)) + __secure_stack_start = .; /* Skip addreses for stack */ . = . + CONFIG_ARMV7_PSCI_NR_CPUS * ARM_PSCI_STACK_SIZE; @@ -111,7 +101,7 @@ SECTIONS /* Align end of stack section to page boundary */ . = ALIGN(CONSTANT(COMMONPAGESIZE)); - KEEP(*(.__secure_stack_end)) + __secure_stack_end = .; #ifdef CONFIG_ARMV7_SECURE_MAX_SIZE /* @@ -133,7 +123,7 @@ SECTIONS #endif .__secure_end : AT(ADDR(.__secure_end)) { - *(.__secure_end) + __secure_end = .; LONG(0x1d1071c); /* Must output something to reset LMA */ } #endif @@ -146,58 +136,29 @@ SECTIONS *(.data*) } - . = ALIGN(4); - - . = .; - . = ALIGN(4); __u_boot_list : { KEEP(*(SORT(__u_boot_list*))); } . = ALIGN(4); - - .efi_runtime_rel_start : - { - *(.__efi_runtime_rel_start) - } - .efi_runtime_rel : { + __efi_runtime_rel_start = .; *(.rel*.efi_runtime) *(.rel*.efi_runtime.*) - } - - .efi_runtime_rel_stop : - { - *(.__efi_runtime_rel_stop) + __efi_runtime_rel_stop = .; } . = ALIGN(4); - - .image_copy_end : - { - *(.__image_copy_end) - } - - .rel_dyn_start : - { - *(.__rel_dyn_start) - } + __image_copy_end = .; .rel.dyn : { + __rel_dyn_start = .; *(.rel*) + __rel_dyn_end = .; } - .rel_dyn_end : - { - *(.__rel_dyn_end) - } - - .end : - { - *(.__end) - } - + _end = .; _image_binary_end = .; /* @@ -209,24 +170,11 @@ SECTIONS *(.mmutable) } -/* - * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c - * __bss_base and __bss_limit are for linker only (overlay ordering) - */ - - .bss_start __rel_dyn_start (OVERLAY) : { - KEEP(*(.__bss_start)); - __bss_base = .; - } - - .bss __bss_base (OVERLAY) : { + .bss : { + __bss_start = .; *(.bss*) - . = ALIGN(4); - __bss_limit = .; - } - - .bss_end __bss_limit (OVERLAY) : { - KEEP(*(.__bss_end)); + . = ALIGN(4); + __bss_end = .; } /* diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index d65dc33f5b..c77e2c1f4b 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -57,8 +57,6 @@ endif # obj-$(CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR) += save_prev_bl_data.o obj-y += bdinfo.o -obj-y += sections.o -CFLAGS_REMOVE_sections.o := $(LTO_CFLAGS) obj-y += stack.o ifdef CONFIG_CPU_V7M diff --git a/arch/arm/lib/sections.c b/arch/arm/lib/sections.c deleted file mode 100644 index 857879711c..0000000000 --- a/arch/arm/lib/sections.c +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright 2013 Albert ARIBAUD - */ -#include - -/** - * These two symbols are declared in a C file so that the linker - * uses R_ARM_RELATIVE relocation, rather than the R_ARM_ABS32 one - * it would use if the symbols were defined in the linker file. - * Using only R_ARM_RELATIVE relocation ensures that references to - * the symbols are correct after as well as before relocation. - * - * We need a 0-byte-size type for these symbols, and the compiler - * does not allow defining objects of C type 'void'. Using an empty - * struct is allowed by the compiler, but causes gcc versions 4.4 and - * below to complain about aliasing. Therefore we use the next best - * thing: zero-sized arrays, which are both 0-byte-size and exempt from - * aliasing warnings. - */ - -char __bss_start[0] __section(".__bss_start"); -char __bss_end[0] __section(".__bss_end"); -char __image_copy_start[0] __section(".__image_copy_start"); -char __image_copy_end[0] __section(".__image_copy_end"); -char __rel_dyn_start[0] __section(".__rel_dyn_start"); -char __rel_dyn_end[0] __section(".__rel_dyn_end"); -char __secure_start[0] __section(".__secure_start"); -char __secure_end[0] __section(".__secure_end"); -char __secure_stack_start[0] __section(".__secure_stack_start"); -char __secure_stack_end[0] __section(".__secure_stack_end"); -char __efi_runtime_start[0] __section(".__efi_runtime_start"); -char __efi_runtime_stop[0] __section(".__efi_runtime_stop"); -char __efi_runtime_rel_start[0] __section(".__efi_runtime_rel_start"); -char __efi_runtime_rel_stop[0] __section(".__efi_runtime_rel_stop"); -char _end[0] __section(".__end"); diff --git a/arch/arm/mach-rockchip/u-boot-tpl-v8.lds b/arch/arm/mach-rockchip/u-boot-tpl-v8.lds index 74618eba59..0cd6730533 100644 --- a/arch/arm/mach-rockchip/u-boot-tpl-v8.lds +++ b/arch/arm/mach-rockchip/u-boot-tpl-v8.lds @@ -24,7 +24,7 @@ SECTIONS .text : { . = ALIGN(8); - *(.__image_copy_start) + __image_copy_start = .; CPUDIR/start.o (.text*) *(.text*) } @@ -44,30 +44,16 @@ SECTIONS KEEP(*(SORT(__u_boot_list*))); } - .image_copy_end : { - . = ALIGN(8); - *(.__image_copy_end) - } - - .end : { - . = ALIGN(8); - *(.__end) - } + __image_copy_end = .; + _end = .; _image_binary_end = .; - .bss_start (NOLOAD) : { - . = ALIGN(8); - KEEP(*(.__bss_start)); - } - .bss (NOLOAD) : { + __bss_start = .; *(.bss*) - . = ALIGN(8); - } - - .bss_end (NOLOAD) : { - KEEP(*(.__bss_end)); + . = ALIGN(8); + __bss_end = .; } /DISCARD/ : { *(.dynsym) } diff --git a/arch/arm/mach-zynq/u-boot.lds b/arch/arm/mach-zynq/u-boot.lds index 3b7c9d515f..41d0b9471c 100644 --- a/arch/arm/mach-zynq/u-boot.lds +++ b/arch/arm/mach-zynq/u-boot.lds @@ -16,24 +16,18 @@ SECTIONS . = ALIGN(4); .text : { - *(.__image_copy_start) + __image_copy_start = .; *(.vectors) CPUDIR/start.o (.text*) } /* This needs to come before *(.text*) */ - .__efi_runtime_start : { - *(.__efi_runtime_start) - } - .efi_runtime : { + __efi_runtime_start = .; *(.text.efi_runtime*) *(.rodata.efi_runtime*) *(.data.efi_runtime*) - } - - .__efi_runtime_stop : { - *(.__efi_runtime_stop) + __efi_runtime_stop = .; } .text_rest : @@ -49,77 +43,36 @@ SECTIONS *(.data*) } - . = ALIGN(4); - - . = .; - . = ALIGN(4); __u_boot_list : { KEEP(*(SORT(__u_boot_list*))); } . = ALIGN(4); - - .efi_runtime_rel_start : - { - *(.__efi_runtime_rel_start) - } - .efi_runtime_rel : { + __efi_runtime_rel_start = .; *(.rel*.efi_runtime) *(.rel*.efi_runtime.*) - } - - .efi_runtime_rel_stop : - { - *(.__efi_runtime_rel_stop) + __efi_runtime_rel_stop = .; } . = ALIGN(8); - .image_copy_end : - { - *(.__image_copy_end) - } - - .rel_dyn_start : - { - *(.__rel_dyn_start) - } + __image_copy_end = .; .rel.dyn : { + __rel_dyn_start = .; *(.rel*) + __rel_dyn_end = .; } - .rel_dyn_end : - { - *(.__rel_dyn_end) - } - - .end : - { - *(.__end) - } - + _end = .; _image_binary_end = .; -/* - * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c - * __bss_base and __bss_limit are for linker only (overlay ordering) - */ - - .bss_start __rel_dyn_start (OVERLAY) : { - KEEP(*(.__bss_start)); - __bss_base = .; - } - - .bss __bss_base (OVERLAY) : { + .bss : { + __bss_start = .; *(.bss*) - . = ALIGN(8); - __bss_limit = .; - } - - .bss_end __bss_limit (OVERLAY) : { - KEEP(*(.__bss_end)); + . = ALIGN(8); + __bss_end = .; } /*