When I compile a simple C code into assembler (x86-64 under gcc, but it doesn't matter), the labels corresponding to the C functions each have the same construction :
void foo() {
}
Is compiled in :
foo:
push rbp
mov rbp, rsp
nop
pop rbp
ret
Why? This function does nothing. I thought I understood that these assembler instructions are "stack pointers". But I still don't grasp their uses in the program. Could you explain that to me?