This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: C6X new PCR relocs


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

Attachment: pcr-reloc-src3.diff
Description: Text document


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