This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Writing addend into instructions
Torbjorn Granlund writes:
> 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".
There needn't be any high part to carry into.
> Could you please give me an example, preferably for ELF/PowerPC, where
> something depends on that the addend is written into the relocation
> field?
I know of none, but that doesn't help: surely if you want to remove a
feature you have to show that no-one uses it.
Andrew.