aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-11-18 20:20:14 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2023-03-22 15:22:06 +0000
commitb4e4d32d845075221d9d2960d2ca9a237fe1d9c4 (patch)
tree986d1c2ae4c84c0d18996449d668268216889007
parent2310894c1021f49b6c3003ba215ca978eee2be75 (diff)
downloadsrc-b4e4d32d845075221d9d2960d2ca9a237fe1d9c4.tar.gz
src-b4e4d32d845075221d9d2960d2ca9a237fe1d9c4.zip
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)
-rw-r--r--lib/csu/common/crtbrand.S2
-rw-r--r--lib/csu/common/feature_note.S2
-rw-r--r--lib/csu/common/ignore_init_note.S2
3 files changed, 6 insertions, 0 deletions
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