When I disassembly a binary (compiled with g++) with objdump, I often see "random" bytes at the end of the contained functions, such as:
4005a5: 66 66 2e 0f 1f 84 00 data32 nopw %cs:0x0(%rax,%rax,1)
4005ac: 00 00 00 00
What are those bytes? Why the compiler put them there?
EDIT: apparently those bytes represent a long NOP instruction put there by the compiler to keep functions 16-byte aligned. The weird thing is that the only function which is not 16-byte aligned is the main function. Are there any reasons?