This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: binutils development (was Re: Problems building binutils-000220 snapshot)


On Wed, Feb 23, 2000 at 04:25:52PM +1030, Alan Modra wrote:
> 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.
> 

I remember it now. Ian, I believe at one time 32bit ia32 relocation
was screwed up due to some "cleanup" because of this.


H.J.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]