summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2012-04-17 11:05:04 -0700
committerDmitry V. Levin <ldv@altlinux.org>2012-04-18 15:02:40 +0000
commit085e42886052190d3e515ca865546b527f59cdd1 (patch)
treef09fae3b106d16477db384dccf3b0e430e7dd52e /linux
parent2bb4581ee501f6803df258ebb74c63a18a48422b (diff)
downloadstrace-085e42886052190d3e515ca865546b527f59cdd1.tar.gz
strace-085e42886052190d3e515ca865546b527f59cdd1.tar.bz2
strace-085e42886052190d3e515ca865546b527f59cdd1.tar.xz
x32: add ia32 support
* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent1.h, linux/x32/ioctlent1.h, linux/x32/signalent1.h and linux/x32/syscallent1.h. * configure.ac: Remove AC_GNU_SOURCE, obsoleted by AC_USE_SYSTEM_EXTENSIONS. * defs.h (SUPPORTED_PERSONALITIES): Set to 2 for X32. (PERSONALITY1_WORDSIZE): Set to 4 for X32. * file.c (stat64): New struct for X32. (sys_lseek32): New function for X32. (stat64): Undef. (sys_fstat64): Likewise. (sys_stat64): Likewise. (realprintstat64): New function for X32. (sys_fstat64): Likewise. (sys_stat64): Likewise. * mem.c (sys_old_mmap): New function for X32. * pathtrace.c (pathtrace_match): Also check sys_old_mmap for X32. * syscall.c (update_personality): Add X32 support. (get_scno): Support currpers == 1 for X32. * linux/syscall.h (sys_lseek32): New function prototype for X32. * linux/x32/errnoent1.h: New file. * linux/x32/ioctlent1.h: Likewise. * linux/x32/signalent1.h: Likewise. * linux/x32/syscallent1.h: Likewise.
Diffstat (limited to 'linux')
-rw-r--r--linux/syscall.h4
-rw-r--r--linux/x32/errnoent1.h2
-rw-r--r--linux/x32/ioctlent1.h2
-rw-r--r--linux/x32/signalent1.h2
-rw-r--r--linux/x32/syscallent1.h11
5 files changed, 21 insertions, 0 deletions
diff --git a/linux/syscall.h b/linux/syscall.h
index e56697d..7e0155e 100644
--- a/linux/syscall.h
+++ b/linux/syscall.h
@@ -371,3 +371,7 @@ int sys_shmsys();
#define SYS_shmsys_subcall 207
#define SYS_shmsys_nsubcalls 4
#endif
+
+#ifdef X32
+int sys_lseek32();
+#endif
diff --git a/linux/x32/errnoent1.h b/linux/x32/errnoent1.h
new file mode 100644
index 0000000..a894827
--- /dev/null
+++ b/linux/x32/errnoent1.h
@@ -0,0 +1,2 @@
+/* Our second set comes from the i386 files. */
+#include "../errnoent.h"
diff --git a/linux/x32/ioctlent1.h b/linux/x32/ioctlent1.h
new file mode 100644
index 0000000..1f92feb
--- /dev/null
+++ b/linux/x32/ioctlent1.h
@@ -0,0 +1,2 @@
+/* Our second set comes from the i386 files. */
+#include "linux/ioctlent.h"
diff --git a/linux/x32/signalent1.h b/linux/x32/signalent1.h
new file mode 100644
index 0000000..5c18d98
--- /dev/null
+++ b/linux/x32/signalent1.h
@@ -0,0 +1,2 @@
+/* Our second set comes from the i386 files. */
+#include "../signalent.h"
diff --git a/linux/x32/syscallent1.h b/linux/x32/syscallent1.h
new file mode 100644
index 0000000..20c6529
--- /dev/null
+++ b/linux/x32/syscallent1.h
@@ -0,0 +1,11 @@
+/* Our second set comes from the i386 files.
+ Only a couple of calls we cannot support without the i386 headers. */
+
+#define sys_oldstat printargs
+#define sys_oldfstat printargs
+#define sys_oldlstat printargs
+#define sys_lseek sys_lseek32
+#define sys_lstat64 sys_stat64
+#define sys_truncate64 sys_truncate
+#define sys_ftruncate64 sys_ftruncate
+#include "i386/syscallent.h"