From patchwork Mon Dec 4 21:28:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 844477 X-Patchwork-Delegate: agraf@suse.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="cVgba0Nl"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yrJD11rHsz9s7f for ; Tue, 5 Dec 2017 08:38:57 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id D2C72C2209D; Mon, 4 Dec 2017 21:30:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8A4B8C21D79; Mon, 4 Dec 2017 21:29:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 73B71C22061; Mon, 4 Dec 2017 21:28:52 +0000 (UTC) Received: from mail-it0-f66.google.com (mail-it0-f66.google.com [209.85.214.66]) by lists.denx.de (Postfix) with ESMTPS id EBDBDC22009 for ; Mon, 4 Dec 2017 21:28:48 +0000 (UTC) Received: by mail-it0-f66.google.com with SMTP id x28so16405752ita.0 for ; Mon, 04 Dec 2017 13:28:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=JAeQ6ObFuOkfYnU1CZ5X9AVVHLS/JOvfj7lTS1x6fS8=; b=cVgba0NlRkclsTTki6OLIRVznnsi8nToSSbNAF1f8aCR11eE/j2IHhrjM+8gfbO5hB UbFOO0cmmndwjLj9jPYPpRb59Sh4jap7oL59+snbam2tS+fBEep9E4H7xIu1MC1S6JU2 bH4gkQsLEz8Zrg7cMNiseesq9bc+TAIZmJMSuXs9ms+658iwhP72jWJ8+E+Ho8MKOUVT Xiquvdy2qRU8fFQkhrHfaXlRt5nxNA8HVJkCRy98ZD/A7QLWOS+0cQhtJDftvzSNIIZl BLjb+pP9qIVdGVjLD/PWZUhZIi4mK/wg99UHyKDjEzYbjDxvpwht0KzL7AJp8/gP1PV2 j8Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=JAeQ6ObFuOkfYnU1CZ5X9AVVHLS/JOvfj7lTS1x6fS8=; b=dsB2K3KWDdMCrr9sKeWAeRrW0bjUKNqRlqs7axddc1m2uFauhAM8XGalEduJmja9Sc 1f0l96Nx3IjCygjbkEyv2DO5apg+hRMJbmxQFecE4ISzvLCx7U5y9LaKmbiE6ZlfnEPE hPZDMu148T5BomWsa7lMlcLsfCQJGDULZzAPSaMxc+sowDE4ASTdg+G4JtZA6hMCdCzE EyCJO1RY85Sl+J/ZfQYy6rn7M8VAiaDKHq3Ri5CAErx8uls9PN7Tn7/voaJMsT7oB2iw rTkx0N3TRwETCK7q+aC+3TeTuLsgA7pdt6THuBF+DCwhAKw92JXxFfzHL/+Eiy0gk5pS eYqg== X-Gm-Message-State: AJaThX4XwuXR1NDPCw4YebnlpMKCo2+XyxDeVgjpfU0wUZJcZfjoO1rx XaMVLQFNSpXcdI42VlXWfT45MA== X-Google-Smtp-Source: AGs4zMZZkJ44Bs4MzkMwkxuHccwBfxm0zeANtRPYk8JxsS8BVvCjiwNKemyL1d5GsKW4sW+hKdv1wA== X-Received: by 10.107.132.19 with SMTP id g19mr24551063iod.47.1512422927388; Mon, 04 Dec 2017 13:28:47 -0800 (PST) Received: from kiwi.bld.corp.google.com ([100.67.80.24]) by smtp.gmail.com with ESMTPSA id f193sm4250828ita.27.2017.12.04.13.28.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Dec 2017 13:28:46 -0800 (PST) Received: by kiwi.bld.corp.google.com (Postfix, from userid 121222) id EE567143C41; Mon, 4 Dec 2017 14:28:45 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Mon, 4 Dec 2017 14:28:25 -0700 Message-Id: <20171204212832.130100-10-sjg@chromium.org> X-Mailer: git-send-email 2.15.0.531.g2ccb3012c9-goog In-Reply-To: <20171204212832.130100-1-sjg@chromium.org> References: <20171204212832.130100-1-sjg@chromium.org> Cc: Andy Shevchenko , Heinrich Schuchardt , Alexander Graf Subject: [U-Boot] [PATCH v2 09/16] efi: sandbox: Add required linker sections X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The EFI loader code requires certain linker sections to exist. Add these for sandbox so that the EFI loader code will link. Signed-off-by: Simon Glass --- Changes in v2: None arch/sandbox/cpu/u-boot.lds | 29 +++++++++++++++++++++++++++++ arch/sandbox/lib/Makefile | 2 +- arch/sandbox/lib/sections.c | 12 ++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 arch/sandbox/lib/sections.c diff --git a/arch/sandbox/cpu/u-boot.lds b/arch/sandbox/cpu/u-boot.lds index 7e92b4ac66..38a74bcaf4 100644 --- a/arch/sandbox/cpu/u-boot.lds +++ b/arch/sandbox/cpu/u-boot.lds @@ -19,6 +19,35 @@ SECTIONS __u_boot_sandbox_option_end = .; __bss_start = .; + + .__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) + } + } INSERT BEFORE .data; diff --git a/arch/sandbox/lib/Makefile b/arch/sandbox/lib/Makefile index 2e7802feac..d2171579b7 100644 --- a/arch/sandbox/lib/Makefile +++ b/arch/sandbox/lib/Makefile @@ -7,7 +7,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += interrupts.o +obj-y += interrupts.o sections.o ifndef CONFIG_SPL_BUILD obj-$(CONFIG_PCI) += pci_io.o endif diff --git a/arch/sandbox/lib/sections.c b/arch/sandbox/lib/sections.c new file mode 100644 index 0000000000..6455e0f088 --- /dev/null +++ b/arch/sandbox/lib/sections.c @@ -0,0 +1,12 @@ +/* + * Copyright 2013 Albert ARIBAUD + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +char __efi_runtime_start[0] __attribute__((section(".__efi_runtime_start"))); +char __efi_runtime_stop[0] __attribute__((section(".__efi_runtime_stop"))); +char __efi_runtime_rel_start[0] + __attribute__((section(".__efi_runtime_rel_start"))); +char __efi_runtime_rel_stop[0] + __attribute__((section(".__efi_runtime_rel_stop")));