From nobody Thu Feb 29 16:31:01 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 4TlxYK4tMnz5CTkh; Thu, 29 Feb 2024 16:31:01 +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 4TlxYK3mHsz42j1; Thu, 29 Feb 2024 16:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709224261; 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=CVoqk9O8Jg79K3BXuuIyI4rB6f3AUHxaa/fKne9+w8g=; b=ENzULZ3EULE4AfcpBSCvbcKg8lkAB7ph/vx/Z3TkTE+r09BAYZSRT4F4dhzFRdS2dIZp+i x6iC7BdeeXeo4ii7jVS8qgznfCqC10n2wE+ZRKOj+FuLZrGc1a8p4dFJLjymHj0UAkegX6 rNmiokJf/GxhsciLHNvpV/6YyFG2NeicL/pZzqjBICkIQzwYaj128GiVbjBKhmR010YpO/ u0ZqQsp3xeIOHX0uI1C79Od/P83GRdgKvwpnvseXPmkLhCR5GvnHk7tz38To9hWiVwCJPC L9HmjCuPmU65AhCa0NIbR738sUytDfQxSkX+6wUkXRMcjrda/RqmdjTg732EWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709224261; a=rsa-sha256; cv=none; b=aHDyb4P7IoW9FlquyWVVkBM1IEIzEAX6aqUqX3QI332OArDftIMygRvQsxKt930rjfMfFM ogqchvvkvMCzievE1FkGV6YPoVofmzkN2R8mCeFqhx6sWt7J52f6YlBxQzTTgF974/9f9P lcGPGHrEYdRXkjXOJOvxUBCltSK2gWMKhpUlkDp7g1b1iMWymE5CnwjX4uxpp+AO0Xr5Z9 51BKrFOMOuYe5ZHeGGswl61IWZv/iy4LZ9mZKt0v0lcj2W0PgNvEZON3t2WUxY0FxgHJit cYOCcVA2TkTShEjt385t+5q+/Io79X7xK27Ctv6x5YfQKI8uLiQjwRq2GMzllg== 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=1709224261; 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=CVoqk9O8Jg79K3BXuuIyI4rB6f3AUHxaa/fKne9+w8g=; b=TEFByQUk1C8/PFUK9zbOf40XGnZY95AHB1mPxZNl2iyJVaYpMFYqimG5Zfl/Basjq3gw1Y ZBCHS3EyEaf8rCjh/irR2+m7P/ChPF3zGK7Up+Lj1HgRbBs/i5/ZNt3+e9c39cKW0PGIYX uyzT+vTSW1+/nkUPhmSRCfC9bog2FlHn0cn7IawsBCKNCnlSODd4QTdmpZRwROSvsNbxt9 ijiyCB0jYUnIn8JZ7y6fdrNwv8OyCfH+ZHsXUSLKPj9+AMn3AfSxTPbwKR5bK/uuAPRd6e MB5AemQgNO8Z9uSy9doeUZ8V6c17vRQzwZATR418DzvM8qd4uBa7dIq/S+FDjg== 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 4TlxYK352kzpXg; Thu, 29 Feb 2024 16:31:01 +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 41TGV1bn035903; Thu, 29 Feb 2024 16:31:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TGV1Zj035900; Thu, 29 Feb 2024 16:31:01 GMT (envelope-from git) Date: Thu, 29 Feb 2024 16:31:01 GMT Message-Id: <202402291631.41TGV1Zj035900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 23dff4fdba98 - main - kernel: Sync ldscript files wrt gnu.attributes and .note.GNU-stack 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: 23dff4fdba987a56f4118f065cdb534cb6faba37 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=23dff4fdba987a56f4118f065cdb534cb6faba37 commit 23dff4fdba987a56f4118f065cdb534cb6faba37 Author: Warner Losh AuthorDate: 2024-02-29 16:30:37 +0000 Commit: Warner Losh CommitDate: 2024-02-29 16:30:37 +0000 kernel: Sync ldscript files wrt gnu.attributes and .note.GNU-stack Bring the keeping of .gnu.attributes to all architectures. Also discard .note.GNU-stack on all archtiectures. Plus delete obsolete comment that was removed from i386 in 2010. Sponsored by: Netflix Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44069 --- sys/conf/ldscript.amd64 | 1 + sys/conf/ldscript.arm | 4 +++- sys/conf/ldscript.arm64 | 4 +++- sys/conf/ldscript.i386 | 1 + sys/conf/ldscript.powerpc | 6 +++--- sys/conf/ldscript.powerpc64 | 6 +++--- sys/conf/ldscript.powerpc64le | 6 +++--- sys/conf/ldscript.powerpcspe | 5 +++-- sys/conf/ldscript.riscv | 4 +++- 9 files changed, 23 insertions(+), 14 deletions(-) diff --git a/sys/conf/ldscript.amd64 b/sys/conf/ldscript.amd64 index 9c6e603a5753..302f5cd2c4f8 100644 --- a/sys/conf/ldscript.amd64 +++ b/sys/conf/ldscript.amd64 @@ -213,6 +213,7 @@ SECTIONS /* DWARF 3 */ .debug_pubtypes 0 : { *(.debug_pubtypes) } .debug_ranges 0 : { *(.debug_ranges) } + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } } diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm index a9c39977a6fc..57ce8c068c44 100644 --- a/sys/conf/ldscript.arm +++ b/sys/conf/ldscript.arm @@ -153,5 +153,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ + + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } } diff --git a/sys/conf/ldscript.arm64 b/sys/conf/ldscript.arm64 index afb2687f0368..e9edbd8b7402 100644 --- a/sys/conf/ldscript.arm64 +++ b/sys/conf/ldscript.arm64 @@ -170,5 +170,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ + + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } } diff --git a/sys/conf/ldscript.i386 b/sys/conf/ldscript.i386 index 6563ed2cd623..c7fe91c9d4d5 100644 --- a/sys/conf/ldscript.i386 +++ b/sys/conf/ldscript.i386 @@ -198,6 +198,7 @@ SECTIONS /* DWARF 3 */ .debug_pubtypes 0 : { *(.debug_pubtypes) } .debug_ranges 0 : { *(.debug_ranges) } + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } } diff --git a/sys/conf/ldscript.powerpc b/sys/conf/ldscript.powerpc index c08123e4eaba..0fa3fc9b3fa7 100644 --- a/sys/conf/ldscript.powerpc +++ b/sys/conf/ldscript.powerpc @@ -1,4 +1,3 @@ - OUTPUT_FORMAT("elf32-powerpc-freebsd", "elf32-powerpc-freebsd", "elf32-powerpc-freebsd") OUTPUT_ARCH(powerpc) @@ -149,6 +148,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ -} + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } +} diff --git a/sys/conf/ldscript.powerpc64 b/sys/conf/ldscript.powerpc64 index df279576193f..3e418c3c1189 100644 --- a/sys/conf/ldscript.powerpc64 +++ b/sys/conf/ldscript.powerpc64 @@ -1,4 +1,3 @@ - OUTPUT_FORMAT("elf64-powerpc-freebsd", "elf64-powerpc-freebsd", "elf64-powerpc-freebsd") OUTPUT_ARCH(powerpc:common64) @@ -174,6 +173,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ -} + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } +} diff --git a/sys/conf/ldscript.powerpc64le b/sys/conf/ldscript.powerpc64le index 3fd80d3130fb..4fdfcb295ab7 100644 --- a/sys/conf/ldscript.powerpc64le +++ b/sys/conf/ldscript.powerpc64le @@ -1,4 +1,3 @@ - OUTPUT_FORMAT("elf64-powerpcle-freebsd", "elf64-powerpcle-freebsd", "elf64-powerpcle-freebsd") OUTPUT_ARCH(powerpc:common64) @@ -175,6 +174,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ -} + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } +} diff --git a/sys/conf/ldscript.powerpcspe b/sys/conf/ldscript.powerpcspe index 7d5b54a655a6..f35a15816108 100644 --- a/sys/conf/ldscript.powerpcspe +++ b/sys/conf/ldscript.powerpcspe @@ -1,4 +1,3 @@ - OUTPUT_FORMAT("elf32-powerpc-freebsd", "elf32-powerpc-freebsd", "elf32-powerpc-freebsd") OUTPUT_ARCH(powerpc) @@ -150,6 +149,8 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ + + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } } diff --git a/sys/conf/ldscript.riscv b/sys/conf/ldscript.riscv index 9a2764a23789..15f896112d04 100644 --- a/sys/conf/ldscript.riscv +++ b/sys/conf/ldscript.riscv @@ -144,5 +144,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ + + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } }