[Beginner] disassembling gcc 3.4 and 4.1

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

 



Hi all,

Looking for info about buffer overflow, i've found something quite
strange which is obviously due to my lack of knowledge.
I'm actually using a debian etch with both gcc 4.1.2 and 3.4.6

Why are they some differents version of gcc not working the same way
when pointer calculations ?

let's take this simple example : 
        char array[1]

Disassembling this code is giving me the following information about how
much %esp register is substracted :

gcc 3.4.6 does calculate 4 bytes ( SUB $ 0x4, %esp )
gcc 4.1.2 does calculate 16 bytes to be substracted to %esp register
( SUB $ 0x10, %esp )

Why is there a difference between 3.4.6 and 4.1.2 gcc version ?
Despite my efforts understanding this, i would appreciate any links
regarding any document related to this.
Thanks in advance.
Regards,
Pierre



[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