elf: correctly load data segment
This commit is contained in:
parent
abbad89d7f
commit
271d9a1fea
3 changed files with 24 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue