misc: Add section .note.GNU-stack to assembly files
diff --git a/common/efi_thunk.asm_uefi_aarch64 b/common/efi_thunk.asm_uefi_aarch64
index 64822fa0..a524cb0d 100644
--- a/common/efi_thunk.asm_uefi_aarch64
+++ b/common/efi_thunk.asm_uefi_aarch64
@@ -8,3 +8,5 @@ efi_main:
mov x29, xzr
b uefi_entry
+
+.section .note.GNU-stack,"",%progbits
diff --git a/common/efi_thunk.asm_uefi_ia32 b/common/efi_thunk.asm_uefi_ia32
index ced76921..3bcaee55 100644
--- a/common/efi_thunk.asm_uefi_ia32
+++ b/common/efi_thunk.asm_uefi_ia32
@@ -6,3 +6,5 @@ efi_main:
xor eax, eax
mov [esp], eax
jmp uefi_entry
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/efi_thunk.asm_uefi_riscv64 b/common/efi_thunk.asm_uefi_riscv64
index 2ff58cf5..966faee1 100644
--- a/common/efi_thunk.asm_uefi_riscv64
+++ b/common/efi_thunk.asm_uefi_riscv64
@@ -7,3 +7,5 @@ efi_main:
mv fp, zero
mv ra, zero
j uefi_entry
+
+.section .note.GNU-stack,"",%progbits
diff --git a/common/efi_thunk.asm_uefi_x86_64 b/common/efi_thunk.asm_uefi_x86_64
index 0bed8ca7..dad16474 100644
--- a/common/efi_thunk.asm_uefi_x86_64
+++ b/common/efi_thunk.asm_uefi_x86_64
@@ -6,3 +6,5 @@ efi_main:
xor eax, eax
mov [rsp], rax
jmp uefi_entry
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/entry_asm.s2.asm_bios_ia32 b/common/entry_asm.s2.asm_bios_ia32
index 50c7029c..565e635a 100644
--- a/common/entry_asm.s2.asm_bios_ia32
+++ b/common/entry_asm.s2.asm_bios_ia32
@@ -27,3 +27,5 @@ _start:
mov ss, ax
jmp entry
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/lib/mem.asm_x86_64 b/common/lib/mem.asm_x86_64
index 4463c197..f082324f 100644
--- a/common/lib/mem.asm_x86_64
+++ b/common/lib/mem.asm_x86_64
@@ -53,3 +53,5 @@ memcmp:
.done:
ret
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/lib/mem.s2.asm_ia32 b/common/lib/mem.s2.asm_ia32
index c4452247..9875b5b2 100644
--- a/common/lib/mem.s2.asm_ia32
+++ b/common/lib/mem.s2.asm_ia32
@@ -107,3 +107,5 @@ bits 32
pop esi
pop ebp
ret
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/lib/real.s2.asm_bios_ia32 b/common/lib/real.s2.asm_bios_ia32
index 4c43af98..15bfabdd 100644
--- a/common/lib/real.s2.asm_bios_ia32
+++ b/common/lib/real.s2.asm_bios_ia32
@@ -164,3 +164,5 @@ align 16
.idt: dq 0
.rm_idt: dw 0x3ff
dd 0
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/lib/sleep.asm_bios_ia32 b/common/lib/sleep.asm_bios_ia32
index ad3469e5..fdd120af 100644
--- a/common/lib/sleep.asm_bios_ia32
+++ b/common/lib/sleep.asm_bios_ia32
@@ -153,3 +153,5 @@ _pit_sleep_and_quit_on_keypress:
.mods: dd 0
.ascii: dd 0
.scan: dd 0
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/lib/spinup.asm_aarch64 b/common/lib/spinup.asm_aarch64
index f1c30610..8d8a2e7f 100644
--- a/common/lib/spinup.asm_aarch64
+++ b/common/lib/spinup.asm_aarch64
@@ -61,3 +61,5 @@ enter_in_el1:
ZERO_REGS_EXCEPT_X0
eret
+
+.section .note.GNU-stack,"",%progbits
diff --git a/common/lib/spinup.asm_bios_ia32 b/common/lib/spinup.asm_bios_ia32
index 3bfbdb8d..bc01663c 100644
--- a/common/lib/spinup.asm_bios_ia32
+++ b/common/lib/spinup.asm_bios_ia32
@@ -35,3 +35,5 @@ common_spinup:
mov cr4, eax
call edi
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/lib/spinup.asm_riscv64 b/common/lib/spinup.asm_riscv64
index e0e69c6a..c5eaebd7 100644
--- a/common/lib/spinup.asm_riscv64
+++ b/common/lib/spinup.asm_riscv64
@@ -43,3 +43,5 @@ riscv_spinup:
mv ra, zero
jr t0
+
+.section .note.GNU-stack,"",%progbits
diff --git a/common/lib/spinup.asm_uefi_ia32 b/common/lib/spinup.asm_uefi_ia32
index 74a63388..ba70a08c 100644
--- a/common/lib/spinup.asm_uefi_ia32
+++ b/common/lib/spinup.asm_uefi_ia32
@@ -60,3 +60,5 @@ common_spinup:
mov cr4, eax
call edi
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/lib/spinup.asm_uefi_x86_64 b/common/lib/spinup.asm_uefi_x86_64
index 82cb2284..7859a2a4 100644
--- a/common/lib/spinup.asm_uefi_x86_64
+++ b/common/lib/spinup.asm_uefi_x86_64
@@ -93,3 +93,5 @@ bits 32
mov cr4, eax
call edi
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/menu_thunk.asm_aarch64 b/common/menu_thunk.asm_aarch64
index 69d47422..5fcff87d 100644
--- a/common/menu_thunk.asm_aarch64
+++ b/common/menu_thunk.asm_aarch64
@@ -23,3 +23,5 @@ menu:
mov x29, xzr
b _menu
+
+.section .note.GNU-stack,"",%progbits
diff --git a/common/menu_thunk.asm_ia32 b/common/menu_thunk.asm_ia32
index e8de5daa..08af2276 100644
--- a/common/menu_thunk.asm_ia32
+++ b/common/menu_thunk.asm_ia32
@@ -26,3 +26,4 @@ menu:
push 0
jmp _menu
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/menu_thunk.asm_riscv64 b/common/menu_thunk.asm_riscv64
index aa9e7254..75d6301d 100644
--- a/common/menu_thunk.asm_riscv64
+++ b/common/menu_thunk.asm_riscv64
@@ -20,3 +20,5 @@ menu:
2: mv fp, zero
mv ra, zero
j _menu
+
+.section .note.GNU-stack,"",%progbits
diff --git a/common/menu_thunk.asm_x86_64 b/common/menu_thunk.asm_x86_64
index 0e086fdc..506c177f 100644
--- a/common/menu_thunk.asm_x86_64
+++ b/common/menu_thunk.asm_x86_64
@@ -19,3 +19,5 @@ menu:
push 0
push 0
jmp _menu
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/protos/limine_32.asm_x86 b/common/protos/limine_32.asm_x86
index ac4ca22f..59555493 100644
--- a/common/protos/limine_32.asm_x86
+++ b/common/protos/limine_32.asm_x86
@@ -98,3 +98,5 @@ bits 64
xor r15d, r15d
iretq
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/protos/linux_32.asm_x86 b/common/protos/linux_32.asm_x86
index 7bd20471..3756cb50 100644
--- a/common/protos/linux_32.asm_x86
+++ b/common/protos/linux_32.asm_x86
@@ -65,3 +65,5 @@ linux_spinup:
cld
jmp [esp+4]
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/protos/multiboot_32.asm_x86 b/common/protos/multiboot_32.asm_x86
index 3bf746b3..e2349d32 100644
--- a/common/protos/multiboot_32.asm_x86
+++ b/common/protos/multiboot_32.asm_x86
@@ -19,3 +19,5 @@ multiboot_spinup_32:
pop edx ; elf_ranges_count
jmp ebx
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/protos/multiboot_reloc.asm_x86 b/common/protos/multiboot_reloc.asm_x86
index c16946df..6ffc1480 100644
--- a/common/protos/multiboot_reloc.asm_x86
+++ b/common/protos/multiboot_reloc.asm_x86
@@ -62,3 +62,5 @@ multiboot_reloc_stub:
global multiboot_reloc_stub_end
multiboot_reloc_stub_end:
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/pxe/pxe_asm.s2.asm_bios_ia32 b/common/pxe/pxe_asm.s2.asm_bios_ia32
index af47b141..2935402f 100644
--- a/common/pxe/pxe_asm.s2.asm_bios_ia32
+++ b/common/pxe/pxe_asm.s2.asm_bios_ia32
@@ -95,3 +95,5 @@ align 16
.idt: dq 0
.rm_idt: dw 0x3ff
dd 0
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/sys/dummy_isr.asm_ia32 b/common/sys/dummy_isr.asm_ia32
index 9c724a0a..cb9123dc 100644
--- a/common/sys/dummy_isr.asm_ia32
+++ b/common/sys/dummy_isr.asm_ia32
@@ -8,3 +8,5 @@ dummy_isr:
call lapic_eoi
popa
iretd
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/sys/dummy_isr.asm_x86_64 b/common/sys/dummy_isr.asm_x86_64
index 61aabb37..2618ce98 100644
--- a/common/sys/dummy_isr.asm_x86_64
+++ b/common/sys/dummy_isr.asm_x86_64
@@ -24,3 +24,5 @@ dummy_isr:
pop rcx
pop rax
iretq
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/sys/int_thunks.s2.asm_bios_ia32 b/common/sys/int_thunks.s2.asm_bios_ia32
index 7c82a000..715f7216 100644
--- a/common/sys/int_thunks.s2.asm_bios_ia32
+++ b/common/sys/int_thunks.s2.asm_bios_ia32
@@ -37,3 +37,5 @@ exceptions:
raise_exception_getaddr i
%assign i i+1
%endrep
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/sys/sbi.asm_riscv64 b/common/sys/sbi.asm_riscv64
index 8b5ed71b..a6016569 100644
--- a/common/sys/sbi.asm_riscv64
+++ b/common/sys/sbi.asm_riscv64
@@ -15,3 +15,5 @@ sbicall:
mv a6, t1
ecall
ret
+
+.section .note.GNU-stack,"",%progbits
diff --git a/common/sys/smp_trampoline.asm_aarch64 b/common/sys/smp_trampoline.asm_aarch64
index 087a674d..149019a1 100644
--- a/common/sys/smp_trampoline.asm_aarch64
+++ b/common/sys/smp_trampoline.asm_aarch64
@@ -101,3 +101,5 @@ smp_trampoline_end:
.global smp_trampoline_size
smp_trampoline_size:
.quad smp_trampoline_end - smp_trampoline_start
+
+.section .note.GNU-stack,"",%progbits
diff --git a/common/sys/smp_trampoline.asm_riscv64 b/common/sys/smp_trampoline.asm_riscv64
index e9e886f8..0ce8d8b3 100644
--- a/common/sys/smp_trampoline.asm_riscv64
+++ b/common/sys/smp_trampoline.asm_riscv64
@@ -63,3 +63,5 @@ smp_trampoline_start:
ld sp, 16(a0)
jr t0
+
+.section .note.GNU-stack,"",%progbits
diff --git a/common/sys/smp_trampoline.asm_x86 b/common/sys/smp_trampoline.asm_x86
index 688b333d..f00b2742 100644
--- a/common/sys/smp_trampoline.asm_x86
+++ b/common/sys/smp_trampoline.asm_x86
@@ -180,3 +180,5 @@ smp_trampoline_end:
global smp_trampoline_size
smp_trampoline_size dq smp_trampoline_end - smp_trampoline_start
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/decompressor/entry.asm b/decompressor/entry.asm
index 8ab75408..70aa0cfc 100644
--- a/decompressor/entry.asm
+++ b/decompressor/entry.asm
@@ -16,3 +16,5 @@ _start:
rep stosb
jmp entry
+
+section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/decompressor/mem.asm b/decompressor/mem.asm
index d3a7d9e7..a23f685d 100644
--- a/decompressor/mem.asm
+++ b/decompressor/mem.asm
@@ -73,3 +73,5 @@ memcmp:
pop edi
pop esi
ret
+
+section .note.GNU-stack noalloc noexec nowrite progbits
