* sysdeps/unix/sysv/linux/arm/kernel-features.h

(__ASSUME_SIGFRAME_V2): Define for 2.6.18 and later.
	* sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
	(__default_sa_restorer): Rename to __default_sa_restorer_v1.
	Don't define if __ASSUME_SIGFRAME_V2.
	(__default_rt_sa_restorer): Rename to
	__default_rt_sa_restorer_v1.  Don't define if
	__ASSUME_SIGFRAME_V2.
	(__default_sa_restorer_v2, __default_rt_sa_restorer_v2): New.
	* sysdeps/unix/sysv/linux/arm/nptl/Versions
	(__default_sa_restorer_v1, __default_rt_sa_restorer_v1,
	__default_sa_restorer_v2, __default_rt_sa_restorer_v2): Add to
	GLIBC_PRIVATE.
	* sysdeps/unix/sysv/linux/arm/sigaction.c [__ARM_EABI__]
	(__default_sa_restorer_v1, __default_sa_restorer_v2,
	__default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2):
	Declare.
	(__default_sa_restorer, __default_rt_sa_restorer): Define as
	macros depending on kernel version.
This commit is contained in:
Daniel Jacobowitz 2007-05-23 17:33:17 +00:00
parent 7a30cb8323
commit 99e5e16c5c
5 changed files with 76 additions and 3 deletions

View File

@ -1,3 +1,25 @@
2007-05-23 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/kernel-features.h
(__ASSUME_SIGFRAME_V2): Define for 2.6.18 and later.
* sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
(__default_sa_restorer): Rename to __default_sa_restorer_v1.
Don't define if __ASSUME_SIGFRAME_V2.
(__default_rt_sa_restorer): Rename to
__default_rt_sa_restorer_v1. Don't define if
__ASSUME_SIGFRAME_V2.
(__default_sa_restorer_v2, __default_rt_sa_restorer_v2): New.
* sysdeps/unix/sysv/linux/arm/nptl/Versions
(__default_sa_restorer_v1, __default_rt_sa_restorer_v1,
__default_sa_restorer_v2, __default_rt_sa_restorer_v2): Add to
GLIBC_PRIVATE.
* sysdeps/unix/sysv/linux/arm/sigaction.c [__ARM_EABI__]
(__default_sa_restorer_v1, __default_sa_restorer_v2,
__default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2):
Declare.
(__default_sa_restorer, __default_rt_sa_restorer): Define as
macros depending on kernel version.
2007-01-23 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE, PTR_DEMANGLE):

View File

@ -29,24 +29,49 @@
Start the unwind tables at least one instruction before the signal
trampoline, because the unwinder will assume we are returning after
a call site. */
a call site.
Because the signal frame layout changed in 2.6.18, we provide two
copies of these functions with different unwind information. */
#ifndef __ASSUME_SIGFRAME_V2
.fnstart
.save {r0-r15}
.pad #12
nop
ENTRY(__default_sa_restorer)
ENTRY(__default_sa_restorer_v1)
mov r7, $SYS_ify(sigreturn)
swi 0x0
.fnend
#endif
.fnstart
.save {r0-r15}
.pad #32
nop
ENTRY(__default_sa_restorer_v2)
mov r7, $SYS_ify(sigreturn)
swi 0x0
.fnend
#ifdef __NR_rt_sigreturn
#ifndef __ASSUME_SIGFRAME_V2
.fnstart
.save {r0-r15}
.pad #168
nop
ENTRY(__default_rt_sa_restorer)
ENTRY(__default_rt_sa_restorer_v1)
mov r7, $SYS_ify(rt_sigreturn)
swi 0x0
.fnend
#endif
.fnstart
.save {r0-r15}
.pad #160
nop
ENTRY(__default_rt_sa_restorer_v2)
mov r7, $SYS_ify(rt_sigreturn)
swi 0x0
.fnend

View File

@ -46,4 +46,9 @@
# define __ASSUME_VFORK_SYSCALL 1
#endif
/* The signal frame layout changed in 2.6.18. */
#if __LINUX_KERNEL_VERSION >= 132626
# define __ASSUME_SIGFRAME_V2 1
#endif
#include_next <kernel-features.h>

View File

@ -2,5 +2,7 @@ libc {
GLIBC_PRIVATE {
# A copy of sigaction lives in NPTL, and needs these.
__default_sa_restorer; __default_rt_sa_restorer;
__default_sa_restorer_v1; __default_rt_sa_restorer_v1;
__default_sa_restorer_v2; __default_rt_sa_restorer_v2;
}
}

View File

@ -36,8 +36,27 @@ int __libc_missing_rt_sigs;
#define SA_RESTORER 0x04000000
#ifdef __ARM_EABI__
extern void __default_sa_restorer_v1(void);
extern void __default_sa_restorer_v2(void);
extern void __default_rt_sa_restorer_v1(void);
extern void __default_rt_sa_restorer_v2(void);
# ifdef __ASSUME_SIGFRAME_V2
# define __default_sa_restorer __default_sa_restorer_v2
# define __default_rt_sa_restorer __default_rt_sa_restorer_v2
# else
# include <ldsodefs.h>
# define __default_sa_restorer (GLRO(dl_osversion) >= 0x020612 \
? __default_sa_restorer_v2 \
: __default_sa_restorer_v1)
# define __default_rt_sa_restorer (GLRO(dl_osversion) >= 0x020612 \
? __default_rt_sa_restorer_v2 \
: __default_rt_sa_restorer_v1)
# endif
#else
extern void __default_sa_restorer(void);
extern void __default_rt_sa_restorer(void);
#endif
/* When RT signals are in use we need to use a different return stub. */
#ifdef __NR_rt_sigreturn