Re: LinuxAsmTools Announcement
"pei lin" <[email protected]> Fri, 19 Dec 2008 13:10:07 +0800
| Newsgroups | org.kernel.vger.linux-assembly |
|---|---|
| Message-ID | <[email protected]> |
OH~~~ great,thx for u help,that really a tip. 2008/12/19 Brian Raiter <[email protected]>: >> when i disassemble *.o object file on x86 machine and find >> instruction "call 0xFCFFFFFF",because not link,but why this address >> 0xFCFFFFFF not 0xFFFFFFFF or others? > > First of all, the value is not 0xFCFFFFFF, it's 0xFFFFFFFC > (little-endian), which is the 32-bit equivalent of -4. > > And the reason for the -4 is that it's an offset. When the linker > fills in the real address, it will subtract the subroutine's absolute > address from the address of the -4 value to get a relative address, > which it will then add to the existing -4 to get the correct relative > address for the call instruction. And, the reason that 4 needs to be > subtracted is that when the call is executed, it will actually jump > from the end of the call instruction, which is 4 bytes ahead of where > the relative address is stored. > > b > >