From patchwork Wed Feb 28 10:48: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: 776457 Delivered-To: patch@linaro.org Received: by 2002:adf:e94d:0:b0:33d:f458:43ce with SMTP id m13csp227133wrn; Wed, 28 Feb 2024 02:50:06 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVMlU9GrC0jhL+X5mucf90OVXIQtcnQiSHFhXtXZsYJzLSVTvpoTJ9uR8xNXQkfgxlMyuoMaYFPv94w0IulIpdV X-Google-Smtp-Source: AGHT+IG1R2qPmujyO0WKWrTJDzGotldYXtrmyZayJ8zmi6soqOhX7XVj0YB6PDmRhE+8PW5WtvkU X-Received: by 2002:a05:600c:5021:b0:412:a451:d32f with SMTP id n33-20020a05600c502100b00412a451d32fmr6620459wmr.20.1709117406269; Wed, 28 Feb 2024 02:50:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709117406; cv=none; d=google.com; s=arc-20160816; b=t2l3wx1O2N0AzYZxWQGWzaQOFbNT589U8tcmnwZupt+YTTaXVWuidc4FiWg6i3tE4l Kj2n1sfp3P1nyDJA0kxe89zOPgIFYOk4LcZn1jgXhM/SyN+gOfs/bJUDiVvOhXkTI3iA rnKHiOliQ8snNKyOojdl3TayNX4Xy+TL67fkBQK9JOtlzOZe3d4G3zuADPDg5S86J6Sf OMBV3RH08UavvEJXyTiNJf0roO4Dnz2Edn4TlT9/MXn7XKXAdkrkKwef3qxucOssE14U hLviaTB/pxPlgoh5OYKRoXHNiDFZx7xEajEigIKlK7ubXLbAuXmet8uOjDpDazzxl3PQ TAgQ== 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=Qc7Bwm8F6A6m2T1dNMTqiCGSn6FsxQ9ndhZ8EDBeZTo=; b=GALbGX7yWYv4ZP7sn3ydXUoSHQhfBvvjFPkXxQjIBf+h6uIKlaN63HETa5L38Si90Y SvEoroC4hZ25/bBMlRo7J1i0wcC2Qdkt+DWh7LL2xcVbDBwOxMzUtOYh3z8aJeYWaZ8M w7/hfY4xOR9h80qDw8KZkS2lQUvxQZx5cGvuq4vuXVC4QJrP3xP0nnj5gc9w91UrAr5s nNZhVD44ZPMiQzP3c6/+3MZtYnCDOkEkwJ3om/TqW1uMHvXmOCl/b5Xb7KoPoWyeBcuP BQbQGWh8Yr+gtF4E9wfWUlR9hNYiPHIhhcDZdI1ppjQ44VuBsLqArdyDnt9dq/8F6TKM uUrg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YMtrQtOR; 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 y21-20020a1c4b15000000b00412ae3762b6si694518wma.233.2024.02.28.02.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 02:50:06 -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=YMtrQtOR; 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 BD5598808F; Wed, 28 Feb 2024 11:48:56 +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="YMtrQtOR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 54C7A8807F; Wed, 28 Feb 2024 11:48:55 +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-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (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 9CAE387D6B for ; Wed, 28 Feb 2024 11:48: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=ilias.apalodimas@linaro.org Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2d23d301452so72888781fa.1 for ; Wed, 28 Feb 2024 02:48:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709117330; x=1709722130; 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=YMtrQtORRocxykgDgayKmDy63p7afPYKA1YiwuX/v8/PI4FcO7d6bcieLiIdFTATU2 OhdqrTzGNaidDAmUn9lMG8UQMaWXLRWMg6A+Zgh9WXfmTovQSzTRsa82L/WmgK8Pvje4 m3Sf1MORlsncc0QIcOUU2ta+mkMACmlYcwOvFgYbr6Iwi4LA4kIIho0e+YkJ7WSbPQ7h Zgoo5O22hMcIe6WnFWO1ZegNzLwaSF5GUKFjAE/hmIMJbvhD9AzVnPNU5AdRni9xQ6lA 3SOHXd6AhfIm7dDwJV/97Zl61eP6Ik4NO4Y+J6rwvLR9jMLBfuwUrnl+3tg7L/jl9q2u rShw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709117330; x=1709722130; 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=SfT2nP4cylAZO1ZeO1DwLtP3KUN8Q9Y/Mq0AtoLfFDf6vhV3B/eMc2jP3qU3x3iIoL zjeYYXtLPrjcgiLjBA0k1ts0JDbXwShVtWa45WQyGrF9hACvSyDVhvIYhXc2C3HPGN34 PoVCTQosL90YeX3V3VSQUfLcCavIsKVCNlBeSZf/8NHxeAkto5li8U6yJp7xXbHl8mlT oz3knnSl0fkBgLXt+d+79wHSj6FcoLWXHQv6qySVwEVMAUUpgV1nTwTtydRDfvFw100r cv4iwMpmr+vRfhJDwSUd4HkpW9I9PNoUPLRouZtduBH06pA4QSYlX5x2kJVlEWKDGV1s LWDA== X-Gm-Message-State: AOJu0YxfRB8TByXaMglY5LI4NaGsyn2BZEYUsmeRcD7xWoVv1CoDKzyV cvm878MWcqVbPjsnOiZgC9uy+W3tyT9/GHnwHf4ojgwi1qzjrT0XEfO6cifQghL0NlNaZ5dBN4l Z1Iw= X-Received: by 2002:a2e:9586:0:b0:2d2:b68f:661 with SMTP id w6-20020a2e9586000000b002d2b68f0661mr1096927ljh.28.1709117330199; Wed, 28 Feb 2024 02:48:50 -0800 (PST) Received: from hades.. ([78.87.146.252]) by smtp.gmail.com with ESMTPSA id x1-20020a05600c2a4100b00410dd253008sm1680314wme.42.2024.02.28.02.48.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 02:48:49 -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 , Jorge Ramirez-Ortiz , Yegor Yefremov , Heinrich Schuchardt , Shiji Yang , Bin Meng Subject: [RFC PATCH 5/6] arm: fix __efi_runtime_start/end definitions Date: Wed, 28 Feb 2024 12:48:08 +0200 Message-Id: <20240228104811.1366694-6-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20240228104811.1366694-1-ilias.apalodimas@linaro.org> References: <20240228104811.1366694-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 --- 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 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 */