gcc generates unnecessary (?) instructions
问题 I decided to compile a very basic C program and take a look at the generated code with objdump -d . int main(int argc, char *argv[]) { exit(0); } After compiling it with gcc test.c -s -o test.o and then disassembling with objdump -d my text segment looked like this: Disassembly of section .text: 0000000000001050 <.text>: 1050: 31 ed xor %ebp,%ebp 1052: 49 89 d1 mov %rdx,%r9 1055: 5e pop %rsi 1056: 48 89 e2 mov %rsp,%rdx 1059: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 105d: 50 push %rax 105e: