kboot: .note.GNU-stack is needed

Add '.section .note.GNU-stack,"",%progbits' to all assembler. Newer
versions of clang complain when this isn't present because executable
stacks are going away in the future. We don't need an executable stack
anyway.

Sponsored by:		Netflix
Reviewed by:		kevans, andrew, emaste, jhibbits
Differential Revision:	https://reviews.freebsd.org/D49855
This commit is contained in:
Warner Losh
2025-04-16 22:03:26 -06:00
parent 4caaab2e6d
commit 58c99df219
6 changed files with 12 additions and 0 deletions
+2
View File
@@ -99,3 +99,5 @@ tramp_size:
.globl tramp_data_offset
tramp_data_offset:
.long trampoline_data-tramp
.section .note.GNU-stack,"",%progbits
@@ -105,3 +105,5 @@ tramp_size:
tramp_data_offset:
.long trampoline_data-tramp
.size tramp_data_offset, 4
.section .note.GNU-stack,"",%progbits
@@ -99,3 +99,5 @@ endkerneltramp:
.data
CNAME(szkerneltramp):
.long endkerneltramp - CNAME(kerneltramp)
.section .note.GNU-stack,"",%progbits
@@ -16,3 +16,5 @@ ENTRY(host_syscall)
ret
/* Note: We're exposing the raw return value to the caller */
END(host_syscall)
.section .note.GNU-stack,"",%progbits
@@ -27,3 +27,5 @@ ENTRY(host_syscall)
ret
/* Note: We're exposing the raw return value to the caller */
END(host_syscall)
.section .note.GNU-stack,"",%progbits
@@ -30,3 +30,5 @@ ENTRY(host_syscall)
blr
/* Note: We're exposing the raw return value to the caller */
END(host_syscall)
.section .note.GNU-stack,"",%progbits