On 11/23/2009 05:58 PM, yunfeng zhang wrote:
next:
pop %ebx //<< A.
...
movl new_offset(%ebx), %eax //<< B. load global variable foo to eax.
...
.global foo //<< C.
OK!, to ld, offsetof(C - A) is const...
Your premise is wrong right there. C-A is *not* a constant. That's why we used a load from memory. If it had been a constant then B would have been:
leal f...@gotoff(%ebx), %eax r~
