Re: newbie questiom about %rip in x86-64 and var



On 2006-03-21, Claudio Daffra <spamtrap@xxxxxxxxxx> wrote:
thx robert .

4004b0: c6 05 49 07 10 00 01 movb $0x1,1050441(%rip)
# 500c00 <uc>
4004b7: c6 05 42 07 10 00 01 movb $0x1,1050434(%rip)
# 500c00 <uc>

ok the offset change always.

the var is in virtual address 500c00 and rip is 4004b0 but
difficult i have mean the offset number

The 1050441 is not hex number, but regular decimal. So in your case to
caluculate the actual address you would do

1050441 + 0x4004b0 = 0x500bf9

which is 7 bytes away from 0x500c00, I guess this is the size of the
instruction.

Note. Why would you use segment:offset notation? In x86_64 there's no
such thing.


--
Minds, like parachutes, function best when open

.