elf: correctly load data segment

This commit is contained in:
Michael Shaw 2023-11-22 20:15:24 -05:00
commit 271d9a1fea
3 changed files with 24 additions and 5 deletions

View file

@ -9,9 +9,14 @@ sys_exit = 60
.global _start
_start:
movq $0x123456, %rdi
movq test_var, %rdi
movq $sys_exit, %rax
int $0x80
_no_exit:
movq $0, %rbx
jmp _no_exit
.data
test_var:
.long 0xfeedbeef
.long 0xdeadbeef