binutils development (was Re: Problems building binutils-000220snapshot)
Tue Feb 22 21:55:00 GMT 2000
On Tue, 22 Feb 2000, H . J . Lu wrote:
> On Wed, Feb 23, 2000 at 11:15:51AM +1030, Alan Modra wrote:
> > >
> > > Why is 64k? It is 16bit relocation. You should be able to go both
> > > directions.
> > That's right, in 16-bit mode you should be able to jump from any point in
> > the 64K address space to any other point. The three little test files
> From what I see in the Intel ia32 instruction manual, it says
> rel16 is signed 16bit value and it is encoded in 2 byes. How can
> that be 64K in either direction?
Because the address space is only 64K (ignoring segments). It's true that
the offset is signed, and a jump from 0 to 0xe003 has a rel16 offset of
-0x2000. The bfd reloc code will complain in this case though as it sees
an offset of +0xe000, which is outside the signed 16 bit range.
More information about the Binutils