Re: LinuxAsmTools Announcement

Brian Raiter <[email protected]>
Newsgroups gmane.linux.assembly
Message-ID <[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

--
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.