im using FASM and this is my program
format ELF64
section '.text' executable
public func
func:
vmovaps ymm0, YWORD [.table]
xor rax, rax
ret
align 32
.table:
DQ 1024
DQ 1024
DQ 1024
DQ 1024
DQ 2048
DQ 2048
DQ 2048
DQ 2048
im using AVX so i created a table (which Must be aligned at 32-Byte Boundary) to initializing the ymm0 register. but when i try to compile this program, i get "section is not aligned enough" error from FASM. ".table" must be aligned at 32-Byte boundary because i am using "movaps" (or movdqa (no matter)). but why FASM gives me an error ? is it wrong to use 'align' like this?
UPDATE is it right to do something like this ? because by doing this, program works without any problem but is it a right way?
section '.text' executable
public func
func:
vmovaps ymm0, YWORD [.table]
xor rax, rax
ret
section '.rodata' align 32
.table:
DQ 1024
DQ 1024
DQ 1024
DQ 1024
DQ 2048
DQ 2048
DQ 2048
DQ 2048