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 ?

On 08/02/16 16:36, Nick Clifton wrote:
> 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.
> Cheers
>   Nick

Nevertheless, it's still not a complete list of the names.   For that
you'll need to work through the AAELF64 spec.  Sadly, this isn't all
that explicit as it's sometimes in the textual summary for a group and
sometimes specified for a particular relocation.


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