This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: [PATCH, AVR] Allow avr25 to wraparound for the R_AVR_13_PCREL reloc
- From: "Weddington, Eric" <eweddington at cso dot atmel dot com>
- To: <binutils at sourceware dot org>, "Tristan Gingold" <gingold at adacore dot com>
- Cc: "Anatoly Sokolov" <aesok at post dot ru>, "Denis Chertykov" <chertykov at gmail dot com>, "Joerg Wunsch" <joerg_wunsch at uriah dot heep dot sax dot de>
- Date: Fri, 30 Jan 2009 15:52:30 -0700
- Subject: RE: [PATCH, AVR] Allow avr25 to wraparound for the R_AVR_13_PCREL reloc
> -----Original Message-----
> From: Weddington, Eric
> Sent: Friday, January 30, 2009 3:49 PM
> To: binutils@sourceware.org; 'Tristan Gingold'
> Cc: 'Anatoly Sokolov'; Denis Chertykov; Joerg Wunsch
> Subject: [PATCH, AVR] Allow avr25 to wraparound for the
> R_AVR_13_PCREL reloc
>
> Hi,
>
> It seems there is an error with the R_AVR_13_PCREL reloc. The
> current code allows the avr2 and avr4 architectures to wrap
> around. But it seems the avr25 architecture was not added to
> this list when the architecture was created. The avr25 is the
> same as the avr2 plus two additional instructions. The patch
> below fixes this.
>
> I need permission from a maintainer to commit. Tristan, I'd
> also like permission to commit this to the 2.19 branch.
>
> Thanks,
> Eric Weddington
>
Forgot the Changelog entry:
/bfd:
2009-01-30 Eric B. Weddington <eric.weddington@atmel.com>
* elf32-avr.c (avr_final_link_relocate): Allow avr25 to
wraparound.
> --- bfd/elf32-avr.c.old 2009-01-30 14:41:41.012833400 -0700
> +++ bfd/elf32-avr.c 2009-01-30 14:43:19.721643700 -0700
> @@ -854,10 +854,11 @@ avr_final_link_relocate (reloc_howto_typ
> {
> /* Relative distance is too large. */
>
> - /* Always apply WRAPAROUND for avr2 and avr4. */
> + /* Always apply WRAPAROUND for avr2, avr25, and avr4. */
> switch (bfd_get_mach (input_bfd))
> {
> case bfd_mach_avr2:
> + case bfd_mach_avr25:
> case bfd_mach_avr4:
> break;
>
>