1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00
2000-06-13  Ulrich Drepper  <drepper@redhat.com>

	* misc/sys/cdefs.h: Define __bounded and __unbounded if
	__BOUNDED_POINTERS__ is not defined.

2000-06-07  Greg McGary  <greg@mcgary.org>

	* sysdeps/generic/bp-sym.h: New file.
	* sysdeps/generic/bp-start.h: New file.
	* sysdeps/i386/elf/start.S: Designate BP symbols.
	* sysdeps/generic/libc-start.c: Wrap bounds around
	argv & envp and each of their string members.

2000-06-07  Greg McGary  <greg@mcgary.org>

	* sysdeps/unix/make-syscalls.sh: Add comments to
	output that aid debugging & comprehension.
	Map simple syscall signatures to number of args.
	Generate BP syscall thunk definitions.
	* sysdeps/generic/bp-thunks.h: New file.
	* sysdeps/unix/syscalls.list: Replace arg-count with
	simple return+arg signature.
	* sysdeps/unix/common/syscalls.list: Likewise.
	* sysdeps/unix/inet/syscalls.list: Likewise.
	* sysdeps/unix/mman/syscalls.list: Likewise.
	* sysdeps/unix/sysv/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/i386/syscalls.list: Likewise.

2000-06-07  Greg McGary  <greg@mcgary.org>

	* Makeconfig (CPPFLAGS-.ob): pass -fbounded-pointers for all files
	*.[cS].
	(CFLAGS-.ob): Don't optimize sibling calls.
	(bppfx): New variable.
	* Makerules (elide-bp-thunks): New variable.
	(elide-routines.*): Elide BP-* files for all but *.ob.
	(sources): Include bp-thunks.

	* iconv/gconv_simple.c: Remove unnecessary prototype.

	* iconv/gconv_trans.c: Pretty print.
This commit is contained in:
Ulrich Drepper
2000-06-13 07:33:12 +00:00
parent a5c88158b6
commit ab95290c78
19 changed files with 674 additions and 245 deletions

View File

@ -1,5 +1,48 @@
2000-06-13 Ulrich Drepper <drepper@redhat.com>
* misc/sys/cdefs.h: Define __bounded and __unbounded if
__BOUNDED_POINTERS__ is not defined.
2000-06-07 Greg McGary <greg@mcgary.org>
* sysdeps/generic/bp-sym.h: New file.
* sysdeps/generic/bp-start.h: New file.
* sysdeps/i386/elf/start.S: Designate BP symbols.
* sysdeps/generic/libc-start.c: Wrap bounds around
argv & envp and each of their string members.
2000-06-07 Greg McGary <greg@mcgary.org>
* sysdeps/unix/make-syscalls.sh: Add comments to
output that aid debugging & comprehension.
Map simple syscall signatures to number of args.
Generate BP syscall thunk definitions.
* sysdeps/generic/bp-thunks.h: New file.
* sysdeps/unix/syscalls.list: Replace arg-count with
simple return+arg signature.
* sysdeps/unix/common/syscalls.list: Likewise.
* sysdeps/unix/inet/syscalls.list: Likewise.
* sysdeps/unix/mman/syscalls.list: Likewise.
* sysdeps/unix/sysv/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/i386/syscalls.list: Likewise.
2000-06-07 Greg McGary <greg@mcgary.org>
* Makeconfig (CPPFLAGS-.ob): pass -fbounded-pointers for all files
*.[cS].
(CFLAGS-.ob): Don't optimize sibling calls.
(bppfx): New variable.
* Makerules (elide-bp-thunks): New variable.
(elide-routines.*): Elide BP-* files for all but *.ob.
(sources): Include bp-thunks.
2000-06-12 Ulrich Drepper <drepper@redhat.com> 2000-06-12 Ulrich Drepper <drepper@redhat.com>
* iconv/gconv_simple.c: Remove unnecessary prototype.
* iconv/gconv_trans.c: Pretty print.
* elf/elf.h (R_SH_NUM): Got accidently dropped. * elf/elf.h (R_SH_NUM): Got accidently dropped.
* sysdeps/unix/sysv/linux/configure.in: Improve handling of * sysdeps/unix/sysv/linux/configure.in: Improve handling of

View File

@ -619,7 +619,7 @@ CFLAGS-.op = -pg
libtype.op = lib%_p.a libtype.op = lib%_p.a
endif endif
ifeq (yes,$(build-omitfp)) ifeq (yes,$(build-omitfp))
# Under --enable-omitfp, we build an the library optimized without # Under --enable-omitfp, we build the library optimized without
# debugging information using -fomit-frame-pointer, and build an extra # debugging information using -fomit-frame-pointer, and build an extra
# library with debugging information. The debuggable objects are named foo.og. # library with debugging information. The debuggable objects are named foo.og.
object-suffixes += .og object-suffixes += .og
@ -629,12 +629,14 @@ CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) -g0 -O99 -fomit-frame-pointer -D
CFLAGS-.os += -g0 -O99 -fomit-frame-pointer -D__USE_STRING_INLINES CFLAGS-.os += -g0 -O99 -fomit-frame-pointer -D__USE_STRING_INLINES
libtype.og = lib%_g.a libtype.og = lib%_g.a
endif endif
bppfx = BP-
ifeq (yes,$(build-bounded)) ifeq (yes,$(build-bounded))
# Under --enable-bounded, we build the library with `-fbounded-pointers -g' # Under --enable-bounded, we build the library with `-fbounded-pointers -g'
# to runtime bounds checking. The bounded-pointer objects are named foo.ob. # to runtime bounds checking. The bounded-pointer objects are named foo.ob.
object-suffixes += .ob object-suffixes += .ob
CPPFLAGS-.ob = -DBOUNDED_POINTERS $(pic-default) CPPFLAGS-.ob = -fbounded-pointers $(pic-default)
CFLAGS-.ob = -g -fbounded-pointers CFLAGS-.ob = -g -O2 -fno-optimize-sibling-calls
libtype.ob = lib%_b.a libtype.ob = lib%_b.a
endif endif

View File

@ -418,15 +418,19 @@ ifndef libc.so-version
static-only-routines = static-only-routines =
endif endif
# Bounded pointer thunks are only built for *.ob
elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
elide-routines.oS += $(filter-out $(static-only-routines),\ elide-routines.oS += $(filter-out $(static-only-routines),\
$(routines) $(aux) $(sysdep_routines)) $(routines) $(aux) $(sysdep_routines)) \
elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
# If we have versioned code we don't need the old versions in any of the # If we have versioned code we don't need the old versions in any of the
# static libraries. # static libraries.
elide-routines.o += $(shared-only-routines) elide-routines.o += $(shared-only-routines) $(elide-bp-thunks)
elide-routines.op += $(shared-only-routines) elide-routines.op += $(shared-only-routines) $(elide-bp-thunks)
elide-routines.og += $(shared-only-routines) elide-routines.og += $(shared-only-routines) $(elide-bp-thunks)
elide-routines.ob += $(shared-only-routines) elide-routines.ob += $(shared-only-routines)
# Don't try to use -lc when making libc.so itself. # Don't try to use -lc when making libc.so itself.
@ -466,9 +470,13 @@ endif
# Figure out the source filenames in this directory. # Figure out the source filenames in this directory.
override sources := $(addsuffix .c,$(filter-out $(elided-routines),\ override sources := $(addsuffix .c,\
$(routines) $(aux) \ $(filter-out $(elided-routines),\
$(sysdep_routines))) $(routines) $(aux) \
$(sysdep_routines)) \
$(addprefix $(bppfx),\
$(filter $(routines) $(sysdep_routines),\
$(bp-thunks))))
sysdep_routines := $(sysdep_routines) sysdep_routines := $(sysdep_routines)
headers := $(headers) $(sysdep_headers) headers := $(headers) $(sysdep_headers)

View File

@ -789,13 +789,6 @@ ucs4le_internal_loop_single (struct __gconv_step *step,
#define FUNCTION_NAME __gconv_transform_internal_ascii #define FUNCTION_NAME __gconv_transform_internal_ascii
#define ONE_DIRECTION 1 #define ONE_DIRECTION 1
extern int FUNCTION_NAME (struct __gconv_step *step,
struct __gconv_step_data *data,
const unsigned char **inptrp,
const unsigned char *inend,
unsigned char *outbufstart, size_t *irreversible,
int do_flush, int consume_incomplete);
#define MIN_NEEDED_INPUT MIN_NEEDED_FROM #define MIN_NEEDED_INPUT MIN_NEEDED_FROM
#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO #define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
#define LOOPFCT FROM_LOOP #define LOOPFCT FROM_LOOP

View File

@ -27,9 +27,9 @@
int int
gconv_transliterate (struct __gconv_step *step, gconv_transliterate (struct __gconv_step *step,
struct __gconv_step_data *step_data, struct __gconv_step_data *step_data,
__const unsigned char *inbufstart, const unsigned char *inbufstart,
__const unsigned char **inbufp, const unsigned char **inbufp,
__const unsigned char *inbufend, const unsigned char *inbufend,
unsigned char *outbufstart, unsigned char *outbufstart,
unsigned char **outbufp, unsigned char *outbufend, unsigned char **outbufp, unsigned char *outbufend,
size_t *irreversible) size_t *irreversible)

View File

@ -83,6 +83,14 @@
# define __END_DECLS # define __END_DECLS
#endif #endif
/* Support for bounded pointers. */
#ifndef __BOUNDED_POINTERS__
# define __bounded /* nothing */
# define __unbounded /* nothing */
#endif
/* __asm__ ("xyz") is used throughout the headers to rename functions /* __asm__ ("xyz") is used throughout the headers to rename functions
at the assembly language level. This is wrapped by the __REDIRECT at the assembly language level. This is wrapped by the __REDIRECT
macro, in order to support compilers that can do this some other macro, in order to support compilers that can do this some other

View File

@ -0,0 +1,70 @@
/* Copyright (C) 2000 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 Library General Public License as
published by the Free Software Foundation; either version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if __BOUNDED_POINTERS__
/* The command-line arg vector and environment vector come to us from
the OS as an unbounded pointer to an array of unbounded strings.
The user's main expects argv and __environ to be bounded pointers
to arrays of bounded strings. */
# define INIT_ARGV_and_ENVIRON \
do { \
int envc; \
for (envc = 0; *ubp_ev; ubp_ev++, envc++) \
; \
ubp_ev -= envc; \
\
/* GKM FIXME: we could save some space by allocating only enough for \
the additional low & high words, and destructively rewriting \
argv in place. */ \
__ptrvalue (argv) = __ptrlow (argv) \
= alloca ((argc + envc + 2) * sizeof (*argv)); \
__ptrhigh (argv) = __ptrvalue (argv) + argc + 1; \
__ptrvalue (__environ) = __ptrlow (__environ) = __ptrhigh (argv); \
__ptrhigh (__environ) = __ptrvalue (__environ) + envc + 1; \
boundify_vector (__environ, ubp_ev); \
boundify_vector (argv, ubp_av); \
} while (0)
/* Copy an unbounded vector of unbounded strings into a bounded
counterpart. */
static void
boundify_vector (char **dest, char *__unbounded *__unbounded src)
{
char *__unbounded s;
for (; *src; src++, dest++)
{
__ptrvalue (*dest) = __ptrlow (*dest) = *src;
__ptrhigh (*dest) = src[1];
}
*dest = 0;
/* The OS lays out strings contiguously in vector order,
so */
for (s = __ptrvalue (dest[-1]); *s; s++)
;
__ptrhigh (dest[-1]) = ++s;
}
#else
# define INIT_ARGV_and_ENVIRON __environ = ubp_ev
#endif

28
sysdeps/generic/bp-sym.h Normal file
View File

@ -0,0 +1,28 @@
/* Bounded-pointer symbol modifier.
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Greg McGary <greg@mcgary.org>
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in the GNU MP Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define BP_SYM(name) _BP_SYM (name)
#if __BOUNDED_POINTERS__
# define _BP_SYM(name) __BP_##name
#else
# define _BP_SYM(name) name
#endif

225
sysdeps/generic/bp-thunks.h Normal file
View File

@ -0,0 +1,225 @@
/* Bounded-pointer thunk definitions.
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Greg McGary <greg@mcgary.org>
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in the GNU MP Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef _bpthunks_h_
#define _bpthunks_h_
#include <libc-symbols.h>
#define BP_ALIAS(STRONG, ALIAS) weak_alias (__BP_##STRONG, __BP_##ALIAS)
#define PV(P) __ptrvalue (P)
#define SV(S) __ptrvalue (S)
#define PB(P) __ptrlow (P)
#define PE(P) __ptrhigh (P)
#define voidp void *__bounded
#define charp char *__bounded
/* GKM FIXME: Add code to check bounds. Right now, they only strip bounds, */
#define BP_THUNK_i_iiip(NAME) __unbounded { \
extern int NAME (int, int, int, void *); \
int __BP_##NAME (int i0, int i1, int i2, voidp p3) \
{ return NAME (i0, i1, i2, PV (p3)); } }
#define BP_THUNK_i_iiipi(NAME) __unbounded { \
extern int NAME (int, int, int, void *, int); \
int __BP_##NAME (int i0, int i1, int i2, voidp p3, int i4) \
{ return NAME (i0, i1, i2, PV (p3), i4); } }
#define BP_THUNK_i_iiipp(NAME) __unbounded { \
extern int NAME (int, int, int, void *, void *); \
int __BP_##NAME (int i0, int i1, int i2, voidp p3, voidp p4) \
{ return NAME (i0, i1, i2, PV (p3), PV (p4)); } }
#define BP_THUNK_i_iip(NAME) __unbounded { \
extern int NAME (int, int, void *); \
int __BP_##NAME (int i0, int i1, voidp p2) \
{ return NAME (i0, i1, PV (p2)); } }
#define BP_THUNK_i_iipi(NAME) __unbounded { \
extern int NAME (int, int, void *, int); \
int __BP_##NAME (int i0, int i1, voidp p2, int i3) \
{ return NAME (i0, i1, PV (p2), i3); } }
#define BP_THUNK_i_iipp(NAME) __unbounded { \
extern int NAME (int, int, void *, void *); \
int __BP_##NAME (int i0, int i1, voidp p2, voidp p3) \
{ return NAME (i0, i1, PV (p2), PV (p3)); } }
#define BP_THUNK_i_ip(NAME) __unbounded { \
extern int NAME (int, void *); \
int __BP_##NAME (int i0, voidp p1) \
{ return NAME (i0, PV (p1)); } }
#define BP_THUNK_i_ipi(NAME) __unbounded { \
extern int NAME (int, void *, int); \
int __BP_##NAME (int i0, voidp p1, int i2) \
{ return NAME (i0, PV (p1), i2); } }
#define BP_THUNK_i_ipii(NAME) __unbounded { \
extern int NAME (int, void *, int, int); \
int __BP_##NAME (int i0, voidp p1, int i2, int i3) \
{ return NAME (i0, PV (p1), i2, i3); } }
#define BP_THUNK_i_ipiii(NAME) __unbounded { \
extern int NAME (int, void *, int, int, int); \
int __BP_##NAME (int i0, voidp p1, int i2, int i3, int i4) \
{ return NAME (i0, PV (p1), i2, i3, i4); } }
#define BP_THUNK_i_ipiipi(NAME) __unbounded { \
extern int NAME (int, void *, int, int, void *, int); \
int __BP_##NAME (int i0, voidp p1, int i2, int i3, voidp p4, int i5) \
{ return NAME (i0, PV (p1), i2, i3, PV (p4), i5); } }
#define BP_THUNK_i_ipiipp(NAME) __unbounded { \
extern int NAME (int, void *, int, int, void *, void *); \
int __BP_##NAME (int i0, voidp p1, int i2, int i3, voidp p4, voidp p5) \
{ return NAME (i0, PV (p1), i2, i3, PV (p4), PV (p5)); } }
#define BP_THUNK_i_ipip(NAME) __unbounded { \
extern int NAME (int, void *, int, void *); \
int __BP_##NAME (int i0, voidp p1, int i2, voidp p3) \
{ return NAME (i0, PV (p1), i2, PV (p3)); } }
#define BP_THUNK_i_ipp(NAME) __unbounded { \
extern int NAME (int, void *, void *); \
int __BP_##NAME (int i0, voidp p1, voidp p2) \
{ return NAME (i0, PV (p1), PV (p2)); } }
#define BP_THUNK_i_ippi(NAME) __unbounded { \
extern int NAME (int, void *, void *, int); \
int __BP_##NAME (int i0, voidp p1, voidp p2, int i3) \
{ return NAME (i0, PV (p1), PV (p2), i3); } }
#define BP_THUNK_i_ipppp(NAME) __unbounded { \
extern int NAME (int, void *, void *, void *, void *); \
int __BP_##NAME (int i0, voidp p1, voidp p2, voidp p3, voidp p4) \
{ return NAME (i0, PV (p1), PV (p2), PV (p3), PV (p4)); } }
#define BP_THUNK_i_isi(NAME) __unbounded { \
extern int NAME (int, char *, int); \
int __BP_##NAME (int i0, charp s1, int i2) \
{ return NAME (i0, SV (s1), i2); } }
#define BP_THUNK_i_isip(NAME) __unbounded { \
extern int NAME (int, char *, int, void *); \
int __BP_##NAME (int i0, charp s1, int i2, voidp p3) \
{ return NAME (i0, SV (s1), i2, PV (p3)); } }
#define BP_THUNK_i_p(NAME) __unbounded { \
extern int NAME (void *); \
int __BP_##NAME (voidp p0) \
{ return NAME (PV (p0)); } }
#define BP_THUNK_i_pi(NAME) __unbounded { \
extern int NAME (void *, int); \
int __BP_##NAME (voidp p0, int i1) \
{ return NAME (PV (p0), i1); } }
#define BP_THUNK_i_pii(NAME) __unbounded { \
extern int NAME (void *, int, int); \
int __BP_##NAME (voidp p0, int i1, int i2) \
{ return NAME (PV (p0), i1, i2); } }
#define BP_THUNK_i_piii(NAME) __unbounded { \
extern int NAME (void *, int, int, int); \
int __BP_##NAME (voidp p0, int i1, int i2, int i3) \
{ return NAME (PV (p0), i1, i2, i3); } }
#define BP_THUNK_i_pp(NAME) __unbounded { \
extern int NAME (void *, void *); \
int __BP_##NAME (voidp p0, voidp p1) \
{ return NAME (PV (p0), PV (p1)); } }
#define BP_THUNK_i_pppi(NAME) __unbounded { \
extern int NAME (void *, void *, void *, int); \
int __BP_##NAME (voidp p0, voidp p1, voidp p2, int i3) \
{ return NAME (PV (p0), PV (p1), PV (p2), i3); } }
#define BP_THUNK_i_s(NAME) __unbounded { \
extern int NAME (char *); \
int __BP_##NAME (charp s0) \
{ return NAME (SV (s0)); } }
#define BP_THUNK_i_si(NAME) __unbounded { \
extern int NAME (char *, int); \
int __BP_##NAME (charp s0, int i1) \
{ return NAME (SV (s0), i1); } }
#define BP_THUNK_i_sii(NAME) __unbounded { \
extern int NAME (char *, int, int); \
int __BP_##NAME (charp s0, int i1, int i2) \
{ return NAME (SV (s0), i1, i2); } }
#define BP_THUNK_i_sipip(NAME) __unbounded { \
extern int NAME (char *, int, void *, int, void *); \
int __BP_##NAME (charp s0, int i1, voidp p2, int i3, voidp p4) \
{ return NAME (SV (s0), i1, PV (p2), i3, PV (p4)); } }
#define BP_THUNK_i_sp(NAME) __unbounded { \
extern int NAME (char *, void *); \
int __BP_##NAME (charp s0, voidp p1) \
{ return NAME (SV (s0), PV (p1)); } }
#define BP_THUNK_i_spi(NAME) __unbounded { \
extern int NAME (char *, void *, int); \
int __BP_##NAME (charp s0, voidp p1, int i2) \
{ return NAME (SV (s0), PV (p1), i2); } }
#define BP_THUNK_i_spp(NAME) __unbounded { \
extern int NAME (char *, void *, void *); \
int __BP_##NAME (charp s0, voidp p1, voidp p2) \
{ return NAME (SV (s0), PV (p1), PV (p2)); } }
#define BP_THUNK_i_ss(NAME) __unbounded { \
extern int NAME (char *, char *); \
int __BP_##NAME (charp s0, charp s1) \
{ return NAME (SV (s0), s1); } }
#define BP_THUNK_i_sssip(NAME) __unbounded { \
extern int NAME (char *, char *, char *, int, void *); \
int __BP_##NAME (charp s0, charp s1, charp s2, int i3, voidp p4) \
{ return NAME (SV (s0), SV (s1), SV (s2), i3, PV (p4)); } }
/* sstk */
#define BP_THUNK_p_i(NAME) __unbounded { \
extern void *NAME (int); \
voidp __BP_##NAME (int i0) \
{ charp m; PV (m) = PB (m) = NAME (i0); \
PE (m) = PV (m) + i0; return m; } }
/* mremap */
#define BP_THUNK_p_piii(NAME) __unbounded { \
extern void *NAME (void *, int, int, int); \
voidp __BP_##NAME (voidp p0, int i1, int i2, int i3) \
{ charp m; PV (m) = PB (m) = NAME (PV (p0), i1, i2, i3); \
PE (m) = PV (m) + i2; return m; } }
/* mmap */
#define BP_THUNK_p_piiiii(NAME) __unbounded { \
extern void *NAME (void *, int, int, int, int, int); \
voidp __BP_##NAME (voidp p0, int i1, int i2, int i3, int i4, int i5) \
{ charp m; PV (m) = PB (m) = NAME (PV (p0), i1, i2, i3, i4, i5); \
PE (m) = PV (m) + i1; return m; } }
#endif /* _bpthunks_h_ */

View File

@ -19,22 +19,34 @@
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <ldsodefs.h> #include <ldsodefs.h>
#include <bp-start.h>
#include <bp-sym.h>
extern void __libc_init_first (int argc, char **argv, char **envp); extern void __libc_init_first (int argc, char **argv, char **envp);
extern int _dl_starting_up; extern int _dl_starting_up;
weak_extern (_dl_starting_up) weak_extern (_dl_starting_up)
extern int __libc_multiple_libcs; extern int __libc_multiple_libcs;
extern void *__libc_stack_end; extern void *__unbounded __libc_stack_end;
/* Prototype for local function. */ /* Prototype for local function. */
extern void __libc_check_standard_fds (void); extern void __libc_check_standard_fds (void);
int int
__libc_start_main (int (*main) (int, char **, char **), int argc, /* GKM FIXME: GCC: this should get __BP_ prefix by virtue of the
char **argv, void (*init) (void), void (*fini) (void), BPs in the arglist of startup_info.main and startup_info.init. */
void (*rtld_fini) (void), void *stack_end) BP_SYM (__libc_start_main) (int (*main) (int, char **, char **),
int argc, char *__unbounded *__unbounded ubp_av,
void (*init) (void), void (*fini) (void),
void (*rtld_fini) (void), void *__unbounded stack_end)
{ {
char *__unbounded *__unbounded ubp_ev = &ubp_av[argc + 1];
#if __BOUNDED_POINTERS__
char **argv;
#else
# define argv ubp_av
#endif
#ifndef SHARED #ifndef SHARED
/* The next variable is only here to work around a bug in gcc <= 2.7.2.2. /* The next variable is only here to work around a bug in gcc <= 2.7.2.2.
If the address would be taken inside the expression the optimizer If the address would be taken inside the expression the optimizer
@ -44,12 +56,11 @@ __libc_start_main (int (*main) (int, char **, char **), int argc,
__libc_multiple_libcs = dummy_addr && !_dl_starting_up; __libc_multiple_libcs = dummy_addr && !_dl_starting_up;
#endif #endif
INIT_ARGV_and_ENVIRON;
/* Store the lowest stack address. */ /* Store the lowest stack address. */
__libc_stack_end = stack_end; __libc_stack_end = stack_end;
/* Set the global _environ variable correctly. */
__environ = &argv[argc + 1];
#ifndef SHARED #ifndef SHARED
/* Some security at this point. Prevent starting a SUID binary where /* Some security at this point. Prevent starting a SUID binary where
the standard file descriptors are not opened. We have to do this the standard file descriptors are not opened. We have to do this

View File

@ -1,5 +1,5 @@
/* Startup code compliant to the ELF i386 ABI. /* Startup code compliant to the ELF i386 ABI.
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -36,6 +36,8 @@
NULL NULL
*/ */
#include "bp-sym.h"
.text .text
.globl _start .globl _start
_start: _start:
@ -70,11 +72,11 @@ _start:
pushl %ecx /* Push second argument: argv. */ pushl %ecx /* Push second argument: argv. */
pushl %esi /* Push first argument: argc. */ pushl %esi /* Push first argument: argc. */
pushl $main pushl $BP_SYM (main)
/* Call the user's main function, and exit with its value. /* Call the user's main function, and exit with its value.
But let the libc call main. */ But let the libc call main. */
call __libc_start_main call BP_SYM (__libc_start_main)
hlt /* Crash if somehow `exit' does return. */ hlt /* Crash if somehow `exit' does return. */

View File

@ -1,17 +1,17 @@
# File name Caller Syscall name # args Strong name Weak names # File name Caller Syscall name # args Strong name Weak names
adjtime - adjtime 2 __adjtime adjtime adjtime - adjtime i:pp __adjtime adjtime
fchmod - fchmod 2 __fchmod fchmod fchmod - fchmod i:ii __fchmod fchmod
fchown - fchown 3 __fchown fchown fchown - fchown i:iii __fchown fchown
ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate - ftruncate i:ii __ftruncate ftruncate
getpgid - getpgrp 1 __getpgid getpgid getpgid - getpgrp i:i __getpgid getpgid
getrusage - getrusage 2 __getrusage getrusage getrusage - getrusage i:ip __getrusage getrusage
gettimeofday - gettimeofday 2 __gettimeofday gettimeofday gettimeofday - gettimeofday i:pp __gettimeofday gettimeofday
settimeofday - settimeofday 2 __settimeofday settimeofday settimeofday - settimeofday i:pp __settimeofday settimeofday
setpgid - setpgrp 2 __setpgid setpgid setpgid - setpgrp i:ii __setpgid setpgid
setregid - setregid 2 __setregid setregid setregid - setregid i:ii __setregid setregid
setreuid - setreuid 2 __setreuid setreuid setreuid - setreuid i:ii __setreuid setreuid
sigaction - sigaction 3 __sigaction sigaction sigaction - sigaction i:ipp __sigaction sigaction
sys_lstat lxstat lstat 2 __syscall_lstat sys_lstat lxstat lstat i:sp __syscall_lstat
truncate - truncate 2 truncate truncate - truncate i:si truncate
vhangup - vhangup 1 vhangup vhangup - vhangup i:i vhangup

View File

@ -1,23 +1,23 @@
# File name Caller Syscall name # args Strong name Weak names # File name Caller Syscall name # args Strong name Weak names
accept - accept 3 __libc_accept accept accept - accept i:ipi __libc_accept accept
bind - bind 3 bind bind - bind i:ipi bind
connect - connect 3 __libc_connect __connect connect connect - connect i:ipi __libc_connect __connect connect
gethostid - gethostid 0 gethostid gethostid - gethostid i: gethostid
gethostname - gethostname 2 __gethostname gethostname gethostname - gethostname i:si __gethostname gethostname
getpeername - getpeername 3 getpeername getpeername - getpeername i:ipi getpeername
getsockname - getsockname 3 getsockname getsockname - getsockname i:ipi getsockname
getsockopt - getsockopt 5 getsockopt getsockopt - getsockopt i:iiipp getsockopt
listen - listen 2 listen listen - listen i:ii listen
recv - recv 4 __libc_recv recv recv - recv i:ipii __libc_recv recv
recvfrom - recvfrom 6 __libc_recvfrom recvfrom recvfrom - recvfrom i:ipiipp __libc_recvfrom recvfrom
recvmsg - recvmsg 3 __libc_recvmsg recvmsg recvmsg - recvmsg i:ipi __libc_recvmsg recvmsg
send - send 4 __libc_send __send send send - send i:ipii __libc_send __send send
sendmsg - sendmsg 3 __libc_sendmsg sendmsg sendmsg - sendmsg i:ipi __libc_sendmsg sendmsg
sendto - sendto 6 __libc_sendto sendto sendto - sendto i:ipiipi __libc_sendto sendto
sethostid - sethostid 1 sethostid sethostid - sethostid i:i sethostid
sethostname - sethostname 2 sethostname sethostname - sethostname i:pi sethostname
setsockopt - setsockopt 5 setsockopt setsockopt - setsockopt i:iiipi setsockopt
shutdown - shutdown 2 shutdown shutdown - shutdown i:ii shutdown
socket - socket 3 socket socket - socket i:iii socket
socketpair - socketpair 4 socketpair socketpair - socketpair i:iiip socketpair

View File

@ -5,47 +5,68 @@
thisdir=$1; shift thisdir=$1; shift
echo ''
echo \#### DIRECTORY = $thisdir
# Check each sysdep dir with higher priority than this one,
# and remove from $calls all the functions found in other dirs.
# Punt when we reach the directory defining these syscalls.
sysdirs=`for dir in $sysdirs; do
test $dir = $thisdir && break; echo $dir; done`
echo \#### SYSDIRS = $sysdirs
# Get the list of system calls for this directory. # Get the list of system calls for this directory.
calls=`sed 's/#.*$// calls=`sed 's/#.*$//
/^[ ]*$/d' $thisdir/syscalls.list` /^[ ]*$/d' $thisdir/syscalls.list`
# Check each sysdep dir with higher priority than this one, calls=`echo "$calls" |
# and remove from $calls all the functions found in other dirs. while read file caller rest; do
for dir in $sysdirs; do
# Punt when we reach the directory defining these syscalls.
test $dir = $thisdir && break
# Remove each syscall that is implemented by a file in $dir. # Remove each syscall that is implemented by a file in $dir.
# If a syscall specified a "caller", then only compile that syscall # If a syscall specified a "caller", then only compile that syscall
# if the caller function is also implemented in this directory. # if the caller function is also implemented in this directory.
calls=`echo "$calls" | while read file caller rest; do srcfile=-;
test -f $dir/$file.c && continue for dir in $sysdirs; do
test -f $dir/$file.S && continue { test -f $dir/$file.c && srcfile=$dir/$file.c; } ||
test -f $dir/$file.s && continue { test -f $dir/$file.S && srcfile=$dir/$file.S; } ||
if test x$caller != x-; then { test -f $dir/$file.s && srcfile=$dir/$file.s; } ||
test -f $dir/$caller.c && continue { test x$caller != x- &&
test -f $dir/$caller.S && continue { { test -f $dir/$caller.c && srcfile=$dir/$caller.c; } ||
test -f $dir/$caller.s && continue { test -f $dir/$caller.S && srcfile=$dir/$caller.S; } ||
fi { test -f $dir/$caller.s && srcfile=$dir/$caller.s; }; }; } && break;
echo $file $caller $rest done;
done` echo $file $srcfile $caller $rest;
done`
done
# Any calls left? # Any calls left?
test -n "$calls" || exit 0 test -n "$calls" || exit 0
files=
# Emit rules to compile the syscalls remaining in $calls. # Emit rules to compile the syscalls remaining in $calls.
echo "$calls" | while read file caller syscall nargs strong weak; do echo "$calls" | while read file srcfile caller syscall args strong weak; do
# Figure out if $syscall is defined with a number in syscall.h. # Figure out if $syscall is defined with a number in syscall.h.
$asm_CPP - << EOF | grep "^@@@ .*$syscall" >/dev/null && continue callnum=-
#include <sysdep.h> eval `{ echo "#include <sysdep.h>";
@@@ SYS_ify ($syscall) echo "callnum=SYS_ify ($syscall)"; } |
EOF $asm_CPP - |grep "^callnum=" |grep -v $syscall`
# Derive the number of arguments from the argument signature
case $args in
[0-9]) nargs=$args;;
?:) nargs=0;;
?:?) nargs=1;;
?:??) nargs=2;;
?:???) nargs=3;;
?:????) nargs=4;;
?:?????) nargs=5;;
?:??????) nargs=6;;
esac
# Make sure only the first syscall rule is used, if multiple dirs
# define the same syscall.
echo "#### CALL=$file NUMBER=$callnum ARGS=$args SOURCE=$srcfile"
case x$srcfile$callnum in
x*-) ;; ### Do nothing for undefined callnum
x-*)
echo "ifeq (,\$(filter $file,\$(unix-syscalls)))"
case $weak in case $weak in
*@*) *@*)
@ -53,11 +74,6 @@ EOF
echo "ifneq (,\$(filter .os,\$(object-suffixes)))" echo "ifneq (,\$(filter .os,\$(object-suffixes)))"
;; ;;
esac esac
# Make sure only the first syscall rule is used, if multiple dirs
# define the same syscall.
echo "ifeq (,\$(filter $file,\$(unix-syscalls)))"
# Accumulate the list of syscall files for this directory. # Accumulate the list of syscall files for this directory.
echo "unix-syscalls += $file" echo "unix-syscalls += $file"
test x$caller = x- || echo "unix-extra-syscalls += $file" test x$caller = x- || echo "unix-extra-syscalls += $file"
@ -75,7 +91,7 @@ shared-only-routines += $file
\$(foreach o,\$(object-suffixes),\$(objpfx)$file\$o): \\" \$(foreach o,\$(object-suffixes),\$(objpfx)$file\$o): \\"
;; ;;
esac esac
echo "\$(common-objpfx)s-proto.d echo " \$(common-objpfx)s-proto.d
(echo '#include <sysdep.h>'; \\ (echo '#include <sysdep.h>'; \\
echo 'PSEUDO ($strong, $syscall, $nargs)'; \\ echo 'PSEUDO ($strong, $syscall, $nargs)'; \\
echo ' ret'; \\ echo ' ret'; \\
@ -124,8 +140,6 @@ shared-only-routines += $file
# And finally, pipe this all into the compiler. # And finally, pipe this all into the compiler.
echo ' ) | $(COMPILE.S) -x assembler-with-cpp -o $@ -' echo ' ) | $(COMPILE.S) -x assembler-with-cpp -o $@ -'
echo endif
case $weak in case $weak in
*@*) *@*)
# The versioned symbols are only in the shared library. # The versioned symbols are only in the shared library.
@ -133,4 +147,29 @@ shared-only-routines += $file
;; ;;
esac esac
echo endif
;;
esac
case x$callnum,$srcfile,$args in
x[0-9]*,-,*[sp]* | x*,*.[sS],*[sp]*)
echo "ifeq (,\$(filter $file,\$(bp-thunks)))"
echo "bp-thunks += $file";
echo "\
\$(objpfx)\$(bppfx)$file.ob: \$(common-objpfx)s-proto.d
(echo '#include <bp-thunks.h>'; \\
echo 'BP_THUNK_`echo $args |tr : _` ($strong)'; \\"
for name in $weak; do
case $name in
*@*) ;;
*) echo " echo 'BP_ALIAS ($strong, $name)'; \\" ;;
esac
done
echo ' ) | $(COMPILE.c) -x c -o $@ -'
echo endif
;;
esac
done done

View File

@ -4,8 +4,8 @@
# File name Caller Syscall name # args Strong name Weak names # File name Caller Syscall name # args Strong name Weak names
madvise - madvise 3 madvise madvise - madvise i:pii madvise
mmap - mmap 6 __mmap mmap mmap - mmap p:piiiii __mmap mmap
mprotect - mprotect 3 __mprotect mprotect mprotect - mprotect i:pii __mprotect mprotect
msync - msync 3 __libc_msync msync msync - msync i:pii __libc_msync msync
munmap - munmap 2 __munmap munmap munmap - munmap i:pi __munmap munmap

View File

@ -1,65 +1,65 @@
# File name Caller Syscall name # args Strong name Weak names # File name Caller Syscall name Args Strong name Weak names
access - access 2 __access access access - access i:si __access access
acct - acct 1 acct acct - acct i:s acct
chdir - chdir 1 __chdir chdir chdir - chdir i:s __chdir chdir
chmod - chmod 2 __chmod chmod chmod - chmod i:si __chmod chmod
chown - chown 3 __chown chown chown - chown i:sii __chown chown
chroot - chroot 1 chroot chroot - chroot i:s chroot
close - close 1 __libc_close __close close close - close i:i __libc_close __close close
dup - dup 1 __dup dup dup - dup i:i __dup dup
dup2 - dup2 2 __dup2 dup2 dup2 - dup2 i:ii __dup2 dup2
fchdir - fchdir 1 __fchdir fchdir fchdir - fchdir i:i __fchdir fchdir
fcntl - fcntl 3 __libc_fcntl __fcntl fcntl fcntl - fcntl i:iip __libc_fcntl __fcntl fcntl
fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs - fstatfs i:ip __fstatfs fstatfs
fsync - fsync 1 __libc_fsync fsync fsync - fsync i:i __libc_fsync fsync
getdomain - getdomainname 2 getdomainname getdomain - getdomainname i:si getdomainname
getgid - getgid 0 __getgid getgid getgid - getgid i: __getgid getgid
getgroups - getgroups 2 __getgroups getgroups getgroups - getgroups i:ip __getgroups getgroups
getitimer - getitimer 2 __getitimer getitimer getitimer - getitimer i:ip __getitimer getitimer
getpid - getpid 0 __getpid getpid getpid - getpid i: __getpid getpid
getpriority - getpriority 2 getpriority getpriority - getpriority i:ii getpriority
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit - getrlimit i:ip __getrlimit getrlimit
getuid - getuid 0 __getuid getuid getuid - getuid i: __getuid getuid
ioctl - ioctl 3 __ioctl ioctl ioctl - ioctl i:iip __ioctl ioctl
kill - kill 2 __kill kill kill - kill i:ii __kill kill
link - link 2 __link link link - link i:ss __link link
lseek - lseek 3 __libc_lseek __lseek lseek lseek - lseek i:iii __libc_lseek __lseek lseek
mkdir - mkdir 2 __mkdir mkdir mkdir - mkdir i:si __mkdir mkdir
open - open 3 __libc_open __open open open - open i:sii __libc_open __open open
profil - profil 4 profil profil - profil i:piii profil
ptrace - ptrace 4 ptrace ptrace - ptrace i:iiii ptrace
read - read 3 __libc_read __read read read - read i:ipi __libc_read __read read
readlink - readlink 3 __readlink readlink readlink - readlink i:spi __readlink readlink
readv - readv 3 __readv readv readv - readv i:ipi __readv readv
reboot - reboot 1 reboot reboot - reboot i:i reboot
rename - rename 2 rename rename - rename i:ss rename
rmdir - rmdir 1 __rmdir rmdir rmdir - rmdir i:s __rmdir rmdir
select - select 5 __select select select - select i:ipppp __select select
setdomain - setdomainname 2 setdomainname setdomain - setdomainname i:si setdomainname
setegid - setegid 1 __setegid setegid setegid - setegid i:i __setegid setegid
seteuid - seteuid 1 __seteuid seteuid seteuid - seteuid i:i __seteuid seteuid
setgid - setgid 1 __setgid setgid setgid - setgid i:i __setgid setgid
setgroups - setgroups 2 setgroups setgroups - setgroups i:ip setgroups
setitimer - setitimer 3 __setitimer setitimer setitimer - setitimer i:ipp __setitimer setitimer
setpriority - setpriority 3 setpriority setpriority - setpriority i:iii setpriority
setrlimit - setrlimit 2 setrlimit setrlimit - setrlimit i:ip setrlimit
setsid - setsid 0 __setsid setsid setsid - setsid i: __setsid setsid
settimeofday - settimeofday 2 __settimeofday settimeofday settimeofday - settimeofday i:pp __settimeofday settimeofday
setuid - setuid 1 __setuid setuid setuid - setuid i:i __setuid setuid
sigsuspend - sigsuspend 1 sigsuspend sigsuspend - sigsuspend i:p sigsuspend
sstk - sstk 1 sstk sstk - sstk p:i sstk
statfs - statfs 2 __statfs statfs statfs - statfs i:sp __statfs statfs
swapoff - swapoff 1 swapoff swapoff - swapoff i:s swapoff
swapon - swapon 1 swapon swapon - swapon i:s swapon
symlink - symlink 2 __symlink symlink symlink - symlink i:ss __symlink symlink
sync - sync 0 sync sync - sync i: sync
sys_fstat fxstat fstat 2 __syscall_fstat sys_fstat fxstat fstat i:ip __syscall_fstat
sys_mknod xmknod mknod 3 __syscall_mknod sys_mknod xmknod mknod i:pii __syscall_mknod
sys_stat xstat stat 2 __syscall_stat sys_stat xstat stat i:sp __syscall_stat
umask - umask 1 __umask umask umask - umask i:i __umask umask
uname - uname 1 uname uname - uname i:p uname
unlink - unlink 1 __unlink unlink unlink - unlink i:s __unlink unlink
utimes - utimes 2 __utimes utimes utimes - utimes i:sp __utimes utimes
write - write 3 __libc_write __write write write - write i:ipi __libc_write __write write
writev - writev 3 __writev writev writev - writev i:ipi __writev writev

View File

@ -1,6 +1,6 @@
# File name Caller Syscall name # args Strong name Weak names # File name Caller Syscall name Args Strong name Weak names
modify_ldt EXTRA modify_ldt 3 __modify_ldt modify_ldt modify_ldt EXTRA modify_ldt i:ipi __modify_ldt modify_ldt
vm86 - vm86 1 __vm86 vm86 vm86 - vm86 i:p __vm86 vm86
oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0 oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0
oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0 oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0

View File

@ -1,7 +1,7 @@
# File name Caller Syscall name # args Strong name Weak names # File name Caller Syscall name Args Strong name Weak names
adjtimex adjtime adjtimex 1 __adjtimex adjtimex ntp_adjtime adjtimex adjtime adjtimex i:p __adjtimex adjtimex ntp_adjtime
bdflush EXTRA bdflush 2 bdflush bdflush EXTRA bdflush i:ii bdflush
capget EXTRA capget 2 capget capget EXTRA capget 2 capget
capset EXTRA capset 2 capset capset EXTRA capset 2 capset
clock_getres - clock_getres 2 clock_getres clock_getres - clock_getres 2 clock_getres
@ -9,61 +9,61 @@ clock_gettime - clock_gettime 2 clock_gettime
clock_settime - clock_settime 2 clock_settime clock_settime - clock_settime 2 clock_settime
create_module EXTRA create_module 3 create_module create_module EXTRA create_module 3 create_module
delete_module EXTRA delete_module 3 delete_module delete_module EXTRA delete_module 3 delete_module
fdatasync - fdatasync 1 fdatasync fdatasync - fdatasync i:i fdatasync
flock - flock 2 __flock flock flock - flock i:ii __flock flock
fork - fork 0 __libc_fork __fork fork fork - fork i: __libc_fork __fork fork
get_kernel_syms EXTRA get_kernel_syms 1 get_kernel_syms get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms
getegid - getegid 0 __getegid getegid getegid - getegid i: __getegid getegid
geteuid - geteuid 0 __geteuid geteuid geteuid - geteuid i: __geteuid geteuid
getpgid - getpgid 1 __getpgid getpgid getpgid - getpgid i:i __getpgid getpgid
getpgrp - getpgrp 0 getpgrp getpgrp - getpgrp i: getpgrp
getppid - getppid 0 __getppid getppid getppid - getppid i: __getppid getppid
getsid - getsid 1 getsid getsid - getsid i:i getsid
init_module EXTRA init_module 5 init_module init_module EXTRA init_module 5 init_module
ioperm - ioperm 3 ioperm ioperm - ioperm i:iii ioperm
iopl - iopl 1 iopl iopl - iopl i:i iopl
klogctl EXTRA syslog 3 klogctl klogctl EXTRA syslog i:isi klogctl
lchown - lchown 3 __lchown lchown lchown - lchown i:sii __lchown lchown
madvise - madvise 3 posix_madvise madvise madvise - madvise i:pii posix_madvise madvise
mincore - mincore 3 mincore mincore - mincore 3 mincore
mlock EXTRA mlock 2 __mlock mlock mlock EXTRA mlock i:pi __mlock mlock
mlockall EXTRA mlockall 1 __mlockall mlockall mlockall EXTRA mlockall i:i __mlockall mlockall
mmap - mmap 6 __mmap mmap mmap - mmap p:piiiii __mmap mmap
mount EXTRA mount 5 __mount mount mount EXTRA mount i:sssip __mount mount
mremap EXTRA mremap 4 __mremap mremap mremap EXTRA mremap p:piii __mremap mremap
munlock EXTRA munlock 2 __munlock munlock munlock EXTRA munlock i:pi __munlock munlock
munlockall EXTRA munlockall 0 __munlockall munlockall munlockall EXTRA munlockall i: __munlockall munlockall
nanosleep - nanosleep 2 __libc_nanosleep __nanosleep nanosleep nanosleep - nanosleep i:pp __libc_nanosleep __nanosleep nanosleep
nfsservctl EXTRA nfsservctl 3 nfsservctl nfsservctl EXTRA nfsservctl i:ipp nfsservctl
pause - pause 0 __libc_pause pause pause - pause i: __libc_pause pause
personality init-first personality 1 __personality personality personality init-first personality i:i __personality personality
pipe - pipe 1 __pipe pipe pipe - pipe i:p __pipe pipe
prctl EXTRA prctl 5 prctl prctl EXTRA prctl i:iiiii prctl
query_module EXTRA query_module 5 query_module query_module EXTRA query_module i:sipip query_module
quotactl EXTRA quotactl 4 quotactl quotactl EXTRA quotactl i:isip quotactl
sched_getp - sched_getparam 2 __sched_getparam sched_getparam sched_getp - sched_getparam i:ip __sched_getparam sched_getparam
sched_gets - sched_getscheduler 1 __sched_getscheduler sched_getscheduler sched_gets - sched_getscheduler i:i __sched_getscheduler sched_getscheduler
sched_primax - sched_get_priority_max 1 __sched_get_priority_max sched_get_priority_max sched_primax - sched_get_priority_max i:i __sched_get_priority_max sched_get_priority_max
sched_primin - sched_get_priority_min 1 __sched_get_priority_min sched_get_priority_min sched_primin - sched_get_priority_min i:i __sched_get_priority_min sched_get_priority_min
sched_rr_gi - sched_rr_get_interval 2 __sched_rr_get_interval sched_rr_get_interval sched_rr_gi - sched_rr_get_interval i:ip __sched_rr_get_interval sched_rr_get_interval
sched_setp - sched_setparam 2 __sched_setparam sched_setparam sched_setp - sched_setparam i:ip __sched_setparam sched_setparam
sched_sets - sched_setscheduler 3 __sched_setscheduler sched_setscheduler sched_sets - sched_setscheduler i:iip __sched_setscheduler sched_setscheduler
sched_yield - sched_yield 0 __sched_yield sched_yield sched_yield - sched_yield i: __sched_yield sched_yield
select - _newselect 5 __select select select - _newselect i:ipppp __select select
sendfile EXTRA sendfile 4 sendfile sendfile EXTRA sendfile i:iipi sendfile
setfsgid EXTRA setfsgid 1 setfsgid setfsgid EXTRA setfsgid i:i setfsgid
setfsuid EXTRA setfsuid 1 setfsuid setfsuid EXTRA setfsuid i:i setfsuid
setpgid - setpgid 2 __setpgid setpgid setpgid - setpgid i:ii __setpgid setpgid
setresuid EXTRA setresuid 3 __setresuid setresuid setresuid EXTRA setresuid i:iii __setresuid setresuid
setresgid EXTRA setresgid 3 __setresgid setresgid setresgid EXTRA setresgid i:iii __setresgid setresgid
sigaltstack - sigaltstack 2 __sigaltstack sigaltstack sigaltstack - sigaltstack i:pp __sigaltstack sigaltstack
sysinfo EXTRA sysinfo 1 sysinfo sysinfo EXTRA sysinfo i:p sysinfo
swapon - swapon 2 __swapon swapon swapon - swapon i:si __swapon swapon
swapoff - swapoff 1 __swapoff swapoff swapoff - swapoff i:s __swapoff swapoff
timer_create - timer_create 3 timer_create timer_create - timer_create 3 timer_create
timer_delete - timer_delete 1 timer_delete timer_delete - timer_delete 1 timer_delete
timer_getoverr - timer_getoverrun 1 timer_getoverrun timer_getoverr - timer_getoverrun 1 timer_getoverrun
timer_gettime - timer_gettime 2 timer_gettime timer_gettime - timer_gettime 2 timer_gettime
timer_settime - timer_settime 4 timer_settime timer_settime - timer_settime 4 timer_settime
uselib EXTRA uselib 1 uselib uselib EXTRA uselib i:s uselib
wait4 - wait4 4 __wait4 wait4 wait4 - wait4 i:ipip __wait4 wait4

View File

@ -1,16 +1,16 @@
# File name Caller Syscall name # args Strong name Weak names # File name Caller Syscall name # args Strong name Weak names
alarm - alarm 1 alarm alarm - alarm i:i alarm
ftime - ftime 1 ftime ftime - ftime i:p ftime
nice - nice 1 nice nice - nice i:i nice
pause - pause 0 pause pause - pause i: pause
poll - poll 3 poll poll - poll i:pii poll
s_getdents getdents getdents 3 __getdents s_getdents getdents getdents i:ipi __getdents
setrlimit - setrlimit 2 setrlimit setrlimit - setrlimit i:ip setrlimit
settimeofday - settimeofday 2 __settimeofday settimeofday settimeofday - settimeofday i:pp __settimeofday settimeofday
signal - signal 2 signal signal - signal i:ii signal
stime - stime 1 stime stime - stime i:p stime
time - time 1 time time - time i:p time
times - times 1 __times times times - times i:p __times times
ulimit - ulimit 2 ulimit ulimit - ulimit i:ii ulimit
utime - utime 2 utime utime - utime i:pp utime