.section .data
align_data:
.align 4
.int 0x11111111, 0x22222222, 0x33333333, 0x44444444
align_data2:
.align 2
.byte 0x11, 0x22, 0x33, 0x44
unalign_data:
.int 0x33333333, 0x44444444
unalign_data2:
.byte 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88
.section .text
.globl _start
_start:
movdqa align_data, %xmm0
movdqu unalign_data, %xmm1
movl $1, %eax
int $0x80
I can't figure out why this error happens. I think I have defined 'align_data' properly with 128-bit size, but when I ran it in gdb, it gives me this:
Program received signal SIGSEGV, Segmentation fault.
_start () at sse.s:15
15 movdqa align_data, %xmm0
If I include mov $0, %ebx
in the code, it runs without crashing, but why would that matter?
assembly and linking command:as -g -o sse.o sse.s && ld -o sse sse.o
assembler version:
GNU assembler version 2.27 (x86_64-redhat-linux) using BFD version version 2.27-43.base.el7_8.1
linker version:
GNU ld version 2.27-43.base.el7_8.1