Revert "efi_thunk/x86: Move to a custom stack inside .bss"

This reverts commit af27df9b7a.
This commit is contained in:
mintsuki
2024-10-28 04:31:47 +01:00
parent 46ba9940c0
commit 7be1573ccc
2 changed files with 2 additions and 35 deletions

View File

@@ -1,33 +1,10 @@
extern _GLOBAL_OFFSET_TABLE_
section .bss
align 16
stack:
resb 32768
.top:
section .text section .text
global efi_main global efi_main
extern uefi_entry extern uefi_entry
efi_main: efi_main:
pop eax
pop ebx
pop ecx
call .get_got
.get_got:
pop eax
add eax, _GLOBAL_OFFSET_TABLE_ + $$ - .get_got wrt ..gotpc
lea eax, [eax + stack.top wrt ..gotoff]
mov esp, eax
push ecx
push ebx
xor eax, eax xor eax, eax
push eax mov [esp], eax
jmp uefi_entry jmp uefi_entry
section .note.GNU-stack noalloc noexec nowrite progbits section .note.GNU-stack noalloc noexec nowrite progbits

View File

@@ -1,20 +1,10 @@
section .bss
align 16
stack:
resb 32768
.top:
section .text section .text
global efi_main global efi_main
extern uefi_entry extern uefi_entry
efi_main: efi_main:
lea rax, [rel stack.top]
sub rax, 8
mov rsp, rax
xor eax, eax xor eax, eax
mov [rsp], rax
jmp uefi_entry jmp uefi_entry
section .note.GNU-stack noalloc noexec nowrite progbits section .note.GNU-stack noalloc noexec nowrite progbits