Revert "efi_thunk/x86: Move to a custom stack inside .bss"
This reverts commit af27df9b7abc8d1208bc1b6dfc994b90c5299265.
diff --git a/common/efi_thunk.asm_uefi_ia32 b/common/efi_thunk.asm_uefi_ia32
index 5a70081c..3bcaee55 100644
--- a/common/efi_thunk.asm_uefi_ia32
+++ b/common/efi_thunk.asm_uefi_ia32
@@ -1,33 +1,10 @@
-extern _GLOBAL_OFFSET_TABLE_
-
-section .bss
-
-align 16
-stack:
- resb 32768
- .top:
-
section .text
global efi_main
extern uefi_entry
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
- push eax
+ mov [esp], eax
jmp uefi_entry
section .note.GNU-stack noalloc noexec nowrite progbits
diff --git a/common/efi_thunk.asm_uefi_x86_64 b/common/efi_thunk.asm_uefi_x86_64
index e13b0c4d..dad16474 100644
--- a/common/efi_thunk.asm_uefi_x86_64
+++ b/common/efi_thunk.asm_uefi_x86_64
@@ -1,20 +1,10 @@
-section .bss
-
-align 16
-stack:
- resb 32768
- .top:
-
section .text
global efi_main
extern uefi_entry
efi_main:
- lea rax, [rel stack.top]
- sub rax, 8
- mov rsp, rax
-
xor eax, eax
+ mov [rsp], rax
jmp uefi_entry
section .note.GNU-stack noalloc noexec nowrite progbits
