Revision | a0c13b17a2e6f9ab6d94377d8255605ceba74c7e (tree) |
---|---|
Time | 2016-01-01 18:56:31 |
Author | Yoshinori Sato <ysato@user...> |
Commiter | Yoshinori Sato |
rx: update
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -1,8 +1,8 @@ | ||
1 | 1 | # Makefile for uClibc |
2 | 2 | # |
3 | -# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> | |
3 | +# Copyright (C) 2015 Yoshinori Sato | |
4 | 4 | # |
5 | -# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. | |
5 | +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. | |
6 | 6 | # |
7 | 7 | |
8 | 8 | top_srcdir=../../../../ |
@@ -5,6 +5,6 @@ | ||
5 | 5 | # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. |
6 | 6 | # |
7 | 7 | |
8 | -CSRC := __syscall_error.c | |
8 | +CSRC-y := __syscall_error.c | |
9 | 9 | |
10 | -SSRC := __longjmp.S _setjmp.S clone.S crt1.S setjmp.S vfork.S | |
10 | +SSRC-y := __longjmp.S _setjmp.S clone.S crt1.S setjmp.S vfork.S |
@@ -3,12 +3,12 @@ | ||
3 | 3 | #include <features.h> |
4 | 4 | #include <bits/setjmp.h> |
5 | 5 | |
6 | -.globl _longjmp | |
7 | -.type _longjmp,@function | |
6 | +.globl __longjmp | |
7 | +.type __longjmp,@function | |
8 | 8 | |
9 | 9 | .text |
10 | 10 | .align 4 |
11 | -_longjmp: | |
11 | +__longjmp: | |
12 | 12 | tst r2,r2 |
13 | 13 | scz.l r2 |
14 | 14 | mov.l [r1+],r6 |
@@ -26,5 +26,5 @@ _longjmp: | ||
26 | 26 | add [r1],r0 |
27 | 27 | jmp r3 |
28 | 28 | |
29 | -libc_hidden_def(_longjmp) | |
29 | +libc_hidden_def(__longjmp) | |
30 | 30 | .end |
@@ -23,4 +23,5 @@ _setjmp: | ||
23 | 23 | mov.l #0,4[r1] /* signal mask not saved */ |
24 | 24 | rts |
25 | 25 | |
26 | +libc_hidden_def(_setjmp) | |
26 | 27 | .end |
@@ -45,9 +45,9 @@ | ||
45 | 45 | #define O_ASYNC 020000 |
46 | 46 | |
47 | 47 | #ifdef __USE_GNU |
48 | -# define O_DIRECTORY 040000 /* Must be a directory. */ | |
48 | +# define O_DIRECT 040000 /* Direct disk access. */ | |
49 | 49 | # define O_NOFOLLOW 0100000 /* Do not follow links. */ |
50 | -# define O_DIRECT 0200000 /* Direct disk access. */ | |
50 | +# define O_DIRECTORY 0200000 /* Must be a directory. */ | |
51 | 51 | # define O_NOATIME 01000000 /* Do not set atime. */ |
52 | 52 | # define O_CLOEXEC 02000000 /* set close_on_exec */ |
53 | 53 | #endif |
@@ -64,7 +64,7 @@ | ||
64 | 64 | register unsigned long r5 __asm__("r5") = __arg5; \ |
65 | 65 | register unsigned long r15 __asm__("r15") = name |
66 | 66 | |
67 | -#define ASM_ARGS_6 , "0"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5), "r"(r7) | |
67 | +#define ASM_ARGS_6 , "0"(r1), "r"(r2), "r"(r3), "r"(r4), "r"(r5), "r"(r14) | |
68 | 68 | #define ARGS_6(name, a1, a2, a3, a4, a5, a6) \ |
69 | 69 | unsigned long __arg1 = (unsigned long)a1; \ |
70 | 70 | unsigned long __arg2 = (unsigned long)a2; \ |
@@ -77,7 +77,7 @@ | ||
77 | 77 | register unsigned long r3 __asm__("r3") = __arg3; \ |
78 | 78 | register unsigned long r4 __asm__("r4") = __arg4; \ |
79 | 79 | register unsigned long r5 __asm__("r5") = __arg5; \ |
80 | - register unsigned long r7 __asm__("r7") = __arg6; \ | |
80 | + register unsigned long r14 __asm__("r14") = __arg6; \ | |
81 | 81 | register unsigned long r15 __asm__("r15") = name |
82 | 82 | |
83 | 83 | #define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ |
@@ -42,6 +42,6 @@ | ||
42 | 42 | #define __UCLIBC_HAVE_SIGNED_ZERO__ |
43 | 43 | |
44 | 44 | /* only weird assemblers generally need this */ |
45 | -#undef __UCLIBC_ASM_LINE_SEP__ | |
45 | +#define __UCLIBC_ASM_LINE_SEP__ ! | |
46 | 46 | |
47 | 47 | #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */ |
@@ -1,6 +1,4 @@ | ||
1 | -#include <features.h> | |
2 | - | |
3 | -#include <asm/unistd.h> | |
1 | +#include <sys/syscall.h> | |
4 | 2 | |
5 | 3 | .text |
6 | 4 | .align 4 |
@@ -9,13 +7,18 @@ | ||
9 | 7 | .type __vfork,@function |
10 | 8 | |
11 | 9 | __vfork: |
12 | - mov.l [r0+],r2 | |
13 | - mov.l #__NR_vfork,r8 | |
10 | + mov.l [r0+],r14 | |
11 | + mov.l #0x00004111,r1 /* CLONE_VFORK | CLONE_VM | SIGCHLD */ | |
12 | + mov.l #0,r2 | |
13 | + mov.l #0,r3 | |
14 | + mov.l #0,r4 | |
15 | + mov.l #0,r5 | |
16 | + mov.l #__NR_clone,r15 | |
14 | 17 | int #0x08 |
15 | 18 | cmp #-4096,r1 |
16 | 19 | bc 1f /* errno < 0 && errno >=4096 */ |
17 | - jmp r2 | |
18 | -1: mov.l r2,[-r0] | |
20 | + jmp r14 | |
21 | +1: mov.l r14,[-r0] | |
19 | 22 | bra __syscall_error |
20 | 23 | |
21 | 24 | weak_alias(__vfork,vfork) |