patches/strace/4.5.17/160-undef-syscall.patch
author Michael Hope <michael.hope@linaro.org>
Wed Oct 19 15:27:32 2011 +1300 (2011-10-19)
changeset 2739 f320e22f2cba
parent 747 d3e603e7c17c
permissions -rw-r--r--
arch: add softfp support

Some architectures support a mixed hard/soft floating point, where
the compiler emits hardware floating point instructions, but passes
the operands in core (aka integer) registers.

For example, ARM supports this mode (to come in the next changeset).

Add support for softfp cross compilers to the GCC and GLIBC
configuration. Needed for Ubuntu and other distros that are softfp.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 Original patch from gentoo: ../../dev/crosstool-NG/ct-ng.trunk/patches/strace/4.5.17/160-undef-syscall.patch
     2 -= BEGIN original header =-
     3 diff -dur strace-4.5.16.orig/linux/syscallent.h strace-4.5.16/linux/syscallent.h
     4 -= END original header =-
     5 diff -durN strace-4.5.17.orig/linux/syscallent.h strace-4.5.17/linux/syscallent.h
     6 --- strace-4.5.17.orig/linux/syscallent.h	2008-07-18 03:23:49.000000000 +0200
     7 +++ strace-4.5.17/linux/syscallent.h	2008-10-24 21:30:13.000000000 +0200
     8 @@ -130,7 +130,11 @@
     9  	{ 2,	TF,	sys_statfs,		"statfs"	}, /* 99 */
    10  	{ 2,	TD,	sys_fstatfs,		"fstatfs"	}, /* 100 */
    11  	{ 3,	0,	sys_ioperm,		"ioperm"	}, /* 101 */
    12 -	{ 2,	TD,	sys_socketcall,		"socketcall", SYS_socketcall }, /* 102 */
    13 +	{ 2,	TD,	sys_socketcall,		"socketcall"
    14 +#ifdef __NR_socketcall
    15 +	    , SYS_socketcall
    16 +#endif
    17 +								}, /* 102 */
    18  	{ 3,	0,	sys_syslog,		"syslog"	}, /* 103 */
    19  	{ 3,	0,	sys_setitimer,		"setitimer"	}, /* 104 */
    20  	{ 2,	0,	sys_getitimer,		"getitimer"	}, /* 105 */
    21 @@ -145,7 +149,11 @@
    22  	{ 4,	TP,	sys_wait4,		"wait4", SYS_wait4 }, /* 114 */
    23  	{ 1,	0,	sys_swapoff,		"swapoff"	}, /* 115 */
    24  	{ 1,	0,	sys_sysinfo,		"sysinfo"	}, /* 116 */
    25 -	{ 6,	0,	sys_ipc,		"ipc", SYS_ipc }, /* 117 */
    26 +	{ 6,	0,	sys_ipc,		"ipc"
    27 +#ifdef __NR_ipc
    28 +	    , SYS_ipc
    29 +#endif
    30 +								}, /* 117 */
    31  	{ 1,	TD,	sys_fsync,		"fsync"		}, /* 118 */
    32  	{ 1,	TS,	sys_sigreturn,		"sigreturn"	}, /* 119 */
    33  	{ 5,	TP,	sys_clone,		"clone", SYS_clone }, /* 120 */
    34 @@ -282,7 +290,11 @@
    35  	{ 3,	0,	sys_io_cancel,		"io_cancel"	}, /* 249 */
    36  	{ 5,	0,	sys_fadvise64,		"fadvise64"	}, /* 250 */
    37  	{ 5,	0,	printargs,		"SYS_251"	}, /* 251 */
    38 -	{ 1,	TP,	sys_exit,		"exit_group", __NR_exit_group }, /* 252 */
    39 +	{ 1,	TP,	sys_exit,		"exit_group"
    40 +#ifdef __NR_exit_group
    41 +	    , __NR_exit_group
    42 +#endif
    43 +								}, /* 252 */
    44  	{ 4,	0,	printargs,		"lookup_dcookie"}, /* 253 */
    45  	{ 1,	0,	sys_epoll_create,	"epoll_create"	}, /* 254 */
    46  	{ 4,	TD,	sys_epoll_ctl,		"epoll_ctl"	}, /* 255 */
    47 diff -durN strace-4.5.17.orig/syscall.c strace-4.5.17/syscall.c
    48 --- strace-4.5.17.orig/syscall.c	2008-10-24 21:30:13.000000000 +0200
    49 +++ strace-4.5.17/syscall.c	2008-10-24 21:30:13.000000000 +0200
    50 @@ -2452,14 +2452,18 @@
    51  	switch (known_scno(tcp)) {
    52  #ifdef LINUX
    53  #if !defined (ALPHA) && !defined(MIPS) && !defined(HPPA)
    54 +#ifdef __NR_socketcall
    55  	case SYS_socketcall:
    56  		decode_subcall(tcp, SYS_socket_subcall,
    57  			SYS_socket_nsubcalls, deref_style);
    58  		break;
    59 +#endif
    60 +#ifdef __NR_ipc
    61  	case SYS_ipc:
    62  		decode_subcall(tcp, SYS_ipc_subcall,
    63  			SYS_ipc_nsubcalls, shift_style);
    64  		break;
    65 +#endif
    66  #endif /* !(ALPHA || MIPS || HPPA) */
    67  #endif /* LINUX */
    68  #ifdef SVR4