On Tuesday 30 October 2007 18:47:28 Jan Engelhardt wrote:
> Another cookie:
>
> int p = 0;
> int *x = &p;
>
> int main(void)
> {
> *p = 1337;
> }
>
> yields (for both 64-bit and 64-bit PIC):
>
> 400510: 48 8b 05 11 0b 20 00 mov 2099985(%rip),%rax
I try to avoid Intel assembly as much as possible, so I had to think about
this. But as I suspected, this is just "int *x = &p". Since in your other
examples you include the assignment of 1337, you need to add
movl $0x539,(rax)
to this as well. As far as I can see, that makes it an additional 6 bytes,
for a total of 13.
Anders
--
Madness takes its toll
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]