mirror of
https://github.com/clearlinux/graphene.git
synced 2026-10-03 15:39:36 +00:00
[LibOS/glibc] Don't ignore redzone in syscall-template.S
For trivial system call, sysdeps/unix/syscall-template.S is used to generate system call stub functions, which ignores redzone. This commit fixes the issue. Also use %rcx instead of %rbx without pushq/popq as %rcx is clobbered in system call ABI. Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
This commit is contained in:
committed by
Don Porter
parent
8cb262d0c0
commit
7dae9d6460
@@ -5,12 +5,17 @@
|
||||
.weak syscalldb
|
||||
.type syscalldb, @function
|
||||
|
||||
# define SYSCALLDB \
|
||||
pushq %rbx; \
|
||||
movq syscalldb@GOTPCREL(%rip), %rbx; \
|
||||
call *%rbx; \
|
||||
popq %rbx;
|
||||
|
||||
# if defined(PSEUDO) && defined(SYSCALL_NAME) && defined(SYSCALL_SYMBOL)
|
||||
# define SYSCALLDB \
|
||||
subq $128, %rsp; \
|
||||
movq syscalldb@GOTPCREL(%rip), %rcx; \
|
||||
call *%rcx; \
|
||||
addq $128, %rsp
|
||||
# else
|
||||
# define SYSCALLDB \
|
||||
movq syscalldb@GOTPCREL(%rip), %rcx; \
|
||||
call *%rcx
|
||||
# endif
|
||||
|
||||
#else /* !__ASSEMBLER__ */
|
||||
asm (
|
||||
|
||||
Reference in New Issue
Block a user