aarch64: Fix incorrect init/fini stack manipulation
The pre-index operator ('!') was missing at the end of the stp
instruction.
As a result, the stack pointer wasn't updated after the
store of the 64-bit pair and the stored values were basically lost when
follow on code used the stack for later store ops.
This commit is contained in:
+2
-2
@@ -30,7 +30,7 @@ global_asm!(r#"
|
||||
.global _init
|
||||
.type _init,%function
|
||||
_init:
|
||||
stp x29,x30,[sp,-16]
|
||||
stp x29,x30,[sp,-16]!
|
||||
mov x29,sp
|
||||
// stp: "stores two doublewords from the first and second argument to memory addressed by addr"
|
||||
// Body will be filled in by gcc and ended by crtn.o
|
||||
@@ -39,7 +39,7 @@ global_asm!(r#"
|
||||
.global _fini
|
||||
.type _fini,%function
|
||||
_fini:
|
||||
stp x29,x30,[sp,-16]
|
||||
stp x29,x30,[sp,-16]!
|
||||
mov x29,sp
|
||||
// stp: "stores two doublewords from the first and second argument to memory addressed by addr"
|
||||
// Body will be filled in by gcc and ended by crtn.o
|
||||
|
||||
Reference in New Issue
Block a user