git: b4e4d32d8450 - stable/13 - csu: Add missing GNU-stack annotations to note object files.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 22 Mar 2023 16:32:49 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=b4e4d32d845075221d9d2960d2ca9a237fe1d9c4

commit b4e4d32d845075221d9d2960d2ca9a237fe1d9c4
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-11-18 20:20:14 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-03-22 15:22:06 +0000

    csu: Add missing GNU-stack annotations to note object files.
    
    ld.bfd marks the stack as executable for the crt objects due to the
    missing annotations which raises a fatal warning starting with version
    2.39.
    
    (cherry picked from commit 74ad8d607ddbd530935524d53cc9f6f9d5517609)
---
 lib/csu/common/crtbrand.S         | 2 ++
 lib/csu/common/feature_note.S     | 2 ++
 lib/csu/common/ignore_init_note.S | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/lib/csu/common/crtbrand.S b/lib/csu/common/crtbrand.S
index bf223d84bc12..142ef56c2785 100644
--- a/lib/csu/common/crtbrand.S
+++ b/lib/csu/common/crtbrand.S
@@ -47,3 +47,5 @@ __FBSDID("$FreeBSD$");
 2:	.p2align	2
 3:	.4byte		__FreeBSD_version
 4:
+
+	.section .note.GNU-stack,"",%progbits
diff --git a/lib/csu/common/feature_note.S b/lib/csu/common/feature_note.S
index 0274ce61debc..c2a6c94d1ee2 100644
--- a/lib/csu/common/feature_note.S
+++ b/lib/csu/common/feature_note.S
@@ -40,3 +40,5 @@ __FBSDID("$FreeBSD$");
 2:	.p2align	2
 3:	.4byte		0
 4:
+
+	.section .note.GNU-stack,"",%progbits
diff --git a/lib/csu/common/ignore_init_note.S b/lib/csu/common/ignore_init_note.S
index 804cefd47155..9026ba925891 100644
--- a/lib/csu/common/ignore_init_note.S
+++ b/lib/csu/common/ignore_init_note.S
@@ -41,3 +41,5 @@ __FBSDID("$FreeBSD$");
 2:	.p2align	2
 3:	.4byte		0
 4:
+
+	.section .note.GNU-stack,"",%progbits