From a5be77b2fee83824946d63bfb5dd17c4a0266915 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 4 Jul 2013 10:21:52 +0000 Subject: [PATCH] * aarch64/syscalls.c (stack_ptr): Defined with asm ("wsp") if __ILP32__ is defined. --- libgloss/ChangeLog | 5 +++++ libgloss/aarch64/syscalls.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog index 6fdfccd16..71087e562 100644 --- a/libgloss/ChangeLog +++ b/libgloss/ChangeLog @@ -1,3 +1,8 @@ +2013-07-04 Yufeng Zhang + + * aarch64/syscalls.c (stack_ptr): Defined with asm ("wsp") if __ILP32__ + is defined. + 2013-07-02 Joey Ye * arm/crt0.S (_mainCRTStartup): Weak reference to atexit and _fini diff --git a/libgloss/aarch64/syscalls.c b/libgloss/aarch64/syscalls.c index a809476f8..058cef5cb 100644 --- a/libgloss/aarch64/syscalls.c +++ b/libgloss/aarch64/syscalls.c @@ -109,7 +109,11 @@ static struct fdent *findslot _PARAMS ((int)); static int newslot _PARAMS ((void)); /* Register name faking - works in collusion with the linker. */ +#ifdef __ILP32__ +register char * stack_ptr asm ("wsp"); +#else register char * stack_ptr asm ("sp"); +#endif /* following is copied from libc/stdio/local.h to check std streams */