Revert "efi_thunk/x86: Move to a custom stack inside .bss"
This reverts commit af27df9b7a.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user