The sandbox doesn't populate the EFI lists so explicitly set the list
start and end symbols to indicate that the lists are empty. This
simplifies the linker scripts, removed references to non-existant
sections and removes '.' prefixed sections that conflicted with clang's
ASAN.

Signed-off-by: Andrew Scull <asc...@google.com>
---
 arch/sandbox/cpu/u-boot.lds | 32 +++++---------------------------
 arch/sandbox/lib/Makefile   |  2 +-
 arch/sandbox/lib/sections.c | 13 -------------
 3 files changed, 6 insertions(+), 41 deletions(-)
 delete mode 100644 arch/sandbox/lib/sections.c

diff --git a/arch/sandbox/cpu/u-boot.lds b/arch/sandbox/cpu/u-boot.lds
index 6d710618f5..dd675cc3d2 100644
--- a/arch/sandbox/cpu/u-boot.lds
+++ b/arch/sandbox/cpu/u-boot.lds
@@ -19,33 +19,11 @@ SECTIONS
                *(.u_boot_sandbox_getopt_end)
        }
 
-       .__efi_runtime_start : {
-               *(.__efi_runtime_start)
-       }
-
-       .efi_runtime : {
-               *(efi_runtime_text)
-               *(efi_runtime_data)
-       }
-
-       .__efi_runtime_stop : {
-               *(.__efi_runtime_stop)
-       }
-
-       .efi_runtime_rel_start :
-       {
-               *(.__efi_runtime_rel_start)
-       }
-
-       .efi_runtime_rel : {
-               *(.relefi_runtime_text)
-               *(.relefi_runtime_data)
-       }
-
-       .efi_runtime_rel_stop :
-       {
-               *(.__efi_runtime_rel_stop)
-       }
+       /* Sandbox has empty EFI runtime lists. */
+       __efi_runtime_start = .;
+       __efi_runtime_stop = __efi_runtime_start;
+       __efi_runtime_rel_start = .;
+       __efi_runtime_rel_stop = __efi_runtime_rel_start;
 
        .dynsym :
        {
diff --git a/arch/sandbox/lib/Makefile b/arch/sandbox/lib/Makefile
index a2bc5a7ee6..05f06180f8 100644
--- a/arch/sandbox/lib/Makefile
+++ b/arch/sandbox/lib/Makefile
@@ -5,7 +5,7 @@
 # (C) Copyright 2002-2006
 # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 
-obj-y  += fdt_fixup.o interrupts.o sections.o
+obj-y  += fdt_fixup.o interrupts.o
 obj-$(CONFIG_PCI)      += pci_io.o
 obj-$(CONFIG_CMD_BOOTM) += bootm.o
 obj-$(CONFIG_CMD_BOOTZ) += bootm.o
diff --git a/arch/sandbox/lib/sections.c b/arch/sandbox/lib/sections.c
deleted file mode 100644
index 2559eeea38..0000000000
--- a/arch/sandbox/lib/sections.c
+++ /dev/null
@@ -1,13 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2013 Albert ARIBAUD <albert.u.b...@aribaud.net>
- *
- */
-#include <linux/compiler.h>
-
-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");
-- 
2.35.1.1094.g7c7d902a7c-goog

Reply via email to