-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathuname.S
More file actions
40 lines (30 loc) · 738 Bytes
/
Copy pathuname.S
File metadata and controls
40 lines (30 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.lcomm sysname, UTSNAME_SIZE
.lcomm sysname_length, 8
.lcomm hostname, UTSNAME_SIZE
.lcomm hostname_length, 8
.lcomm release, UTSNAME_SIZE
.lcomm release_length, 8
.lcomm machine, UTSNAME_SIZE
.lcomm machine_length, 8
.lcomm utsname, UTSNAME_SIZE * 6
uname:
mov rax, SYS_UNAME
mov rdi, offset utsname
syscall
mov rsi, offset utsname
mov rdi, offset sysname
call copy
mov sysname_length, rcx
mov rsi, offset utsname + UTSNAME_SIZE
mov rdi, offset hostname
call copy
mov hostname_length, rcx
mov rsi, offset utsname + UTSNAME_SIZE * 2
mov rdi, offset release
call copy
mov release_length, rcx
mov rsi, offset utsname + UTSNAME_SIZE * 4
mov rdi, offset machine
call copy
mov machine_length, rcx
ret