git: 74ad8d607ddb - main - csu: Add missing GNU-stack annotations to note object files.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 18 Nov 2022 20:22:50 UTC
The branch main has been updated by jhb:

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

commit 74ad8d607ddbd530935524d53cc9f6f9d5517609
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-11-18 20:20:14 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-11-18 20:22:23 +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.
---
 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