From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45900C433EF for ; Thu, 14 Apr 2022 14:00:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 05CCC83E82; Thu, 14 Apr 2022 15:59:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com 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=google.com header.i=@google.com header.b="roTtZyWX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 087D783EAC; Thu, 14 Apr 2022 15:59:52 +0200 (CEST) Received: from mail-wm1-x349.google.com (mail-wm1-x349.google.com [IPv6:2a00:1450:4864:20::349]) (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 69280805FB for ; Thu, 14 Apr 2022 15:59:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=31ChYYgYKBp89RBTKKFNNFKD.BNLT-ANNSKHRSR.CDMW.CD@flex--ascull.bounces.google.com Received: by mail-wm1-x349.google.com with SMTP id r83-20020a1c4456000000b0038ebc45dbfcso2488351wma.2 for ; Thu, 14 Apr 2022 06:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=3hKlcZB++ucclOv8UC4MZ8L101Qssw9cXnwLEZsd8nA=; b=roTtZyWXJLniD6wVEUK5jH0dLqnfBkk4Fd5XqObJ3UYjQfsVLiBSsqaOfNnbowFNGE FuVE+BroFf8zhfEhYclIXt/CASMCCJOKydG0VwAKLJb4DbL+00pHpKbCijIU6axAdOT1 uenaJ6C5Z25mdcztfiFFyuXEtg6/jfZ1jkBWdrPWkc4Y2kHM9NehkWuhh21lU/Oy5rIH GhNRuqCoC9+4qmtthp8DZz+cdwZMoFJZMkEBvRxbYw9O0ZAV44apJX3MzB7YVOyv5DXl QIU9LgW/CnbrEiflSN7fQENJsSwYT3YXU86ntVL91fnuTrHwkv4rNKaF8wLLlpHfKMl1 ZdRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=3hKlcZB++ucclOv8UC4MZ8L101Qssw9cXnwLEZsd8nA=; b=Pp/qjDiK49VAoV3ThD2qnmgAzTfJD2aPuDMWmoR6zgQWri3V/3krZXSZBcQnnGX3oR PwfAQmrTAvJDyAwsy6rMo87X+pz0LJYudFjwIjAbix779oWUMjWS+M1UWXl34mox5cQa JCxocPBViPSITHLZ3sDmD52R69oaKCVQJPxbGHwpiB0c0KbGWAWxSyECXLeDVqajpHbx 4UqIzkTt9wMM3fShH3qgx4vj1EaBgzevSgGA8fJBLgdzoA5hVvUmCBD180JR/qMV59tI L73PVsJh8w2zg76e+v+Z/TrVlaECuQIapU6HEgCqnHOf2b2QBvyvztsugaMkmlSXG0vJ Pn5w== X-Gm-Message-State: AOAM530dELQF3i0BS7CZwSBfK7K2F488JJ46ftdqbMcNLmcvVKMus4Il dyg7SWVIODkt6feoXLEBgH2FaC0RqjtLmC4Qh5RnvyYtpneJaHUC4XL+yv3Tuo6FVp2/y91fusp +9TAv5jd3DfWL/r1jjgdLx3riU/QFs4jPom4wzs4ZK8/VcTnDBDgYRoa74/c= X-Google-Smtp-Source: ABdhPJwLQqapcEZ+8RY4MOF7Dxs1W5U7IoBT5NKOnJ1Bgu6FkNzVPrz5rsdkeEeCY0OZQuzOJIA24+04VSo= X-Received: from ascull.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1510]) (user=ascull job=sendgmr) by 2002:a5d:59a2:0:b0:204:20d9:a5b9 with SMTP id p2-20020a5d59a2000000b0020420d9a5b9mr2167551wrr.560.1649944788938; Thu, 14 Apr 2022 06:59:48 -0700 (PDT) Date: Thu, 14 Apr 2022 13:59:31 +0000 In-Reply-To: <20220414135941.1732585-1-ascull@google.com> Message-Id: <20220414135941.1732585-3-ascull@google.com> Mime-Version: 1.0 References: <20220414135941.1732585-1-ascull@google.com> X-Mailer: git-send-email 2.35.1.1178.g4f1659d476-goog Subject: [PATCH v2 02/12] sandbox: Rename EFI runtime sections From: Andrew Scull To: u-boot@lists.denx.de Cc: sjg@chromium.org, xypron.glpk@gmx.de, Andrew Scull Content-Type: text/plain; charset="UTF-8" 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.5 at phobos.denx.de X-Virus-Status: Clean Rename the sections used for placing the EFI runtime so they don't start with a '.'. ELF says that sections starting with a '.' are reserved for system use whereas they are actually user sections in sandbox. When they weren't user sections, clang's ASAN added redzones to the sections and the extra padding meant that the relocation list was no longer in the expected format. Naming the sections as user sections resolves this issue. Signed-off-by: Andrew Scull --- arch/sandbox/cpu/u-boot.lds | 22 ++++++++++------------ arch/sandbox/lib/sections.c | 8 ++++---- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/arch/sandbox/cpu/u-boot.lds b/arch/sandbox/cpu/u-boot.lds index 64db801018..7abe232ad9 100644 --- a/arch/sandbox/cpu/u-boot.lds +++ b/arch/sandbox/cpu/u-boot.lds @@ -19,33 +19,31 @@ SECTIONS *(.u_boot_sandbox_getopt_end) } - .__efi_runtime_start : { - *(.__efi_runtime_start) + efi_runtime_start : { + *(___efi_runtime_start) } - .efi_runtime : { + efi_runtime : { *(.text.efi_runtime*) *(.rodata.efi_runtime*) *(.data.efi_runtime*) } - .__efi_runtime_stop : { - *(.__efi_runtime_stop) + efi_runtime_stop : { + *(___efi_runtime_stop) } - .efi_runtime_rel_start : - { - *(.__efi_runtime_rel_start) + efi_runtime_rel_start : { + *(___efi_runtime_rel_start) } - .efi_runtime_rel : { + efi_runtime_rel : { *(.rel*.efi_runtime) *(.rel*.efi_runtime.*) } - .efi_runtime_rel_stop : - { - *(.__efi_runtime_rel_stop) + efi_runtime_rel_stop : { + *(___efi_runtime_rel_stop) } .dynsym : diff --git a/arch/sandbox/lib/sections.c b/arch/sandbox/lib/sections.c index 2559eeea38..2f2f3fbfdb 100644 --- a/arch/sandbox/lib/sections.c +++ b/arch/sandbox/lib/sections.c @@ -5,9 +5,9 @@ */ #include -char __efi_runtime_start[0] __section(".__efi_runtime_start"); -char __efi_runtime_stop[0] __section(".__efi_runtime_stop"); +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"); + __section("___efi_runtime_rel_start"); char __efi_runtime_rel_stop[0] - __section(".__efi_runtime_rel_stop"); + __section("___efi_runtime_rel_stop"); -- 2.35.1.1178.g4f1659d476-goog