From patchwork Fri Sep 5 17:01:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 244 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757091731; bh=Tn/F3KUgjrxuhaVfqfutd+8vtDjDHwv0Ad3avDSpY0U=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XBqT3eCWKlWU2qDh4aABxcphll8k1kU+vesubeYj/Le/VGrLVQgi6d2Pe6sAZENGS FDbmgrOxqFLkRx5dvFxxukgWdUKv4S4LWQpmjkVie1mAIwZMpo7QcG2KGUPGrJhUK/ 7GhioamHlVcOrp7WFQqI79DxW403NVgLbCw4Rlds0rqGJSTCLTddjs96oJNpfBzTtR hg9q7MtmwUUwcgS5Cw6gGfq265z9c9f+2dT24ZWwlHapol1kOWT0NfL7VTarPDvqmf KPrBj+a6SwT12uZXrCSr9LVwHSbOATTdbA8635NV+vYmhNavlJ8YANuUUVDydzv+UI O0OdbkVNAQYpw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4F111678E7 for ; Fri, 5 Sep 2025 11:02:11 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Kymzh2tIJzCD for ; Fri, 5 Sep 2025 11:02:11 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757091731; bh=Tn/F3KUgjrxuhaVfqfutd+8vtDjDHwv0Ad3avDSpY0U=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XBqT3eCWKlWU2qDh4aABxcphll8k1kU+vesubeYj/Le/VGrLVQgi6d2Pe6sAZENGS FDbmgrOxqFLkRx5dvFxxukgWdUKv4S4LWQpmjkVie1mAIwZMpo7QcG2KGUPGrJhUK/ 7GhioamHlVcOrp7WFQqI79DxW403NVgLbCw4Rlds0rqGJSTCLTddjs96oJNpfBzTtR hg9q7MtmwUUwcgS5Cw6gGfq265z9c9f+2dT24ZWwlHapol1kOWT0NfL7VTarPDvqmf KPrBj+a6SwT12uZXrCSr9LVwHSbOATTdbA8635NV+vYmhNavlJ8YANuUUVDydzv+UI O0OdbkVNAQYpw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3F5186790F for ; Fri, 5 Sep 2025 11:02:11 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757091729; bh=ftW7rUFjrwYTxWXyUDmqEZSYUuDK+DBWXAkleG6K8K4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z69aVHODef3pBrkS9glodAyQpud6gCBWxESfDVs8qhAvU+6gHCTjyOono4oOXfaTT Y2/AL8ond3TqtrOPBl8EW35QbA+d9f7J0ef9srqeoOCvB9OJazqjnugt3uF8wL9lDt VQC9u/aPE6ixZdJPJ4+XejqQKcEr/ChbxHGqQb2dNqTKlzeFCiCGzG7hUV89JHQYTm hK3FooLvP3veVAxG4l3cxAPMGIf/hncIB4fgACafav1+vud+NOROEIZr7aOHhWOdyA y4FZN6L+POHPMOAGShYDm+mVssbgED1J/+s+tDxZIW0WNoii8ktB4Cn++wZ4s7yOSq c1F6x9xBbMjpw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 46222678E7; Fri, 5 Sep 2025 11:02:09 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id VxMu4p-nTxkT; Fri, 5 Sep 2025 11:02:09 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757091724; bh=80aXgAYDyYYdY0+JEtJdBfHiWI+AHTCmvQzCXHoLkOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TLQ/uYoEaNI7bihTS0qswdpP0+JsQbh4n5YpIRM7z+elj1b/Y6jPHcr5xPm/jE3C0 6KICYhLEFXeGDVHUYIVBg03J7C1gXh7WHIeNlhNgVsRGq+V6qFI5m54orgnHlx31xg 41MTd13BueNPzO+y5JP3YQ90PHAVNVT8R6ZakT/fivSdJRHOldt0s4AZpSTuReYqAx j4d8P0ByfTx3v0Q4/HJ6AqXo+z9ZzewC2chbzwa51tjhWeg3rE5E2SgYvIjRFwfK1J f5Tpf/1T7tuvcEUsmrNxDbwBOC2ci5QxJ5HGRcDSnncrLGNPlug7o67MiJUItZyfbH JSCdaCr4wq6zg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 6E39E6790F; Fri, 5 Sep 2025 11:02:04 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 5 Sep 2025 11:01:18 -0600 Message-ID: <20250905170132.182249-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250905170132.182249-1-sjg@u-boot.org> References: <20250905170132.182249-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: QQN6VBL7Q535NLX3TQXS6NY5WIT6XI3G X-Message-ID-Hash: QQN6VBL7Q535NLX3TQXS6NY5WIT6XI3G X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/15] ulib: sandbox: Move the linker-script name into config.mk List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Each architecture will have its own version of the linker script, so use a Makefile variable for it. Signed-off-by: Simon Glass --- Makefile | 5 +++-- arch/sandbox/config.mk | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7011535bb2f..1a378ebbee3 100644 --- a/Makefile +++ b/Makefile @@ -1856,7 +1856,7 @@ endif # Build U-Boot as a shared library quiet_cmd_libu-boot.so = LD $@ cmd_libu-boot.so = $(CC) -shared -o $@ -Wl,--build-id=none \ - -Wl,-T,$(srctree)/arch/sandbox/cpu/u-boot-lib.lds \ + -Wl,-T,$(LIB_LDS) \ $(u-boot-init) \ $(KBUILD_LDFLAGS:%=-Wl,%) $(SANITIZERS) $(LTO_FINAL_LDFLAGS) \ -Wl,--whole-archive \ @@ -1865,7 +1865,8 @@ quiet_cmd_libu-boot.so = LD $@ -Wl,--no-whole-archive \ $(PLATFORM_LIBS) -Wl,-Map -Wl,libu-boot.map -libu-boot.so: $(u-boot-init) $(u-boot-main) $(u-boot-keep-syms-lto) FORCE +libu-boot.so: $(u-boot-init) $(u-boot-main) $(u-boot-keep-syms-lto) \ + $(LIB_LDS) FORCE $(call if_changed,libu-boot.so) # Build ulib_test that links with shared library diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index 405843800e9..566f5b417ae 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -69,3 +69,6 @@ EFI_LDS := ${SRCDIR}/../../../arch/riscv/lib/elf_riscv64_efi.lds endif EFI_CRT0 := crt0_sandbox_efi.o EFI_RELOC := reloc_sandbox_efi.o + +# U-Boot Library +LIB_LDS := $(srctree)/arch/sandbox/cpu/u-boot-lib.lds