Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A42EEC43334 for ; Wed, 29 Jun 2022 07:06:53 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 67E8F8448C; Wed, 29 Jun 2022 09:06:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="WHgmnCEl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1297D84477; Wed, 29 Jun 2022 09:06:01 +0200 (CEST) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (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 27A658440C for ; Wed, 29 Jun 2022 09:05:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=joel.stan@gmail.com Received: by mail-pl1-x636.google.com with SMTP id x20so7643156plx.6 for ; Wed, 29 Jun 2022 00:05:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6EVJRX2LcWZPw6qlJdGS87uRZbV4x8LRNoL+E+1NkCI=; b=WHgmnCElD1eOtVPB9vSY6DwdWBRcdx+3DiRpgYB8hwqwm2INHeZcNKJrSBV6/f6boa /nuMLpYwybHzLI+vC9Cr3eZVzs/AwJuiYFnd8AzS0c8Yt0dNnxiOCZZwO493DPXW+B77 rnKFifgH8vzgWomlXgpdhV8b3ffDuIY7m9VDKBGSc6d1TpjMXMA4ReNAyIVyWnnMWeKr fzDweAsPO/yMnuzHl7o0nG9Cl9zt0wzIq+HjIRbr44lG6oQNINWVLfrkumB8sj5+QkIX z1QI6EMx9D4ssbL9ncT68M86u+v0DEFhXMlnxKKDTpzV8hIPDmAdQgGs0B133puWGgdE LqPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6EVJRX2LcWZPw6qlJdGS87uRZbV4x8LRNoL+E+1NkCI=; b=jIPijpxtjxiNRE4GSw+CtOzsWHknNfhm+nvNUMclrq6Ce3oUz31GX9a+72chH6ZjSc YqGslY0A5R11CzUfmri+xxiM64Eq0IccWxMQreKMFZrEuaLCDMGCGzo0B713ZmGyeFBk wrlgyWLvxgojgHs6p95tRWvT2YpK6GtN/+EPxpltFICVKtgn9H0hRex0/tfhU4r7/0Nt 0jX7qLSeukBzbWG6LlthVfv0NxAOVLEabRenxhGTBao8QPzxGN1ong/+yoEJklY4INT8 0z3NVRO8q0VNAG49zR3+WSW4oUlaaeDBIbNfz+vcbmEpUQjvzD2gseWoHpd7fxT/25Dt XR0A== X-Gm-Message-State: AJIora+Ce97+eRjmy7U8ykozlA2HPlfuU3Cw9UYFRTN9PqeibAHBxOsO H+uj8D/RQl7mErK5DN7Wc6fXdnHzP0I= X-Google-Smtp-Source: AGRyM1sOZha7JtSJ9nxcAWyhmnX0trukfnq7G56v1KG6elfpP3M1Vlgns04wmvGeEKoLwFRPMahrkQ== X-Received: by 2002:a17:902:ba83:b0:16a:2917:73de with SMTP id k3-20020a170902ba8300b0016a291773demr7667834pls.2.1656486355853; Wed, 29 Jun 2022 00:05:55 -0700 (PDT) Received: from voyager.lan ([45.124.203.18]) by smtp.gmail.com with ESMTPSA id g2-20020a170902d5c200b0015e8d4eb29csm10531451plh.230.2022.06.29.00.05.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jun 2022 00:05:55 -0700 (PDT) From: Joel Stanley To: u-boot@lists.denx.de, Ryan Chen , Chia-Wei Wang , BMC-SW@aspeedtech.com Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v2 6/7] aspeed/spl: Remove OVERLAY from linker script Date: Wed, 29 Jun 2022 16:35:24 +0930 Message-Id: <20220629070525.575426-7-joel@jms.id.au> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220629070525.575426-1-joel@jms.id.au> References: <20220629070525.575426-1-joel@jms.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.6 at phobos.denx.de X-Virus-Status: Clean The generic arm linker script contains this section: .bss __rel_dyn_start (OVERLAY) : { ... } The (OVERLAY) syntax in the description causes the .bss section to be included in the NOR area of the image: $ objdump -t -j .bss spl/u-boot-spl SYMBOL TABLE: 0000c61c l d .bss 00000000 .bss 0000c640 l O .bss 00000040 __value.0 0000c68c g O .bss 00000000 __bss_end 0000c61c g O .bss 00000000 __bss_start 0000c680 g O .bss 0000000c stdio_devices This is what the custom linker script tries to avoid, as the NOR area is read-only. Remove the OVERLAY syntax to fix the BSS location: $ objdump -t -j .bss spl/u-boot-spl SYMBOL TABLE: 83000000 l d .bss 00000000 .bss 83000000 l O .bss 00000040 __value.0 0000c61c g O .bss 00000000 __image_copy_end 8300004c g O .bss 00000000 __bss_end 83000000 g O .bss 00000000 __bss_start 83000040 g O .bss 0000000c stdio_devices This restores the state of the linker script before the patch that fixed the linker lists issue. Fixes: f6810b749f2e ("aspeed/ast2600: Fix SPL linker script") Signed-off-by: Joel Stanley --- I missed this in testing as I also had "image: fit: Use stack allocation macro" in my tree. The image now boots without that fix (and with it). I don't understand why __rel_dyn_start is included in the section name. I'm removing it to restore what was there before, however the image boots regardless of it's inclusion. arch/arm/mach-aspeed/ast2600/u-boot-spl.lds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-aspeed/ast2600/u-boot-spl.lds b/arch/arm/mach-aspeed/ast2600/u-boot-spl.lds index 95a509ba3f31..37f0ccd92201 100644 --- a/arch/arm/mach-aspeed/ast2600/u-boot-spl.lds +++ b/arch/arm/mach-aspeed/ast2600/u-boot-spl.lds @@ -68,7 +68,7 @@ SECTIONS _image_binary_end = .; - .bss __rel_dyn_start (OVERLAY) : { + .bss : { __bss_start = .; *(.bss*) . = ALIGN(4); -- 2.35.1