This is the mail archive of the binutils@sources.redhat.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: Writing addend into instructions


Andrew Haley <aph@redhat.com> writes:

   > Hmm.  A toolchain that bases a relocation on such a value surely will
   > not work.  Consider a typical RISC sethi/oris/ldah type instruction.
   > If you put an addend that is smaller than a full address into its
   > (say) 16-bit field, and then let that take part of a relocation, you
   > lose carry.
  
  Certainly, but the relocation might be to somwhere known to be on the
  same page, in which case there needn't be any high part.  I'm not
  saying that it's common, but there might be uses for it.
  
You probably mean "needn't be any low part".

Could you please give me an example, preferably for ELF/PowerPC, where
something depends on that the addend is written into the relocation
field?

-- 
Torbjörn


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