I know .int
and .long
occupy 4 bytes
, and I should use movl
. But what is the like 0x20, 0x30, 0x40, 0x2c
? It's dirty data?
.section .data
iary:
.int 1, 2
lary:
.long 3, 4
.section .text
.globl _start
_start:
movq $0, %rdi
movq iary(, %rdi, 4), %rcx # $rcx = 0x200000001
movq $1, %rdi
movq iary(, %rdi, 4), %rcx # $rcx = 0x300000002
#===============================
movq $0, %rdi
movq lary(, %rdi, 4), %rcx # $rcx = 0x400000003
movq $1, %rdi
movq lary(, %rdi, 4), %rcx # $rcx = 0x2c00000004
movq $60, %rax
syscall