This is the mail archive of the 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: RFC: Should AArch64 *_NC relocs complain on overflow ?

Hi Richard,

>> +		 Try to catch this situation here and provide a more helpful
>> +		 error message to the user.  */
>> +	      if (addend & ((1 << howto->rightshift) - 1)
>> +		  /* FIXME: Are we testing all of the appropriate reloc
>> +		     types here ?  */
>> +		  && (real_r_type == BFD_RELOC_AARCH64_LDST16_LO12
>> +		      || real_r_type == BFD_RELOC_AARCH64_LDST32_LO12
>> +		      || real_r_type == BFD_RELOC_AARCH64_LDST64_LO12
>> +		      || real_r_type == BFD_RELOC_AARCH64_LDST128_LO12))
> Those are checking relocations (don't have _NC in the name), so I'd
> expect that they already check alignment as part of their standard
> overflow test (if they don't that's probably a different bug).

Actually they are not.  Despite their names, they are actually non-checking
relocations.  (Check the complain_on_overflow field if you do not believe me).
This confused me for a long time.  There is a terrible dichotomy between the
BFD_RELOC_* names and the R_AARCH64_ names and it really would be a good idea
to tidy this whole mess one day.


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