From nobody Tue Apr 16 20:13:15 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VJwG36YBTz5H0YB; Tue, 16 Apr 2024 20:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VJwG32KJZz4tys; Tue, 16 Apr 2024 20:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713298395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qQldRLWotCxK5RWNC4bp8kzX/GmkBOoKKy+EAifyAeQ=; b=kF4gsS3zIpMZ0RfTG7vyZTT8Kf7Q6f+AHMyBJuO06lcxQAC1jJKhi4/XARzQZzfYYkFW8A i47WLdsiBGhAk7inqDL6+LpSQGUMOfqLbegW9fKxWWPjACjjm8CO6ly3MEG99j1/ZQGSnG yASxt469tIo5+uMoF3y976R6N1UWn3MzUKihVOu1m5C0P/E4PLuFTi4ML6Yi0l5fViH6ew /5mYWhQOarrOn6M7c4GM5MwEYA99yPwc0FUBgInD+d0fqzj9myw42uQE5e2roTUAeI21nq jxhtkNqc4FQLrRxnNhk5pIX2Ks56TsQhufSw1FqhxVs39M2eDRMUh83urfuhTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713298395; a=rsa-sha256; cv=none; b=a9MTNQgCg3zaJfowefFJDixcGH/JxpC7pFfkHZ94CBhXERLDzOzlpCm36pk+W9EYULTrLz xXnvfq1TpVnsDC/gQxVgRCWmsKGxZpKd2ItnARIUoud/W9mERjCzOtzISrUecW9SIDZrdS xFmTqXAiSbNxMWThDJl1Uebs+a2MAFS0W+hat9WBDoIZon9KxYum581jW0sp3oBD82T9uE VfOib/GIrtpg3jkwk8H6f6k88tkqzJXOE1fQswDjL/ZTznpcjK0DUPy/ZgsHwpriyOw8Pm zqoAOfJ6SMcM63JSwgN+QRw/NHceP+Lovh/ugYhy+SEbNvWZ90rNKk4g5sxGug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713298395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qQldRLWotCxK5RWNC4bp8kzX/GmkBOoKKy+EAifyAeQ=; b=yMFcYCNV2Q7tZonGf5kuIVAaa050MCYDt5i+vUxywE+2G3OxTsNoHvpKVQXrq16LdeqX9l wGCgnM6T1pMaT0bAvDyRIFh50BF/0d4VDHOoDO2OZCQI2fBUiloibgeIkXC8ImZ7ieduV6 ERxWFt9iT8D0kDDKCqxk90rskkr5dJEl4PFQa1gXS3LcicJsjhDjsX2SngX8s5S3fv8ts0 +RryAzqc3hhtyVHoXTJb8OVb/fSSiZUY4x0NNGZ8jhApMG1Fbc34JiIljozUxV7Y1AYUZl rlRenc/wChsF71wTv4mdxEGbu4dB4o1AKvuhwVRQbG9H/513TsRAYnoIouhijg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VJwG31tgwzxdk; Tue, 16 Apr 2024 20:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43GKDF8R039117; Tue, 16 Apr 2024 20:13:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43GKDFnn039114; Tue, 16 Apr 2024 20:13:15 GMT (envelope-from git) Date: Tue, 16 Apr 2024 20:13:15 GMT Message-Id: <202404162013.43GKDFnn039114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 95497a6215e8 - stable/14 - kboot: Centralize ldscript addition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 95497a6215e81ac3515bd034dfa5db4346147ba1 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=95497a6215e81ac3515bd034dfa5db4346147ba1 commit 95497a6215e81ac3515bd034dfa5db4346147ba1 Author: Warner Losh AuthorDate: 2024-02-25 00:56:23 +0000 Commit: Warner Losh CommitDate: 2024-04-16 19:54:27 +0000 kboot: Centralize ldscript addition Make the pattern for ldscripts always be arch/$MACHINE_ARCH/$MACHINE_ARCH.ldscript so we can add it from a central Makefile. This also moves from ldscript.arch to arch.ldscript to match the loader's new convention. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D44057 (cherry picked from commit acb474c084b8e3b7bb738a286f9218f926a15823) --- stand/kboot/kboot/Makefile | 3 +++ stand/kboot/kboot/arch/aarch64/Makefile.inc | 2 -- stand/kboot/kboot/arch/aarch64/{ldscript.aarch64 => aarch64.ldscript} | 0 stand/kboot/kboot/arch/amd64/Makefile.inc | 2 -- stand/kboot/kboot/arch/amd64/{ldscript.amd64 => amd64.ldscript} | 0 stand/kboot/kboot/arch/powerpc64/Makefile.inc | 2 -- .../kboot/arch/powerpc64/{ldscript.powerpc => powerpc64.ldscript} | 0 7 files changed, 3 insertions(+), 6 deletions(-) diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile index b571c3acada1..c6cb47fbbba2 100644 --- a/stand/kboot/kboot/Makefile +++ b/stand/kboot/kboot/Makefile @@ -51,6 +51,9 @@ HELP_FILENAME= loader.help.kboot .PATH: ${.CURDIR}/arch/${MACHINE_ARCH} .include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" +# Bring in our ldscript +LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}.ldscript + # Always add MI sources .include "${BOOTSRC}/loader.mk" CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} diff --git a/stand/kboot/kboot/arch/aarch64/Makefile.inc b/stand/kboot/kboot/arch/aarch64/Makefile.inc index 744a15f363d3..3e856f5322b3 100644 --- a/stand/kboot/kboot/arch/aarch64/Makefile.inc +++ b/stand/kboot/kboot/arch/aarch64/Makefile.inc @@ -8,5 +8,3 @@ CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include # load address. set in linker script RELOC?= 0x0 CFLAGS+= -DRELOC=${RELOC} - -LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/ldscript.${MACHINE_ARCH} diff --git a/stand/kboot/kboot/arch/aarch64/ldscript.aarch64 b/stand/kboot/kboot/arch/aarch64/aarch64.ldscript similarity index 100% rename from stand/kboot/kboot/arch/aarch64/ldscript.aarch64 rename to stand/kboot/kboot/arch/aarch64/aarch64.ldscript diff --git a/stand/kboot/kboot/arch/amd64/Makefile.inc b/stand/kboot/kboot/arch/amd64/Makefile.inc index 55b1819ccdee..edb8a1de0bba 100644 --- a/stand/kboot/kboot/arch/amd64/Makefile.inc +++ b/stand/kboot/kboot/arch/amd64/Makefile.inc @@ -1,5 +1,3 @@ SRCS+= amd64_tramp.S elf64_freebsd.c load_addr.c fdt_arch.c CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include - -LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/ldscript.amd64 diff --git a/stand/kboot/kboot/arch/amd64/ldscript.amd64 b/stand/kboot/kboot/arch/amd64/amd64.ldscript similarity index 100% rename from stand/kboot/kboot/arch/amd64/ldscript.amd64 rename to stand/kboot/kboot/arch/amd64/amd64.ldscript diff --git a/stand/kboot/kboot/arch/powerpc64/Makefile.inc b/stand/kboot/kboot/arch/powerpc64/Makefile.inc index 338d1222ab65..11a67a93d9e0 100644 --- a/stand/kboot/kboot/arch/powerpc64/Makefile.inc +++ b/stand/kboot/kboot/arch/powerpc64/Makefile.inc @@ -2,6 +2,4 @@ CFLAGS+= -mcpu=powerpc64 SRCS+= ppc64_elf_freebsd.c kerneltramp.S load_addr.c fdt_arch.c -LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/ldscript.powerpc - MK_PIE= no diff --git a/stand/kboot/kboot/arch/powerpc64/ldscript.powerpc b/stand/kboot/kboot/arch/powerpc64/powerpc64.ldscript similarity index 100% rename from stand/kboot/kboot/arch/powerpc64/ldscript.powerpc rename to stand/kboot/kboot/arch/powerpc64/powerpc64.ldscript