This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: Should AArch64 *_NC relocs complain on overflow ?
- From: Nick Clifton <nickc at redhat dot com>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>
- Cc: Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 8 Feb 2016 16:40:27 +0000
- Subject: Re: RFC: Should AArch64 *_NC relocs complain on overflow ?
- Authentication-results: sourceware.org; auth=none
- References: <87a8nb7bk8 dot fsf at redhat dot com> <ADC64823-9296-45C9-BCED-FFDC03CA29BB at arm dot com> <56B88C97 dot 6090308 at redhat dot com> <n99mvrb5ote dot fsf at foss dot arm dot com>
Hi Jiong,
> + /* 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))
>
>
> Some GOT relocation types will cause the same error.
Do you have a testcase that can demonstrate this ?
> Therefore, I think relocation against unaligned value can origin from
> various reasons.
True - that is why I used "Possibly" at the start of the warning message.
Ie the message is only a suggestion, not a guarantee.
IMHO, the safest way is, in
> "_bfd_aarch64_elf_put_addend", we return something like
> "bfd_reloc_unaligned" which is an general warning, something like
> "relocation against unaligned value warning."