OH~~~ great,thx for u help,that really a tip. 2008/12/19 Brian Raiter <breadbox@xxxxxxxxxxxxxx>: >> 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 > > -- To unsubscribe from this list: send the line "unsubscribe linux-assembly" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
- References:
- LinuxAsmTools Announcement
- From: jeff
- Re: LinuxAsmTools Announcement
- From: pei lin
- Re: LinuxAsmTools Announcement
- From: Brian Raiter
- LinuxAsmTools Announcement
- Prev by Date: Re: LinuxAsmTools Announcement
- Next by Date: asmutils-0.18 on i86_64
- Previous by thread: Re: LinuxAsmTools Announcement
- Next by thread: LinuxAsmTools Announcement
- Index(es):