C6X new PCR relocs

Bernd Schmidt bernds@codesourcery.com
Tue May 17 16:03:00 GMT 2011


This adds support for the PCR_[LH]16 relocs. The description from TI is
as follows:

- Always RELA
- The addend (A) encodes the offset between the current fetch packet
  and an unnamed 'base' label
- The result is the offset between the target symbol and the fetch
  packet of the base label

R = S - FP(FP(PC) - A)

(where PC is the address of the relocation and FP(x) is the address of
the fetch packet containing x)

I have a modified version of gcc that uses this for casesi patterns, and
that seems to work, but I'd still welcome a second pair of eyes to
verify that I've gotten these calculations right and the testcase output
makes sense.
In gas, I've added these relocs to tic6x_fix_adjustable since the addend
is special.


Bernd
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pcr-reloc-src.diff
URL: <https://sourceware.org/pipermail/binutils/attachments/20110517/328cc006/attachment.ksh>


More information about the Binutils mailing list