diff options
Diffstat (limited to 'libc/sysdeps/linux/arc/sigrestorer.S')
-rw-r--r-- | libc/sysdeps/linux/arc/sigrestorer.S | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/arc/sigrestorer.S b/libc/sysdeps/linux/arc/sigrestorer.S new file mode 100644 index 000000000..e4deb6bd4 --- /dev/null +++ b/libc/sysdeps/linux/arc/sigrestorer.S @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2017 Synopsys, Inc. (www.synopsys.com) + * + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. + */ + +#include <sysdep.h> + +/* + * Default sigretrun stub if user doesn't specify SA_RESTORER. + */ + +.section .text +.align 4 +.global __default_rt_sa_restorer +.type __default_rt_sa_restorer, @function + +; This "nop" is needed here, because debugger would assume that this function +; called the signal handler, therefore it cannot start on the "mov" +; instruction, at which execution will jump to. + nop +__default_rt_sa_restorer: + mov r8, __NR_rt_sigreturn + ARC_TRAP_INSN + |