From nobody Wed Feb 02 20:19:22 2022 X-Original-To: dev-commits-src-main@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 4588119ACBB2; Wed, 2 Feb 2022 20:19:23 +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 4JptSC0X2cz3qmJ; Wed, 2 Feb 2022 20:19:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643833163; 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=Evp2y+sv0y8lkmBsIEPuFcC3z0HhfCAvDDrLcAUnahw=; b=fy0PhydXuZr8RF+Fdj9hudJcXN+dZxXNtLS3KLZZ2UBEnpGqUrWtT+PIR7mzx18vFbRJgd vZsqb5rouyKlWF9wYzO9JixAE1Il6ITRkr1WXE6T6eNaeRDA5BzSDkT4NOw/Szyn+2YT5B HhxOOwcgh3pe8IkayeZ4/rBzvFuLidAAEeGdRNyqmTbQMgFay1fuKFpocMhO0+7PZI3wnZ 2i4ONM9YY5NQqV9PI1Tqp7MueNUeL9xcOfW24dv2OEhHF1NdfEnghZ3NL8jDTLrlYvs/2o LTI4XISJKxrbwk4NdFKVjvzlypnXVaHrGoI40DGSydeRGPtSKyN7oxYdYPdE2Q== 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 D833D26CC; Wed, 2 Feb 2022 20:19:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 212KJMZI065460; Wed, 2 Feb 2022 20:19:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 212KJM9i065459; Wed, 2 Feb 2022 20:19:22 GMT (envelope-from git) Date: Wed, 2 Feb 2022 20:19:22 GMT Message-Id: <202202022019.212KJM9i065459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8bd5e2f15cc9 - main - stand/efi: Pass --no-dynamic-linker to ld.bfd >= 2.34. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8bd5e2f15cc9756e7d6b7feb43ec47f18a38e2bf Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643833163; 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=Evp2y+sv0y8lkmBsIEPuFcC3z0HhfCAvDDrLcAUnahw=; b=Rh8BRPupgCHlIuQfCa6EjPPM54WE7m29y1yNZnOXKCckpcddH+kPfX7/jInbZo8f+wTc+J OYIfFyjS2DjQJJbMv4IyWQlWDgr8xFM7zgaaz3DvICG+I0Fu7lHMXFe4uhOrvUOMomRIRa RmipVZxerJZjUJweEbp2Aoth1D4jYhLBx1pDI0NWJ95VZwGaPgW4mXImwGaePxho5c9BSk w5gMaX45Y7FrdJ9mtUoVc9J4lGDcXdDHOsVYz8XkPKsGK3QwrVYi9f/9106uBj3Ng4YOJ/ Ax4uQvjiQqkRpqEfkPwS+FmBWEhY1kd9DJUNz8LwsmaE3SE3D3WLzUDtBVW64g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643833163; a=rsa-sha256; cv=none; b=GAoIGSMo6Wy8/w26xE2USrZvig8mn3M4pi3x8KZq5xq65c9thtSeMdNiYZSY6J62rHuiy8 qT8u+o+WEf5b6FImJzpZHN8M2LtrO4HEQ2xInZAKSUoS0b3GqlcA/Fh8zERCxkr4BvSN1g xlseTdLJDm2b8gIzD7Usebpmb4FMS82Tp9uDJMkcRYbnn+7bainxdEWuawLbkLDoSCUHws xbnbK1yk/YcJwUwTsdBzEmYeOEkhFd6+Vmid9T0DZMhRhg2cBeB/Hv2jui7OQLAYsK152t YV3fX+BSXuoSKYLxiKJPeqnCdOVyF+l/BE546O8TQ/ORGulPylqR+Ip1nqdXTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8bd5e2f15cc9756e7d6b7feb43ec47f18a38e2bf commit 8bd5e2f15cc9756e7d6b7feb43ec47f18a38e2bf Author: John Baldwin AuthorDate: 2022-02-02 20:18:43 +0000 Commit: John Baldwin CommitDate: 2022-02-02 20:18:43 +0000 stand/efi: Pass --no-dynamic-linker to ld.bfd >= 2.34. ld.bfd in binutils 2.34+ now reports an error in more cases for custom ldscripts that do not place PHDRs in a LOAD segment. However, EFI binaries are not dynamic binaries which need PHDRs, so pass --no-dynamic-linker to disable this check. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D34124 --- stand/efi/boot1/Makefile | 3 +++ stand/efi/loader/Makefile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index af03e395b2a5..7e3d762c768d 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -67,6 +67,9 @@ FILESMODE_${BOOT1}.efi= ${BINMODE} LDSCRIPT= ${EFISRC}/loader/arch/${MACHINE}/ldscript.${MACHINE} LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -pie +.if ${LINKER_TYPE} == "bfd" && ${LINKER_VERSION} >= 23400 +LDFLAGS+= -Wl,--no-dynamic-linker +.endif .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -mgeneral-regs-only diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index dd25c940e0e9..1edb5674712e 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -99,6 +99,9 @@ LINKS+= ${BINDIR}/${LOADER}.efi ${BINDIR}/loader.efi LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE}/ldscript.${MACHINE} LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -pie +.if ${LINKER_TYPE} == "bfd" && ${LINKER_VERSION} >= 23400 +LDFLAGS+= -Wl,--no-dynamic-linker +.endif CLEANFILES+= loader.efi