Originally Posted by
ostapus
mmm, i see.. so, if we have
global struct
{
a, b
} mystruct ;
in binary that will be
mov eax, <absolute address> [a]
mov eax, <absolute address> [b]
is that correct ? not something like
mov edx, <absolute address> mystruct
mov eax, [edx+4] // as a
mov edx, [esdx+8] // as b
? lazy to check it myself )
The second. Maybe I am completly wrong but I think it should result in smaller code.
Code:
mov eax, <absolute address>
takes 5 Byte on 32bit systems.
should be smaller.
So every compiler picks it in the process of optimizing.