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: Patch H8300/S Bit Instruction Relaxing



  In message <A191B1036355D3119ABC0000E8E3B2F16A52@SERVER01>you write:
  > 
  > 
  > -----Original Message-----
  >  In message <A191B1036355D3119ABC0000E8E3B2F16A50@SERVER01>you write:
  >   > Regarding the concern that a :8 memory reference at 'FF02 could as a
  > result
  >   > of the text segment relaxing move outside of the 'FF00-'FFFF (eight bit
  >   > area),
  >   > I offer these reasons why it is unlikely to occur.
  > Unlikely is not good enough.  It must not ever happen, you must be able to 
  > prove it can not happen.  And my recollection is that it can happen (i wrot
  > e
  > the code in question).
  > 
  > jeff
  > 
  > Jeff,
  > 
  > I an unfamiliar with the inner workings of the linker, can you help with th
  > e
  > following. 
  > 
  > The trivial case when a memory reference is defined for the linker 
  > eg _FirstEightbitAddr = 0xFFFF00
  > can always be relaxed, as the memory reference is unaffected by the
  > relaxing.
  > Question Does the linker know that the memory reference is fixed?
  > 
  > A memory reference in a non code section, with a fixed starting address 
  > is also unaffected by relaxing. Question Can the linker determine this for 
  > a
Remember, by default the data immediately follows text.

Now consider the case where some hunk of data ended up located at 0xffff02
and we relaxed it to an 8 bit addressing mode.

Then consider what happens if relaxing shrunk the size of the text segment
by 0x100 bytes.  At that point the hunk of data is at 0xfffe02 and is not
suitable for 8 bit addressing and you lose, badly.


jeff


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