From patchwork Tue Mar 12 14:08:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 779728 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2039664wrt; Tue, 12 Mar 2024 07:08:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUZWRFqhlKYYQ+cMwtE3c4TkjtSrWtAAMYTbQGJZcsn92BAdDTyHBSE8RpcwiXlXByWfhjjPniTpHKcsWkHI4Yb X-Google-Smtp-Source: AGHT+IFMyavsLBZrcSTGa2lakpVPmMLFIqFepBoSamv2a2Kpz4aUfat4IzjWAaKeRd59kruf8wNG X-Received: by 2002:adf:e6c5:0:b0:33d:1739:aed3 with SMTP id y5-20020adfe6c5000000b0033d1739aed3mr7888826wrm.60.1710252531216; Tue, 12 Mar 2024 07:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710252531; cv=none; d=google.com; s=arc-20160816; b=vDhJs+jrDl1bIny6Won0AxQL9jI4nCMQN0hWIairWOuLaG9ijtIRj7iWNIwGuMQD1T zWMBbXk7DH/5RUjM6AgOiFUxeGKhIUSfqBeygJGUJKkSI8R+SBSAoseysCReIEkRrIRt 29xofym5wyrlurC7IxAZe0KaqhFkBGN2eAM6Fe3hqz/8Ho0CpKn3UQ1GmY+RtSC5RKNC e+iMNsJ5Ox546BMtxTLCVMpWot7+vNnGKQGaMagfAHn97pf3URFLkHLFN/uSVDPXs0Qr qjRN1fWQTRXSYNqsnrxzsrfMPN0iVzGJiHRIiUD+BaOwAkxFUSgq0JEtXwn9ti0AtIIt 2vjg== 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=YgAnvytc3PkIme27WTI0tmSPC4jrks+Z9IcIvi2eGZA=; b=R9JfKoWfjzBbLE2KLznAir0W/6pmFZBl1xeSFBfwyvvBS6kNfui+J0LeVyyTzJKrhw vr3zvulCW2Lcb9GrCGEI3WmlRp8vwSc/dfDYU+DU1Cm65G95kgh4ncAHCeI9n7EqHU1n BQXAlFK+ebh70M9+fZm15v0M2s+m7s23tyWimEfQfYEoo474VULcAQZqguUA8uasUTxe JiWeLJ9k1xZBQKw+N8dOhJiqYnpXk6lotwOUdNdSxK/Edg4IhD6c7OCiI1SIzEjYL/fC vgljCEOavvAppYzcyGSey1Lkh2gSBTOXGfsXOyGw4Xc1Ue1OtVPVt78aIxdaDcRMC4Y6 XwKw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FOkFceJz; 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 r5-20020a056000014500b0033e43ebc697si3951430wrx.910.2024.03.12.07.08.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:08:51 -0700 (PDT) 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=FOkFceJz; 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 88B1D87F6E; Tue, 12 Mar 2024 15:08: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="FOkFceJz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 574A987F5E; Tue, 12 Mar 2024 15:08:44 +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-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 5B03B87F56 for ; Tue, 12 Mar 2024 15:08: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-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-563cb3ba9daso6546950a12.3 for ; Tue, 12 Mar 2024 07:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710252522; x=1710857322; 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=FOkFceJzjYwo6ibVUSURL4TdGsNySKCdX+xNhMZMNLnyK0gOPSAc1T3EIFJrTKUn7S /Yku3Klc+qBhbU/U31pktx8b5X2Uwfu2CUPhMLKzgd3jcTHucZRVm8cj0JqXm1oZAu3p QYwjK830N+1la2M+fWXoFbFBMTRwQmGu3Hm7kmru/l0M+E/pqg7fzWyTl9/YARhIJp98 msVNwNtU+Hrhcde9Gc7XekrkQf2JWihDK2zk747pDi9ZLaQOetwvC+lLy0k3tf31SbMI Y4xWnnNPEAhs3BJK4mtoC+m8AqJFH8aVEBPi6xSbMhjlXmhDogSdSkgSLXZtVbKlrLDf ExiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710252522; x=1710857322; 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=mjYjM7XFF/O9XETK9NWUlrnBExwfzTkksSx6rdtQ/z7aYhO6DdaTl+L32XiBVW5bkB uwOF3zNDcevS9iRElnhvQ8S0HuZyJ1wjlsRl7hMYF+jcw67/zvVDuMsE17C2GSAjLBCT xEaKRiSlLqlY8oh3Y9Mtt+XavtydUJazJqYN7WERqv3lW9042slFfQiMaS+EeAJqJrlc +q5KLE0c7E1zATfiKtN4gl/Zg8UqamLK5Ym+1eWi3XZVMDXNOCua/49IvA8xJKDk1w4j 7czo2wT2Iy+CY0VngiXsVGQmNVGXv4t+WNGsl5Ji2H249x+d4smr5IdujCZmmUZorrYY zzZA== X-Gm-Message-State: AOJu0Yxxpu+1FkWwtl98mwsIeUxdfkeVA4gX+jS8HVXYn1kO/zrFPdLq oRQXexqxjMY3Db7K+2Dco+Mhce0fStWNewh6gPK4MvkwgRcRpEsLuwW9zmeSwf2DIV4qvY29BCf 2I9I= X-Received: by 2002:a50:8ad7:0:b0:567:15a6:848e with SMTP id k23-20020a508ad7000000b0056715a6848emr6847525edk.18.1710252521706; Tue, 12 Mar 2024 07:08:41 -0700 (PDT) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id d23-20020a056402001700b0056857701bf5sm2246086edu.81.2024.03.12.07.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:08:40 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, richard.henderson@linaro.org, Ilias Apalodimas , Ryan Chen , Chia-Wei Wang , Aspeed BMC SW team , Joel Stanley , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Sam Edwards , Shiji Yang , Bin Meng Subject: [PATCH 1/7 v2] arm: baltos: remove custom linker script Date: Tue, 12 Mar 2024 16:08:23 +0200 Message-Id: <20240312140832.1968215-2-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240312140832.1968215-1-ilias.apalodimas@linaro.org> References: <20240312140832.1968215-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 -- 2.37.2 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 Tue Mar 12 14:08:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 779729 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2039775wrt; Tue, 12 Mar 2024 07:09:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX//rV5sU3ZcyFBOXsbcRH9ERjEcbKI+7W4Zv6qzzhp4lIEZTl0IzVa2Tuzmwl6Fcr9zvrx4qHS19FOYR0jKRWZ X-Google-Smtp-Source: AGHT+IGI8ACSXTSaPRP479BQ8ZrQ269HrJ8Nd3jzqP5Nko3murxx53SqeO+gSmxH5cMrU+BYTjFB X-Received: by 2002:a05:600c:19cc:b0:412:f3af:c6c6 with SMTP id u12-20020a05600c19cc00b00412f3afc6c6mr8463261wmq.10.1710252542206; Tue, 12 Mar 2024 07:09:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710252542; cv=none; d=google.com; s=arc-20160816; b=foa3AhKojskQXw1T8ehR4OFdcceDp7V2PIVzR2kiEljqi8w+beH098Qyrfy4EPXZp6 j3yVrPEKhF+uSspRXanpHd01SXWRbdTMMTAek6Uf9dHdtYMIR+PPR5gQXVShMuLT6EpR 48pYgkfVvcQ6cbGNZEHksma32/W7qRYUIawJn2h1N/xbDFKURZ7Lr3gPf1jcmaSNAWVP MxV5ajIH3lEW62YIK+o3nDvuwrDYsR3qb9+mL/VuwuDlbM/QvzMqoSIXklakVlAu9WTz hVONClWpvdLcmFAeJ55cm7KpxeNrQFkVTpvjNMFhbVTbKiA2AMQubQmgOBl/4wu5KqnU /JZQ== 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=FjSMhR61rU2pWAjQF3ZKkg2Bp7YMbHLjGk3M7dJ2SI8=; fh=YgAnvytc3PkIme27WTI0tmSPC4jrks+Z9IcIvi2eGZA=; b=IdGIrB1IadUPPFGhCDjD7Yka4vkR2k7k9vPVTZVxVjAU1YIc3XCt4nlEtuilYhMjDe H/lHDoB/s//N77WlWkjQm2d5aY5PqA+gYyizRKuaLNIbo4WI7MmLizn7ZT92czXJW5OM jNGdHFR0/9prweiaxG1cCo55TbvAPe4YH05oHD/x4x5c88C6zMSLcWNVdA/a7z+w9mM/ kXrjwGqAiRvrXre+38q7zWfNgGp2PNkh0hd9RFjAP/pOoCbkiMNFX7TnCDK3Xc4kHF2j O/H6GNuwZCAKNjWFsNp40K7ypJNkEP7YbOBaBGTb+UlC9zkpiPjPe+yBuPiz/pFpK3l1 nKyg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gBcIsTB6; 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 e16-20020adfe390000000b0033e7c00c661si3970184wrm.111.2024.03.12.07.09.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:09:02 -0700 (PDT) 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=gBcIsTB6; 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 EFC6C87F56; Tue, 12 Mar 2024 15:08:51 +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="gBcIsTB6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 19C1987F3F; Tue, 12 Mar 2024 15:08:51 +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-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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 3086687F80 for ; Tue, 12 Mar 2024 15:08:47 +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-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5684073ab38so24038a12.0 for ; Tue, 12 Mar 2024 07:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710252526; x=1710857326; 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=FjSMhR61rU2pWAjQF3ZKkg2Bp7YMbHLjGk3M7dJ2SI8=; b=gBcIsTB6072JGuHQmUl9bmv24GFXO7whtqT+D5Mahhc6+VgCU5a2YlhDPECoRO2j+E Ur55z2yaDv2rddnUE8yb1x07FA19FaGK/nzvcsU7M9tHfuUa9rquODWbS0cvQzKpr+// 85Hxbv18SWNDQPR8scqL1LTVDa6cH8uSPBmtflJ2IB6PrY3h19xY71Dy5DA7Vw7ykF63 eJUKp5IdJtfrOj5Cu2Bh6zaZ8eRdcHkdV1Wg7NkIdVm0bJmlM8TPFBynkSDyRo/akMGj kzrWn9HTuMnrpIrxcutqXr4bUpxzJ53BKCqqNTE2tEg4RWEa53U9t4eBGdGoRwTkWLKF yGSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710252526; x=1710857326; 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=FjSMhR61rU2pWAjQF3ZKkg2Bp7YMbHLjGk3M7dJ2SI8=; b=eyVbul6zB3CzWiQGiXRQtCqyNXK/g9dDyi/epFtadObrmzHAL+lb/xGPQIE6kFLBfb 1cAN9QYuqz6KsHkS670GuMHARhly3sHsUF/TdCSMBKcnwaU2/Ew+DMXfWoiuLmn/BnJI YgAyMI79N5AQaWwNe8mcjVrviRBrRix4y9V3RLbewnpx67gWMQNJhHA0xQqBxNg39giW ckhvyFjEUz+86ZChEi/wT8LWf6erYEq5CLj5z45f3ehWzOC789ZBEDoOhlNanYidIUfs U6aELBqBqyEA5DEaus6fT3y07/sucpkcFEY0QAeEma8TnM6nsT4ePq1Vd4WDsWOrivhc QaXA== X-Gm-Message-State: AOJu0YwHo0uGsJACdE89LaGKtk7LRFe5jRU+7m8dqE82eltCCxwXHTXN DBN2/43qs2J5RTiplaeDLY6DTuefWPvqK31Xkrgs402Jw1OYY+EAHNdScBRw96hFeEsVPsPnbpU 4Sr4= X-Received: by 2002:a50:d595:0:b0:568:335d:1192 with SMTP id v21-20020a50d595000000b00568335d1192mr10171004edi.13.1710252526732; Tue, 12 Mar 2024 07:08:46 -0700 (PDT) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id d23-20020a056402001700b0056857701bf5sm2246086edu.81.2024.03.12.07.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:08:46 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, richard.henderson@linaro.org, Ilias Apalodimas , Ryan Chen , Chia-Wei Wang , Aspeed BMC SW team , Joel Stanley , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Sam Edwards , Shiji Yang , Bin Meng Subject: [PATCH 2/7 v2] arm: clean up v7 and v8 linker scripts for bss_start/end Date: Tue, 12 Mar 2024 16:08:24 +0200 Message-Id: <20240312140832.1968215-3-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240312140832.1968215-1-ilias.apalodimas@linaro.org> References: <20240312140832.1968215-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 [0]. 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 [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] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object") [1] https://sourceware.org/binutils/docs/ld/Expression-Section.html 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 | 21 ++++++--------------- 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, 21 insertions(+), 66 deletions(-) -- 2.37.2 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..01accb109fad 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -207,23 +207,14 @@ SECTIONS } /* - * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c - * __bss_base and __bss_limit are for linker only (overlay ordering) + * These sections occupy the same memory, but their lifetimes do + * not overlap: U-Boot initializes .bss only after applying dynamic + * relocations and therefore after it doesn't need .rel.dyn any more. */ - - .bss_start __rel_dyn_start (OVERLAY) : { - KEEP(*(.__bss_start)); - __bss_base = .; - } - - .bss __bss_base (OVERLAY) : { + .bss ADDR(.rel.dyn) (OVERLAY): { + __bss_start = .; *(.bss*) - . = ALIGN(4); - __bss_limit = .; - } - - .bss_end __bss_limit (OVERLAY) : { - KEEP(*(.__bss_end)); + __bss_end = .; } .dynsym _image_binary_end : { *(.dynsym) } 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..25c81b21018b 100644 --- a/arch/arm/mach-zynq/u-boot.lds +++ b/arch/arm/mach-zynq/u-boot.lds @@ -103,23 +103,14 @@ 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) + * These sections occupy the same memory, but their lifetimes do + * not overlap: U-Boot initializes .bss only after applying dynamic + * relocations and therefore after it doesn't need .rel.dyn any more. */ - - .bss_start __rel_dyn_start (OVERLAY) : { - KEEP(*(.__bss_start)); - __bss_base = .; - } - - .bss __bss_base (OVERLAY) : { + .bss ADDR(.rel.dyn) (OVERLAY): { + __bss_start = .; *(.bss*) - . = ALIGN(8); - __bss_limit = .; - } - - .bss_end __bss_limit (OVERLAY) : { - KEEP(*(.__bss_end)); + __bss_end = .; } /* From patchwork Tue Mar 12 14:08:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 779730 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2039888wrt; Tue, 12 Mar 2024 07:09:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW8pHhGlbTOwPItnnaY7zbhYblP19qnEc+b2qWGYCiEC4XBqWGtYth6Vt1Rrp0Vyyg0KcZLlwtRSU8/m4WFqB/b X-Google-Smtp-Source: AGHT+IFYG4/2kyw2UfoFLyy0+Fl3SjGZeOxL0XhGCf+UdVs5GZEqAWaz12o2aOa3Hk+eHlFuuXsR X-Received: by 2002:a05:600c:468f:b0:412:b8ce:fa1e with SMTP id p15-20020a05600c468f00b00412b8cefa1emr7027923wmo.29.1710252554177; Tue, 12 Mar 2024 07:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710252554; cv=none; d=google.com; s=arc-20160816; b=HQxBP2jKiLTQLzsMbjpjEHZnDxAuNqAcSSQ5Nbf1WTX+syf0S9EQw5ptMqQKV0Kgs+ lWaIbm51nP7NdeNkEo+ykcKsQjMSQogWlHMHthLbKPqmfHu5hGxBvcpAId6Ar6RHyxYe S/CUnQ3eod0ewRmc+V+iISDOMm3d4b9FdB+0h5DVqX8z42cdTCsy2A+hDjQTWTZwmXVE HG679xhs1ohHRr6JoxYbdiDi2uj5yfEAGeYVvO9R+fQEFn/nPOiu9EAwgxEzRudZoxZ1 UII62K+RoVvqzUZZzQRb1+uIonyVTMikCVLTWsk09WPV6Fg22X5FWQYpNLGSFYIJ7EtW A2Qg== 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=J6pvg5Oa7u0dLpTLS16+tVIbHYHC3s3NEBv9Yf4lmgo=; fh=Dl9U/cWBAjt0RA0ekDL4vfSYX5rQ4ZX9RknwKNQFT0M=; b=onSlFACB3nCDDH0bv6pxWWY9ZgoKLgdt0ypoyDu7t/G1+cl5B69g4roOnrph3oATug h8Zjy/9S0O6g+9QvvaUu4QetnRn/KFgysl/jhWV9YPGPAMxzieqRrOLcaR81HN6MjEa6 VrEWB/4G5DgwiQ8otopuRNE1kTlv0rDi8UPFH7+qxicn0RxLK5DvQBxsr7/cmlOptSXn Q+OMdYwPiYox2ihBtNWvwRHW7ZK3Bplsm7ru8aaX3ZFf9UNtctgQfrCKrPwaIEs8YTgF K3niRExy1QMxwN0NUd3PiWHIH/7SfMR/tXFsbBaQGnDBaSSPViHuSk8ZWwGb+ZJ21RHv 5p2Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="A/oaeD9l"; 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 q13-20020adfea0d000000b0033dda858aa0si3892742wrm.595.2024.03.12.07.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:09:14 -0700 (PDT) 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="A/oaeD9l"; 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 5D76487F80; Tue, 12 Mar 2024 15:08: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="A/oaeD9l"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5AD6B87F80; Tue, 12 Mar 2024 15:08:54 +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-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 5370487F69 for ; Tue, 12 Mar 2024 15:08:52 +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-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5683089d4bbso5442713a12.2 for ; Tue, 12 Mar 2024 07:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710252532; x=1710857332; 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=J6pvg5Oa7u0dLpTLS16+tVIbHYHC3s3NEBv9Yf4lmgo=; b=A/oaeD9l5ZdFHsCwaP0iigaKq/7trpyiSoBFB/5RMYsGyxTjOXfUlhDWA8S5GGXWJ/ blmw5lW2RCyL/BPfFUYMbXEBlvAYpF9d17LtwwbdtB+UsFRfCySgnLH1gMqSWvJVhxGy tP1atVK33ht8p5eg8UrMh1XPDCGpmLb4rvxHh8x0/Tzi8dnnQ2fCCH8D9D4pq/pXjiFr HYenqsXZj9eRwkptvjmPZdtd9Q2/3yWp4jtET8I5QKz6Vvql4YVOxAEiTx3ncParzfCj pQVMldMAvSDqsLAXZ7fSn0J8MUPnNixq2fFYWbFLZ8KONHp9HMrcjgGEiuPnPWlS71So Gg8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710252532; x=1710857332; 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=J6pvg5Oa7u0dLpTLS16+tVIbHYHC3s3NEBv9Yf4lmgo=; b=HI/UV/62HFWmBbv0JAKH4T3gzN01ln7nwVlHLvU93F8cvthLXNyxu0+h5cqaecSRL/ 3wF7/wzTXrUuj1IJZ/65snCun5eTT5EXZPm221NgzGP4ZcYu7hi5WHg923GavNcG9ufJ evuDjS0YQyUnfbFYrKhSKIBYJxqeVSZLIMxTfgY2t9XtQI1rWYw7NaiRMVPchnGIV+tN EKg+xAj/fdhHs/FkVIobs5OPawNJZ7oNsuC6IQIdkNiBaYEKJibXRNCwTBVeapsPhXsl jx3IyXHYZgHOpY/OEHsoZUs8PJYAkI76Hpt4OGhtr2IBg8j57aRamGZZ3zrJMR8n0fA8 ePsw== X-Gm-Message-State: AOJu0YzTC0SlIqpPTHqoVw81/c1IZxQCb342dp8KzPpE1cS/Qu0ePCYa 4xKIM9VJCQY3Zg7XMJliN7zP1QAlRDAaMBzUvVM4bPJhrg+LbrfRJltHoljC/hBmyRh9XVTewXD tTTs= X-Received: by 2002:a50:8e17:0:b0:565:6c72:40a9 with SMTP id 23-20020a508e17000000b005656c7240a9mr6050407edw.28.1710252531701; Tue, 12 Mar 2024 07:08:51 -0700 (PDT) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id d23-20020a056402001700b0056857701bf5sm2246086edu.81.2024.03.12.07.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:08:51 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, richard.henderson@linaro.org, Ilias Apalodimas , Sam Edwards , Ryan Chen , Chia-Wei Wang , Aspeed BMC SW team , Joel Stanley , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Shiji Yang , Bin Meng Subject: [PATCH 3/7 v2] arm: fix __efi_runtime_rel_start/end definitions Date: Tue, 12 Mar 2024 16:08:25 +0200 Message-Id: <20240312140832.1968215-4-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240312140832.1968215-1-ilias.apalodimas@linaro.org> References: <20240312140832.1968215-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 since [0]. 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. [0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object") Suggested-by: Sam Edwards Signed-off-by: Ilias Apalodimas Reviewed-by: Sam Edwards Tested-by: Sam Edwards # Binary output identical Reviewed-by: Richard Henderson --- 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(-) -- 2.37.2 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 01accb109fad..37f4cd27d79a 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 25c81b21018b..11b6e7278a9c 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 Tue Mar 12 14:08:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 779731 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2040007wrt; Tue, 12 Mar 2024 07:09:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWoJjh3CRbHJPOu5bbR6iyMv7f5cwnXSEgkPdDy666p0VOAQ6CagmRTvXY9VNA1thmm6LUbjUU8uWyQSmJel6cS X-Google-Smtp-Source: AGHT+IGlCgoePN7UaptwksYMTVFeiWu/Ga6AfTHHahG8RC2NDaOjoxjk6dR4g32mk5nC+5LzE3va X-Received: by 2002:adf:fc84:0:b0:33d:a626:be71 with SMTP id g4-20020adffc84000000b0033da626be71mr10387446wrr.4.1710252564860; Tue, 12 Mar 2024 07:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710252564; cv=none; d=google.com; s=arc-20160816; b=Z58cyhDKm4+QKoFQxyaiOwL7JaSI0mHFA6LxgQaUAaJ+skNgBReobzGz0tOVf94yoq 2HoS7QZ4oXjT7bSHTiDH+/s/rfKNF3dMuiwDvNKjgKwS++eTHP3XKmfH/6zLW/+OpXkl pU+pSDD2+AD+Sv/HXdP/4x+au+WxrYkPdG1TyMo1aRvAejMCkBJaNItZkJryLxxp1EoM UCtPFHP6PXIA+Dlo+GLQ8BdtsmAOrO5ZaBOovcoCqOvcahSkoIldfyUaedZyQPTVh/OQ jJSEy/CrmSMQfyojMRjCOYo+ue56pG/IzaQc3rrACSjr2Dmnzv6ViGThZjCnoCljBQEc wNMg== 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=iMOxHHM+Unoaq3XyIs2oq1LjRVh47AY5Cd39Hcukh3E=; fh=Dl9U/cWBAjt0RA0ekDL4vfSYX5rQ4ZX9RknwKNQFT0M=; b=q44p0OFKoZSVRpR+oDce/2xe1aliCDUP5gPBp/KwfYKpudazTIfYzhXBmkPC74+s8V kRQ/N8AU8u4EhDznGCoBiO+LqkbNATT8XRAtmD00ZFRIiNvX7WBj0TL9/4Dq7RSCND0l OG6MdnfW9L3Ryt8PHjxVwakvkuZv5vr9SIzfR8JFa1efa/QvjTMLu/sJZ3rpL9yZo5rW /SXlWtgdXh4w4nviwVGij+omP3xrfQPWkJkClducCugAsabDNFstU/5JNSUl0W9JKThW k/+aTdYL4zyVC/O+PnHZ0/Xqa09/+B52xipsaAfxe2y+PMdXSW8z2B6RwBEZWVp2+xvJ 4y1w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J+U+usi1; 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 r17-20020a5d4951000000b0033ce0a460d7si4168567wrs.829.2024.03.12.07.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:09:24 -0700 (PDT) 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=J+U+usi1; 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 B03DC87F71; Tue, 12 Mar 2024 15:09:00 +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="J+U+usi1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C0DD187F8E; Tue, 12 Mar 2024 15:08:59 +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-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 7065D87F71 for ; Tue, 12 Mar 2024 15:08:57 +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-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5684f95cc9bso4243931a12.1 for ; Tue, 12 Mar 2024 07:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710252537; x=1710857337; 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=iMOxHHM+Unoaq3XyIs2oq1LjRVh47AY5Cd39Hcukh3E=; b=J+U+usi1nUPEF3LGPJmDy9IZJS4HkjH0ZGu5hwlwU+m1MPh5up3QDlmyNCnPWRI21s +Lm71YxmP2ESqWfsenbHaK54BKKE1OnGf8VizSuqIyWWdIxxW3DuVVOe/awmGH3rAXLf TgamCjBkadZdxEfXDlPlCQIwGX7yOoGM4njnMBa+6tiN3bEruLDeRz9gi3jtfLLg/Y9w xCM9jdHnWPIkFmFtcmkUyzYM3m0OdfbF+ND5WLj/JvAeh3OZVUAvX6DZ9E1SZluB4pOP JOak60sUHn261akyoCPCc4DypnZY4xpFI/fj/ztY+k/jH6MzFAcyHF4NMhKZp4Y5lkcg rdeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710252537; x=1710857337; 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=iMOxHHM+Unoaq3XyIs2oq1LjRVh47AY5Cd39Hcukh3E=; b=GU6drGqG2Dhix+xG0zPJljk1Q122+W+8HO8Ob3wO9C6DfHE/Bbnp56eIv+h9wSiURF KBLTWm7vO4Lw94enq/gUAeBuK0OVAZH76+Vfp8SbRQv5V8j0Q3jgwd/te1GSxsw1aTgE y9pxms2FXXhrblNCGrSUi4RUUqUm/ZtUl6hHw/3dVwQT7DpYUgchoGuxVSHJ6ixFz3S8 hLGhQTUJynOXW8e4LXLA8Y7wOsEXWCoyOsW7DPJIBfk98sFXr3ErPRXvkAv7I2yB7m2i 0p6WuJZwYhBVplXSlC7FXq/JrCUlfAmrVUIDtUjgYEYaaKvlstbO2WFC180u+8MaDrGo DR0A== X-Gm-Message-State: AOJu0Yw0lbIKU3xyrnIh/V6zabrCT5L9KHrOcohL3Gy7y0Ad9vpXZvPT pRKIWU0R0isPKvCNWxTNKZsHA7rqbmopomJFz/PF8l+Wuu9MimWK6vbu220QFBB3Oq13fB851tR rQQg= X-Received: by 2002:a50:d782:0:b0:567:f475:6c6b with SMTP id w2-20020a50d782000000b00567f4756c6bmr10048088edi.8.1710252536840; Tue, 12 Mar 2024 07:08:56 -0700 (PDT) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id d23-20020a056402001700b0056857701bf5sm2246086edu.81.2024.03.12.07.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:08:56 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, richard.henderson@linaro.org, Ilias Apalodimas , Sam Edwards , Ryan Chen , Chia-Wei Wang , Aspeed BMC SW team , Joel Stanley , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Shiji Yang , Bin Meng Subject: [PATCH 4/7 v2] arm: clean up v7 and v8 linker scripts for __rel_dyn_start/end Date: Tue, 12 Mar 2024 16:08:26 +0200 Message-Id: <20240312140832.1968215-5-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240312140832.1968215-1-ilias.apalodimas@linaro.org> References: <20240312140832.1968215-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 [0]. 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 [1]. [0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object") [1] https://sourceware.org/binutils/docs/ld/Expression-Section.html Suggested-by: Sam Edwards Signed-off-by: Ilias Apalodimas Reviewed-by: Sam Edwards Tested-by: Sam Edwards # Binary output identical Reviewed-by: Richard Henderson --- 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(-) -- 2.37.2 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 37f4cd27d79a..b1065ec8063d 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 11b6e7278a9c..16245fd4ac2f 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 Tue Mar 12 14:08:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 779732 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2040105wrt; Tue, 12 Mar 2024 07:09:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVO/gBWFR88ucSt/OlX+Zafhs6qaQjNL6BV9lT7zc6eZDtHyxuN3cp27FD2soOtPYoX6engEAkHOXQH7kr8+xz5 X-Google-Smtp-Source: AGHT+IFkHWlQJFL70SwNe+lWd4wzlyyonXCW0CiOAll+0p3C7vuGXdiQ+GLDsmKrQVhW3NpEj7l4 X-Received: by 2002:a05:600c:518a:b0:411:fe7d:ac4 with SMTP id fa10-20020a05600c518a00b00411fe7d0ac4mr224007wmb.24.1710252576194; Tue, 12 Mar 2024 07:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710252576; cv=none; d=google.com; s=arc-20160816; b=Uyzh/YYdMZjfkFD0RjCZ71S3KzZOgW0uDd97Je9ijrVIBgeYqQygkqP2AvrvJ/OKhg b3BBV06y3v+Y+phtK4EirEA0NZxKIMSBimKuFXPyixeYPLkowsS/sM6uJAMi+9cUxpTg xFOhDvKP1FaKhuBtReelpITlojAEKV+yhn7LGiOiduRBJw+kbOEcHTRQLRvwewr3SMu6 ZS03DcgFxESG4XEH/sgkWOry0G+TD4XOYL71Wk5UyQ/r0smUVGfGMA0vqX7JrbeHmyv7 tPAH1VFQzobvabHtnwjXwTTowR1dfwrvsk7mirk9YOqVNJCrqRdjgtU1Pf0qLnxRKllw IR2A== 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=EyTGDcjnbgrI/Feob4SwLA7ZO6R4QQDrl/SKUTNkZvw=; fh=Dl9U/cWBAjt0RA0ekDL4vfSYX5rQ4ZX9RknwKNQFT0M=; b=iKNUdEmAL34vsuu2Cl8JRzzQRxAVlSDSvqKzgJQGIYbyJprBXBty5hBFg+XpJNgegi pygH+e6V429HuPDyTB1RGMjEisdQYpPYultzBxBa09rYSvRgyPKvjpQXf+SsZ42zgHLZ bgRdUOiZ1qUzFBEh2hXxwvKB4KQAf1imKr9aRWAzQzac/FHpWdm+tjqTxr0OiafOJDfc v9u39IxeoObY0aA5X+/1FVlEjFRrC3yvBOn1qH1o72LG0LSMu3efIG/R20J7au3mtRAc RMiW7r40ozkSu/hJVrdsSHg5gvDkCAZVXRmaDoZZqyOBtq5GkwN+IF6sBVe6SaJY/mM2 /09w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iBp5ThKK; 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 e41-20020a05600c4ba900b0041333011186si912562wmp.214.2024.03.12.07.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:09:36 -0700 (PDT) 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=iBp5ThKK; 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 8A71C87FAD; Tue, 12 Mar 2024 15:09:08 +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="iBp5ThKK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B0EB387F78; Tue, 12 Mar 2024 15:09:07 +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-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (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 A789387F69 for ; Tue, 12 Mar 2024 15:09:02 +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-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-568107a9ff2so6257127a12.3 for ; Tue, 12 Mar 2024 07:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710252542; x=1710857342; 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=EyTGDcjnbgrI/Feob4SwLA7ZO6R4QQDrl/SKUTNkZvw=; b=iBp5ThKKi69dIKMAVr1mcufMFdeNwsQK1BCYmqqBGl0qkyH2FE/zzM3JQ/j2RXNsAl EuQ0ANlgK583TIDgydwJhzjFdZ10NXe8LgZZsxLuDi+fx2+sAtyBmPH5eFjIrzW3Csr7 Ffz8g523a9xksvql92CiYOiHziJAZqw91FSarafYW5N7zU0cP0TUAXrn8gM8/IzD0W7l dFCYOMdDVjim7C0Xvy+VGxUUmOZKOvmedsjTwhnRLoW7YllXIbbmAw7Uacm0kjEVF5L7 wjOQ62SD6Dkl1Rc/LaLn64kVlNxEfKBjD8JAAlGUQgEG96YlMaJyajy7MwGuu80189AQ 4/qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710252542; x=1710857342; 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=EyTGDcjnbgrI/Feob4SwLA7ZO6R4QQDrl/SKUTNkZvw=; b=WZVU1YP7IUSn5OgIN0vDcx44lDNSek3YtEb71TTIbeG7AaPSC9t/KtrmRtGbr0dHY+ BEKnFP8DjRDvgpLvBTqV5Tbb3HoG7fZ+LqjBWLFInCq5XPzxvag7BDt2qr28LlHPTT33 /bpKxkdqHE1sSGbpobJEDYB5AtjYN/oAup8dcY7pHZ/nFZmy/Woqnz5guQKGqFXnPbEN jPzZK/RePf0kIsRy7/xssefoExHMegiQpiFl6OpwcCWMFx5Emv5hGg92HYt9szFZ5WkE LbDfTBQJDdOc9IbU6Eog+43PDMnIpX29vNo2wBRaDHvNFwXEwvSQtI4aum0wml39nZz4 VaJg== X-Gm-Message-State: AOJu0Ywl0HDx+wvn9PsakEkbceuVKIPP4ijz0gilzUIk29qyPiUOOTvr RzEnRA0Uq76oOnKTucPkJ0Mko0sYNEWOHa3vBPKYbYpFgbyDMOsa690kXdkcKGIFbIFL6oprQR+ 8B00= X-Received: by 2002:a50:d618:0:b0:568:2ad2:5d96 with SMTP id x24-20020a50d618000000b005682ad25d96mr355184edi.40.1710252541919; Tue, 12 Mar 2024 07:09:01 -0700 (PDT) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id d23-20020a056402001700b0056857701bf5sm2246086edu.81.2024.03.12.07.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:09:01 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, richard.henderson@linaro.org, Ilias Apalodimas , Sam Edwards , Ryan Chen , Chia-Wei Wang , Aspeed BMC SW team , Joel Stanley , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Shiji Yang , Bin Meng Subject: [PATCH 5/7 v2] arm: fix __efi_runtime_start/end definitions Date: Tue, 12 Mar 2024 16:08:27 +0200 Message-Id: <20240312140832.1968215-6-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240312140832.1968215-1-ilias.apalodimas@linaro.org> References: <20240312140832.1968215-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 since [0]. 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. [0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object") Suggested-by: Sam Edwards Signed-off-by: Ilias Apalodimas Reviewed-by: Sam Edwards Tested-by: Sam Edwards # Binary output identical Reviewed-by: Richard Henderson --- 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(-) -- 2.37.2 diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index b1065ec8063d..df979986a5ef 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 16245fd4ac2f..fc0ba0ed9a84 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 Tue Mar 12 14:08:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 779733 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2040225wrt; Tue, 12 Mar 2024 07:09:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUJttX//9cmWlhPOUiY2gl5Vc+ILKjezL9+znHmIHCUMiJFEwzkfXsYCV3FeRLFkBZZzgC2g0K+IxIOZoQF9OSp X-Google-Smtp-Source: AGHT+IEM5cCOEQhrQpF9cql2eb34JTWY3Yd2y4W2BBabxveJ1I/lpIRI/ipiTR/DjKclTi2YHtdF X-Received: by 2002:a5d:4808:0:b0:33d:409b:5738 with SMTP id l8-20020a5d4808000000b0033d409b5738mr7208592wrq.26.1710252586534; Tue, 12 Mar 2024 07:09:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710252586; cv=none; d=google.com; s=arc-20160816; b=WGduKK5YL9DOrVpL2ZcXFvNXjJfQ85UE1TgJTszIR67ySHanie1RpwHrxDI8IWOeid FRY//o7S6+6pYCu3rMHPQ8APUQJbQHTTtASYLqsqB6DFRG7VfL4lthQYvFwiL1cgMGyb LC6PFsSmQfv5qYV6z5ju9xwQp/8ritmhpImTjaNArlrgPTHVqVYNRgEPMgkgZHjzRxPI CCbA17EdEnmShAlJob6/qpnv9O/DYnTaNVKKy86iAJrwm0U8KEM9Tm2Fr6FILjcMp+ox RUFiDL3wWW46X5k+Yf0jTJlXkP+MnUdMAhahZ7xkt/F/0s0xSUfSl/WZJMT16lY3MkZZ wCCA== 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=ZaScewqBQfQe1ZYJSJupnjWvoj3IezG3YAWy8EhJX64=; fh=Dl9U/cWBAjt0RA0ekDL4vfSYX5rQ4ZX9RknwKNQFT0M=; b=Dc4EzOagzdMg6R4c070859oxBTuuw0p2LEFNaFZxw5nlhed0AK9pZzOuK5vod3ki5G h9erM4lI6D2IktRC/PPdbHYHlocLhHGnMeRTR+vBWH8bQGmwAgejNr5kJTd0FcGsQkcP NrLlk9+M4m9xweBDsjlbOp/1VFKo9ZAtrQASg73ntF6N0uOq8CTDbjNkHO8cavgjof2o tqiBlA7ZenbixpETU+ZTf3wC2wjVozOaV9V8HoPbVzxdXlKL21Mav0rM/ms4cF7vJOUB eIi4UHezvQNmufilsx0qEcJJpmf1KcoI9jYwNrQSpiR8UHWYb+gZ17/jxbTUoVUyAbSs bY5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YQYoSpHg; 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 s11-20020adfdb0b000000b0033e925a81b5si2725758wri.731.2024.03.12.07.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:09:46 -0700 (PDT) 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=YQYoSpHg; 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 549A887FA0; Tue, 12 Mar 2024 15:09:11 +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="YQYoSpHg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C3EED87F8C; Tue, 12 Mar 2024 15:09:09 +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-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (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 B4F9B87FA0 for ; Tue, 12 Mar 2024 15:09:07 +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-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5684c3313cdso3224407a12.3 for ; Tue, 12 Mar 2024 07:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710252547; x=1710857347; 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=ZaScewqBQfQe1ZYJSJupnjWvoj3IezG3YAWy8EhJX64=; b=YQYoSpHgIXuFHcDWlNkpgafJZnAp/ofW3toU05xiAHfhwiRO78J3iYnW9/huRAJ/63 H9xhHNZ9fN9+SFLTrQGmo4Kp4e2fXoojRsWOeKLtiEO+bQMW32bKJ6CcDipzCXNZHx/i SOQnfpWPShN5px8kTufo4hCB95HXUfEmIV2hDRghqopBZe98f2rQgmF+TQkqJ48uJL5f srxJUf6RnTykjTE/B34T3oJQkTIXj6B2xm3MZzAeEUlDRTEjFbdsNVuYqSVxoXrflfBZ xmMuZCMIOmOWncyqXhe1FdyX2HTGeOSOJe29fHTCYGwmncGT1bfd7n9otyphgX6ZAS7X 1tdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710252547; x=1710857347; 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=ZaScewqBQfQe1ZYJSJupnjWvoj3IezG3YAWy8EhJX64=; b=DLQ+agHjy4WCyVUnjfiGrVOYlSkHlqHOT74TxAVdePJiFpQmERK4yB5K7ZDL5STR8E 8yqPGEmSs/2z8Z0Lnmt1ULCAus8D+61N8pkDaeQmmRqgc8UMZgKjiehEONenzeTnRFBB C9Xo89OHj1kmE4qpIe/CU6V5iENYwjuPWcjCsfNMFxT/KIcxOz4b1u20HFWzjOCOwBcn WHs2wtL2ww8iG/libTlEyo47kq1/NJlLhnwxk+BlMYsH5XQizQZ8oEqgJ3JDjfs2FqCh zEbudxbUIWZqjJ5vAmO7092ZausSHE7+kfCb9RLsvSaXt8mvP1XSpI8eJ+8blxayvvTB fHDw== X-Gm-Message-State: AOJu0Yxs6eFHIrgiWP1asexKxK4q2qSyksx5NCIChiPokJOc0gsfgNiG 9MeL+GIc+wS8n3ibcftAkF8JMa9hRDywTbRuArXu3fjo1KRU0N8IPPUtxVi+Vr2SELQRY42qYUk seD8= X-Received: by 2002:a50:8717:0:b0:567:9ddd:65c3 with SMTP id i23-20020a508717000000b005679ddd65c3mr6884379edb.29.1710252546958; Tue, 12 Mar 2024 07:09:06 -0700 (PDT) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id d23-20020a056402001700b0056857701bf5sm2246086edu.81.2024.03.12.07.09.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:09:06 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, richard.henderson@linaro.org, Ilias Apalodimas , Sam Edwards , Ryan Chen , Chia-Wei Wang , Aspeed BMC SW team , Joel Stanley , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Shiji Yang , Bin Meng Subject: [PATCH 6/7 v2] arm: move image_copy_start/end to linker symbols Date: Tue, 12 Mar 2024 16:08:28 +0200 Message-Id: <20240312140832.1968215-7-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240312140832.1968215-1-ilias.apalodimas@linaro.org> References: <20240312140832.1968215-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 since [0]. 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. [0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object") Suggested-by: Sam Edwards Signed-off-by: Ilias Apalodimas Tested-by: Sam Edwards # Binary output identical Reviewed-by: Richard Henderson --- arch/arm/cpu/armv8/u-boot-spl.lds | 7 ++----- arch/arm/cpu/armv8/u-boot.lds | 9 ++------- arch/arm/cpu/u-boot-spl.lds | 2 +- arch/arm/cpu/u-boot.lds | 9 ++------- arch/arm/lib/sections.c | 2 -- arch/arm/mach-aspeed/ast2600/u-boot-spl.lds | 2 +- arch/arm/mach-rockchip/u-boot-tpl-v8.lds | 7 ++----- arch/arm/mach-zynq/u-boot-spl.lds | 2 +- arch/arm/mach-zynq/u-boot.lds | 8 ++------ 9 files changed, 13 insertions(+), 35 deletions(-) -- 2.37.2 diff --git a/arch/arm/cpu/armv8/u-boot-spl.lds b/arch/arm/cpu/armv8/u-boot-spl.lds index 16fddb46e9cb..6417cbd08e2c 100644 --- a/arch/arm/cpu/armv8/u-boot-spl.lds +++ b/arch/arm/cpu/armv8/u-boot-spl.lds @@ -21,9 +21,9 @@ OUTPUT_ARCH(aarch64) ENTRY(_start) SECTIONS { + __image_copy_start = ADDR(.text); .text : { . = ALIGN(8); - __image_copy_start = .; CPUDIR/start.o (.text*) *(.text*) } >.sram @@ -51,10 +51,7 @@ SECTIONS KEEP(*(SORT(__u_boot_list*))); } >.sram - .image_copy_end : { - . = ALIGN(8); - *(.__image_copy_end) - } >.sram + __image_copy_end = .; .end : { . = ALIGN(8); diff --git a/arch/arm/cpu/armv8/u-boot.lds b/arch/arm/cpu/armv8/u-boot.lds index e737de761a9d..33f4624b561d 100644 --- a/arch/arm/cpu/armv8/u-boot.lds +++ b/arch/arm/cpu/armv8/u-boot.lds @@ -21,9 +21,9 @@ SECTIONS . = 0x00000000; . = ALIGN(8); + __image_copy_start = ADDR(.text); .text : { - *(.__image_copy_start) CPUDIR/start.o (.text*) } @@ -122,12 +122,7 @@ SECTIONS __efi_runtime_rel_stop = .; } - . = ALIGN(8); - - .image_copy_end : - { - *(.__image_copy_end) - } + __image_copy_end = .; .rela.dyn ALIGN(8) : { __rel_dyn_start = .; diff --git a/arch/arm/cpu/u-boot-spl.lds b/arch/arm/cpu/u-boot-spl.lds index fb2189d50dea..9ed62395a9c5 100644 --- a/arch/arm/cpu/u-boot-spl.lds +++ b/arch/arm/cpu/u-boot-spl.lds @@ -14,9 +14,9 @@ SECTIONS . = 0x00000000; . = ALIGN(4); + __image_copy_start = ADDR(.text); .text : { - __image_copy_start = .; *(.vectors) CPUDIR/start.o (.text*) *(.text*) diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index df979986a5ef..b6b19a4174fe 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -35,9 +35,9 @@ SECTIONS . = 0x00000000; . = ALIGN(4); + __image_copy_start = ADDR(.text); .text : { - *(.__image_copy_start) *(.vectors) CPUDIR/start.o (.text*) } @@ -153,12 +153,7 @@ SECTIONS __efi_runtime_rel_stop = .; } - . = ALIGN(4); - - .image_copy_end : - { - *(.__image_copy_end) - } + __image_copy_end = .; .rel.dyn ALIGN(4) : { __rel_dyn_start = .; 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-aspeed/ast2600/u-boot-spl.lds b/arch/arm/mach-aspeed/ast2600/u-boot-spl.lds index 37f0ccd92201..ada6570d9712 100644 --- a/arch/arm/mach-aspeed/ast2600/u-boot-spl.lds +++ b/arch/arm/mach-aspeed/ast2600/u-boot-spl.lds @@ -22,9 +22,9 @@ SECTIONS . = 0x00000000; . = ALIGN(4); + __image_copy_start = ADDR(.text); .text : { - __image_copy_start = .; *(.vectors) CPUDIR/start.o (.text*) *(.text*) diff --git a/arch/arm/mach-rockchip/u-boot-tpl-v8.lds b/arch/arm/mach-rockchip/u-boot-tpl-v8.lds index b7887194026e..8ff35b5c17cf 100644 --- a/arch/arm/mach-rockchip/u-boot-tpl-v8.lds +++ b/arch/arm/mach-rockchip/u-boot-tpl-v8.lds @@ -22,9 +22,9 @@ SECTIONS { . = 0x00000000; + __image_copy_start = ADDR(.text); .text : { . = ALIGN(8); - *(.__image_copy_start) CPUDIR/start.o (.text*) *(.text*) } @@ -44,10 +44,7 @@ SECTIONS KEEP(*(SORT(__u_boot_list*))); } - .image_copy_end : { - . = ALIGN(8); - *(.__image_copy_end) - } + __image_copy_end = .; .end : { . = ALIGN(8); diff --git a/arch/arm/mach-zynq/u-boot-spl.lds b/arch/arm/mach-zynq/u-boot-spl.lds index 8c18d3f91f4b..d96a57702886 100644 --- a/arch/arm/mach-zynq/u-boot-spl.lds +++ b/arch/arm/mach-zynq/u-boot-spl.lds @@ -18,9 +18,9 @@ ENTRY(_start) SECTIONS { . = ALIGN(4); + __image_copy_start = ADDR(.text); .text : { - __image_copy_start = .; *(.vectors) CPUDIR/start.o (.text*) *(.text*) diff --git a/arch/arm/mach-zynq/u-boot.lds b/arch/arm/mach-zynq/u-boot.lds index fc0ba0ed9a84..f739d1cfce85 100644 --- a/arch/arm/mach-zynq/u-boot.lds +++ b/arch/arm/mach-zynq/u-boot.lds @@ -14,9 +14,9 @@ SECTIONS . = 0x00000000; . = ALIGN(4); + __image_copy_start = ADDR(.text); .text : { - *(.__image_copy_start) *(.vectors) CPUDIR/start.o (.text*) } @@ -59,11 +59,7 @@ SECTIONS __efi_runtime_rel_stop = .; } - . = ALIGN(8); - .image_copy_end : - { - *(.__image_copy_end) - } + __image_copy_end = .; .rel.dyn ALIGN(8) : { __rel_dyn_start = .; From patchwork Tue Mar 12 14:08:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 779734 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2040333wrt; Tue, 12 Mar 2024 07:09:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX4rN3O+7qNp+2K8IZwRIor4/7vT2DGlrU3J9cPTs059HR4s0dKiL4sBR9YM0yCeyt2fPpaTCGoz/mbUmZES27L X-Google-Smtp-Source: AGHT+IFNr0CBIi99/P1ZYj5BDdK5HFTAnfki4WGremCVZ4CLnPiPYpaXcQAIHy3vtMWcpeNe+FaF X-Received: by 2002:a05:6000:1288:b0:33e:76a1:d02a with SMTP id f8-20020a056000128800b0033e76a1d02amr1228745wrx.21.1710252596870; Tue, 12 Mar 2024 07:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710252596; cv=none; d=google.com; s=arc-20160816; b=P9eu30Bvcu6zATQtNs87MYvEpqEHXTVyvEKb4g23mrrHQeorggKUCOKuy20CH/6rV0 WBSwMVomo52SwiLk6o8wixr6aw/8EwCIL57FQRRBvkmNjxPiFCRvmatwUlfmKuQcWNEX rZG+rPsLTjsrUsn3dRrBrIJr8+CpuXk/s7+5YniJBUjUxtrDSIfdWND1NRsseoRSAf06 aYK4rMhUR6OT/8a6K2CrVEX5JoHIaqAFUMhrdZZq0BD7wV43ZJnYSzeMl6XGuTPwdZnp LHFy19J0ezdM5sLmyewrz7Slt4xKuORPA9lTHlZxDcM4Ae7mu6phUj9asDZnvpWvyxuK 5yCg== 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=EJRs1vrJJ4CKMJShK+cbz2zWdTiiQf+L3+YxItkCyZY=; fh=YgAnvytc3PkIme27WTI0tmSPC4jrks+Z9IcIvi2eGZA=; b=nv9bEw0Oq0xM32L0Bc64xsUX/9bqDMalACxO8P6gQD1ipIVCo+q52R9i1ieb6t/543 Nz+JM/sey5YZg2VlVWGEb7Ry576BazpM3DeylFiONOQfp4DCnPzaEThoZwRrYLyXmxB8 qf8xk9By2wGdgZXcjFwxnGqKOFXG6TDOs9tWrGkUF5bD3T0P9D4WgAmD9N0MpPDBr+Mw D9rbswtHrcXUJSjIk6nGFunVTNn/NxVBn2DgHnPMyOZ68HApaRVPZh7y6MvOdLMWV+LL 8IhD06dov8u21s+3a8dnz7ARtvdDcKChSvkHx/O6Gz6aEga8sfPCpoFB8KUziN4tXUru ro+g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BvlxnZzR; 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 a15-20020a5d456f000000b0033e1bcd3ae8si366947wrc.160.2024.03.12.07.09.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:09:56 -0700 (PDT) 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=BvlxnZzR; 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 7991987F8C; Tue, 12 Mar 2024 15:09:15 +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="BvlxnZzR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C19BE87F4B; Tue, 12 Mar 2024 15:09:14 +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-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 CB9DE87F75 for ; Tue, 12 Mar 2024 15:09:12 +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-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-56877761303so742476a12.3 for ; Tue, 12 Mar 2024 07:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710252552; x=1710857352; 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=EJRs1vrJJ4CKMJShK+cbz2zWdTiiQf+L3+YxItkCyZY=; b=BvlxnZzReujRXFLr5ylhePJzTrJYB/Wp4wRgPIHXLB4NXq1kApFEdEQgGnTdnCjWkf GpHYvdE1SPyrnDibiKDiu7VKurcr6Jgl0iixa0/7hkkp9JgPCh56eYnwTzMVDoy6pO+V Y3PlmrVX2HcN1QFM6GiKOagrR1lBkg7UyigG1Cc8fzKRVQlNThDvAN7zqYanXVxSQMEF SKYfs/1P1jgk5naYd4vgjYLhCGpOa+t92RLHtg3gbC4fNhZzuOaJzCQeoQVy/d6PXmJy MTE95Bt5de6PmQPMg+2ujotMWX3P3Y55zMdfcQ+gEifJJ9UdFjrtZVAlAGgJQacaj0Tr BX3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710252552; x=1710857352; 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=EJRs1vrJJ4CKMJShK+cbz2zWdTiiQf+L3+YxItkCyZY=; b=IhiO+tYbdUOU01aOZxMiAnHT9jvGeb0mvDxc7wVKVO/WV8+tPcxTBOVTyWUw5/avko i3uacgcULtNq6cdPsxFxxjNnPoioQzIAfjjBbx81DEQXbYn6pr5Un4owcZpdDwlQ9sCU SvGTRGnBeH1Qb3zcFhpB8Pq65j03LCY/7Lo3UbslggpQ7pZWpYJy/3tDt8AxLDrodn24 xlfOn17iAhFpZoGOuZypeqa+obGaYJwWXqlUrkIg3LzBcF9Dmhrcw2No0ht8jloddi+T 2V1GuCCD6qPzgUjrL8x+54/cZpc5QvwHNKtWzECzESNJfOIm0G0ZptR0LHul99JVBiO4 WAmQ== X-Gm-Message-State: AOJu0YwoYaR4Ih8bMGbKGQqVEXVTj5G5dAROcPirdspQq9BFDlAdCQxx 8AI+LnPQgkWP35dD9YMNhl1L5QJlm0SirWR5ahxcUy/r2J2U0hBip9EkIVQzRYDTs+imJaVp+YA /p88= X-Received: by 2002:a50:9ee9:0:b0:564:5150:76a2 with SMTP id a96-20020a509ee9000000b00564515076a2mr1478384edf.4.1710252552063; Tue, 12 Mar 2024 07:09:12 -0700 (PDT) Received: from hades.. (ppp046103107123.access.hol.gr. [46.103.107.123]) by smtp.gmail.com with ESMTPSA id d23-20020a056402001700b0056857701bf5sm2246086edu.81.2024.03.12.07.09.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:09:11 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com, cfsworks@gmail.com Cc: caleb.connolly@linaro.org, sumit.garg@linaro.org, richard.henderson@linaro.org, Ilias Apalodimas , Ryan Chen , Chia-Wei Wang , Aspeed BMC SW team , Joel Stanley , Simon Glass , Philipp Tomsich , Kever Yang , Michal Simek , Yegor Yefremov , Heinrich Schuchardt , Sam Edwards , Shiji Yang , Bin Meng Subject: [PATCH 7/7 v2] arm: remove redundant section alignments Date: Tue, 12 Mar 2024 16:08:29 +0200 Message-Id: <20240312140832.1968215-8-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240312140832.1968215-1-ilias.apalodimas@linaro.org> References: <20240312140832.1968215-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 Previous patches cleaning up linker symbols, also merged any explicit . = ALIGN(x); into section definitions -- e.g '.bss ALIGN(x) :' instead of '. - ALIGN(x); bss : {...}' However, if the output address is not specified then one will be chosen for the section. This address will be adjusted to fit the alignment requirement of the output section following the strictest alignment of any input section contained within the output section. So let's get rid of the redundant ALIGN directives. It's worth noting that the only platform the alignment is preserved on .rel.dyn is mach-zynq, which was explicitly aligning that section on an 8b boundary instead of the automatically chosen 4b alignment. Signed-off-by: Ilias Apalodimas --- arch/arm/cpu/armv8/u-boot.lds | 6 +++--- arch/arm/cpu/u-boot.lds | 6 +++--- arch/arm/mach-rockchip/u-boot-tpl-v8.lds | 2 +- arch/arm/mach-zynq/u-boot.lds | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) -- 2.37.2 diff --git a/arch/arm/cpu/armv8/u-boot.lds b/arch/arm/cpu/armv8/u-boot.lds index 33f4624b561d..ccdd1966cfbc 100644 --- a/arch/arm/cpu/armv8/u-boot.lds +++ b/arch/arm/cpu/armv8/u-boot.lds @@ -115,7 +115,7 @@ SECTIONS KEEP(*(SORT(__u_boot_list*))); } - .efi_runtime_rel ALIGN(8) : { + .efi_runtime_rel : { __efi_runtime_rel_start = .; *(.rel*.efi_runtime) *(.rel*.efi_runtime.*) @@ -124,7 +124,7 @@ SECTIONS __image_copy_end = .; - .rela.dyn ALIGN(8) : { + .rela.dyn : { __rel_dyn_start = .; *(.rela*) __rel_dyn_end = .; @@ -132,7 +132,7 @@ SECTIONS _end = .; - .bss ALIGN(8): { + .bss : { __bss_start = .; *(.bss*) __bss_end = .; diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index b6b19a4174fe..a9fcbbf22e96 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -43,7 +43,7 @@ SECTIONS } /* This needs to come before *(.text*) */ - .efi_runtime ALIGN(4) : { + .efi_runtime : { __efi_runtime_start = .; *(.text.efi_runtime*) *(.rodata.efi_runtime*) @@ -146,7 +146,7 @@ SECTIONS KEEP(*(SORT(__u_boot_list*))); } - .efi_runtime_rel ALIGN(4) : { + .efi_runtime_rel : { __efi_runtime_rel_start = .; *(.rel*.efi_runtime) *(.rel*.efi_runtime.*) @@ -155,7 +155,7 @@ SECTIONS __image_copy_end = .; - .rel.dyn ALIGN(4) : { + .rel.dyn : { __rel_dyn_start = .; *(.rel*) __rel_dyn_end = .; diff --git a/arch/arm/mach-rockchip/u-boot-tpl-v8.lds b/arch/arm/mach-rockchip/u-boot-tpl-v8.lds index 8ff35b5c17cf..e67416c09c1c 100644 --- a/arch/arm/mach-rockchip/u-boot-tpl-v8.lds +++ b/arch/arm/mach-rockchip/u-boot-tpl-v8.lds @@ -53,7 +53,7 @@ SECTIONS _image_binary_end = .; - .bss ALIGN(8) : { + .bss : { __bss_start = .; *(.bss*) __bss_end = .; diff --git a/arch/arm/mach-zynq/u-boot.lds b/arch/arm/mach-zynq/u-boot.lds index f739d1cfce85..111410215072 100644 --- a/arch/arm/mach-zynq/u-boot.lds +++ b/arch/arm/mach-zynq/u-boot.lds @@ -22,7 +22,7 @@ SECTIONS } /* This needs to come before *(.text*) */ - .efi_runtime ALIGN(4) : { + .efi_runtime : { __efi_runtime_start = .; *(.text.efi_runtime*) *(.rodata.efi_runtime*) @@ -52,7 +52,7 @@ SECTIONS KEEP(*(SORT(__u_boot_list*))); } - .efi_runtime_rel ALIGN(4) : { + .efi_runtime_rel : { __efi_runtime_rel_start = .; *(.rel*.efi_runtime) *(.rel*.efi_runtime.*)