limine/common/menu_thunk.asm_aarch64
Kacper Słomiński 489450d602 common: fix alignment of variable in AArch64 menu thunk
Fixes a problem that sometimes occured due to a specific relocation
being used for the misaligned variable.
2022-08-24 21:15:37 +02:00

26 lines
341 B
Plaintext

.section .data
.align 3
stack_at_first_entry:
.quad 0
.section .text
.global menu
.extern _menu
menu:
adrp x8, stack_at_first_entry
ldr x9, [x8, :lo12:stack_at_first_entry]
cbz x9, 1f
mov sp, x9
b 2f
1:
mov x9, sp
str x9, [x8, :lo12:stack_at_first_entry]
2:
mov x30, xzr
mov x29, xzr
b _menu