I wonder if it is unaligned access in code like this:
section .text
global _start
_start:
mov eax, [arr + 1]
section .data
arr: db 1, 2, 3, 4, 5, 6, 7
I wonder if it is unaligned access in code like this:
section .text
global _start
_start:
mov eax, [arr + 1]
section .data
arr: db 1, 2, 3, 4, 5, 6, 7
Typical section alignment is 1000h, at least in PortableExecutables. When your program is linked and loaded to memory, the virtual address of section .data will be aligned, so the first data arr is aligned as well.
Loading a register from address mov eax, [arr + 1] is unaligned, of course, but it will work anyway, though not as fast as mov eax, [arr] would do.