cuando compilo este pedazo de códigoGCC hotpatching?
unsigned char A[] = {1, 2, 3, 4};
unsigned int
f (unsigned int x)
{
return A[x];
}
salidas gcc
mov edi, edi
movzx eax, BYTE PTR A[rdi]
ret
en una máquina x86_64.
La pregunta es: ¿por qué hay una instrucción nop (mov edi, edi) allí?
Estoy usando gcc-4.4.4.
Naturalmente, ¡solo se trata de ofuscar el código! –