mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-21 04:31:04 +08:00
6e45e6ef4d
* hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Destroy reply port of interrupted RPC instead of restoring it. * sysdeps/i386/setjmp.S (__sigsetjmp): Add hidden_def. * sysdeps/mach/hurd/accept4.c (__libc_accept4): Remove libc_hidden_def. * sysdeps/mach/hurd/dl-sysdep.c (__libc_stack_end): Add relro attribute, define rtld_hidden_data_def. * sysdeps/mach/hurd/fxstatat64.c (__fxstatat64): Add libc_hidden_def. * sysdeps/mach/hurd/if_index.c (__if_freenameindex): Add libc_hidden_def. (if_freenameindex): Add libc_hidden_weak. (if_nameindex): Add libc_hidden_weak. * sysdeps/mach/hurd/open.c (_open64): Rename libc_hidden_weak into __open64. * sysdeps/mach/hurd/sigwait.c (__sigwait): Add libc_hidden_def. * sysdeps/mach/hurd/xmknodat.c (__xmknodat): Add libc_hidden_def. * sysdeps/mach/nanosleep.c: Include <time.h> (__nanosleep): Rename to __libc_nanosleep. (__nanosleep): Add weak_alias. (nanosleep): Update alias. * sysdeps/mach/hurd/configure.ac (NO_HIDDEN): Do not define. * sysdeps/mach/hurd/configure: Regenerate.
59 lines
1.7 KiB
ArmAsm
59 lines
1.7 KiB
ArmAsm
/* setjmp for i386.
|
|
Copyright (C) 1995-2015 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with the GNU C Library; if not, see
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
#include <sysdep.h>
|
|
#include <jmpbuf-offsets.h>
|
|
#include <asm-syntax.h>
|
|
#include <stap-probe.h>
|
|
|
|
#define PARMS 4 /* no space for saved regs */
|
|
#define JMPBUF PARMS
|
|
#define SIGMSK JMPBUF+4
|
|
|
|
ENTRY (__sigsetjmp)
|
|
|
|
movl JMPBUF(%esp), %eax
|
|
|
|
/* Save registers. */
|
|
movl %ebx, (JB_BX*4)(%eax)
|
|
movl %esi, (JB_SI*4)(%eax)
|
|
movl %edi, (JB_DI*4)(%eax)
|
|
leal JMPBUF(%esp), %ecx /* Save SP as it will be after we return. */
|
|
#ifdef PTR_MANGLE
|
|
PTR_MANGLE (%ecx)
|
|
#endif
|
|
movl %ecx, (JB_SP*4)(%eax)
|
|
movl 0(%esp), %ecx /* Save PC we are returning to now. */
|
|
LIBC_PROBE (setjmp, 3, 4@%eax, -4@SIGMSK(%esp), 4@%ecx)
|
|
#ifdef PTR_MANGLE
|
|
PTR_MANGLE (%ecx)
|
|
#endif
|
|
movl %ecx, (JB_PC*4)(%eax)
|
|
movl %ebp, (JB_BP*4)(%eax) /* Save caller's frame pointer. */
|
|
|
|
#if IS_IN (rtld)
|
|
/* In ld.so we never save the signal mask. */
|
|
xorl %eax, %eax
|
|
ret
|
|
#else
|
|
/* Make a tail call to __sigjmp_save; it takes the same args. */
|
|
jmp __sigjmp_save
|
|
#endif
|
|
END (__sigsetjmp)
|
|
hidden_def (__sigsetjmp)
|