diff options
author | Roland McGrath <roland@gnu.org> | 1996-03-14 11:20:23 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-03-14 11:20:23 +0000 |
commit | 8d71c7b0e4f76dce251a121e07dff8212bed73f8 (patch) | |
tree | a90fd3140fbd2922cb6006150f8a89f4be0c888d /sysdeps | |
parent | 52e9a9d1187e1a2a7357f3a0f353058e14667d62 (diff) | |
download | glibc-8d71c7b0e4f76dce251a121e07dff8212bed73f8.tar.gz glibc-8d71c7b0e4f76dce251a121e07dff8212bed73f8.tar.xz glibc-8d71c7b0e4f76dce251a121e07dff8212bed73f8.zip |
Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* string/strnlen.c: New file. * string/Makefile (routines): Add strnlen. * string/string.h [__USE_GNU] (strnlen): Declare new function. [__OPTIMIZE__]: Define extern inline implementation of it.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/init-first.c | 20 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/syscalls.list | 1 |
2 files changed, 9 insertions, 12 deletions
diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c index 9d7774a19e..6d974ea1e6 100644 --- a/sysdeps/unix/sysv/linux/init-first.c +++ b/sysdeps/unix/sysv/linux/init-first.c @@ -32,22 +32,18 @@ extern void __libc_global_ctors (void); static void init (int *data) { + extern int __personality (int); + int argc = *data; char **argv = (void *) (data + 1); char **envp = &argv[argc + 1]; -#ifdef __i386__ - /* Make sure we are not using the iBSC2 personality. The `personality' - syscall takes one argument; zero means the Linux personality. The - argument arrives in %ebx; we have to save and restore %ebx by hand - here, because GCC (as of 2.7.0) cannot handle saving and restoring it - for us when it is the dedicated GOT register for PIC. */ - asm ("pushl %%ebx\n" - "xorl %%ebx, %%ebx\n" - "int $0x80 # syscall no %0\n" - "popl %%ebx" - : : "a" (SYS_ify (personality))); -#endif + /* The `personality' system call takes one argument that chooses the + "personality", i.e. the set of system calls and such. Zero is the + native Linux value; we must make this call first thing to disable + emulation of some other system that might have been enabled by default + based on the executable format. */ + __personality (0); /* Set the FPU control word to the proper default value. */ __setfpucw (__fpu_control); diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 7d199bdd2d..2da874eaed 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -15,6 +15,7 @@ mlockall - mlockall 1 __mlockall mlockall mount - mount 5 __mount mount munlock - munlock 2 __munlock munlock munlockall - munlockall 0 __munlockall munlockall +personality init-first personality 1 __personality personality pipe - pipe 1 __pipe pipe reboot - reboot 3 reboot s_ptrace ptrace ptrace 4 __syscall_ptrace |