summaryrefslogtreecommitdiffstats
path: root/libc/arch-x86/syscalls
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2012-01-13 14:03:01 -0800
committerNick Kralevich <nnk@google.com>2012-01-13 15:50:40 -0800
commitf44de270bba32c9b1b5eff8a34be07b10ddff238 (patch)
tree79597af69be025eb643e495bf9a635077717cc8a /libc/arch-x86/syscalls
parentecd0e95a0276c1ba72c7331f5e4617815f015f22 (diff)
downloadbionic-f44de270bba32c9b1b5eff8a34be07b10ddff238.zip
bionic-f44de270bba32c9b1b5eff8a34be07b10ddff238.tar.gz
bionic-f44de270bba32c9b1b5eff8a34be07b10ddff238.tar.bz2
add personality() system call.
Change-Id: Ie899def8ea1d705930ed83adae1343c1353e7c57
Diffstat (limited to 'libc/arch-x86/syscalls')
-rw-r--r--libc/arch-x86/syscalls/personality.S23
1 files changed, 23 insertions, 0 deletions
diff --git a/libc/arch-x86/syscalls/personality.S b/libc/arch-x86/syscalls/personality.S
new file mode 100644
index 0000000..af4f912
--- /dev/null
+++ b/libc/arch-x86/syscalls/personality.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type personality, @function
+ .globl personality
+ .align 4
+
+personality:
+ pushl %ebx
+ mov 8(%esp), %ebx
+ movl $__NR_personality, %eax
+ int $0x80
+ cmpl $-129, %eax
+ jb 1f
+ negl %eax
+ pushl %eax
+ call __set_errno
+ addl $4, %esp
+ orl $-1, %eax
+1:
+ popl %ebx
+ ret