C6X new PCR relocs

Bernd Schmidt bernds@codesourcery.com
Wed May 18 09:29:00 GMT 2011


On 05/17/2011 11:38 PM, Joseph S. Myers wrote:

>> + 	case BFD_RELOC_C6000_ABS_S16:
>> + 	case BFD_RELOC_C6000_ABS_L16:
>> + 	  new_reloc = BFD_RELOC_C6000_PCR_L16;
>> + 	  break;
>> + 
>> + 	case BFD_RELOC_C6000_ABS_H16:
>> + 	  new_reloc = BFD_RELOC_C6000_PCR_H16;
>> + 	  break;
>> + 
>> + 	default:
>> + 	  as_bad (_("$PCR_OFFSET not supported in this context"));
>> + 	  return;
> 
> Should have a testcase for the error here (for each context in which 
> $PCR_OFFSET isn't allowed, like reloc-bad-2.s).

Added to reloc-bad-2.s. I considered making a new testcase, but IMO it's
better to consistently test all of them in the same file.

> Also, since the 
> relocations are L16 and H16 (with, correspondingly, no overflow checking 
> possible) are you sure you want to allow the BFD_RELOC_C6000_ABS_S16 case?

TI's examples use mvk, and that requires allowing BFD_RELOC_C6000_ABS_S16.

Other points addressed too in the new version below.


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


More information about the Binutils mailing list