summaryrefslogtreecommitdiff
path: root/rtl/linux/i386
diff options
context:
space:
mode:
authorfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-16 18:37:41 +0000
committerfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-16 18:37:41 +0000
commitf206a9c2b1ae1d8727ca27a96d448b61fdb4c766 (patch)
treef28256ff9964c1fc7c0f7fb00891268a117b745d /rtl/linux/i386
downloadfpc-f206a9c2b1ae1d8727ca27a96d448b61fdb4c766.tar.gz
initial import
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@1 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/linux/i386')
-rw-r--r--rtl/linux/i386/bsyscall.inc20
-rw-r--r--rtl/linux/i386/cprt0.as104
-rw-r--r--rtl/linux/i386/cprt21.as122
-rw-r--r--rtl/linux/i386/dllprt0.as67
-rw-r--r--rtl/linux/i386/gprt0.as87
-rw-r--r--rtl/linux/i386/gprt21.as138
-rw-r--r--rtl/linux/i386/prt0.as105
-rw-r--r--rtl/linux/i386/sighnd.inc95
-rw-r--r--rtl/linux/i386/sighndh.inc70
-rw-r--r--rtl/linux/i386/stat.inc123
-rw-r--r--rtl/linux/i386/syscall.inc368
-rw-r--r--rtl/linux/i386/syscallh.inc52
-rw-r--r--rtl/linux/i386/sysnr.inc267
13 files changed, 1618 insertions, 0 deletions
diff --git a/rtl/linux/i386/bsyscall.inc b/rtl/linux/i386/bsyscall.inc
new file mode 100644
index 0000000000..168356fbd4
--- /dev/null
+++ b/rtl/linux/i386/bsyscall.inc
@@ -0,0 +1,20 @@
+{
+ $Id: bsyscall.inc,v 1.1 2005/03/03 20:58:38 florian Exp $
+ This file is part of the Free Pascal run time library.
+ Copyright (c) 2005 by Michael Van Canneyt,
+ member of the Free Pascal development team.
+
+ See the file COPYING.FPC, included in this distribution,
+ for details about the copyright.
+
+ This program 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.
+
+ **********************************************************************}
+
+{
+ $Log: bsyscall.inc,v $
+ Revision 1.1 2005/03/03 20:58:38 florian
+ + routines in baseunix can be overriden by processor specifics in bsyscall.inc
+} \ No newline at end of file
diff --git a/rtl/linux/i386/cprt0.as b/rtl/linux/i386/cprt0.as
new file mode 100644
index 0000000000..e79d36474a
--- /dev/null
+++ b/rtl/linux/i386/cprt0.as
@@ -0,0 +1,104 @@
+#
+# $Id: cprt0.as,v 1.4 2004/07/03 21:50:31 daniel Exp $
+# This file is part of the Free Pascal run time library.
+# Copyright (c) 1999-2000 by Michael Van Canneyt and Peter Vreman
+# members of the Free Pascal development team.
+#
+# See the file COPYING.FPC, included in this distribution,
+# for details about the copyright.
+#
+# This program 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.
+#
+#**********************************************************************}
+#
+# Linux ELF startup code for Free Pascal
+#
+#
+# Stack layout at program start:
+#
+# nil
+# envn
+# ....
+# .... ENVIRONMENT VARIABLES
+# env1
+# env0
+# nil
+# argn
+# ....
+# .... COMMAND LINE OPTIONS
+# arg1
+# arg0
+# argc <--- esp
+#
+
+ .file "cprt0.as"
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ /* First locate the start of the environment variables */
+ popl %ecx /* Get argc in ecx */
+ movl %esp,%ebx /* Esp now points to the arguments */
+ leal 4(%esp,%ecx,4),%eax /* The start of the environment is: esp+4*eax+8 */
+ andl $0xfffffff8,%esp /* Align stack */
+
+ movl %eax,operatingsystem_parameter_envp /* Move the environment pointer */
+ movl %ecx,operatingsystem_parameter_argc /* Move the argument counter */
+ movl %ebx,operatingsystem_parameter_argv /* Move the argument pointer */
+
+ movl %eax,__environ /* libc environ */
+
+ pushl %eax
+ pushl %ebx
+ pushl %ecx
+
+ call __libc_init /* init libc */
+ movzwl __fpu_control,%eax
+ pushl %eax
+ call __setfpucw
+ popl %eax
+ pushl $_fini
+ call atexit
+ popl %eax
+ call _init
+
+ popl %eax
+ popl %eax
+
+ xorl %ebp,%ebp
+ call PASCALMAIN /* start the program */
+
+ .globl _haltproc
+ .type _haltproc,@function
+_haltproc:
+_haltproc2: # GAS <= 2.15 bug: generates larger jump if a label is exported
+ movzwl operatingsystem_result,%ebx
+ pushl %ebx
+ call exit
+ xorl %eax,%eax
+ incl %eax /* eax=1, exit call */
+ popl %ebx
+ int $0x80
+ jmp _haltproc2
+
+.data
+
+.bss
+ .type ___fpc_brk_addr,@object
+ .comm ___fpc_brk_addr,4 /* heap management */
+
+ .comm operatingsystem_parameter_envp,4
+ .comm operatingsystem_parameter_argc,4
+ .comm operatingsystem_parameter_argv,4
+
+#
+# $Log: cprt0.as,v $
+# Revision 1.4 2004/07/03 21:50:31 daniel
+# * Modified bootstrap code so separate prt0.as/prt0_10.as files are no
+# longer necessary
+#
+# Revision 1.3 2002/09/07 16:01:20 peter
+# * old logs removed and tabs fixed
+#
diff --git a/rtl/linux/i386/cprt21.as b/rtl/linux/i386/cprt21.as
new file mode 100644
index 0000000000..3bad439f34
--- /dev/null
+++ b/rtl/linux/i386/cprt21.as
@@ -0,0 +1,122 @@
+#
+# $Id: cprt21.as,v 1.6 2004/07/03 21:50:31 daniel Exp $
+# This file is part of the Free Pascal run time library.
+# Copyright (c) 1999-2000 by Michael Van Canneyt and Peter Vreman
+# members of the Free Pascal development team.
+#
+# See the file COPYING.FPC, included in this distribution,
+# for details about the copyright.
+#
+# This program 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.
+#
+#**********************************************************************}
+#
+# Linux ELF startup code for Free Pascal
+#
+# Stack layout at program start:
+#
+# nil
+# envn
+# ....
+# .... ENVIRONMENT VARIABLES
+# env1
+# env0
+# nil
+# argn
+# ....
+# .... COMMAND LINE OPTIONS
+# arg1
+# arg0
+# argc <--- esp
+#
+
+ .file "prt1.as"
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ /* First locate the start of the environment variables */
+
+ popl %esi
+ movl %eax,%edi
+
+ movl %esp,%ebx /* Points to the arguments */
+ movl %esi,%eax
+ incl %eax
+ shll $2,%eax
+ addl %esp,%eax
+ andl $0xfffffff8,%esp /* Align stack */
+
+ movl %eax,operatingsystem_parameter_envp /* Move the environment pointer */
+ movl %esi,operatingsystem_parameter_argc /* Move the argument counter */
+ movl %ebx,operatingsystem_parameter_argv /* Move the argument pointer */
+
+ xorl %ebp,%ebp
+ pushl %edi
+ pushl %esp
+ pushl %edx
+ pushl $_fini_dummy
+ pushl $_init_dummy
+ pushl %ebx
+ pushl %esi
+ pushl $main
+ call __libc_start_main
+ hlt
+
+/* fake main routine which will be run from libc */
+main:
+ /* save return address */
+ popl %eax
+ movl %eax,___fpc_ret
+ movl %ebx,___fpc_ret_ebx
+ movl %ebp,___fpc_ret_ebp
+ pushl %eax
+
+ /* start the program */
+ xorl %ebp,%ebp
+ call PASCALMAIN
+ hlt
+
+ .globl _haltproc
+ .type _haltproc,@function
+_haltproc:
+ movzwl operatingsystem_result,%eax
+
+ movl ___fpc_ret,%edx /* return to libc */
+ movl ___fpc_ret_ebp,%ebp
+ movl ___fpc_ret_ebx,%ebx
+ push %edx
+_init_dummy:
+_fini_dummy:
+ ret
+
+.data
+ .align 4
+
+___fpc_ret: /* return address to libc */
+ .long 0
+___fpc_ret_ebx:
+ .long 0
+___fpc_ret_ebp:
+ .long 0
+
+.bss
+ .type ___fpc_brk_addr,@object
+ .comm ___fpc_brk_addr,4 /* heap management */
+
+ .comm operatingsystem_parameter_envp,4
+ .comm operatingsystem_parameter_argc,4
+ .comm operatingsystem_parameter_argv,4
+
+
+#
+# $Log: cprt21.as,v $
+# Revision 1.6 2004/07/03 21:50:31 daniel
+# * Modified bootstrap code so separate prt0.as/prt0_10.as files are no
+# longer necessary
+#
+# Revision 1.5 2002/09/07 16:01:20 peter
+# * old logs removed and tabs fixed
+#
diff --git a/rtl/linux/i386/dllprt0.as b/rtl/linux/i386/dllprt0.as
new file mode 100644
index 0000000000..9ab1f2cd4a
--- /dev/null
+++ b/rtl/linux/i386/dllprt0.as
@@ -0,0 +1,67 @@
+#
+# $Id: dllprt0.as,v 1.3 2004/07/03 21:50:31 daniel Exp $
+# This file is part of the Free Pascal run time library.
+# Copyright (c) 2001 by Peter Vreman
+#
+# See the file COPYING.FPC, included in this distribution,
+# for details about the copyright.
+#
+# This program 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.
+#
+#**********************************************************************}
+#
+# Linux ELF shared library startup code for Free Pascal
+#
+
+ .file "dllprt0.as"
+ .text
+ .globl _startlib
+ .type _startlib,@function
+_startlib:
+ .globl FPC_LIB_START
+ .type FPC_LIB_START,@function
+FPC_LIB_START:
+ pushl %ebp
+ movl %esp,%ebp
+
+ movl 8(%ebp),%eax
+ movl 12(%ebp),%ecx
+ movl 16(%ebp),%edx
+
+ movl %edx,operatingsystem_parameter_envp /* Move the environment pointer */
+ movl %eax,operatingsystem_parameter_argc /* Move the argument counter */
+ movl %ecx,operatingsystem_parameter_argv /* Move the argument pointer */
+
+ movb $1,U_SYSTEM_ISLIBRARY
+
+ call PASCALMAIN
+
+ leave
+ ret
+
+ .globl _haltproc
+ .type _haltproc,@function
+_haltproc:
+_haltproc2: # GAS <= 2.15 bug: generates larger jump if a label is exported
+ xorl %eax,%eax
+ incl %eax /* eax=1, exit call */
+ movzwl operatingsystem_result,%ebx
+ int $0x80
+ jmp _haltproc2
+
+.bss
+ .comm operatingsystem_parameter_envp,4
+ .comm operatingsystem_parameter_argc,4
+ .comm operatingsystem_parameter_argv,4
+
+#
+# $Log: dllprt0.as,v $
+# Revision 1.3 2004/07/03 21:50:31 daniel
+# * Modified bootstrap code so separate prt0.as/prt0_10.as files are no
+# longer necessary
+#
+# Revision 1.2 2002/09/07 16:01:20 peter
+# * old logs removed and tabs fixed
+#
diff --git a/rtl/linux/i386/gprt0.as b/rtl/linux/i386/gprt0.as
new file mode 100644
index 0000000000..a615762d8d
--- /dev/null
+++ b/rtl/linux/i386/gprt0.as
@@ -0,0 +1,87 @@
+#
+# $Id: gprt0.as,v 1.4 2004/07/03 21:50:31 daniel Exp $
+# This file is part of the Free Pascal run time library.
+# Copyright (c) 1999-2000 by Michael Van Canneyt and Peter Vreman
+# members of the Free Pascal development team.
+#
+# See the file COPYING.FPC, included in this distribution,
+# for details about the copyright.
+#
+# This program 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.
+#
+#**********************************************************************}
+#
+# Linux ELF startup code with profiling support for Free Pascal
+# Note: Needs linking with -lgmon and -lc
+#
+
+ .file "gprt1.as"
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ /* First locate the start of the environment variables */
+ popl %ecx
+ movl %esp,%ebx /* Points to the arguments */
+ movl %ecx,%eax
+ incl %eax
+ shll $2,%eax
+ addl %esp,%eax
+ andl $0xfffffff8,%esp /* Align stack */
+
+ movl %eax,operatingsystem_parameter_envp /* Move the environment pointer */
+ movl %ecx,operatingsystem_parameter_argc /* Move the argument counter */
+ movl %ebx,operatingsystem_parameter_argv /* Move the argument pointer */
+
+ finit /* initialize fpu */
+ fwait
+ fldcw ___fpucw
+
+ pushl $_etext /* Initialize gmon */
+ pushl $_start
+ call monstartup
+ addl $8,%esp
+ pushl $_mcleanup
+ call atexit
+ addl $4,%esp
+
+ xorl %ebp,%ebp
+ call PASCALMAIN
+
+ .globl _haltproc
+ .type _haltproc,@function
+_haltproc:
+_haltproc2: # GAS <= 2.15 bug: generates larger jump if a label is exported
+ movzwl operatingsystem_result,%ebx
+ pushl %ebx
+ call exit /* call libc exit, this will */
+ /* write the gmon.out */
+ xorl %eax,%eax
+ incl %eax /* eax=1, exit call */
+ popl %ebx
+ int $0x80
+ jmp _haltproc2
+
+.data
+___fpucw:
+ .long 0x1332
+
+.bss
+ .type ___fpc_brk_addr,@object
+ .comm ___fpc_brk_addr,4 /* heap management */
+
+ .comm operatingsystem_parameter_envp,4
+ .comm operatingsystem_parameter_argc,4
+ .comm operatingsystem_parameter_argv,4
+
+#
+# $Log: gprt0.as,v $
+# Revision 1.4 2004/07/03 21:50:31 daniel
+# * Modified bootstrap code so separate prt0.as/prt0_10.as files are no
+# longer necessary
+#
+# Revision 1.3 2002/09/07 16:01:20 peter
+# * old logs removed and tabs fixed
+#
diff --git a/rtl/linux/i386/gprt21.as b/rtl/linux/i386/gprt21.as
new file mode 100644
index 0000000000..28c92080ad
--- /dev/null
+++ b/rtl/linux/i386/gprt21.as
@@ -0,0 +1,138 @@
+#
+# $Id: gprt21.as,v 1.6 2004/07/03 21:50:31 daniel Exp $
+# This file is part of the Free Pascal run time library.
+# Copyright (c) 1999-2000 by Michael Van Canneyt and Peter Vreman
+# members of the Free Pascal development team.
+#
+# See the file COPYING.FPC, included in this distribution,
+# for details about the copyright.
+#
+# This program 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.
+#
+#**********************************************************************}
+#
+# Linux ELF startup code for Free Pascal
+#
+
+ .file "prt1.as"
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ /* First locate the start of the environment variables */
+ popl %esi
+ movl %eax,%edi
+
+ movl %esp,%ebx /* Points to the arguments */
+ movl %esi,%eax
+ incl %eax
+ shll $2,%eax
+ addl %esp,%eax
+ andl $0xfffffff8,%esp /* Align stack */
+
+ movl %eax,operatingsystem_parameter_envp /* Move the environment pointer */
+ movl %esi,operatingsystem_parameter_argc /* Move the argument counter */
+ movl %ebx,operatingsystem_parameter_argv /* Move the argument pointer */
+
+ movl %edi,%eax
+ xorl %ebp,%ebp
+ pushl %eax
+ pushl %esp
+ pushl %edx
+ pushl $_fini_dummy
+ pushl $_init_dummy
+ pushl %ebx
+ pushl %esi
+ pushl $cmain
+ call __libc_start_main
+ hlt
+
+/* fake main routine which will be run from libc */
+cmain:
+ /* save return address */
+ popl %eax
+ movl %eax,___fpc_ret
+ movl %ebx,___fpc_ret_ebx
+ movl %esi,___fpc_ret_esi
+ movl %edi,___fpc_ret_edi
+ pushl %eax
+
+ call __gmon_start__
+
+ /* start the program */
+ call PASCALMAIN
+ hlt
+
+ .globl _haltproc
+ .type _haltproc,@function
+_haltproc:
+ movzwl operatingsystem_result,%eax
+
+ movl ___fpc_ret,%edx /* return to libc */
+ movl ___fpc_ret_ebx,%ebx
+ movl ___fpc_ret_esi,%esi
+ movl ___fpc_ret_edi,%edi
+ push %edx
+_init_dummy:
+_fini_dummy:
+ ret
+
+ .globl __gmon_start__
+ .type __gmon_start__,@function
+__gmon_start__:
+ pushl %ebp
+ movl __monstarted,%eax
+ leal 0x1(%eax),%edx
+ movl %esp,%ebp
+ movl %edx,__monstarted
+ testl %eax,%eax
+ jnz .Lnomonstart
+ pushl $etext /* Initialize gmon */
+ pushl $_start
+ call monstartup
+ addl $8,%esp
+ pushl $_mcleanup
+ call atexit
+ addl $4,%esp
+.Lnomonstart:
+ movl %ebp,%esp
+ popl %ebp
+ ret
+
+.data
+ .align 4
+
+___fpc_ret: /* return address to libc */
+ .long 0
+___fpc_ret_ebx:
+ .long 0
+___fpc_ret_esi:
+ .long 0
+___fpc_ret_edi:
+ .long 0
+
+.bss
+ .lcomm __monstarted,4
+
+ .type ___fpc_brk_addr,@object
+ .comm ___fpc_brk_addr,4 /* heap management */
+
+ .comm operatingsystem_parameter_envp,4
+ .comm operatingsystem_parameter_argc,4
+ .comm operatingsystem_parameter_argv,4
+
+
+#
+# $Log: gprt21.as,v $
+# Revision 1.6 2004/07/03 21:50:31 daniel
+# * Modified bootstrap code so separate prt0.as/prt0_10.as files are no
+# longer necessary
+#
+# Revision 1.5 2004/03/10 20:38:59 peter
+# * only i386 needs cprt21 to link with glibc 2.1+
+#
+# Revision 1.4 2002/09/07 16:01:20 peter
+# * old logs removed and tabs fixed
+#
diff --git a/rtl/linux/i386/prt0.as b/rtl/linux/i386/prt0.as
new file mode 100644
index 0000000000..f134ca7030
--- /dev/null
+++ b/rtl/linux/i386/prt0.as
@@ -0,0 +1,105 @@
+#
+# $Id: prt0.as,v 1.5 2004/07/03 23:04:34 daniel Exp $
+# This file is part of the Free Pascal run time library.
+# Copyright (c) 1999-2004 by Michael Van Canneyt, Peter Vreman,
+# & Daniel Mantione, members of the Free Pascal development team.
+#
+# See the file COPYING.FPC, included in this distribution,
+# for details about the copyright.
+#
+# This program 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.
+#
+#**********************************************************************}
+#
+# Linux ELF startup code for Free Pascal
+#
+# The code in this file is the default startup code, it is used unless
+# libc is linked in, profiling is enabled or you are compiling a shared
+# library.
+#
+#
+# Stack layout at program start:
+#
+# nil
+# envn
+# ....
+# .... ENVIRONMENT VARIABLES
+# env1
+# env0
+# nil
+# argn
+# ....
+# .... COMMAND LINE OPTIONS
+# arg1
+# arg0
+# argc <--- esp
+#
+
+ .file "prt0.as"
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ /* First locate the start of the environment variables */
+ popl %ecx /* Get argc in ecx */
+ movl %esp,%ebx /* Esp now points to the arguments */
+ leal 4(%esp,%ecx,4),%eax /* The start of the environment is: esp+4*eax+4 */
+ andl $0xfffffff8,%esp /* Align stack */
+
+ leal operatingsystem_parameters,%edi
+ stosl /* Move the environment pointer */
+ xchg %ecx,%eax
+ stosl /* Move the argument counter */
+ xchg %ebx,%eax
+ stosl /* Move the argument pointer */
+
+
+ fninit /* initialize fpu */
+ fwait
+ fldcw ___fpucw
+
+ xorl %ebp,%ebp
+ call PASCALMAIN
+
+ .globl _haltproc
+ .type _haltproc,@function
+_haltproc:
+_haltproc2: # GAS <= 2.15 bug: generates larger jump if a label is exported
+ xorl %eax,%eax
+ incl %eax /* eax=1, exit call */
+ movzwl operatingsystem_result,%ebx
+ int $0x80
+ jmp _haltproc2
+
+.data
+___fpucw:
+ .long 0x1332
+
+
+.bss
+ .type ___fpc_brk_addr,@object
+ .comm ___fpc_brk_addr,4 /* heap management */
+
+operatingsystem_parameters:
+ .skip 3*4
+
+ .global operatingsystem_parameter_envp
+ .global operatingsystem_parameter_argc
+ .global operatingsystem_parameter_argv
+ .set operatingsystem_parameter_envp,operatingsystem_parameters+0
+ .set operatingsystem_parameter_argc,operatingsystem_parameters+4
+ .set operatingsystem_parameter_argv,operatingsystem_parameters+8
+#
+# $Log: prt0.as,v $
+# Revision 1.5 2004/07/03 23:04:34 daniel
+# * Updated comments
+#
+# Revision 1.4 2004/07/03 21:50:31 daniel
+# * Modified bootstrap code so separate prt0.as/prt0_10.as files are no
+# longer necessary
+#
+# Revision 1.3 2002/09/07 16:01:20 peter
+# * old logs removed and tabs fixed
+#
diff --git a/rtl/linux/i386/sighnd.inc b/rtl/linux/i386/sighnd.inc
new file mode 100644
index 0000000000..be5ae5e4bb
--- /dev/null
+++ b/rtl/linux/i386/sighnd.inc
@@ -0,0 +1,95 @@
+{
+ $Id: sighnd.inc,v 1.8 2005/04/24 21:19:22 peter Exp $
+ This file is part of the Free Pascal run time library.
+ Copyright (c) 1999-2000 by Michael Van Canneyt,
+ member of the Free Pascal development team.
+
+ Signal handler is arch dependant due to processor to language
+ exception conversion.
+
+ See the file COPYING.FPC, included in this distribution,
+ for details about the copyright.
+
+ This program 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.
+
+ **********************************************************************}
+
+
+const
+ FPU_All = $7f;
+
+function GetFPUState(const SigContext : TSigContext) : longint;
+begin
+ if assigned(SigContext.fpstate) then
+ GetfpuState:=SigContext.fpstate^.sw;
+{$ifdef SYSTEM_DEBUG}
+ writeln('xx:',sigcontext.en_tw,' ',sigcontext.en_cw);
+{$endif SYSTEM_DEBUG}
+{$ifdef SYSTEM_DEBUG}
+ Writeln(stderr,'FpuState = ',GetFpuState);
+{$endif SYSTEM_DEBUG}
+end;
+
+
+procedure SignalToRunerror(sig : longint; SigInfo: PSigInfo; SigContext: PSigContext);cdecl;
+var
+ res,fpustate : word;
+begin
+ res:=0;
+ case sig of
+ SIGFPE :
+ begin
+ { this is not allways necessary but I don't know yet
+ how to tell if it is or not PM }
+ res:=200;
+ fpustate:=GetFPUState(SigContext^);
+ if (FpuState and FPU_All) <> 0 then
+ begin
+ { first check the more precise options }
+ if (FpuState and FPU_DivisionByZero)<>0 then
+ res:=200
+ else if (FpuState and (FPU_StackOverflow or FPU_StackUnderflow or FPU_Invalid))<>0 Then
+ res:=207
+ else if (FpuState and FPU_Overflow)<>0 then
+ res:=205
+ else if (FpuState and FPU_Underflow)<>0 then
+ res:=206
+ else if (FpuState and FPU_Denormal)<>0 then
+ res:=216
+ else
+ res:=207; {'Coprocessor Error'}
+ end;
+ sysResetFPU;
+ end;
+ SIGILL,
+ SIGBUS,
+ SIGSEGV :
+ res:=216;
+ end;
+ reenable_signal(sig);
+{ give runtime error at the position where the signal was raised }
+ if res<>0 then
+ HandleErrorAddrFrame(res,pointer(SigContext^.eip),pointer(SigContext^.ebp));
+end;
+
+{
+ $Log: sighnd.inc,v $
+ Revision 1.8 2005/04/24 21:19:22 peter
+ * unblock signal in signalhandler, remove the sigprocmask call
+ from setjmp
+
+ Revision 1.7 2005/02/17 18:05:57 peter
+ * change order of if to prevent always stack overflow instead
+ of generic fpu error when multiple states are set
+
+ Revision 1.6 2005/02/14 17:13:30 peter
+ * truncate log
+
+ Revision 1.5 2005/01/30 18:01:15 peter
+ * signal cleanup for linux
+ * sigactionhandler instead of tsigaction for bsds
+ * sigcontext moved to cpu dir
+
+}
diff --git a/rtl/linux/i386/sighndh.inc b/rtl/linux/i386/sighndh.inc
new file mode 100644
index 0000000000..ffd7137c23
--- /dev/null
+++ b/rtl/linux/i386/sighndh.inc
@@ -0,0 +1,70 @@
+{
+ $Id: sighndh.inc,v 1.2 2005/02/14 17:13:30 peter Exp $
+ This file is part of the Free Pascal run time library.
+ Copyright (c) 1999-2000 by Jonas Maebe,
+ member of the Free Pascal development team.
+
+ Sigcontext and Sigaction
+
+ See the file COPYING.FPC, included in this distribution,
+ for details about the copyright.
+
+ This program 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.
+
+ **********************************************************************}
+
+{$packrecords C}
+
+type
+ tfpreg = record
+ significand: array[0..3] of word;
+ exponent: word;
+ end;
+
+ pfpstate = ^tfpstate;
+ tfpstate = record
+ cw, sw, tag, ipoff, cssel, dataoff, datasel: cardinal;
+ st: array[0..7] of tfpreg;
+ status: cardinal;
+ end;
+
+ PSigContext = ^TSigContext;
+ TSigContext = record
+ gs, __gsh: word;
+ fs, __fsh: word;
+ es, __esh: word;
+ ds, __dsh: word;
+ edi: cardinal;
+ esi: cardinal;
+ ebp: cardinal;
+ esp: cardinal;
+ ebx: cardinal;
+ edx: cardinal;
+ ecx: cardinal;
+ eax: cardinal;
+ trapno: cardinal;
+ err: cardinal;
+ eip: cardinal;
+ cs, __csh: word;
+ eflags: cardinal;
+ esp_at_signal: cardinal;
+ ss, __ssh: word;
+ fpstate: pfpstate;
+ oldmask: cardinal;
+ cr2: cardinal;
+ end;
+
+{
+ $Log: sighndh.inc,v $
+ Revision 1.2 2005/02/14 17:13:30 peter
+ * truncate log
+
+ Revision 1.1 2005/01/30 18:01:15 peter
+ * signal cleanup for linux
+ * sigactionhandler instead of tsigaction for bsds
+ * sigcontext moved to cpu dir
+
+}
+
diff --git a/rtl/linux/i386/stat.inc b/rtl/linux/i386/stat.inc
new file mode 100644
index 0000000000..f9dcb08f10
--- /dev/null
+++ b/rtl/linux/i386/stat.inc
@@ -0,0 +1,123 @@
+{
+ $Id: stat.inc,v 1.3 2005/02/14 17:13:30 peter Exp $
+ This file is part of the Free Pascal run time library.
+ Copyright (c) 1999-2000 by Jonas Maebe,
+ member of the Free Pascal development team.
+
+ See the file COPYING.FPC, included in this distribution,
+ for details about the copyright.
+
+ This program 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.
+
+ **********************************************************************}
+
+{$ifndef FPC_USE_LIBC} // kernel record
+
+ Stat = Packed Record // No unix typing because of differences
+ // kernel <->libc
+ case byte of
+ 0: (st_dev : word;
+ pad1 : word;
+ st_ino : longint;
+ st_mode,
+ st_nlink,
+ st_uid,
+ st_gid : word;
+ st_rdev : word;
+ pad2 : word;
+ st_size,
+ st_blksze,
+ st_blocks,
+ st_atime,
+ unused1,
+ st_mtime,
+ unused2,
+ st_ctime,
+ unused3,
+ unused4,
+ unused5 : longint;);
+ 1: (
+ dev : word;
+ pad1_dummy : word;
+ ino : longint;
+ mode,
+ nlink,
+ uid,
+ gid : word;
+ rdev : word;
+ pad2_dummy : word;
+ size,
+ blksze,
+ blocks,
+ atime,
+ unused1_dummy,
+ mtime,
+ unused2_dummy,
+ ctime,
+ unused3_dummy,
+ unused4_dummy,
+ unused5_dummy : longint;
+ );
+ end;
+{$else}
+
+{$packrecords C}
+ Stat = Record // No unix typing because of differences
+ // kernel <->libc
+ case byte of
+ 0: (st_dev : int64;
+ pad1 : word;
+ st_ino : longint;
+ st_mode,
+ st_nlink,
+ st_uid,
+ st_gid : longint;
+ st_rdev : int64;
+ pad2 : word;
+ st_size,
+ st_blksze,
+ st_blocks,
+ st_atime,
+ unused1,
+ st_mtime,
+ unused2,
+ st_ctime,
+ unused3,
+ unused4,
+ unused5 : longint;);
+ 1: (
+ dev : int64;
+ pad1_dummy : word;
+ ino : longint;
+ mode,
+ nlink,
+ uid,
+ gid : longint;
+ rdev : int64;
+ pad2_dummy : word;
+ size,
+ blksze,
+ blocks,
+ atime,
+ unused1_dummy,
+ mtime,
+ unused2_dummy,
+ ctime,
+ unused3_dummy,
+ unused4_dummy,
+ unused5_dummy : longint;
+
+ );
+ end;
+
+
+{$endif}
+
+{
+ $Log: stat.inc,v $
+ Revision 1.3 2005/02/14 17:13:30 peter
+ * truncate log
+
+}
diff --git a/rtl/linux/i386/syscall.inc b/rtl/linux/i386/syscall.inc
new file mode 100644
index 0000000000..b4fb348deb
--- /dev/null
+++ b/rtl/linux/i386/syscall.inc
@@ -0,0 +1,368 @@
+{
+ $Id: syscall.inc,v 1.18 2005/03/07 08:27:57 florian Exp $
+ This file is part of the Free Pascal run time library.
+ Copyright (c) 1999-2000 by Michael Van Canneyt,
+ member of the Free Pascal development team.
+
+ The syscalls for the new RTL, moved to platform dependant dir.
+ Old linux calling convention is stil kept.
+
+ See the file COPYING.FPC, included in this distribution,
+ for details about the copyright.
+
+ This program 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.
+
+ **********************************************************************}
+
+
+{$ASMMODE ATT}
+
+function FpSysCall(sysnr:TSysParam):TSysResult; assembler; {$ifndef VER1_0} oldfpccall; {$endif}[public,alias:'FPC_SYSCALL0'];
+
+asm
+{ load the registers... }
+ movl sysnr,%eax
+ int $0x80
+ cmpl $-4095,%eax
+ jb .LSyscOK
+ negl %eax
+{$ifdef VER1_0}
+ movl %eax,Errno
+{$else}
+{$ifdef REGCALL}
+ movl fpc_threadvar_relocate_proc,%ecx
+ testl %ecx,%ecx
+ jne .LThread
+ movl %eax,Errno+4
+ jmp .LNoThread
+.LThread:
+ movl %eax,%ebx
+ movl Errno,%eax
+ call *%ecx
+ movl %ebx,(%eax)
+.LNoThread:
+{$else}
+ movl %eax,%edx
+ movl fpc_threadvar_relocate_proc,%eax
+ testl %eax,%eax
+ jne .LThread
+ movl %edx,Errno+4
+ jmp .LNoThread
+.LThread:
+ pushl %edx
+ pushl Errno
+ call *%eax
+ popl %edx
+ movl %edx,(%eax)
+.LNoThread:
+{$endif REGCALL}
+{$endif ver1_0}
+ movl $-1,%eax
+.LSyscOK:
+end;
+
+function FpSysCall(sysnr,param1 : TSysParam):TSysResult; assembler; {$ifndef VER1_0} oldfpccall; {$endif}[public,alias:'FPC_SYSCALL1'];
+
+asm
+{ load the registers... }
+ movl sysnr,%eax
+ movl param1,%ebx
+ int $0x80
+ cmpl $-4095,%eax
+ jb .LSyscOK
+ negl %eax
+{$ifdef VER1_0}
+ movl %eax,Errno
+{$else}
+{$ifdef REGCALL}
+ movl fpc_threadvar_relocate_proc,%ecx
+ testl %ecx,%ecx
+ jne .LThread
+ movl %eax,Errno+4
+ jmp .LNoThread
+.LThread:
+ movl %eax,%ebx
+ movl Errno,%eax
+ call *%ecx
+ movl %ebx,(%eax)
+.LNoThread:
+{$else}
+ movl %eax,%edx
+ movl fpc_threadvar_relocate_proc,%eax
+ testl %eax,%eax
+ jne .LThread
+ movl %edx,Errno+4
+ jmp .LNoThread
+.LThread:
+ pushl %edx
+ pushl Errno
+ call *%eax
+ popl %edx
+ movl %edx,(%eax)
+.LNoThread:
+{$endif REGCALL}
+{$endif ver1_0}
+ movl $-1,%eax
+.LSyscOK:
+end;
+
+function FpSysCall(sysnr,param1,param2 : TSysParam):TSysResult; assembler; {$ifndef VER1_0} oldfpccall; {$endif} [public,alias:'FPC_SYSCALL2'];
+
+asm
+{ load the registers... }
+ movl sysnr,%eax
+ movl param1,%ebx
+ movl param2,%ecx
+ int $0x80
+ cmpl $-4095,%eax
+ jb .LSyscOK
+ negl %eax
+{$ifdef VER1_0}
+ movl %eax,Errno
+{$else}
+{$ifdef REGCALL}
+ movl fpc_threadvar_relocate_proc,%ecx
+ testl %ecx,%ecx
+ jne .LThread
+ movl %eax,Errno+4
+ jmp .LNoThread
+.LThread:
+ movl %eax,%ebx
+ movl Errno,%eax
+ call *%ecx
+ movl %ebx,(%eax)
+.LNoThread:
+{$else}
+ movl %eax,%edx
+ movl fpc_threadvar_relocate_proc,%eax
+ testl %eax,%eax
+ jne .LThread
+ movl %edx,Errno+4
+ jmp .LNoThread
+.LThread:
+ pushl %edx
+ pushl Errno
+ call *%eax
+ popl %edx
+ movl %edx,(%eax)
+.LNoThread:
+{$endif REGCALL}
+{$endif ver1_0}
+ movl $-1,%eax
+.LSyscOK:
+end;
+
+function FpSysCall(sysnr,param1,param2,param3:TSysParam):TSysResult; assembler; {$ifndef VER1_0} oldfpccall; {$endif} [public,alias:'FPC_SYSCALL3'];
+
+asm
+{ load the registers... }
+ movl sysnr,%eax
+ movl param1,%ebx
+ movl param2,%ecx
+ movl param3,%edx
+ int $0x80
+ cmpl $-4095,%eax
+ jb .LSyscOK
+ negl %eax
+{$ifdef VER1_0}
+ movl %eax,Errno
+{$else}
+{$ifdef REGCALL}
+ movl fpc_threadvar_relocate_proc,%ecx
+ testl %ecx,%ecx
+ jne .LThread
+ movl %eax,Errno+4
+ jmp .LNoThread
+.LThread:
+ movl %eax,%ebx
+ movl Errno,%eax
+ call *%ecx
+ movl %ebx,(%eax)
+.LNoThread:
+{$else}
+ movl %eax,%edx
+ movl fpc_threadvar_relocate_proc,%eax
+ testl %eax,%eax
+ jne .LThread
+ movl %edx,Errno+4
+ jmp .LNoThread
+.LThread:
+ pushl %edx
+ pushl Errno
+ call *%eax
+ popl %edx
+ movl %edx,(%eax)
+.LNoThread:
+{$endif REGCALL}
+{$endif ver1_0}
+ movl $-1,%eax
+.LSyscOK:
+end;
+
+function FpSysCall(sysnr,param1,param2,param3,param4:TSysParam):TSysResult; assembler; {$ifndef VER1_0} oldfpccall; {$endif} [public,alias:'FPC_SYSCALL4'];
+
+asm
+{ load the registers... }
+ movl sysnr,%eax
+ movl param1,%ebx
+ movl param2,%ecx
+ movl param3,%edx
+ movl param4,%esi
+ int $0x80
+ cmpl $-4095,%eax
+ jb .LSyscOK
+ negl %eax
+{$ifdef VER1_0}
+ movl %eax,Errno
+{$else}
+{$ifdef REGCALL}
+ movl fpc_threadvar_relocate_proc,%ecx
+ testl %ecx,%ecx
+ jne .LThread
+ movl %eax,Errno+4
+ jmp .LNoThread
+.LThread:
+ movl %eax,%ebx
+ movl Errno,%eax
+ call *%ecx
+ movl %ebx,(%eax)
+.LNoThread:
+{$else}
+ movl %eax,%edx
+ movl fpc_threadvar_relocate_proc,%eax
+ testl %eax,%eax
+ jne .LThread
+ movl %edx,Errno+4
+ jmp .LNoThread
+.LThread:
+ pushl %edx
+ pushl Errno
+ call *%eax
+ popl %edx
+ movl %edx,(%eax)
+.LNoThread:
+{$endif REGCALL}
+{$endif ver1_0}
+ movl $-1,%eax
+.LSyscOK:
+end;
+
+function FpSysCall(sysnr,param1,param2,param3,param4,param5 : TSysParam):TSysResult; assembler; {$ifndef VER1_0} oldfpccall; {$endif}[public,alias:'FPC_SYSCALL5'];
+
+asm
+{ load the registers... }
+ movl sysnr,%eax
+ movl param1,%ebx
+ movl param2,%ecx
+ movl param3,%edx
+ movl param4,%esi
+ movl param5,%edi
+ int $0x80
+ cmpl $-4095,%eax
+ jb .LSyscOK
+ negl %eax
+{$ifdef VER1_0}
+ movl %eax,Errno
+{$else}
+{$ifdef REGCALL}
+ movl fpc_threadvar_relocate_proc,%ecx
+ testl %ecx,%ecx
+ jne .LThread
+ movl %eax,Errno+4
+ jmp .LNoThread
+.LThread:
+ movl %eax,%ebx
+ movl Errno,%eax
+ call *%ecx
+ movl %ebx,(%eax)
+.LNoThread:
+{$else}
+ movl %eax,%edx
+ movl fpc_threadvar_relocate_proc,%eax
+ testl %eax,%eax
+ jne .LThread
+ movl %edx,Errno+4
+ jmp .LNoThread
+.LThread:
+ pushl %edx
+ pushl Errno
+ call *%eax
+ popl %edx
+ movl %edx,(%eax)
+.LNoThread:
+{$endif REGCALL}
+{$endif ver1_0}
+ movl $-1,%eax
+.LSyscOK:
+end;
+
+{$ifdef notsupported}
+{ Only 5 params are pushed, so it'll not work as expected (PFV) }
+function FpSysCall(sysnr,param1,param2,param3,param4,param5,param6 : TSysParam):TSysResult; assembler; {$ifndef VER1_0} oldfpccall; {$endif}[public,alias:'FPC_SYSCALL6'];
+
+asm
+{ load the registers... }
+ movl sysnr,%eax
+ movl param1,%ebx
+ movl param2,%ecx
+ movl param3,%edx
+ movl param4,%esi
+ movl param5,%edi
+ int $0x80
+ cmpl $-4095,%eax
+ jb .LSyscOK
+ negl %eax
+{$ifdef VER1_0}
+ movl %eax,Errno
+{$else}
+{$ifdef REGCALL}
+ movl fpc_threadvar_relocate_proc,%ecx
+ testl %ecx,%ecx
+ jne .LThread
+ movl %eax,Errno+4
+ jmp .LNoThread
+.LThread:
+ movl %eax,%ebx
+ movl Errno,%eax
+ call *%ecx
+ movl %ebx,(%eax)
+.LNoThread:
+{$else}
+ movl %eax,%edx
+ movl fpc_threadvar_relocate_proc,%eax
+ testl %eax,%eax
+ jne .LThread
+ movl %edx,Errno+4
+ jmp .LNoThread
+.LThread:
+ pushl %edx
+ pushl Errno
+ call *%eax
+ popl %edx
+ movl %edx,(%eax)
+.LNoThread:
+{$endif REGCALL}
+{$endif ver1_0}
+ movl $-1,%eax
+.LSyscOK:
+end;
+{$endif notsupported}
+
+{No debugging for syslinux include !}
+{$IFDEF SYS_LINUX}
+ {$UNDEF SYSCALL_DEBUG}
+{$ENDIF SYS_LINUX}
+
+
+{
+ $Log: syscall.inc,v $
+ Revision 1.18 2005/03/07 08:27:57 florian
+ * applied syscall patch from C Western
+
+ Revision 1.17 2005/02/14 17:13:30 peter
+ * truncate log
+
+}
+
diff --git a/rtl/linux/i386/syscallh.inc b/rtl/linux/i386/syscallh.inc
new file mode 100644
index 0000000000..4fe2e8e636
--- /dev/null
+++ b/rtl/linux/i386/syscallh.inc
@@ -0,0 +1,52 @@
+{
+ $Id: syscallh.inc,v 1.7 2005/02/14 17:13:30 peter Exp $
+ Copyright (c) 2002 by Marco van de Voort
+
+ Header for syscall in system unit for i386 *BSD.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+
+}
+
+Type
+
+ TSysResult = longint; // all platforms, cint=32-bit.
+ // On platforms with off_t =64-bit, people should
+ // use int64, and typecast all calls that don't
+ // return off_t to cint.
+
+// I don't think this is going to work on several platforms
+// 64-bit machines don't have only 64-bit params.
+
+ TSysParam = Longint;
+
+function Do_SysCall(sysnr:TSysParam):TSysResult; {$ifndef VER1_0} oldfpccall; {$endif} external name 'FPC_SYSCALL0';
+function Do_SysCall(sysnr,param1:TSysParam):TSysResult; {$ifndef VER1_0} oldfpccall; {$endif} external name 'FPC_SYSCALL1';
+function Do_SysCall(sysnr,param1,param2:TSysParam):TSysResult; {$ifndef VER1_0} oldfpccall; {$endif} external name 'FPC_SYSCALL2';
+function Do_SysCall(sysnr,param1,param2,param3:TSysParam):TSysResult; {$ifndef VER1_0} oldfpccall; {$endif} external name 'FPC_SYSCALL3';
+function Do_SysCall(sysnr,param1,param2,param3,param4:TSysParam):TSysResult; {$ifndef VER1_0} oldfpccall; {$endif} external name 'FPC_SYSCALL4';
+function Do_SysCall(sysnr,param1,param2,param3,param4,param5:TSysParam):TSysResult; {$ifndef VER1_0} oldfpccall; {$endif} external name 'FPC_SYSCALL5';
+{$ifdef notsupported}
+function Do_SysCall(sysnr,param1,param2,param3,param4,param5,param6:TSysParam):TSysResult; {$ifndef VER1_0} oldfpccall; {$endif} external name 'FPC_SYSCALL6';
+{$endif notsupported}
+
+{
+ $Log: syscallh.inc,v $
+ Revision 1.7 2005/02/14 17:13:30 peter
+ * truncate log
+
+}
diff --git a/rtl/linux/i386/sysnr.inc b/rtl/linux/i386/sysnr.inc
new file mode 100644
index 0000000000..81d9e68bdf
--- /dev/null
+++ b/rtl/linux/i386/sysnr.inc
@@ -0,0 +1,267 @@
+{
+ $Id: sysnr.inc,v 1.2 2005/02/14 17:13:30 peter Exp $
+ This file is part of the Free Pascal run time library.
+ Copyright (c) 1999-2000 by Michael Van Canneyt,
+ member of the Free Pascal development team.
+
+ Syscall nrs for 2.4.18
+
+ See the file COPYING.FPC, included in this distribution,
+ for details about the copyright.
+
+ This program 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.
+
+ **********************************************************************}
+
+
+{
+* This file contains the system call numbers.
+}
+
+Const
+ syscall_nr_exit = 1;
+ syscall_nr_fork = 2;
+ syscall_nr_read = 3;
+ syscall_nr_write = 4;
+ syscall_nr_open = 5;
+ syscall_nr_close = 6;
+ syscall_nr_waitpid = 7;
+ syscall_nr_creat = 8;
+ syscall_nr_link = 9;
+ syscall_nr_unlink = 10;
+ syscall_nr_execve = 11;
+ syscall_nr_chdir = 12;
+ syscall_nr_time = 13;
+ syscall_nr_mknod = 14;
+ syscall_nr_chmod = 15;
+ syscall_nr_lchown = 16;
+ syscall_nr_break = 17;
+ syscall_nr_oldstat = 18;
+ syscall_nr_lseek = 19;
+ syscall_nr_getpid = 20;
+ syscall_nr_mount = 21;
+ syscall_nr_umount = 22;
+ syscall_nr_setuid = 23;
+ syscall_nr_getuid = 24;
+ syscall_nr_stime = 25;
+ syscall_nr_ptrace = 26;
+ syscall_nr_alarm = 27;
+ syscall_nr_oldfstat = 28;
+ syscall_nr_pause = 29;
+ syscall_nr_utime = 30;
+ syscall_nr_stty = 31;
+ syscall_nr_gtty = 32;
+ syscall_nr_access = 33;
+ syscall_nr_nice = 34;
+ syscall_nr_ftime = 35;
+ syscall_nr_sync = 36;
+ syscall_nr_kill = 37;
+ syscall_nr_rename = 38;
+ syscall_nr_mkdir = 39;
+ syscall_nr_rmdir = 40;
+ syscall_nr_dup = 41;
+ syscall_nr_pipe = 42;
+ syscall_nr_times = 43;
+ syscall_nr_prof = 44;
+ syscall_nr_brk = 45;
+ syscall_nr_setgid = 46;
+ syscall_nr_getgid = 47;
+ syscall_nr_signal = 48;
+ syscall_nr_geteuid = 49;
+ syscall_nr_getegid = 50;
+ syscall_nr_acct = 51;
+ syscall_nr_umount2 = 52;
+ syscall_nr_lock = 53;
+ syscall_nr_ioctl = 54;
+ syscall_nr_fcntl = 55;
+ syscall_nr_mpx = 56;
+ syscall_nr_setpgid = 57;
+ syscall_nr_ulimit = 58;
+ syscall_nr_oldolduname = 59;
+ syscall_nr_umask = 60;
+ syscall_nr_chroot = 61;
+ syscall_nr_ustat = 62;
+ syscall_nr_dup2 = 63;
+ syscall_nr_getppid = 64;
+ syscall_nr_getpgrp = 65;
+ syscall_nr_setsid = 66;
+ syscall_nr_sigaction = 67;
+ syscall_nr_sgetmask = 68;
+ syscall_nr_ssetmask = 69;
+ syscall_nr_setreuid = 70;
+ syscall_nr_setregid = 71;
+ syscall_nr_sigsuspend = 72;
+ syscall_nr_sigpending = 73;
+ syscall_nr_sethostname = 74;
+ syscall_nr_setrlimit = 75;
+ syscall_nr_getrlimit = 76; { Back compatible 2Gig limited rlimit }
+ syscall_nr_getrusage = 77;
+ syscall_nr_gettimeofday = 78;
+ syscall_nr_settimeofday = 79;
+ syscall_nr_getgroups = 80;
+ syscall_nr_setgroups = 81;
+ syscall_nr_select = 82;
+ syscall_nr_symlink = 83;
+ syscall_nr_oldlstat = 84;
+ syscall_nr_readlink = 85;
+ syscall_nr_uselib = 86;
+ syscall_nr_swapon = 87;
+ syscall_nr_reboot = 88;
+ syscall_nr_readdir = 89;
+ syscall_nr_mmap = 90;
+ syscall_nr_munmap = 91;
+ syscall_nr_truncate = 92;
+ syscall_nr_ftruncate = 93;
+ syscall_nr_fchmod = 94;
+ syscall_nr_fchown = 95;
+ syscall_nr_getpriority = 96;
+ syscall_nr_setpriority = 97;
+ syscall_nr_profil = 98;
+ syscall_nr_statfs = 99;
+ syscall_nr_fstatfs = 100;
+ syscall_nr_ioperm = 101;
+ syscall_nr_socketcall = 102;
+ syscall_nr_syslog = 103;
+ syscall_nr_setitimer = 104;
+ syscall_nr_getitimer = 105;
+ syscall_nr_stat = 106;
+ syscall_nr_lstat = 107;
+ syscall_nr_fstat = 108;
+ syscall_nr_olduname = 109;
+ syscall_nr_iopl = 110;
+ syscall_nr_vhangup = 111;
+ syscall_nr_idle = 112;
+ syscall_nr_vm86old = 113;
+ syscall_nr_wait4 = 114;
+ syscall_nr_swapoff = 115;
+ syscall_nr_sysinfo = 116;
+ syscall_nr_ipc = 117;
+ syscall_nr_fsync = 118;
+ syscall_nr_sigreturn = 119;
+ syscall_nr_clone = 120;
+ syscall_nr_setdomainname = 121;
+ syscall_nr_uname = 122;
+ syscall_nr_modify_ldt = 123;
+ syscall_nr_adjtimex = 124;
+ syscall_nr_mprotect = 125;
+ syscall_nr_sigprocmask = 126;
+ syscall_nr_create_module = 127;
+ syscall_nr_init_module = 128;
+ syscall_nr_delete_module = 129;
+ syscall_nr_get_kernel_syms = 130;
+ syscall_nr_quotactl = 131;
+ syscall_nr_getpgid = 132;
+ syscall_nr_fchdir = 133;
+ syscall_nr_bdflush = 134;
+ syscall_nr_sysfs = 135;
+ syscall_nr_personality = 136;
+ syscall_nr_afs_syscall = 137; { Syscall for Andrew File System }
+ syscall_nr_setfsuid = 138;
+ syscall_nr_setfsgid = 139;
+ syscall_nr__llseek = 140;
+ syscall_nr_getdents = 141;
+ syscall_nr__newselect = 142;
+ syscall_nr_flock = 143;
+ syscall_nr_msync = 144;
+ syscall_nr_readv = 145;
+ syscall_nr_writev = 146;
+ syscall_nr_getsid = 147;
+ syscall_nr_fdatasync = 148;
+ syscall_nr__sysctl = 149;
+ syscall_nr_mlock = 150;
+ syscall_nr_munlock = 151;
+ syscall_nr_mlockall = 152;
+ syscall_nr_munlockall = 153;
+ syscall_nr_sched_setparam = 154;
+ syscall_nr_sched_getparam = 155;
+ syscall_nr_sched_setscheduler = 156;
+ syscall_nr_sched_getscheduler = 157;
+ syscall_nr_sched_yield = 158;
+ syscall_nr_sched_get_priority_max = 159;
+ syscall_nr_sched_get_priority_min = 160;
+ syscall_nr_sched_rr_get_interval = 161;
+ syscall_nr_nanosleep = 162;
+ syscall_nr_mremap = 163;
+ syscall_nr_setresuid = 164;
+ syscall_nr_getresuid = 165;
+ syscall_nr_vm86 = 166;
+ syscall_nr_query_module = 167;
+ syscall_nr_poll = 168;
+ syscall_nr_nfsservctl = 169;
+ syscall_nr_setresgid = 170;
+ syscall_nr_getresgid = 171;
+ syscall_nr_prctl = 172;
+ syscall_nr_rt_sigreturn = 173;
+ syscall_nr_rt_sigaction = 174;
+ syscall_nr_rt_sigprocmask = 175;
+ syscall_nr_rt_sigpending = 176;
+ syscall_nr_rt_sigtimedwait = 177;
+ syscall_nr_rt_sigqueueinfo = 178;
+ syscall_nr_rt_sigsuspend = 179;
+ syscall_nr_pread = 180;
+ syscall_nr_pwrite = 181;
+ syscall_nr_chown = 182;
+ syscall_nr_getcwd = 183;
+ syscall_nr_capget = 184;
+ syscall_nr_capset = 185;
+ syscall_nr_sigaltstack = 186;
+ syscall_nr_sendfile = 187;
+ syscall_nr_getpmsg = 188; { some people actually want streams }
+ syscall_nr_putpmsg = 189; { some people actually want streams }
+ syscall_nr_vfork = 190;
+ syscall_nr_ugetrlimit = 191; { SuS compliant getrlimit }
+ syscall_nr_mmap2 = 192;
+ syscall_nr_truncate64 = 193;
+ syscall_nr_ftruncate64 = 194;
+ syscall_nr_stat64 = 195;
+ syscall_nr_lstat64 = 196;
+ syscall_nr_fstat64 = 197;
+ syscall_nr_lchown32 = 198;
+ syscall_nr_getuid32 = 199;
+ syscall_nr_getgid32 = 200;
+ syscall_nr_geteuid32 = 201;
+ syscall_nr_getegid32 = 202;
+ syscall_nr_setreuid32 = 203;
+ syscall_nr_setregid32 = 204;
+ syscall_nr_getgroups32 = 205;
+ syscall_nr_setgroups32 = 206;
+ syscall_nr_fchown32 = 207;
+ syscall_nr_setresuid32 = 208;
+ syscall_nr_getresuid32 = 209;
+ syscall_nr_setresgid32 = 210;
+ syscall_nr_getresgid32 = 211;
+ syscall_nr_chown32 = 212;
+ syscall_nr_setuid32 = 213;
+ syscall_nr_setgid32 = 214;
+ syscall_nr_setfsuid32 = 215;
+ syscall_nr_setfsgid32 = 216;
+ syscall_nr_pivot_root = 217;
+ syscall_nr_mincore = 218;
+ syscall_nr_madvise = 219;
+ syscall_nr_madvise1 = 219; { delete when C lib stub is removed }
+ syscall_nr_getdents64 = 220;
+ syscall_nr_fcntl64 = 221;
+ syscall_nr_security = 223; { syscall for security modules }
+ syscall_nr_gettid = 224;
+ syscall_nr_readahead = 225;
+ syscall_nr_setxattr = 226;
+ syscall_nr_lsetxattr = 227;
+ syscall_nr_fsetxattr = 228;
+ syscall_nr_getxattr = 229;
+ syscall_nr_lgetxattr = 230;
+ syscall_nr_fgetxattr = 231;
+ syscall_nr_listxattr = 232;
+ syscall_nr_llistxattr = 233;
+ syscall_nr_flistxattr = 234;
+ syscall_nr_removexattr = 235;
+ syscall_nr_lremovexattr = 236;
+ syscall_nr_fremovexattr = 237;
+
+{
+ $Log: sysnr.inc,v $
+ Revision 1.2 2005/02/14 17:13:30 peter
+ * truncate log
+
+}