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 */