diff options
author | JozanLeClerc <JozanLeClerc@noemail.net> | 2020-11-18 15:13:02 +0000 |
---|---|---|
committer | JozanLeClerc <JozanLeClerc@noemail.net> | 2020-11-18 15:13:02 +0000 |
commit | 9bc8ca088ab64fea2f815e1aa1971bdde23ef0d1 (patch) | |
tree | 5918dbfcabdbfca4daa25919da5224e30536a414 /src | |
parent | This is the beginning (diff) | |
download | bsdsetsid-9bc8ca088ab64fea2f815e1aa1971bdde23ef0d1.tar.gz bsdsetsid-9bc8ca088ab64fea2f815e1aa1971bdde23ef0d1.tar.bz2 bsdsetsid-9bc8ca088ab64fea2f815e1aa1971bdde23ef0d1.tar.xz bsdsetsid-9bc8ca088ab64fea2f815e1aa1971bdde23ef0d1.tar.zst bsdsetsid-9bc8ca088ab64fea2f815e1aa1971bdde23ef0d1.zip |
In progress
FossilOrigin-Name: ff7fff8d77d6179426bd8ca6c7585423605896e3
Diffstat (limited to 'src')
-rw-r--r-- | src/c_bsdsetsid.S | 9 | ||||
-rw-r--r-- | src/u_write.S | 14 |
2 files changed, 6 insertions, 17 deletions
diff --git a/src/c_bsdsetsid.S b/src/c_bsdsetsid.S index abf5afb..d9b1067 100644 --- a/src/c_bsdsetsid.S +++ b/src/c_bsdsetsid.S @@ -3,14 +3,17 @@ str: .asciz "a string\n" .text -.extern u_write .globl _start _start: + jmp c_main + +c_main: movq $0x1, %rdi leaq str, %rsi movq $0x9, %rdx - callq u_write - movq $0x1, %rax + movq $0x4, %rax + syscall xorq %rdi, %rdi + movq $0x1, %rax syscall diff --git a/src/u_write.S b/src/u_write.S deleted file mode 100644 index efd7b9c..0000000 --- a/src/u_write.S +++ /dev/null @@ -1,14 +0,0 @@ -.text -.globl u_write - -u_write: - movq $0x4, %rax - syscall - movq %rax, %rcx - jc u_err - movq %rcx, %rax - retq - -u_err: - movq $0xffffffffffffffff, %rax - retq |