mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04:00
rtld: Clear x29 and lr for thread_start to conform Aarch64 ABI pcs
Strictly speaking, SYS V Aarch64 ABI does not states that lr should be cleared, however gdb relies on lr and tryes to unwind stack further. Reviewed by: Differential Revision: https://reviews.freebsd.org/D40841
This commit is contained in:
parent
ac7759f545
commit
1a2aa2ffb5
1 changed files with 2 additions and 0 deletions
|
|
@ -223,6 +223,8 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg,
|
|||
tf->tf_sp = STACKALIGN((uintptr_t)stack->ss_sp + stack->ss_size);
|
||||
tf->tf_elr = (register_t)entry;
|
||||
tf->tf_x[0] = (register_t)arg;
|
||||
tf->tf_x[29] = 0;
|
||||
tf->tf_lr = 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Reference in a new issue