Why does GCC on x86-64 insert a NOP inside of a function?
问题 Given the following C function: void go(char *data) { char name[64]; strcpy(name, data); } GCC 5 and 6 on x86-64 compile (plain gcc -c -g -o followed by objdump ) this to: 0000000000000000 <go>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 48 83 ec 50 sub $0x50,%rsp 8: 48 89 7d b8 mov %rdi,-0x48(%rbp) c: 48 8b 55 b8 mov -0x48(%rbp),%rdx 10: 48 8d 45 c0 lea -0x40(%rbp),%rax 14: 48 89 d6 mov %rdx,%rsi 17: 48 89 c7 mov %rax,%rdi 1a: e8 00 00 00 00 callq 1f <go+0x1f> 1f: 90 nop 20: c9 leaveq 21: