From ff8a3cb6e285c4a3a0dc0674bb828cc5b0c34833 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Tue, 23 Jun 2015 10:32:26 +0000 Subject: Also save x8. It may be passed into a function as the indirect result location pointer when the return value doesn't fit in a register, e.g. when returning a struct. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation --- libexec/rtld-elf/aarch64/rtld_start.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rtld-elf/aarch64/rtld_start.S b/libexec/rtld-elf/aarch64/rtld_start.S index e34b172a4ab1a..a5e0df59fd749 100644 --- a/libexec/rtld-elf/aarch64/rtld_start.S +++ b/libexec/rtld-elf/aarch64/rtld_start.S @@ -68,6 +68,7 @@ ENTRY(_rtld_bind_start) stp x2, x3, [sp, #-16]! stp x4, x5, [sp, #-16]! stp x6, x7, [sp, #-16]! + stp x8, xzr, [sp, #-16]! /* Calculate reloff */ ldr x2, [x17, #0] /* Get the address of the entry */ @@ -84,12 +85,13 @@ ENTRY(_rtld_bind_start) bl _rtld_bind /* Restore the registers saved by the plt code */ - ldp xzr, x30, [sp, #(4 * 16)] + ldp xzr, x30, [sp, #(5 * 16)] /* Backup the address to branch to */ mov x16, x0 /* restore the arguments */ + ldp x8, xzr, [sp], #16 ldp x6, x7, [sp], #16 ldp x4, x5, [sp], #16 ldp x2, x3, [sp], #16 -- cgit v1.3