repo.or.cz
/
neatlibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
stdlib: fix the return value of exit()
[neatlibc.git]
/
syscall.s
blob
4e6d5ca5c9f4d660540f43a1751a11d1c1e3df8b
1
format ELF
2
3
__syscall
:
4
push ebp
5
mov ebp
,
esp
6
7
push ebx
8
push edi
9
push esi
10
11
mov ebx
, [
ebp+
8
]
12
mov ecx
, [
ebp+
12
]
13
mov edx
, [
ebp+
16
]
14
mov esi
, [
ebp+
20
]
15
mov edi
, [
ebp+
24
]
16
mov ebp
, [
ebp+
28
]
17
18
int
0x80
19
20
cmp
eax
, -
125
21
jb done
22
neg
eax
23
mov
[
errno
],
eax
24
mov eax
, -
1
25
done
:
26
pop esi
27
pop edi
28
pop ebx
29
pop ebp
30
ret
31
32
errno dd
0
33
public errno
34
35
public _exit
36
_exit
:
37
mov eax
,
1
38
jmp __syscall
39
40
public fork
41
fork
:
42
mov eax
,
2
43
jmp __syscall
44
45
public read
46
read
:
47
mov eax
,
3
48
jmp __syscall
49
50
public write
51
write
:
52
mov eax
,
4
53
jmp __syscall
54
55
public open
56
open
:
57
mov eax
,
5
58
jmp __syscall
59
60
public close
61
close
:
62
mov eax
,
6
63
jmp __syscall
64
65
public waitpid
66
waitpid
:
67
mov eax
,
7
68
jmp __syscall
69
70
public creat
71
creat
:
72
mov eax
,
8
73
jmp __syscall
74
75
public link
76
link
:
77
mov eax
,
9
78
jmp __syscall
79
80
public unlink
81
unlink
:
82
mov eax
,
10
83
jmp __syscall
84
85
public execve
86
execve
:
87
mov eax
,
11
88
jmp __syscall
89
90
public chdir
91
chdir
:
92
mov eax
,
12
93
jmp __syscall
94
95
public time
96
time
:
97
mov eax
,
13
98
jmp __syscall
99
100
public mknod
101
mknod
:
102
mov eax
,
14
103
jmp __syscall
104
105
public chmod
106
chmod
:
107
mov eax
,
15
108
jmp __syscall
109
110
public lseek
111
lseek
:
112
mov eax
,
19
113
jmp __syscall
114
115
public getpid
116
getpid
:
117
mov eax
,
20
118
jmp __syscall
119
120
public mount
121
mount
:
122
mov eax
,
21
123
jmp __syscall
124
125
public umount
126
umount
:
127
mov eax
,
22
128
jmp __syscall
129
130
public setuid
131
setuid
:
132
mov eax
,
23
133
jmp __syscall
134
135
public getuid
136
getuid
:
137
mov eax
,
24
138
jmp __syscall
139
140
public utime
141
utime
:
142
mov eax
,
30
143
jmp __syscall
144
145
public access
146
access
:
147
mov eax
,
33
148
jmp __syscall
149
150
public
sync
151
sync
:
152
mov eax
,
36
153
jmp __syscall
154
155
public kill
156
kill
:
157
mov eax
,
37
158
jmp __syscall
159
160
public mkdir
161
mkdir
:
162
mov eax
,
39
163
jmp __syscall
164
165
public rmdir
166
rmdir
:
167
mov eax
,
40
168
jmp __syscall
169
170
public __dup as
'dup'
171
__dup
:
172
mov eax
,
41
173
jmp __syscall
174
175
public pipe
176
pipe
:
177
mov eax
,
42
178
jmp __syscall
179
180
public brk
181
brk
:
182
mov eax
,
45
183
jmp __syscall
184
185
public setgid
186
setgid
:
187
mov eax
,
46
188
jmp __syscall
189
190
public getgid
191
getgid
:
192
mov eax
,
47
193
jmp __syscall
194
195
public signal
196
signal
:
197
mov eax
,
48
198
jmp __syscall
199
200
public geteuid
201
geteuid
:
202
mov eax
,
49
203
jmp __syscall
204
205
public getegid
206
getegid
:
207
mov eax
,
50
208
jmp __syscall
209
210
public ioctl
211
ioctl
:
212
mov eax
,
54
213
jmp __syscall
214
215
public fcntl
216
fcntl
:
217
mov eax
,
55
218
jmp __syscall
219
220
public dup2
221
dup2
:
222
mov eax
,
63
223
jmp __syscall
224
225
public getppid
226
getppid
:
227
mov eax
,
64
228
jmp __syscall
229
230
public setsid
231
setsid
:
232
mov eax
,
66
233
jmp __syscall
234
235
public gettimeofday
236
gettimeofday
:
237
mov eax
,
78
238
jmp __syscall
239
240
public settimeofday
241
settimeofday
:
242
mov eax
,
79
243
jmp __syscall
244
245
public mmap
246
mmap
:
247
mov eax
,
192
248
jmp __syscall
249
250
public munmap
251
munmap
:
252
mov eax
,
91
253
jmp __syscall
254
255
public stat
256
stat
:
257
mov eax
,
106
258
jmp __syscall
259
260
public lstat
261
lstat
:
262
mov eax
,
107
263
jmp __syscall
264
265
public fstat
266
fstat
:
267
mov eax
,
108
268
jmp __syscall
269
270
public clone
271
clone
:
272
mov eax
,
120
273
jmp __syscall
274
275
public uname
276
uname
:
277
mov eax
,
122
278
jmp __syscall
279
280
public fchdir
281
fchdir
:
282
mov eax
,
133
283
jmp __syscall
284
285
public nanosleep
286
nanosleep
:
287
mov eax
,
162
288
jmp __syscall
289
290
public poll
291
poll
:
292
mov eax
,
168
293
jmp __syscall
294
295
public chown
296
chown
:
297
mov eax
,
182
298
jmp __syscall
299
300
public getcwd
301
getcwd
:
302
mov eax
,
183
303
jmp __syscall