some questions about gcc4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

I need some hints. I have compiled simple source:
(gdb) list
1	void main (void) {
2	  int i;
3	  i = 1;
4	}

And disassembling this code is:
Dump of assembler code for function main:
0x08048394 <main+0>:	push   ebp
0x08048395 <main+1>:	mov    ebp,esp
0x08048397 <main+3>:	sub    esp,0x10
0x0804839a <main+6>:	mov    DWORD PTR [ebp-0x4],0x1
0x080483a1 <main+13>:	leave  
0x080483a2 <main+14>:	ret    
End of assembler dump.


I have only 1 int variable. My system is 32Bit. But why for 1 int
variable compiler make sub esp,0x10 ?
1 int variable located in 4 bytes. What in another 12 ?


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux