svn commit: r293832 - in head: lib/csu/aarch64 libexec/rtld-elf/aarch64
Andrew Turner
andrew at FreeBSD.org
Wed Jan 13 15:54:18 UTC 2016
Author: andrew
Date: Wed Jan 13 15:54:17 2016
New Revision: 293832
URL: https://svnweb.freebsd.org/changeset/base/293832
Log:
Remove the compat code to handle the kernel passing us an unalinged
stackpointer. Userland expects the kernel to pass it an aligned sp and
pass a pointer to the arguments in x0. The kernel side was updated in
r289502, 3 months ago.
Sponsored by: ABT Systems Ltd
Modified:
head/lib/csu/aarch64/crt1.c
head/libexec/rtld-elf/aarch64/rtld_start.S
Modified: head/lib/csu/aarch64/crt1.c
==============================================================================
--- head/lib/csu/aarch64/crt1.c Wed Jan 13 14:47:13 2016 (r293831)
+++ head/lib/csu/aarch64/crt1.c Wed Jan 13 15:54:17 2016 (r293832)
@@ -54,11 +54,7 @@ __asm(" .text \n"
" .align 0 \n"
" .globl _start \n"
" _start: \n"
-/* TODO: Remove this when the kernel correctly aligns the stack */
-" cbnz x0, 1f \n" /* Are we using a new kernel? */
-" mov x0, sp \n" /* No, load the args from sp */
-" and sp, x0, #~0xf \n" /* And align the stack */
-"1: mov x3, x2 \n" /* cleanup */
+" mov x3, x2 \n" /* cleanup */
" add x1, x0, #8 \n" /* load argv */
" ldr x0, [x0] \n" /* load argc */
" add x2, x1, x0, lsl #3 \n" /* env is after argv */
Modified: head/libexec/rtld-elf/aarch64/rtld_start.S
==============================================================================
--- head/libexec/rtld-elf/aarch64/rtld_start.S Wed Jan 13 14:47:13 2016 (r293831)
+++ head/libexec/rtld-elf/aarch64/rtld_start.S Wed Jan 13 15:54:17 2016 (r293832)
@@ -34,13 +34,7 @@ ENTRY(.rtld_start)
mov x19, x0 /* Put ps_strings in a callee-saved register */
mov x20, sp /* And the stack pointer */
- /* Handle the old style stack */
- /* TODO: Remove this when the kernel correctly aligns the stack */
- cbnz x0, 1f
- mov x0, sp /* sp points to the args */
- and sp, x0, #~0xf /* Align the stack as needed */
-
-1: sub sp, sp, #16 /* Make room for obj_main & exit proc */
+ sub sp, sp, #16 /* Make room for obj_main & exit proc */
mov x1, sp /* exit_proc */
add x2, x1, #8 /* obj_main */
More information about the svn-src-head
mailing list