Hi guys,
Compiling the following C snippet with gcc -S....
Code:
unsigned char test_variable=0;
int main()
{
test_variable=0xFF;
return 0;
}
...gave me that:
Code:
.file "test_1.c"
.globl _test_variable
.bss
_test_variable:
.space 1
.def ___main; .scl 2; .type 32; .endef
.text
.globl _main
.def _main; .scl 2; .type 32; .endef
_main:
leal 4(%esp), %ecx
andl $-16, %esp
pushl -4(%ecx)
pushl %ebp
movl %esp, %ebp
pushl %ecx
subl $4, %esp
call ___main
movb $-1, _test_variable
movl $0, %eax
addl $4, %esp
popl %ecx
popl %ebp
leal -4(%ecx), %esp
ret
Does this help at all?
Thanks.