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