misc: Add section .note.GNU-stack to assembly files

This commit is contained in:
mintsuki 2023-09-28 04:15:33 -05:00
parent afdc556301
commit a83dafe6f4
32 changed files with 63 additions and 0 deletions

View File

@ -8,3 +8,5 @@ efi_main:
mov x29, xzr mov x29, xzr
b uefi_entry b uefi_entry
.section .note.GNU-stack,"",%progbits

View File

@ -6,3 +6,5 @@ efi_main:
xor eax, eax xor eax, eax
mov [esp], eax mov [esp], eax
jmp uefi_entry jmp uefi_entry
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -7,3 +7,5 @@ efi_main:
mv fp, zero mv fp, zero
mv ra, zero mv ra, zero
j uefi_entry j uefi_entry
.section .note.GNU-stack,"",%progbits

View File

@ -6,3 +6,5 @@ efi_main:
xor eax, eax xor eax, eax
mov [rsp], rax mov [rsp], rax
jmp uefi_entry jmp uefi_entry
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -27,3 +27,5 @@ _start:
mov ss, ax mov ss, ax
jmp entry jmp entry
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -53,3 +53,5 @@ memcmp:
.done: .done:
ret ret
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -107,3 +107,5 @@ bits 32
pop esi pop esi
pop ebp pop ebp
ret ret
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -164,3 +164,5 @@ align 16
.idt: dq 0 .idt: dq 0
.rm_idt: dw 0x3ff .rm_idt: dw 0x3ff
dd 0 dd 0
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -153,3 +153,5 @@ _pit_sleep_and_quit_on_keypress:
.mods: dd 0 .mods: dd 0
.ascii: dd 0 .ascii: dd 0
.scan: dd 0 .scan: dd 0
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -61,3 +61,5 @@ enter_in_el1:
ZERO_REGS_EXCEPT_X0 ZERO_REGS_EXCEPT_X0
eret eret
.section .note.GNU-stack,"",%progbits

View File

@ -35,3 +35,5 @@ common_spinup:
mov cr4, eax mov cr4, eax
call edi call edi
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -43,3 +43,5 @@ riscv_spinup:
mv ra, zero mv ra, zero
jr t0 jr t0
.section .note.GNU-stack,"",%progbits

View File

@ -60,3 +60,5 @@ common_spinup:
mov cr4, eax mov cr4, eax
call edi call edi
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -93,3 +93,5 @@ bits 32
mov cr4, eax mov cr4, eax
call edi call edi
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -23,3 +23,5 @@ menu:
mov x29, xzr mov x29, xzr
b _menu b _menu
.section .note.GNU-stack,"",%progbits

View File

@ -26,3 +26,4 @@ menu:
push 0 push 0
jmp _menu jmp _menu
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -20,3 +20,5 @@ menu:
2: mv fp, zero 2: mv fp, zero
mv ra, zero mv ra, zero
j _menu j _menu
.section .note.GNU-stack,"",%progbits

View File

@ -19,3 +19,5 @@ menu:
push 0 push 0
push 0 push 0
jmp _menu jmp _menu
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -98,3 +98,5 @@ bits 64
xor r15d, r15d xor r15d, r15d
iretq iretq
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -65,3 +65,5 @@ linux_spinup:
cld cld
jmp [esp+4] jmp [esp+4]
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -19,3 +19,5 @@ multiboot_spinup_32:
pop edx ; elf_ranges_count pop edx ; elf_ranges_count
jmp ebx jmp ebx
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -62,3 +62,5 @@ multiboot_reloc_stub:
global multiboot_reloc_stub_end global multiboot_reloc_stub_end
multiboot_reloc_stub_end: multiboot_reloc_stub_end:
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -95,3 +95,5 @@ align 16
.idt: dq 0 .idt: dq 0
.rm_idt: dw 0x3ff .rm_idt: dw 0x3ff
dd 0 dd 0
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -8,3 +8,5 @@ dummy_isr:
call lapic_eoi call lapic_eoi
popa popa
iretd iretd
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -24,3 +24,5 @@ dummy_isr:
pop rcx pop rcx
pop rax pop rax
iretq iretq
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -37,3 +37,5 @@ exceptions:
raise_exception_getaddr i raise_exception_getaddr i
%assign i i+1 %assign i i+1
%endrep %endrep
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -15,3 +15,5 @@ sbicall:
mv a6, t1 mv a6, t1
ecall ecall
ret ret
.section .note.GNU-stack,"",%progbits

View File

@ -101,3 +101,5 @@ smp_trampoline_end:
.global smp_trampoline_size .global smp_trampoline_size
smp_trampoline_size: smp_trampoline_size:
.quad smp_trampoline_end - smp_trampoline_start .quad smp_trampoline_end - smp_trampoline_start
.section .note.GNU-stack,"",%progbits

View File

@ -63,3 +63,5 @@ smp_trampoline_start:
ld sp, 16(a0) ld sp, 16(a0)
jr t0 jr t0
.section .note.GNU-stack,"",%progbits

View File

@ -180,3 +180,5 @@ smp_trampoline_end:
global smp_trampoline_size global smp_trampoline_size
smp_trampoline_size dq smp_trampoline_end - smp_trampoline_start smp_trampoline_size dq smp_trampoline_end - smp_trampoline_start
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -16,3 +16,5 @@ _start:
rep stosb rep stosb
jmp entry jmp entry
section .note.GNU-stack noalloc noexec nowrite progbits

View File

@ -73,3 +73,5 @@ memcmp:
pop edi pop edi
pop esi pop esi
ret ret
section .note.GNU-stack noalloc noexec nowrite progbits