From patchwork Mon Mar 4 09:01:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 777734 Delivered-To: patch@linaro.org Received: by 2002:a5d:4b84:0:b0:33d:f458:43ce with SMTP id b4csp415144wrt; Mon, 4 Mar 2024 01:01:36 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUGhDQPrelfQNTnjajZoKYtcBYjrwo5Y5/YadH4U53IqqVWtfE1E3uDT9AlJRHoH0KNp95ED6M+3J2dkOOfOgiA X-Google-Smtp-Source: AGHT+IFJ/7Iby+eif+wSggNl7guz3kcylwZ60hHt862Xc7nrACgtT/gBqQUluURM4hJYVy0DSza8 X-Received: by 2002:a05:600c:3d94:b0:412:e1b5:2668 with SMTP id bi20-20020a05600c3d9400b00412e1b52668mr2153348wmb.15.1709542896361; Mon, 04 Mar 2024 01:01:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709542896; cv=none; d=google.com; s=arc-20160816; b=dLTQI4mvvKOW7J9zwkXgp2dmSykaWNNU9Y39lZBy3Vfh1VhmvWwQGe3uGCc1NF0OFn I1hzuVxlUijefMZwpyBgkaTVsiM09k0yjsMGPPDKzQOBoaTFSs6awjUKFP6+vjcZNGxy vgHYq1TIWhJ5mRsjf917RTdyOhyP+LJQsn1MufSoYBtjPNLD2ue9NXhCUF1XuNbN3di2 jYlbmcZy/T7bA6NiEG5LIiD4z7naURCMIVKVsZxlGF42bYOSQytWZuOUfnX9YonySnFv 0XFOktobQyDazbSEEmS2sPEpDAUP7TX43jWnG/AmqxXhiEwaZhen3VjTK3Ou8pK/ZoOz CBGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=axqi5l4Ztq3WiIi5s/5Po9WAHf/Ep2gUDdwyUWhnccw=; fh=h6c+xPqZoaZ+hxDehYH61okRtmJqZz06MxEejd36ji4=; b=gMWWGv2pECnSHIutN6cPBfdz1dWsNam1XClcVLbBuJwMaY82gS9R4JFKvjnjelzsM6 GWOraqr1PK1ahwadka3QpNReqZ1GWrXxepsE7XSb3Dj4UbStbJmv1ZLOmw/oUtYfYsOB 7h99LbWR8YRvXaRQWMPOJNql9jvGWcjnIPZmdSwGSAC8pnn2Ob5deXIvIpjypMeUXnoZ Var7dR2aLW2w+XyxzgKFykAMTRJbmYUaKUT2+p2Ls1Fxyh+kp1itA8/IrvMl3h3YNVga tiMy4ghK5A6GSzBbzyVt0XPTNPRRTiR4nlTHFbxEp6OTT5j8bmNubQ09rQ3yT53bC2sD 0K8g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="HBRPtcP/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id t5-20020adfe445000000b0033d6eb5bc03si5292914wrm.903.2024.03.04.01.01.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:01:36 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="HBRPtcP/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1942487F6F; Mon, 4 Mar 2024 10:01:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="HBRPtcP/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E32EC87F28; Mon, 4 Mar 2024 10:01:26 +0100 (CET) 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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 C864686FCE for ; Mon, 4 Mar 2024 10:01:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-412e72b0d96so1328405e9.0 for ; Mon, 04 Mar 2024 01:01:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709542881; x=1710147681; darn=lists.denx.de; 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=axqi5l4Ztq3WiIi5s/5Po9WAHf/Ep2gUDdwyUWhnccw=; b=HBRPtcP/RjSUwGW3LFJALF+sSXASy1gxf5HZKrtGOCWjCVNOUqN4QRLoTCtrM7Qe6u HrbuD/l8YxeexkFVSzseqvpNINS6SgyAqaVT9qW1uP+hK+IRJy1f0huhVaFxZXqy5czN 48tuYfaMVzBseqB1Zu5IatJzS0VIogCCvDbK6LMqZuVZI57dqxH4Gvgz5PABtMUUgO/x iInuWwBAJZSSvC/u9EhuO/4Pcx4C74Q3ujCB6fs9zB2tBlTofr4CQWfvBspj1rqcgo+3 DTgs+oppyRF4lbU4vJzGhM2F/lBsOf7P88t59d+nhudNHnHd5OIXRBVinHUaaKFL8xD4 kG1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709542881; x=1710147681; 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=axqi5l4Ztq3WiIi5s/5Po9WAHf/Ep2gUDdwyUWhnccw=; b=GQnFnOWOswR6onGHT4shHDaqhR9AThWely4/KOmpO6w5NJ4UuNBxPSH0H74vZXuWqb IRaq4Pc3YhPCqVDDUQjjd7HlsoRkxp3vox/BPAv4pD1FOPw7xGwwD2A6jaAee2u7GOOP CLHxPsRurhJrsipkepaNcvxAUGs/6nouxYL2OMYAEV1r5IIa5AkpnY1+Di9Rfv0UmUs1 PqJO0Me6eiVFN4o29q4lrIN3G9fTx6KUqgPBonE2V9x9Cpi1Zz4ZVaMhvlzmnS0EGC9M D3y6kiR+5ClxYABtStRw25NnU869+i3sZcEawg0IjdPDhun49J3boB1RG6yVpAPtEPFQ Nd6Q== X-Gm-Message-State: AOJu0YxI/+Nh5HdtmRHY6orKtEcY3AJ4gfEQljKgDkq78tLic8fea0DQ 8PHMt/bbWHeMqMixXKcS0kU0Ae3aAz5LnaBKAQ0yE1AmyqIq+nxEThijr6cMzv8jBSF6xOcVc+4 jaWI= X-Received: by 2002:a05:600c:4451:b0:412:e65a:a20 with SMTP id v17-20020a05600c445100b00412e65a0a20mr654546wmn.13.1709542881221; Mon, 04 Mar 2024 01:01:21 -0800 (PST) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id t11-20020a05600c198b00b00412c8117a34sm10281167wmq.47.2024.03.04.01.01.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:01:20 -0800 (PST) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, Ilias Apalodimas , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Shiji Yang , Bin Meng Subject: [PATCH 1/6] arm: baltos: remove custom linker script Date: Mon, 4 Mar 2024 11:01:06 +0200 Message-Id: <20240304090113.1410575-2-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> References: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 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 commit 3d74a0977f514 ("ti: am335x: Remove unused linker script") removed the linker script for the TI variant. This linker script doesn't seem to do anything special and on top of that, has no definitions for the EFI runtime sections. So let's get rid of it and use the generic linker script which defines those correctly Signed-off-by: Ilias Apalodimas Reviewed-by: Tom Rini --- board/vscom/baltos/u-boot.lds | 128 ---------------------------------- 1 file changed, 128 deletions(-) delete mode 100644 board/vscom/baltos/u-boot.lds diff --git a/board/vscom/baltos/u-boot.lds b/board/vscom/baltos/u-boot.lds deleted file mode 100644 index cb2ee6769753..000000000000 --- a/board/vscom/baltos/u-boot.lds +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 2004-2008 Texas Instruments - * - * (C) Copyright 2002 - * Gary Jennejohn, DENX Software Engineering, - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(_start) -SECTIONS -{ - . = 0x00000000; - - . = ALIGN(4); - .text : - { - *(.__image_copy_start) - *(.vectors) - CPUDIR/start.o (.text*) - board/vscom/baltos/built-in.o (.text*) - *(.text*) - } - - . = ALIGN(4); - .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } - - . = ALIGN(4); - .data : { - *(.data*) - } - - . = ALIGN(4); - - . = .; - - . = ALIGN(4); - __u_boot_list : { - KEEP(*(SORT(__u_boot_list*))); - } - - . = ALIGN(4); - - .image_copy_end : - { - *(.__image_copy_end) - } - - .rel_dyn_start : - { - *(.__rel_dyn_start) - } - - .rel.dyn : { - *(.rel*) - } - - .rel_dyn_end : - { - *(.__rel_dyn_end) - } - - .hash : { *(.hash*) } - - .end : - { - *(.__end) - } - - _image_binary_end = .; - - /* - * Deprecated: this MMU section is used by pxa at present but - * should not be used by new boards/CPUs. - */ - . = ALIGN(4096); - .mmutable : { - *(.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*) - . = ALIGN(4); - __bss_limit = .; - } - - .bss_end __bss_limit (OVERLAY) : { - KEEP(*(.__bss_end)); - } - - .dynsym _image_binary_end : { *(.dynsym) } - .dynbss : { *(.dynbss) } - .dynstr : { *(.dynstr*) } - .dynamic : { *(.dynamic*) } - .gnu.hash : { *(.gnu.hash) } - .plt : { *(.plt*) } - .interp : { *(.interp*) } - .gnu : { *(.gnu*) } - .ARM.exidx : { *(.ARM.exidx*) } -} From patchwork Mon Mar 4 09:01:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 777735 Delivered-To: patch@linaro.org Received: by 2002:a5d:4b84:0:b0:33d:f458:43ce with SMTP id b4csp415250wrt; Mon, 4 Mar 2024 01:01:52 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUxHSvawjLZNO7eOteYW+Tvns5h1fC5ItQ4pBvfqTj7Ex21JPe3LhQ5X+V21A2rUunNzjs4iQcEeSpb9YQ1wpVa X-Google-Smtp-Source: AGHT+IFZuzyzmBLToZUhbVRQ1Z9gwGEwRKjkh+JPI7/4OGivOLqELYQ8ps9wPjtVterOxzlOh2fd X-Received: by 2002:a05:600c:4508:b0:412:c930:e055 with SMTP id t8-20020a05600c450800b00412c930e055mr6706137wmo.41.1709542912051; Mon, 04 Mar 2024 01:01:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709542912; cv=none; d=google.com; s=arc-20160816; b=SAWwjVFxbI5aXlCDN1XMhE1rv9EZg4rxr4pwAfkOA1G1M9/NmdpQmJw9+ZHEuGFue7 GtavyNDkgJgD7kbs0M4YRe8d4uMXLoeXzTI7rURWAzVoStJHhUUFhru7Nc5JOqzzLpBu GQkgZ1ulI6Tu4aIc3sBTrxCzdxtc9FS4M2M7PbhUFGQzouhLVVV3IRcQAh/LTFQmHGtS Uwc0ZZQ4gZEIwcm8Zmxxs0pRuRiYYgaZJNLlFuEc1NFLuEPyveqgg5ikU7IEnreaKNMm sz1F/6BdMdxiKrPdlQwhncx9RLKo6J6ujb2AkfJi6CTG4BmRejtoXh2KWz4Er8xF0nVL yZ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oZqVrolZtjKa0HX67bS1C989QteOSIVgzjajjrEykwY=; fh=h6c+xPqZoaZ+hxDehYH61okRtmJqZz06MxEejd36ji4=; b=iBSMryiaN7ilWWpR+9ONP8LuCB0SffgjLCfd+27cz8SCA+ZtNx0lWASuyOid5kzXbt ED5/U0lb7OY8OsoxvBRC9W8BwQhVwu5UKfo17kAkeE8X6udO7AaAOW8hw+kuVPlF601G Xs2NZVZIJpdehxOwJRNHFM/tbXl9GEJ7mnGpXivRABDB70O3FfOfjcNffKa36tVYfv09 frBIXSOPrkat3it4tjiFhbA/FnmvgIraYd3c78UAHXe0+Qa1YBY/3lIUf8yaocUJSFba X1nbUOSme02j/DRDc+rSwXo8ruDrt+usrnrjUwkYAL5e4I0r+EMTG8/9plS/PR6q5NKB /zuw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oS5Ezkkb; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id fj9-20020a05600c0c8900b00412e4282ab0si665567wmb.141.2024.03.04.01.01.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:01:52 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oS5Ezkkb; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3B1C987F64; Mon, 4 Mar 2024 10:01:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="oS5Ezkkb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8208187DAB; Mon, 4 Mar 2024 10:01:33 +0100 (CET) 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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 F321787DAB for ; Mon, 4 Mar 2024 10:01:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-412d501fb96so12006445e9.0 for ; Mon, 04 Mar 2024 01:01:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709542885; x=1710147685; darn=lists.denx.de; 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=oZqVrolZtjKa0HX67bS1C989QteOSIVgzjajjrEykwY=; b=oS5EzkkbwWtF0Rn0CUPXI1j+PYF1tV6m/6aVueQUCsT5mvN1J/8fAFAbpcT+teHjF0 kpo1o62maU544IF82i9I3gWEp3YnlC3piPLxnC7IxIxo1ZoEvA0FT0xEIwdHZT212RKn AFRKdCfjOu2x1NsIBJDtX+8rIlSGytiqRo+JbDWfFZaEuCxRONb40ht2/B8aS1mmZ7Zk t0Jl7Xy5iyJYffrakgPpn8mScisw9yqGHkO5ilHjKInRvYtLrnYunWDfsgkqSfdj9zYV Qfx+d4O8Bz6czvd/rBcnKMVaO6f9cj1W40d7231QmUPs5aGwdjzQF3esPU78nulpEa9T +m7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709542885; x=1710147685; 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=oZqVrolZtjKa0HX67bS1C989QteOSIVgzjajjrEykwY=; b=ZiniL+rU/X6Rsl9njLLzxlCpFj1T+Hj4VzZZWGIfPRjzOkio3d++dCS5cVa9c5s5U8 VR3WGmUddqe+XFr4tPIhHpU9Sxch8R21SDKFGKNHkFxcCQKE4QzokZkcBWqqjcEa6UFG h4h+hpwTW7PbqNI8Ia72jeGXTtMkEkPi6Wve5ZAE3/qfAwY1BFoMXETeo9kWX7KX+qGL RjKZLtkxfn0HLKdSRpN0AxX7bLGBGMLsqBhNfZHNXNwSMp17iFpsUKs+bkhwWuKKdR7e 1/lkeFMlgmF+vvKlPMATkvqCFZS0HicYbQSS26BGQKb5q1KZtTpMoJJUmnCRPEw2AU9H UqgQ== X-Gm-Message-State: AOJu0YzC6a3dF4Z2LZDLO5y9zf1Hewah/ZjkzfR2ZWS0oJY70WERBrD6 nJS34jC/duJtgF3POoFCKvrDP+J0T1r1+OReooABIgNCP1soQomxuDQd5LJtnzSGUSYAibKpRlB Vpc0= X-Received: by 2002:a05:600c:538b:b0:412:b8db:2fd9 with SMTP id hg11-20020a05600c538b00b00412b8db2fd9mr6457876wmb.9.1709542885353; Mon, 04 Mar 2024 01:01:25 -0800 (PST) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id t11-20020a05600c198b00b00412c8117a34sm10281167wmq.47.2024.03.04.01.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:01:24 -0800 (PST) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, Ilias Apalodimas , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Shiji Yang , Bin Meng Subject: [PATCH 2/6] arm: clean up v7 and v8 linker scripts for bss_start/end Date: Mon, 4 Mar 2024 11:01:07 +0200 Message-Id: <20240304090113.1410575-3-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> References: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 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 commit 3ebd1cbc49f0 ("arm: make __bss_start and __bss_end__ compiler-generated") and commit f84a7b8f54db ("ARM: Fix __bss_start and __bss_end in linker scripts") were moving the bss_start/end on c generated variables that were injected in their own sections. The reason was that we needed relative relocations for position independent code and linker bugs back then prevented us from doing so. However, the linker documentation pages states that symbols that are defined within a section definition will create a relocatable type with the value being a fixed offset from the base of a section. This have been fixed since 2016 [1]. So let's start cleaning this up starting with the bss_start and bss_end variables. Convert them into symbols within the .bss section definition. [0] https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC13 [1] commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object") Signed-off-by: Ilias Apalodimas Tested-by: Caleb Connolly # Qualcomm sdm845 --- arch/arm/cpu/armv8/u-boot-spl.lds | 14 +++----------- arch/arm/cpu/armv8/u-boot.lds | 15 +++------------ arch/arm/cpu/u-boot.lds | 22 ++++------------------ arch/arm/lib/sections.c | 2 -- arch/arm/mach-rockchip/u-boot-tpl-v8.lds | 14 +++----------- arch/arm/mach-zynq/u-boot.lds | 21 +++------------------ 6 files changed, 16 insertions(+), 72 deletions(-) diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds index 7cb9d731246d..16fddb46e9cb 100644 --- a/arch/arm/cpu/armv8/u-boot-spl.lds +++ b/arch/arm/cpu/armv8/u-boot-spl.lds @@ -63,18 +63,10 @@ SECTIONS _image_binary_end = .; - .bss_start (NOLOAD) : { - . = ALIGN(8); - KEEP(*(.__bss_start)); - } >.sdram - - .bss (NOLOAD) : { + .bss : { + __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 fb6a30c922f7..c4ee10ebc3ff 100644 --- a/arch/arm/cpu/armv8/u-boot.lds +++ b/arch/arm/cpu/armv8/u-boot.lds @@ -149,19 +149,10 @@ SECTIONS _end = .; - . = ALIGN(8); - - .bss_start : { - KEEP(*(.__bss_start)); - } - - .bss : { + .bss ALIGN(8): { + __bss_start = .; *(.bss*) - . = ALIGN(8); - } - - .bss_end : { - KEEP(*(.__bss_end)); + __bss_end = .; } /DISCARD/ : { *(.dynsym) } diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index 7724c9332c3b..90d329b1ebe0 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -206,27 +206,13 @@ 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 ALIGN(4): { + __bss_start = .; *(.bss*) - . = ALIGN(4); - __bss_limit = .; - } - - .bss_end __bss_limit (OVERLAY) : { - KEEP(*(.__bss_end)); + __bss_end = .; } - .dynsym _image_binary_end : { *(.dynsym) } + .dynsym : { *(.dynsym) } .dynbss : { *(.dynbss) } .dynstr : { *(.dynstr*) } .dynamic : { *(.dynamic*) } diff --git a/arch/arm/lib/sections.c b/arch/arm/lib/sections.c index 857879711c6a..8e8bd5797e16 100644 --- a/arch/arm/lib/sections.c +++ b/arch/arm/lib/sections.c @@ -19,8 +19,6 @@ * 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"); diff --git a/arch/arm/mach-rockchip/u-boot-tpl-v8.lds b/arch/arm/mach-rockchip/u-boot-tpl-v8.lds index 74618eba591b..b7887194026e 100644 --- a/arch/arm/mach-rockchip/u-boot-tpl-v8.lds +++ b/arch/arm/mach-rockchip/u-boot-tpl-v8.lds @@ -56,18 +56,10 @@ SECTIONS _image_binary_end = .; - .bss_start (NOLOAD) : { - . = ALIGN(8); - KEEP(*(.__bss_start)); - } - - .bss (NOLOAD) : { + .bss ALIGN(8) : { + __bss_start = .; *(.bss*) - . = ALIGN(8); - } - - .bss_end (NOLOAD) : { - KEEP(*(.__bss_end)); + __bss_end = .; } /DISCARD/ : { *(.dynsym) } diff --git a/arch/arm/mach-zynq/u-boot.lds b/arch/arm/mach-zynq/u-boot.lds index 3b7c9d515f8b..8d3259821719 100644 --- a/arch/arm/mach-zynq/u-boot.lds +++ b/arch/arm/mach-zynq/u-boot.lds @@ -102,26 +102,11 @@ SECTIONS _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 ALIGN(4): { + __bss_start = .; *(.bss*) - . = ALIGN(8); - __bss_limit = .; - } - - .bss_end __bss_limit (OVERLAY) : { - KEEP(*(.__bss_end)); + __bss_end = .; } - /* * Zynq needs to discard these sections because the user * is expected to pass this image on to tools for boot.bin From patchwork Mon Mar 4 09:01:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 777737 Delivered-To: patch@linaro.org Received: by 2002:a5d:4b84:0:b0:33d:f458:43ce with SMTP id b4csp415565wrt; Mon, 4 Mar 2024 01:02:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXE+0/8RzBd/p/NC3XK6Ja0+iKglL4eo04/hxoWJDj4uCeb48pisotyOL3Xi51w3uHBjCvXnLgD3Ms+DUK96ioN X-Google-Smtp-Source: AGHT+IH4U7wf3ctkapS9auombyaBvHTJkyYbEx+1OkqgvQIifUp5c94/B5c0oaR65JrKHhD59ktL X-Received: by 2002:a05:600c:1e26:b0:412:e55a:7503 with SMTP id ay38-20020a05600c1e2600b00412e55a7503mr875219wmb.25.1709542954659; Mon, 04 Mar 2024 01:02:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709542954; cv=none; d=google.com; s=arc-20160816; b=bn79eaGuD6Y4jI4V3p3Ifqr4O41QzJgU68nMoi2jf9KSATTlz8oxYF3UBhrR3qqrIv zlpwv1ojF04D9v+r2h9I6mwGiroGX0vmuoHNn63g1cxVDSw/2OlXmLoYyTGYqdXiYVJq AxoCO9wGCTsn3HywszieylclKDZ8rDOO5LGl04t6vi6mI1KaWSvjVC2jBpBWFVL2uL91 kSjob2p81KIFYCL3j/9aMAkig4pzLD7AA8E/IVdmL0S8rRqKhuaNjfWSp1HFIByQj8Go A7pkfO5OjcaA2rantgwnOjS4KZpUsO6HiMdMA31mr6J6BYcphrCvosxPPDRQQGPiff77 FtdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uCjEZk+hn7YNvUHPw/I6m4Ni9W92nQmew7vxuOthRyA=; fh=h6c+xPqZoaZ+hxDehYH61okRtmJqZz06MxEejd36ji4=; b=m9zALETiVMGNkq1nmSAtSGS4J4tIzMjH8Yvr5Vjx2utfDwUUUqe5N+8cJG2jczk75p TkcP9Ln6PtO2LK7/OM1yvcVk8mQWC75qAJWcJQ9GZVVSXXK8fJxASJ6CPvcFnlTryXgy V8c10V3QS3/pf2Oia2B8+cuYlhXLaMuIOqkphN0FVjMn7OrtGnA2lG/e5Bad82fBqI/M UsAN3UoQ3NPBUwzcXGVqct/H1Yp2lb+w18NRlkSMEZ2TCrK1JwlTSd+qduja8BClGNok Sge1It99Mx79KRH31PgS00ZeOc8AWwTi6/UfaOYKWKGPKfnf+Lxv8kuAP+5m4oZr21Fg aA0Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="F/srCyH8"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id g15-20020a05600c310f00b00412768552aesi5321114wmo.53.2024.03.04.01.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:02:34 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="F/srCyH8"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A825587DAB; Mon, 4 Mar 2024 10:01:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="F/srCyH8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3DBD786FCE; Mon, 4 Mar 2024 10:01:39 +0100 (CET) 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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (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 02EC587DB7 for ; Mon, 4 Mar 2024 10:01:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-412de18edcaso6959155e9.3 for ; Mon, 04 Mar 2024 01:01:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709542889; x=1710147689; darn=lists.denx.de; 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=uCjEZk+hn7YNvUHPw/I6m4Ni9W92nQmew7vxuOthRyA=; b=F/srCyH8fTcinHhSPgmUsvHmcyHxTdaRUW1Regp2yG7Fcs2eI+dNvyLpVPPg67AKxc olPogIpWkkvH3RdUDKTVkIcapqdPEoUTO40sXDfcubhWb3wWa5BZtItKCwyNJK0ojP4E jYk+KRRnWzZyMqLpeB3TLjGfopK3JEbksPuUkqGycfjsMHsjGh7gfo2ayNuGXsv/w4ZA Qpu+kD7B1Z8ivwhxJkREQ+PhMTBR2jYtKv04/+mSvjiVZsbjBfaK864RjdCYu4H64/mJ h2Jorm48L6xT0H/TBn8B7T5p32BJ4HJrc3H1nAiVwZ0mZLEGEW2W4zLKPGkTr97UX16Z SftQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709542889; x=1710147689; 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=uCjEZk+hn7YNvUHPw/I6m4Ni9W92nQmew7vxuOthRyA=; b=cZ6YD65M/L4f3m90nJVAUk//OmqdGj1PRDo3DoECfXNAYwpDiCkyvHf7bA0Ueq1Gfa ll7ALZX28w32EPcb9FXjyObC14op5aA5/9JcA5NjwqmymGnces6Ws+wzI7u+qHU3OE5s HIcG5YZM3PQwAUqXMpNPUNxngiZ2WU3saDxRUM+gli5XH1bjenwh2H6VRQWT362JIPSR EHKeV5PUtZa2xB1ZgFhvzGdxv1DCuk6QvKiMBlXJI6MykLfXwT6ebxFhSMcuhzOaBGhd 6dsLMuVyq4FnQAdqG/NnDJt4jy0ufIbVDnNDwAiWbGERwREj8EBI5r/Xe8+Im3aSgZ6y tkmg== X-Gm-Message-State: AOJu0Yzwv9XZEzlcXIch8OYZxvO0+pxykHSkcdeDG3n6KbQu1++49PQV NJPCDFHwF88r5b2MW8PeaC8D06p8hW9/9famTI1SNdf0a/fYDQIT66d15xOtHZFSz4OaUb2m/KO Ask0= X-Received: by 2002:a05:600c:474e:b0:412:c2a3:4431 with SMTP id w14-20020a05600c474e00b00412c2a34431mr6750780wmo.14.1709542889369; Mon, 04 Mar 2024 01:01:29 -0800 (PST) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id t11-20020a05600c198b00b00412c8117a34sm10281167wmq.47.2024.03.04.01.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:01:29 -0800 (PST) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, Ilias Apalodimas , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Shiji Yang , Bin Meng Subject: [PATCH 3/6] arm: fix __efi_runtime_rel_start/end definitions Date: Mon, 4 Mar 2024 11:01:08 +0200 Message-Id: <20240304090113.1410575-4-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> References: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 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 __efi_runtime_rel_start/end are defined as c variables for arm7 only in order to force the compiler emit relative references. However, defining those within a section definition will do the same thing. On top of that the v8 linker scripts define it as a symbol. So let's remove the special sections from the linker scripts, the variable definitions from sections.c and define them as a symbols within the correct section. Signed-off-by: Ilias Apalodimas Reviewed-by: Sam Edwards Tested-by: Sam Edwards # Binary output identical --- arch/arm/cpu/armv8/u-boot.lds | 4 +--- arch/arm/cpu/u-boot.lds | 16 +++------------- arch/arm/lib/sections.c | 2 -- arch/arm/mach-zynq/u-boot.lds | 16 +++------------- include/asm-generic/sections.h | 2 ++ lib/efi_loader/efi_runtime.c | 1 + 6 files changed, 10 insertions(+), 31 deletions(-) diff --git a/arch/arm/cpu/armv8/u-boot.lds b/arch/arm/cpu/armv8/u-boot.lds index c4ee10ebc3ff..eccb116d3cfa 100644 --- a/arch/arm/cpu/armv8/u-boot.lds +++ b/arch/arm/cpu/armv8/u-boot.lds @@ -115,9 +115,7 @@ SECTIONS KEEP(*(SORT(__u_boot_list*))); } - . = ALIGN(8); - - .efi_runtime_rel : { + .efi_runtime_rel ALIGN(8) : { __efi_runtime_rel_start = .; *(.rel*.efi_runtime) *(.rel*.efi_runtime.*) diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index 90d329b1ebe0..70e78ce46672 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -152,21 +152,11 @@ SECTIONS KEEP(*(SORT(__u_boot_list*))); } - . = ALIGN(4); - - .efi_runtime_rel_start : - { - *(.__efi_runtime_rel_start) - } - - .efi_runtime_rel : { + .efi_runtime_rel ALIGN(4) : { + __efi_runtime_rel_start = .; *(.rel*.efi_runtime) *(.rel*.efi_runtime.*) - } - - .efi_runtime_rel_stop : - { - *(.__efi_runtime_rel_stop) + __efi_runtime_rel_stop = .; } . = ALIGN(4); diff --git a/arch/arm/lib/sections.c b/arch/arm/lib/sections.c index 8e8bd5797e16..ddfde52163fc 100644 --- a/arch/arm/lib/sections.c +++ b/arch/arm/lib/sections.c @@ -29,6 +29,4 @@ 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-zynq/u-boot.lds b/arch/arm/mach-zynq/u-boot.lds index 8d3259821719..66a9e37f9198 100644 --- a/arch/arm/mach-zynq/u-boot.lds +++ b/arch/arm/mach-zynq/u-boot.lds @@ -58,21 +58,11 @@ SECTIONS KEEP(*(SORT(__u_boot_list*))); } - . = ALIGN(4); - - .efi_runtime_rel_start : - { - *(.__efi_runtime_rel_start) - } - - .efi_runtime_rel : { + .efi_runtime_rel ALIGN(4) : { + __efi_runtime_rel_start = .; *(.rel*.efi_runtime) *(.rel*.efi_runtime.*) - } - - .efi_runtime_rel_stop : - { - *(.__efi_runtime_rel_stop) + __efi_runtime_rel_stop = .; } . = ALIGN(8); diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 1e1657a01673..60949200dd93 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h @@ -34,6 +34,8 @@ extern char __priv_data_start[], __priv_data_end[]; /* Start and end of .ctors section - used for constructor calls. */ extern char __ctors_start[], __ctors_end[]; +extern char __efi_runtime_rel_start[], __efi_runtime_rel_stop[]; + /* function descriptor handling (if any). Override * in asm/sections.h */ #ifndef dereference_function_descriptor diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index 18da6892e796..9185f1894c47 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -15,6 +15,7 @@ #include #include #include +#include /* For manual relocation support */ DECLARE_GLOBAL_DATA_PTR; From patchwork Mon Mar 4 09:01:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 777736 Delivered-To: patch@linaro.org Received: by 2002:a5d:4b84:0:b0:33d:f458:43ce with SMTP id b4csp415457wrt; Mon, 4 Mar 2024 01:02:18 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU8mMjDhoQEOzAV9GuUbGzEyv6XySII2vShXJP1KccQy50ksc4Nd9dxIXUUeITSUyEiNupLUMpk8X0Rue5qLY85 X-Google-Smtp-Source: AGHT+IEyf+yy5SWLfJ+8VuXIdXJtgwwXusyvwG+tv/QiX+HJweo7TmLmHc+i/zDO6uQkEiwfvSdh X-Received: by 2002:a5d:4242:0:b0:33d:b0c6:433c with SMTP id s2-20020a5d4242000000b0033db0c6433cmr6001537wrr.53.1709542938395; Mon, 04 Mar 2024 01:02:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709542938; cv=none; d=google.com; s=arc-20160816; b=0mU5pjCwVs9sDoXl8x50c6DQmWPS7D2y9cNmU6/GXkBBZL7glBC4NB+K7iR5fwkHz/ MTz+27JA40nKCA1i/4q6/gwOx2p/Mh+mgt4OD7YbuX+j3HZxpWhH1d9Em3N2H7UHNawl CT5wVTfjHk1zk7Sbig8Uhwv+wdRcHSkzXymmRP9i6cNh+qcscpbJ9/OHA5XkMs4Qx3er 1H+81Y14wm5YhC+rp+K3TxnJMWKO9pDTp24LjGBdoTS3HxVVX8sL2edG5oozIFN/V2fQ 3/5Mmqrsl+pkrifO5ahLmQE5msJkdhrQNspTHsiFZm7WDWnOTjKr5MahR6cZSTcMOec4 6JcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=miWJzpqurM+VmlP/r9jZ19udSDm22BVr4HHLpQPkrYQ=; fh=h6c+xPqZoaZ+hxDehYH61okRtmJqZz06MxEejd36ji4=; b=EdOxC7LdG9KqTQgS8MZYXMxHQIRfBtLtQPwbRNoH40N0u0Nfax9RNLNejAaX9aCK4P 45ZSwzAr6SSbMOlxNhGKqYZm+DgjIamsgFohGg1hymjxNyWNqThtiq66m/60IbxG2XNy ampDFSAKBZ8+Icz/FOIqJECRUT6h7xiQFnG4Y8rGP8K8BbY65iIo46q4k0471NIDoyuj xApc4gkC6kTHalWVRwPPJg6u3MgSwm0N/rRba++Mb5+GI4hLGROr+g1oljQU3/baxHri WxOGficLx25H0bUhsj/vX1j9wH91MEQLgWRvpRW7YOelwibNIqj8NTHT6nbonBPlrvyp je2A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LUyOtNj8; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id o10-20020a5d58ca000000b0033e02035febsi5017480wrf.217.2024.03.04.01.02.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:02:18 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LUyOtNj8; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AA37D87F92; Mon, 4 Mar 2024 10:01:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="LUyOtNj8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 51C7887F6E; Mon, 4 Mar 2024 10:01:40 +0100 (CET) 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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (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 C0CB187F28 for ; Mon, 4 Mar 2024 10:01:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5133bd7eb47so1865389e87.3 for ; Mon, 04 Mar 2024 01:01:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709542894; x=1710147694; darn=lists.denx.de; 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=miWJzpqurM+VmlP/r9jZ19udSDm22BVr4HHLpQPkrYQ=; b=LUyOtNj8mcr+YekZL19byosEjBatYmtkSvhFXOIFEJ0mQOgfjjABxvXBoSl1rTaZXD ZiJ0wr88dHqbXQgQZ5KRE5lJnMAxgR4nIYID600Vqb003/xfuvz/PKa1uFZO9Ocwfkdw mY3UYu4jp/i8v5ehStrO6xyXV4Ppv46WsxBXeUEI/bTQqcnuZXO2LmPNRI/rCSG9Hn9P 5mVD/2PLsPFXqcFJOPqCovukqZfDf8sHCIR+NUXkRyl1CU5js7CrJcpxsWTzbg1Luwr/ TXTLVuIZGm4e1dN15ttoZQp8MyxchB9XimQR7uuvp3NVUoJl4I5F+zma+w8eTuQQrMLu cH+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709542894; x=1710147694; 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=miWJzpqurM+VmlP/r9jZ19udSDm22BVr4HHLpQPkrYQ=; b=Uoehwf25NLXOBCJcnpvr7Heb9JxOpJeOa6LfhalLzWiyRomQCXjRMXD0Ic3yfedBbq cpclNYxmtVgGMTtOG/NttyFrXShiSIPTP7iLp0suptT+rZtqurEDjS4wKop8x3uleS1R pU2Uv17hEXhTcETlvWX+ssoMBUVLoGxGJwX/pyQjCN6ReFtCegM1mRADbqh4CeHd69Tw dw8fycsYqLx2Tdrz3YYBCT18Vx0wRckK2Z0l0CVd1/1mdIa7RaOqN8X5qtY/JVN0nrqD ZgZhbGFd1EjXcV9fGeKwdMvRHuaq5y2KgXUduzIbjpHllIymYVF1GQK3cnmIgX6cMBFl kxCw== X-Gm-Message-State: AOJu0YwloW8juNMvOvmv8zfvapcUZU+KXszBepYvoyPwo1wkc0sxUpOP 0HN/5nBr2GJMvhfAkdWgkbMNVVOHZWlEMGjaVxHQatZWk5Oeh1Zsr87dffg70C+29OzvVJAEUV1 i8F0= X-Received: by 2002:ac2:46dc:0:b0:511:a4c9:a010 with SMTP id p28-20020ac246dc000000b00511a4c9a010mr4226181lfo.38.1709542893433; Mon, 04 Mar 2024 01:01:33 -0800 (PST) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id t11-20020a05600c198b00b00412c8117a34sm10281167wmq.47.2024.03.04.01.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:01:33 -0800 (PST) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, Ilias Apalodimas , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Shiji Yang , Bin Meng Subject: [PATCH 4/6] arm: clean up v7 and v8 linker scripts for __rel_dyn_start/end Date: Mon, 4 Mar 2024 11:01:09 +0200 Message-Id: <20240304090113.1410575-5-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> References: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 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 commit 47bd65ef057f ("arm: make __rel_dyn_{start, end} compiler-generated") were moving the __rel_dyn_start/end on c generated variables that were injected in their own sections. The reason was that we needed relative relocations for position independent code and linker bugs back then prevented us from doing so. However, the linker documentation pages states that symbols that are defined within a section definition will create a relocatable type with the value being a fixed offset from the base of a section [0]. This have been fixed since 2016 [1] [0] https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC13 [1] commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object") Signed-off-by: Ilias Apalodimas Reviewed-by: Sam Edwards Tested-by: Sam Edwards # Binary output identical --- arch/arm/cpu/armv8/u-boot.lds | 16 +++------------- arch/arm/cpu/u-boot.lds | 14 +++----------- arch/arm/lib/sections.c | 2 -- arch/arm/mach-zynq/u-boot.lds | 14 +++----------- 4 files changed, 9 insertions(+), 37 deletions(-) diff --git a/arch/arm/cpu/armv8/u-boot.lds b/arch/arm/cpu/armv8/u-boot.lds index eccb116d3cfa..e737de761a9d 100644 --- a/arch/arm/cpu/armv8/u-boot.lds +++ b/arch/arm/cpu/armv8/u-boot.lds @@ -129,20 +129,10 @@ SECTIONS *(.__image_copy_end) } - . = ALIGN(8); - - .rel_dyn_start : - { - *(.__rel_dyn_start) - } - - .rela.dyn : { + .rela.dyn ALIGN(8) : { + __rel_dyn_start = .; *(.rela*) - } - - .rel_dyn_end : - { - *(.__rel_dyn_end) + __rel_dyn_end = .; } _end = .; diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index 70e78ce46672..7c6e7891d360 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -166,18 +166,10 @@ SECTIONS *(.__image_copy_end) } - .rel_dyn_start : - { - *(.__rel_dyn_start) - } - - .rel.dyn : { + .rel.dyn ALIGN(4) : { + __rel_dyn_start = .; *(.rel*) - } - - .rel_dyn_end : - { - *(.__rel_dyn_end) + __rel_dyn_end = .; } .end : diff --git a/arch/arm/lib/sections.c b/arch/arm/lib/sections.c index ddfde52163fc..1ee3dd3667ba 100644 --- a/arch/arm/lib/sections.c +++ b/arch/arm/lib/sections.c @@ -21,8 +21,6 @@ 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"); diff --git a/arch/arm/mach-zynq/u-boot.lds b/arch/arm/mach-zynq/u-boot.lds index 66a9e37f9198..71dea4a1f60a 100644 --- a/arch/arm/mach-zynq/u-boot.lds +++ b/arch/arm/mach-zynq/u-boot.lds @@ -71,18 +71,10 @@ SECTIONS *(.__image_copy_end) } - .rel_dyn_start : - { - *(.__rel_dyn_start) - } - - .rel.dyn : { + .rel.dyn ALIGN(8) : { + __rel_dyn_start = .; *(.rel*) - } - - .rel_dyn_end : - { - *(.__rel_dyn_end) + __rel_dyn_end = .; } .end : From patchwork Mon Mar 4 09:01:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 777739 Delivered-To: patch@linaro.org Received: by 2002:a5d:4b84:0:b0:33d:f458:43ce with SMTP id b4csp415671wrt; Mon, 4 Mar 2024 01:02:51 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX00FTGHC6pvul60tRgOafBSLyUxTmHj/xEOBIWr/a9oU2E/d8sxgnWaOmxX42Q3Qz3cbrfV+2w2EnHQ+E4S9Ef X-Google-Smtp-Source: AGHT+IGj12wEsX7DhGP4JIXYh6KFosTaGOshN7nCAXcZwHsslzNyi2U5g7g4d2g+pf8xoc4Efg2h X-Received: by 2002:a05:600c:5249:b0:412:e59e:da2c with SMTP id fc9-20020a05600c524900b00412e59eda2cmr690066wmb.37.1709542971582; Mon, 04 Mar 2024 01:02:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709542971; cv=none; d=google.com; s=arc-20160816; b=cFI1XBu2L/NYTiPH4l3I+yFvipNdmXaeTvGx09ifTPaBcNAKLYJRkS9W8LJ2dW8s05 6wtdDn9MRdES+hO/gE/vCluexFD2YUQbhq9+PIilrCoUiIDtjXQ89WMgt54PXA9N8vG5 48L8nL4LJcGQVAGGeW9BcOOPRnW9AXWaAdpOtRDndbXw/y0GmObp2ZgBKhY8p58fel6p toA5Mfnw4YQFBaXR2EDyxiKy5ZoV7TwiXCWVBbzIC1SWehPhP6qqwRv6ChWWMPMqrNz6 rxDuo3AqskI3eK6kmS5b1qpBlUYmVOcu5HurEylHZi0IZQNc4hXqyqUrx9sPwPFgR30q LvrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BKKm1T6gVHFqZLotspT9wUJpiU11Yz1hR1t56PvKfWo=; fh=h6c+xPqZoaZ+hxDehYH61okRtmJqZz06MxEejd36ji4=; b=AWG0p82xKhcEBCzBxZ7HTX1NiIcvib5OUjxZZQt15x5qP6r4u1AWnxTH7iVYCoXVK4 QypO6ny980DnAEfvwKPnU0ijamMqbNjdew2nsceH2tQkJIFUD0FeclA+jRzlFJ7cEfD1 uj3p7Y5dTqU0RY9EEDSjJMZn2ifVUSW0d5AANi6bpmxaVgs9rMfMhhlC6Kj0ANxBoT84 7hIcPR6i5W+PqFrkpT6hUX4FH+KP6uXw02+cCvKl3jJpGBJl1bRpEF7VHzyusmHbHeMK IPufc/FWYC3dKluX1x4vi/Q99G/T48geDx3TqjLbKWJmEhblXdlCAnu+Kd3TlB/LovPG Hb4Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zC9cYwng; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id f8-20020adff588000000b0033cdf475ac5si5014292wro.734.2024.03.04.01.02.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:02:51 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zC9cYwng; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2E74687F8E; Mon, 4 Mar 2024 10:01:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="zC9cYwng"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AB46087F68; Mon, 4 Mar 2024 10:01:47 +0100 (CET) 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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 5193187F65 for ; Mon, 4 Mar 2024 10:01:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-412e4619e5eso3612425e9.2 for ; Mon, 04 Mar 2024 01:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709542897; x=1710147697; darn=lists.denx.de; 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=BKKm1T6gVHFqZLotspT9wUJpiU11Yz1hR1t56PvKfWo=; b=zC9cYwngfgBTwbjSKmDZUO5gA+/uW6FoeER6ILr4yLYqstNw7Wtbao/D4V8HKpOtRZ k8hI1fu7Mgg7+xWXOUj8zfe/MO0Q427XLiCfD2UU6k0WQrHpt/jpHQhOGtq7e0xZp+C+ C1kuZEjRtp4GEpG1RAqQYZermOaW0kMMFns2ALX+sMSbZ7VhAevGEYNRV3BRVoU8aQXt c9DawkSBX2lmDtpbIo7G0NEHNAtHdV9Q6gIq/4ovyeNON3wMt/VfYsQ1kaKrutPJbbkp nE2GXfdvGLwgwT0F2kOnDobxItO+9snXgjUh92qd2m9SYWSOoWChqlYihXhoS+QbDsjA BHwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709542897; x=1710147697; 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=BKKm1T6gVHFqZLotspT9wUJpiU11Yz1hR1t56PvKfWo=; b=e2RtoYiXX6OjujBiCzTDYwl7ucFoNWH05qDQyfSoWrX80/lpRHmglpRAY0I5DOyKT5 hOo8SzMamKek77thbc1oE4sZeSxv1T54SEtfLCRvIVZnXQsIfidTvyOirPEwzj+zxQwG i7F2GQJxggaZ7K9MB9AOQiZgaFXLjRTg050olF/1J6H2enwxCbKlhkKILR9TdMWmX67b AwfRH6MH0Bvw2YZvv3Ups87H4AuaGumXs2TR6m4zPJuRudtt5gs6fmf5r9Tl8DlLJgyi y/g42Pq/BBPvJDUNoIAI75kn+otKCbU/RD1jxYAv0HCcE1lZ6CI/Cy/5UbTs5n9wim4w Ad7A== X-Gm-Message-State: AOJu0YxiNfCStvgxKKclNO2ibOLp78CEEBGHHshDkbuVaAB3kuiQhSMc da6GLaZZV2Q0Aoegb3fET1c2kFVZ+3tLFXNxcS6RDshQ3KKiik/peNhyW7MrxXWGff1hIX+gNtW VhRE= X-Received: by 2002:a05:600c:1f84:b0:412:aa6f:83d3 with SMTP id je4-20020a05600c1f8400b00412aa6f83d3mr6734291wmb.14.1709542897593; Mon, 04 Mar 2024 01:01:37 -0800 (PST) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id t11-20020a05600c198b00b00412c8117a34sm10281167wmq.47.2024.03.04.01.01.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:01:37 -0800 (PST) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, Ilias Apalodimas , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Shiji Yang , Bin Meng Subject: [PATCH 5/6] arm: fix __efi_runtime_start/end definitions Date: Mon, 4 Mar 2024 11:01:10 +0200 Message-Id: <20240304090113.1410575-6-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> References: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 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 __efi_runtime_start/end are defined as c variables for arm7 only in order to force the compiler emit relative references. However, defining those within a section definition will do the same thing. On top of that the v8 linker scripts define it as a symbol. So let's remove the special sections from the linker scripts, the variable definitions from sections.c and define them as a symbols within the correct section. Signed-off-by: Ilias Apalodimas Tested-by: Sam Edwards # Binary output identical Reviewed-by: Sam Edwards --- arch/arm/cpu/u-boot.lds | 12 +++--------- arch/arm/lib/sections.c | 2 -- arch/arm/mach-zynq/u-boot.lds | 12 +++--------- include/asm-generic/sections.h | 1 + 4 files changed, 7 insertions(+), 20 deletions(-) diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index 7c6e7891d360..df55bb716e35 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -43,18 +43,12 @@ SECTIONS } /* This needs to come before *(.text*) */ - .__efi_runtime_start : { - *(.__efi_runtime_start) - } - - .efi_runtime : { + .efi_runtime ALIGN(4) : { + __efi_runtime_start = .; *(.text.efi_runtime*) *(.rodata.efi_runtime*) *(.data.efi_runtime*) - } - - .__efi_runtime_stop : { - *(.__efi_runtime_stop) + __efi_runtime_stop = .; } .text_rest : diff --git a/arch/arm/lib/sections.c b/arch/arm/lib/sections.c index 1ee3dd3667ba..a4d4202e99f5 100644 --- a/arch/arm/lib/sections.c +++ b/arch/arm/lib/sections.c @@ -25,6 +25,4 @@ 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 _end[0] __section(".__end"); diff --git a/arch/arm/mach-zynq/u-boot.lds b/arch/arm/mach-zynq/u-boot.lds index 71dea4a1f60a..fcd0f42a7106 100644 --- a/arch/arm/mach-zynq/u-boot.lds +++ b/arch/arm/mach-zynq/u-boot.lds @@ -22,18 +22,12 @@ SECTIONS } /* This needs to come before *(.text*) */ - .__efi_runtime_start : { - *(.__efi_runtime_start) - } - - .efi_runtime : { + .efi_runtime ALIGN(4) : { + __efi_runtime_start = .; *(.text.efi_runtime*) *(.rodata.efi_runtime*) *(.data.efi_runtime*) - } - - .__efi_runtime_stop : { - *(.__efi_runtime_stop) + __efi_runtime_stop = .; } .text_rest : diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 60949200dd93..b6bca53db10d 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h @@ -35,6 +35,7 @@ extern char __priv_data_start[], __priv_data_end[]; extern char __ctors_start[], __ctors_end[]; extern char __efi_runtime_rel_start[], __efi_runtime_rel_stop[]; +extern char __efi_runtime_start[], __efi_runtime_stop[]; /* function descriptor handling (if any). Override * in asm/sections.h */ From patchwork Mon Mar 4 09:01:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 777738 Delivered-To: patch@linaro.org Received: by 2002:a5d:4b84:0:b0:33d:f458:43ce with SMTP id b4csp415597wrt; Mon, 4 Mar 2024 01:02:41 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWomqN1pPmMiJ3Tt1z+9YKfDRLLr77DqhDGmi7OJurFukaWX0NgXs2d9r0mm0xyKeeL46KC9RJ7qCdsHMq4X6Qs X-Google-Smtp-Source: AGHT+IFU/D3QYP9qMMEnZ959JZqYou4cLI1rLdrdChPk3ocY0XrFD6Gz6Aior4PHZ3MJvgyn7myx X-Received: by 2002:a05:600c:4fc2:b0:412:dda9:1038 with SMTP id o2-20020a05600c4fc200b00412dda91038mr2308412wmq.4.1709542961136; Mon, 04 Mar 2024 01:02:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709542961; cv=none; d=google.com; s=arc-20160816; b=Xxfx5k9OO7Ds+npTRBxo5F9g0oya6dxEhfiN0t0+01aGcEP6L9lxq1Nffe5SDMbCsh GqDKTUf+NcbH5I3iYPP7ax4xtpYhyKNHBP/OvFLkYKx4r7RX4taSslMJc1JUF3iogtlH hEeLMvTIzijk1tTjWKuqn2alZ99acOrzBzB7mvhyHxdeSNQJ8BeLhZMuPGlJ2zDb7AEF znZWCOHURDWxhNqfF/iDcIuHp/fpPJCiVeHHI17EmqqVlOqaPL/r25BkxtRCl+r9a4at fKNuXxW5oHS7mT+rQZKC0Zjttl5eR/1OntX6MUSqBDaSIg5MNISI4+JcN+r1RnO+w5xx NcoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ba2b40JJAidxDBZft3tGbXqFh+NaL3j2Px1KpWXlUIg=; fh=h6c+xPqZoaZ+hxDehYH61okRtmJqZz06MxEejd36ji4=; b=C+O5ZrhFhw3SS3/AINO/9uc4rU8dF2w4WKdlQSp0hxD6M2aG0dTVDfpVy/tFgpm5S9 ak4nIOv0cBwubnO2cND9iNa7Fte8TMhmtHyKfb4v5jsJE7NU8+AXjcv/gvBNI1RMiaEc uU3tkvG+bSXf30KTOYZJSjT0TZJSZU/GfBBGvDO6hsA1b3eNrmBJMErB5ETUINdGHdNg 1IWUCb3xmYupE5KRO4Ga17Usjn0dBhyMr9hd9VQysGbn0lAcS8Jmhneg43tWQP/MTGDS vB9heRVAFzGwaIGqmlHJ//1LcZ1j4qkkgovWnCNwX68q5mr/T5Siif7qqo84Cpejk0Ln iKtA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B0S22Y3k; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id s16-20020a5d4ed0000000b0033ce2c70f07si5214770wrv.503.2024.03.04.01.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:02:41 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B0S22Y3k; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8310487F83; Mon, 4 Mar 2024 10:01:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="B0S22Y3k"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4583386FCE; Mon, 4 Mar 2024 10:01:49 +0100 (CET) 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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (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 7509187F28 for ; Mon, 4 Mar 2024 10:01:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2d23d301452so46281081fa.1 for ; Mon, 04 Mar 2024 01:01:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709542902; x=1710147702; darn=lists.denx.de; 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=Ba2b40JJAidxDBZft3tGbXqFh+NaL3j2Px1KpWXlUIg=; b=B0S22Y3kPAu2nIK8GJ8GTxc3kZL/AcHLJ9GwCk3T2LLhUhdNelj0I/WkwDsV8mPalC gVk3Ykr+LvbDMkztZMktrgtNlCi/KfhsU0+3jJUKxgVgYFbZZph70ASWm4JDd2N/2CJX gG3S85rHuuWMUa4gMTuPOvbWllTxfEtSi1bPMYuF0yh9GEHcJlgFkc33ohyzy8hN4OGM fadIOAC7YmvKhg1me5FDY0elhmhcQ9VMWjr/6XfMH/QBUuFQKdjxJ0+WTzrW/G2g6Vun vhjoD3ZaCUHWV1wghoBuEBM0vT0qplOyWmDlS6QXl92HaS51FeDxAJD82US29Mc9ChxE 7N8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709542902; x=1710147702; 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=Ba2b40JJAidxDBZft3tGbXqFh+NaL3j2Px1KpWXlUIg=; b=b8zL7QwvKjc+/qb6EuMPxPcGhWeY93besFdR6OMHPOMZaCtzrFcOh3w+XODPPUjfIg 89m3xJnZ4lLUT8xx69OTtOY3NH/Z1bigPxzcRCwEBkNK4faaDkGHilkqzWFjrMA/YJku 7jX3XtgluLWg73pAcahdFVJmnsY1kPTbT2kk12goreCfNcBzic2c16nmuLOYttdwa+PZ Sv64xcDPBsgkR3T0CbVIir+MwhvtQehmubYPxlNOKeOW+57uhqoHnx0AEN/vWc/KVpsb pOk/6L67fB3KWBZay0vb1xPqhTbPLXDHenXlEmay7PfXXJ9xy0eNrChkCBqRU2cHZlUv WT7A== X-Gm-Message-State: AOJu0Yzwxx8fxdItb/WIUYKt+DGinPneajJFWqdDa9l17vnDU+Qj2KAR xZKotkjXOwB5po8lOLkd/PaFyAjkRc5lubGgB1+urS+WOYa7k2e7eWEAa6ndniS7tsHOlGWlJKe S5+I= X-Received: by 2002:a2e:9b0e:0:b0:2d2:e51f:2ba2 with SMTP id u14-20020a2e9b0e000000b002d2e51f2ba2mr6161208lji.21.1709542901813; Mon, 04 Mar 2024 01:01:41 -0800 (PST) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id t11-20020a05600c198b00b00412c8117a34sm10281167wmq.47.2024.03.04.01.01.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:01:41 -0800 (PST) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, Ilias Apalodimas , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Shiji Yang , Bin Meng Subject: [PATCH 6/6] arm: move image_copy_start/end to linker symbols Date: Mon, 4 Mar 2024 11:01:11 +0200 Message-Id: <20240304090113.1410575-7-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> References: <20240304090113.1410575-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 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 image_copy_start/end are defined as c variables in order to force the compiler emit relative references. However, defining those within a section definition will do the same thing. So let's remove the special sections from the linker scripts, the variable definitions from sections.c and define them as a symbols within a section. Signed-off-by: Ilias Apalodimas Tested-by: Sam Edwards # Binary output identical --- arch/arm/cpu/armv8/u-boot.lds | 10 ++-------- arch/arm/cpu/u-boot.lds | 10 ++-------- arch/arm/lib/sections.c | 2 -- arch/arm/mach-rockchip/u-boot-tpl-v8.lds | 8 ++------ arch/arm/mach-zynq/u-boot.lds | 9 ++------- 5 files changed, 8 insertions(+), 31 deletions(-) diff --git a/arch/arm/cpu/armv8/u-boot.lds b/arch/arm/cpu/armv8/u-boot.lds index e737de761a9d..340acf5c043b 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*) } @@ -120,13 +120,7 @@ SECTIONS *(.rel*.efi_runtime) *(.rel*.efi_runtime.*) __efi_runtime_rel_stop = .; - } - - . = ALIGN(8); - - .image_copy_end : - { - *(.__image_copy_end) + __image_copy_end = .; } .rela.dyn ALIGN(8) : { diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index df55bb716e35..7c4f9c2d4dd3 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -37,7 +37,7 @@ SECTIONS . = ALIGN(4); .text : { - *(.__image_copy_start) + __image_copy_start = .; *(.vectors) CPUDIR/start.o (.text*) } @@ -151,13 +151,7 @@ SECTIONS *(.rel*.efi_runtime) *(.rel*.efi_runtime.*) __efi_runtime_rel_stop = .; - } - - . = ALIGN(4); - - .image_copy_end : - { - *(.__image_copy_end) + __image_copy_end = .; } .rel.dyn ALIGN(4) : { diff --git a/arch/arm/lib/sections.c b/arch/arm/lib/sections.c index a4d4202e99f5..db5463b2bbbc 100644 --- a/arch/arm/lib/sections.c +++ b/arch/arm/lib/sections.c @@ -19,8 +19,6 @@ * aliasing warnings. */ -char __image_copy_start[0] __section(".__image_copy_start"); -char __image_copy_end[0] __section(".__image_copy_end"); char __secure_start[0] __section(".__secure_start"); char __secure_end[0] __section(".__secure_end"); char __secure_stack_start[0] __section(".__secure_stack_start"); diff --git a/arch/arm/mach-rockchip/u-boot-tpl-v8.lds b/arch/arm/mach-rockchip/u-boot-tpl-v8.lds index b7887194026e..4b480ebb0c4d 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*) } @@ -42,11 +42,7 @@ SECTIONS __u_boot_list : { . = ALIGN(8); KEEP(*(SORT(__u_boot_list*))); - } - - .image_copy_end : { - . = ALIGN(8); - *(.__image_copy_end) + __image_copy_end = .; } .end : { diff --git a/arch/arm/mach-zynq/u-boot.lds b/arch/arm/mach-zynq/u-boot.lds index fcd0f42a7106..553bcf182272 100644 --- a/arch/arm/mach-zynq/u-boot.lds +++ b/arch/arm/mach-zynq/u-boot.lds @@ -16,7 +16,7 @@ SECTIONS . = ALIGN(4); .text : { - *(.__image_copy_start) + __image_copy_start = .; *(.vectors) CPUDIR/start.o (.text*) } @@ -57,12 +57,7 @@ SECTIONS *(.rel*.efi_runtime) *(.rel*.efi_runtime.*) __efi_runtime_rel_stop = .; - } - - . = ALIGN(8); - .image_copy_end : - { - *(.__image_copy_end) + __image_copy_end = .; } .rel.dyn ALIGN(8) : {