1
2
3
4
5
6
7
8
9
10
11
12 #include <asm/cprefix.h>
13 #include <asm/ptrace.h>
14
15
16
17
18
19
20
21 .text
22 .align 4
23
24
25 .globl C_LABEL(sunos_getpid)
26 C_LABEL(sunos_getpid):
27 save %sp, -STACKFRAME_SZ, %sp
28 call C_LABEL(sys_getpid)
29 nop
30
31 mov %o0, %i0
32
33 call C_LABEL(sys_getppid)
34 nop
35
36 st %o0, [%fp + STACKFRAME_SZ + PT_I1]
37
38 ret
39 restore
40
41
42 .globl C_LABEL(sunos_getuid)
43 C_LABEL(sunos_getuid):
44 save %sp, -STACKFRAME_SZ, %sp
45 call C_LABEL(sys_getuid)
46 nop
47
48 mov %o0, %i0
49
50 call C_LABEL(sys_geteuid)
51 nop
52
53 st %o0, [%fp + STACKFRAME_SZ + PT_I1]
54
55 ret
56 restore
57
58
59 .globl C_LABEL(sunos_getgid)
60 C_LABEL(sunos_getgid):
61 save %sp, -STACKFRAME_SZ, %sp
62 call C_LABEL(sys_getgid)
63 nop
64
65 mov %o0, %i0
66
67 call C_LABEL(sys_getegid)
68 nop
69
70 st %o0, [%fp + STACKFRAME_SZ + PT_I1]
71
72 ret
73 restore
74
75
76
77
78 .globl C_LABEL(sunos_execv)
79 C_LABEL(sunos_execv):
80 save %sp, -STACKFRAME_SZ, %sp
81
82 st %g0, [%fp + STACKFRAME_SZ + PT_I2]
83 call C_LABEL(sparc_execve)
84 add %fp, STACKFRAME_SZ, %o0
85
86 st %o0, [%fp + STACKFRAME_SZ + PT_I1]
87
88 ret
89 restore
90