Hi,
I have the following code compiled and run on a Intel Xeon system with Linux
OS.
void func(int a, int b, int c) {
char buffer1[5]="sabu";
char buffer2[10]="opensave1";
sleep(20);
}
int main() {
func(1,2,3);
}
Now using gdb I see that the prolog of function "func" is as follows :-
push %ebp
mov %esp,%ebp
sub $0x28,%esp
What I cannot understand is why 28 is subtracted from esp ?? I understand
memory alignment is done here but why 28 ?? I thought it should be 20 ..or
is it bcoz it is Intel Xeon ? what is the logic behind subtracting 28 ?
More info I received from gdb is :-
ebp = 0xbfffd5b8
esp = 0xbfffd580
0xbfffd5a0 -> "sabu"
0xbfffd590 -> "opensave1"
thanks,
Sabu


