I am looking into assembly code generated by GCC. But I don\'t understand:
movl $0x2d, 0x4(%esp)
In the second operand, what does 0x4
0x4
0x4(%esp) means *(%esp + 4) where * mean dereferencing.
0x4(%esp)
*(%esp + 4)
*
The statement means store the immediate value 0x2d into some local variable occupying the 4th offset on the stack.
(The code you've shown is in AT&T syntax. In Intel syntax it would be mov [esp, 4], 2dh)
mov [esp, 4], 2dh