]> git.pld-linux.org Git - packages/crossavr-binutils.git/commitdiff
- 2.23.1 auto/th/crossavr-binutils-2.23.1-1
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 12 Jun 2013 11:23:49 +0000 (13:23 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Wed, 12 Jun 2013 11:23:49 +0000 (13:23 +0200)
- updated to Atmel official AVR8-GNU toolchain version 3.4.2

71 files changed:
001-xmega-Makefile_am-typo.patch [new file with mode: 0644]
002-tinycore-support.patch [new file with mode: 0644]
003-RMW-insn-constriant.patch [new file with mode: 0644]
004-new-part-supports.patch [new file with mode: 0644]
005-additional-part-supports.patch [new file with mode: 0644]
006-xmega-showuage-typo.patch [new file with mode: 0644]
007-ata6289-architecture-correction.patch [moved from 505-binutils-avrtc446.patch with 60% similarity]
008-add-usersig-section.patch [new file with mode: 0644]
009-dwarf-relax-fix.patch [new file with mode: 0644]
010-disable-demand-paging.patch [new file with mode: 0644]
200-binutils-avr-size.patch [moved from 300-binutils-avr-size.patch with 72% similarity]
201-binutils-dwarf2-AVRStudio-workaround.patch [moved from 303-binutils-dwarf2-AVRStudio-workaround.patch with 80% similarity]
202-binutils-bug13113.patch [new file with mode: 0644]
301-binutils-avr-coff.patch [deleted file]
302-binutils-as-dwarf.patch [deleted file]
304-binutils-bug13113.patch [deleted file]
305-binutils-new-usb-insns.patch [deleted file]
306-binutils-bug15573-AVRTC-419.patch [deleted file]
307-binutils-fix-AVRTC-424.patch [deleted file]
400-binutils-atmxt336s.patch [moved from 420-binutils-atmxt336s.patch with 56% similarity]
400-binutils-xmega.patch [deleted file]
401-binutils-atmega48hvf.patch [new file with mode: 0644]
401-binutils-avrtiny10.patch [deleted file]
402-binutils-at90pwm161.patch [deleted file]
402-binutils-atmega26hvg.patch [new file with mode: 0644]
403-binutils-atmxt224_224e.patch [moved from 425-binutils-atmxt224_224e.patch with 55% similarity]
403-binutils-new-devices.patch [deleted file]
404-binutils-atmxt112sl.patch [new file with mode: 0644]
404-binutils-attiny1634.patch [deleted file]
405-binutils-atmega48pa.patch [deleted file]
405-binutils-atmxt540s.patch [new file with mode: 0644]
406-binutils-ata5831.patch [moved from 434-binutils-ata5831.patch with 75% similarity]
406-binutils-atxmega_16_32_a4u.patch [deleted file]
407-binutils-attiny841.patch [moved from 435-binutils-attiny841.patch with 69% similarity]
407-binutils-atxmega64_128_192_256a3u.patch [deleted file]
408-binutils-atmegarfa2.patch [new file with mode: 0644]
408-binutils-atmegarfr2_a2.patch [deleted file]
409-binutils-ata5790n.patch [new file with mode: 0644]
409-binutils-atmega165pa.patch [deleted file]
410-binutils-atmega64hve2.patch [new file with mode: 0644]
410-binutils-atxmega384c3.patch [deleted file]
411-binutils-attiny474.patch [new file with mode: 0644]
412-binutils-atmxts200.patch [new file with mode: 0644]
412-binutils-atxmega128a4u.patch [deleted file]
413-binutils-atxmega64d4.patch [deleted file]
414-binutils-atmega164pa_168pa_32a_64a.patch [deleted file]
415-binutils-atxmega64_128_b3.patch [deleted file]
416-binutils-atxmega64b1.patch [deleted file]
417-binutils-atmega_8a_128a_1284.patch [deleted file]
418-binutils-atxmega64a4u.patch [deleted file]
419-binutils-atxmega128d4.patch [deleted file]
421-binutils-atxmega16c4_32c4_128c3_256c3.patch [deleted file]
422-binutils-atxmega384d3.patch [deleted file]
423-binutils-atmega48hvf.patch [deleted file]
424-binutils-atmega26hvg.patch [deleted file]
426-binutils-atxmega192c3.patch [deleted file]
427-binutils-atmxt112sl.patch [deleted file]
428-binutils-atxmega64c3.patch [deleted file]
429-binutils-ata6285_6286.patch [deleted file]
430-binutils-attiny828.patch [deleted file]
431-binutils-ata5790_5790N_5795.patch [deleted file]
432-binutils-ata5272_5505.patch [deleted file]
433-binutils-atmxt540s.patch [deleted file]
436-binutils-atxmega32_16_8e5.patch [deleted file]
500-binutils-avrtc530-backported.patch [new file with mode: 0644]
500-binutils-bug13789.patch [deleted file]
501-binutils-modify-usb-xmega-isa.patch [deleted file]
502-binutils-add-config-section-tiny.patch [deleted file]
503-binutils-avrtc193-tiny.patch [deleted file]
504-binutils-avrtc530-backported.patch [deleted file]
crossavr-binutils.spec

diff --git a/001-xmega-Makefile_am-typo.patch b/001-xmega-Makefile_am-typo.patch
new file mode 100644 (file)
index 0000000..9e6e965
--- /dev/null
@@ -0,0 +1,23 @@
+--- ld/Makefile.am     2012-08-23 11:16:38.000000000 +0530
++++ ld/Makefile.am     2012-08-24 15:39:45.000000000 +0530
+@@ -165,13 +165,13 @@ ALL_EMULATION_SOURCES = \
+       eavr5.c \
+       eavr51.c \
+       eavr6.c \
+-      eavrxmega1.o \
+-      eavrxmega2.o \
+-      eavrxmega3.o \
+-      eavrxmega4.o \
+-      eavrxmega5.o \
+-      eavrxmega6.o \
+-      eavrxmega7.o \
++      eavrxmega1.c \
++      eavrxmega2.c \
++      eavrxmega3.c \
++      eavrxmega4.c \
++      eavrxmega5.c \
++      eavrxmega6.c \
++      eavrxmega7.c \
+       ecoff_i860.c \
+       ecoff_sparc.c \
+       ecrisaout.c \
diff --git a/002-tinycore-support.patch b/002-tinycore-support.patch
new file mode 100644 (file)
index 0000000..5cd3b9b
--- /dev/null
@@ -0,0 +1,702 @@
+diff -Naurp bfd/archures.c bfd/archures.c
+--- bfd/archures.c     2012-09-04 18:23:41.000000000 +0530
++++ bfd/archures.c     2012-12-21 14:14:42.000000000 +0530
+@@ -391,6 +391,7 @@ DESCRIPTION
+ .#define bfd_mach_avr5                5
+ .#define bfd_mach_avr51               51
+ .#define bfd_mach_avr6                6
++.#define bfd_mach_avrtiny   90
+ .#define bfd_mach_avrxmega1 101
+ .#define bfd_mach_avrxmega2 102
+ .#define bfd_mach_avrxmega3 103
+diff -Naurp bfd/cpu-avr.c bfd/cpu-avr.c
+--- bfd/cpu-avr.c      2012-01-31 23:24:35.000000000 +0530
++++ bfd/cpu-avr.c      2012-12-21 14:14:42.000000000 +0530
+@@ -135,24 +135,27 @@ static const bfd_arch_info_type arch_inf
+   /* 3-Byte PC.  */
+   N (22, bfd_mach_avr6, "avr:6", FALSE, & arch_info_struct[10]),
+-  
++
++  /* Tiny core (ATTiny10 & similar) */
++  N (16, bfd_mach_avrtiny, "avr:90", FALSE, & arch_info_struct[11]),
++
+   /* Xmega 1 */
+-  N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[11]),
++  N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[12]),
+   /* Xmega 2 */
+-  N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[12]),
++  N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[13]),
+   
+   /* Xmega 3 */
+-  N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[13]),
++  N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[14]),
+   
+   /* Xmega 4 */
+-  N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[14]),
++  N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[15]),
+   
+   /* Xmega 5 */
+-  N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[15]),
++  N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[16]),
+   
+   /* Xmega 6 */
+-  N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[16]),
++  N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[17]),
+   
+   /* Xmega 7 */
+   N (24, bfd_mach_avrxmega7, "avr:107", FALSE, NULL)
+diff -Naurp bfd/elf32-avr.c bfd/elf32-avr.c
+--- bfd/elf32-avr.c    2012-07-25 03:14:44.000000000 +0530
++++ bfd/elf32-avr.c    2012-12-21 14:14:42.000000000 +0530
+@@ -559,6 +559,20 @@ static reloc_howto_type elf_avr_howto_ta
+        0xffffff,              /* src_mask */
+        0xffffff,              /* dst_mask */
+        FALSE),                /* pcrel_offset */
++  /* 7 bit immediate for LDS/STS in Tiny core */
++  HOWTO (R_AVR_7_LDS16,         /* type */
++         0,                     /* rightshift */
++         1,                     /* size (0 = byte, 1 = short, 2 = long) */
++         7,                     /* bitsize */  
++         FALSE,                 /* pc_relative */
++         0,                     /* bitpos */
++         complain_overflow_dont,/* complain_on_overflow */
++         bfd_elf_generic_reloc, /* special_function */
++         "R_AVR_7_LDS16",       /* name */
++         FALSE,                 /* partial_inplace */
++         0xffff,                /* src_mask */
++         0xffff,                /* dst_mask */
++         FALSE),                /* pcrel_offset */
+ };
+ /* Map BFD reloc types to AVR ELF reloc types.  */
+@@ -600,7 +614,8 @@ static const struct avr_reloc_map avr_re
+   { BFD_RELOC_8,                    R_AVR_8 },
+   { BFD_RELOC_AVR_8_LO,             R_AVR_8_LO8 },
+   { BFD_RELOC_AVR_8_HI,             R_AVR_8_HI8 },
+-  { BFD_RELOC_AVR_8_HLO,            R_AVR_8_HLO8 }
++  { BFD_RELOC_AVR_8_HLO,            R_AVR_8_HLO8 },
++  { BFD_RELOC_AVR_7_LDS16,          R_AVR_7_LDS16 }
+ };
+ /* Meant to be filled one day with the wrap around address for the
+@@ -1131,6 +1146,17 @@ avr_final_link_relocate (reloc_howto_typ
+       bfd_put_16 (input_bfd, (bfd_vma) srel & 0xffff, contents+2);
+       break;
++    case R_AVR_7_LDS16:
++      contents += rel->r_offset;
++      srel = (bfd_signed_vma) relocation + rel->r_addend;
++      if ((srel & 0xFFFF) < 0x40 || (srel & 0xFFFF) > 0xbf)
++        return bfd_reloc_outofrange;
++      srel = srel & 0x7f;
++      x = bfd_get_16 (input_bfd, contents);
++      x |= (srel & 0x0f) | ((srel & 0x30) << 5) | ((srel & 0x40) << 2);
++      bfd_put_16 (input_bfd, x, contents);
++      break;
++
+     case R_AVR_16_PM:
+       use_stubs = (!htab->no_stubs);
+       contents += rel->r_offset;
+@@ -1372,6 +1398,10 @@ bfd_elf_avr_final_write_processing (bfd 
+     case bfd_mach_avrxmega7:
+       val = E_AVR_MACH_XMEGA7;
+       break;
++
++    case bfd_mach_avrtiny:
++      val = E_AVR_MACH_AVRTINY;
++      break;
+     }
+   elf_elfheader (abfd)->e_machine = EM_AVR;
+@@ -1462,6 +1492,10 @@ elf32_avr_object_p (bfd *abfd)
+       case E_AVR_MACH_XMEGA7:
+         e_set = bfd_mach_avrxmega7;
+         break;
++
++      case E_AVR_MACH_AVRTINY:
++        e_set = bfd_mach_avrtiny;
++        break;
+       }
+     }
+   return bfd_default_set_arch_mach (abfd, bfd_arch_avr,
+diff -Naurp bfd/reloc.c bfd/reloc.c
+--- bfd/reloc.c        2012-09-04 18:23:42.000000000 +0530
++++ bfd/reloc.c        2012-12-21 14:14:42.000000000 +0530
+@@ -4409,6 +4409,11 @@ ENUM
+ ENUMDOC
+   This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
+   in .byte hlo8(symbol)
++ENUM
++  BFD_RELOC_AVR_7_LDS16
++ENUMDOC
++  This is a 7 bit reloc for the AVR that stores offset for 16bit sts/lds
++  instructions supported only by Tiny core
+ ENUM
+   BFD_RELOC_RL78_NEG8
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2012-06-11 19:56:41.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-21 14:14:42.000000000 +0530
+@@ -89,6 +89,7 @@ static struct mcu_type_s mcu_types[] =
+   {"avrxmega5",  AVR_ISA_XMEGA,   bfd_mach_avrxmega5},
+   {"avrxmega6",  AVR_ISA_XMEGA,   bfd_mach_avrxmega6},
+   {"avrxmega7",  AVR_ISA_XMEGA,   bfd_mach_avrxmega7},
++  {"avrtiny",    AVR_ISA_AVRTINY, bfd_mach_avrtiny},
+   {"at90s1200",  AVR_ISA_1200,    bfd_mach_avr1},
+   {"attiny11",   AVR_ISA_AVR1,    bfd_mach_avr1},
+   {"attiny12",   AVR_ISA_AVR1,    bfd_mach_avr1},
+@@ -274,6 +275,12 @@ static struct mcu_type_s mcu_types[] =
+   {"atxmega256d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
+   {"atxmega128a1", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
+   {"atxmega128a1u", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
++  {"attiny4",      AVR_ISA_AVRTINY, bfd_mach_avrtiny},
++  {"attiny5",      AVR_ISA_AVRTINY, bfd_mach_avrtiny},
++  {"attiny9",      AVR_ISA_AVRTINY, bfd_mach_avrtiny},
++  {"attiny10",     AVR_ISA_AVRTINY, bfd_mach_avrtiny},
++  {"attiny20",     AVR_ISA_AVRTINY, bfd_mach_avrtiny},
++  {"attiny40",     AVR_ISA_AVRTINY, bfd_mach_avrtiny},
+   {NULL, 0, 0}
+ };
+@@ -455,6 +462,7 @@ md_show_usage (FILE *stream)
+       "                   avrxmega5 - XMEGA, > 64K, <= 128K FLASH, > 64K RAM\n"
+       "                   avrxmega6 - XMEGA, > 128K, <= 256K FLASH, <= 64K RAM\n"
+       "                   avrxmega7 - XMEGA, > 128K, <= 256K FLASH, > 64K RAM\n"
++      "                   avrtiny   - AVR Tiny core\n"
+       "                   or immediate microcontroller name.\n"));
+   fprintf (stream,
+       _("  -mall-opcodes    accept all AVR opcodes, even if not supported by MCU\n"
+@@ -803,6 +811,12 @@ avr_operand (struct avr_opcodes_s *opcod
+         str = input_line_pointer;
+       }
++      if (avr_mcu->mach == bfd_mach_avrtiny)
++        {
++          if (op_mask < 16 || op_mask > 31)
++            as_bad (_("register not supported"));
++        }
++
+       if (op_mask <= 31)
+       {
+         switch (*op)
+@@ -941,6 +955,12 @@ avr_operand (struct avr_opcodes_s *opcod
+                  &op_expr, FALSE, BFD_RELOC_16);
+       break;
++    case 'j':
++      str = parse_exp (str, &op_expr);
++      fix_new_exp (frag_now, where, opcode->insn_size * 2,
++                   &op_expr, FALSE, BFD_RELOC_AVR_7_LDS16);
++      break;
++
+     case 'M':
+       {
+       bfd_reloc_code_real_type r_type;
+@@ -1249,6 +1269,17 @@ md_apply_fix (fixS *fixP, valueT * valP,
+         bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value), where);
+         break;
++        case BFD_RELOC_AVR_7_LDS16:
++          if ((value < 0x40) || (value > 0xBF))
++            as_warn_where (fixP->fx_file, fixP->fx_line,
++                           _("operand out of range: 0x%lx"), 
++                           (unsigned long)value);
++          insn |= value & 0xF;
++          insn |= (value & 0x30) << 5;
++          insn |= (value & 0x40) << 2;
++          bfd_putl16 ((bfd_vma) insn, where);
++          break;
++
+       case BFD_RELOC_AVR_6:
+         if ((value > 63) || (value < 0))
+           as_bad_where (fixP->fx_file, fixP->fx_line,
+@@ -1448,6 +1479,28 @@ md_assemble (char *str)
+   opcode = (struct avr_opcodes_s *) hash_find (avr_hash, op);
++  if (opcode && !avr_opt.all_opcodes)
++    {
++      /* Check if the instruction's ISA bit is ON in the ISA bits of the part 
++         specified by the user. If not look for other instructions specifica-
++         -tions with same mnemonic who's ISA bits matches. 
++
++         This requires include/opcode/avr.h to have the instructions with
++         same mnenomic to be specified in sequence. */
++
++      while ((opcode->isa & avr_mcu->isa) != opcode->isa)
++        {
++          opcode++;
++     
++          if (opcode->name && strcmp(op, opcode->name))
++            {
++              as_bad (_("illegal opcode %s for mcu %s"), 
++                      opcode->name, avr_mcu->name);
++              return;
++            }
++        }
++    } 
++
+   if (opcode == NULL)
+     {
+       as_bad (_("unknown opcode `%s'"), op);
+@@ -1460,9 +1513,6 @@ md_assemble (char *str)
+   if (*str && *opcode->constraints == '?')
+     ++opcode;
+-  if (!avr_opt.all_opcodes && (opcode->isa & avr_mcu->isa) != opcode->isa)
+-    as_bad (_("illegal opcode %s for mcu %s"), opcode->name, avr_mcu->name);
+-
+   dwarf2_emit_insn (0);
+   /* We used to set input_line_pointer to the result of get_operands,
+diff -Naurp include/elf/avr.h include/elf/avr.h
+--- include/elf/avr.h  2012-05-16 20:22:16.000000000 +0530
++++ include/elf/avr.h  2012-12-21 14:14:42.000000000 +0530
+@@ -41,13 +41,14 @@
+ #define E_AVR_MACH_AVR5     5
+ #define E_AVR_MACH_AVR51   51
+ #define E_AVR_MACH_AVR6     6 
+-#define E_AVR_MACH_XMEGA1 101
+-#define E_AVR_MACH_XMEGA2 102
+-#define E_AVR_MACH_XMEGA3 103
+-#define E_AVR_MACH_XMEGA4 104
+-#define E_AVR_MACH_XMEGA5 105
+-#define E_AVR_MACH_XMEGA6 106
+-#define E_AVR_MACH_XMEGA7 107
++#define E_AVR_MACH_AVRTINY 90
++#define E_AVR_MACH_XMEGA1  101
++#define E_AVR_MACH_XMEGA2  102
++#define E_AVR_MACH_XMEGA3  103
++#define E_AVR_MACH_XMEGA4  104
++#define E_AVR_MACH_XMEGA5  105
++#define E_AVR_MACH_XMEGA6  106
++#define E_AVR_MACH_XMEGA7  107
+ /* Relocations.  */
+ START_RELOC_NUMBERS (elf_avr_reloc_type)
+@@ -81,6 +82,7 @@ START_RELOC_NUMBERS (elf_avr_reloc_type)
+      RELOC_NUMBER (R_AVR_8_LO8,                27)
+      RELOC_NUMBER (R_AVR_8_HI8,                28)
+      RELOC_NUMBER (R_AVR_8_HLO8,               29)
++     RELOC_NUMBER (R_AVR_7_LDS16,              30)
+ END_RELOC_NUMBERS (R_AVR_max)
+ #endif /* _ELF_AVR_H */
+diff -Naurp include/opcode/avr.h include/opcode/avr.h
+--- include/opcode/avr.h       2012-06-07 22:13:36.000000000 +0530
++++ include/opcode/avr.h       2012-12-21 14:14:42.000000000 +0530
+@@ -22,6 +22,7 @@
+ #define AVR_ISA_LPM   0x0002 /* device has LPM */
+ #define AVR_ISA_LPMX  0x0004 /* device has LPM Rd,Z[+] */
+ #define AVR_ISA_SRAM  0x0008 /* device has SRAM (LD, ST, PUSH, POP, ...) */
++#define AVR_ISA_TINY  0x0010 /* device has Tiny core specific encodings */
+ #define AVR_ISA_MEGA  0x0020 /* device has >8K program memory (JMP and CALL
+                               supported, no 8K wrap on RJMP and RCALL) */
+ #define AVR_ISA_MUL   0x0040 /* device has new core (MUL, FMUL, ...) */
+@@ -37,6 +38,7 @@
+ #define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
+ #define AVR_ISA_2xxx  (AVR_ISA_TINY1 | AVR_ISA_SRAM)
++#define AVR_ISA_2xxxa (AVR_ISA_1200 | AVR_ISA_SRAM)
+ /* For the attiny26 which is missing LPM Rd,Z+.  */
+ #define AVR_ISA_2xxe  (AVR_ISA_2xxx | AVR_ISA_LPMX)
+ #define AVR_ISA_RF401 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX)
+@@ -71,6 +73,9 @@
+                         AVR_ISA_ELPM | AVR_ISA_ELPMX | AVR_ISA_SPM | \
+                         AVR_ISA_BRK | AVR_ISA_EIND | AVR_ISA_MOVW)
++#define AVR_ISA_AVRTINY (AVR_ISA_1200 | AVR_ISA_BRK | AVR_ISA_SRAM | \
++                         AVR_ISA_TINY)
++
+ #define REGISTER_P(x) ((x) == 'r'             \
+                      || (x) == 'd'            \
+                      || (x) == 'w'            \
+@@ -109,6 +114,7 @@
+    p - Port address value from 0 to 31. (cbi, sbi, sbic, sbis)
+    K - immediate value from 0 to 63 (used in `adiw', `sbiw')
+    i - immediate value
++   j - 7 bit immediate value from 0x40 to 0xBF (for 16-bit 'lds'/'sts')
+    l - signed pc relative offset from -64 to 63
+    L - signed pc relative offset from -2048 to 2047
+    h - absolute code address (call, jmp)
+@@ -159,8 +165,8 @@ AVR_INSN (sez,  "",    "1001010000011000
+ AVR_INSN (bclr, "S",   "100101001SSS1000", 1, AVR_ISA_1200, 0x9488)
+ AVR_INSN (bset, "S",   "100101000SSS1000", 1, AVR_ISA_1200, 0x9408)
+-AVR_INSN (icall,"",    "1001010100001001", 1, AVR_ISA_2xxx, 0x9509)
+-AVR_INSN (ijmp, "",    "1001010000001001", 1, AVR_ISA_2xxx, 0x9409)
++AVR_INSN (icall,"",    "1001010100001001", 1, AVR_ISA_2xxxa,0x9509)
++AVR_INSN (ijmp, "",    "1001010000001001", 1, AVR_ISA_2xxxa,0x9409)
+ AVR_INSN (lpm,  "?",   "1001010111001000", 1, AVR_ISA_TINY1,0x95c8)
+ AVR_INSN (lpm,  "r,z", "1001000ddddd010+", 1, AVR_ISA_LPMX, 0x9004)
+@@ -260,8 +266,8 @@ AVR_INSN (dec,  "r",   "1001010rrrrr1010
+ AVR_INSN (inc,  "r",   "1001010rrrrr0011", 1, AVR_ISA_1200, 0x9403)
+ AVR_INSN (lsr,  "r",   "1001010rrrrr0110", 1, AVR_ISA_1200, 0x9406)
+ AVR_INSN (neg,  "r",   "1001010rrrrr0001", 1, AVR_ISA_1200, 0x9401)
+-AVR_INSN (pop,  "r",   "1001000rrrrr1111", 1, AVR_ISA_2xxx, 0x900f)
+-AVR_INSN (push, "r",   "1001001rrrrr1111", 1, AVR_ISA_2xxx, 0x920f)
++AVR_INSN (pop,  "r",   "1001000rrrrr1111", 1, AVR_ISA_2xxxa,0x900f)
++AVR_INSN (push, "r",   "1001001rrrrr1111", 1, AVR_ISA_2xxxa,0x920f)
+ AVR_INSN (ror,  "r",   "1001010rrrrr0111", 1, AVR_ISA_1200, 0x9407)
+ AVR_INSN (swap, "r",   "1001010rrrrr0010", 1, AVR_ISA_1200, 0x9402)
+@@ -279,8 +285,10 @@ AVR_INSN (fmul, "a,a", "000000110ddd1rrr
+ AVR_INSN (fmuls,"a,a", "000000111ddd0rrr", 1, AVR_ISA_MUL,  0x0380)
+ AVR_INSN (fmulsu,"a,a","000000111ddd1rrr", 1, AVR_ISA_MUL,  0x0388)
+-AVR_INSN (sts,  "i,r", "1001001ddddd0000", 2, AVR_ISA_2xxx, 0x9200)
+-AVR_INSN (lds,  "r,i", "1001000ddddd0000", 2, AVR_ISA_2xxx, 0x9000)
++AVR_INSN (sts, "j,d", "10101kkkddddkkkk", 1, AVR_ISA_TINY, 0xA800)
++AVR_INSN (sts, "i,r", "1001001ddddd0000", 2, AVR_ISA_2xxx, 0x9200)
++AVR_INSN (lds, "d,j", "10100kkkddddkkkk", 1, AVR_ISA_TINY, 0xA000)
++AVR_INSN (lds, "r,i", "1001000ddddd0000", 2, AVR_ISA_2xxx, 0x9000)
+    /* Special case for b+0, `e' must be next entry after `b',
+       b={Y=1,Z=0}, ee={X=11,Y=10,Z=00}, !=1 if -e or e+ or X.  */
+diff -Naurp ld/configure.tgt ld/configure.tgt
+--- ld/configure.tgt   2012-09-04 18:23:47.000000000 +0530
++++ ld/configure.tgt   2012-12-21 14:14:42.000000000 +0530
+@@ -118,7 +118,7 @@ arm*-*-uclinux*)   targ_emul=armelf_linux
+ arm-*-vxworks)                targ_emul=armelf_vxworks ;;
+ arm*-*-conix*)                targ_emul=armelf ;;
+ avr-*-*)              targ_emul=avr2
+-                      targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7"
++                      targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny"
+                       ;;
+ bfin-*-elf)           targ_emul=elf32bfin;
+                       targ_extra_emuls="elf32bfinfd"
+diff -Naurp ld/emulparams/avrtiny.sh ld/emulparams/avrtiny.sh
+--- ld/emulparams/avrtiny.sh   1970-01-01 05:30:00.000000000 +0530
++++ ld/emulparams/avrtiny.sh   2012-12-21 14:14:42.000000000 +0530
+@@ -0,0 +1,13 @@
++ARCH=avr:90
++MACHINE=
++SCRIPT_NAME=avrtiny
++OUTPUT_FORMAT="elf32-avr"
++MAXPAGESIZE=1
++EMBEDDED=yes
++TEMPLATE_NAME=elf32
++
++TEXT_ORIGIN=0x0
++TEXT_LENGTH=4K
++DATA_ORIGIN=0x0800040
++DATA_LENGTH=0x100
++EXTRA_EM_FILE=avrelf
+diff -Naurp ld/Makefile.am ld/Makefile.am
+--- ld/Makefile.am     2012-12-21 14:15:39.000000000 +0530
++++ ld/Makefile.am     2012-12-21 14:14:42.000000000 +0530
+@@ -172,6 +172,7 @@ ALL_EMULATION_SOURCES = \
+       eavrxmega5.c \
+       eavrxmega6.c \
+       eavrxmega7.c \
++      eavrtiny.c   \
+       ecoff_i860.c \
+       ecoff_sparc.c \
+       ecrisaout.c \
+@@ -844,9 +845,13 @@ eavrxmega6.c: $(srcdir)/emulparams/avrxm
+   ${GEN_DEPENDS}
+       ${GENSCRIPTS} avrxmega6 "$(tdir_avr2)"
+ eavrxmega7.c: $(srcdir)/emulparams/avrxmega7.sh \
+-  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
++  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avrtiny.sc \
+   ${GEN_DEPENDS}
+       ${GENSCRIPTS} avrxmega7 "$(tdir_avr2)"
++eavrtiny.c: $(srcdir)/emulparams/avrtiny.sh \
++  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
++  ${GEN_DEPENDS}
++      ${GENSCRIPTS} avrtiny "$(tdir_avr2)"
+ ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
+   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i860coff.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} coff_i860 "$(tdir_coff_i860)"
+diff -Naurp ld/scripttempl/avrtiny.sc ld/scripttempl/avrtiny.sc
+--- ld/scripttempl/avrtiny.sc  1970-01-01 05:30:00.000000000 +0530
++++ ld/scripttempl/avrtiny.sc  2012-12-21 14:14:42.000000000 +0530
+@@ -0,0 +1,250 @@
++cat <<EOF
++OUTPUT_FORMAT("${OUTPUT_FORMAT}","${OUTPUT_FORMAT}","${OUTPUT_FORMAT}")
++OUTPUT_ARCH(${ARCH})
++
++MEMORY
++{
++  text   (rx)   : ORIGIN = $TEXT_ORIGIN, LENGTH = $TEXT_LENGTH
++  data   (rw!x) : ORIGIN = $DATA_ORIGIN, LENGTH = $DATA_LENGTH
++
++  /* Provide offsets for config, lock and signature to match
++     production file format. Ignore offsets in datasheet.  */
++
++  config(rw!x)     : ORIGIN = 0x820000, LENGTH = 2
++  lock      (rw!x) : ORIGIN = 0x830000, LENGTH = 2
++  signature (rw!x) : ORIGIN = 0x840000, LENGTH = 4
++}
++
++SECTIONS
++{
++  /* Read-only sections, merged into text segment: */
++  ${TEXT_DYNAMIC+${DYNAMIC}}
++  .hash        ${RELOCATING-0} : { *(.hash)           }
++  .dynsym      ${RELOCATING-0} : { *(.dynsym)         }
++  .dynstr      ${RELOCATING-0} : { *(.dynstr)         }
++  .gnu.version ${RELOCATING-0} : { *(.gnu.version)    }
++  .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d)        }
++  .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r)        }
++
++  .rel.init    ${RELOCATING-0} : { *(.rel.init)       }
++  .rela.init   ${RELOCATING-0} : { *(.rela.init)      }
++  .rel.text    ${RELOCATING-0} :
++    {
++      *(.rel.text)
++      ${RELOCATING+*(.rel.text.*)}
++      ${RELOCATING+*(.rel.gnu.linkonce.t*)}
++    }
++  .rela.text   ${RELOCATING-0} :
++    {
++      *(.rela.text)
++      ${RELOCATING+*(.rela.text.*)}
++      ${RELOCATING+*(.rela.gnu.linkonce.t*)}
++    }
++  .rel.fini    ${RELOCATING-0} : { *(.rel.fini)       }
++  .rela.fini   ${RELOCATING-0} : { *(.rela.fini)      }
++  .rel.rodata  ${RELOCATING-0} :
++    {
++      *(.rel.rodata)
++      ${RELOCATING+*(.rel.rodata.*)}
++      ${RELOCATING+*(.rel.gnu.linkonce.r*)}
++    }
++  .rela.rodata ${RELOCATING-0} :
++    {
++      *(.rela.rodata)
++      ${RELOCATING+*(.rela.rodata.*)}
++      ${RELOCATING+*(.rela.gnu.linkonce.r*)}
++    }
++  .rel.data    ${RELOCATING-0} :
++    {
++      *(.rel.data)
++      ${RELOCATING+*(.rel.data.*)}
++      ${RELOCATING+*(.rel.gnu.linkonce.d*)}
++    }
++  .rela.data   ${RELOCATING-0} :
++    {
++      *(.rela.data)
++      ${RELOCATING+*(.rela.data.*)}
++      ${RELOCATING+*(.rela.gnu.linkonce.d*)}
++    }
++  .rel.ctors   ${RELOCATING-0} : { *(.rel.ctors)      }
++  .rela.ctors  ${RELOCATING-0} : { *(.rela.ctors)     }
++  .rel.dtors   ${RELOCATING-0} : { *(.rel.dtors)      }
++  .rela.dtors  ${RELOCATING-0} : { *(.rela.dtors)     }
++  .rel.got     ${RELOCATING-0} : { *(.rel.got)                }
++  .rela.got    ${RELOCATING-0} : { *(.rela.got)       }
++  .rel.bss     ${RELOCATING-0} : { *(.rel.bss)                }
++  .rela.bss    ${RELOCATING-0} : { *(.rela.bss)       }
++  .rel.plt     ${RELOCATING-0} : { *(.rel.plt)                }
++  .rela.plt    ${RELOCATING-0} : { *(.rela.plt)       }
++
++  /* Internal text space or external memory.  */
++  .text ${RELOCATING-0} : ${RELOCATING+ AT (0x0)}
++  {
++    *(.vectors)
++    KEEP(*(.vectors))
++
++    /* For data that needs to reside in the lower 64k of progmem.  */
++    *(.progmem.gcc*)
++    *(.progmem*)
++    ${RELOCATING+. = ALIGN(2);}
++
++    ${CONSTRUCTING+ __trampolines_start = . ; }
++    /* The jump trampolines for the 16-bit limited relocs will reside here.  */
++    *(.trampolines)
++    *(.trampolines*)
++    ${CONSTRUCTING+ __trampolines_end = . ; }
++
++    /* For future tablejump instruction arrays for 3 byte pc devices.
++       We don't relax jump/call instructions within these sections.  */
++    *(.jumptables) 
++    *(.jumptables*) 
++
++    /* For code that needs to reside in the lower 128k progmem.  */
++    *(.lowtext)
++    *(.lowtext*)
++
++    ${CONSTRUCTING+ __ctors_start = . ; }
++    ${CONSTRUCTING+ *(.ctors) }
++    ${CONSTRUCTING+ __ctors_end = . ; }
++    ${CONSTRUCTING+ __dtors_start = . ; }
++    ${CONSTRUCTING+ *(.dtors) }
++    ${CONSTRUCTING+ __dtors_end = . ; }
++    KEEP(SORT(*)(.ctors))
++    KEEP(SORT(*)(.dtors))
++
++    /* From this point on, we don't bother about wether the insns are
++       below or above the 16 bits boundary.  */
++    *(.init0)  /* Start here after reset.  */
++    KEEP (*(.init0))
++    *(.init1)
++    KEEP (*(.init1))
++    *(.init2)  /* Clear __zero_reg__, set up stack pointer.  */
++    KEEP (*(.init2))
++    *(.init3)
++    KEEP (*(.init3))
++    *(.init4)  /* Initialize data and BSS.  */
++    KEEP (*(.init4))
++    *(.init5)
++    KEEP (*(.init5))
++    *(.init6)  /* C++ constructors.  */
++    KEEP (*(.init6))
++    *(.init7)
++    KEEP (*(.init7))
++    *(.init8)
++    KEEP (*(.init8))
++    *(.init9)  /* Call main().  */
++    KEEP (*(.init9))
++    *(.text)
++    ${RELOCATING+. = ALIGN(2);}
++    *(.text.*)
++    ${RELOCATING+. = ALIGN(2);}
++    *(.fini9)  /* _exit() starts here.  */
++    KEEP (*(.fini9))
++    *(.fini8)
++    KEEP (*(.fini8))
++    *(.fini7)
++    KEEP (*(.fini7))
++    *(.fini6)  /* C++ destructors.  */
++    KEEP (*(.fini6))
++    *(.fini5)
++    KEEP (*(.fini5))
++    *(.fini4)
++    KEEP (*(.fini4))
++    *(.fini3)
++    KEEP (*(.fini3))
++    *(.fini2)
++    KEEP (*(.fini2))
++    *(.fini1)
++    KEEP (*(.fini1))
++    *(.fini0)  /* Infinite loop after program termination.  */
++    KEEP (*(.fini0))
++    ${RELOCATING+ _etext = . ; }
++  } ${RELOCATING+ > text}
++
++  .data       ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
++  {
++    ${RELOCATING+ PROVIDE (__data_start = .) ; }
++    *(.data)
++    KEEP (*(.data))
++    *(.data*)
++    *(.rodata)  /* We need to include .rodata here if gcc is used */
++    *(.rodata*) /* with -fdata-sections.  */
++    *(.gnu.linkonce.d*)
++    ${RELOCATING+. = ALIGN(2);}
++    ${RELOCATING+ _edata = . ; }
++    ${RELOCATING+ PROVIDE (__data_end = .) ; }
++  } ${RELOCATING+ > data}
++
++  .bss ${RELOCATING-0} :${RELOCATING+ AT (ADDR (.bss))}
++  {
++    ${RELOCATING+ PROVIDE (__bss_start = .) ; }
++    *(.bss)
++    *(.bss*)
++    *(COMMON)
++    ${RELOCATING+ PROVIDE (__bss_end = .) ; }
++  } ${RELOCATING+ > data}
++
++  ${RELOCATING+ __data_load_start = LOADADDR(.data); }
++  ${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
++
++  /* Global data not cleared after reset.  */
++  .noinit ${RELOCATING-0}:
++  {
++    ${RELOCATING+ PROVIDE (__noinit_start = .) ; }
++    *(.noinit*)
++    ${RELOCATING+ PROVIDE (__noinit_end = .) ; }
++    ${RELOCATING+ _end = . ;  }
++    ${RELOCATING+ PROVIDE (__heap_start = .) ; }
++  } ${RELOCATING+ > data}
++
++  .lock ${RELOCATING-0}:
++  {
++    KEEP(*(.lock*))
++  } ${RELOCATING+ > lock}
++
++  .signature ${RELOCATING-0}:
++  {
++    KEEP(*(.signature*))
++  } ${RELOCATING+ > signature}
++
++  .config ${RELOCATING-0}:
++  {
++    KEEP(*(.config*))
++  } ${RELOCATING+ > config}
++
++  /* Stabs debugging sections.  */
++  .stab 0 : { *(.stab) }
++  .stabstr 0 : { *(.stabstr) }
++  .stab.excl 0 : { *(.stab.excl) }
++  .stab.exclstr 0 : { *(.stab.exclstr) }
++  .stab.index 0 : { *(.stab.index) }
++  .stab.indexstr 0 : { *(.stab.indexstr) }
++  .comment 0 : { *(.comment) }
++ 
++  /* DWARF debug sections.
++     Symbols in the DWARF debugging sections are relative to the beginning
++     of the section so we begin them at 0.  */
++
++  /* DWARF 1 */
++  .debug          0 : { *(.debug) }
++  .line           0 : { *(.line) }
++
++  /* GNU DWARF 1 extensions */
++  .debug_srcinfo  0 : { *(.debug_srcinfo) }
++  .debug_sfnames  0 : { *(.debug_sfnames) }
++
++  /* DWARF 1.1 and DWARF 2 */
++  .debug_aranges  0 : { *(.debug_aranges) }
++  .debug_pubnames 0 : { *(.debug_pubnames) }
++
++  /* DWARF 2 */
++  .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
++  .debug_abbrev   0 : { *(.debug_abbrev) }
++  .debug_line     0 : { *(.debug_line) }
++  .debug_frame    0 : { *(.debug_frame) }
++  .debug_str      0 : { *(.debug_str) }
++  .debug_loc      0 : { *(.debug_loc) }
++  .debug_macinfo  0 : { *(.debug_macinfo) }
++}
++EOF
++
+diff -Naurp opcodes/avr-dis.c opcodes/avr-dis.c
+--- opcodes/avr-dis.c  2012-05-17 20:43:24.000000000 +0530
++++ opcodes/avr-dis.c  2012-12-21 14:15:31.000000000 +0530
+@@ -187,6 +187,16 @@ avr_operand (unsigned int insn, unsigned
+     case 'i':
+       sprintf (buf, "0x%04X", insn2);
+       break;
++
++    case 'j':
++      {
++        unsigned int val = ((insn & 0xf) | ((insn & 0x600) >> 5)
++                                         | ((insn & 0x100) >> 2));
++        if (val > 0 && !(insn & 0x100))
++          val |= 0x80;
++        sprintf (buf, "0x%02x", val);
++      }
++      break;
+       
+     case 'M':
+       sprintf (buf, "0x%02X", ((insn & 0xf00) >> 4) | (insn & 0xf));
+@@ -330,8 +340,12 @@ print_insn_avr (bfd_vma addr, disassembl
+   for (opcode = avr_opcodes, maskptr = avr_bin_masks;
+        opcode->name;
+        opcode++, maskptr++)
+-    if ((insn & *maskptr) == opcode->bin_opcode)
+-      break;
++    {
++      if ((opcode->isa == AVR_ISA_TINY) && (info->mach != bfd_mach_avrtiny))
++        continue;
++      if ((insn & *maskptr) == opcode->bin_opcode)
++        break;
++    }
+   
+   /* Special case: disassemble `ldd r,b+0' as `ld r,b', and
+      `std b+0,r' as `st b,r' (next entry in the table).  */
diff --git a/003-RMW-insn-constriant.patch b/003-RMW-insn-constriant.patch
new file mode 100644 (file)
index 0000000..fb71b0c
--- /dev/null
@@ -0,0 +1,37 @@
+diff -Naurp include/opcode/avr.h include/opcode/avr.h
+--- include/opcode/avr.h       2012-12-17 19:28:09.000000000 +0530
++++ include/opcode/avr.h       2012-12-17 19:28:38.000000000 +0530
+@@ -34,7 +34,7 @@
+ #define AVR_ISA_MOVW  0x1000 /* device has MOVW */
+ #define AVR_ISA_SPMX  0x2000 /* device has SPM Z[+] */
+ #define AVR_ISA_DES   0x4000 /* device has DES */
+-#define AVR_ISA_XCH   0x8000 /* device has XCH, LAC, LAS, LAT */
++#define AVR_ISA_RMW   0x8000 /* device has RMW instructions XCH,LAC,LAS,LAT */
+ #define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
+ #define AVR_ISA_2xxx  (AVR_ISA_TINY1 | AVR_ISA_SRAM)
+@@ -55,7 +55,8 @@
+ #define AVR_ISA_M323  (AVR_ISA_M161 | AVR_ISA_BRK)
+ #define AVR_ISA_M128  (AVR_ISA_M323 | AVR_ISA_ELPM | AVR_ISA_ELPMX)
+ #define AVR_ISA_M256  (AVR_ISA_M128 | AVR_ISA_EIND)
+-#define AVR_ISA_XMEGA (AVR_ISA_M256 | AVR_ISA_SPMX | AVR_ISA_DES | AVR_ISA_XCH)
++#define AVR_ISA_XMEGA (AVR_ISA_M256 | AVR_ISA_SPMX | AVR_ISA_DES)
++#define AVR_ISA_XMEGAU (AVR_ISA_XMEGA | AVR_ISA_RMW)
+ #define AVR_ISA_AVR1   AVR_ISA_TINY1
+ #define AVR_ISA_AVR2   AVR_ISA_2xxx
+@@ -272,10 +273,10 @@ AVR_INSN (ror,  "r",   "1001010rrrrr0111
+ AVR_INSN (swap, "r",   "1001010rrrrr0010", 1, AVR_ISA_1200, 0x9402)
+    /* Atomic memory operations for XMEGA.  List before `sts'.  */
+-AVR_INSN (xch,  "z,r",   "1001001rrrrr0100", 1, AVR_ISA_XCH, 0x9204)
+-AVR_INSN (las,  "z,r",   "1001001rrrrr0101", 1, AVR_ISA_XCH, 0x9205)
+-AVR_INSN (lac,  "z,r",   "1001001rrrrr0110", 1, AVR_ISA_XCH, 0x9206)
+-AVR_INSN (lat,  "z,r",   "1001001rrrrr0111", 1, AVR_ISA_XCH, 0x9207)
++AVR_INSN (xch,  "z,r",   "1001001rrrrr0100", 1, AVR_ISA_RMW, 0x9204)
++AVR_INSN (las,  "z,r",   "1001001rrrrr0101", 1, AVR_ISA_RMW, 0x9205)
++AVR_INSN (lac,  "z,r",   "1001001rrrrr0110", 1, AVR_ISA_RMW, 0x9206)
++AVR_INSN (lat,  "z,r",   "1001001rrrrr0111", 1, AVR_ISA_RMW, 0x9207)
+    /* Known to be decoded as `nop' by the old core.  */
+ AVR_INSN (movw, "v,v", "00000001ddddrrrr", 1, AVR_ISA_MOVW, 0x0100)
diff --git a/004-new-part-supports.patch b/004-new-part-supports.patch
new file mode 100644 (file)
index 0000000..8744f11
--- /dev/null
@@ -0,0 +1,257 @@
+--- gas/config/tc-avr.c        2012-09-05 16:01:12.000000000 +0530
++++ gas/config/tc-avr.c        2012-09-05 20:05:46.000000000 +0530
+@@ -107,6 +107,7 @@ static struct mcu_type_s mcu_types[] =
+   {"at90s8515",  AVR_ISA_AVR2,    bfd_mach_avr2},
+   {"at90c8534",  AVR_ISA_AVR2,    bfd_mach_avr2},
+   {"at90s8535",  AVR_ISA_AVR2,    bfd_mach_avr2},
++  {"ata5272",    AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"attiny13",   AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"attiny13a",  AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"attiny2313", AVR_ISA_AVR25,   bfd_mach_avr25},
+@@ -131,6 +132,7 @@ static struct mcu_type_s mcu_types[] =
+   {"attiny43u",  AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"attiny48",   AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"attiny88",   AVR_ISA_AVR25,   bfd_mach_avr25},
++  {"attiny828",  AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"at86rf401",  AVR_ISA_RF401,   bfd_mach_avr25},
+   {"ata6289",    AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"at43usb355", AVR_ISA_AVR3,    bfd_mach_avr3},
+@@ -140,12 +142,18 @@ static struct mcu_type_s mcu_types[] =
+   {"attiny167",  AVR_ISA_AVR35,   bfd_mach_avr35},
+   {"at90usb82",  AVR_ISA_AVR35,   bfd_mach_avr35},
+   {"at90usb162", AVR_ISA_AVR35,   bfd_mach_avr35},
++  {"ata5505",    AVR_ISA_AVR35,   bfd_mach_avr35},
+   {"atmega8u2",  AVR_ISA_AVR35,   bfd_mach_avr35},
+   {"atmega16u2", AVR_ISA_AVR35,   bfd_mach_avr35},
+   {"atmega32u2", AVR_ISA_AVR35,   bfd_mach_avr35},
++  {"attiny1634", AVR_ISA_AVR35,   bfd_mach_avr35},
+   {"atmega8",    AVR_ISA_M8,      bfd_mach_avr4},
++  {"atmega8a",   AVR_ISA_M8,      bfd_mach_avr4},
++  {"ata6285",    AVR_ISA_AVR4,    bfd_mach_avr4},
++  {"ata6286",    AVR_ISA_AVR4,    bfd_mach_avr4},
+   {"atmega48",   AVR_ISA_AVR4,    bfd_mach_avr4},
+   {"atmega48a",  AVR_ISA_AVR4,    bfd_mach_avr4},
++  {"atmega48pa", AVR_ISA_AVR4,    bfd_mach_avr4},
+   {"atmega48p",  AVR_ISA_AVR4,    bfd_mach_avr4},
+   {"atmega88",   AVR_ISA_AVR4,    bfd_mach_avr4},
+   {"atmega88a",  AVR_ISA_AVR4,    bfd_mach_avr4},
+@@ -160,6 +168,9 @@ static struct mcu_type_s mcu_types[] =
+   {"at90pwm3",   AVR_ISA_AVR4,    bfd_mach_avr4},
+   {"at90pwm3b",  AVR_ISA_AVR4,    bfd_mach_avr4},
+   {"at90pwm81",  AVR_ISA_AVR4,    bfd_mach_avr4},
++  {"at90pwm161", AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"ata5790",    AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"ata5795",    AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega16",   AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega16a",  AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega161",  AVR_ISA_M161,    bfd_mach_avr5},
+@@ -167,17 +178,21 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega163",  AVR_ISA_M161,    bfd_mach_avr5},
+   {"atmega164a", AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega164p", AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"atmega164pa",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega165",  AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega165a", AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega165p", AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"atmega165pa",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega168",  AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega168a", AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega168p", AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"atmega168pa",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega169",  AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega169a", AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega169p", AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega169pa",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega32",   AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"atmega32a",  AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega323",  AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega324a", AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega324p", AVR_ISA_AVR5,    bfd_mach_avr5},
+@@ -202,6 +217,7 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega3290pa",AVR_ISA_AVR5,   bfd_mach_avr5},
+   {"atmega406",  AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega64",   AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"atmega64a",  AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega640",  AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega644",  AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega644a", AVR_ISA_AVR5,    bfd_mach_avr5},
+@@ -220,7 +236,7 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega6490a",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega6490p",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega16hva",AVR_ISA_AVR5,    bfd_mach_avr5},
+-  {"atmega16hva2",AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"atmega16hva2",AVR_ISA_AVR5,   bfd_mach_avr5},
+   {"atmega16hvb",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega16hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
+   {"atmega32hvb",AVR_ISA_AVR5,    bfd_mach_avr5},
+@@ -245,8 +261,10 @@ static struct mcu_type_s mcu_types[] =
+   {"at94k",      AVR_ISA_94K,     bfd_mach_avr5},
+   {"m3000",      AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega128",  AVR_ISA_AVR51,   bfd_mach_avr51},
++  {"atmega128a", AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"atmega1280", AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"atmega1281", AVR_ISA_AVR51,   bfd_mach_avr51},
++  {"atmega1284", AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"atmega1284p",AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"atmega128rfa1",AVR_ISA_AVR51, bfd_mach_avr51},
+   {"at90can128", AVR_ISA_AVR51,   bfd_mach_avr51},
+@@ -255,26 +273,46 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega2560", AVR_ISA_AVR6,    bfd_mach_avr6},
+   {"atmega2561", AVR_ISA_AVR6,    bfd_mach_avr6},
+   {"atxmega16a4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
++  {"atxmega16a4u",AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
++  {"atxmega16c4", AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
+   {"atxmega16d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atxmega16x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atxmega32a4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
++  {"atxmega32a4u",AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
++  {"atxmega32c4", AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
+   {"atxmega32d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atxmega32x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atxmega64a3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
++  {"atxmega64a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
++  {"atxmega64a4u",AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
++  {"atxmega64b1", AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
++  {"atxmega64b3", AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
++  {"atxmega64c3", AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
+   {"atxmega64d3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
+   {"atxmega64a1", AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
+-  {"atxmega64a1u",AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
++  {"atxmega64a1u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega5},
+   {"atxmega128a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
++  {"atxmega128a3u",AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
+   {"atxmega128b1", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
++  {"atxmega128b3", AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
++  {"atxmega128c3", AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
+   {"atxmega128d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
++  {"atxmega128d4", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
+   {"atxmega192a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
++  {"atxmega192a3u",AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
++  {"atxmega192c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
+   {"atxmega192d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
+   {"atxmega256a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
++  {"atxmega256a3u",AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
+   {"atxmega256a3b",AVR_ISA_XMEGA, bfd_mach_avrxmega6},
+-  {"atxmega256a3bu",AVR_ISA_XMEGA,bfd_mach_avrxmega6},
++  {"atxmega256a3bu",AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
++  {"atxmega256c3", AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
+   {"atxmega256d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
++  {"atxmega384c3", AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
++  {"atxmega384d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
+   {"atxmega128a1", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
+-  {"atxmega128a1u", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
++  {"atxmega128a1u", AVR_ISA_XMEGAU, bfd_mach_avrxmega7},
++  {"atxmega128a4u", AVR_ISA_XMEGAU, bfd_mach_avrxmega7},
+   {"attiny4",      AVR_ISA_AVRTINY, bfd_mach_avrtiny},
+   {"attiny5",      AVR_ISA_AVRTINY, bfd_mach_avrtiny},
+   {"attiny9",      AVR_ISA_AVRTINY, bfd_mach_avrtiny},
+--- gas/doc/c-avr.texi 2012-09-05 15:59:12.000000000 +0530
++++ gas/doc/c-avr.texi 2012-09-05 20:03:45.000000000 +0530
+@@ -46,7 +46,7 @@ space plus the MOVW instruction (MCU typ
+ attiny2313a, attiny24, attiny24a, attiny4313, attiny44, attiny44a, attiny84,
+ attiny84a, attiny25, attiny45, attiny85, attiny261, attiny261a, attiny461,
+ attiny461a, attiny861, attiny861a, attiny87, attiny43u, attiny48, attiny88,
+-at86rf401, ata6289).
++attiny828, at86rf401, ata6289, ata5272).
+ Instruction set avr3 is for the classic AVR core with up to 128K program
+ memory space (MCU types: at43usb355, at76c711).
+@@ -55,59 +55,68 @@ Instruction set avr31 is for the classic
+ memory space (MCU types: atmega103, at43usb320).
+ Instruction set avr35 is for classic AVR core plus MOVW, CALL, and JMP
+-instructions (MCU types: attiny167, at90usb82, at90usb162, atmega8u2,
+-atmega16u2, atmega32u2).
++instructions (MCU types: attiny167, attiny1634, at90usb82, at90usb162,
++atmega8u2, atmega16u2, atmega32u2, ata5505).
+ Instruction set avr4 is for the enhanced AVR core with up to 8K program
+-memory space (MCU types: atmega48, atmega48a, atmega48p, atmega8, atmega88,
+-atmega88a, atmega88p, atmega88pa, atmega8515, atmega8535, atmega8hva, at90pwm1,
+-at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81).
++memory space (MCU types: atmega48, atmega48a, atmega48pa, atmega48p, atmega8, 
++atmega8a, atmega88, atmega88a, atmega88p, atmega88pa, atmega8515, atmega8535, 
++atmega8hva, at90pwm1, at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81, 
++ata6285, ata6286).
+ Instruction set avr5 is for the enhanced AVR core with up to 128K program
+-memory space (MCU types: atmega16, atmega16a, atmega161, atmega162, atmega163,
+-atmega164a, atmega164p, atmega165, atmega165a, atmega165p, atmega168,
+-atmega168a, atmega168p, atmega169, atmega169a, atmega169p, atmega169pa,
+-atmega32, atmega323, atmega324a, atmega324p, atmega325, atmega325a, atmega325p,
+-atmega325pa, atmega3250, atmega3250a, atmega3250p, atmega3250pa, atmega328,
+-atmega328p, atmega329, atmega329a, atmega329p, atmega329pa, atmega3290,
+-atmega3290a, atmega3290p, atmega3290pa, atmega406, atmega64, atmega640,
+-atmega644, atmega644a, atmega644p, atmega644pa, atmega645, atmega645a,
+-atmega645p, atmega6450, atmega6450a, atmega6450p, atmega649, atmega649a,
+-atmega649p, atmega6490, atmega6490a, atmega6490p, atmega16hva, atmega16hva2,
+-atmega16hvb, atmega16hvbrevb, atmega32hvb, atmega32hvbrevb, atmega64hve,
+-at90can32, at90can64, at90pwm161, at90pwm216, at90pwm316, atmega32c1,
+-atmega64c1, atmega16m1, atmega32m1, atmega64m1, atmega16u4, atmega32u4,
+-atmega32u6, at90usb646, at90usb647, at94k, at90scr100).
++memory space (MCU types: at90pwm161, atmega16, atmega16a, atmega161, atmega162,
++atmega163, atmega164a, atmega164p, atmega164pa, atmega165, atmega165a, 
++atmega165p, atmega165pa, atmega168, atmega168a, atmega168p, atmega168pa, 
++atmega169, atmega169a, atmega169p, atmega169pa, atmega32, atmega323, atmega324a,
++atmega324p, atmega324pa, atmega325, atmega325a, atmega32, atmega32a, atmega323,
++atmega324a, atmega324p, atmega324pa, atmega325, atmega325a, atmega325p,
++atmega325p, atmega325pa, atmega3250, atmega3250a, atmega3250p, atmega3250pa, 
++atmega328, atmega328p, atmega329, atmega329a, atmega329p, atmega329pa, 
++atmega3290a, atmega3290p, atmega3290pa, atmega406, atmega64, atmega64a, 
++atmega640, atmega644, atmega644a, atmega644p, atmega644pa, atmega645, 
++atmega645a, atmega645p, atmega6450, atmega6450a, atmega6450p, atmega649, 
++atmega649a, atmega649p, atmega6490, atmega6490a, atmega6490p, atmega16hva, 
++atmega16hva2, atmega16hvb, atmega16hvbrevb, atmega32hvb, atmega32hvbrevb, 
++atmega64hve, at90can32, at90can64, at90pwm161, at90pwm216, at90pwm316, 
++atmega32c1, atmega64c1, atmega16m1, atmega32m1, atmega64m1, atmega16u4, 
++atmega32u4, atmega32u6, at90usb646, at90usb647, at94k, at90scr100,
++ata5790, ata5795).
+ Instruction set avr51 is for the enhanced AVR core with exactly 128K program
+-memory space (MCU types: atmega128, atmega1280, atmega1281, atmega1284p,
+-atmega128rfa1, at90can128, at90usb1286, at90usb1287, m3000).
++memory space (MCU types: atmega128, atmega128a, atmega1280, atmega1281, 
++atmega1284, atmega1284p, atmega128rfa1, at90can128, at90usb1286, at90usb1287,
++m3000).
+ Instruction set avr6 is for the enhanced AVR core with a 3-byte PC (MCU types:
+ atmega2560, atmega2561).
+ Instruction set avrxmega2 is for the XMEGA AVR core with 8K to 64K program
+-memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16d4,
+-atxmega16x1, atxmega32a4, atxmega32d4, atxmega32x1).
++memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u,
++atxmega16c4, atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32c4, 
++atxmega32d4, atxmega32x1).
+ Instruction set avrxmega3 is for the XMEGA AVR core with 8K to 64K program
+ memory space and greater than 64K data space (MCU types: none).
+ Instruction set avrxmega4 is for the XMEGA AVR core with up to 64K program
+-memory space and less than 64K data space (MCU types: atxmega64a3, atxmega64d3).
++memory space and less than 64K data space (MCU types: atxmega64a3, atxmega64a3u, 
++atxmega64a4u, atxmega64b1, atxmega64b3, atxmega64c3, atxmega64d3).
+ Instruction set avrxmega5 is for the XMEGA AVR core with up to 64K program 
+ memory space and greater than 64K data space (MCU types: atxmega64a1,
+ atxmega64a1u).
+-Instruction set avrxmega6 is for the XMEGA AVR core with up to 256K program
+-memory space and less than 64K data space (MCU types: atxmega128a3,
+-atxmega128d3, atxmega192a3, atxmega128b1, atxmega192d3, atxmega256a3, 
+-atxmega256a3b, atxmega256a3bu, atxmega192d3).
++Instruction set avrxmega6 is for the XMEGA AVR core with larger than 64K program
++memory space and less than 64K data space (MCU types: atxmega128a3, 
++atxmega128a3u, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, 
++atxmega192a3u, atxmega128b1, atxmega128b3, atxmega192c3, atxmega192d3, 
++atxmega256a3, atxmega256a3u, atxmega256a3b, atxmega256a3bu, atxmega256c3, 
++atxmega256d3, atxmega384c3, atxmega256d3).
+-Instruction set avrxmega7 is for the XMEGA AVR core with up to 256K program
++Instruction set avrxmega7 is for the XMEGA AVR core with larger than 64K program
+ memory space and greater than 64K data space (MCU types: atxmega128a1,
+-atxmega128a1u).
++atxmega128a1u, atxmega128a4u).
+ @cindex @code{-mall-opcodes} command line option, AVR
+ @item -mall-opcodes
diff --git a/005-additional-part-supports.patch b/005-additional-part-supports.patch
new file mode 100644 (file)
index 0000000..e2c9d8a
--- /dev/null
@@ -0,0 +1,105 @@
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2013-02-06 16:41:25.000000000 +0530
++++ gas/config/tc-avr.c        2013-02-06 16:38:01.000000000 +0530
+@@ -216,6 +216,8 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega3290p",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega3290pa",AVR_ISA_AVR5,   bfd_mach_avr5},
+   {"atmega406",  AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"atmega64rfr2", AVR_ISA_AVR5,  bfd_mach_avr5},
++  {"atmega644rfr2",AVR_ISA_AVR5,  bfd_mach_avr5},
+   {"atmega64",   AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega64a",  AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega640",  AVR_ISA_AVR5,    bfd_mach_avr5},
+@@ -267,11 +269,15 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega1284", AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"atmega1284p",AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"atmega128rfa1",AVR_ISA_AVR51, bfd_mach_avr51},
++  {"atmega128rfr2",AVR_ISA_AVR51, bfd_mach_avr51},
++  {"atmega1284rfr2",AVR_ISA_AVR51, bfd_mach_avr51},
+   {"at90can128", AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"at90usb1286",AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"at90usb1287",AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"atmega2560", AVR_ISA_AVR6,    bfd_mach_avr6},
+   {"atmega2561", AVR_ISA_AVR6,    bfd_mach_avr6},
++  {"atmega256rfr2", AVR_ISA_AVR6, bfd_mach_avr6},
++  {"atmega2564rfr2",AVR_ISA_AVR6, bfd_mach_avr6},
+   {"atxmega16a4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atxmega16a4u",AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
+   {"atxmega16c4", AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
+@@ -281,6 +287,9 @@ static struct mcu_type_s mcu_types[] =
+   {"atxmega32a4u",AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
+   {"atxmega32c4", AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
+   {"atxmega32d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
++  {"atxmega32e5", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
++  {"atxmega16e5", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
++  {"atxmega8e5",  AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atxmega32x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atxmega64a3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
+   {"atxmega64a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
+@@ -289,6 +298,7 @@ static struct mcu_type_s mcu_types[] =
+   {"atxmega64b3", AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
+   {"atxmega64c3", AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
+   {"atxmega64d3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
++  {"atxmega64d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
+   {"atxmega64a1", AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
+   {"atxmega64a1u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega5},
+   {"atxmega128a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
+diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
+--- gas/doc/c-avr.texi 2013-02-06 16:41:25.000000000 +0530
++++ gas/doc/c-avr.texi 2013-02-06 16:40:55.000000000 +0530
+@@ -67,41 +67,41 @@ ata6285, ata6286).
+ Instruction set avr5 is for the enhanced AVR core with up to 128K program
+ memory space (MCU types: at90pwm161, atmega16, atmega16a, atmega161, atmega162,
+ atmega163, atmega164a, atmega164p, atmega164pa, atmega165, atmega165a, 
+-atmega165p, atmega165pa, atmega168, atmega168a, atmega168p, atmega168pa, 
++atmega165p, atmega165pa, atmega168, atmega168a, atmega168p, atmega168pa,
+ atmega169, atmega169a, atmega169p, atmega169pa, atmega32, atmega323, atmega324a,
+ atmega324p, atmega324pa, atmega325, atmega325a, atmega32, atmega32a, atmega323,
+ atmega324a, atmega324p, atmega324pa, atmega325, atmega325a, atmega325p,
+ atmega325p, atmega325pa, atmega3250, atmega3250a, atmega3250p, atmega3250pa, 
+ atmega328, atmega328p, atmega329, atmega329a, atmega329p, atmega329pa, 
+ atmega3290a, atmega3290p, atmega3290pa, atmega406, atmega64, atmega64a, 
+-atmega640, atmega644, atmega644a, atmega644p, atmega644pa, atmega645, 
+-atmega645a, atmega645p, atmega6450, atmega6450a, atmega6450p, atmega649, 
+-atmega649a, atmega649p, atmega6490, atmega6490a, atmega6490p, atmega16hva, 
+-atmega16hva2, atmega16hvb, atmega16hvbrevb, atmega32hvb, atmega32hvbrevb, 
+-atmega64hve, at90can32, at90can64, at90pwm161, at90pwm216, at90pwm316, 
+-atmega32c1, atmega64c1, atmega16m1, atmega32m1, atmega64m1, atmega16u4, 
+-atmega32u4, atmega32u6, at90usb646, at90usb647, at94k, at90scr100,
+-ata5790, ata5795).
++atmega64rfr2, atmega644rfr2, atmega640, atmega644, atmega644a, atmega644p,
++atmega644pa, atmega645, atmega645a, atmega645p, atmega6450, atmega6450a,
++atmega6450p, atmega649, atmega649a, atmega649p, atmega6490, atmega6490a,
++atmega6490p, atmega16hva, atmega16hva2, atmega16hvb, atmega16hvbrevb, 
++atmega32hvb, atmega32hvbrevb, atmega64hve, at90can32, at90can64, at90pwm161,
++at90pwm216, at90pwm316, atmega32c1, atmega64c1, atmega16m1, atmega32m1,
++atmega64m1, atmega16u4, atmega32u4, atmega32u6, at90usb646, at90usb647, at94k,
++at90scr100, ata5790, ata5795).
+ Instruction set avr51 is for the enhanced AVR core with exactly 128K program
+ memory space (MCU types: atmega128, atmega128a, atmega1280, atmega1281, 
+-atmega1284, atmega1284p, atmega128rfa1, at90can128, at90usb1286, at90usb1287,
+-m3000).
++atmega1284, atmega1284p, atmega128rfa1, atmega128rfr2, atmega1284rfr2,
++at90can128, at90usb1286, at90usb1287, m3000).
+ Instruction set avr6 is for the enhanced AVR core with a 3-byte PC (MCU types:
+-atmega2560, atmega2561).
++atmega2560, atmega2561, atmega256rfr2, atmega2564rfr2).
+ Instruction set avrxmega2 is for the XMEGA AVR core with 8K to 64K program
+ memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u,
+ atxmega16c4, atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32c4, 
+-atxmega32d4, atxmega32x1).
++atxmega32d4, atxmega16e5, atxmega8e5, atxmega32e5, atxmega32x1).
+ Instruction set avrxmega3 is for the XMEGA AVR core with 8K to 64K program
+ memory space and greater than 64K data space (MCU types: none).
+ Instruction set avrxmega4 is for the XMEGA AVR core with up to 64K program
+ memory space and less than 64K data space (MCU types: atxmega64a3, atxmega64a3u, 
+-atxmega64a4u, atxmega64b1, atxmega64b3, atxmega64c3, atxmega64d3).
++atxmega64a4u, atxmega64b1, atxmega64b3, atxmega64c3, atxmega64d3, atxmega64d4).
+ Instruction set avrxmega5 is for the XMEGA AVR core with up to 64K program 
+ memory space and greater than 64K data space (MCU types: atxmega64a1,
diff --git a/006-xmega-showuage-typo.patch b/006-xmega-showuage-typo.patch
new file mode 100644 (file)
index 0000000..508428c
--- /dev/null
@@ -0,0 +1,11 @@
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2012-12-17 19:31:00.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-17 19:34:49.000000000 +0530
+@@ -505,6 +505,7 @@ md_show_usage (FILE *stream)
+       "                   avr5  - enhanced AVR core with up to 64K program memory\n"
+       "                   avr51 - enhanced AVR core with up to 128K program memory\n"
+       "                   avr6  - enhanced AVR core with up to 256K program memory\n"
++      "                   avrxmega2 - XMEGA, > 8K, < 64K FLASH, < 64K RAM\n"
+       "                   avrxmega3 - XMEGA, > 8K, <= 64K FLASH, > 64K RAM\n"
+       "                   avrxmega4 - XMEGA, > 64K, <= 128K FLASH, <= 64K RAM\n"
+       "                   avrxmega5 - XMEGA, > 64K, <= 128K FLASH, > 64K RAM\n"
similarity index 60%
rename from 505-binutils-avrtc446.patch
rename to 007-ata6289-architecture-correction.patch
index 2f74476e44688f472338579a27054efa6fda9e1f..c300fbfbf86fb274e0d91a6e42624b86336b7613 100644 (file)
@@ -1,15 +1,15 @@
 diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-10-25 12:02:42.000000000 +0530
-+++ gas/config/tc-avr.c        2012-10-25 12:41:44.000000000 +0530
-@@ -137,7 +137,6 @@ static struct mcu_type_s mcu_types[] =
+--- gas/config/tc-avr.c        2012-12-21 12:07:55.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-21 12:06:22.000000000 +0530
+@@ -134,7 +134,6 @@ static struct mcu_type_s mcu_types[] =
    {"attiny88",   AVR_ISA_AVR25,   bfd_mach_avr25},
-   {"attiny828",  AVR_ISA_AVR25,   bfd_mach_avr25}, 
+   {"attiny828",  AVR_ISA_AVR25,   bfd_mach_avr25},
    {"at86rf401",  AVR_ISA_RF401,   bfd_mach_avr25},
 -  {"ata6289",    AVR_ISA_AVR25,   bfd_mach_avr25},
    {"at43usb355", AVR_ISA_AVR3,    bfd_mach_avr3},
    {"at76c711",   AVR_ISA_AVR3,    bfd_mach_avr3},
    {"atmega103",  AVR_ISA_AVR31,   bfd_mach_avr31},
-@@ -154,6 +153,7 @@ static struct mcu_type_s mcu_types[] =
+@@ -151,6 +150,7 @@ static struct mcu_type_s mcu_types[] =
    {"atmega8a",   AVR_ISA_M8,      bfd_mach_avr4},
    {"ata6285",    AVR_ISA_AVR4,    bfd_mach_avr4},
    {"ata6286",    AVR_ISA_AVR4,    bfd_mach_avr4},
@@ -18,23 +18,23 @@ diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
    {"atmega48a",  AVR_ISA_AVR4,    bfd_mach_avr4},
    {"atmega48pa", AVR_ISA_AVR4,    bfd_mach_avr4},
 diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-10-25 12:02:42.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-10-25 13:04:59.000000000 +0530
+--- gas/doc/c-avr.texi 2012-12-21 12:07:54.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-21 12:07:18.000000000 +0530
 @@ -46,7 +46,7 @@ space plus the MOVW instruction (MCU typ
  attiny2313a, attiny24, attiny24a, attiny4313, attiny44, attiny44a, attiny84,
  attiny84a, attiny25, attiny45, attiny85, attiny261, attiny261a, attiny461,
  attiny461a, attiny861, attiny861a, attiny87, attiny43u, attiny48, attiny88,
--attiny828, attiny841, at86rf401, ata6289, ata5272).
-+attiny828, attiny841, at86rf401, ata5272).
+-attiny828, at86rf401, ata6289, ata5272).
++attiny828, at86rf401, ata5272).
  
  Instruction set avr3 is for the classic AVR core with up to 128K program
  memory space (MCU types: at43usb355, at76c711).
-@@ -61,7 +61,7 @@ atmega8u2, atmega16u2, atmega32u2, ata55
- Instruction set avr4 is for the enhanced AVR core with up to 8K program
- memory space (MCU types: atmega48, atmega48a, atmega48pa, atmega48p, atmega8, atmega8a
- atmega88, atmega88a, atmega88p, atmega88pa, atmega8515, atmega8535, atmega8hva,
--at90pwm1, at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81, ata6285, ata6286).
-+at90pwm1, at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81, ata6285, ata6286, ata6289).
+@@ -62,7 +62,7 @@ Instruction set avr4 is for the enhanced
+ memory space (MCU types: atmega48, atmega48a, atmega48pa, atmega48p, atmega8, 
+ atmega8a, atmega88, atmega88a, atmega88p, atmega88pa, atmega8515, atmega8535, 
+ atmega8hva, at90pwm1, at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81, 
+-ata6285, ata6286).
++ata6285, ata6286, ata6289).
  
  Instruction set avr5 is for the enhanced AVR core with up to 128K program
  memory space (MCU types: at90pwm161, atmega16, atmega16a, atmega161, atmega162,
diff --git a/008-add-usersig-section.patch b/008-add-usersig-section.patch
new file mode 100644 (file)
index 0000000..84c0654
--- /dev/null
@@ -0,0 +1,22 @@
+--- ld/scripttempl/avr.sc      2012-12-26 16:10:01.000000000 +0530
++++ ld/scripttempl/avr.sc      2012-12-26 16:00:54.000000000 +0530
+@@ -10,6 +10,7 @@ MEMORY
+   fuse      (rw!x) : ORIGIN = 0x820000, LENGTH = 1K
+   lock      (rw!x) : ORIGIN = 0x830000, LENGTH = 1K
+   signature (rw!x) : ORIGIN = 0x840000, LENGTH = 1K
++  user_signatures (rw!x) : ORIGIN = 0x850000, LENGTH = 1K
+ }
+ SECTIONS
+@@ -220,6 +221,11 @@ SECTIONS
+     KEEP(*(.signature*))
+   } ${RELOCATING+ > signature}
++  .user_signatures ${RELOCATING-0}:
++  {
++    KEEP(*(.user_signatures*))
++  } ${RELOCATING+ > user_signatures}
++
+   /* Stabs debugging sections.  */
+   .stab 0 : { *(.stab) }
+   .stabstr 0 : { *(.stabstr) }
diff --git a/009-dwarf-relax-fix.patch b/009-dwarf-relax-fix.patch
new file mode 100644 (file)
index 0000000..d678829
--- /dev/null
@@ -0,0 +1,484 @@
+diff -Naurp bfd/elf32-avr.c bfd/elf32-avr.c
+--- bfd/elf32-avr.c    2013-01-02 16:27:32.000000000 +0530
++++ bfd/elf32-avr.c    2013-01-02 16:28:50.000000000 +0530
+@@ -34,6 +34,15 @@ static bfd_boolean debug_relax = FALSE;
+ /* Enable debugging printout at stdout with this variable.  */
+ static bfd_boolean debug_stubs = FALSE;
++static bfd_reloc_status_type
++bfd_elf_avr_diff_reloc (bfd *abfd,
++              arelent *reloc_entry,
++              asymbol *symbol,
++              void *data,
++              asection *input_section,
++              bfd *output_bfd,
++              char **error_message);
++
+ /* Hash table initialization and handling.  Code is taken from the hppa port
+    and adapted to the needs of AVR.  */
+@@ -573,6 +582,45 @@ static reloc_howto_type elf_avr_howto_ta
+          0xffff,                /* src_mask */
+          0xffff,                /* dst_mask */
+          FALSE),                /* pcrel_offset */
++  HOWTO (R_AVR_DIFF8,      /* type */
++     0,             /* rightshift */
++     0,                       /* size (0 = byte, 1 = short, 2 = long) */
++     8,                       /* bitsize */
++     FALSE,         /* pc_relative */
++     0,             /* bitpos */
++     complain_overflow_bitfield, /* complain_on_overflow */
++     bfd_elf_avr_diff_reloc, /* special_function */
++     "R_AVR_DIFF8",     /* name */ 
++     FALSE,         /* partial_inplace */ 
++     0,             /* src_mask */ 
++     0xff,          /* dst_mask */
++     FALSE),        /* pcrel_offset */
++  HOWTO (R_AVR_DIFF16,     /* type */
++     0,             /* rightshift */
++     1,                       /* size (0 = byte, 1 = short, 2 = long) */
++     16,                      /* bitsize */
++     FALSE,         /* pc_relative */
++     0,             /* bitpos */
++     complain_overflow_bitfield, /* complain_on_overflow */
++     bfd_elf_avr_diff_reloc, /* special_function */
++     "R_AVR_DIFF16",     /* name */ 
++     FALSE,         /* partial_inplace */ 
++     0,             /* src_mask */ 
++     0xffff,        /* dst_mask */
++     FALSE),        /* pcrel_offset */
++  HOWTO (R_AVR_DIFF32,    /* type */
++     0,             /* rightshift */
++     2,         /* size (0 = byte, 1 = short, 2 = long) */
++     32,        /* bitsize */
++     FALSE,         /* pc_relative */
++     0,             /* bitpos */
++     complain_overflow_bitfield, /* complain_on_overflow */
++     bfd_elf_avr_diff_reloc, /* special_function */
++     "R_AVR_DIFF32",     /* name */ 
++     FALSE,         /* partial_inplace */ 
++     0,             /* src_mask */ 
++     0xffffffff,    /* dst_mask */ 
++     FALSE)         /* pcrel_offset */
+ };
+ /* Map BFD reloc types to AVR ELF reloc types.  */
+@@ -615,7 +663,10 @@ static const struct avr_reloc_map avr_re
+   { BFD_RELOC_AVR_8_LO,             R_AVR_8_LO8 },
+   { BFD_RELOC_AVR_8_HI,             R_AVR_8_HI8 },
+   { BFD_RELOC_AVR_8_HLO,            R_AVR_8_HLO8 },
+-  { BFD_RELOC_AVR_7_LDS16,          R_AVR_7_LDS16 }
++  { BFD_RELOC_AVR_7_LDS16,          R_AVR_7_LDS16 },
++  { BFD_RELOC_AVR_DIFF8,            R_AVR_DIFF8 },
++  { BFD_RELOC_AVR_DIFF16,           R_AVR_DIFF16 },
++  { BFD_RELOC_AVR_DIFF32,           R_AVR_DIFF32 }
+ };
+ /* Meant to be filled one day with the wrap around address for the
+@@ -823,6 +874,22 @@ avr_get_stub_addr (bfd_vma srel,
+   return 0x020000;
+ }
++/* Perform a diff relocation. Nothing to do, as the difference value is already
++   written into the section's contents. */
++
++static bfd_reloc_status_type
++bfd_elf_avr_diff_reloc (bfd *abfd ATTRIBUTE_UNUSED,
++                    arelent *reloc_entry ATTRIBUTE_UNUSED,
++              asymbol *symbol ATTRIBUTE_UNUSED,
++              void *data ATTRIBUTE_UNUSED,
++              asection *input_section ATTRIBUTE_UNUSED,
++              bfd *output_bfd ATTRIBUTE_UNUSED,
++              char **error_message ATTRIBUTE_UNUSED)
++{
++  return bfd_reloc_ok;
++}
++
++
+ /* Perform a single relocation.  By default we use the standard BFD
+    routines, but a few relocs, we have to do them ourselves.  */
+@@ -1186,6 +1253,13 @@ avr_final_link_relocate (reloc_howto_typ
+       bfd_put_16 (input_bfd, (bfd_vma) srel &0x00ffff, contents);
+       break;
++    case R_AVR_DIFF8:
++    case R_AVR_DIFF16:
++    case R_AVR_DIFF32:
++      /* Nothing to do here, as contents already contains the diff value. */
++      r = bfd_reloc_ok;
++      break;
++
+     default:
+       r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+                                   contents, rel->r_offset,
+@@ -1502,6 +1576,99 @@ elf32_avr_object_p (bfd *abfd)
+                                   e_set);
+ }
++/* Returns whether the relocation type passed is a diff reloc. */
++
++static bfd_boolean
++elf32_avr_is_diff_reloc (Elf_Internal_Rela *irel)
++{
++  return (ELF32_R_TYPE (irel->r_info) == R_AVR_DIFF8
++          ||ELF32_R_TYPE (irel->r_info) == R_AVR_DIFF16
++          || ELF32_R_TYPE (irel->r_info) == R_AVR_DIFF32);
++}
++
++/* Reduce the value written in the section by count if the shrinked insn address
++   happens to fall between the two symbols for which this diff reloc was 
++   emitted. */
++
++static void
++elf32_avr_adjust_diff_reloc_value (bfd *abfd,
++                                   struct bfd_section *isec,
++                                   Elf_Internal_Rela *irel,
++                                   bfd_vma symval,
++                                   bfd_vma shrinked_insn_address,
++                                   int count)
++{
++  unsigned char *isec_contents = elf_section_data (isec)->this_hdr.contents;
++  if (isec_contents == NULL)
++  {
++    if (! bfd_malloc_and_get_section (abfd, isec, &isec_contents))
++      return;
++  }
++
++  isec_contents += irel->r_offset;
++
++  /* Read value written in object file. */
++ bfd_vma x = 0;
++  switch (ELF32_R_TYPE (irel->r_info))
++  {
++  case R_AVR_DIFF8:
++    {
++      x = *isec_contents;
++      break;
++    }
++  case R_AVR_DIFF16:
++    {
++      x = bfd_get_16 (abfd, isec_contents);
++      break;
++    }
++  case R_AVR_DIFF32:
++    {
++      x = bfd_get_32 (abfd, isec_contents);
++      break;
++    }
++  default:
++    {
++      BFD_FAIL();
++    }
++  }
++
++  /* For a diff reloc sym1 - sym2 the diff at assembly time (x) is written
++     into the object file. sym2's value is represented as 
++     <start_of_section> + addend. Check if the shrinked insn falls between 
++     sym1 and sym2. */
++
++  bfd_vma end_address = symval + irel->r_addend;
++  bfd_vma start_address = end_address - x;
++
++  if (shrinked_insn_address >= start_address && 
++      shrinked_insn_address <= end_address)
++  {
++    switch (ELF32_R_TYPE (irel->r_info))
++    {
++    case R_AVR_DIFF8:
++      {
++        *isec_contents = (x - count);
++        break;
++      }
++    case R_AVR_DIFF16:
++      {
++        bfd_put_16 (abfd, (x - count) & 0xFFFF, isec_contents);
++        break;
++      }
++    case R_AVR_DIFF32:
++      {
++        bfd_put_32 (abfd, (x - count) & 0xFFFFFFFF, isec_contents);
++        break;
++      }
++    default:
++      {
++        BFD_FAIL();
++      }
++    }
++
++    elf_section_data (isec)->this_hdr.contents = isec_contents - irel->r_offset;
++  }
++}
+ /* Delete some bytes from a section while changing the size of an instruction.
+    The parameter "addr" denotes the section-relative offset pointing just
+@@ -1640,6 +1807,14 @@ elf32_avr_relax_delete_bytes (bfd *abfd,
+                    if (symval <= shrinked_insn_address
+                        && (symval + irel->r_addend) > shrinked_insn_address)
+                      {
++                       if (elf32_avr_is_diff_reloc (irel))
++                         {
++                           elf32_avr_adjust_diff_reloc_value (abfd, isec, irel,
++                                                         symval, 
++                                                         shrinked_insn_address,
++                                                        count);
++                         }
++
+                        irel->r_addend -= count;
+                        if (debug_relax)
+diff -Naurp bfd/reloc.c bfd/reloc.c
+--- bfd/reloc.c        2013-01-02 16:27:32.000000000 +0530
++++ bfd/reloc.c        2013-01-02 16:28:50.000000000 +0530
+@@ -4414,6 +4414,19 @@ ENUM
+ ENUMDOC
+   This is a 7 bit reloc for the AVR that stores offset for 16bit sts/lds
+   instructions supported only by Tiny core
++ENUM
++  BFD_RELOC_AVR_DIFF8
++ENUMX
++  BFD_RELOC_AVR_DIFF16
++ENUMX
++  BFD_RELOC_AVR_DIFF32
++ENUMDOC
++  AVR relocations to mark the difference of two local symbols.
++  These are only needed to support linker relaxation and can be ignored
++  when not relaxing.  The field is set to the value of the difference
++  assuming no relaxation.  The relocation encodes the position of the
++  second symbol so the linker can determine whether to adjust the field
++  value.
+ ENUM
+   BFD_RELOC_RL78_NEG8
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2013-01-02 16:28:02.000000000 +0530
++++ gas/config/tc-avr.c        2013-01-02 16:28:50.000000000 +0530
+@@ -342,9 +342,11 @@ struct avr_opt_s
+   int all_opcodes;  /* -mall-opcodes: accept all known AVR opcodes.  */
+   int no_skip_bug;  /* -mno-skip-bug: no warnings for skipping 2-word insns.  */
+   int no_wrap;      /* -mno-wrap: reject rjmp/rcall with 8K wrap-around.  */
++  int link_relax;   /* -mlink-relax: generate relocations for linker 
++                       relaxation. */
+ };
+-static struct avr_opt_s avr_opt = { 0, 0, 0 };
++static struct avr_opt_s avr_opt = { 0, 0, 0, 0 };
+ const char EXP_CHARS[] = "eE";
+ const char FLT_CHARS[] = "dD";
+@@ -404,7 +406,8 @@ enum options
+ {
+   OPTION_ALL_OPCODES = OPTION_MD_BASE + 1,
+   OPTION_NO_SKIP_BUG,
+-  OPTION_NO_WRAP
++  OPTION_NO_WRAP,
++  OPTION_LINK_RELAX
+ };
+ struct option md_longopts[] =
+@@ -413,6 +416,7 @@ struct option md_longopts[] =
+   { "mall-opcodes", no_argument, NULL, OPTION_ALL_OPCODES },
+   { "mno-skip-bug", no_argument, NULL, OPTION_NO_SKIP_BUG },
+   { "mno-wrap",     no_argument, NULL, OPTION_NO_WRAP     },
++  { "mlink-relax",  no_argument, NULL, OPTION_LINK_RELAX  },
+   { NULL, no_argument, NULL, 0 }
+ };
+@@ -518,7 +522,9 @@ md_show_usage (FILE *stream)
+       "  -mno-skip-bug    disable warnings for skipping two-word instructions\n"
+       "                   (default for avr4, avr5)\n"
+       "  -mno-wrap        reject rjmp/rcall instructions with 8K wrap-around\n"
+-      "                   (default for avr3, avr5)\n"));
++      "                   (default for avr3, avr5)\n"
++    "  -mlink-relax     generate relocations for linker relaxation\n"
++    ));
+   show_mcu_list (stream);
+ }
+@@ -580,6 +586,9 @@ md_parse_option (int c, char *arg)
+     case OPTION_NO_WRAP:
+       avr_opt.no_wrap = 1;
+       return 1;
++    case OPTION_LINK_RELAX:
++      avr_opt.link_relax = 1;
++      return 1;
+     }
+   return 0;
+@@ -630,6 +639,7 @@ md_begin (void)
+     }
+   bfd_set_arch_mach (stdoutput, TARGET_ARCH, avr_mcu->mach);
++  linkrelax = avr_opt.link_relax;
+ }
+ /* Resolve STR as a constant expression and return the result.
+@@ -1205,6 +1215,53 @@ md_pcrel_from_section (fixS *fixp, segT 
+   return fixp->fx_frag->fr_address + fixp->fx_where;
+ }
++static bfd_boolean
++relaxable_section (asection *sec)
++{
++  return (sec->flags & SEC_DEBUGGING) == 0;
++}
++
++/* Does whatever the xtensa port does. */
++int
++avr_validate_fix_sub (fixS *fix)
++{
++  segT add_symbol_segment, sub_symbol_segment;
++
++  /* The difference of two symbols should be resolved by the assembler when
++     linkrelax is not set.  If the linker may relax the section containing
++     the symbols, then an Xtensa DIFF relocation must be generated so that
++     the linker knows to adjust the difference value.  */
++  if (!linkrelax || fix->fx_addsy == NULL)
++    return 0;
++
++  /* Make sure both symbols are in the same segment, and that segment is
++     "normal" and relaxable.  If the segment is not "normal", then the
++     fix is not valid.  If the segment is not "relaxable", then the fix
++     should have been handled earlier.  */
++  add_symbol_segment = S_GET_SEGMENT (fix->fx_addsy);
++  if (! SEG_NORMAL (add_symbol_segment) ||
++      ! relaxable_section (add_symbol_segment))
++    return 0;
++
++  sub_symbol_segment = S_GET_SEGMENT (fix->fx_subsy);
++  return (sub_symbol_segment == add_symbol_segment);
++}
++
++/* TC_FORCE_RELOCATION hook */
++
++/* If linkrelax is turned on, and the symbol to relocate
++   against is in a relaxable segment, don't compute the value -
++   generate a relocation instead. */
++int
++avr_force_relocation (fixS *fix)
++{
++  if (linkrelax && fix->fx_addsy
++      && relaxable_section (S_GET_SEGMENT (fix->fx_addsy)))
++    return 1;
++
++  return generic_force_reloc (fix);
++}
++
+ /* GAS will call this for each fixup.  It should store the correct
+    value in the object file.  */
+@@ -1228,11 +1285,46 @@ md_apply_fix (fixS *fixP, valueT * valP,
+         fixP->fx_done = 1;
+       }
+     }
++  else if (linkrelax && fixP->fx_subsy)
++    {
++      /* For a subtraction relocation expression, generate one
++         of the DIFF relocs, with the value being the difference.
++         Note that a sym1 - sym2 expression is adjusted into a 
++         section_start_sym + sym2_offset_from_section_start - sym1
++         expression. fixP->fx_addsy holds the section start symbol,
++         fixP->fx_offset holds sym2's offset, and fixP->fx_subsy
++         holds sym1. Calculate and write value, but leave fx_offset
++         as is - during relaxation, fx_offset - value gives sym1's value */
++
++       switch (fixP->fx_r_type)
++         {
++           case BFD_RELOC_8:
++             fixP->fx_r_type = BFD_RELOC_AVR_DIFF8;
++             break;
++           case BFD_RELOC_16:
++             fixP->fx_r_type = BFD_RELOC_AVR_DIFF16;
++             break;
++           case BFD_RELOC_32:
++             fixP->fx_r_type = BFD_RELOC_AVR_DIFF32;
++             break;
++           default:
++             as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex"));
++             break;
++         }
++
++      value = S_GET_VALUE (fixP->fx_addsy) + 
++          fixP->fx_offset - S_GET_VALUE (fixP->fx_subsy);
++      fixP->fx_subsy = NULL;
++  }
+   /* We don't actually support subtracting a symbol.  */
+   if (fixP->fx_subsy != (symbolS *) NULL)
+     as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex"));
++  /* For the DIFF relocs, write the value into the object file while still
++     keeping fx_done FALSE, as both the difference (recorded in the object file)
++     and the sym offset (part of fixP) are needed at link relax time */
++  where = (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where;
+   switch (fixP->fx_r_type)
+     {
+     default:
+@@ -1242,6 +1334,19 @@ md_apply_fix (fixS *fixP, valueT * valP,
+     case BFD_RELOC_AVR_13_PCREL:
+     case BFD_RELOC_32:
+     case BFD_RELOC_16:
++      break;
++    case BFD_RELOC_AVR_DIFF8:
++      if (value > 255 || value < -128)
++        as_warn_where (fixP->fx_file, fixP->fx_line,
++                           _("operand out of range: %ld"), value);
++      *where = value;
++        break;
++    case BFD_RELOC_AVR_DIFF16:
++      bfd_putl16 ((bfd_vma) value, where);
++      break;
++    case BFD_RELOC_AVR_DIFF32:
++      bfd_putl16 ((bfd_vma) value, where);
++      break;
+     case BFD_RELOC_AVR_CALL:
+       break;
+     }
+diff -Naurp gas/config/tc-avr.h gas/config/tc-avr.h
+--- gas/config/tc-avr.h        2011-03-29 23:46:15.000000000 +0530
++++ gas/config/tc-avr.h        2013-01-02 16:28:50.000000000 +0530
+@@ -93,6 +93,18 @@ extern void avr_cons_fix_new (fragS *,in
+    visible symbols can be overridden.  */
+ #define EXTERN_FORCE_RELOC 0
++/* If defined, this macro allows control over whether fixups for a
++   given section will be processed when the linkrelax variable is
++   set. Define it to zero and handle things in md_apply_fix instead.*/
++#define TC_LINKRELAX_FIXUP(SEG) 0
++
++/* If this macro returns non-zero, it guarantees that a relocation will be emitted
++   even when the value can be resolved locally. Do that if linkrelax is turned on */
++#define TC_FORCE_RELOCATION(fix)      avr_force_relocation (fix)
++#define TC_FORCE_RELOCATION_SUB_SAME(fix, seg) \
++  (! SEG_NORMAL (seg) || avr_force_relocation (fix))
++extern int avr_force_relocation (struct fix *);
++
+ /* Values passed to md_apply_fix don't include the symbol value.  */
+ #define MD_APPLY_SYM_VALUE(FIX) 0
+@@ -144,6 +156,12 @@ extern long md_pcrel_from_section (struc
+     {                                                        \
+       goto SKIP;                                             \
+    }
++  
++/* This macro is evaluated for any fixup with a fx_subsy that
++   fixup_segment cannot reduce to a number.  If the macro returns
++   false an error will be reported. */
++#define TC_VALIDATE_FIX_SUB(fix, seg)   avr_validate_fix_sub (fix)                                                                    
++extern int avr_validate_fix_sub (struct fix *);
+ /* This target is buggy, and sets fix size too large.  */
+ #define TC_FX_SIZE_SLACK(FIX) 2
+diff -Naurp include/elf/avr.h include/elf/avr.h
+--- include/elf/avr.h  2013-01-02 16:27:32.000000000 +0530
++++ include/elf/avr.h  2013-01-02 16:28:50.000000000 +0530
+@@ -83,6 +83,9 @@ START_RELOC_NUMBERS (elf_avr_reloc_type)
+      RELOC_NUMBER (R_AVR_8_HI8,                28)
+      RELOC_NUMBER (R_AVR_8_HLO8,               29)
+      RELOC_NUMBER (R_AVR_7_LDS16,              30)
++     RELOC_NUMBER (R_AVR_DIFF8,                31)
++     RELOC_NUMBER (R_AVR_DIFF16,               32)
++     RELOC_NUMBER (R_AVR_DIFF32,               33)
+ END_RELOC_NUMBERS (R_AVR_max)
+ #endif /* _ELF_AVR_H */
diff --git a/010-disable-demand-paging.patch b/010-disable-demand-paging.patch
new file mode 100644 (file)
index 0000000..5315553
--- /dev/null
@@ -0,0 +1,28 @@
+diff --git ld/emultempl/avrelf.em ld/emultempl/avrelf.em
+index e0d6357..7f7dcf0 100644
+--- ld/emultempl/avrelf.em
++++ ld/emultempl/avrelf.em
+@@ -166,6 +166,15 @@ avr_elf_after_allocation (void)
+     }
+ }
++static void
++avr_elf_before_parse (void)
++{
++  /* Don't create a demand-paged executable, since this feature isn't
++     meaninful in AVR. */
++  config.magic_demand_paged = FALSE;
++
++  gld${EMULATION_NAME}_before_parse ();
++}
+ EOF
+@@ -262,6 +271,7 @@ PARSE_AND_LIST_ARGS_CASES='
+ #
+ # Put these extra avr-elf routines in ld_${EMULATION_NAME}_emulation
+ #
++LDEMUL_BEFORE_PARSE=avr_elf_before_parse
+ LDEMUL_BEFORE_ALLOCATION=avr_elf_${EMULATION_NAME}_before_allocation
+ LDEMUL_AFTER_ALLOCATION=avr_elf_after_allocation
+ LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=avr_elf_create_output_section_statements
similarity index 72%
rename from 300-binutils-avr-size.patch
rename to 200-binutils-avr-size.patch
index 047fb2e19f7533bba283da988dc6dafd8f5814e2..71176e603ffa30acc94a3b7029fb249a732065f0 100644 (file)
@@ -1,7 +1,6 @@
-AVR specific only
-===========================================================
---- binutils/size.c    2007-08-06 13:56:14.000000000 -0600
-+++ binutils/size.c    2007-09-13 09:13:10.281250000 -0600
+diff -Naurp binutils/size.c binutils/size.c
+--- binutils/size.c    2013-02-06 16:32:42.000000000 +0530
++++ binutils/size.c    2013-02-06 16:53:39.000000000 +0530
 @@ -36,10 +36,31 @@
  #include "getopt.h"
  #include "bucomm.h"
@@ -47,7 +46,7 @@ AVR specific only
  static int show_version = 0;
  static int show_help = 0;
  static int show_totals = 0;
-@@ -64,6 +84,246 @@ static bfd_size_type total_textsize;
+@@ -64,6 +84,308 @@ static bfd_size_type total_textsize;
  /* Program exit status.  */
  static int return_code = 0;
  
@@ -58,6 +57,7 @@ AVR specific only
 +#define AVR128 128UL
 +#define AVR256 256UL
 +#define AVR512 512UL
++#define AVR2112 2112UL
 +#define AVR1K 1024UL
 +#define AVR2K 2048UL
 +#define AVR4K 4096UL
@@ -75,6 +75,8 @@ AVR specific only
 +#define AVR200K 204800UL
 +#define AVR256K 262144UL
 +#define AVR264K 270336UL
++#define AVR384K 393216UL
++#define AVR392K 401408UL
 +
 +typedef struct
 +{
@@ -86,42 +88,79 @@ AVR specific only
 +
 +avr_device_t avr[] =
 +{
-+      {"atxmega256a3",  AVR264K, AVR16K, AVR4K},
-+      {"atxmega256a3b", AVR264K, AVR16K, AVR4K},
-+      {"atxmega256d3",  AVR264K, AVR16K, AVR4K},
-+
-+      {"atmega2560",    AVR256K, AVR8K,  AVR4K},
-+      {"atmega2561",    AVR256K, AVR8K,  AVR4K},
-+
-+      {"atxmega192a3",  AVR200K, AVR16K, AVR2K},
-+      {"atxmega192d3",  AVR200K, AVR16K, AVR2K},
-+
-+      {"atxmega128a1",  AVR136K, AVR8K,  AVR2K},
-+      {"atxmega128a1u", AVR136K, AVR8K,  AVR2K},
-+      {"atxmega128a3",  AVR136K, AVR8K,  AVR2K},
-+      {"atxmega128d3",  AVR136K, AVR8K,  AVR2K},
-+
-+      {"at43usb320",    AVR128K, 608UL,  0UL},
-+      {"at90can128",    AVR128K, AVR4K,  AVR4K},
-+      {"at90usb1286",   AVR128K, AVR8K,  AVR4K},
-+      {"at90usb1287",   AVR128K, AVR8K,  AVR4K},
-+      {"atmega128",     AVR128K, AVR4K,  AVR4K},
-+      {"atmega1280",    AVR128K, AVR8K,  AVR4K},
-+      {"atmega1281",    AVR128K, AVR8K,  AVR4K},
-+      {"atmega1284p",   AVR128K, AVR16K, AVR4K},
-+      {"atmega128rfa1", AVR128K, AVR16K, AVR4K},
-+      {"atmega103",     AVR128K, 4000UL, AVR4K},
++      {"atxmega384c3",  AVR392K, AVR32K, AVR4K},
++ 
++      {"atxmega384d3",  AVR384K, AVR16K, AVR4K},
++  
++      {"atmega256rfr2", AVR256K, AVR32K, AVR8K},
++      {"atmega2564rfr2",AVR256K, AVR32K, AVR8K},
++ 
++      {"atxmega256a3",  AVR264K, AVR16K, AVR4K},
++      {"atxmega256a3u", AVR264K, AVR16K, AVR4K},
++      {"atxmega256a3b", AVR264K, AVR16K, AVR4K},
++      {"atxmega256a3bu",AVR264K, AVR16K, AVR4K},
++      {"atxmega256c3",  AVR264K, AVR16K, AVR4K},
++      {"atxmega256d3",  AVR264K, AVR16K, AVR4K},
++  
++      {"atmega2560",    AVR256K, AVR8K,  AVR4K},
++      {"atmega2561",    AVR256K, AVR8K,  AVR4K},
++  
++      {"atxmega192a3",  AVR200K, AVR16K, AVR2K},
++      {"atxmega192a3u", AVR200K, AVR16K, AVR2K},
++      {"atxmega192c3",  AVR200K, AVR16K, AVR2K},
++      {"atxmega192d3",  AVR200K, AVR16K, AVR2K},
++  
++      {"atmega128rfr2", AVR128K, AVR16K, AVR4K},
++      {"atmega1284rfr2",AVR128K, AVR16K, AVR4K},
++ 
++      {"atxmega128a1",  AVR136K, AVR8K,  AVR2K},
++      {"atxmega128a1u", AVR136K, AVR8K,  AVR2K},
++      {"atxmega128a4u", AVR136K, AVR8K,  AVR2K},
++      {"atxmega128a3",  AVR136K, AVR8K,  AVR2K},
++      {"atxmega128a3u", AVR136K, AVR8K,  AVR2K},
++      {"atxmega128b1",  AVR136K, AVR8K,  AVR2K},
++      {"atxmega128b3",  AVR136K, AVR8K,  AVR2K},
++      {"atxmega128c3",  AVR136K, AVR8K,  AVR2K},
++      {"atxmega128d3",  AVR136K, AVR8K,  AVR2K},
++      {"atxmega128d4",  AVR136K, AVR8K,  AVR2K},
++  
++      {"at43usb320",    AVR128K, 608UL,  0UL},
++      {"at90can128",    AVR128K, AVR4K,  AVR4K},
++      {"at90usb1286",   AVR128K, AVR8K,  AVR4K},
++      {"at90usb1287",   AVR128K, AVR8K,  AVR4K},
++      {"atmega128",     AVR128K, AVR4K,  AVR4K},
++      {"atmega128a",    AVR128K, AVR4K,  AVR4K},
++      {"atmega1280",    AVR128K, AVR8K,  AVR4K},
++      {"atmega1281",    AVR128K, AVR8K,  AVR4K},
++      {"atmega1284",    AVR128K, AVR16K, AVR4K},
++      {"atmega1284p",   AVR128K, AVR16K, AVR4K},
++      {"atmega128rfa1", AVR128K, AVR16K, AVR4K},
++      {"atmega103",     AVR128K, 4000UL, AVR4K},
 +
 +      {"atxmega64a1",   AVR68K,  AVR4K,  AVR2K},
 +      {"atxmega64a1u",  AVR68K,  AVR4K,  AVR2K},
 +      {"atxmega64a3",   AVR68K,  AVR4K,  AVR2K},
++      {"atxmega64a3u",  AVR68K,  AVR4K,  AVR2K},
++      {"atxmega64a4u",  AVR68K,  AVR4K,  AVR2K},
++      {"atxmega64b1",   AVR68K,  AVR4K,  AVR2K},
++      {"atxmega64b3",   AVR68K,  AVR4K,  AVR2K},
++      {"atxmega64c3",   AVR68K,  AVR4K,  AVR2K},
 +      {"atxmega64d3",   AVR68K,  AVR4K,  AVR2K},
++      {"atxmega64d4",   AVR68K,  AVR4K,  AVR2K},
++
++      {"atmega64rfr2",  AVR64K,  AVR8K,  AVR2K},
++      {"atmega644rfr2", AVR64K,  AVR8K,  AVR2K},
 +
 +      {"at90can64",     AVR64K,  AVR4K,  AVR2K},
 +      {"at90scr100",    AVR64K,  AVR4K,  AVR2K},
 +      {"at90usb646",    AVR64K,  AVR4K,  AVR2K},
 +      {"at90usb647",    AVR64K,  AVR4K,  AVR2K},
++      {"ata5505",       AVR16K,  AVR512, AVR512},
++      {"ata5790",       AVR16K,  AVR512, AVR2112},
++      {"ata5795",       AVR8K,   AVR512, AVR2112},
++      {"ata5272",       AVR8K,   AVR512, AVR512},
 +      {"atmega64",      AVR64K,  AVR4K,  AVR2K},
++      {"atmega64a",     AVR64K,  AVR4K,  AVR2K},
 +      {"atmega640",     AVR64K,  AVR8K,  AVR4K},
 +      {"atmega644",     AVR64K,  AVR4K,  AVR2K},
 +      {"atmega644a",    AVR64K,  AVR4K,  AVR2K},
@@ -142,16 +181,22 @@ AVR specific only
 +      {"atmega64c1",    AVR64K,  AVR4K,  AVR2K},
 +      {"atmega64hve",   AVR64K,  AVR4K,  AVR1K},
 +      {"atmega64m1",    AVR64K,  AVR4K,  AVR2K},
-+   {"m3000",         AVR64K,  AVR4K,  0UL},
++      {"m3000",         AVR64K,  AVR4K,  0UL},
 +
 +      {"atmega406",     AVR40K,  AVR2K,  AVR512},
 +
 +      {"atxmega32a4",   AVR36K,  AVR4K,  AVR1K},
++      {"atxmega32a4u",  AVR36K,  AVR4K,  AVR1K},
++      {"atxmega32c4",   AVR36K,  AVR4K,  AVR1K},
 +      {"atxmega32d4",   AVR36K,  AVR4K,  AVR1K},
++      {"atxmega32e5",   AVR36K,  AVR4K,  AVR1K},
++      {"atxmega16e5",   AVR20K,  AVR2K,  AVR512},
++      {"atxmega8e5",    AVR10K,  AVR1K,  AVR512},
 +
 +      {"at90can32",     AVR32K,  AVR2K,  AVR1K},
 +      {"at94k",         AVR32K,  AVR4K,  0UL},
 +      {"atmega32",      AVR32K,  AVR2K,  AVR1K},
++      {"atmega32a",     AVR32K,  AVR2K,  AVR1K},
 +      {"atmega323",     AVR32K,  AVR2K,  AVR1K},
 +      {"atmega324a",    AVR32K,  AVR2K,  AVR1K},
 +      {"atmega324p",    AVR32K,  AVR2K,  AVR1K},
@@ -159,9 +204,11 @@ AVR specific only
 +      {"atmega325",     AVR32K,  AVR2K,  AVR1K},
 +      {"atmega325a",    AVR32K,  AVR2K,  AVR1K},
 +      {"atmega325p",    AVR32K,  AVR2K,  AVR1K},
++      {"atmega325pa",   AVR32K,  AVR2K,  AVR1K},
 +      {"atmega3250",    AVR32K,  AVR2K,  AVR1K},
 +      {"atmega3250a",   AVR32K,  AVR2K,  AVR1K},
 +      {"atmega3250p",   AVR32K,  AVR2K,  AVR1K},
++      {"atmega3250pa",  AVR32K,  AVR2K,  AVR1K},
 +      {"atmega328",     AVR32K,  AVR2K,  AVR1K},
 +      {"atmega328p",    AVR32K,  AVR2K,  AVR1K},
 +      {"atmega329",     AVR32K,  AVR2K,  AVR1K},
@@ -171,9 +218,10 @@ AVR specific only
 +      {"atmega3290",    AVR32K,  AVR2K,  AVR1K},
 +      {"atmega3290a",   AVR32K,  AVR2K,  AVR1K},
 +      {"atmega3290p",   AVR32K,  AVR2K,  AVR1K},
++      {"atmega3290pa",  AVR32K,  AVR2K,  AVR1K},
 +      {"atmega32hvb",   AVR32K,  AVR2K,  AVR1K},
++      {"atmega32hvbrevb",AVR32K, AVR2K,  AVR1K},
 +      {"atmega32c1",    AVR32K,  AVR2K,  AVR1K},
-+   {"atmega32hvb",   AVR32K,  AVR2K,  AVR1K},
 +      {"atmega32m1",    AVR32K,  AVR2K,  AVR1K},
 +      {"atmega32u2",    AVR32K,  AVR1K,  AVR1K},
 +      {"atmega32u4",    AVR32K,  2560UL, AVR1K},
@@ -182,9 +230,12 @@ AVR specific only
 +      {"at43usb355",    AVR24K,  1120UL,   0UL},
 +
 +      {"atxmega16a4",   AVR20K,  AVR2K,  AVR1K},
++        {"atxmega16a4u",  AVR20K,  AVR2K,  AVR1K},
++      {"atxmega16c4",   AVR20K,  AVR2K,  AVR1K},
 +      {"atxmega16d4",   AVR20K,  AVR2K,  AVR1K},
 +
 +      {"at76c711",      AVR16K,  AVR2K,  0UL},
++      {"at90pwm161",    AVR16K,  AVR1K,  AVR512},
 +      {"at90pwm216",    AVR16K,  AVR1K,  AVR512},
 +      {"at90pwm316",    AVR16K,  AVR1K,  AVR512},
 +      {"at90usb162",    AVR16K,  AVR512, AVR512},
@@ -196,20 +247,25 @@ AVR specific only
 +      {"atmega164",     AVR16K,  AVR1K,  AVR512},
 +      {"atmega164a",    AVR16K,  AVR1K,  AVR512},
 +      {"atmega164p",    AVR16K,  AVR1K,  AVR512},
++      {"atmega164pa",   AVR16K,  AVR1K,  AVR512},
 +      {"atmega165a",    AVR16K,  AVR1K,  AVR512},
 +      {"atmega165",     AVR16K,  AVR1K,  AVR512},
 +      {"atmega165p",    AVR16K,  AVR1K,  AVR512},
++      {"atmega165pa",   AVR16K,  AVR1K,  AVR512},
 +      {"atmega168",     AVR16K,  AVR1K,  AVR512},
 +      {"atmega168a",    AVR16K,  AVR1K,  AVR512},
 +      {"atmega168p",    AVR16K,  AVR1K,  AVR512},
++      {"atmega168pa",   AVR16K,  AVR1K,  AVR512},
 +      {"atmega169",     AVR16K,  AVR1K,  AVR512},
 +      {"atmega169a",    AVR16K,  AVR1K,  AVR512},
 +      {"atmega169p",    AVR16K,  AVR1K,  AVR512},
 +      {"atmega169pa",   AVR16K,  AVR1K,  AVR512},
 +      {"atmega16hva",   AVR16K,  768UL,  AVR256},
 +      {"atmega16hva2",  AVR16K,  AVR1K,  AVR256},
-+   {"atmega16hvb",   AVR16K,  AVR1K,  AVR512},
++        {"atmega16hvb",   AVR16K,  AVR1K,  AVR512},
++        {"atmega16hvbrevb",AVR16K, AVR1K,  AVR512},
 +      {"atmega16m1",    AVR16K,  AVR1K,  AVR512},
++      {"attiny1634",    AVR16K,  AVR1K,  AVR256},
 +      {"atmega16u2",    AVR16K,  AVR512, AVR512},
 +      {"atmega16u4",    AVR16K,  1280UL, AVR512},
 +      {"attiny167",     AVR16K,  AVR512, AVR512},
@@ -224,8 +280,11 @@ AVR specific only
 +      {"at90s8515",     AVR8K,   AVR512, AVR512},
 +      {"at90s8535",     AVR8K,   AVR512, AVR512},
 +      {"at90usb82",     AVR8K,   AVR512, AVR512},
++      {"ata6285",       AVR8K,   AVR512, 320UL},
++      {"ata6286",       AVR8K,   AVR512, 320UL},
 +      {"ata6289",       AVR8K,   AVR512, 320UL},
 +      {"atmega8",       AVR8K,   AVR1K,  AVR512},
++      {"atmega8a",      AVR8K,   AVR1K,  AVR512},
 +      {"atmega8515",    AVR8K,   AVR512, AVR512},
 +      {"atmega8535",    AVR8K,   AVR512, AVR512},
 +      {"atmega88",      AVR8K,   AVR1K,  AVR512},
@@ -247,6 +306,7 @@ AVR specific only
 +      {"at90s4434",     AVR4K,   352UL,  AVR256},
 +      {"atmega48",      AVR4K,   AVR512, AVR256},
 +      {"atmega48a",     AVR4K,   AVR512, AVR256},
++      {"atmega48pa",    AVR4K,   AVR512, AVR256},
 +      {"atmega48p",     AVR4K,   AVR512, AVR256},
 +      {"attiny4313",    AVR4K,   AVR256, AVR256},
 +      {"attiny43u",     AVR4K,   AVR256, AVR64},
@@ -256,13 +316,14 @@ AVR specific only
 +      {"attiny461",     AVR4K,   AVR256, AVR256},
 +      {"attiny461a",    AVR4K,   AVR256, AVR256},
 +      {"attiny48",      AVR4K,   AVR256, AVR64},
++      {"attiny828",     AVR8K,   AVR512, AVR256},
 +
 +      {"at86rf401",     AVR2K,   224UL,  AVR128},
 +      {"at90s2313",     AVR2K,   AVR128, AVR128},
 +      {"at90s2323",     AVR2K,   AVR128, AVR128},
 +      {"at90s2333",     AVR2K,   224UL,  AVR128},
 +      {"at90s2343",     AVR2K,   AVR128, AVR128},
-+   {"attiny20",      AVR2K,   AVR128, 0UL},
++      {"attiny20",      AVR2K,   AVR128, 0UL},
 +      {"attiny22",      AVR2K,   224UL,  AVR128},
 +      {"attiny2313",    AVR2K,   AVR128, AVR128},
 +      {"attiny2313a",   AVR2K,   AVR128, AVR128},
@@ -273,19 +334,19 @@ AVR specific only
 +      {"attiny261",     AVR2K,   AVR128, AVR128},
 +      {"attiny261a",    AVR2K,   AVR128, AVR128},
 +      {"attiny28",      AVR2K,   0UL,    0UL},
-+   {"attiny40",      AVR2K,   AVR256, 0UL},
++      {"attiny40",      AVR2K,   AVR256, 0UL},
 +
 +      {"at90s1200",     AVR1K,   0UL,    AVR64},
-+   {"attiny9",       AVR1K,   32UL,   0UL},
-+   {"attiny10",      AVR1K,   32UL,   0UL},
++      {"attiny9",       AVR1K,   32UL,   0UL},
++      {"attiny10",      AVR1K,   32UL,   0UL},
 +      {"attiny11",      AVR1K,   0UL,    AVR64},
 +      {"attiny12",      AVR1K,   0UL,    AVR64},
 +      {"attiny13",      AVR1K,   AVR64,  AVR64},
 +      {"attiny13a",     AVR1K,   AVR64,  AVR64},
 +      {"attiny15",      AVR1K,   0UL,    AVR64},
 +
-+   {"attiny4",       AVR512,  32UL,   0UL},
-+   {"attiny5",       AVR512,  32UL,   0UL},
++      {"attiny4",       AVR512,  32UL,   0UL},
++      {"attiny5",       AVR512,  32UL,   0UL},
 +};
 +
 +static char *avrmcu = NULL;
@@ -294,17 +355,18 @@ AVR specific only
  static char *target = NULL;
  
  /* Forward declarations.  */
-@@ -79,7 +337,8 @@ usage (FILE *stream, int status)
+@@ -79,7 +401,9 @@ usage (FILE *stream, int status)
    fprintf (stream, _(" Displays the sizes of sections inside binary files\n"));
    fprintf (stream, _(" If no input file(s) are specified, a.out is assumed\n"));
    fprintf (stream, _(" The options are:\n\
 -  -A|-B     --format={sysv|berkeley}  Select output style (default is %s)\n\
 +  -A|-B|-C  --format={sysv|berkeley|avr}  Select output style (default is %s)\n\
 +            --mcu=<avrmcu>            MCU name for AVR format only\n\
++            --mlist-devices           List all supported MCUs\n\
    -o|-d|-x  --radix={8|10|16}         Display numbers in octal, decimal or hex\n\
    -t        --totals                  Display the total sizes (Berkeley only)\n\
              --common                  Display total size for *COM* syms\n\
-@@ -88,11 +337,7 @@ usage (FILE *stream, int status)
+@@ -88,11 +412,7 @@ usage (FILE *stream, int status)
    -h        --help                    Display this information\n\
    -v        --version                 Display the program's version\n\
  \n"),
@@ -317,23 +379,55 @@ AVR specific only
  );
    list_supported_targets (program_name, stream);
    if (REPORT_BUGS_TO[0] && status == 0)
-@@ -103,6 +359,7 @@ usage (FILE *stream, int status)
+@@ -103,6 +423,8 @@ usage (FILE *stream, int status)
  #define OPTION_FORMAT (200)
  #define OPTION_RADIX (OPTION_FORMAT + 1)
  #define OPTION_TARGET (OPTION_RADIX + 1)
 +#define OPTION_MCU (OPTION_TARGET + 1) 
++#define OPTION_MLIST_DEVICES (OPTION_MCU + 1)
  
  static struct option long_options[] =
  {
-@@ -110,6 +368,7 @@ static struct option long_options[] =
+@@ -110,12 +432,38 @@ static struct option long_options[] =
    {"format", required_argument, 0, OPTION_FORMAT},
    {"radix", required_argument, 0, OPTION_RADIX},
    {"target", required_argument, 0, OPTION_TARGET},
 +  {"mcu", required_argument, 0, 203},
++  {"mlist-devices", no_argument, 0, OPTION_MLIST_DEVICES},
    {"totals", no_argument, &show_totals, 1},
    {"version", no_argument, &show_version, 1},
    {"help", no_argument, &show_help, 1},
-@@ -141,7 +399,7 @@ main (int argc, char **argv)
+   {0, no_argument, 0, 0}
+ };
++static void list_supported_devices (FILE *stream, int status)
++{
++  unsigned int i ;
++  int llen = 0;
++  fprintf (stream, _("List of supported devices:\n"));
++  for (i = 0; i < sizeof(avr) / sizeof(avr[0]); i++)
++  {
++    int slen = strlen(avr[i].name);
++    llen += slen + 1 ;
++    if (llen < 75)
++    {
++      fprintf (stream, _(" %s"), avr[i].name);
++    }
++    else
++    {
++      fprintf (stream, _("\n %s"), avr[i].name);
++      llen = slen + 2 ;
++    }
++  }
++  fprintf (stream, "\n");
++
++  exit (status);
++}
++
+ int main (int, char **);
+ int
+@@ -141,7 +489,7 @@ main (int argc, char **argv)
    bfd_init ();
    set_default_bfd_target ();
  
@@ -342,7 +436,7 @@ AVR specific only
                           (int *) 0)) != EOF)
      switch (c)
        {
-@@ -150,11 +409,15 @@ main (int argc, char **argv)
+@@ -150,11 +498,15 @@ main (int argc, char **argv)
          {
          case 'B':
          case 'b':
@@ -360,18 +454,22 @@ AVR specific only
            break;
          default:
            non_fatal (_("invalid argument to --format: %s"), optarg);
-@@ -162,6 +424,10 @@ main (int argc, char **argv)
+@@ -162,6 +514,14 @@ main (int argc, char **argv)
          }
        break;
  
 +      case OPTION_MCU:
 +      avrmcu = optarg;
 +      break;
++
++      case OPTION_MLIST_DEVICES:
++      list_supported_devices (stdout, 1);
++      break;
 +
        case OPTION_TARGET:
        target = optarg;
        break;
-@@ -190,11 +457,14 @@ main (int argc, char **argv)
+@@ -190,11 +550,14 @@ main (int argc, char **argv)
        break;
  
        case 'A':
@@ -388,7 +486,7 @@ AVR specific only
        case 'v':
        case 'V':
        show_version = 1;
-@@ -240,7 +509,7 @@ main (int argc, char **argv)
+@@ -240,7 +603,7 @@ main (int argc, char **argv)
      for (; optind < argc;)
        display_file (argv[optind++]);
  
@@ -397,7 +495,7 @@ AVR specific only
      {
        bfd_size_type total = total_textsize + total_datasize + total_bsssize;
  
-@@ -599,13 +869,117 @@ print_sysv_format (bfd *file)
+@@ -599,13 +962,117 @@ print_sysv_format (bfd *file)
    printf ("\n\n");
  }
  
similarity index 80%
rename from 303-binutils-dwarf2-AVRStudio-workaround.patch
rename to 201-binutils-dwarf2-AVRStudio-workaround.patch
index 0813ff1dc6f15251e7f21c97d107de489e10e902..2d541c0113bd413e650fc7dcdeb3feff9584ed69 100644 (file)
@@ -1,7 +1,7 @@
 diff -Naurp gas/dwarf2dbg.c gas/dwarf2dbg.c
---- gas/dwarf2dbg.c    2011-11-28 13:04:11.000000000 +0530
-+++ gas/dwarf2dbg.c    2011-11-28 16:33:02.000000000 +0530
-@@ -116,8 +116,11 @@
+--- gas/dwarf2dbg.c    2012-12-06 15:20:06.000000000 +0530
++++ gas/dwarf2dbg.c    2012-12-06 15:06:44.000000000 +0530
+@@ -126,8 +126,11 @@
     Note: If you want to change this, you'll have to update the
     "standard_opcode_lengths" table that is emitted below in
     out_debug_line().  */
@@ -14,7 +14,7 @@ diff -Naurp gas/dwarf2dbg.c gas/dwarf2dbg.c
  #ifndef DWARF2_LINE_BASE
    /* Minimum line offset in a special line info. opcode.  This value
       was chosen to give a reasonable range of values.  */
-@@ -1482,9 +1485,11 @@ out_debug_line (segT line_seg)
+@@ -1520,9 +1523,11 @@ out_debug_line (segT line_seg)
    out_byte (0);                       /* DW_LNS_set_basic_block */
    out_byte (0);                       /* DW_LNS_const_add_pc */
    out_byte (1);                       /* DW_LNS_fixed_advance_pc */
diff --git a/202-binutils-bug13113.patch b/202-binutils-bug13113.patch
new file mode 100644 (file)
index 0000000..ef59edd
--- /dev/null
@@ -0,0 +1,48 @@
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2013-01-02 16:33:12.000000000 +0530
++++ gas/config/tc-avr.c        2013-01-02 16:44:28.000000000 +0530
+@@ -404,7 +404,8 @@ static struct hash_control *avr_mod_hash
+ #define OPTION_MMCU 'm'
+ enum options
+ {
+-  OPTION_ALL_OPCODES = OPTION_MD_BASE + 1,
++  OPTION_MLIST_DEVICES = OPTION_MD_BASE + 1,
++  OPTION_ALL_OPCODES,
+   OPTION_NO_SKIP_BUG,
+   OPTION_NO_WRAP,
+   OPTION_LINK_RELAX
+@@ -413,6 +414,7 @@ enum options
+ struct option md_longopts[] =
+ {
+   { "mmcu",   required_argument, NULL, OPTION_MMCU        },
++  { "mlist-devices", no_argument, NULL, OPTION_MLIST_DEVICES },
+   { "mall-opcodes", no_argument, NULL, OPTION_ALL_OPCODES },
+   { "mno-skip-bug", no_argument, NULL, OPTION_NO_SKIP_BUG },
+   { "mno-wrap",     no_argument, NULL, OPTION_NO_WRAP     },
+@@ -518,14 +520,14 @@ md_show_usage (FILE *stream)
+       "                   avrtiny   - AVR Tiny core\n"
+       "                   or immediate microcontroller name.\n"));
+   fprintf (stream,
+-      _("  -mall-opcodes    accept all AVR opcodes, even if not supported by MCU\n"
++       _("  -mlist-devices   list all supported devices\n"
++    "  -mall-opcodes    accept all AVR opcodes, even if not supported by MCU\n"
+       "  -mno-skip-bug    disable warnings for skipping two-word instructions\n"
+       "                   (default for avr4, avr5)\n"
+       "  -mno-wrap        reject rjmp/rcall instructions with 8K wrap-around\n"
+       "                   (default for avr3, avr5)\n"
+     "  -mlink-relax     generate relocations for linker relaxation\n"
+     ));
+-  show_mcu_list (stream);
+ }
+ static void
+@@ -577,6 +579,9 @@ md_parse_option (int c, char *arg)
+                   avr_mcu->name, mcu_types[i].name);
+       return 1;
+       }
++    case OPTION_MLIST_DEVICES:
++      show_mcu_list(stdout);
++      exit (EXIT_SUCCESS);
+     case OPTION_ALL_OPCODES:
+       avr_opt.all_opcodes = 1;
+       return 1;
diff --git a/301-binutils-avr-coff.patch b/301-binutils-avr-coff.patch
deleted file mode 100644 (file)
index d3c2a17..0000000
+++ /dev/null
@@ -1,5506 +0,0 @@
-diff -Naurp bfd/coff-avr.c bfd/coff-avr.c
---- bfd/coff-avr.c     1970-01-01 05:30:00.000000000 +0530
-+++ bfd/coff-avr.c     2011-11-30 12:59:26.000000000 +0530
-@@ -0,0 +1,613 @@
-+/* BFD back-end for Atmel AVR COFF files.
-+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2003
-+   Free Software Foundation, Inc.
-+   Created mostly by substituting "avr" for "i860" in coff-i860.c
-+
-+This file is part of BFD, the Binary File Descriptor library.
-+
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 2 of the License, or
-+(at your option) any later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; if not, write to the Free Software
-+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-+
-+#include "bfd.h"
-+#include "sysdep.h"
-+#include "libbfd.h"
-+
-+#include "coff/avr.h"
-+
-+#include "coff/internal.h"
-+
-+#include "libcoff.h"
-+
-+static bfd_reloc_status_type coff_avr_reloc
-+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-+static reloc_howto_type *coff_avr_rtype_to_howto
-+  PARAMS ((bfd *, asection *, struct internal_reloc *,
-+         struct coff_link_hash_entry *, struct internal_syment *,
-+         bfd_vma *));
-+static const bfd_target * coff_avr_object_p PARAMS ((bfd *));
-+
-+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
-+/* The page size is a guess based on ELF.  */
-+
-+#define COFF_PAGE_SIZE 0x1000
-+
-+/* For some reason when using avr COFF the value stored in the .text
-+   section for a reference to a common symbol is the value itself plus
-+   any desired offset.  Ian Taylor, Cygnus Support.  */
-+
-+/* If we are producing relocateable output, we need to do some
-+   adjustments to the object file that are not done by the
-+   bfd_perform_relocation function.  This function is called by every
-+   reloc type to make any required adjustments.  */
-+
-+static bfd_reloc_status_type
-+coff_avr_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
-+               error_message)
-+     bfd *abfd;
-+     arelent *reloc_entry;
-+     asymbol *symbol;
-+     PTR data;
-+     asection *input_section ATTRIBUTE_UNUSED;
-+     bfd *output_bfd;
-+     char **error_message ATTRIBUTE_UNUSED;
-+{
-+  symvalue diff;
-+
-+  if (output_bfd == (bfd *) NULL)
-+    return bfd_reloc_continue;
-+
-+  if (bfd_is_com_section (symbol->section))
-+    {
-+      /* We are relocating a common symbol.  The current value in the
-+       object file is ORIG + OFFSET, where ORIG is the value of the
-+       common symbol as seen by the object file when it was compiled
-+       (this may be zero if the symbol was undefined) and OFFSET is
-+       the offset into the common symbol (normally zero, but may be
-+       non-zero when referring to a field in a common structure).
-+       ORIG is the negative of reloc_entry->addend, which is set by
-+       the CALC_ADDEND macro below.  We want to replace the value in
-+       the object file with NEW + OFFSET, where NEW is the value of
-+       the common symbol which we are going to put in the final
-+       object file.  NEW is symbol->value.  */
-+      diff = symbol->value + reloc_entry->addend;
-+    }
-+  else
-+    {
-+      /* For some reason bfd_perform_relocation always effectively
-+       ignores the addend for a COFF target when producing
-+       relocateable output.  This seems to be always wrong for 860
-+       COFF, so we handle the addend here instead.  */
-+      diff = reloc_entry->addend;
-+    }
-+
-+#define DOIT(x) \
-+  x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
-+
-+    if (diff != 0)
-+      {
-+      reloc_howto_type *howto = reloc_entry->howto;
-+      unsigned char *addr = (unsigned char *) data + reloc_entry->address;
-+
-+      switch (howto->size)
-+        {
-+        case 0:
-+          {
-+            char x = bfd_get_8 (abfd, addr);
-+            DOIT (x);
-+            bfd_put_8 (abfd, x, addr);
-+          }
-+          break;
-+
-+        case 1:
-+          {
-+            short x = bfd_get_16 (abfd, addr);
-+            DOIT (x);
-+            bfd_put_16 (abfd, (bfd_vma) x, addr);
-+          }
-+          break;
-+
-+        case 2:
-+          {
-+            long x = bfd_get_32 (abfd, addr);
-+            DOIT (x);
-+            bfd_put_32 (abfd, (bfd_vma) x, addr);
-+          }
-+          break;
-+
-+        default:
-+          abort ();
-+        }
-+      }
-+
-+  /* Now let bfd_perform_relocation finish everything up.  */
-+  return bfd_reloc_continue;
-+}
-+
-+#ifndef PCRELOFFSET
-+#define PCRELOFFSET FALSE
-+#endif
-+
-+static reloc_howto_type howto_table[] =
-+{
-+  EMPTY_HOWTO (0),
-+  EMPTY_HOWTO (1),
-+  EMPTY_HOWTO (2),
-+  EMPTY_HOWTO (3),
-+  EMPTY_HOWTO (4),
-+  EMPTY_HOWTO (5),
-+  HOWTO (R_DIR32,               /* type */
-+       0,                     /* rightshift */
-+       2,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       32,                    /* bitsize */
-+       FALSE,                 /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_bitfield, /* complain_on_overflow */
-+       coff_avr_reloc,       /* special_function */
-+       "dir32",               /* name */
-+       TRUE,                  /* partial_inplace */
-+       0xffffffff,            /* src_mask */
-+       0xffffffff,            /* dst_mask */
-+       TRUE),                /* pcrel_offset */
-+  /* {7}, */
-+  HOWTO (R_IMAGEBASE,            /* type */
-+       0,                     /* rightshift */
-+       2,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       32,                    /* bitsize */
-+       FALSE,                 /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_bitfield, /* complain_on_overflow */
-+       coff_avr_reloc,       /* special_function */
-+       "rva32",                  /* name */
-+       TRUE,                  /* partial_inplace */
-+       0xffffffff,            /* src_mask */
-+       0xffffffff,            /* dst_mask */
-+       FALSE),                /* pcrel_offset */
-+  EMPTY_HOWTO (010),
-+  EMPTY_HOWTO (011),
-+  EMPTY_HOWTO (012),
-+  EMPTY_HOWTO (013),
-+  EMPTY_HOWTO (014),
-+  EMPTY_HOWTO (015),
-+  EMPTY_HOWTO (016),
-+  HOWTO (R_RELBYTE,           /* type */
-+       0,                     /* rightshift */
-+       0,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       8,                     /* bitsize */
-+       FALSE,                 /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_bitfield, /* complain_on_overflow */
-+       coff_avr_reloc,        /* special_function */
-+       "8",                   /* name */
-+       TRUE,                  /* partial_inplace */
-+       0x000000ff,            /* src_mask */
-+       0x000000ff,            /* dst_mask */
-+       PCRELOFFSET),          /* pcrel_offset */
-+  HOWTO (R_RELWORD,           /* type */
-+       0,                     /* rightshift */
-+       1,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       16,                    /* bitsize */
-+       FALSE,                 /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_bitfield, /* complain_on_overflow */
-+       coff_avr_reloc,        /* special_function */
-+       "16",                  /* name */
-+       TRUE,                  /* partial_inplace */
-+       0x0000ffff,            /* src_mask */
-+       0x0000ffff,            /* dst_mask */
-+       PCRELOFFSET),          /* pcrel_offset */
-+  HOWTO (R_RELLONG,           /* type */
-+       0,                     /* rightshift */
-+       2,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       32,                    /* bitsize */
-+       FALSE,                 /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_bitfield, /* complain_on_overflow */
-+       coff_avr_reloc,        /* special_function */
-+       "32",                  /* name */
-+       TRUE,                  /* partial_inplace */
-+       0xffffffff,            /* src_mask */
-+       0xffffffff,            /* dst_mask */
-+       PCRELOFFSET),          /* pcrel_offset */
-+  HOWTO (R_PCRBYTE,           /* type */
-+       0,                     /* rightshift */
-+       0,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       8,                     /* bitsize */
-+       TRUE,                  /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_signed, /* complain_on_overflow */
-+       coff_avr_reloc,        /* special_function */
-+       "DISP8",               /* name */
-+       TRUE,                  /* partial_inplace */
-+       0x000000ff,            /* src_mask */
-+       0x000000ff,            /* dst_mask */
-+       PCRELOFFSET),          /* pcrel_offset */
-+  HOWTO (R_PCRWORD,           /* type */
-+       0,                     /* rightshift */
-+       1,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       16,                    /* bitsize */
-+       TRUE,                  /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_signed, /* complain_on_overflow */
-+       coff_avr_reloc,        /* special_function */
-+       "DISP16",              /* name */
-+       TRUE,                  /* partial_inplace */
-+       0x0000ffff,            /* src_mask */
-+       0x0000ffff,            /* dst_mask */
-+       PCRELOFFSET),          /* pcrel_offset */
-+  HOWTO (R_PCRLONG,           /* type */
-+       0,                     /* rightshift */
-+       2,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       32,                    /* bitsize */
-+       TRUE,                  /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_signed, /* complain_on_overflow */
-+       coff_avr_reloc,        /* special_function */
-+       "DISP32",              /* name */
-+       TRUE,                  /* partial_inplace */
-+       0xffffffff,            /* src_mask */
-+       0xffffffff,            /* dst_mask */
-+       PCRELOFFSET)           /* pcrel_offset */
-+};
-+
-+/* Turn a howto into a reloc  nunmber */
-+
-+#define SELECT_RELOC(x,howto) { x.r_type = howto->type; }
-+#define BADMAG(x) AVRBADMAG(x)
-+#define AVR 1                 /* Customize coffcode.h */
-+
-+#define RTYPE2HOWTO(cache_ptr, dst) \
-+          (cache_ptr)->howto = howto_table + (dst)->r_type;
-+
-+/* For AVR COFF a STYP_NOLOAD | STYP_BSS section is part of a shared
-+   library.  On some other COFF targets STYP_BSS is normally
-+   STYP_NOLOAD.  */
-+#define BSS_NOLOAD_IS_SHARED_LIBRARY
-+
-+/* Compute the addend of a reloc.  If the reloc is to a common symbol,
-+   the object file contains the value of the common symbol.  By the
-+   time this is called, the linker may be using a different symbol
-+   from a different object file with a different value.  Therefore, we
-+   hack wildly to locate the original symbol from this file so that we
-+   can make the correct adjustment.  This macro sets coffsym to the
-+   symbol from the original file, and uses it to set the addend value
-+   correctly.  If this is not a common symbol, the usual addend
-+   calculation is done, except that an additional tweak is needed for
-+   PC relative relocs.
-+   FIXME: This macro refers to symbols and asect; these are from the
-+   calling function, not the macro arguments.  */
-+
-+#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr)              \
-+  {                                                           \
-+    coff_symbol_type *coffsym = (coff_symbol_type *) NULL;    \
-+    if (ptr && bfd_asymbol_bfd (ptr) != abfd)                 \
-+      coffsym = (obj_symbols (abfd)                           \
-+               + (cache_ptr->sym_ptr_ptr - symbols));         \
-+    else if (ptr)                                             \
-+      coffsym = coff_symbol_from (abfd, ptr);                 \
-+    if (coffsym != (coff_symbol_type *) NULL                  \
-+      && coffsym->native->u.syment.n_scnum == 0)              \
-+      cache_ptr->addend = - coffsym->native->u.syment.n_value;        \
-+    else if (ptr && bfd_asymbol_bfd (ptr) == abfd             \
-+           && ptr->section != (asection *) NULL)              \
-+      cache_ptr->addend = - (ptr->section->vma + ptr->value); \
-+    else                                                      \
-+      cache_ptr->addend = 0;                                  \
-+    if (ptr && howto_table[reloc.r_type].pc_relative)         \
-+      cache_ptr->addend += asect->vma;                                \
-+  }
-+
-+/* We use the special COFF backend linker.  */
-+#define coff_relocate_section _bfd_coff_generic_relocate_section
-+
-+static reloc_howto_type *
-+coff_avr_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
-+     bfd *abfd ATTRIBUTE_UNUSED;
-+     asection *sec;
-+     struct internal_reloc *rel;
-+     struct coff_link_hash_entry *h;
-+     struct internal_syment *sym;
-+     bfd_vma *addendp;
-+{
-+
-+  reloc_howto_type *howto;
-+
-+  howto = howto_table + rel->r_type;
-+
-+  if (howto->pc_relative)
-+    *addendp += sec->vma;
-+
-+  if (sym != NULL && sym->n_scnum == 0 && sym->n_value != 0)
-+    {
-+      /* This is a common symbol.  The section contents include the
-+       size (sym->n_value) as an addend.  The relocate_section
-+       function will be adding in the final value of the symbol.  We
-+       need to subtract out the current size in order to get the
-+       correct result.  */
-+
-+      BFD_ASSERT (h != NULL);
-+
-+      /* I think we *do* want to bypass this.  If we don't, I have seen some data
-+       parameters get the wrong relcation address.  If I link two versions
-+       with and without this section bypassed and then do a binary comparison,
-+       the addresses which are different can be looked up in the map.  The
-+       case in which this section has been bypassed has addresses which correspond
-+       to values I can find in the map.  */
-+      *addendp -= sym->n_value;
-+    }
-+
-+  /* If the output symbol is common (in which case this must be a
-+     relocateable link), we need to add in the final size of the
-+     common symbol.  */
-+  if (h != NULL && h->root.type == bfd_link_hash_common)
-+    *addendp += h->root.u.c.size;
-+
-+  return howto;
-+}
-+
-+#define coff_rtype_to_howto coff_avr_rtype_to_howto
-+
-+#ifndef bfd_pe_print_pdata
-+#define bfd_pe_print_pdata    NULL
-+#endif
-+
-+#include "coffcode.h"
-+
-+static const bfd_target *
-+coff_avr_object_p(a)
-+     bfd *a;
-+{
-+  return coff_object_p (a);
-+}
-+
-+/* Handle all the abominations of AVR COFF:
-+
-+   Generic COFF always uses the D1 slot to indicate the "most
-+   important" derived type, and the D2...Dn slots for decreasing
-+   importance.  E. g., a function symbol will always have its DT_FCN
-+   element in D1, an array its DT_ARY (its first DT_ARY in a
-+   multi-dimensional array).  In contrast, AVR COFF expects this most
-+   important derived type specifier in the upmost Dn slot that is
-+   allocated at all (i. e. that is != 0).
-+
-+   Generic COFF says that "Any symbol that satisfies more than one
-+   condition [... for AUX entries] should have a union format in its
-+   auxiliary entry."  AVR COFF uses sepearate AUX entries for multiple
-+   derived types, and in some cases (like the ISFCN one), even puts
-+   the most important one into the last allocated AUX entry.  We
-+   join/split them here at the border as well.  Note that when
-+   generating AUX entries (where we need to split them), the n_numaux
-+   field must already have been set up properly (e. g. in
-+   binutils/wrcoff.c) since the entry renumbering and pointerization
-+   would not work otherwise.  Thus, we only split the information into
-+   multiple records if n_numaux > 1.  For similar reasons, we keep
-+   n_numaux > 1 on input to keep the appropriate AUX entries
-+   allocated, so a symbol can be reconstructed if it is being passed
-+   through one of the GNU tools.
-+
-+   Note that this adjustment is called after the symbol itself has
-+   been swapped in, but before the AUX entries are swapped in.  This
-+   is the only hook available that could swap (or merge) AUX entries
-+   at all, so we have to operate on the external AUX entries still. */
-+
-+void
-+avr_coff_adjust_sym_in_post (abfd, ext, in)
-+     bfd *abfd;
-+     PTR ext;
-+     PTR in;
-+{
-+  struct internal_syment *dst = (struct internal_syment *)in;
-+  unsigned short dt, bt, ndt;
-+  dt = dst->n_type & ~N_BTMASK;
-+  bt = BTYPE (dst->n_type);
-+
-+  /* Some AVR COFF producers seem to violate the COFF specs, and
-+     produce symbols for tag names that have the C_FOO filled in
-+     properly, but T_NULL as the base type value.  Patch up here,
-+     since some of our generic COFF tools (in particular
-+     binutils/rdcoff.c) rely on the correct data. */
-+  if (bt == T_NULL)
-+    switch (dst->n_sclass)
-+      {
-+      case C_STRTAG:
-+      bt = T_STRUCT;
-+      break;
-+
-+      case C_UNTAG:
-+      bt = T_UNION;
-+      break;
-+
-+      case C_ENTAG:
-+      bt = T_ENUM;
-+      break;
-+      }
-+
-+  /* Swap the derived type slots. */
-+  if (dt != 0)
-+    {
-+      ndt = 0;
-+      while (dt != 0)
-+      {
-+        ndt = (ndt << N_TSHIFT) | (dt & (N_TMASK >> N_BTSHFT));
-+        dt >>= N_TSHIFT;
-+      }
-+      dst->n_type = (ndt << N_BTSHFT) | bt;
-+    }
-+  else
-+    dst->n_type = bt;
-+
-+  /* If the derived type is function, and there is more than one AUX
-+     entry, swap the first and the last AUX entry, so the most
-+     interesting one will become the first.
-+
-+     If the fundamental type is a tagged type (struct/union/enum), try
-+     to find the AUX entry describing the tagged type (the one that
-+     has x_sym.x_tagndx filled in), and merge the tag index into the
-+     first AUX entry.  Depending on the actual input file, there might
-+     be further DT_PTR entries which we just ignore, since we could
-+     not handle that information anyway. */
-+  if (dst->n_numaux > 1 && dst->n_sclass != C_FILE)
-+    {
-+      AUXENT caux, *auxp1, *auxp2;
-+      size_t symesz;
-+      unsigned int i;
-+
-+      symesz = bfd_coff_symesz (abfd);
-+      i = dst->n_numaux;
-+
-+      auxp1 = (AUXENT *)((char *)ext + symesz);
-+      auxp2 = (AUXENT *)((char *)ext + i * symesz);
-+
-+      if (ISFCN (dst->n_type)
-+        || (ISPTR(dst->n_type)
-+            && (bt == T_STRUCT || bt == T_UNION || bt == T_ENUM)))
-+      {
-+        caux = *auxp2;
-+        *auxp2 = *auxp1;
-+        *auxp1 = caux;
-+      }
-+      else
-+      caux = *auxp1;
-+
-+      if ((ISFCN (dst->n_type) || ISARY (dst->n_type))
-+        && (bt == T_STRUCT || bt == T_UNION || bt == T_ENUM))
-+      {
-+        while (i > 1)
-+          {
-+            auxp2 = (AUXENT *)((char *)ext + i * symesz);
-+
-+            if (auxp2->x_sym.x_tagndx[0] != 0 || auxp2->x_sym.x_tagndx[1] != 0
-+                || auxp2->x_sym.x_tagndx[2] != 0 || auxp2->x_sym.x_tagndx[3] != 0)
-+              {
-+                memcpy (caux.x_sym.x_tagndx, auxp2->x_sym.x_tagndx,
-+                        4 * sizeof (char));
-+                break;
-+              }
-+            i--;
-+          }
-+        if (i > 1)
-+          *auxp1 = caux;
-+      }
-+    }
-+}
-+
-+/* When exporting an AVR COFF file, just undo all that has been done
-+   above.  Again, we are called after the symbol itself has been
-+   swapped out, but before the AUX entries are being written.
-+   Unfortunately, we are only given a pointer to the symbol itself, so
-+   we have to derive the pointer to the respective aux entries from
-+   that address, which is a bit clumsy. */
-+void
-+avr_coff_adjust_sym_out_post (abfd, in, ext)
-+     bfd *abfd;
-+     PTR in;
-+     PTR ext;
-+{
-+  struct internal_syment *src = (struct internal_syment *)(in);
-+  struct external_syment *dst = (struct external_syment *)(ext);
-+  unsigned short dt, bt, ndt;
-+
-+  dt = src->n_type & ~N_BTMASK;
-+  bt = BTYPE (src->n_type);
-+
-+  if (dt != 0)
-+    {
-+      ndt = 0;
-+      while (dt != 0)
-+      {
-+        ndt = (ndt << N_TSHIFT) | (dt & (N_TMASK >> N_BTSHFT));
-+        dt >>= N_TSHIFT;
-+      }
-+      H_PUT_16 (abfd, (ndt << N_BTSHFT) | bt, dst->e_type);
-+    }
-+
-+  if (src->n_numaux > 1 && src->n_sclass != C_FILE)
-+    {
-+      combined_entry_type *srce, *dste;
-+      char *hackp;
-+      unsigned int i;
-+
-+      /* Recover the original combinend_entry_type *. */
-+      hackp = (char *)in;
-+      hackp -= offsetof(combined_entry_type, u.syment);
-+      srce = (combined_entry_type *)hackp;
-+      srce++;
-+
-+      /* We simply duplicate the first AUX entry as many times as
-+       needed.  Since COFF itself normally uses just a single AUX
-+       entry for all the information, this will work -- each COFF
-+       consumer will then just pick the fields it is particularly
-+       interested in.  This would not work for the AVR COFF specific
-+       DT_PTR AUX entries, but we don't support them anyway. */
-+      for (i = 1; i < src->n_numaux; i++)
-+      {
-+        dste = srce + i;
-+        *dste = *srce;
-+      }
-+    }
-+}
-+
-+const bfd_target
-+#ifdef TARGET_SYM
-+  TARGET_SYM =
-+#else
-+  avrcoff_vec =
-+#endif
-+{
-+#ifdef TARGET_NAME
-+  TARGET_NAME,
-+#else
-+  "coff-avr",                 /* name */
-+#endif
-+  bfd_target_coff_flavour,
-+  BFD_ENDIAN_LITTLE,          /* data byte order is little */
-+  BFD_ENDIAN_LITTLE,          /* header byte order is little */
-+
-+  (HAS_RELOC | EXEC_P |               /* object flags */
-+   HAS_LINENO | HAS_DEBUG |
-+   HAS_SYMS | HAS_LOCALS | WP_TEXT),
-+
-+  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
-+  0,                          /* leading char */
-+  '/',                                /* ar_pad_char */
-+  15,                         /* ar_max_namelen */
-+  0,                          /* match_priority */
-+  bfd_getl64, bfd_getl_signed_64, bfd_putl64,
-+     bfd_getl32, bfd_getl_signed_32, bfd_putl32,
-+     bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
-+  bfd_getl64, bfd_getl_signed_64, bfd_putl64,
-+     bfd_getl32, bfd_getl_signed_32, bfd_putl32,
-+     bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-+
-+/* Note that we allow an object file to be treated as a core file as well.  */
-+    {_bfd_dummy_target, coff_avr_object_p, /* bfd_check_format */
-+       bfd_generic_archive_p, coff_avr_object_p},
-+    {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
-+       bfd_false},
-+    {bfd_false, coff_write_object_contents, /* bfd_write_contents */
-+       _bfd_write_archive_contents, bfd_false},
-+
-+     BFD_JUMP_TABLE_GENERIC (coff),
-+     BFD_JUMP_TABLE_COPY (coff),
-+     BFD_JUMP_TABLE_CORE (_bfd_nocore),
-+     BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
-+     BFD_JUMP_TABLE_SYMBOLS (coff),
-+     BFD_JUMP_TABLE_RELOCS (coff),
-+     BFD_JUMP_TABLE_WRITE (coff),
-+     BFD_JUMP_TABLE_LINK (coff),
-+     BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-+
-+  NULL,
-+
-+  COFF_SWAP_TABLE
-+};
-diff -Naurp bfd/coffcode.h bfd/coffcode.h
---- bfd/coffcode.h     2011-08-17 06:09:38.000000000 +0530
-+++ bfd/coffcode.h     2011-11-30 12:54:36.000000000 +0530
-@@ -1,3 +1,4 @@
-+
- /* Support for the generic parts of most COFF variants, for BFD.
-    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-    2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
-@@ -1968,6 +1969,17 @@ coff_mkobject (bfd * abfd)
-   coff->relocbase = 0;
-   coff->local_toc_sym_map = 0;
-+  /* These members communicate important constants about the symbol
-+     table to GDB's symbol-reading code.  These `constants'
-+     unfortunately vary among coff implementations...  */
-+  coff->local_n_btmask = N_BTMASK;
-+  coff->local_n_btshft = N_BTSHFT;
-+  coff->local_n_tmask = N_TMASK;
-+  coff->local_n_tshift = N_TSHIFT;
-+  coff->local_symesz = bfd_coff_symesz (abfd);
-+  coff->local_auxesz = bfd_coff_auxesz (abfd);
-+  coff->local_linesz = bfd_coff_linesz (abfd);
-+
- /*  make_abs_section(abfd);*/
-   return TRUE;
-@@ -1992,17 +2004,6 @@ coff_mkobject_hook (bfd * abfd,
-   coff->sym_filepos = internal_f->f_symptr;
--  /* These members communicate important constants about the symbol
--     table to GDB's symbol-reading code.  These `constants'
--     unfortunately vary among coff implementations...  */
--  coff->local_n_btmask = N_BTMASK;
--  coff->local_n_btshft = N_BTSHFT;
--  coff->local_n_tmask = N_TMASK;
--  coff->local_n_tshift = N_TSHIFT;
--  coff->local_symesz = bfd_coff_symesz (abfd);
--  coff->local_auxesz = bfd_coff_auxesz (abfd);
--  coff->local_linesz = bfd_coff_linesz (abfd);
--
-   coff->timestamp = internal_f->f_timdat;
-   obj_raw_syment_count (abfd) =
-@@ -2134,6 +2135,11 @@ coff_set_arch_mach_hook (bfd *abfd, void
-       }
-       break;
- #endif
-+#ifdef AVRMAGIC
-+    case AVRMAGIC:
-+      arch = bfd_arch_avr;
-+      break;
-+#endif
- #ifdef MC68MAGIC
-     case MC68MAGIC:
-     case M68MAGIC:
-@@ -2913,6 +2919,13 @@ coff_set_flags (bfd * abfd,
-       return TRUE;
- #endif
-+#ifdef AVRMAGIC
-+    case bfd_arch_avr:
-+      *magicp = AVRMAGIC;
-+      return TRUE;
-+      break;
-+#endif
-+
- #ifdef PPCMAGIC
-     case bfd_arch_powerpc:
-       *magicp = PPCMAGIC;
-@@ -3741,6 +3754,11 @@ coff_write_object_contents (bfd * abfd)
-       section.s_page = 0;
- #endif
-+#ifdef AVR
-+      /* AVR uses s_paddr the way GNU uses s_vaddr, and effectively
-+       ignores s_vaddr. */
-+      section.s_paddr = current->vma;
-+#endif
- #ifdef COFF_WITH_PE
-       section.s_paddr = 0;
- #endif
-@@ -4087,6 +4105,17 @@ coff_write_object_contents (bfd * abfd)
-     internal_a.magic = ZMAGIC;
- #endif
-+#ifdef AVR
-+    /* a.out is a dummy for non-extended COFF */
-+    internal_a.magic = AVRAOUTMAGIC;
-+    /* Upper nibble of f_flags must be set for historical reasons.
-+       The upper byte remains blank on coff-avr, so undo the F_AR32WR
-+       setting performed above. */
-+    internal_f.f_flags |= F_JUNK;
-+    internal_f.f_flags &= ~F_UNUSED;
-+#define __A_MAGIC_SET__
-+#endif /* AVR */
-+
- #if defined(PPC_PE)
- #define __A_MAGIC_SET__
-     internal_a.magic = IMAGE_NT_OPTIONAL_HDR_MAGIC;
-@@ -4149,8 +4178,16 @@ coff_write_object_contents (bfd * abfd)
- #endif
-   }
-+#ifdef AVR_EXT_COFF
-+    /* Note that we do not set F_PTRINFO because the GNU toolchain
-+       doesn't provide any information about the target of a pointer,
-+       so we cannot derive which section our pointer target would be
-+       in. */
-+  internal_a.vstamp = F_FULLPATHS | F_STRUCTINFO;
-+#else
-   /* FIXME: Does anybody ever set this to another value?  */
-   internal_a.vstamp = 0;
-+#endif
-   /* Now should write relocs, strings, syms.  */
-   obj_sym_filepos (abfd) = sym_base;
-@@ -4708,6 +4745,10 @@ coff_slurp_symbol_table (bfd * abfd)
-           /* In PE, 0x69 (105) denotes a weak external symbol.  */
-           case C_NT_WEAK:
- #endif
-+#ifdef AVR
-+          /* Some AVR COFF compilers handle EXTDEF like EXT. */
-+          case C_EXTDEF:      /* external definition           */
-+#endif
-             switch (coff_classify_symbol (abfd, &src->u.syment))
-               {
-               case COFF_SYMBOL_GLOBAL:
-@@ -4940,7 +4981,9 @@ coff_slurp_symbol_table (bfd * abfd)
-                 break;
- #endif
-             /* Fall through.  */
-+#if !defined(AVR)
-           case C_EXTDEF:      /* External definition.  */
-+#endif
-           case C_ULABEL:      /* Undefined label.  */
-           case C_USTATIC:     /* Undefined static.  */
- #ifndef COFF_WITH_PE
-diff -Naurp bfd/coff-ext-avr.c bfd/coff-ext-avr.c
---- bfd/coff-ext-avr.c 1970-01-01 05:30:00.000000000 +0530
-+++ bfd/coff-ext-avr.c 2011-11-30 15:09:15.000000000 +0530
-@@ -0,0 +1,428 @@
-+/* BFD back-end for Atmel AVR "extended" COFF files.
-+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2003
-+   Free Software Foundation, Inc.
-+   This is mostly the same as avr-coff, except of the presence of the
-+   COFF optional header.
-+
-+This file is part of BFD, the Binary File Descriptor library.
-+
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 2 of the License, or
-+(at your option) any later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; if not, write to the Free Software
-+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-+
-+#include "bfd.h"
-+#include "sysdep.h"
-+#include "libbfd.h"
-+
-+#define AVR_EXT_COFF 1
-+#include "coff/avr.h"
-+
-+#include "coff/internal.h"
-+
-+#include "libcoff.h"
-+
-+static bfd_reloc_status_type coff_ext_avr_reloc
-+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-+static reloc_howto_type *coff_ext_avr_rtype_to_howto
-+  PARAMS ((bfd *, asection *, struct internal_reloc *,
-+         struct coff_link_hash_entry *, struct internal_syment *,
-+         bfd_vma *));
-+static const bfd_target * coff_ext_avr_object_p PARAMS ((bfd *));
-+
-+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
-+/* The page size is a guess based on ELF.  */
-+
-+#define COFF_PAGE_SIZE 0x1000
-+
-+/* For some reason when using avr COFF the value stored in the .text
-+   section for a reference to a common symbol is the value itself plus
-+   any desired offset.  Ian Taylor, Cygnus Support.  */
-+
-+/* If we are producing relocateable output, we need to do some
-+   adjustments to the object file that are not done by the
-+   bfd_perform_relocation function.  This function is called by every
-+   reloc type to make any required adjustments.  */
-+
-+static bfd_reloc_status_type
-+coff_ext_avr_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
-+               error_message)
-+     bfd *abfd;
-+     arelent *reloc_entry;
-+     asymbol *symbol;
-+     PTR data;
-+     asection *input_section ATTRIBUTE_UNUSED;
-+     bfd *output_bfd;
-+     char **error_message ATTRIBUTE_UNUSED;
-+{
-+  symvalue diff;
-+
-+  if (output_bfd == (bfd *) NULL)
-+    return bfd_reloc_continue;
-+
-+  if (bfd_is_com_section (symbol->section))
-+    {
-+      /* We are relocating a common symbol.  The current value in the
-+       object file is ORIG + OFFSET, where ORIG is the value of the
-+       common symbol as seen by the object file when it was compiled
-+       (this may be zero if the symbol was undefined) and OFFSET is
-+       the offset into the common symbol (normally zero, but may be
-+       non-zero when referring to a field in a common structure).
-+       ORIG is the negative of reloc_entry->addend, which is set by
-+       the CALC_ADDEND macro below.  We want to replace the value in
-+       the object file with NEW + OFFSET, where NEW is the value of
-+       the common symbol which we are going to put in the final
-+       object file.  NEW is symbol->value.  */
-+      diff = symbol->value + reloc_entry->addend;
-+    }
-+  else
-+    {
-+      /* For some reason bfd_perform_relocation always effectively
-+       ignores the addend for a COFF target when producing
-+       relocateable output.  This seems to be always wrong for 860
-+       COFF, so we handle the addend here instead.  */
-+      diff = reloc_entry->addend;
-+    }
-+
-+#define DOIT(x) \
-+  x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
-+
-+    if (diff != 0)
-+      {
-+      reloc_howto_type *howto = reloc_entry->howto;
-+      unsigned char *addr = (unsigned char *) data + reloc_entry->address;
-+
-+      switch (howto->size)
-+        {
-+        case 0:
-+          {
-+            char x = bfd_get_8 (abfd, addr);
-+            DOIT (x);
-+            bfd_put_8 (abfd, x, addr);
-+          }
-+          break;
-+
-+        case 1:
-+          {
-+            short x = bfd_get_16 (abfd, addr);
-+            DOIT (x);
-+            bfd_put_16 (abfd, (bfd_vma) x, addr);
-+          }
-+          break;
-+
-+        case 2:
-+          {
-+            long x = bfd_get_32 (abfd, addr);
-+            DOIT (x);
-+            bfd_put_32 (abfd, (bfd_vma) x, addr);
-+          }
-+          break;
-+
-+        default:
-+          abort ();
-+        }
-+      }
-+
-+  /* Now let bfd_perform_relocation finish everything up.  */
-+  return bfd_reloc_continue;
-+}
-+
-+#ifndef PCRELOFFSET
-+#define PCRELOFFSET FALSE
-+#endif
-+
-+static reloc_howto_type howto_table[] =
-+{
-+  EMPTY_HOWTO (0),
-+  EMPTY_HOWTO (1),
-+  EMPTY_HOWTO (2),
-+  EMPTY_HOWTO (3),
-+  EMPTY_HOWTO (4),
-+  EMPTY_HOWTO (5),
-+  HOWTO (R_DIR32,               /* type */
-+       0,                     /* rightshift */
-+       2,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       32,                    /* bitsize */
-+       FALSE,                 /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_bitfield, /* complain_on_overflow */
-+       coff_ext_avr_reloc,       /* special_function */
-+       "dir32",               /* name */
-+       TRUE,                  /* partial_inplace */
-+       0xffffffff,            /* src_mask */
-+       0xffffffff,            /* dst_mask */
-+       TRUE),                /* pcrel_offset */
-+  /* {7}, */
-+  HOWTO (R_IMAGEBASE,            /* type */
-+       0,                     /* rightshift */
-+       2,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       32,                    /* bitsize */
-+       FALSE,                 /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_bitfield, /* complain_on_overflow */
-+       coff_ext_avr_reloc,       /* special_function */
-+       "rva32",                  /* name */
-+       TRUE,                  /* partial_inplace */
-+       0xffffffff,            /* src_mask */
-+       0xffffffff,            /* dst_mask */
-+       FALSE),                /* pcrel_offset */
-+  EMPTY_HOWTO (010),
-+  EMPTY_HOWTO (011),
-+  EMPTY_HOWTO (012),
-+  EMPTY_HOWTO (013),
-+  EMPTY_HOWTO (014),
-+  EMPTY_HOWTO (015),
-+  EMPTY_HOWTO (016),
-+  HOWTO (R_RELBYTE,           /* type */
-+       0,                     /* rightshift */
-+       0,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       8,                     /* bitsize */
-+       FALSE,                 /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_bitfield, /* complain_on_overflow */
-+       coff_ext_avr_reloc,    /* special_function */
-+       "8",                   /* name */
-+       TRUE,                  /* partial_inplace */
-+       0x000000ff,            /* src_mask */
-+       0x000000ff,            /* dst_mask */
-+       PCRELOFFSET),          /* pcrel_offset */
-+  HOWTO (R_RELWORD,           /* type */
-+       0,                     /* rightshift */
-+       1,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       16,                    /* bitsize */
-+       FALSE,                 /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_bitfield, /* complain_on_overflow */
-+       coff_ext_avr_reloc,    /* special_function */
-+       "16",                  /* name */
-+       TRUE,                  /* partial_inplace */
-+       0x0000ffff,            /* src_mask */
-+       0x0000ffff,            /* dst_mask */
-+       PCRELOFFSET),          /* pcrel_offset */
-+  HOWTO (R_RELLONG,           /* type */
-+       0,                     /* rightshift */
-+       2,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       32,                    /* bitsize */
-+       FALSE,                 /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_bitfield, /* complain_on_overflow */
-+       coff_ext_avr_reloc,    /* special_function */
-+       "32",                  /* name */
-+       TRUE,                  /* partial_inplace */
-+       0xffffffff,            /* src_mask */
-+       0xffffffff,            /* dst_mask */
-+       PCRELOFFSET),          /* pcrel_offset */
-+  HOWTO (R_PCRBYTE,           /* type */
-+       0,                     /* rightshift */
-+       0,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       8,                     /* bitsize */
-+       TRUE,                  /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_signed, /* complain_on_overflow */
-+       coff_ext_avr_reloc,    /* special_function */
-+       "DISP8",               /* name */
-+       TRUE,                  /* partial_inplace */
-+       0x000000ff,            /* src_mask */
-+       0x000000ff,            /* dst_mask */
-+       PCRELOFFSET),          /* pcrel_offset */
-+  HOWTO (R_PCRWORD,           /* type */
-+       0,                     /* rightshift */
-+       1,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       16,                    /* bitsize */
-+       TRUE,                  /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_signed, /* complain_on_overflow */
-+       coff_ext_avr_reloc,    /* special_function */
-+       "DISP16",              /* name */
-+       TRUE,                  /* partial_inplace */
-+       0x0000ffff,            /* src_mask */
-+       0x0000ffff,            /* dst_mask */
-+       PCRELOFFSET),          /* pcrel_offset */
-+  HOWTO (R_PCRLONG,           /* type */
-+       0,                     /* rightshift */
-+       2,                     /* size (0 = byte, 1 = short, 2 = long) */
-+       32,                    /* bitsize */
-+       TRUE,                  /* pc_relative */
-+       0,                     /* bitpos */
-+       complain_overflow_signed, /* complain_on_overflow */
-+       coff_ext_avr_reloc,    /* special_function */
-+       "DISP32",              /* name */
-+       TRUE,                  /* partial_inplace */
-+       0xffffffff,            /* src_mask */
-+       0xffffffff,            /* dst_mask */
-+       PCRELOFFSET)           /* pcrel_offset */
-+};
-+
-+/* Turn a howto into a reloc  nunmber */
-+
-+#define SELECT_RELOC(x,howto) { x.r_type = howto->type; }
-+#define BADMAG(x) AVRBADMAG(x)
-+#define AVR 1                 /* Customize coffcode.h */
-+
-+#define RTYPE2HOWTO(cache_ptr, dst) \
-+          (cache_ptr)->howto = howto_table + (dst)->r_type;
-+
-+/* For AVR COFF a STYP_NOLOAD | STYP_BSS section is part of a shared
-+   library.  On some other COFF targets STYP_BSS is normally
-+   STYP_NOLOAD.  */
-+#define BSS_NOLOAD_IS_SHARED_LIBRARY
-+
-+/* Compute the addend of a reloc.  If the reloc is to a common symbol,
-+   the object file contains the value of the common symbol.  By the
-+   time this is called, the linker may be using a different symbol
-+   from a different object file with a different value.  Therefore, we
-+   hack wildly to locate the original symbol from this file so that we
-+   can make the correct adjustment.  This macro sets coffsym to the
-+   symbol from the original file, and uses it to set the addend value
-+   correctly.  If this is not a common symbol, the usual addend
-+   calculation is done, except that an additional tweak is needed for
-+   PC relative relocs.
-+   FIXME: This macro refers to symbols and asect; these are from the
-+   calling function, not the macro arguments.  */
-+
-+#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr)              \
-+  {                                                           \
-+    coff_symbol_type *coffsym = (coff_symbol_type *) NULL;    \
-+    if (ptr && bfd_asymbol_bfd (ptr) != abfd)                 \
-+      coffsym = (obj_symbols (abfd)                           \
-+               + (cache_ptr->sym_ptr_ptr - symbols));         \
-+    else if (ptr)                                             \
-+      coffsym = coff_symbol_from (abfd, ptr);                 \
-+    if (coffsym != (coff_symbol_type *) NULL                  \
-+      && coffsym->native->u.syment.n_scnum == 0)              \
-+      cache_ptr->addend = - coffsym->native->u.syment.n_value;        \
-+    else if (ptr && bfd_asymbol_bfd (ptr) == abfd             \
-+           && ptr->section != (asection *) NULL)              \
-+      cache_ptr->addend = - (ptr->section->vma + ptr->value); \
-+    else                                                      \
-+      cache_ptr->addend = 0;                                  \
-+    if (ptr && howto_table[reloc.r_type].pc_relative)         \
-+      cache_ptr->addend += asect->vma;                                \
-+  }
-+
-+/* We use the special COFF backend linker.  */
-+#define coff_relocate_section _bfd_coff_generic_relocate_section
-+
-+static reloc_howto_type *
-+coff_ext_avr_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
-+     bfd *abfd ATTRIBUTE_UNUSED;
-+     asection *sec;
-+     struct internal_reloc *rel;
-+     struct coff_link_hash_entry *h;
-+     struct internal_syment *sym;
-+     bfd_vma *addendp;
-+{
-+
-+  reloc_howto_type *howto;
-+
-+  howto = howto_table + rel->r_type;
-+
-+  if (howto->pc_relative)
-+    *addendp += sec->vma;
-+
-+  if (sym != NULL && sym->n_scnum == 0 && sym->n_value != 0)
-+    {
-+      /* This is a common symbol.  The section contents include the
-+       size (sym->n_value) as an addend.  The relocate_section
-+       function will be adding in the final value of the symbol.  We
-+       need to subtract out the current size in order to get the
-+       correct result.  */
-+
-+      BFD_ASSERT (h != NULL);
-+
-+      /* I think we *do* want to bypass this.  If we don't, I have seen some data
-+       parameters get the wrong relcation address.  If I link two versions
-+       with and without this section bypassed and then do a binary comparison,
-+       the addresses which are different can be looked up in the map.  The
-+       case in which this section has been bypassed has addresses which correspond
-+       to values I can find in the map.  */
-+      *addendp -= sym->n_value;
-+    }
-+
-+  /* If the output symbol is common (in which case this must be a
-+     relocateable link), we need to add in the final size of the
-+     common symbol.  */
-+  if (h != NULL && h->root.type == bfd_link_hash_common)
-+    *addendp += h->root.u.c.size;
-+
-+  return howto;
-+}
-+
-+#define coff_rtype_to_howto coff_ext_avr_rtype_to_howto
-+
-+#ifndef bfd_pe_print_pdata
-+#define bfd_pe_print_pdata    NULL
-+#endif
-+
-+#include "coffcode.h"
-+
-+static const bfd_target *
-+coff_ext_avr_object_p(a)
-+     bfd *a;
-+{
-+  return coff_object_p (a);
-+}
-+
-+const bfd_target
-+#ifdef TARGET_SYM
-+  TARGET_SYM =
-+#else
-+  avrextcoff_vec =
-+#endif
-+{
-+#ifdef TARGET_NAME
-+  TARGET_NAME,
-+#else
-+  "coff-ext-avr",                     /* name */
-+#endif
-+  bfd_target_coff_flavour,
-+  BFD_ENDIAN_LITTLE,          /* data byte order is little */
-+  BFD_ENDIAN_LITTLE,          /* header byte order is little */
-+
-+  (HAS_RELOC | EXEC_P |               /* object flags */
-+   HAS_LINENO | HAS_DEBUG |
-+   HAS_SYMS | HAS_LOCALS | WP_TEXT),
-+
-+  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
-+  0,                          /* leading char */
-+  '/',                                /* ar_pad_char */
-+  15,                         /* ar_max_namelen */
-+  0,                          /* match_priority */
-+  bfd_getl64, bfd_getl_signed_64, bfd_putl64,
-+     bfd_getl32, bfd_getl_signed_32, bfd_putl32,
-+     bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
-+  bfd_getl64, bfd_getl_signed_64, bfd_putl64,
-+     bfd_getl32, bfd_getl_signed_32, bfd_putl32,
-+     bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-+
-+/* Note that we allow an object file to be treated as a core file as well.  */
-+    {_bfd_dummy_target, coff_ext_avr_object_p, /* bfd_check_format */
-+       bfd_generic_archive_p, coff_ext_avr_object_p},
-+    {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
-+       bfd_false},
-+    {bfd_false, coff_write_object_contents, /* bfd_write_contents */
-+       _bfd_write_archive_contents, bfd_false},
-+
-+     BFD_JUMP_TABLE_GENERIC (coff),
-+     BFD_JUMP_TABLE_COPY (coff),
-+     BFD_JUMP_TABLE_CORE (_bfd_nocore),
-+     BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
-+     BFD_JUMP_TABLE_SYMBOLS (coff),
-+     BFD_JUMP_TABLE_RELOCS (coff),
-+     BFD_JUMP_TABLE_WRITE (coff),
-+     BFD_JUMP_TABLE_LINK (coff),
-+     BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-+
-+  NULL,
-+
-+  COFF_SWAP_TABLE
-+};
-diff -Naurp bfd/coffgen.c bfd/coffgen.c
---- bfd/coffgen.c      2011-08-17 06:09:39.000000000 +0530
-+++ bfd/coffgen.c      2011-11-30 12:54:36.000000000 +0530
-@@ -699,6 +699,20 @@ coff_renumber_symbols (bfd *bfd_ptr, int
-             if (last_file != NULL)
-               last_file->n_value = native_index;
-             last_file = &(s->u.syment);
-+            if (bfd_get_arch (bfd_ptr) == bfd_arch_avr
-+                && bfd_coff_long_filenames (bfd_ptr)
-+                && s->u.syment.n_numaux > 0)
-+              {
-+                /* AVR COFF records long filenames in successive aux
-+                   records.  Adjust the number of aux records
-+                   required here, so the renumbering will account
-+                   for them. */
-+                unsigned int filnmlen = bfd_coff_filnmlen (bfd_ptr);
-+                unsigned int namelen = strlen (coff_symbol_ptr->symbol.name);
-+                unsigned int n = (namelen + filnmlen - 1) / filnmlen;
-+
-+                s->u.syment.n_numaux = n > NAUXENTS? NAUXENTS: n;
-+              }
-           }
-         else
-           /* Modify the symbol values according to their section and
-@@ -827,6 +841,20 @@ coff_fix_symbol_name (bfd *abfd,
-       {
-         if (name_length <= filnmlen)
-           strncpy (auxent->x_file.x_fname, name, filnmlen);
-+        else if (bfd_get_arch (abfd) == bfd_arch_avr)
-+          {
-+            /* AVR COFF records long filenames in successive aux records. */
-+            int i = 1;
-+            while (name_length > filnmlen && i < NAUXENTS)
-+              {
-+                strncpy (auxent->x_file.x_fname, name, filnmlen);
-+                name += filnmlen;
-+                name_length -= filnmlen;
-+                i++;
-+                auxent = &(native + i)->u.auxent;
-+              }
-+            strncpy (auxent->x_file.x_fname, name, filnmlen);
-+          }
-         else
-           {
-             auxent->x_file.x_n.x_offset = *string_size_p + STRING_SIZE_SIZE;
-@@ -1277,6 +1305,10 @@ coff_write_symbols (bfd *abfd)
-                 if (bfd_bwrite (".file", (bfd_size_type) 6, abfd) != 6)
-                   return FALSE;
-               }
-+            if (bfd_get_arch (abfd) == bfd_arch_avr)
-+              /* AVR COFF handles long file names in aux records. */
-+              maxlen = name_length;
-+            else
-             maxlen = bfd_coff_filnmlen (abfd);
-           }
-         else
-@@ -1715,14 +1747,27 @@ coff_get_normalized_symtab (bfd *abfd)
-           {
-             /* Ordinary short filename, put into memory anyway.  The
-                  Microsoft PE tools sometimes store a filename in
--                 multiple AUX entries.  */
-+                 multiple AUX entries.
-+               AVR COFF does it that way, too. */
-             if (internal_ptr->u.syment.n_numaux > 1
--                && coff_data (abfd)->pe)
--              internal_ptr->u.syment._n._n_n._n_offset =
--                ((bfd_hostptr_t)
--                 copy_name (abfd,
--                            (internal_ptr + 1)->u.auxent.x_file.x_fname,
--                            internal_ptr->u.syment.n_numaux * symesz));
-+                && (coff_data (abfd)->pe
-+                    || (bfd_get_arch (abfd) == bfd_arch_avr)))
-+              {
-+                char *b;
-+                unsigned int i;
-+
-+                /* We allocate enough storage to fit the contents of
-+                   this many aux records, and simply append a \0.
-+                   This ensures the string will always be
-+                   terminated, even in the case where it just fit
-+                   into the aux records. */
-+                b = (char *) bfd_alloc (abfd,
-+                                        internal_ptr->u.syment.n_numaux * FILNMLEN + 1);
-+                internal_ptr->u.syment._n._n_n._n_offset = (bfd_hostptr_t) b;
-+                b[internal_ptr->u.syment.n_numaux * FILNMLEN] = '\0';
-+                for (i = 0; i < internal_ptr->u.syment.n_numaux; i++, b += FILNMLEN)
-+                  memcpy (b, (internal_ptr + i + 1)->u.auxent.x_file.x_fname, FILNMLEN);
-+              }
-             else
-               internal_ptr->u.syment._n._n_n._n_offset =
-                 ((bfd_hostptr_t)
-@@ -1828,9 +1873,9 @@ coff_bfd_make_debug_symbol (bfd *abfd,
-   if (new_symbol == NULL)
-     return NULL;
--  /* @@ The 10 is a guess at a plausible maximum number of aux entries
-+  /* @@ The NAUXENTS is a guess at a plausible maximum number of aux entries
-      (but shouldn't be a constant).  */
--  amt = sizeof (combined_entry_type) * 10;
-+  amt = sizeof (combined_entry_type) * (NAUXENTS + 1);
-   new_symbol->native = (combined_entry_type *) bfd_zalloc (abfd, amt);
-   if (!new_symbol->native)
-     return NULL;
-diff -Naurp bfd/coffswap.h bfd/coffswap.h
---- bfd/coffswap.h     2009-09-05 13:26:22.000000000 +0530
-+++ bfd/coffswap.h     2011-11-30 12:54:36.000000000 +0530
-@@ -383,7 +383,11 @@ coff_swap_aux_in (bfd *abfd,
-                 void * ext1,
-                 int type,
-                 int in_class,
--                int indx,
-+                int indx
-+#if defined(AVR) && __GNUC__
-+                __attribute__((unused))
-+#endif
-+                ,
-                 int numaux,
-                 void * in1)
- {
-@@ -409,9 +413,13 @@ coff_swap_aux_in (bfd *abfd,
- #else
-         if (numaux > 1)
-           {
-+#if defined(AVR)
-+            memcpy (in->x_file.x_fname, ext->x_file.x_fname, sizeof (AUXENT));
-+#else
-             if (indx == 0)
-               memcpy (in->x_file.x_fname, ext->x_file.x_fname,
-                       numaux * sizeof (AUXENT));
-+#endif
-           }
-         else
-           memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
-diff -Naurp bfd/config.bfd bfd/config.bfd
---- bfd/config.bfd     2011-07-29 04:05:13.000000000 +0530
-+++ bfd/config.bfd     2011-11-30 12:54:36.000000000 +0530
-@@ -300,6 +300,7 @@ case "${targ}" in
-   avr-*-*)
-     targ_defvec=bfd_elf32_avr_vec
-+    targ_selvecs="bfd_elf32_avr_vec avrcoff_vec avrextcoff_vec"
-     ;;
-   bfin-*-*)
-diff -Naurp bfd/configure bfd/configure
---- bfd/configure      2011-11-21 17:25:48.000000000 +0530
-+++ bfd/configure      2011-11-30 12:54:36.000000000 +0530
-@@ -15175,6 +15175,8 @@ do
-     armpe_little_vec)         tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
-     armpei_big_vec)           tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
-     armpei_little_vec)                tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
-+    avrcoff_vec)              tb="$tb coff-avr.lo cofflink.lo " ;;
-+    avrextcoff_vec)           tb="$tb coff-ext-avr.lo cofflink.lo " ;;
-     b_out_vec_big_host)               tb="$tb bout.lo aout32.lo" ;;
-     b_out_vec_little_host)    tb="$tb bout.lo aout32.lo" ;;
-     bfd_pei_ia64_vec)         tb="$tb pei-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
-diff -Naurp bfd/configure.in bfd/configure.in
---- bfd/configure.in   2011-11-21 17:25:46.000000000 +0530
-+++ bfd/configure.in   2011-11-30 12:54:36.000000000 +0530
-@@ -674,6 +674,8 @@ do
-     armpe_little_vec)         tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
-     armpei_big_vec)           tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
-     armpei_little_vec)                tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
-+    avrcoff_vec)              tb="$tb coff-avr.lo cofflink.lo " ;;
-+    avrextcoff_vec)           tb="$tb coff-ext-avr.lo cofflink.lo " ;;
-     b_out_vec_big_host)               tb="$tb bout.lo aout32.lo" ;;
-     b_out_vec_little_host)    tb="$tb bout.lo aout32.lo" ;;
-     bfd_pei_ia64_vec)         tb="$tb pei-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
-diff -Naurp bfd/Makefile.am bfd/Makefile.am
---- bfd/Makefile.am    2011-11-21 17:25:46.000000000 +0530
-+++ bfd/Makefile.am    2011-11-30 12:54:36.000000000 +0530
-@@ -238,6 +238,8 @@ BFD32_BACKENDS = \
-       coff-apollo.lo \
-       coff-arm.lo \
-       coff-aux.lo \
-+        coff-avr.lo \
-+        coff-ext-avr.lo \
-       coff-go32.lo \
-       coff-h8300.lo \
-       coff-h8500.lo \
-@@ -422,6 +424,8 @@ BFD32_BACKENDS_CFILES = \
-       coff-apollo.c \
-       coff-arm.c \
-       coff-aux.c \
-+      coff-avr.c \
-+      coff-ext-avr.c \
-       coff-go32.c \
-       coff-h8300.c \
-       coff-h8500.c \
-diff -Naurp bfd/Makefile.in bfd/Makefile.in
---- bfd/Makefile.in    2011-11-21 17:25:49.000000000 +0530
-+++ bfd/Makefile.in    2011-11-30 12:54:36.000000000 +0530
-@@ -538,6 +538,8 @@ BFD32_BACKENDS = \
-       coff-apollo.lo \
-       coff-arm.lo \
-       coff-aux.lo \
-+      coff-avr.lo \
-+        coff-ext-avr.lo \
-       coff-go32.lo \
-       coff-h8300.lo \
-       coff-h8500.lo \
-@@ -722,6 +724,8 @@ BFD32_BACKENDS_CFILES = \
-       coff-apollo.c \
-       coff-arm.c \
-       coff-aux.c \
-+      coff-avr.c \
-+      coff-ext-avr.c \
-       coff-go32.c \
-       coff-h8300.c \
-       coff-h8500.c \
-diff -Naurp bfd/targets.c bfd/targets.c
---- bfd/targets.c      2011-08-17 06:09:38.000000000 +0530
-+++ bfd/targets.c      2011-11-30 12:54:36.000000000 +0530
-@@ -587,6 +587,8 @@ extern const bfd_target armpe_big_vec;
- extern const bfd_target armpe_little_vec;
- extern const bfd_target armpei_big_vec;
- extern const bfd_target armpei_little_vec;
-+extern const bfd_target avrcoff_vec;
-+extern const bfd_target avrextcoff_vec;
- extern const bfd_target b_out_vec_big_host;
- extern const bfd_target b_out_vec_little_host;
- extern const bfd_target bfd_pei_ia64_vec;
-@@ -941,6 +943,8 @@ static const bfd_target * const _bfd_tar
-       &armpe_little_vec,
-       &armpei_big_vec,
-       &armpei_little_vec,
-+      &avrcoff_vec,
-+      &avrextcoff_vec,
-       &b_out_vec_big_host,
-       &b_out_vec_little_host,
- #ifdef BFD64
-diff -Naurp binutils/bucomm.c binutils/bucomm.c
---- binutils/bucomm.c  2011-03-25 23:21:10.000000000 +0530
-+++ binutils/bucomm.c  2011-11-30 12:54:36.000000000 +0530
-@@ -561,6 +561,32 @@ parse_vma (const char *s, const char *ar
-   return ret;
- }
-+/* Return the basename of "file", i. e. everything minus whatever
-+   directory part has been provided.  Stolen from bfd/archive.c.
-+   Should we also handle the VMS case (as in bfd/archive.c)?  */
-+const char *
-+bu_basename (file)
-+     const char *file;
-+{
-+  const char *filename = strrchr (file, '/');
-+
-+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
-+  {
-+    /* We could have foo/bar\\baz, or foo\\bar, or d:bar.  */
-+    char *bslash = strrchr (file, '\\');
-+    if (filename == NULL || (bslash != NULL && bslash > filename))
-+      filename = bslash;
-+    if (filename == NULL && file[0] != '\0' && file[1] == ':')
-+      filename = file + 1;
-+  }
-+#endif
-+  if (filename != (char *) NULL)
-+    filename++;
-+  else
-+    filename = file;
-+  return filename;
-+}
-+
- /* Returns the size of the named file.  If the file does not
-    exist, or if it is not a real file, then a suitable non-fatal
-    error message is printed and (off_t) -1 is returned.  */
-diff -Naurp binutils/bucomm.h binutils/bucomm.h
---- binutils/bucomm.h  2009-09-02 12:52:31.000000000 +0530
-+++ binutils/bucomm.h  2011-11-30 12:54:36.000000000 +0530
-@@ -58,6 +58,8 @@ bfd_vma parse_vma (const char *, const c
- off_t get_file_size (const char *);
-+const char *bu_basename PARAMS ((const char *));
-+
- extern char *program_name;
- /* filemode.c */
-diff -Naurp binutils/budbg.h binutils/budbg.h
---- binutils/budbg.h   2009-09-02 12:52:31.000000000 +0530
-+++ binutils/budbg.h   2011-11-30 12:54:36.000000000 +0530
-@@ -52,8 +52,11 @@ extern bfd_boolean parse_ieee (void *, b
- extern bfd_boolean write_ieee_debugging_info (bfd *, void *);
--/* Routine used to read COFF debugging information.  */
-+/* Routine used to read and write COFF debugging information.  */
- extern bfd_boolean parse_coff (bfd *, asymbol **, long, void *);
-+extern bfd_boolean write_coff_debugging_info
-+  (bfd *abfd, void *, long *symcountp, asymbol ***);
-+
- #endif
-diff -Naurp binutils/debug.c binutils/debug.c
---- binutils/debug.c   2011-03-01 00:02:51.000000000 +0530
-+++ binutils/debug.c   2011-11-30 12:54:36.000000000 +0530
-@@ -32,6 +32,7 @@
- #include "bfd.h"
- #include "libiberty.h"
- #include "filenames.h"
-+#include "bucomm.h"
- #include "debug.h"
- /* Global information we keep for debugging.  A pointer to this
-@@ -553,6 +554,19 @@ struct debug_type_real_list
-   struct debug_type_s *t;
- };
-+/* Simple list, used for pathname translations. */
-+struct xlat_list
-+{
-+  /* Next string on list. */
-+  struct xlat_list *next;
-+  /* Old part to match against. */
-+  const char *old;
-+  size_t olen;
-+  /* New part to replace. */
-+  const char *newstr;
-+  size_t nlen;
-+};
-+
- /* Local functions.  */
- static void debug_error (const char *);
-@@ -589,6 +603,11 @@ static bfd_boolean debug_type_samep
-   (struct debug_handle *, struct debug_type_s *, struct debug_type_s *);
- static bfd_boolean debug_class_type_samep
-   (struct debug_handle *, struct debug_type_s *, struct debug_type_s *);
-+static const char *debug_xlat_pathname (const char *);
-+
-+/* List of pathname translations. */
-+static struct xlat_list *xlat, *xltail;
-+static bfd_boolean xlat_basename;
\f
- /* Issue an error message.  */
-@@ -681,6 +700,8 @@ debug_set_filename (void *handle, const 
-   if (name == NULL)
-     name = "";
-+  else
-+    name = debug_xlat_pathname (name);
-   nfile = (struct debug_file *) xmalloc (sizeof *nfile);
-   memset (nfile, 0, sizeof *nfile);
-@@ -721,6 +742,8 @@ debug_start_source (void *handle, const 
-   if (name == NULL)
-     name = "";
-+  else
-+    name = debug_xlat_pathname (name);
-   if (info->current_unit == NULL)
-     {
-@@ -3369,3 +3392,70 @@ debug_class_type_samep (struct debug_han
-   return TRUE;
- }
-+
-+/* Register a pathname translation. */
-+void
-+debug_register_pathname_xlat (oname, nname)
-+     const char *oname;
-+     const char *nname;
-+{
-+  struct xlat_list *xlp;
-+
-+  /* Special case: if oname is given as NULL, this means the
-+     --basename option has been given to objcopy. */
-+  if (oname == NULL)
-+    {
-+      xlat_basename = TRUE;
-+      return;
-+    }
-+
-+  xlp = (struct xlat_list *) xmalloc (sizeof (struct xlat_list));
-+  xlp->next = NULL;
-+  if (xlat == NULL)
-+    xlat = xltail = xlp;
-+  else
-+    {
-+      xltail->next = xlp;
-+      xltail = xlp;
-+    }
-+  xlp->old = oname;
-+  xlp->newstr = nname;
-+  xlp->olen = strlen (oname);
-+  xlp->nlen = strlen (nname);
-+}
-+
-+/* Try to translate a pathname. */
-+static const char *
-+debug_xlat_pathname (oname)
-+     const char *oname;
-+{
-+  struct xlat_list *xlp;
-+  char *cp;
-+  size_t olen;
-+
-+  if (xlat_basename)
-+    return bu_basename (oname);
-+
-+  olen = strlen (oname);
-+  for (xlp = xlat; xlp; xlp = xlp->next)
-+    {
-+      if (xlp->olen > olen)
-+       /* This cannot be our turn. */
-+       continue;
-+      /* Since we have pre-computed all our length values to avoid
-+        repetitively computing them, just use memcmp() since it's
-+        faster than strcmp(). */
-+      if (memcmp (xlp->old, oname, xlp->olen) == 0)
-+       {
-+         cp = (char *) xmalloc (olen + xlp->nlen - xlp->olen + 1);
-+         memcpy (cp, xlp->newstr, xlp->nlen);
-+         memcpy (cp + xlp->nlen, oname + xlp->olen,
-+                 olen - xlp->olen + 1);
-+         return cp;
-+       }
-+    }
-+
-+  /* Not found, pass the original name on. */
-+  return oname;
-+}
-+
-diff -Naurp binutils/debug.h binutils/debug.h
---- binutils/debug.h   2009-09-10 19:10:44.000000000 +0530
-+++ binutils/debug.h   2011-11-30 12:54:36.000000000 +0530
-@@ -441,6 +441,12 @@ extern bfd_boolean debug_set_filename (v
- extern bfd_boolean debug_start_source (void *, const char *);
-+/* Register a pathname translation for source (and include) filenames.
-+   This is used by the --change-pathname option of objcopy. */
-+
-+extern void debug_register_pathname_xlat
-+  PARAMS ((const char *, const char *));
-+
- /* Record a function definition.  This implicitly starts a function
-    block.  The debug_type argument is the type of the return value.
-    The bfd_boolean indicates whether the function is globally visible.
-diff -Naurp binutils/doc/objcopy.1 binutils/doc/objcopy.1
---- binutils/doc/objcopy.1     2011-11-21 17:10:06.000000000 +0530
-+++ binutils/doc/objcopy.1     2011-11-30 12:54:36.000000000 +0530
-@@ -195,6 +195,8 @@ objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-
-         [\fB\-\-readonly\-text\fR]
-         [\fB\-\-pure\fR]
-         [\fB\-\-impure\fR]
-+      [\fB\-\-change\-pathname\fR \fIold\fR=\fInew\fR]
-+      [\fB\-\-basename\fR]
-         [\fB\-\-file\-alignment=\fR\fInum\fR]
-         [\fB\-\-heap=\fR\fIsize\fR]
-         [\fB\-\-image\-base=\fR\fIaddress\fR]
-@@ -911,6 +913,23 @@ Compress \s-1DWARF\s0 debug sections usi
- .IP "\fB\-\-decompress\-debug\-sections\fR" 4
- .IX Item "--decompress-debug-sections"
- Decompress \s-1DWARF\s0 debug sections using zlib.
-+.IP "\fB\-\-change\-pathname\fR \fIold\fR=\fInew\fR" 4
-+.IX Item "--change-pathname old=new"
-+When converting debugging information using \fB\-\-debugging\fR, for
-+every pathname that starts with \fIold\fR, replace the matching part
-+by \fInew\fR.  This is intented to map pathnames between different
-+debugging tools, or when parts of the object file(s) had their
-+pathnames recorded in a different build environment.  Note that only
-+leading directory name components might be changed that way, since the
-+trailing filename could be recorded elsewhere as well (depending on the
-+debugging format of the input file).
-+.IP "\fB\-\-basename\fR"
-+.IX Item "--basename"
-+When converting debugging information using \fB\-\-debugging\fR, for
-+every pathname, strip all leading directory information.  This option
-+takes precedence over any \fB\-\-change\-pathname\fR option.  For some
-+debugging formats that cannot handle long filenames, this options is
-+implied (notably, some COFF debugging formats).
- .IP "\fB\-V\fR" 4
- .IX Item "-V"
- .PD 0
-diff -Naurp binutils/Makefile.am binutils/Makefile.am
---- binutils/Makefile.am       2011-08-08 05:57:15.000000000 +0530
-+++ binutils/Makefile.am       2011-11-30 12:54:36.000000000 +0530
-@@ -107,7 +107,7 @@ CFILES = \
-       resbin.c rescoff.c resrc.c resres.c \
-       size.c srconv.c stabs.c strings.c sysdump.c \
-       unwind-ia64.c elfedit.c version.c \
--      windres.c winduni.c wrstabs.c \
-+      windres.c winduni.c wrcoff.c wrstabs.c \
-       windmc.c mclex.c
- GENERATED_CFILES = \
-@@ -115,7 +115,7 @@ GENERATED_CFILES = \
-       defparse.c deflex.c nlmheader.c rcparse.c mcparse.c
- DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
--WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
-+WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c wrcoff.c
- # Extra object files for objdump
- OBJDUMP_PRIVATE_OFILES = @OBJDUMP_PRIVATE_OFILES@
-diff -Naurp binutils/Makefile.in binutils/Makefile.in
---- binutils/Makefile.in       2011-08-08 05:57:15.000000000 +0530
-+++ binutils/Makefile.in       2011-11-30 12:54:36.000000000 +0530
-@@ -134,7 +134,7 @@ am_nm_new_OBJECTS = nm.$(OBJEXT) $(am__o
- nm_new_OBJECTS = $(am_nm_new_OBJECTS)
- nm_new_LDADD = $(LDADD)
- am__objects_3 = rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \
--      ieee.$(OBJEXT) rdcoff.$(OBJEXT)
-+      ieee.$(OBJEXT) rdcoff.$(OBJEXT) wrcoff.$(OBJEXT)
- am__objects_4 = $(am__objects_3) wrstabs.$(OBJEXT)
- am_objcopy_OBJECTS = objcopy.$(OBJEXT) not-strip.$(OBJEXT) \
-       rename.$(OBJEXT) $(am__objects_4) $(am__objects_1)
-@@ -476,7 +476,7 @@ CFILES = \
-       resbin.c rescoff.c resrc.c resres.c \
-       size.c srconv.c stabs.c strings.c sysdump.c \
-       unwind-ia64.c elfedit.c version.c \
--      windres.c winduni.c wrstabs.c \
-+      windres.c winduni.c wrcoff.c wrstabs.c \
-       windmc.c mclex.c
- GENERATED_CFILES = \
-@@ -484,7 +484,7 @@ GENERATED_CFILES = \
-       defparse.c deflex.c nlmheader.c rcparse.c mcparse.c
- DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
--WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
-+WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c wrcoff.c
- # Code shared by all the binutils.
- BULIBS = bucomm.c version.c filemode.c
-diff -Naurp binutils/objcopy.c binutils/objcopy.c
---- binutils/objcopy.c 2011-09-16 09:53:17.000000000 +0530
-+++ binutils/objcopy.c 2011-11-30 12:54:36.000000000 +0530
-@@ -32,6 +32,7 @@
- #include "elf-bfd.h"
- #include <sys/stat.h>
- #include "libbfd.h"
-+#include "debug.h"
- #include "coff/internal.h"
- #include "libcoff.h"
-@@ -308,6 +309,8 @@ enum command_line_switch
-     OPTION_IMPURE,
-     OPTION_EXTRACT_SYMBOL,
-     OPTION_REVERSE_BYTES,
-+    OPTION_CHANGE_PATHNAME,
-+    OPTION_BASENAME,
-     OPTION_FILE_ALIGNMENT,
-     OPTION_HEAP,
-     OPTION_IMAGE_BASE,
-@@ -358,10 +361,12 @@ static struct option copy_options[] =
-   {"adjust-section-vma", required_argument, 0, OPTION_CHANGE_SECTION_ADDRESS},
-   {"adjust-warnings", no_argument, 0, OPTION_CHANGE_WARNINGS},
-   {"alt-machine-code", required_argument, 0, OPTION_ALT_MACH_CODE},
-+  {"basename", no_argument, 0, OPTION_BASENAME},
-   {"binary-architecture", required_argument, 0, 'B'},
-   {"byte", required_argument, 0, 'b'},
-   {"change-addresses", required_argument, 0, OPTION_CHANGE_ADDRESSES},
-   {"change-leading-char", no_argument, 0, OPTION_CHANGE_LEADING_CHAR},
-+  {"change-pathname", required_argument, 0, OPTION_CHANGE_PATHNAME},
-   {"change-section-address", required_argument, 0, OPTION_CHANGE_SECTION_ADDRESS},
-   {"change-section-lma", required_argument, 0, OPTION_CHANGE_SECTION_LMA},
-   {"change-section-vma", required_argument, 0, OPTION_CHANGE_SECTION_VMA},
-@@ -554,6 +559,8 @@ copy_usage (FILE *stream, int exit_statu
-      --prefix-alloc-sections <prefix>\n\
-                                    Add <prefix> to start of every allocatable\n\
-                                      section name\n\
-+     --change-pathname <old>=<new> Change debug pathnames from <old> to <new>\n\
-+     --basename                    Strip directory part from debug pathnames\n\
-      --file-alignment <num>        Set PE file alignment to <num>\n\
-      --heap <reserve>[,<commit>]   Set PE reserve/commit heap to <reserve>/\n\
-                                    <commit>\n\
-@@ -1031,6 +1038,8 @@ filter_symbols (bfd *abfd, bfd *obfd, as
-   asymbol **from = isyms, **to = osyms;
-   long src_count = 0, dst_count = 0;
-   int relocatable = (abfd->flags & (EXEC_P | DYNAMIC)) == 0;
-+  bfd_boolean need_for_debugging = convert_debugging
-+    && bfd_get_arch (abfd) == bfd_arch_avr;
-   for (; src_count < symcount; src_count++)
-     {
-@@ -1131,7 +1140,8 @@ filter_symbols (bfd *abfd, bfd *obfd, as
-              || bfd_is_com_section (bfd_get_section (sym)))
-       keep = strip_symbols != STRIP_UNNEEDED;
-       else if ((flags & BSF_DEBUGGING) != 0)  /* Debugging symbol.  */
--      keep = (strip_symbols != STRIP_DEBUG
-+      keep = need_for_debugging
-+              || (strip_symbols != STRIP_DEBUG
-               && strip_symbols != STRIP_UNNEEDED
-               && ! convert_debugging);
-       else if (bfd_coff_get_comdat_section (abfd, bfd_get_section (sym)))
-@@ -2883,6 +2893,10 @@ write_debugging_info (bfd *obfd, void *d
-     return write_ieee_debugging_info (obfd, dhandle);
-   if (bfd_get_flavour (obfd) == bfd_target_coff_flavour
-+      && bfd_get_arch (obfd) == bfd_arch_avr)
-+    return write_coff_debugging_info (obfd, dhandle, symcountp, symppp);
-+
-+  if (bfd_get_flavour (obfd) == bfd_target_coff_flavour
-       || bfd_get_flavour (obfd) == bfd_target_elf_flavour)
-     {
-       bfd_byte *syms, *strings;
-@@ -3735,6 +3749,30 @@ copy_main (int argc, char *argv[])
-         prefix_alloc_sections_string = optarg;
-         break;
-+      case OPTION_CHANGE_PATHNAME:
-+        {
-+          const char *s;
-+          int len;
-+          char *name;
-+
-+          s = strchr (optarg, '=');
-+          if (s == NULL)
-+            fatal (_("bad format for %s"), "--change-pathname");
-+
-+          len = s - optarg;
-+          name = (char *) xmalloc (len + 1);
-+          strncpy (name, optarg, len);
-+          name[len] = '\0';
-+
-+          debug_register_pathname_xlat (name, s + 1);
-+        }
-+        break;
-+
-+      case OPTION_BASENAME:
-+        /* very special case of pathname translation */
-+        debug_register_pathname_xlat (NULL, NULL);
-+        break;
-+
-       case OPTION_READONLY_TEXT:
-         bfd_flags_to_set |= WP_TEXT;
-         bfd_flags_to_clear &= ~WP_TEXT;
-diff -Naurp binutils/rdcoff.c binutils/rdcoff.c
---- binutils/rdcoff.c  2009-09-02 12:52:32.000000000 +0530
-+++ binutils/rdcoff.c  2011-11-30 12:54:36.000000000 +0530
-@@ -82,6 +82,9 @@ struct coff_types
-   struct coff_slots *slots;
-   /* Basic types.  */
-   debug_type basic[T_MAX + 1];
-+  /* Some general information, kept here for convenience. */
-+  size_t intsize;             /* sizeof (int) */
-+  size_t doublesize;          /* sizeof (double) */
- };
- static debug_type *coff_get_slot (struct coff_types *, int);
-@@ -101,6 +104,7 @@ static bfd_boolean parse_coff_symbol
-   (bfd *, struct coff_types *, asymbol *, long, struct internal_syment *,
-    void *, debug_type, bfd_boolean);
- static bfd_boolean external_coff_symbol_p (int sym_class);
-+static bfd_vma coff_convert_register (bfd *, bfd_vma);
\f
- /* Return the slot for a type.  */
-@@ -271,8 +275,7 @@ parse_coff_base_type (bfd *abfd, struct 
-       break;
-     case T_INT:
--      /* FIXME: Perhaps the size should depend upon the architecture.  */
--      ret = debug_make_int_type (dhandle, 4, FALSE);
-+      ret = debug_make_int_type (dhandle, types->intsize, FALSE);
-       name = "int";
-       break;
-@@ -287,7 +290,7 @@ parse_coff_base_type (bfd *abfd, struct 
-       break;
-     case T_DOUBLE:
--      ret = debug_make_float_type (dhandle, 8);
-+      ret = debug_make_float_type (dhandle, types->doublesize);
-       name = "double";
-       break;
-@@ -307,7 +310,7 @@ parse_coff_base_type (bfd *abfd, struct 
-       break;
-     case T_UINT:
--      ret = debug_make_int_type (dhandle, 4, TRUE);
-+      ret = debug_make_int_type (dhandle, types->intsize, TRUE);
-       name = "unsigned int";
-       break;
-@@ -565,6 +568,8 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_U
-     case C_WEAKEXT:
-     case C_EXT:
-+      /* AVR COFF abuses C_EXTDEF */
-+    case C_EXTDEF:
-       if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
-                                  DEBUG_GLOBAL, bfd_asymbol_value (sym)))
-       return FALSE;
-@@ -580,9 +585,9 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_U
-       break;
-     case C_REG:
--      /* FIXME: We may need to convert the register number.  */
-       if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
--                                 DEBUG_REGISTER, bfd_asymbol_value (sym)))
-+                                 DEBUG_REGISTER,
-+                                 coff_convert_register (abfd, bfd_asymbol_value (sym))))
-       return FALSE;
-       break;
-@@ -596,9 +601,9 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_U
-       break;
-     case C_REGPARM:
--      /* FIXME: We may need to convert the register number.  */
-       if (! debug_record_parameter (dhandle, bfd_asymbol_name (sym), type,
--                                  DEBUG_PARM_REG, bfd_asymbol_value (sym)))
-+                                  DEBUG_PARM_REG,
-+                                  coff_convert_register (abfd, bfd_asymbol_value (sym))))
-       return FALSE;
-       break;
-@@ -648,6 +653,28 @@ external_coff_symbol_p (int sym_class)
-   return FALSE;
- }
-+static bfd_vma
-+coff_convert_register (abfd, val)
-+     bfd *abfd;
-+     bfd_vma val;
-+{
-+
-+  switch (bfd_get_arch (abfd))
-+    {
-+    case bfd_arch_avr:
-+      /* AVR COFF wants to describe up to four registers by the four
-+       bytes of the 32-bit value.  Unused bytes are filled with
-+       0xff.  In theory, this would allow for non-contiguous
-+       register usage to hold a single value, but hopefully, no
-+       compiler is going to use that feature.  We could not handle
-+       it anyway. */
-+      return val & 0xff;
-+
-+    default:
-+      return val;
-+    }
-+}
-+
- /* This is the main routine.  It looks through all the symbols and
-    handles them.  */
-@@ -674,6 +701,17 @@ parse_coff (bfd *abfd, asymbol **syms, l
-   types.slots = NULL;
-   for (i = 0; i <= T_MAX; i++)
-     types.basic[i] = DEBUG_TYPE_NULL;
-+  switch (bfd_get_arch (abfd))
-+    {
-+    case bfd_arch_avr:
-+      types.intsize = 2;
-+      types.doublesize = 4;
-+      break;
-+
-+    default:
-+      types.intsize = 4;
-+      types.doublesize = 8;
-+    }
-   next_c_file = -1;
-   fnname = NULL;
-@@ -734,7 +772,6 @@ parse_coff (bfd *abfd, asymbol **syms, l
-       switch (syment.n_sclass)
-       {
-       case C_EFCN:
--      case C_EXTDEF:
-       case C_ULABEL:
-       case C_USTATIC:
-       case C_LINE:
-@@ -757,6 +794,8 @@ parse_coff (bfd *abfd, asymbol **syms, l
-         /* Fall through.  */
-       case C_WEAKEXT:
-       case C_EXT:
-+        /* AVR COFF abuses C_EXTDEF for C_EXT */
-+      case C_EXTDEF:
-         if (ISFCN (syment.n_type))
-           {
-             fnname = name;
-diff -Naurp binutils/wrcoff.c binutils/wrcoff.c
---- binutils/wrcoff.c  1970-01-01 05:30:00.000000000 +0530
-+++ binutils/wrcoff.c  2011-11-30 12:54:36.000000000 +0530
-@@ -0,0 +1,3410 @@
-+/* wrcoff.c -- Generate (AVR) COFF debugging information
-+   Copyright 2003 Free Software Foundation, Inc.
-+
-+   Written by Joerg Wunsch.
-+
-+   This file is part of GNU Binutils.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 2 of the License, or
-+   (at your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with this program; if not, write to the Free Software
-+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-+   02111-1307, USA.  */
-+
-+/* This file contains code which writes out COFF debugging
-+   information.  By now, this has only been tested on the AVR
-+   platform, though any attempt has been made to keep the conversion
-+   applicable to possible other COFF debugging consumers as well. */
-+
-+#include <stdio.h>
-+#include <assert.h>
-+
-+#include "sysdep.h"
-+#include "bfd.h"
-+#include "coff/internal.h"
-+#include "bucomm.h"
-+#include "libiberty.h"
-+#include "safe-ctype.h"
-+#include "debug.h"
-+#include "budbg.h"
-+
-+/* Enabling COFF_DEBUG will trace the internal callback functions and
-+   their parameters as debug_write() calls them. */
-+//#define COFF_DEBUG 1
-+
-+#include "libcoff.h"
-+
-+#define N_TMASK (coff_data (info->abfd)->local_n_tmask)
-+#define N_BTSHFT (coff_data (info->abfd)->local_n_btshft)
-+#define N_BTMASK (coff_data (info->abfd)->local_n_btmask)
-+#define N_TSHIFT (coff_data (info->abfd)->local_n_tshift)
-+
-+/* Structure of local symbols per compilation unit. */
-+struct coff_compilation_unit
-+{
-+  const char *fname;
-+  asymbol **syms;
-+  long nsyms, totsyms;
-+};
-+
-+enum ts_kind
-+{
-+  TS_EMPTY,
-+  TS_VOID,
-+  TS_INT,
-+  TS_FLOAT,
-+  TS_COMPLEX,
-+  TS_ENUM,
-+  TS_POINTER,
-+  TS_FUNC,
-+  TS_ARRAY,
-+  TS_STRUCT,
-+  TS_NONE = -1
-+};
-+
-+/* Structure defining the pre-defined types. */
-+struct coff_predef_type
-+{
-+  enum ts_kind kind;
-+  unsigned int size;          /* in bytes */
-+  bfd_boolean isunsigned;
-+  int slot;
-+};
-+
-+struct coff_type_stack;
-+struct coff_hash_entry;
-+
-+struct coff_struct_fields
-+{
-+  const char *name;
-+  bfd_vma bitpos;
-+  bfd_vma bitsize;
-+  enum debug_visibility visibility;
-+  struct coff_type_stack *types;
-+};
-+
-+/* Our type stack. */
-+struct coff_type_stack
-+{
-+  struct coff_type_stack *next;
-+  enum ts_kind tsk;
-+  union
-+  {
-+    /* TS_INT */
-+    struct
-+    {
-+      unsigned int size;
-+      bfd_boolean isunsigned;
-+    }
-+    ts_int;
-+
-+    /* TS_FLOAT */
-+    struct
-+    {
-+      unsigned int size;
-+    }
-+    ts_float;
-+
-+    /* TS_ENUM */
-+    struct
-+    {
-+      union
-+      {
-+      const char *fixtag;
-+      char *malloctag;
-+      }
-+      tag;
-+      bfd_boolean tagismalloced;
-+      const char **names;
-+      bfd_signed_vma *vals;
-+      struct coff_enum_hash_entry *ehash;
-+    }
-+    ts_enum;
-+
-+    /* TS_FUNC */
-+    struct
-+    {
-+      struct coff_type_stack *savedts;
-+    }
-+    ts_func;
-+
-+    /* TS_ARRAY */
-+    struct
-+    {
-+      bfd_signed_vma low;
-+      bfd_signed_vma high;
-+    }
-+    ts_array;
-+
-+    /* TS_STRUCT */
-+    struct
-+    {
-+      union
-+      {
-+      const char *fixtag;
-+      char *malloctag;
-+      }
-+      tag;
-+      bfd_boolean tagismalloced;
-+      unsigned int id;
-+      bfd_boolean isstruct;
-+      unsigned int size;
-+      long nfields;
-+      struct coff_struct_fields *fields;
-+      struct coff_type_stack *savedts;
-+      struct coff_struct_hash_entry *shash;
-+    }
-+    ts_struct;
-+  }
-+  u;
-+};
-+
-+struct coff_name_type_hash_table
-+{
-+  struct bfd_hash_table root;
-+};
-+
-+struct coff_name_type_hash_entry
-+{
-+  struct bfd_hash_entry root;
-+  /* Information for this name.  */
-+  struct coff_type_stack *types;
-+  bfd_boolean emitted;
-+};
-+
-+struct coff_struct_hash_table
-+{
-+  struct bfd_hash_table root;
-+};
-+
-+struct coff_struct_hash_entry
-+{
-+  struct bfd_hash_entry root;
-+  /* Information for this name.  */
-+  struct coff_type_stack *types;
-+  bfd_boolean emitted;
-+  combined_entry_type *native;
-+  /* list of symbol indices that need fixing */
-+  long *fixidxs;
-+  unsigned nfixidxs;
-+};
-+
-+struct coff_enum_hash_table
-+{
-+  struct bfd_hash_table root;
-+};
-+
-+struct coff_enum_hash_entry
-+{
-+  struct bfd_hash_entry root;
-+  /* Information for this name.  */
-+  struct coff_type_stack *types;
-+  bfd_boolean emitted;
-+  combined_entry_type *native;
-+  /* list of symbol indices that need fixing */
-+  long *fixidxs;
-+  unsigned nfixidxs;
-+};
-+
-+/* COFF private symbol data.  Used as a cookie to pass data around
-+   between various processing stages.  The generic COFF handling code
-+   doesn't use any private data. */
-+struct coff_private_symdata
-+{
-+  unsigned int size;          /* size of symbol, used in AVR register
-+                                 translation */
-+  struct coff_struct_hash_entry *shash; /* TS_STRUCT hash for fixups */
-+  struct coff_enum_hash_entry *ehash; /* TS_ENUM hash for fixups */
-+};
-+
-+/* Stack of tags that need endndx fixing. */
-+struct coff_fix_stack
-+{
-+  struct coff_fix_stack *next;
-+  combined_entry_type *native;
-+};
-+
-+/* This is the handle passed through debug_write.  */
-+
-+struct coff_write_handle
-+{
-+  /* The BFD.  */
-+  bfd *abfd;
-+  /* Pointers to .text and .data sections, can be used as defaults if
-+     no other information is available. */
-+  asection *textsect;
-+  asection *datasect;
-+  /* Some special flags. */
-+  unsigned long flags;
-+  /* Flags describing architecture options. */
-+#define COFF_FL_AVR   0x0001  /* COFF is for AVR platform. */
-+#define COFF_FL_EXT_AVR       0x0002  /* AVR "extended" COFF */
-+  /* Flags describing internal status information. */
-+#define COFF_FL_FIX_ENDNDX    0x10000 /* apply endndx fix at next symbol */
-+#define COFF_FL_START_FCN     0x20000 /* begin of function pending */
-+#define COFF_FL_FIX_BB                0x40000 /* fix last ".bb" symbol */
-+  /* List of our compilation units, from input symbol table. */
-+  struct coff_compilation_unit *units;
-+  long nunits;
-+  struct coff_compilation_unit *currentfile;
-+  /* Global symbols from input symbol table. */
-+  asymbol **globals;
-+  long nglobals;
-+  /* Section syms for named sections. */
-+  coff_symbol_type **secsyms;
-+  long nsecsyms;
-+  /* Our COFF symbols. */
-+  asymbol **syms;
-+  long nsyms;
-+  /* Total line number count. */
-+  unsigned long totlnos;
-+  /* Size of standard objects on this arch. */
-+  unsigned int pointersize;
-+  unsigned int enumsize;
-+  /* Pending information when starting a function.  We have to defer
-+     almost everything, some actions can be taken when seeing the
-+     starting block of that function, some will even have to wait
-+     until we see the end of the function. */
-+  const char *funname;                /* name of function */
-+  bfd_boolean funglobal;              /* global/local function? */
-+  unsigned int lastlno;               /* last line number seen so far */
-+  long funcindex;             /* index of ".func" symbol in syms */
-+  unsigned int nlnos;         /* line numbers recorded for this function*/
-+  bfd_vma endaddr;            /* last .eb address we have seen so far */
-+  unsigned int funlno;                /* first line number in function */
-+  coff_symbol_type **fargs;   /* function arguments */
-+  unsigned int nfargs;
-+  asection *funcsection;      /* section the current function is using */
-+  /* Type information */
-+  struct coff_type_stack *tstack;
-+  struct coff_name_type_hash_table types;
-+  struct coff_struct_hash_table structs;
-+  struct coff_enum_hash_table enums;
-+  unsigned nenums;            /* counter for anonymous enum tags */
-+  /* Stack of pending endndx fixes, see coff_record_symbol(). */
-+  struct coff_fix_stack *fixes;
-+};
-+
-+/* Predefined types, default to usual 32-bit architectures.
-+   Arch-dependant different byte sizes will be tuned upon entering
-+   write_coff_debugging_info().  The table is looked up from front to
-+   end, so we put `more popular' types that might have the same size
-+   as other types first (e. g. "int" precedes "long" and "short"). */
-+static struct coff_predef_type coff_predef_types[] =
-+{
-+  { TS_INT, 4, FALSE, 4 },    /* signed int */
-+  { TS_INT, 1, FALSE, 2 },    /* signed char */
-+  { TS_INT, 2, FALSE, 3 },    /* signed short */
-+  { TS_INT, 4, FALSE, 5 },    /* long int */
-+  { TS_FLOAT, 8, FALSE, 7 },  /* double */
-+  { TS_FLOAT, 4, FALSE, 6 },  /* float */
-+  { TS_INT, 4, TRUE, 14 },    /* unsigned int */
-+  { TS_INT, 1, TRUE, 12 },    /* unsigned char */
-+  { TS_INT, 2, TRUE, 13 },    /* unsigned short */
-+  { TS_INT, 4, TRUE, 15 },    /* unsigned long */
-+};
-+
-+static bfd_boolean coff_copy_symbols
-+  PARAMS ((struct coff_write_handle *, long, asymbol **));
-+static asymbol *coff_find_symbol
-+  PARAMS ((struct coff_write_handle *, const char *, bfd_boolean, bfd_boolean));
-+static void coff_record_symbol
-+  PARAMS ((struct coff_write_handle *, coff_symbol_type *));
-+static symvalue coff_fixup_avr_register PARAMS ((symvalue, int));
-+static struct bfd_hash_entry *coff_name_type_newfunc
-+  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-+static bfd_boolean coff_free_type_info
-+  PARAMS ((struct coff_name_type_hash_entry *, PTR));
-+static struct bfd_hash_entry *coff_struct_newfunc
-+  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-+static bfd_boolean coff_free_struct_info
-+  PARAMS ((struct coff_struct_hash_entry *, PTR));
-+static struct bfd_hash_entry *coff_enum_newfunc
-+  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-+static bfd_boolean coff_free_enum_info
-+  PARAMS ((struct coff_enum_hash_entry *, PTR));
-+static unsigned int coff_get_fundamental_type
-+  PARAMS ((struct coff_write_handle *, struct coff_type_stack *));
-+static bfd_boolean coff_make_typed_symbol
-+  PARAMS ((struct coff_write_handle *, coff_symbol_type **, enum ts_kind));
-+static bfd_boolean coff_emit_struct
-+  PARAMS ((struct coff_write_handle *, struct coff_type_stack *,
-+         struct coff_struct_hash_entry *));
-+static bfd_boolean coff_emit_enum
-+  PARAMS ((struct coff_write_handle *, struct coff_type_stack *,
-+         struct coff_enum_hash_entry *));
-+static bfd_boolean coff_emit_ndebug_sym
-+  PARAMS ((struct coff_write_handle *, asymbol *, bfd_boolean));
-+
-+static bfd_boolean coff_start_compilation_unit PARAMS ((PTR, const char *));
-+static bfd_boolean coff_start_source PARAMS ((PTR, const char *));
-+static bfd_boolean coff_empty_type PARAMS ((PTR));
-+static bfd_boolean coff_void_type PARAMS ((PTR));
-+static bfd_boolean coff_int_type PARAMS ((PTR, unsigned int, bfd_boolean));
-+static bfd_boolean coff_float_type PARAMS ((PTR, unsigned int));
-+static bfd_boolean coff_complex_type PARAMS ((PTR, unsigned int));
-+static bfd_boolean coff_bool_type PARAMS ((PTR, unsigned int));
-+static bfd_boolean coff_enum_type
-+  PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
-+static bfd_boolean coff_pointer_type PARAMS ((PTR));
-+static bfd_boolean coff_function_type PARAMS ((PTR, int, bfd_boolean));
-+static bfd_boolean coff_reference_type PARAMS ((PTR));
-+static bfd_boolean coff_range_type PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
-+static bfd_boolean coff_array_type
-+  PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, bfd_boolean));
-+static bfd_boolean coff_set_type PARAMS ((PTR, bfd_boolean));
-+static bfd_boolean coff_offset_type PARAMS ((PTR));
-+static bfd_boolean coff_method_type PARAMS ((PTR, bfd_boolean, int, bfd_boolean));
-+static bfd_boolean coff_const_type PARAMS ((PTR));
-+static bfd_boolean coff_volatile_type PARAMS ((PTR));
-+static bfd_boolean coff_start_struct_type
-+  PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int));
-+static bfd_boolean coff_struct_field
-+  PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
-+static bfd_boolean coff_end_struct_type PARAMS ((PTR));
-+static bfd_boolean coff_start_class_type
-+  PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int, bfd_boolean,
-+         bfd_boolean));
-+static bfd_boolean coff_class_static_member
-+  PARAMS ((PTR, const char *, const char *, enum debug_visibility));
-+static bfd_boolean coff_class_baseclass
-+  PARAMS ((PTR, bfd_vma, bfd_boolean, enum debug_visibility));
-+static bfd_boolean coff_class_start_method PARAMS ((PTR, const char *));
-+static bfd_boolean coff_class_method_variant
-+  PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
-+         bfd_vma, bfd_boolean));
-+static bfd_boolean coff_class_static_method_variant
-+  PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean, bfd_boolean));
-+static bfd_boolean coff_class_end_method PARAMS ((PTR));
-+static bfd_boolean coff_end_class_type PARAMS ((PTR));
-+static bfd_boolean coff_typedef_type PARAMS ((PTR, const char *));
-+static bfd_boolean coff_tag_type
-+  PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
-+static bfd_boolean coff_typdef PARAMS ((PTR, const char *));
-+static bfd_boolean coff_tag PARAMS ((PTR, const char *));
-+static bfd_boolean coff_int_constant PARAMS ((PTR, const char *, bfd_vma));
-+static bfd_boolean coff_float_constant PARAMS ((PTR, const char *, double));
-+static bfd_boolean coff_typed_constant PARAMS ((PTR, const char *, bfd_vma));
-+static bfd_boolean coff_variable
-+  PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
-+static bfd_boolean coff_start_function PARAMS ((PTR, const char *, bfd_boolean));
-+static bfd_boolean coff_function_parameter
-+  PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
-+static bfd_boolean coff_start_block PARAMS ((PTR, bfd_vma));
-+static bfd_boolean coff_end_block PARAMS ((PTR, bfd_vma));
-+static bfd_boolean coff_end_function PARAMS ((PTR));
-+static bfd_boolean coff_lineno
-+  PARAMS ((PTR, const char *, unsigned long, bfd_vma));
-+
-+static const struct debug_write_fns coff_fns =
-+{
-+  coff_start_compilation_unit,
-+  coff_start_source,
-+  coff_empty_type,
-+  coff_void_type,
-+  coff_int_type,
-+  coff_float_type,
-+  coff_complex_type,
-+  coff_bool_type,
-+  coff_enum_type,
-+  coff_pointer_type,
-+  coff_function_type,
-+  coff_reference_type,
-+  coff_range_type,
-+  coff_array_type,
-+  coff_set_type,
-+  coff_offset_type,
-+  coff_method_type,
-+  coff_const_type,
-+  coff_volatile_type,
-+  coff_start_struct_type,
-+  coff_struct_field,
-+  coff_end_struct_type,
-+  coff_start_class_type,
-+  coff_class_static_member,
-+  coff_class_baseclass,
-+  coff_class_start_method,
-+  coff_class_method_variant,
-+  coff_class_static_method_variant,
-+  coff_class_end_method,
-+  coff_end_class_type,
-+  coff_typedef_type,
-+  coff_tag_type,
-+  coff_typdef,
-+  coff_tag,
-+  coff_int_constant,
-+  coff_float_constant,
-+  coff_typed_constant,
-+  coff_variable,
-+  coff_start_function,
-+  coff_function_parameter,
-+  coff_start_block,
-+  coff_end_block,
-+  coff_end_function,
-+  coff_lineno
-+};
-+\f
-+/*
-+ * Copy our input (non-debugging) symbols.  Local symbols will be
-+ * maintained in one bucket per each compilation unit, global (and
-+ * weak) symbols will be kept in a simple array.
-+ */
-+static bfd_boolean
-+coff_copy_symbols (info, count, sympp)
-+     struct coff_write_handle *info;
-+     long count;
-+     asymbol **sympp;
-+{
-+  asymbol *osym;
-+  long i;
-+  struct coff_compilation_unit *up;
-+
-+  up = NULL;
-+
-+  for (i = 0; i < count; i++)
-+    {
-+      osym = sympp[i];
-+
-+      /* Try to figure out the .text and .data sections from our input
-+       symbols as we walk them.  Unfortunately, this ought to be the
-+       /input/ section pointers, so their ->output_section is
-+       non-NULL.  That's why we can't simply walk through all the
-+       sections of our abfd since this is describing the output
-+       only. */
-+      if (info->textsect == NULL && osym->section->flags & SEC_CODE)
-+      /* Assume this to be our .text section. */
-+      info->textsect = osym->section;
-+      else if (info->datasect == NULL && osym->section->flags & SEC_DATA)
-+      /* Assume this to be our .data section. */
-+      info->datasect = osym->section;
-+
-+      if (osym->flags & BSF_FILE)
-+      {
-+        /* New file name. */
-+        long l;
-+
-+        up = NULL;
-+
-+        /* Well, maybe an old one actually?  If so, append it there.
-+           This can happen for files that contribute to multiple
-+           (input) sections that were concatenated by the linker
-+           (like crt1.S). */
-+        for (l = 0; l < info->nunits; l++)
-+          {
-+            if (strcmp (info->units[l].fname, osym->name) == 0)
-+              {
-+                up = info->units + l;
-+                break;
-+              }
-+          }
-+
-+        if (up == NULL)
-+          {
-+            info->units = (struct coff_compilation_unit *)
-+              xrealloc (info->units,
-+                        ++info->nunits * sizeof(struct coff_compilation_unit));
-+            up = info->units + (info->nunits - 1);
-+            up->fname = osym->name;
-+            up->syms = NULL;
-+            up->nsyms = up->totsyms = 0;
-+          }
-+      }
-+      else if (osym->flags & (BSF_GLOBAL | BSF_WEAK))
-+      {
-+        /* Global (or weak) symbols are recorded outside compilation
-+           units. */
-+        info->globals = (asymbol **)
-+          xrealloc (info->globals, ++info->nglobals * sizeof(asymbol *));
-+        info->globals[info->nglobals - 1] = osym;
-+        continue;
-+      }
-+      else if (!bfd_is_const_section(osym->section))
-+      {
-+        if (osym->flags & BSF_SECTION_SYM)
-+          {
-+            coff_symbol_type *csymp;
-+            /* Just record them by now, they'll be fixed up later. */
-+
-+            if (info->nsyms == 0 && (info->flags & COFF_FL_AVR) == 0)
-+              {
-+                /* Very first symbol, fake a compilation unit name
-+                   for it.  Historical precedence seems to dictate
-+                   this, but AVR COFF does not use that. */
-+                csymp = (coff_symbol_type *)
-+                  coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+                if (csymp == NULL)
-+                  return FALSE;
-+
-+                csymp->symbol.name = xstrdup ("<fake>");
-+                csymp->symbol.value = 0;
-+                csymp->symbol.udata.p = NULL;
-+                csymp->native->u.syment.n_sclass = C_FILE;
-+                /* force filename into aux entry */
-+                csymp->native->u.syment.n_numaux = 1;
-+                coff_record_symbol (info, csymp);
-+              }
-+
-+            /* convert to COFF native section symbol */
-+            csymp = (coff_symbol_type *)
-+              coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+            if (csymp == NULL)
-+              return FALSE;
-+
-+            csymp->symbol.name = xstrdup (osym->section->name);
-+            csymp->symbol.value = osym->section->output_section->vma;
-+            csymp->symbol.flags = BSF_DEBUGGING | BSF_SECTION_SYM;
-+            csymp->symbol.section = osym->section;
-+            csymp->symbol.udata.p = NULL;
-+            csymp->native->fix_scnlen = 1;
-+            csymp->native->u.syment.n_sclass = C_STAT;
-+            csymp->native->u.syment.n_type = T_NULL;
-+            csymp->native->u.syment.n_numaux = 1;
-+
-+            coff_record_symbol (info, csymp);
-+
-+            info->secsyms = (coff_symbol_type **)
-+              xrealloc (info->secsyms,
-+                        ++info->nsecsyms * sizeof(coff_symbol_type *));
-+            info->secsyms[info->nsecsyms - 1] = csymp;
-+          }
-+        else
-+          {
-+            /* Local symbol in a named section, will be recorded
-+               within the respective compilation unit. */
-+            if (up == NULL)
-+              {
-+                fprintf (stderr,
-+                         _("Discarding local symbol outside any compilation unit"));
-+                if (osym->name)
-+                  fprintf (stderr, ": %s", osym->name);
-+                putc ('\n', stderr);
-+              }
-+            else
-+              {
-+                up->syms = (asymbol **)
-+                  xrealloc (up->syms, ++up->nsyms * sizeof(asymbol *));
-+                up->syms[up->nsyms - 1] = osym;
-+                up->totsyms = up->nsyms;
-+                continue;
-+              }
-+          }
-+      }
-+    }
-+
-+  return TRUE;
-+}
-+
-+/* Find a name in the symbol table.  If found, the respective entry in
-+   the symbol vector is zeroed, so after processing all debugging
-+   symbols, only non-debugging symbols will remain. */
-+static asymbol *
-+coff_find_symbol (info, name, isfunction, global)
-+     struct coff_write_handle *info;
-+     const char *name;
-+     bfd_boolean isfunction;
-+     bfd_boolean global;
-+{
-+  asymbol *symp;
-+  long i;
-+  size_t namelen;
-+
-+  if (global)
-+    {
-+      for (i = 0; i < info->nglobals; i++)
-+      {
-+        symp = info->globals[i];
-+        if (symp == NULL)
-+          continue;
-+        if (strcmp (name, symp->name) == 0
-+            && ((symp->flags & BSF_FUNCTION) != 0) == (isfunction == TRUE))
-+          {
-+            info->globals[i] = NULL;
-+            return symp;
-+          }
-+      }
-+      return NULL;
-+    }
-+
-+  if (info->currentfile == NULL)
-+    return NULL;
-+
-+  /* For local symbols, the match optionally stops at a dot in the
-+     symtab symbol's name; this is used by gcc to indicate
-+     function-scope static symbols (e. g. symbol "foo" will become
-+     "foo.1" in function scope). */
-+  namelen = strlen (name);
-+  for (i = 0; i < info->currentfile->nsyms; i++)
-+    {
-+      symp = info->currentfile->syms[i];
-+      if (symp == NULL)
-+      continue;
-+      if (strncmp (name, symp->name, namelen) == 0
-+        && (symp->name[namelen] == '\0' || symp->name[namelen] == '.')
-+        && ((symp->flags & BSF_FUNCTION) != 0) == (isfunction == TRUE))
-+      {
-+        info->currentfile->syms[i] = NULL;
-+        info->currentfile->totsyms--;
-+        return symp;
-+      }
-+    }
-+  return NULL;
-+}
-+
-+static void
-+coff_record_symbol (info, csymp)
-+     struct coff_write_handle *info;
-+     coff_symbol_type *csymp;
-+{
-+  struct coff_private_symdata *priv;
-+
-+  info->syms = (asymbol **) xrealloc (info->syms,
-+                                    ++info->nsyms * sizeof (asymbol *));
-+  info->syms[info->nsyms - 1] = (asymbol *)csymp;
-+
-+  if ((priv = csymp->symbol.udata.p) != NULL)
-+    {
-+      if (priv->shash != NULL)
-+      {
-+        struct coff_struct_hash_entry *shash = priv->shash;
-+        shash->fixidxs = (long *)
-+          xrealloc (shash->fixidxs, ++shash->nfixidxs * sizeof (long));
-+        shash->fixidxs[shash->nfixidxs - 1] = info->nsyms - 1;
-+      }
-+      if (priv->ehash != NULL)
-+      {
-+        struct coff_enum_hash_entry *ehash = priv->ehash;
-+        ehash->fixidxs = (long *)
-+          xrealloc (ehash->fixidxs, ++ehash->nfixidxs * sizeof (long));
-+        ehash->fixidxs[ehash->nfixidxs - 1] = info->nsyms - 1;
-+      }
-+      free (priv);
-+      csymp->symbol.udata.p = NULL;
-+    }
-+
-+  /* If there are any pending endndx fixes, pop the last element from
-+     that stack, and record the current symbol for fixing.  We need to
-+     do this here since we need to record our current csymp->native
-+     (where that csymp is completely unrelated to whatever symbol was
-+     previously generated that requested the fixup).  The stack of
-+     pending fixes is required since several endndx fixes could be
-+     nested, e. g. the start of a function has a pending fix that
-+     needs to point to the first symbol after the function, but there
-+     could be an anonymous struct definition inside that function's
-+     local variables where the endndx needs to point after the last
-+     symbol of this struct.  Also, structs and unions could be nested.
-+
-+     Each call to coff_record_symbol() can fix at most one endndx
-+     (even if more are pending in the stack), but that's OK.
-+
-+     Note that bfd/coffgen.c converts that csymp->native into a
-+     symtable slot number after coff_renumber_symbols() has been
-+     run. */
-+  if (info->flags & COFF_FL_FIX_ENDNDX)
-+    {
-+      struct coff_fix_stack *fsp, *ofsp;
-+      union internal_auxent *aux;
-+
-+      assert (info->fixes != NULL);
-+
-+      fsp = info->fixes;
-+      ofsp = NULL;
-+      while (fsp->next != NULL)
-+      {
-+        ofsp = fsp;
-+        fsp = fsp->next;
-+      }
-+      if (ofsp == NULL)
-+      info->fixes = NULL;
-+      else
-+      ofsp->next = NULL;
-+
-+      aux = &(fsp->native->u.auxent);
-+      fsp->native->fix_end = 1;
-+      aux->x_sym.x_fcnary.x_fcn.x_endndx.p = csymp->native;
-+      free (fsp);
-+
-+      info->flags &= ~COFF_FL_FIX_ENDNDX;
-+    }
-+}
-+
-+/* Fixup AVR COFF register handling: they don't only mention the
-+   starting register number, but all registers, each within one byte
-+   of the value.  Unused register positions are filled up with
-+   0xff. */
-+static symvalue
-+coff_fixup_avr_register (val, size)
-+     symvalue val;
-+     int size;
-+{
-+  union
-+  {
-+    unsigned char c[4];
-+    symvalue v;
-+  } u;
-+
-+  u.c[1] = u.c[2] = u.c[3] = 0xff;
-+  u.c[0] = val;
-+  if (size > 8)
-+    u.c[1] = val + 1;
-+  if (size > 16)
-+    {
-+      u.c[2] = val + 2;
-+      u.c[3] = val + 3;
-+    }
-+
-+  return u.v;
-+}
-+
-+/* Initialize an entry in the hash tables.  */
-+
-+static struct bfd_hash_entry *
-+coff_name_type_newfunc (entry, table, string)
-+     struct bfd_hash_entry *entry;
-+     struct bfd_hash_table *table;
-+     const char *string;
-+{
-+  struct coff_name_type_hash_entry *ret =
-+    (struct coff_name_type_hash_entry *) entry;
-+
-+  /* Allocate the structure if it has not already been allocated by a
-+     subclass.  */
-+  if (ret == NULL)
-+    ret = ((struct coff_name_type_hash_entry *)
-+         bfd_hash_allocate (table, sizeof *ret));
-+  if (ret == NULL)
-+    return NULL;
-+
-+  /* Call the allocation method of the superclass.  */
-+  ret = ((struct coff_name_type_hash_entry *)
-+       bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
-+  if (ret)
-+    {
-+      /* Set local fields.  */
-+      ret->types = NULL;
-+      ret->emitted = FALSE;
-+    }
-+
-+  return (struct bfd_hash_entry *) ret;
-+}
-+
-+static struct bfd_hash_entry *
-+coff_struct_newfunc (entry, table, string)
-+     struct bfd_hash_entry *entry;
-+     struct bfd_hash_table *table;
-+     const char *string;
-+{
-+  struct coff_struct_hash_entry *ret =
-+    (struct coff_struct_hash_entry *) entry;
-+
-+  /* Allocate the structure if it has not already been allocated by a
-+     subclass.  */
-+  if (ret == NULL)
-+    ret = ((struct coff_struct_hash_entry *)
-+         bfd_hash_allocate (table, sizeof *ret));
-+  if (ret == NULL)
-+    return NULL;
-+
-+  /* Call the allocation method of the superclass.  */
-+  ret = ((struct coff_struct_hash_entry *)
-+       bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
-+  if (ret)
-+    {
-+      /* Set local fields.  */
-+      ret->types = NULL;
-+      ret->emitted = FALSE;
-+      ret->fixidxs = NULL;
-+      ret->nfixidxs = 0;
-+      ret->native = NULL;
-+    }
-+
-+  return (struct bfd_hash_entry *) ret;
-+}
-+
-+static struct bfd_hash_entry *
-+coff_enum_newfunc (entry, table, string)
-+     struct bfd_hash_entry *entry;
-+     struct bfd_hash_table *table;
-+     const char *string;
-+{
-+  struct coff_enum_hash_entry *ret =
-+    (struct coff_enum_hash_entry *) entry;
-+
-+  /* Allocate the structure if it has not already been allocated by a
-+     subclass.  */
-+  if (ret == NULL)
-+    ret = ((struct coff_enum_hash_entry *)
-+         bfd_hash_allocate (table, sizeof *ret));
-+  if (ret == NULL)
-+    return NULL;
-+
-+  /* Call the allocation method of the superclass.  */
-+  ret = ((struct coff_enum_hash_entry *)
-+       bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
-+  if (ret)
-+    {
-+      /* Set local fields.  */
-+      ret->types = NULL;
-+      ret->emitted = FALSE;
-+      ret->fixidxs = NULL;
-+      ret->nfixidxs = 0;
-+      ret->native = NULL;
-+    }
-+
-+  return (struct bfd_hash_entry *) ret;
-+}
-+
-+/* Look up an entry in the hash tables.  */
-+
-+#define coff_name_type_hash_lookup(table, string, create, copy) \
-+  ((struct coff_name_type_hash_entry *) \
-+   bfd_hash_lookup (&(table)->root, (string), (create), (copy)))
-+
-+/* Traverse the hash table.  */
-+
-+#define coff_name_type_hash_traverse(table, func, info)                       \
-+  (bfd_hash_traverse                                                  \
-+   (&(table)->root,                                                   \
-+    (bfd_boolean (*) PARAMS ((struct bfd_hash_entry *, PTR))) (func), \
-+    (info)))
-+
-+#define coff_struct_hash_lookup(table, string, create, copy) \
-+  ((struct coff_struct_hash_entry *) \
-+   bfd_hash_lookup (&(table)->root, (string), (create), (copy)))
-+
-+/* Traverse the hash table.  */
-+
-+#define coff_struct_hash_traverse(table, func, info)                  \
-+  (bfd_hash_traverse                                                  \
-+   (&(table)->root,                                                   \
-+    (bfd_boolean (*) PARAMS ((struct bfd_hash_entry *, PTR))) (func), \
-+    (info)))
-+
-+#define coff_enum_hash_lookup(table, string, create, copy) \
-+  ((struct coff_enum_hash_entry *) \
-+   bfd_hash_lookup (&(table)->root, (string), (create), (copy)))
-+
-+/* Traverse the hash table.  */
-+
-+#define coff_enum_hash_traverse(table, func, info)                    \
-+  (bfd_hash_traverse                                                  \
-+   (&(table)->root,                                                   \
-+    (bfd_boolean (*) PARAMS ((struct bfd_hash_entry *, PTR))) (func), \
-+    (info)))
-+
-+#define coff_push_type(kind) \
-+  tst = (struct coff_type_stack *) xmalloc (sizeof (struct coff_type_stack)); \
-+  memset (tst, 0, sizeof (*tst)); \
-+  tst->next = info->tstack; \
-+  tst->tsk = kind; \
-+  info->tstack = tst
-+
-+#define coff_pop_type() \
-+  tst = info->tstack; \
-+  if (tst == NULL) { \
-+    fprintf (stderr, _("empty type stack in coff_pop_type()\n")); \
-+    return FALSE; \
-+  } \
-+  info->tstack = tst->next; \
-+  tst->next = NULL
-+
-+#define coff_complain_unsupp(s) \
-+  fprintf (stderr, _("%s type not supported in %s\n"), \
-+         s, info->abfd->xvec->name); \
-+  return FALSE
-+
-+/* These function is called via the hash traverse routine when freeing
-+   a hash table (at the end of a translation unit). */
-+static bfd_boolean
-+coff_free_type_info (h, p)
-+     struct coff_name_type_hash_entry *h;
-+     PTR p ATTRIBUTE_UNUSED;
-+{
-+  struct coff_type_stack *tst, *otst;
-+
-+  for (tst = h->types; tst != NULL;)
-+    {
-+      otst = tst;
-+      tst = tst->next;
-+      free (otst);
-+    }
-+  return TRUE;
-+}
-+
-+static bfd_boolean
-+coff_free_struct_info (h, p)
-+     struct coff_struct_hash_entry *h;
-+     PTR p ATTRIBUTE_UNUSED;
-+{
-+  struct coff_type_stack *tst, *otst, *xtst, *xotst;
-+  struct coff_struct_fields *fp;
-+  long i;
-+
-+  for (tst = h->types; tst != NULL;)
-+    {
-+      otst = tst;
-+      if (tst->u.ts_struct.tagismalloced)
-+      free (tst->u.ts_struct.tag.malloctag);
-+      for (i = 0, fp = tst->u.ts_struct.fields;
-+         i < tst->u.ts_struct.nfields;
-+         i++, fp++)
-+      {
-+        xtst = fp->types;
-+        while (xtst != NULL)
-+          {
-+            xotst = xtst->next;
-+            free (xtst);
-+            xtst = xotst;
-+          }
-+      }
-+      free (tst->u.ts_struct.fields);
-+      tst = tst->next;
-+      free (otst);
-+    }
-+  return TRUE;
-+}
-+
-+static bfd_boolean
-+coff_free_enum_info (h, p)
-+     struct coff_enum_hash_entry *h;
-+     PTR p ATTRIBUTE_UNUSED;
-+{
-+  struct coff_type_stack *tst, *otst;
-+
-+  for (tst = h->types; tst != NULL;)
-+    {
-+      otst = tst;
-+      if (tst->u.ts_enum.tagismalloced)
-+      free (tst->u.ts_enum.tag.malloctag);
-+      tst = tst->next;
-+      free (otst);
-+    }
-+  return TRUE;
-+}
-+
-+static unsigned int
-+coff_get_fundamental_type (info, tst)
-+     struct coff_write_handle *info ATTRIBUTE_UNUSED;
-+     struct coff_type_stack *tst;
-+{
-+  size_t i;
-+
-+  /* See if one of our predefined types will fit. */
-+  if (tst->tsk == TS_INT)
-+    {
-+      for (i = 0;
-+         i < sizeof coff_predef_types / sizeof (struct coff_predef_type);
-+         i++)
-+      {
-+        if (coff_predef_types[i].kind == TS_INT
-+            && coff_predef_types[i].size == tst->u.ts_int.size
-+            && coff_predef_types[i].isunsigned == tst->u.ts_int.isunsigned)
-+          return coff_predef_types[i].slot;
-+      }
-+      fprintf (stderr,
-+             _("%ssigned %d-bit integer type not available in COFF\n"),
-+             tst->u.ts_int.isunsigned? "un": "", tst->u.ts_int.size * 8);
-+    }
-+  else
-+    {
-+      for (i = 0;
-+         i < sizeof coff_predef_types / sizeof (struct coff_predef_type);
-+         i++)
-+      {
-+        if (coff_predef_types[i].kind == TS_FLOAT
-+            && coff_predef_types[i].size == tst->u.ts_float.size)
-+          return coff_predef_types[i].slot;
-+      }
-+      fprintf (stderr, _("%d-bit float type not available in COFF\n"),
-+             tst->u.ts_float.size * 8);
-+    }
-+
-+  return T_NULL;
-+}
-+
-+static bfd_boolean
-+coff_make_typed_symbol (info, csympp, stopat)
-+     struct coff_write_handle *info;
-+     coff_symbol_type **csympp;
-+     enum ts_kind stopat;
-+{
-+  struct coff_type_stack *tst;
-+  union internal_auxent *aux;
-+  struct coff_struct_hash_entry *shash;
-+  struct coff_enum_hash_entry *ehash;
-+  struct coff_private_symdata *priv;
-+  unsigned int type, numaux, arydim, size, i, nele, nderived;
-+  const char *name;
-+  bfd_boolean oldavrcoff = (info->flags & (COFF_FL_AVR | COFF_FL_EXT_AVR))
-+    == COFF_FL_AVR;
-+
-+  /* Synthesize a new internal COFF symbol. */
-+  *csympp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+  if (*csympp == NULL)
-+    return FALSE;
-+
-+  priv = (struct coff_private_symdata *) xmalloc (sizeof *priv);
-+  memset (priv, 0, sizeof *priv);
-+
-+  type = arydim = size = nderived = 0;
-+
-+  aux = &(((*csympp)->native + 1)->u.auxent);
-+
-+  /* Now, walk the type stack, and see how we could convert the info
-+     we've got to what COFF understands. */
-+  for (;;)
-+    {
-+      if (info->tstack == NULL)
-+      break;
-+
-+      /* If we have been advised to not pop the entire stack, stop
-+       here. */
-+      if (info->tstack->tsk == stopat && info->tstack->next == NULL)
-+      break;
-+
-+      coff_pop_type ();
-+
-+      switch (tst->tsk)
-+      {
-+      case TS_NONE:
-+        /* cannot happen */
-+        break;
-+
-+      case TS_EMPTY:
-+        if (info->tstack != NULL && info->tstack->tsk != stopat)
-+          fprintf (stderr, _("empty type not last on type stack\n"));
-+        /* type |= T_NULL; */
-+        break;
-+
-+      case TS_VOID:
-+        if (info->tstack != NULL && info->tstack->tsk != stopat)
-+          fprintf (stderr, _("void type not last on type stack\n"));
-+        type |= T_VOID;
-+        break;
-+
-+      case TS_INT:
-+        if (info->tstack != NULL && info->tstack->tsk != stopat)
-+          fprintf (stderr, _("int type not last on type stack\n"));
-+        type |= coff_get_fundamental_type (info, tst);
-+        if (size == 0)
-+          size = tst->u.ts_int.size;
-+        break;
-+
-+      case TS_FLOAT:
-+        if (info->tstack != NULL && info->tstack->tsk != stopat)
-+          fprintf (stderr, _("float type not last on type stack\n"));
-+        type |= coff_get_fundamental_type (info, tst);
-+        if (size == 0)
-+          size = tst->u.ts_float.size;
-+        break;
-+
-+      case TS_POINTER:
-+        nderived++;
-+        type = ((type & ~N_BTMASK) << N_TSHIFT) | (DT_PTR << N_BTSHFT);
-+        size = info->pointersize;
-+        break;
-+
-+      case TS_FUNC:
-+        nderived++;
-+        type = ((type & ~N_BTMASK) << N_TSHIFT) | (DT_FCN << N_BTSHFT);
-+        /* AUX entry for DT_FCN will be filled in elsewhere. */
-+        break;
-+
-+      case TS_ARRAY:
-+        /* We need to limit arydim so the assignment below won't
-+           overwrite random locations. */
-+        if (arydim >= DIMNUM)
-+          {
-+            fprintf (stderr,
-+                     _("More than %d array dimensions, result is invalid.\n"),
-+                     DIMNUM);
-+            arydim = DIMNUM - 1;
-+          }
-+        nderived++;
-+        type = ((type & ~N_BTMASK) << N_TSHIFT) | (DT_ARY << N_BTSHFT);
-+        aux->x_sym.x_fcnary.x_ary.x_dimen[arydim++] =
-+          tst->u.ts_array.high - tst->u.ts_array.low + 1;
-+
-+        break;
-+
-+      case TS_COMPLEX:
-+        coff_complain_unsupp (_("complex"));
-+
-+      case TS_ENUM:
-+        type |= T_ENUM;
-+        if (size == 0)
-+          size = info->enumsize;
-+
-+        if (tst->u.ts_enum.ehash != NULL)
-+          {
-+            /* enum tag will be fixed later. */
-+            priv->ehash = tst->u.ts_enum.ehash;
-+            break;
-+          }
-+        if (tst->u.ts_enum.tagismalloced)
-+          name = tst->u.ts_enum.tag.malloctag;
-+        else
-+          name = tst->u.ts_enum.tag.fixtag;
-+        ehash = coff_enum_hash_lookup (&info->enums, name,
-+                                       TRUE, tst->u.ts_enum.tagismalloced);
-+        if (ehash == NULL)
-+          return FALSE;
-+        if (!ehash->emitted)
-+          {
-+            if (ehash->types == NULL)
-+              {
-+                ehash->types = (struct coff_type_stack *)
-+                  xmalloc (sizeof (struct coff_type_stack));
-+                memcpy (ehash->types, tst, sizeof (struct coff_type_stack));
-+              }
-+            ehash->emitted = TRUE;
-+            coff_emit_enum (info, tst, ehash);
-+            if (ehash->nfixidxs != 0)
-+              {
-+                coff_symbol_type *symp;
-+                unsigned tmp_i1;
-+
-+                for (tmp_i1 = 0; tmp_i1 < ehash->nfixidxs; tmp_i1++)
-+                  {
-+                    combined_entry_type *np;
-+
-+                    symp = (coff_symbol_type *) info->syms[ehash->fixidxs[tmp_i1]];
-+                    symp->native->u.syment.n_type &= ~N_BTMASK;
-+                    symp->native->u.syment.n_type |= T_ENUM;
-+
-+                    if (oldavrcoff)
-+                      continue;
-+
-+                    np = symp->native + 1;
-+                    np->fix_tag = 1;
-+                    np->u.auxent.x_sym.x_tagndx.p = ehash->native;
-+                    if (np->u.auxent.x_sym.x_misc.x_fsize == 0)
-+                      np->u.auxent.x_sym.x_misc.x_lnsz.x_size = size;
-+                  }
-+
-+                free (ehash->fixidxs);
-+                ehash->nfixidxs = 0;
-+              }
-+          }
-+        if (!oldavrcoff)
-+          {
-+            ((*csympp)->native + 1)->fix_tag = 1;
-+            aux->x_sym.x_tagndx.p = ehash->native;
-+            if (aux->x_sym.x_misc.x_fsize == 0)
-+              aux->x_sym.x_misc.x_lnsz.x_size = size;
-+          }
-+        break;
-+
-+      case TS_STRUCT:
-+        if (tst->u.ts_struct.isstruct)
-+          type |= T_STRUCT;
-+        else
-+          type |= T_UNION;
-+        if (size == 0)
-+          size = tst->u.ts_struct.size;
-+
-+        if (tst->u.ts_struct.shash != NULL)
-+          {
-+            /* struct tag will be fixed later. */
-+            priv->shash = tst->u.ts_struct.shash;
-+            break;
-+          }
-+        if (tst->u.ts_struct.tagismalloced)
-+          name = tst->u.ts_struct.tag.malloctag;
-+        else
-+          name = tst->u.ts_struct.tag.fixtag;
-+        shash = coff_struct_hash_lookup (&info->structs, name,
-+                                         TRUE, tst->u.ts_struct.tagismalloced);
-+        if (shash == NULL)
-+          return FALSE;
-+        if (!shash->emitted)
-+          {
-+            if (shash->types == NULL)
-+              {
-+                shash->types = (struct coff_type_stack *)
-+                  xmalloc (sizeof (struct coff_type_stack));
-+                memcpy (shash->types, tst, sizeof (struct coff_type_stack));
-+              }
-+            shash->emitted = TRUE;
-+            coff_emit_struct (info, tst, shash);
-+            if (shash->nfixidxs != 0)
-+              {
-+                coff_symbol_type *symp;
-+                unsigned tmp_i2;
-+
-+                for (tmp_i2 = 0; tmp_i2 < shash->nfixidxs; tmp_i2++)
-+                  {
-+                    combined_entry_type *np;
-+
-+                    symp = (coff_symbol_type *) info->syms[shash->fixidxs[tmp_i2]];
-+                    symp->native->u.syment.n_type &= ~N_BTMASK;
-+                    if (tst->u.ts_struct.isstruct)
-+                      symp->native->u.syment.n_type |= T_STRUCT;
-+                    else
-+                      symp->native->u.syment.n_type |= T_UNION;
-+
-+                    if (oldavrcoff)
-+                      continue;
-+
-+                    np = symp->native + 1;
-+                    np->fix_tag = 1;
-+                    np->u.auxent.x_sym.x_tagndx.p = shash->native;
-+                    if (np->u.auxent.x_sym.x_misc.x_fsize == 0)
-+                      np->u.auxent.x_sym.x_misc.x_lnsz.x_size = size;
-+                  }
-+
-+                free (shash->fixidxs);
-+                shash->nfixidxs = 0;
-+              }
-+          }
-+        if (!oldavrcoff)
-+          {
-+            ((*csympp)->native + 1)->fix_tag = 1;
-+            aux->x_sym.x_tagndx.p = shash->native;
-+            if (aux->x_sym.x_misc.x_fsize == 0)
-+              aux->x_sym.x_misc.x_lnsz.x_size = size;
-+          }
-+        break;
-+      }
-+      free (tst);
-+    }
-+
-+  if (nderived > 6)
-+    fprintf (stderr,
-+           _("More than 6 derived type specifiers, result is invalid.\n"));
-+
-+  /* Our type computation so far used the reverse order for derived
-+     type specifiers.  Fix this here if there was more than one
-+     derived type specifier. */
-+  if (nderived > 1)
-+    {
-+      unsigned int nty, bty;
-+      bty = type & N_BTMASK;
-+      type = type >> N_BTSHFT;
-+      nty = 0;
-+      while (nderived-- > 0)
-+      {
-+        nty = (nty << N_TSHIFT) | (type & (N_TMASK >> N_BTSHFT));
-+        type >>= N_TSHIFT;
-+      }
-+      type = (nty << N_BTSHFT) | bty;
-+    }
-+
-+  if (ISARY (type))
-+    {
-+      /* Compute size of entire array. */
-+      for (i = 0, nele = 1; i < arydim; i++)
-+      nele *= aux->x_sym.x_fcnary.x_ary.x_dimen[i];
-+      aux->x_sym.x_misc.x_lnsz.x_size = size * nele;
-+    }
-+
-+  numaux = 0;
-+  if (ISARY (type) || ISFCN (type))
-+    numaux++;
-+  if ((BTYPE (type) == T_STRUCT || BTYPE (type) == T_UNION
-+       || BTYPE (type) == T_ENUM)
-+      && !oldavrcoff)
-+    numaux++;
-+  /* Only AVR COFF uses multiple AUX entries. */
-+  if (numaux > 1 && (info->flags & COFF_FL_AVR) == 0)
-+    numaux = 1;
-+
-+  priv->size = size;
-+  (*csympp)->symbol.udata.p = priv;
-+  (*csympp)->native->u.syment.n_type = type;
-+  (*csympp)->native->u.syment.n_numaux = numaux;
-+
-+  /* If the fundamental type comes out as T_NULL, this means we don't
-+     have any type information.  Just don't emit any aux entries in
-+     that case, and drop any derived type information as well. */
-+  if (BTYPE (type) == T_NULL)
-+    {
-+      printf ("coff_make_typed_symbol() -> T_NULL\n");
-+      //(*csympp)->native->u.syment.n_type = T_NULL;
-+      (*csympp)->native->u.syment.n_numaux = 0;
-+    }
-+
-+  return TRUE;
-+}
-+
-+static bfd_boolean coff_emit_struct (info, tst, shash)
-+     struct coff_write_handle *info;
-+     struct coff_type_stack *tst;
-+     struct coff_struct_hash_entry *shash;
-+{
-+  coff_symbol_type *csymp, *scsymp, *ecsymp;
-+  union internal_auxent *aux;
-+  struct coff_fix_stack *fixp, *ofp;
-+  bfd_boolean isstruct = tst->u.ts_struct.isstruct;
-+  bfd_boolean isbitfield = FALSE;
-+  struct coff_type_stack *savedtst;
-+  struct coff_struct_fields *fp;
-+  unsigned short sclass;
-+  long i;
-+
-+  if ((info->flags & (COFF_FL_AVR | COFF_FL_EXT_AVR)) ==
-+      COFF_FL_AVR)
-+    /* old AVR COFF doesn't support struct debugging */
-+    return TRUE;
-+
-+  /* Synthesize a new internal COFF symbol for the struct/union. */
-+  scsymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+  if (scsymp == NULL)
-+    return FALSE;
-+
-+  if (tst->u.ts_struct.tagismalloced)
-+    scsymp->symbol.name = xstrdup (tst->u.ts_struct.tag.malloctag);
-+  else
-+    scsymp->symbol.name = tst->u.ts_struct.tag.fixtag;
-+  scsymp->symbol.flags = BSF_NOT_AT_END;
-+  scsymp->symbol.section = bfd_und_section_ptr;
-+  scsymp->native->u.syment.n_sclass = isstruct? C_STRTAG: C_UNTAG;
-+  scsymp->native->u.syment.n_type = isstruct? T_STRUCT: T_UNION;
-+  scsymp->native->u.syment.n_numaux = 1;
-+  scsymp->symbol.udata.p = NULL;
-+  scsymp->symbol.value = 0;
-+
-+  shash->native = scsymp->native;
-+
-+  /* Synthesize a new internal COFF symbol for the end of struct/union. */
-+  ecsymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+  if (ecsymp == NULL)
-+    return FALSE;
-+
-+  ecsymp->symbol.name = ".eos";
-+  ecsymp->symbol.flags = BSF_NOT_AT_END;
-+  /* We need to use the com section here since bfd/coffgen.c
-+     translates this into an N_UNDEF one without clobbering the
-+     value. */
-+  ecsymp->symbol.section = bfd_com_section_ptr;
-+  ecsymp->native->u.syment.n_sclass = C_EOS;
-+  ecsymp->symbol.udata.p = NULL;
-+  ecsymp->symbol.value = tst->u.ts_struct.size;
-+  ecsymp->native->u.syment.n_numaux = 1;
-+  (ecsymp->native + 1)->fix_tag = 1;
-+  aux = &((ecsymp->native + 1)->u.auxent);
-+  aux->x_sym.x_tagndx.p = scsymp->native;
-+  aux->x_sym.x_misc.x_lnsz.x_size = tst->u.ts_struct.size;
-+
-+  coff_record_symbol (info, scsymp);
-+
-+  savedtst = info->tstack;
-+
-+  if (isstruct)
-+    {
-+      /* First, make a quick walk along all the fields, and figure out
-+       * whether we've got a genuine struct or a bitfield struct. */
-+      for (i = 0, fp = tst->u.ts_struct.fields;
-+         i < tst->u.ts_struct.nfields;
-+         i++, fp++)
-+      if (fp->bitsize % 8 != 0)
-+        {
-+          isbitfield = TRUE;
-+          break;
-+        }
-+    }
-+
-+  sclass = isstruct? (isbitfield? C_FIELD: C_MOS): C_MOU;
-+
-+  for (i = 0, fp = tst->u.ts_struct.fields;
-+       i < tst->u.ts_struct.nfields;
-+       i++, fp++)
-+    {
-+      if (strlen (fp->name) == 0)
-+      {
-+        /* empty name could happen inside bitfield */
-+        fp->types = NULL;
-+        continue;
-+      }
-+
-+      info->tstack = fp->types;
-+      if (!coff_make_typed_symbol (info, &csymp, TS_NONE))
-+      return FALSE;
-+
-+      csymp->symbol.name = xstrdup (fp->name);
-+      csymp->symbol.flags = BSF_NOT_AT_END;
-+      csymp->symbol.section = bfd_com_section_ptr;
-+      csymp->native->u.syment.n_sclass = sclass;
-+      csymp->symbol.value = isbitfield? fp->bitpos: fp->bitpos / 8;
-+      if (isbitfield)
-+      {
-+        csymp->native->u.syment.n_numaux = 1;
-+        aux = &((csymp->native + 1)->u.auxent);
-+        aux->x_sym.x_misc.x_lnsz.x_size = fp->bitsize;
-+      }
-+
-+      coff_record_symbol (info, csymp);
-+
-+      fp->types = NULL;
-+    }
-+
-+  info->tstack = savedtst;
-+
-+  /* Record our endndx field for later fixing. */
-+  fixp = (struct coff_fix_stack *) xmalloc (sizeof (struct coff_fix_stack));
-+  fixp->native = scsymp->native + 1;  /* points to first AUX */
-+  fixp->next = NULL;
-+  if (info->fixes == NULL)
-+    info->fixes = fixp;
-+  else
-+    {
-+      for (ofp = info->fixes; ofp->next != NULL;)
-+      ofp = ofp->next;
-+      ofp->next = fixp;
-+    }
-+
-+  coff_record_symbol (info, ecsymp);
-+  info->flags |= COFF_FL_FIX_ENDNDX;
-+
-+  return TRUE;
-+}
-+
-+static bfd_boolean coff_emit_enum (info, tst, ehash)
-+     struct coff_write_handle *info;
-+     struct coff_type_stack *tst;
-+     struct coff_enum_hash_entry *ehash;
-+{
-+  coff_symbol_type *csymp, *scsymp, *ecsymp;
-+  union internal_auxent *aux;
-+  struct coff_fix_stack *fixp, *ofp;
-+  int i;
-+
-+  if ((info->flags & (COFF_FL_AVR | COFF_FL_EXT_AVR)) ==
-+      COFF_FL_AVR)
-+    /* old AVR COFF doesn't support enum debugging */
-+    return TRUE;
-+
-+  /* Synthesize a new internal COFF symbol for the enum. */
-+  scsymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+  if (scsymp == NULL)
-+    return FALSE;
-+
-+  if (tst->u.ts_enum.tagismalloced)
-+    scsymp->symbol.name = xstrdup (tst->u.ts_enum.tag.malloctag);
-+  else
-+    scsymp->symbol.name = tst->u.ts_enum.tag.fixtag;
-+  scsymp->symbol.flags = BSF_NOT_AT_END;
-+  scsymp->symbol.section = bfd_und_section_ptr;
-+  scsymp->native->u.syment.n_sclass = C_ENTAG;
-+  scsymp->native->u.syment.n_type = T_ENUM;
-+  scsymp->native->u.syment.n_numaux = 1;
-+  scsymp->symbol.udata.p = NULL;
-+  scsymp->symbol.value = 0;
-+
-+  ehash->native = scsymp->native;
-+
-+  /* Synthesize a new internal COFF symbol for the end of struct/union. */
-+  ecsymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+  if (ecsymp == NULL)
-+    return FALSE;
-+
-+  ecsymp->symbol.name = ".eos";
-+  ecsymp->symbol.flags = BSF_NOT_AT_END;
-+  /* We need to use the com section here since bfd/coffgen.c
-+     translates this into an N_UNDEF one without clobbering the
-+     value. */
-+  ecsymp->symbol.section = bfd_com_section_ptr;
-+  ecsymp->native->u.syment.n_sclass = C_EOS;
-+  ecsymp->symbol.udata.p = NULL;
-+  ecsymp->symbol.value = info->enumsize;
-+  ecsymp->native->u.syment.n_numaux = 1;
-+  (ecsymp->native + 1)->fix_tag = 1;
-+  aux = &((ecsymp->native + 1)->u.auxent);
-+  aux->x_sym.x_tagndx.p = scsymp->native;
-+  aux->x_sym.x_misc.x_lnsz.x_size = info->enumsize;
-+
-+  coff_record_symbol (info, scsymp);
-+
-+  for (i = 0;; i++)
-+    {
-+      const char *name = tst->u.ts_enum.names[i];
-+      if (name == NULL)
-+      break;
-+
-+      /* Synthesize a new internal COFF symbol for the enum. */
-+      csymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+      if (csymp == NULL)
-+      return FALSE;
-+
-+      csymp->symbol.name = xstrdup (name);
-+      csymp->symbol.flags = BSF_NOT_AT_END;
-+      csymp->symbol.section = bfd_com_section_ptr;
-+      csymp->native->u.syment.n_sclass = C_MOE;
-+      csymp->symbol.udata.p = NULL;
-+      csymp->symbol.value = tst->u.ts_enum.vals[i];
-+
-+      coff_record_symbol (info, csymp);
-+    }
-+
-+  /* Record our endndx field for later fixing. */
-+  fixp = (struct coff_fix_stack *) xmalloc (sizeof (struct coff_fix_stack));
-+  fixp->native = scsymp->native + 1;  /* points to first AUX */
-+  fixp->next = NULL;
-+  if (info->fixes == NULL)
-+    info->fixes = fixp;
-+  else
-+    {
-+      for (ofp = info->fixes; ofp->next != NULL;)
-+      ofp = ofp->next;
-+      ofp->next = fixp;
-+    }
-+
-+  coff_record_symbol (info, ecsymp);
-+  info->flags |= COFF_FL_FIX_ENDNDX;
-+
-+  return TRUE;
-+}
-+
-+/* Emit a non-debugging symbol that came from the input symbol table,
-+   and has not been claimed by one of the debugging symbols. */
-+static bfd_boolean
-+coff_emit_ndebug_sym (info, osymp, localp)
-+     struct coff_write_handle *info;
-+     asymbol *osymp;
-+     bfd_boolean localp;
-+{
-+  coff_symbol_type *csymp;
-+
-+  /* Create new COFF symbol. */
-+  csymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+  if (csymp == NULL)
-+    return FALSE;
-+
-+  csymp->symbol.name = xstrdup (osymp->name);
-+  csymp->symbol.value = osymp->value;
-+  csymp->symbol.flags = localp? BSF_LOCAL: BSF_GLOBAL;
-+  csymp->symbol.section = osymp->section;
-+  csymp->symbol.udata.p = NULL;
-+  csymp->native->u.syment.n_sclass = localp? C_STAT: C_EXT;
-+  csymp->native->u.syment.n_type = T_NULL;
-+
-+  coff_record_symbol (info, csymp);
-+
-+  return TRUE;
-+}
-+\f
-+/* The general routine to write out COFF debugging information.  This
-+   synthesizes and accumulates the COFF symbols.  Actual symbol table
-+   output is performed later on by the BFD functions.  ABFD is the BFD
-+   and DHANDLE is the handle for the debugging information.  symcountp
-+   and symppp point to the incoming (parsed) symbol list on entry, and
-+   will be updated to point to the new symbol table's values upon
-+   exit. */
-+
-+bfd_boolean
-+write_coff_debugging_info (abfd, dhandle, symcountp, symppp)
-+     bfd *abfd;
-+     PTR dhandle;
-+     long *symcountp;
-+     asymbol ***symppp;
-+{
-+  struct coff_write_handle info;
-+  long i, l;
-+  asymbol *symp;
-+  struct coff_compilation_unit *up;
-+  coff_symbol_type *csymp;
-+
-+  memset ((void *)&info, 0, sizeof info);
-+
-+  info.abfd = abfd;
-+
-+  info.pointersize = info.enumsize = 4;
-+
-+  switch (bfd_get_arch (abfd))
-+    {
-+    case bfd_arch_avr:
-+      info.flags |= COFF_FL_AVR;
-+      if (strcmp (abfd->xvec->name, "coff-ext-avr") == 0)
-+      info.flags |= COFF_FL_EXT_AVR;
-+      /* Fix the builtin type sizes. */
-+      coff_predef_types[0].size = 2;  /* sizeof(int) == 2 */
-+      coff_predef_types[4].size = 4;  /* sizeof(double) == 4 */
-+      coff_predef_types[6].size = 2;  /* sizeof(unsigned int) == 2 */
-+      info.pointersize = info.enumsize = 2;
-+      break;
-+
-+    default:
-+      ;
-+    }
-+
-+  coff_copy_symbols(&info, *symcountp, *symppp);
-+
-+  if (info.textsect == NULL)
-+    {
-+      fprintf (stderr, _("Warning: no \"text\" section found in output file\n"));
-+      info.textsect = bfd_abs_section_ptr;
-+    }
-+  if (info.datasect == NULL)
-+    {
-+      fprintf (stderr, _("Warning: no \"data\" section found in output file\n"));
-+      info.datasect = bfd_abs_section_ptr;
-+    }
-+
-+  if (! bfd_hash_table_init (&info.types.root, coff_name_type_newfunc,
-+                           sizeof(struct coff_name_type_hash_entry)))
-+    return FALSE;
-+
-+  if (! bfd_hash_table_init (&info.structs.root, coff_struct_newfunc,
-+                           sizeof(struct coff_struct_hash_entry)))
-+    return FALSE;
-+
-+  if (! bfd_hash_table_init (&info.enums.root, coff_enum_newfunc,
-+                           sizeof(struct coff_enum_hash_entry)))
-+    return FALSE;
-+
-+  if (! debug_write (dhandle, &coff_fns, (PTR) &info))
-+    return FALSE;
-+
-+  /* If there is an old compilation unit that has got any local
-+     non-debugging symbols left over, send them out now. */
-+  if (info.currentfile != NULL && info.currentfile->totsyms != 0)
-+    for (i = 0; i < info.currentfile->nsyms; i++)
-+      {
-+      up = info.currentfile;
-+
-+      if (up->syms[i] != NULL)
-+        {
-+          coff_emit_ndebug_sym (&info, up->syms[i], TRUE);
-+          up->syms[i] = NULL;
-+          up->totsyms--;
-+        }
-+      }
-+
-+  /* See whether there are any non-debugging symbols left from the
-+     input symbol table.  First look at all local symbols which must
-+     be from entire compilation units we didn't see yet in the
-+     debugging information, because anything else has already been
-+     handled at the end of each compilation unit (like in the loop
-+     immediately above).  Any compilation unit that has already been
-+     processed that way is supposed to have its "totsyms" counted down
-+     to 0 now, so we can skip them.
-+
-+     Finally, put out all remaining global non-debugging symbols. */
-+  for (l = 0; l < info.nunits; l++)
-+    {
-+      const char *bn;
-+
-+      up = info.units + l;
-+      if (up->totsyms == 0)
-+      continue;
-+
-+      /* Create COFF symbol for this compilation unit. */
-+      csymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info.abfd, 0, 0);
-+      if (csymp == NULL)
-+      return FALSE;
-+
-+      bn = bu_basename (up->fname);
-+
-+      if (bfd_coff_long_filenames (info.abfd))
-+      csymp->symbol.name = up->fname;
-+      else
-+      csymp->symbol.name = bn;
-+
-+      csymp->symbol.value = 0;
-+      csymp->symbol.udata.p = NULL;
-+      csymp->native->u.syment.n_sclass = C_FILE;
-+      csymp->native->u.syment.n_numaux = 1; /* force filename into aux entry */
-+      coff_record_symbol (&info, csymp);
-+
-+      for (i = 0; i < up->nsyms; i++)
-+      {
-+        symp = up->syms[i];
-+        if (symp == NULL)
-+          continue;
-+
-+        coff_emit_ndebug_sym (&info, symp, TRUE);
-+      }
-+    }
-+
-+  for (i = 0; i < info.nglobals; i++)
-+    {
-+      symp = info.globals[i];
-+      if (symp == NULL)
-+      continue;
-+
-+      coff_emit_ndebug_sym (&info, symp, FALSE);
-+    }
-+
-+  /* Fixup the AUX entries for the section symbols we have emitted
-+     earlier (so they are guaranteed to be at the beginning of the
-+     symbol table).  In particular, the line number count (which we
-+     only have for the text section) is known right now. */
-+  for (i = 0; i < info.nsecsyms; i++)
-+    {
-+      union internal_auxent *aux;
-+
-+      csymp = info.secsyms[i];
-+
-+      aux = &((csymp->native + 1)->u.auxent);
-+      aux->x_scn.x_scnlen = csymp->symbol.section->output_section->rawsize;
-+      aux->x_scn.x_nreloc = csymp->symbol.section->reloc_count;
-+      if (csymp->symbol.section == info.textsect)
-+      aux->x_scn.x_nlinno = info.totlnos;
-+    }
-+  free (info.secsyms);
-+
-+  coff_name_type_hash_traverse (&info.types, coff_free_type_info, NULL);
-+  bfd_hash_table_free (&info.types.root);
-+
-+  coff_struct_hash_traverse (&info.structs, coff_free_struct_info, NULL);
-+  bfd_hash_table_free (&info.structs.root);
-+
-+  coff_enum_hash_traverse (&info.enums, coff_free_enum_info, NULL);
-+  bfd_hash_table_free (&info.enums.root);
-+
-+  /* FIXME: free all the other stuff remembered in "info". */
-+
-+  free (*symppp);
-+
-+  *symcountp = info.nsyms;
-+  *symppp = (asymbol **)info.syms;
-+
-+  return TRUE;
-+}
-+
-+/* Start writing out information for a compilation unit.  */
-+
-+static bfd_boolean
-+coff_start_compilation_unit (p, filename)
-+     PTR p;
-+     const char *filename;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  long i;
-+  const char *bn;
-+  bfd_boolean found;
-+  coff_symbol_type *csymp;
-+
-+#if COFF_DEBUG
-+  printf ("coff_start_compilation_unit(%s)\n", filename);
-+#endif
-+
-+  /* If there is an old compilation unit that has got any local
-+     non-debugging symbols left over, send them out now. */
-+  if (info->currentfile != NULL && info->currentfile->totsyms != 0)
-+    for (i = 0; i < info->currentfile->nsyms; i++)
-+      {
-+      struct coff_compilation_unit *up = info->currentfile;
-+
-+      if (up->syms[i] != NULL)
-+        {
-+          coff_emit_ndebug_sym (info, up->syms[i], TRUE);
-+          up->syms[i] = NULL;
-+          up->totsyms--;
-+        }
-+      }
-+
-+  /* symtab (and thus COFF debugging) symbols can only transfer the
-+     basename of the file, so strip the dirname */
-+  bn = bu_basename (filename);
-+
-+  for (i = 0, found = FALSE; i < info->nunits; i++)
-+    {
-+      if (strcmp (info->units[i].fname, bn) == 0)
-+      {
-+        info->currentfile = info->units + i;
-+        found = TRUE;
-+        break;
-+      }
-+    }
-+  if (!found)
-+    {
-+      fprintf(stderr,
-+            _("Warning: file %s not found in symbol table, ignoring\n"),
-+            filename);
-+      info->currentfile = NULL;
-+      return TRUE;
-+    }
-+
-+  /* Synthesize a new internal COFF symbol. */
-+  csymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+  if (csymp == NULL)
-+    return FALSE;
-+
-+  /* Note that coff_fix_symbol_name() [coffgen.c] will fix this for
-+     us: the symbol name will be replaced by ".file", and the filename
-+     will be moved to the aux entries.  We use the long name obtained
-+     from the debugging information (that includes the full path) if
-+     our COFF format supports long filenames, otherwise we only use
-+     the basename of the file. */
-+  if (bfd_coff_long_filenames (info->abfd))
-+    csymp->symbol.name = filename;
-+  else
-+    csymp->symbol.name = bn;
-+  csymp->symbol.value = 0;
-+  csymp->symbol.udata.p = NULL;
-+  csymp->native->u.syment.n_sclass = C_FILE;
-+  csymp->native->u.syment.n_numaux = 1;       /* force filename into aux entry */
-+  coff_record_symbol (info, csymp);
-+
-+  return TRUE;
-+}
-+
-+/* Start writing out information for a particular source file.  */
-+
-+static bfd_boolean
-+coff_start_source (p, filename)
-+     PTR p ATTRIBUTE_UNUSED;
-+     const char *filename ATTRIBUTE_UNUSED;
-+{
-+
-+#if COFF_DEBUG
-+  printf ("coff_start_source(%s)\n", filename);
-+#endif
-+
-+  /* COFF cannot handle include filenames. */
-+
-+  return TRUE;
-+}
-+
-+/* Push an empty type.  This shouldn't normally happen.  */
-+
-+static bfd_boolean
-+coff_empty_type (p)
-+     PTR p;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst;
-+
-+#if COFF_DEBUG
-+  printf ("coff_empty_type()\n");
-+#endif
-+
-+  coff_push_type (TS_EMPTY);
-+
-+  return TRUE;
-+}
-+
-+/* Push a void type.  */
-+
-+static bfd_boolean
-+coff_void_type (p)
-+     PTR p;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst;
-+
-+#if COFF_DEBUG
-+  printf ("coff_void_type()\n");
-+#endif
-+
-+  coff_push_type (TS_VOID);
-+
-+  return TRUE;
-+}
-+
-+/* Push an integer type.  */
-+
-+static bfd_boolean
-+coff_int_type (p, size, unsignedp)
-+     PTR p;
-+     unsigned int size;
-+     bfd_boolean unsignedp;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst;
-+
-+#if COFF_DEBUG
-+  printf ("coff_int_type(%d, %d)\n", size, unsignedp);
-+#endif
-+
-+  coff_push_type (TS_INT);
-+  tst->u.ts_int.size = size;
-+  tst->u.ts_int.isunsigned = unsignedp;
-+
-+  return TRUE;
-+}
-+
-+/* Push a floating point type.  */
-+
-+static bfd_boolean
-+coff_float_type (p, size)
-+     PTR p;
-+     unsigned int size;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst;
-+
-+#if COFF_DEBUG
-+  printf ("coff_float_type(%d)\n", size);
-+#endif
-+
-+  coff_push_type (TS_FLOAT);
-+  tst->u.ts_float.size = size;
-+
-+  return TRUE;
-+}
-+
-+/* Push a complex type.  */
-+
-+static bfd_boolean
-+coff_complex_type (p, size)
-+     PTR p;
-+     unsigned int size ATTRIBUTE_UNUSED;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst;
-+
-+#if COFF_DEBUG
-+  printf ("coff_complex_type(%d)\n", size);
-+#endif
-+
-+  coff_push_type (TS_COMPLEX);
-+
-+  return TRUE;
-+}
-+
-+/* Push a bfd_boolean type. */
-+
-+static bfd_boolean
-+coff_bool_type (p, size)
-+     PTR p;
-+     unsigned int size;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst;
-+
-+#if COFF_DEBUG
-+  printf ("coff_bool_type(%d)\n", size);
-+#endif
-+
-+  coff_push_type (TS_INT);
-+  tst->u.ts_int.size = size;
-+  tst->u.ts_int.isunsigned = TRUE;
-+
-+  return TRUE;
-+}
-+
-+/* Push an enum type.  */
-+
-+static bfd_boolean
-+coff_enum_type (p, tag, names, vals)
-+     PTR p;
-+     const char *tag;
-+     const char **names;
-+     bfd_signed_vma *vals;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst;
-+  char buf[20];
-+
-+#if COFF_DEBUG
-+  int idx;
-+  printf ("coff_enum_type(%s [", tag);
-+  for (idx = 0; names[idx] != NULL; idx++)
-+    printf ("%s -> %d, ", names[idx], (int)vals[idx]);
-+  printf ("])\n");
-+#endif
-+
-+  coff_push_type (TS_ENUM);
-+
-+  if (tag == NULL)
-+    {
-+      sprintf(buf, ".%dfake", info->nenums++);
-+      tst->u.ts_enum.tag.malloctag = xstrdup (buf);
-+      tst->u.ts_enum.tagismalloced = TRUE;
-+    }
-+  else
-+    tst->u.ts_enum.tag.fixtag = tag;
-+  tst->u.ts_enum.names = names;
-+  tst->u.ts_enum.vals = vals;
-+
-+  return TRUE;
-+}
-+
-+/* Push a pointer type.  */
-+
-+static bfd_boolean
-+coff_pointer_type (p)
-+     PTR p;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst;
-+
-+#if COFF_DEBUG
-+  printf ("coff_pointer_type()\n");
-+#endif
-+
-+  coff_push_type (TS_POINTER);
-+
-+  return TRUE;
-+}
-+
-+/* Push a function type.  */
-+
-+static bfd_boolean
-+coff_function_type (p, argcount, varargs)
-+     PTR p;
-+     int argcount;
-+     bfd_boolean varargs ATTRIBUTE_UNUSED;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst;
-+
-+#if COFF_DEBUG
-+  printf ("coff_function_type(%d, %d)\n", argcount, varargs);
-+#endif
-+
-+  coff_push_type (TS_FUNC);
-+
-+  /* FIXME should properly discard function arguments */
-+  if (argcount > -1)
-+    {
-+      fprintf (stderr,
-+             _("coff_function_type() called with positive argcount\n"));
-+      return FALSE;
-+    }
-+
-+  return TRUE;
-+}
-+
-+/* Push a reference type.  */
-+
-+static bfd_boolean
-+coff_reference_type (p)
-+     PTR p;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+
-+#if COFF_DEBUG
-+  printf ("coff_reference_type()\n");
-+#endif
-+
-+  coff_complain_unsupp (_("reference"));
-+
-+  return TRUE;
-+}
-+
-+/* Push a range type.  */
-+
-+static bfd_boolean
-+coff_range_type (p, low, high)
-+     PTR p;
-+     bfd_signed_vma low ATTRIBUTE_UNUSED;
-+     bfd_signed_vma high ATTRIBUTE_UNUSED;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+
-+#if COFF_DEBUG
-+  printf ("coff_range_type([%d..%d)\n", (int)low, (int)high);
-+#endif
-+
-+  coff_complain_unsupp (_("range"));
-+
-+  return TRUE;
-+}
-+
-+/* Push an array type.  */
-+
-+static bfd_boolean
-+coff_array_type (p, low, high, stringp)
-+     PTR p;
-+     bfd_signed_vma low;
-+     bfd_signed_vma high;
-+     bfd_boolean stringp;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst;
-+
-+#if COFF_DEBUG
-+  printf ("coff_array_type([%d..%d], %d)\n",
-+        (int)low, (int)high, stringp);
-+#endif
-+
-+  /* Pop the range type, but ignore it.  COFF doesn't use it. */
-+  coff_pop_type ();
-+
-+  /* FIXME  What to do here? */
-+  if (stringp)
-+    {
-+      fprintf(stderr, _("coff_array_type(): stringp == TRUE\n"));
-+      return FALSE;
-+    }
-+
-+  coff_push_type (TS_ARRAY);
-+  tst->u.ts_array.low = low;
-+  tst->u.ts_array.high = high;
-+
-+  return TRUE;
-+}
-+
-+/* Push a set type.  */
-+
-+static bfd_boolean
-+coff_set_type (p, bitstringp)
-+     PTR p;
-+     bfd_boolean bitstringp ATTRIBUTE_UNUSED;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+
-+#if COFF_DEBUG
-+  printf ("coff_set_type(%d)\n", bitstringp);
-+#endif
-+
-+  coff_complain_unsupp (_("set"));
-+
-+  return TRUE;
-+}
-+
-+/* Push an offset type.  */
-+
-+static bfd_boolean
-+coff_offset_type (p)
-+     PTR p;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+
-+#if COFF_DEBUG
-+  printf ("coff_offset_type()\n");
-+#endif
-+
-+  coff_complain_unsupp (_("offset"));
-+
-+  return TRUE;
-+}
-+
-+/* Push a method type.  */
-+
-+static bfd_boolean
-+coff_method_type (p, domainp, argcount, varargs)
-+     PTR p;
-+     bfd_boolean domainp ATTRIBUTE_UNUSED;
-+     int argcount ATTRIBUTE_UNUSED;
-+     bfd_boolean varargs ATTRIBUTE_UNUSED;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+
-+#if COFF_DEBUG
-+  printf ("coff_method_type(%d, %d, %d)\n",
-+        domainp, argcount, varargs);
-+#endif
-+
-+  coff_complain_unsupp (_("method"));
-+
-+  return TRUE;
-+}
-+
-+/* Push a const version of a type.  */
-+
-+static bfd_boolean
-+coff_const_type (p)
-+     PTR p ATTRIBUTE_UNUSED;
-+{
-+
-+#if COFF_DEBUG
-+  printf ("coff_const_type()\n");
-+#endif
-+
-+  /* const modifier is ignored by COFF */
-+
-+  return TRUE;
-+}
-+
-+/* Push a volatile version of a type.  */
-+
-+static bfd_boolean
-+coff_volatile_type (p)
-+     PTR p ATTRIBUTE_UNUSED;
-+{
-+
-+#if COFF_DEBUG
-+  printf ("coff_volatile_type()\n");
-+#endif
-+
-+  /* volatile modifier is ignored by COFF */
-+
-+  return TRUE;
-+}
-+
-+/* Start outputting a struct.  */
-+
-+static bfd_boolean
-+coff_start_struct_type (p, tag, id, structp, size)
-+     PTR p;
-+     const char *tag;
-+     unsigned int id;
-+     bfd_boolean structp;
-+     unsigned int size;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst, *savedts;
-+  struct coff_struct_hash_entry *shash;
-+  char buf[20];
-+  const char *name;
-+
-+#if COFF_DEBUG
-+  printf ("coff_start_struct_type(%s, %d, %d, %d)\n",
-+        tag, id, structp, size);
-+#endif
-+
-+  savedts = info->tstack;
-+  info->tstack = NULL;
-+
-+  coff_push_type (TS_STRUCT);
-+
-+  if (tag == NULL)
-+    {
-+      sprintf(buf, ".%dfake", id);
-+      name = tst->u.ts_struct.tag.malloctag = xstrdup (buf);
-+      tst->u.ts_struct.tagismalloced = TRUE;
-+    }
-+  else
-+    name = tst->u.ts_struct.tag.fixtag = tag;
-+  tst->u.ts_struct.id = id;
-+  tst->u.ts_struct.isstruct = structp;
-+  tst->u.ts_struct.size = size;
-+  tst->u.ts_struct.savedts = savedts;
-+
-+  shash = coff_struct_hash_lookup (&info->structs, name, FALSE, FALSE);
-+  if (shash != NULL && shash->types != NULL)
-+    {
-+#if COFF_DEBUG
-+      printf ("new %s definition for %s\n",
-+            tst->u.ts_struct.isstruct? "struct": "union", name);
-+#endif
-+      coff_free_struct_info (shash, NULL);
-+      shash->types = NULL;
-+      shash->emitted = FALSE;
-+    }
-+  else
-+    (void)coff_struct_hash_lookup (&info->structs, name,
-+                           TRUE, tst->u.ts_struct.tagismalloced);
-+
-+  return TRUE;
-+}
-+
-+/* Add a field to a struct.  */
-+
-+static bfd_boolean
-+coff_struct_field (p, name, bitpos, bitsize, visibility)
-+     PTR p;
-+     const char *name;
-+     bfd_vma bitpos;
-+     bfd_vma bitsize;
-+     enum debug_visibility visibility;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst, *otst;
-+  struct coff_struct_fields *fp;
-+  struct coff_struct_hash_entry *shash;
-+  struct coff_enum_hash_entry *ehash;
-+  const char *tag;
-+
-+#if COFF_DEBUG
-+  printf ("coff_struct_field(%s, %d, %d, %d)\n",
-+        name, (int)bitpos, (int)bitsize, (int)visibility);
-+#endif
-+
-+  /* Find the last element on the type stack. */
-+  assert (info->tstack != NULL);
-+  for (tst = info->tstack, otst = NULL; tst->next != NULL;)
-+    {
-+      otst = tst;
-+      tst = tst->next;
-+    }
-+  if (otst != NULL)
-+    otst->next = NULL;
-+
-+  if (tst->tsk != TS_STRUCT)
-+    {
-+      fprintf (stderr, "coff_struct_field() not within structure definition\n");
-+      return FALSE;
-+    }
-+  tst->u.ts_struct.fields = (struct coff_struct_fields *)
-+    xrealloc (tst->u.ts_struct.fields,
-+            ++tst->u.ts_struct.nfields * sizeof (struct coff_struct_fields));
-+  fp = tst->u.ts_struct.fields + (tst->u.ts_struct.nfields - 1);
-+  fp->name = name;
-+  fp->bitpos = bitpos;
-+  fp->bitsize = bitsize;
-+  fp->visibility = visibility;
-+  otst = fp->types = info->tstack;
-+  while (otst->next != NULL)
-+    otst = otst->next;
-+  if (otst->tsk == TS_STRUCT && otst->u.ts_struct.shash == NULL)
-+    {
-+      if (otst->u.ts_struct.tagismalloced)
-+      tag = otst->u.ts_struct.tag.malloctag;
-+      else
-+      tag = otst->u.ts_struct.tag.fixtag;
-+      shash = coff_struct_hash_lookup (&info->structs, tag, FALSE, FALSE);
-+      assert (shash != NULL);
-+      if (!shash->emitted)
-+      {
-+        if (shash->types == NULL)
-+          {
-+            shash->types = (struct coff_type_stack *)
-+              xmalloc (sizeof (struct coff_type_stack));
-+            memcpy (shash->types, otst, sizeof (struct coff_type_stack));
-+          }
-+        shash->emitted = TRUE;
-+        coff_emit_struct (info, otst, shash);
-+      }
-+    }
-+  else if (otst->tsk == TS_ENUM)
-+    {
-+      if (otst->u.ts_enum.tagismalloced)
-+      tag = otst->u.ts_enum.tag.malloctag;
-+      else
-+      tag = otst->u.ts_enum.tag.fixtag;
-+      ehash = coff_enum_hash_lookup (&info->enums, tag, TRUE, FALSE);
-+      assert (ehash != NULL);
-+      if (!ehash->emitted)
-+      {
-+        if (ehash->types == NULL)
-+          {
-+            ehash->types = (struct coff_type_stack *)
-+              xmalloc (sizeof (struct coff_type_stack));
-+            memcpy (ehash->types, otst, sizeof (struct coff_type_stack));
-+          }
-+        ehash->emitted = TRUE;
-+        coff_emit_enum (info, otst, ehash);
-+      }
-+    }
-+
-+  info->tstack = tst;
-+
-+  return TRUE;
-+}
-+
-+/* Finish up a struct.  */
-+
-+static bfd_boolean
-+coff_end_struct_type (p)
-+     PTR p;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst, *savedts;
-+
-+#if COFF_DEBUG
-+  printf ("coff_end_struct_type()\n");
-+#endif
-+
-+  /* Our struct definition should be the only type stack element by
-+     now. */
-+  assert (info->tstack != NULL);
-+  tst = info->tstack;
-+  if (tst->tsk != TS_STRUCT || tst->next != NULL)
-+    {
-+      fprintf (stderr, "coff_struct_field() not within structure definition\n");
-+      return FALSE;
-+    }
-+
-+  /* Restore saved type stack, and push our now complete struct
-+     definition on top. */
-+  savedts = tst->u.ts_struct.savedts;
-+  tst->u.ts_struct.savedts = info->tstack;
-+  info->tstack = savedts;
-+  tst->next = info->tstack;
-+  info->tstack = tst;
-+
-+  return TRUE;
-+}
-+
-+/* Start outputting a class.  */
-+
-+static bfd_boolean
-+coff_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
-+     PTR p;
-+     const char *tag ATTRIBUTE_UNUSED;
-+     unsigned int id ATTRIBUTE_UNUSED;
-+     bfd_boolean structp ATTRIBUTE_UNUSED;
-+     unsigned int size ATTRIBUTE_UNUSED;
-+     bfd_boolean vptr ATTRIBUTE_UNUSED;
-+     bfd_boolean ownvptr ATTRIBUTE_UNUSED;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+
-+#if COFF_DEBUG
-+  printf ("coff_start_class_type(%s, %d, %d, %d, %d, %d)\n",
-+        tag, id, structp, size, vptr, ownvptr);
-+#endif
-+
-+  coff_complain_unsupp (_("class"));
-+
-+  return TRUE;
-+}
-+
-+/* Add a static member to the class on the type stack.  */
-+
-+static bfd_boolean
-+coff_class_static_member (p, name, physname, visibility)
-+     PTR p ATTRIBUTE_UNUSED;
-+     const char *name ATTRIBUTE_UNUSED;
-+     const char *physname ATTRIBUTE_UNUSED;
-+     enum debug_visibility visibility ATTRIBUTE_UNUSED;
-+{
-+
-+#if COFF_DEBUG
-+  printf ("coff_class_static_member(%s, %s, %d)\n",
-+        name, physname, (int)visibility);
-+#endif
-+
-+  return TRUE;
-+}
-+
-+/* Add a base class to the class on the type stack.  */
-+
-+static bfd_boolean
-+coff_class_baseclass (p, bitpos, virtual, visibility)
-+     PTR p ATTRIBUTE_UNUSED;
-+     bfd_vma bitpos ATTRIBUTE_UNUSED;
-+     bfd_boolean virtual ATTRIBUTE_UNUSED;
-+     enum debug_visibility visibility ATTRIBUTE_UNUSED;
-+{
-+
-+#if COFF_DEBUG
-+  printf ("coff_class_baseclass(%d, %d, %d)\n",
-+        (int)bitpos, virtual, (int)visibility);
-+#endif
-+
-+  return TRUE;
-+}
-+
-+/* Start adding a method to the class on the type stack.  */
-+
-+static bfd_boolean
-+coff_class_start_method (p, name)
-+     PTR p ATTRIBUTE_UNUSED;
-+     const char *name ATTRIBUTE_UNUSED;
-+{
-+
-+#if COFF_DEBUG
-+  printf ("coff_class_start_method(%s)\n", name);
-+#endif
-+
-+  return TRUE;
-+}
-+
-+/* Add a variant to the current method.  */
-+
-+static bfd_boolean
-+coff_class_method_variant (p, physname, visibility, constp, volatilep,
-+                         voffset, contextp)
-+     PTR p ATTRIBUTE_UNUSED;
-+     const char *physname ATTRIBUTE_UNUSED;
-+     enum debug_visibility visibility ATTRIBUTE_UNUSED;
-+     bfd_boolean constp ATTRIBUTE_UNUSED;
-+     bfd_boolean volatilep ATTRIBUTE_UNUSED;
-+     bfd_vma voffset ATTRIBUTE_UNUSED;
-+     bfd_boolean contextp ATTRIBUTE_UNUSED;
-+{
-+
-+#if COFF_DEBUG
-+  printf ("coff_class_method_variant(%s, %d, %d, %d, %d, %d)\n",
-+        physname, (int)visibility, constp, volatilep,
-+        (int)voffset, contextp);
-+#endif
-+
-+  return TRUE;
-+}
-+
-+/* Add a static variant to the current method.  */
-+
-+static bfd_boolean
-+coff_class_static_method_variant (p, physname, visibility, constp, volatilep)
-+     PTR p ATTRIBUTE_UNUSED;
-+     const char *physname ATTRIBUTE_UNUSED;
-+     enum debug_visibility visibility ATTRIBUTE_UNUSED;
-+     bfd_boolean constp ATTRIBUTE_UNUSED;
-+     bfd_boolean volatilep ATTRIBUTE_UNUSED;
-+{
-+
-+#if COFF_DEBUG
-+  printf ("coff_class_static_method_variant(%s, %d, %d, %d)\n",
-+        physname, (int)visibility, constp, volatilep);
-+#endif
-+
-+  return TRUE;
-+}
-+
-+/* Finish up a method.  */
-+
-+static bfd_boolean
-+coff_class_end_method (p)
-+     PTR p ATTRIBUTE_UNUSED;
-+{
-+
-+#if COFF_DEBUG
-+  printf ("coff_class_end_method()\n");
-+#endif
-+
-+  return TRUE;
-+}
-+
-+/* Finish up a class.  */
-+
-+static bfd_boolean
-+coff_end_class_type (p)
-+     PTR p ATTRIBUTE_UNUSED;
-+{
-+
-+#if COFF_DEBUG
-+  printf ("coff_end_class_type()\n");
-+#endif
-+
-+  return TRUE;
-+}
-+
-+/* Push a typedef which was previously defined.  */
-+
-+static bfd_boolean
-+coff_typedef_type (p, name)
-+     PTR p;
-+     const char *name;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_name_type_hash_entry *nthash;
-+  struct coff_type_stack *tst, *newchain, *newst, *temp;
-+
-+#if COFF_DEBUG
-+  printf ("coff_typedef_type(%s)\n", name);
-+#endif
-+
-+  nthash = coff_name_type_hash_lookup (&info->types, name, FALSE, FALSE);
-+
-+  /* nthash should never be NULL, since that would imply that the
-+     generic debugging code has asked for a typedef which it has not
-+     yet defined.  */
-+  assert (nthash != NULL);
-+
-+  /* Just push the entire type stack snapshot we've got on top of the
-+     existing typestack.  See coff_typdef() below for how this
-+     works.  We need to copy over each element however, since anybody
-+     popping elements off the typestack is supposed to free() each of
-+     them. */
-+
-+  for (tst = nthash->types, temp = newst = newchain = NULL; tst != NULL;)
-+    {
-+      temp = newst;
-+      newst = (struct coff_type_stack *) xmalloc (sizeof (*newst));
-+      if (newchain == NULL)
-+      newchain = newst;
-+      memcpy (newst, tst, sizeof (*newst));
-+      if (temp != NULL)
-+      temp->next = newst;
-+
-+      tst = tst->next;
-+    }
-+  newst->next = info->tstack;
-+  info->tstack = newchain;
-+
-+  return TRUE;
-+}
-+
-+/* Push a struct, union or class tag.  */
-+
-+static bfd_boolean
-+coff_tag_type (p, name, id, kind)
-+     PTR p;
-+     const char *name;
-+     unsigned int id ATTRIBUTE_UNUSED;
-+     enum debug_type_kind kind;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst, *newchain, *newst, *temp;
-+  struct coff_struct_hash_entry *shash;
-+  struct coff_enum_hash_entry *ehash;
-+  char buf[20];
-+  bfd_boolean needcopy = FALSE;
-+  bfd_boolean isstruct = TRUE;
-+
-+#if COFF_DEBUG
-+  printf ("coff_tag_type(%s, %d, %d)\n",
-+        name, id, kind);
-+#endif
-+
-+  if (name == NULL)
-+    {
-+      sprintf(buf, ".%dfake", id);
-+      needcopy = TRUE;
-+    }
-+
-+  switch (kind)
-+    {
-+    case DEBUG_KIND_UNION:
-+    case DEBUG_KIND_UNION_CLASS:
-+      isstruct = FALSE;
-+      /* FALLTHROUGH */
-+    case DEBUG_KIND_STRUCT:
-+    case DEBUG_KIND_CLASS:
-+      shash = coff_struct_hash_lookup (&info->structs,
-+                                     name == NULL? buf: name, TRUE, needcopy);
-+      assert (shash != NULL);
-+      tst = shash->types;
-+      if (tst == NULL)
-+      {
-+        /* This is a reference to a tag that has not yet been
-+           defined (i. e., a forward reference).  Synthesize a
-+           ts_struct entry by now, and mark it for later fixup. */
-+        tst = (struct coff_type_stack *) xmalloc (sizeof *tst);
-+        memset (tst, 0, sizeof *tst);
-+        tst->tsk = TS_STRUCT;
-+        tst->u.ts_struct.isstruct = isstruct;
-+        tst->u.ts_struct.shash = shash;
-+      }
-+    docopystack:
-+      /* Just push the entire type stack snapshot we've got on top of the
-+       existing typestack.  See coff_typdef() below for how this
-+       works.  We need to copy over each element however, since anybody
-+       popping elements off the typestack is supposed to free() each of
-+       them. */
-+      for (temp = newst = newchain = NULL; tst != NULL;)
-+      {
-+        temp = newst;
-+        newst = (struct coff_type_stack *) xmalloc (sizeof (*newst));
-+        if (newchain == NULL)
-+          newchain = newst;
-+        memcpy (newst, tst, sizeof (*newst));
-+        if (temp != NULL)
-+          temp->next = newst;
-+
-+        tst = tst->next;
-+      }
-+      if (newst)
-+      {
-+        newst->next = info->tstack;
-+        info->tstack = newchain;
-+      }
-+      break;
-+
-+    case DEBUG_KIND_ENUM:
-+      ehash = coff_enum_hash_lookup (&info->enums,
-+                                   name == NULL? buf: name, TRUE, needcopy);
-+      assert (ehash != NULL);
-+      tst = ehash->types;
-+      if (tst == NULL)
-+      {
-+        /* This is a reference to a tag that has not yet been
-+           defined (i. e., a forward reference).  Synthesize a
-+           ts_enum entry by now, and mark it for later fixup. */
-+        tst = (struct coff_type_stack *) xmalloc (sizeof *tst);
-+        memset (tst, 0, sizeof *tst);
-+        tst->tsk = TS_ENUM;
-+        tst->u.ts_enum.ehash = ehash;
-+      }
-+      goto docopystack;
-+
-+    default:
-+      fprintf (stderr, _("illegal kind %d in coff_tag_type()\n"),
-+             (int)kind);
-+      return FALSE;
-+    }
-+  return TRUE;
-+}
-+
-+/* Define a typedef.  */
-+
-+static bfd_boolean
-+coff_typdef (p, name)
-+     PTR p;
-+     const char *name;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_name_type_hash_entry *nthash;
-+
-+#if COFF_DEBUG
-+  printf ("coff_typdef(%s)\n", name);
-+#endif
-+
-+  /* COFF cannot really handle typedefs.  While there is the option to
-+     mark a symbol using the storage class C_TPDEF (so the COFF reader
-+     will know that name), there is no way to place a reference to
-+     that typedef into the just 16 bits COFF reserves for all of its
-+     type information.  Thus, any use of the typedef must always fully
-+     dereference the typedef again.  We do this by "snapshotting" the
-+     current type stack under the name of our typedef, and later on,
-+     when BFD debugging tells us to make use of the typedef (in
-+     coff_typedef_type()), we just look it up, and push all we've got
-+     completely onto the type stack again. */
-+
-+  if (info->tstack == NULL)
-+    {
-+      fprintf (stderr, _("coff_typdef() on an empty type stack\n"));
-+      return FALSE;
-+    }
-+
-+  nthash = coff_name_type_hash_lookup (&info->types, name, FALSE, FALSE);
-+  if (nthash != NULL)
-+    {
-+#if COFF_DEBUG
-+      printf ("new typedef for %s\n", name);
-+#endif
-+      coff_free_type_info (nthash, NULL);
-+    }
-+  else
-+    nthash = coff_name_type_hash_lookup (&info->types, name, TRUE, FALSE);
-+  if (nthash == NULL)
-+    return FALSE;
-+  nthash->types = info->tstack;
-+
-+  /* If the typestack is "sufficiently complex", emit a C_TPDEF symbol
-+     for it.  We assume it to be sufficiently complex if there are
-+     either at least two derived types, or one derived type where the
-+     base type is not a simple scalar one. */
-+  if (!nthash->emitted
-+      && info->tstack->next != NULL
-+      && (info->tstack->next->next != NULL || info->tstack->next->tsk >= TS_ENUM))
-+    {
-+      struct coff_type_stack *newchain, *otst, *tst, *ntst;
-+      coff_symbol_type *csymp;
-+
-+      nthash->emitted = TRUE;
-+
-+      for (tst = info->tstack, newchain = otst = NULL;
-+         tst != NULL;
-+         tst = tst->next)
-+      {
-+        ntst = (struct coff_type_stack *)
-+          xmalloc (sizeof (struct coff_type_stack));
-+        memcpy (ntst, tst, sizeof (struct coff_type_stack));
-+        if (otst == NULL)
-+          newchain = ntst;
-+        else
-+          otst->next = ntst;
-+        otst = ntst;
-+      }
-+      info->tstack = newchain;
-+      if (!coff_make_typed_symbol (info, &csymp, TS_NONE))
-+      return FALSE;
-+
-+      csymp->symbol.name = xstrdup (name);
-+      csymp->symbol.flags = BSF_NOT_AT_END;
-+      csymp->symbol.section = bfd_com_section_ptr;
-+      csymp->native->u.syment.n_sclass = C_TPDEF;
-+      csymp->symbol.value = 0;
-+
-+      coff_record_symbol (info, csymp);
-+    }
-+  info->tstack = NULL;
-+
-+  return TRUE;
-+}
-+
-+/* Define a tag.  */
-+
-+static bfd_boolean
-+coff_tag (p, tag)
-+     PTR p;
-+     const char *tag;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst = NULL;
-+  struct coff_struct_hash_entry *shash;
-+  struct coff_enum_hash_entry *ehash;
-+
-+
-+#if COFF_DEBUG
-+  printf ("coff_tag(%s)\n", tag);
-+#endif
-+
-+  if (info->tstack == NULL)
-+    {
-+      fprintf (stderr, _("coff_tag() called on an empty typestack\n"));
-+      return FALSE;
-+    }
-+
-+  switch (info->tstack->tsk)
-+    {
-+    case TS_STRUCT:
-+      shash = coff_struct_hash_lookup (&info->structs, tag, FALSE, FALSE);
-+      assert (shash != NULL);
-+      shash->types = info->tstack;
-+      info->tstack = NULL;
-+      break;
-+
-+    case TS_ENUM:
-+      ehash = coff_enum_hash_lookup (&info->enums, tag, FALSE, FALSE);
-+      if (ehash != NULL && ehash->types != NULL)
-+      {
-+#if COFF_DEBUG
-+        printf ("new enum definition for %s\n", tag);
-+#endif
-+        coff_free_enum_info (ehash, NULL);
-+      }
-+      else
-+      ehash = coff_enum_hash_lookup (&info->enums, tag, TRUE, FALSE);
-+      if (ehash == NULL)
-+      return FALSE;
-+      ehash->types = info->tstack;
-+      info->tstack = NULL;
-+      break;
-+
-+    default:
-+      fprintf (stderr, _("Illegal typestack (%d) in coff_tag()\n"), tst->tsk);
-+      return FALSE;
-+    }
-+
-+  return TRUE;
-+}
-+
-+/* Define an integer constant.  */
-+
-+static bfd_boolean
-+coff_int_constant (p, name, val)
-+     PTR p;
-+     const char *name ATTRIBUTE_UNUSED;
-+     bfd_vma val ATTRIBUTE_UNUSED;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+
-+#if COFF_DEBUG
-+  printf ("coff_int_constant(%s, %d)\n", name, (int)val);
-+#endif
-+
-+  coff_complain_unsupp (_("int constant"));
-+
-+  return TRUE;
-+}
-+
-+/* Define a floating point constant.  */
-+
-+static bfd_boolean
-+coff_float_constant (p, name, val)
-+     PTR p;
-+     const char *name ATTRIBUTE_UNUSED;
-+     double val ATTRIBUTE_UNUSED;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+
-+#if COFF_DEBUG
-+  printf ("coff_float_constant(%s, %g)\n", name, val);
-+#endif
-+
-+  coff_complain_unsupp (_("float constant"));
-+
-+  return TRUE;
-+}
-+
-+/* Define a typed constant.  */
-+
-+static bfd_boolean
-+coff_typed_constant (p, name, val)
-+     PTR p;
-+     const char *name ATTRIBUTE_UNUSED;
-+     bfd_vma val ATTRIBUTE_UNUSED;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+
-+#if COFF_DEBUG
-+  printf ("coff_typed_constant(%s, %d)\n", name, (int)val);
-+#endif
-+
-+  coff_complain_unsupp (_("typed constant"));
-+
-+  return TRUE;
-+}
-+
-+/* Record a variable.  */
-+
-+static bfd_boolean
-+coff_variable (p, name, kind, val)
-+     PTR p;
-+     const char *name;
-+     enum debug_var_kind kind;
-+     bfd_vma val;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  unsigned char class;
-+  asymbol *symp = NULL;
-+  coff_symbol_type *csymp;
-+  bfd_boolean global = FALSE;
-+  flagword flags = BSF_LOCAL;
-+  bfd_vma vmadiff = 0;
-+
-+#if COFF_DEBUG
-+  printf ("coff_variable(%s, %d, %d)\n",
-+        name, (int)kind, (int)val);
-+#endif
-+
-+  switch (kind)
-+    {
-+    default:
-+      abort ();
-+
-+    case DEBUG_GLOBAL:
-+      flags = BSF_GLOBAL;
-+      global = TRUE;
-+      /* AVR COFF historically used C_EXTDEF for global variables, and
-+       C_EXT for global functions.  Since some AVR COFF consumers
-+       apparently depend on this, we mimic this behaviour as
-+       well. */
-+      class = info->flags & COFF_FL_AVR? C_EXTDEF: C_EXT;
-+      break;
-+
-+    case DEBUG_STATIC:
-+    case DEBUG_LOCAL_STATIC:
-+      class = C_STAT;
-+      break;
-+
-+    case DEBUG_LOCAL:
-+      class = C_AUTO;
-+      break;
-+
-+    case DEBUG_REGISTER:
-+      class = C_REG;
-+      break;
-+    }
-+
-+  if (!coff_make_typed_symbol (info, &csymp, TS_NONE))
-+    return FALSE;
-+
-+  if (class == C_REG && (info->flags & COFF_FL_AVR) != 0)
-+    {
-+      struct coff_private_symdata *priv = (struct coff_private_symdata *)
-+      csymp->symbol.udata.p;
-+      val = coff_fixup_avr_register (val, priv->size * 8);
-+    }
-+
-+  csymp->symbol.name = name;
-+  csymp->symbol.flags = flags;        /* Note: this clears BSF_DEBUGGING. */
-+
-+  /* Match the debugging symbol against the input symtab symbols.  If
-+     we found one, use the section information from it.  Otherwise, we
-+     are lost here and just use the absolute section that was
-+     predeclared by coff_bfd_make_debug_symbol().  C_REG and C_AUTO
-+     symbols (which we do not attempt to lookup in the symtab symbols
-+     at all) go into the ABS section anyway. */
-+  if (class != C_REG && class != C_AUTO)
-+    {
-+      symp = coff_find_symbol (info, name, FALSE, global);
-+      if (symp)
-+      {
-+        csymp->symbol.section = symp->section;
-+        vmadiff = symp->section->vma;
-+      }
-+    }
-+
-+  /* Symbols are relative to section vma. */
-+  csymp->symbol.value = val - vmadiff;
-+  csymp->native->u.syment.n_sclass = class;
-+  coff_record_symbol (info, csymp);
-+
-+  return TRUE;
-+}
-+
-+/* Start outputting a function.  */
-+
-+static bfd_boolean
-+coff_start_function (p, name, globalp)
-+     PTR p;
-+     const char *name;
-+     bfd_boolean globalp;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst, *savedts;
-+
-+#if COFF_DEBUG
-+  printf ("coff_start_function(%s, %d)\n",
-+        name, globalp);
-+#endif
-+
-+  savedts = info->tstack;
-+  info->tstack = NULL;
-+
-+  coff_push_type (TS_FUNC);
-+
-+  if (info->funname != NULL)
-+    {
-+      fprintf (stderr,
-+             _("coff_start_function() called twice, pending %s, new %s\n"),
-+             info->funname, name);
-+      return FALSE;
-+    }
-+  info->funname = name;
-+  info->funglobal = globalp;
-+  info->flags |= COFF_FL_START_FCN;
-+  tst->u.ts_func.savedts = savedts;
-+
-+  return TRUE;
-+}
-+
-+/* Output a function parameter.  */
-+
-+static bfd_boolean
-+coff_function_parameter (p, name, kind, val)
-+     PTR p;
-+     const char *name;
-+     enum debug_parm_kind kind;
-+     bfd_vma val;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  coff_symbol_type *csymp;
-+  unsigned char class;
-+
-+#if COFF_DEBUG
-+  printf ("coff_function_parameter(%s, %d, %d)\n",
-+        name, (int)kind, (int)val);
-+#endif
-+
-+  switch (kind)
-+    {
-+    default:
-+      abort ();
-+
-+    case DEBUG_PARM_STACK:
-+      class = C_ARG;
-+      break;
-+
-+    case DEBUG_PARM_REG:
-+      class = C_REGPARM;
-+      break;
-+
-+    case DEBUG_PARM_REFERENCE:
-+    case DEBUG_PARM_REF_REG:
-+      fprintf (stderr, _("Reference parameters not available in COFF\n"));
-+      return TRUE;
-+    }
-+
-+  if (!coff_make_typed_symbol (info, &csymp, TS_FUNC))
-+    return FALSE;
-+
-+  if (class == C_REGPARM && (info->flags & COFF_FL_AVR) != 0)
-+    {
-+      struct coff_private_symdata *priv = (struct coff_private_symdata *)
-+      csymp->symbol.udata.p;
-+      val = coff_fixup_avr_register (val, priv->size * 8);
-+    }
-+
-+  csymp->symbol.name = name;
-+  csymp->symbol.value = val;
-+  csymp->symbol.flags |= BSF_LOCAL;
-+  csymp->native->u.syment.n_sclass = class;
-+
-+  /* Since function parameters precede the actual function definition,
-+     defer their output until the function has been created. */
-+  info->fargs = (coff_symbol_type **)
-+    xrealloc (info->fargs, ++info->nfargs * sizeof (coff_symbol_type *));
-+  info->fargs[info->nfargs - 1] = csymp;
-+
-+  return TRUE;
-+}
-+
-+/* Start a block.  */
-+
-+static bfd_boolean
-+coff_start_block (p, addr)
-+     PTR p;
-+     bfd_vma addr;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  struct coff_type_stack *tst, *otst;
-+  struct coff_fix_stack *fixp, *ofp;
-+  asymbol *symp;
-+  coff_symbol_type *csymp;
-+  unsigned int i;
-+  bfd_boolean is_start_fcn;
-+
-+#if COFF_DEBUG
-+  printf ("coff_start_block(%#x)\n", (int)addr);
-+#endif
-+
-+  is_start_fcn = info->flags & COFF_FL_START_FCN;
-+
-+  if (is_start_fcn)
-+    {
-+      /* This is the starting block of a function.  We are going to
-+         write three symbols here, one for the function itself, one
-+         ".bf" symbol to indicate the begin of the function, and
-+         finally one ".bb" for the first block inside the function. */
-+      info->flags &= ~COFF_FL_START_FCN;
-+
-+      /* Our function definition should be the only type stack element
-+       by now. */
-+      assert (info->tstack != NULL);
-+      tst = info->tstack;
-+      if (tst->tsk != TS_FUNC || tst->next != NULL)
-+      {
-+        fprintf (stderr,
-+                 _("coff_start_block() not within function definition\n"));
-+        return FALSE;
-+      }
-+
-+      /* Restore saved type stack, and push our now complete function
-+       definition on top. */
-+      info->tstack = tst->u.ts_func.savedts;
-+      tst->next = info->tstack;
-+      info->tstack = tst;
-+
-+      if (info->currentfile == NULL)
-+      {
-+        fprintf (stderr,
-+                 _("Warning: ignoring function %s() outside any compilation unit\n"),
-+                 info->funname);
-+        for (tst = info->tstack, otst = NULL; tst != NULL;)
-+          {
-+            otst = tst;
-+            tst = otst->next;
-+            if (otst->tsk == TS_ENUM &&
-+                otst->u.ts_enum.tagismalloced)
-+              free (otst->u.ts_enum.tag.malloctag);
-+            else if (otst->tsk == TS_STRUCT &&
-+                     otst->u.ts_struct.tagismalloced)
-+              free (otst->u.ts_struct.tag.malloctag);
-+            free (otst);
-+          }
-+        info->tstack = NULL;
-+        info->funname = NULL;
-+
-+        return TRUE;
-+      }
-+
-+      if (!coff_make_typed_symbol (info, &csymp, TS_NONE))
-+      return FALSE;
-+
-+      csymp->symbol.name = info->funname;
-+      csymp->symbol.flags = BSF_FUNCTION |
-+      (info->funglobal? BSF_GLOBAL: BSF_LOCAL);
-+      symp = coff_find_symbol (info, info->funname, TRUE, info->funglobal);
-+      if (symp == NULL)
-+      {
-+        fprintf (stderr,
-+                 _("function %s not found in symbol table, defaulting to \"text\" section\n"),
-+                 info->funname);
-+        csymp->symbol.section = info->funcsection = info->textsect;
-+      }
-+      else
-+      csymp->symbol.section = info->funcsection = symp->section;
-+
-+      /* Symbol addresses are relative to section vma. */
-+      csymp->symbol.value = addr - info->funcsection->vma;
-+      csymp->native->u.syment.n_sclass = info->funglobal? C_EXT: C_STAT;
-+      /* Create two initial line number entries.  The first one holds
-+       the function symbol, the second one is the trailing record
-+       that is required by coffgen.c::coff_write_native_symbol() to
-+       have a line number of zero. */
-+      csymp->lineno = (alent *) xmalloc (2 * sizeof (alent));
-+      memset (csymp->lineno, 0, 2 * sizeof (alent));
-+      info->nlnos = 2;
-+      info->totlnos++;
-+      csymp->lineno[0].u.sym = (asymbol *)csymp;
-+      coff_record_symbol (info, csymp);
-+      info->funcindex = info->nsyms - 1; /* remember for later */
-+      /* Record our endndx field for later fixing. */
-+      fixp = (struct coff_fix_stack *) xmalloc (sizeof (struct coff_fix_stack));
-+      fixp->native = csymp->native + 1;       /* points to first AUX */
-+      fixp->next = NULL;
-+      if (info->fixes == NULL)
-+      info->fixes = fixp;
-+      else
-+      {
-+        for (ofp = info->fixes; ofp->next != NULL;)
-+          ofp = ofp->next;
-+        ofp->next = fixp;
-+      }
-+
-+      csymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+      if (csymp == NULL)
-+      return FALSE;
-+
-+      csymp->symbol.name = ".bf";
-+      csymp->native->u.syment.n_sclass = C_FCN;
-+      csymp->native->u.syment.n_numaux = 1;
-+      csymp->symbol.value = addr - info->funcsection->vma;
-+      csymp->symbol.section = info->funcsection;
-+      csymp->symbol.udata.p = NULL;
-+      coff_record_symbol (info, csymp);
-+    }
-+
-+  if (info->funname == NULL)
-+    return TRUE;
-+
-+  csymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+  if (csymp == NULL)
-+    return FALSE;
-+
-+  csymp->symbol.name = ".bb";
-+  csymp->native->u.syment.n_sclass = C_BLOCK;
-+  csymp->native->u.syment.n_numaux = 1;
-+  csymp->symbol.value = addr - info->funcsection->vma;
-+  csymp->symbol.section = info->funcsection;
-+  csymp->symbol.udata.p = NULL;
-+  coff_record_symbol (info, csymp);
-+
-+  info->flags |= COFF_FL_FIX_BB;
-+
-+  /* Output any pending function parameters, if any. */
-+  if (is_start_fcn && info->nfargs)
-+    {
-+      for (i = 0; i < info->nfargs; i++)
-+      coff_record_symbol (info, info->fargs[i]);
-+
-+      free (info->fargs);
-+      info->fargs = NULL;
-+      info->nfargs = 0;
-+    }
-+
-+  return TRUE;
-+}
-+
-+/* End a block.  */
-+
-+static bfd_boolean
-+coff_end_block (p, addr)
-+     PTR p;
-+     bfd_vma addr;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  coff_symbol_type *csymp;
-+  union internal_auxent *aux;
-+
-+#if COFF_DEBUG
-+  printf ("coff_end_block(%#x)\n", (int)addr);
-+#endif
-+
-+  if (info->funname == NULL)
-+    return TRUE;
-+
-+  csymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+  if (csymp == NULL)
-+    return FALSE;
-+
-+  csymp->symbol.name = ".eb";
-+  csymp->symbol.value = addr - info->funcsection->vma;
-+  csymp->native->u.syment.n_sclass = C_BLOCK;
-+  csymp->native->u.syment.n_numaux = 1;
-+  csymp->symbol.udata.p = NULL;
-+  csymp->symbol.section = info->funcsection;
-+  aux = &((csymp->native + 1)->u.auxent);
-+  aux->x_sym.x_misc.x_lnsz.x_lnno = info->lastlno;
-+  coff_record_symbol (info, csymp);
-+
-+  info->endaddr = addr;
-+
-+  return TRUE;
-+}
-+
-+/* End a function.  */
-+
-+static bfd_boolean
-+coff_end_function (p)
-+     PTR p;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  coff_symbol_type *csymp;
-+  union internal_auxent *aux;
-+
-+#if COFF_DEBUG
-+  printf ("coff_end_function()\n");
-+#endif
-+
-+  if (info->funname == NULL)
-+    return TRUE;
-+
-+  csymp = (coff_symbol_type *) coff_bfd_make_debug_symbol (info->abfd, 0, 0);
-+  if (csymp == NULL)
-+    return FALSE;
-+
-+  csymp->symbol.name = ".ef";
-+  csymp->symbol.value = info->endaddr - info->funcsection->vma;
-+  csymp->native->u.syment.n_sclass = C_FCN;
-+  csymp->native->u.syment.n_numaux = 1;
-+  csymp->symbol.udata.p = NULL;
-+  csymp->symbol.section = info->funcsection;
-+  aux = &((csymp->native + 1)->u.auxent);
-+  aux->x_sym.x_misc.x_lnsz.x_lnno = info->lastlno;
-+
-+  coff_record_symbol (info, csymp);
-+
-+  csymp = (coff_symbol_type *) info->syms[info->funcindex];
-+  aux = &((csymp->native + 1)->u.auxent);
-+  aux->x_sym.x_misc.x_fsize = info->endaddr - csymp->symbol.value;
-+
-+  info->flags |= COFF_FL_FIX_ENDNDX;
-+  info->funname = NULL;
-+
-+  return TRUE;
-+}
-+
-+/* Output a line number.  */
-+
-+static bfd_boolean
-+coff_lineno (p, file, lineno, addr)
-+     PTR p;
-+     const char *file ATTRIBUTE_UNUSED;
-+     unsigned long lineno;
-+     bfd_vma addr;
-+{
-+  struct coff_write_handle *info = (struct coff_write_handle *) p;
-+  coff_symbol_type *csymp;
-+  union internal_auxent *aux;
-+  long i;
-+
-+#if COFF_DEBUG
-+  printf ("coff_lineno(%s, %ld, %d)\n",
-+        file, lineno, (int)addr);
-+#endif
-+
-+  /* COFF can inherently only handle line numbers inside of functions.
-+     If we are not inside a function, punt. */
-+  if (info->funname == NULL)
-+    return TRUE;
-+
-+  if (info->nlnos == 2)
-+    {
-+      /* This is the first line number of this function.  Fix the line
-+       number for the .bf symbol immediately following the start of
-+       function.  We also have to remember the starting line number
-+       of our function since all line number entries are relative to
-+       it in COFF.  Since regular line numbers must always be
-+       non-zero, we artificially force the function to start one
-+       line earlier. */
-+      csymp = (coff_symbol_type *) info->syms[info->funcindex + 1];
-+      aux = &((csymp->native + 1)->u.auxent);
-+      aux->x_sym.x_misc.x_lnsz.x_lnno = lineno;
-+      info->funlno = lineno - 1;
-+    }
-+
-+  if (info->flags & COFF_FL_FIX_BB)
-+    {
-+      /* This is the first line number after one (or more) .bb
-+       symbols.  Fix them.  In order to cope with multiple blocks
-+       starting at the same line number, we walk back the list of
-+       symbols until we find a C_BLOCK one that had already been
-+       fixed, or until we find a C_FCN symbol (presumably, the start
-+       of our current function). */
-+      info->flags &= ~COFF_FL_FIX_BB;
-+
-+      for (i = info->nsyms - 1; i >= 0; i--)
-+      {
-+        csymp = (coff_symbol_type *) info->syms[i];
-+        if (csymp->native->u.syment.n_sclass == C_FCN)
-+          break;
-+        if (csymp->native->u.syment.n_sclass == C_BLOCK)
-+          {
-+            aux = &((csymp->native + 1)->u.auxent);
-+            if (aux->x_sym.x_misc.x_lnsz.x_lnno != 0)
-+              /* already set up properly */
-+              break;
-+            aux->x_sym.x_misc.x_lnsz.x_lnno = lineno;
-+          }
-+      }
-+    }
-+
-+  csymp = (coff_symbol_type *) info->syms[info->funcindex];
-+  csymp->lineno = (alent *) xrealloc (csymp->lineno,
-+                                    ++info->nlnos * sizeof (alent));
-+  memset (csymp->lineno + info->nlnos - 1, 0, sizeof (alent));
-+  if (lineno > info->funlno)
-+    csymp->lineno[info->nlnos - 2].line_number = lineno - info->funlno;
-+  else
-+    /* Line number unreasonable.  Can e. g. happen for a line number
-+       from an include file, which we cannot process in COFF.  Just
-+       set it to the first line, to avoid generating a large unsigned
-+       short (~ 65000) line number. */
-+    csymp->lineno[info->nlnos - 2].line_number = 1;
-+  csymp->lineno[info->nlnos - 2].u.offset = addr;
-+
-+  info->lastlno = lineno;
-+  info->totlnos++;
-+
-+  return TRUE;
-+}
-diff -Naurp include/coff/avr.h include/coff/avr.h
---- include/coff/avr.h 1970-01-01 05:30:00.000000000 +0530
-+++ include/coff/avr.h 2011-11-30 12:54:36.000000000 +0530
-@@ -0,0 +1,110 @@
-+/* coff information for Atmel AVR.
-+   
-+   Copyright 2001 Free Software Foundation, Inc.
-+
-+   This program is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 2 of the License, or
-+   (at your option) any later version.
-+   
-+   This program is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+   
-+   You should have received a copy of the GNU General Public License
-+   along with this program; if not, write to the Free Software
-+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-+
-+/* This file was hacked from i860.h */
-+
-+#define L_LNNO_SIZE 2
-+#include "coff/external.h"
-+
-+/* Bits for f_flags:
-+      F_RELFLG        relocation info stripped from file
-+      F_EXEC          file is executable (no unresolved external references)
-+      F_LNNO          line numbers stripped from file
-+      F_LSYMS         local symbols stripped from file  */
-+
-+#define F_RELFLG      (0x0001)
-+#define F_EXEC                (0x0002)
-+#define F_LNNO                (0x0004)
-+#define F_LSYMS               (0x0008)
-+/* Upper nibble of flags always needs to be set.  This used to be
-+ * undocumented, recent information from Atmel says that bit 7 used to
-+ * differentiate between an old vendor-specific deviation of the
-+ * format and the current format. */
-+#define F_JUNK                (0x00f0)
-+#define F_UNUSED      (0xff00)
-+
-+#define       AVRMAGIC        0xa12
-+
-+#undef AOUTSZ
-+#ifdef AVR_EXT_COFF
-+
-+/* AVR "extended" COFF format.  This uses the optional header ("a.out"
-+   header) to inform the consumer about some additional features that
-+   are supported. */
-+#define COFF_LONG_FILENAMES yes       /* long filenames supported in consecutive aux entries */
-+#define AOUTSZ                28      /* size of optional header in "extended" COFF */
-+
-+/* Flags in the optional header; they are stored in the vstamp field. */
-+#define F_FULLPATHS   0x0001  /* long filenames supported */
-+#define F_STRUCTINFO  0x0002  /* structure information contained */
-+#define F_PTRINFO     0x0004  /* inter-segment pointers supported */
-+
-+#else /* old AVR COFF */
-+
-+#define AOUTSZ                0       /* no a.out for AVR */
-+#endif
-+
-+/* #define AVRAOUTMAGIC       0x406 */ /* "general" magic number of optional header */
-+/*
-+ * The following magic number causes AVR Studio 4.x to recognize
-+ * avr-gcc/GNU binutils produced AVR extended COFF files.  By now,
-+ * the only special treatment for them is that the contents of .data
-+ * will be appended after .text in the simulator flash.
-+ *
-+ * 0x9cc has been chosen since it resembles "gcc". ;-)
-+ */
-+#define AVRAOUTMAGIC  0x9cc   /* "gcc" magic number */
-+
-+/* By matching not only the magic number, but also the size of the
-+   optional a.out header, we can differentiate between both
-+   formats. */
-+#define AVRBADMAG(x)   ((x).f_magic != AVRMAGIC || (x).f_opthdr != AOUTSZ)
-+
-+/* AVR COFF has several anomalities in the way the handle the derived
-+   type information, and AUX entries, mainly because they apparently
-+   didn't bother to learn how COFF is supposed to work before they
-+   started.  We fix many of them at the export/import boundary, so all
-+   the internal generic COFF handling will work mostly as designed. */
-+
-+/* NB: these functions are only defined in bfd/coff-avr.c, but also
-+   used in coff-ext-avr.c, so the latter can only be configured if the
-+   former is also present.  This is certainly always the case
-+   anyway. */
-+extern void avr_coff_adjust_sym_in_post
-+  PARAMS((bfd *, PTR, PTR));
-+
-+extern void avr_coff_adjust_sym_out_post
-+  PARAMS((bfd *, PTR, PTR));
-+
-+#define COFF_ADJUST_SYM_IN_POST(ABFD, EXT, INT) \
-+      avr_coff_adjust_sym_in_post (ABFD, EXT, INT)
-+
-+#define COFF_ADJUST_SYM_OUT_POST(ABFD, INT, EXT) \
-+      avr_coff_adjust_sym_out_post (ABFD, INT, EXT)
-+
-+/********************** RELOCATION DIRECTIVES **********************/
-+
-+struct external_reloc
-+{
-+  char r_vaddr[4];
-+  char r_symndx[4];
-+  char r_type[2];
-+};
-+
-+#define RELOC struct external_reloc
-+#define RELSZ 10
-diff -Naurp include/coff/internal.h include/coff/internal.h
---- include/coff/internal.h    2011-03-31 13:43:48.000000000 +0530
-+++ include/coff/internal.h    2011-11-30 12:54:36.000000000 +0530
-@@ -649,6 +649,8 @@ union internal_auxent
- };
-+#define NAUXENTS 10           /* number of pre-allocated aux entries */
-+
- /********************** RELOCATION DIRECTIVES **********************/
- struct internal_reloc
diff --git a/302-binutils-as-dwarf.patch b/302-binutils-as-dwarf.patch
deleted file mode 100644 (file)
index c74d4ae..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-03-29 23:46:15.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-16 12:28:16.000000000 +0530
-@@ -24,6 +24,7 @@
- #include "as.h"
- #include "safe-ctype.h"
- #include "subsegs.h"
-+#include "dwarf2dbg.h"
- #include "dw2gencfi.h"
-@@ -1453,6 +1454,7 @@ md_assemble (char *str)
-   dwarf2_emit_insn (0);
-+  dwarf2_emit_insn (0);
-   /* We used to set input_line_pointer to the result of get_operands,
-      but that is wrong.  Our caller assumes we don't change it.  */
-   {
diff --git a/304-binutils-bug13113.patch b/304-binutils-bug13113.patch
deleted file mode 100644 (file)
index 5962434..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-16 12:25:31.000000000 +0530
-+++ binutils/size.c    2011-12-16 12:36:09.000000000 +0530
-@@ -341,6 +341,7 @@ usage (FILE *stream, int status)
-   fprintf (stream, _(" The options are:\n\
-   -A|-B|-C  --format={sysv|berkeley|avr}  Select output style (default is %s)\n\
-             --mcu=<avrmcu>            MCU name for AVR format only\n\
-+            --mlist-devices           List all supported MCUs\n\
-   -o|-d|-x  --radix={8|10|16}         Display numbers in octal, decimal or hex\n\
-   -t        --totals                  Display the total sizes (Berkeley only)\n\
-             --common                  Display total size for *COM* syms\n\
-@@ -361,6 +362,7 @@ FORMAT_NAME
- #define OPTION_RADIX (OPTION_FORMAT + 1)
- #define OPTION_TARGET (OPTION_RADIX + 1)
- #define OPTION_MCU (OPTION_TARGET + 1) 
-+#define OPTION_MLIST_DEVICES (OPTION_MCU + 1)
- static struct option long_options[] =
- {
-@@ -369,12 +371,37 @@ static struct option long_options[] =
-   {"radix", required_argument, 0, OPTION_RADIX},
-   {"target", required_argument, 0, OPTION_TARGET},
-   {"mcu", required_argument, 0, 203},
-+  {"mlist-devices", no_argument, 0, OPTION_MLIST_DEVICES},
-   {"totals", no_argument, &show_totals, 1},
-   {"version", no_argument, &show_version, 1},
-   {"help", no_argument, &show_help, 1},
-   {0, no_argument, 0, 0}
- };
-+static void list_supported_devices (FILE *stream, int status)
-+{
-+  unsigned int i ;
-+  int llen = 0;
-+  fprintf (stream, _("List of supported devices:\n"));
-+  for (i = 0; i < sizeof(avr) / sizeof(avr[0]); i++)
-+  {
-+    int slen = strlen(avr[i].name);
-+    llen += slen + 1 ;
-+    if (llen < 75)
-+    {
-+      fprintf (stream, _(" %s"), avr[i].name);
-+    }
-+    else
-+    {
-+      fprintf (stream, _("\n %s"), avr[i].name);
-+      llen = slen + 2 ;
-+    }
-+  }
-+  fprintf (stream, "\n");
-+
-+  exit (status);
-+}
-+
- int main (int, char **);
- int
-@@ -429,6 +456,10 @@ main (int argc, char **argv)
-       avrmcu = optarg;
-       break;
-+      case OPTION_MLIST_DEVICES:
-+      list_supported_devices (stdout, 1);
-+      break;
-+
-       case OPTION_TARGET:
-       target = optarg;
-       break;
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-16 12:30:52.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-16 12:36:09.000000000 +0530
-@@ -348,7 +348,8 @@ static struct hash_control *avr_mod_hash
- #define OPTION_MMCU 'm'
- enum options
- {
--  OPTION_ALL_OPCODES = OPTION_MD_BASE + 1,
-+  OPTION_MLIST_DEVICES = OPTION_MD_BASE + 1,
-+  OPTION_ALL_OPCODES,
-   OPTION_NO_SKIP_BUG,
-   OPTION_NO_WRAP
- };
-@@ -356,6 +357,7 @@ enum options
- struct option md_longopts[] =
- {
-   { "mmcu",   required_argument, NULL, OPTION_MMCU        },
-+  { "mlist-devices", no_argument, NULL, OPTION_MLIST_DEVICES },
-   { "mall-opcodes", no_argument, NULL, OPTION_ALL_OPCODES },
-   { "mno-skip-bug", no_argument, NULL, OPTION_NO_SKIP_BUG },
-   { "mno-wrap",     no_argument, NULL, OPTION_NO_WRAP     },
-@@ -458,12 +460,12 @@ md_show_usage (FILE *stream)
-       "                   avrxmega7 - XMEGA, > 128K, <= 256K FLASH, > 64K RAM\n"
-       "                   or immediate microcontroller name.\n"));
-   fprintf (stream,
--      _("  -mall-opcodes    accept all AVR opcodes, even if not supported by MCU\n"
-+      _("  -mlist-devices   list all supported devices\n"
-+      "  -mall-opcodes    accept all AVR opcodes, even if not supported by MCU\n"
-       "  -mno-skip-bug    disable warnings for skipping two-word instructions\n"
-       "                   (default for avr4, avr5)\n"
-       "  -mno-wrap        reject rjmp/rcall instructions with 8K wrap-around\n"
-       "                   (default for avr3, avr5)\n"));
--  show_mcu_list (stream);
- }
- static void
-@@ -515,6 +517,9 @@ md_parse_option (int c, char *arg)
-                   avr_mcu->name, mcu_types[i].name);
-       return 1;
-       }
-+    case OPTION_MLIST_DEVICES:
-+      show_mcu_list(stdout);
-+      exit (EXIT_SUCCESS);
-     case OPTION_ALL_OPCODES:
-       avr_opt.all_opcodes = 1;
-       return 1;
diff --git a/305-binutils-new-usb-insns.patch b/305-binutils-new-usb-insns.patch
deleted file mode 100644 (file)
index 9d5dd7b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -Naurp include/opcode/avr.h include/opcode/avr.h
---- include/opcode/avr.h       2011-07-01 22:44:03.000000000 +0530
-+++ include/opcode/avr.h       2011-12-22 11:56:43.000000000 +0530
-@@ -33,6 +33,7 @@
- #define AVR_ISA_MOVW  0x1000 /* device has MOVW */
- #define AVR_ISA_SPMX  0x2000 /* device has SPM Z[+] */
- #define AVR_ISA_DES   0x4000 /* device has DES */
-+#define AVR_ISA_USB   0x8000 /* device has USB */
- #define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
- #define AVR_ISA_2xxx  (AVR_ISA_TINY1 | AVR_ISA_SRAM)
-@@ -53,6 +54,7 @@
- #define AVR_ISA_M128  (AVR_ISA_M323 | AVR_ISA_ELPM | AVR_ISA_ELPMX)
- #define AVR_ISA_M256  (AVR_ISA_M128 | AVR_ISA_EIND)
- #define AVR_ISA_XMEGA (AVR_ISA_M256 | AVR_ISA_SPMX | AVR_ISA_DES)
-+#define AVR_ISA_XMEGAU (AVR_ISA_XMEGA | AVR_ISA_USB)
- #define AVR_ISA_AVR1   AVR_ISA_TINY1
- #define AVR_ISA_AVR2   AVR_ISA_2xxx
-@@ -276,6 +278,11 @@ AVR_INSN (fmulsu,"a,a","000000111ddd1rrr
- AVR_INSN (sts,  "i,r", "1001001ddddd0000", 2, AVR_ISA_2xxx, 0x9200)
- AVR_INSN (lds,  "r,i", "1001000ddddd0000", 2, AVR_ISA_2xxx, 0x9000)
-+AVR_INSN (xch,  "z,r", "1001001rrrrr0100", 1, AVR_ISA_XMEGAU, 0x9204)
-+AVR_INSN (las,  "z,r", "1001001rrrrr0101", 1, AVR_ISA_XMEGAU, 0x9205)
-+AVR_INSN (lac,  "z,r", "1001001rrrrr0110", 1, AVR_ISA_XMEGAU, 0x9206)
-+AVR_INSN (lat,  "z,r", "1001001rrrrr0111", 1, AVR_ISA_XMEGAU, 0x9207)
-+
-    /* Special case for b+0, `e' must be next entry after `b',
-       b={Y=1,Z=0}, ee={X=11,Y=10,Z=00}, !=1 if -e or e+ or X.  */
- AVR_INSN (ldd,  "r,b", "10o0oo0dddddbooo", 1, AVR_ISA_2xxx, 0x8000)
diff --git a/306-binutils-bug15573-AVRTC-419.patch b/306-binutils-bug15573-AVRTC-419.patch
deleted file mode 100644 (file)
index 939916e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
---- bfd/elf32-avr.c    2011-06-02 19:13:14.000000000 +0530
-+++ bfd/elf32-avr.c    2012-02-01 19:09:51.000000000 +0530
-@@ -1506,8 +1506,12 @@
-        shrinked_insn_address = (sec->output_section->vma
-                                 + sec->output_offset + addr - count);
--       irelend = elf_section_data (isec)->relocs + isec->reloc_count;
--       for (irel = elf_section_data (isec)->relocs;
-+       irel = elf_section_data (isec)->relocs;
-+       
-+       if (NULL == irel)
-+         irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, FALSE);
-+
-+       for (irelend = irel + isec->reloc_count;
-             irel < irelend;
-             irel++)
-          {
-@@ -1564,6 +1568,8 @@
-          /* else...Reference symbol is extern.  No need for adjusting
-             the addend.  */
-        }
-+       if (NULL == elf_section_data (isec)->relocs)
-+         free (irelend - isec->reloc_count);
-      }
-   }
diff --git a/307-binutils-fix-AVRTC-424.patch b/307-binutils-fix-AVRTC-424.patch
deleted file mode 100644 (file)
index 1ae373b..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
---- bfd/elf32-avr.c    2012-02-02 15:47:48.000000000 +0530
-+++ bfd/elf32-avr.c    2012-02-02 15:50:59.000000000 +0530
-@@ -1655,6 +1655,16 @@ elf32_avr_relax_section (bfd *abfd,
-   Elf_Internal_Sym *isymbuf = NULL;
-   struct elf32_avr_link_hash_table *htab;
-+  /* If 'shrinkable' is FALSE, do not shrink by deleting bytes while
-+     relaxing. Such shrinking can cause issues for the sections such 
-+     as .vectors and .jumptables. Instead the unused bytes should be 
-+     filled with nop instructions */
-+  bfd_boolean shrinkable = TRUE;
-+
-+  if (!strcmp (sec->name,".vectors")
-+      || !strcmp (sec->name,".jumptables"))
-+    shrinkable = FALSE;
-+
-   if (link_info->relocatable)
-     (*link_info->callbacks->einfo)
-       (_("%P%F: --relax and -r may not be used together\n"));
-@@ -1811,10 +1821,16 @@ elf32_avr_relax_section (bfd *abfd,
-             /* Compute the distance from this insn to the branch target.  */
-             gap = value - dot;
--            /* If the distance is within -4094..+4098 inclusive, then we can
--               relax this jump/call.  +4098 because the call/jump target
--               will be closer after the relaxation.  */
--            if ((int) gap >= -4094 && (int) gap <= 4098)
-+            /* Check if the gap falls in the range that can be accommodated
-+               in 13bits signed (It is 12bits when encoded, as we deal with
-+               word addressing). */
-+            if (!shrinkable && ((int) gap >= -4096 && (int) gap <= 4095))
-+              distance_short_enough = 1;
-+            /* If shrinkable, then we can check for a range of distance which
-+               is two bytes farther on both the directions because the call
-+               or jump target will be closer by two bytes after the 
-+               relaxation. */
-+            else if (shrinkable && ((int) gap >= -4094 && (int) gap <= 4097))
-               distance_short_enough = 1;
-             /* Here we handle the wrap-around case.  E.g. for a 16k device
-@@ -1888,11 +1904,9 @@ elf32_avr_relax_section (bfd *abfd,
-                 irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
-                                              R_AVR_13_PCREL);
--                /* Check for the vector section. There we don't want to
--                   modify the ordering!  */
--
--                if (!strcmp (sec->name,".vectors")
--                    || !strcmp (sec->name,".jumptables"))
-+                /* We should not modify the ordering if 'shrinkable' is
-+                   FALSE */ 
-+                if (!shrinkable)
-                   {
-                     /* Let's insert a nop.  */
-                     bfd_put_8 (abfd, 0x00, contents + irel->r_offset + 2);
similarity index 56%
rename from 420-binutils-atmxt336s.patch
rename to 400-binutils-atmxt336s.patch
index dfa61767f470409abebd1fcf485b60750b6e97a4..10615a6eb9311981b64e5b11fd79fb20a6d08710 100644 (file)
@@ -1,7 +1,7 @@
 diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-22 12:39:06.000000000 +0530
-+++ binutils/size.c    2011-12-22 12:39:15.000000000 +0530
-@@ -95,12 +95,14 @@ static int return_code = 0;
+--- binutils/size.c    2012-12-17 16:51:45.000000000 +0530
++++ binutils/size.c    2012-12-17 16:53:47.000000000 +0530
+@@ -96,12 +96,14 @@ static int return_code = 0;
  #define AVR2K 2048UL
  #define AVR4K 4096UL
  #define AVR8K 8192UL
@@ -16,7 +16,7 @@ diff -Naurp binutils/size.c binutils/size.c
  #define AVR64K 65536UL
  #define AVR68K 69632UL
  #define AVR128K 131072UL
-@@ -204,6 +206,8 @@ avr_device_t avr[] =
+@@ -216,6 +218,8 @@ avr_device_t avr[] =
        {"atmega64hve",   AVR64K,  AVR4K,  AVR1K},
        {"atmega64m1",    AVR64K,  AVR4K,  AVR2K},
        {"m3000",         AVR64K,  AVR4K,  0UL},
@@ -26,25 +26,25 @@ diff -Naurp binutils/size.c binutils/size.c
        {"atmega406",     AVR40K,  AVR2K,  AVR512},
  
 diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-22 12:39:06.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-22 12:39:15.000000000 +0530
-@@ -272,6 +272,7 @@ static struct mcu_type_s mcu_types[] =
+--- gas/config/tc-avr.c        2012-12-17 16:53:23.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-17 16:53:47.000000000 +0530
+@@ -278,6 +278,7 @@ static struct mcu_type_s mcu_types[] =
    {"atmega2561", AVR_ISA_AVR6,    bfd_mach_avr6},
-   {"atmega256rfa2", AVR_ISA_AVR6, bfd_mach_avr6},
    {"atmega256rfr2", AVR_ISA_AVR6, bfd_mach_avr6},
+   {"atmega2564rfr2",AVR_ISA_AVR6, bfd_mach_avr6},
 +  {"atmxt336s",   AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
    {"atxmega16a4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega16a4u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega2},
-   {"atxmega16d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atxmega16a4u",AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
+   {"atxmega16c4", AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
 diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-22 12:39:06.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-22 12:39:15.000000000 +0530
-@@ -88,7 +88,7 @@ atmega2560, atmega2561, atmega256rfa2, a
+--- gas/doc/c-avr.texi 2012-12-17 16:51:14.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-17 16:55:26.000000000 +0530
+@@ -94,7 +94,7 @@ atmega2560, atmega2561, atmega256rfr2).
  Instruction set avrxmega2 is for the XMEGA AVR core with 8K to 64K program
  memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u,
--atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32d4, atxmega32x1).
-+atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32d4, atxmega32x1, atmxt336s).
+ atxmega16c4, atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32c4, 
+-atxmega32d4, atxmega16e5, atxmega8e5, atxmega32e5, atxmega32x1).
++atxmega32d4, atxmega16e5, atxmega8e5, atxmega32e5, atxmega32x1, atmxt336s).
  
  Instruction set avrxmega3 is for the XMEGA AVR core with 8K to 64K program
  memory space and greater than 64K data space (MCU types: none).
diff --git a/400-binutils-xmega.patch b/400-binutils-xmega.patch
deleted file mode 100644 (file)
index 8c86b7a..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-05-24 11:34:25.000000000 +0530
-+++ binutils/size.c    2012-05-24 11:34:53.000000000 +0530
-@@ -121,6 +121,7 @@ avr_device_t avr[] =
- {
-       {"atxmega256a3",  AVR264K, AVR16K, AVR4K},
-       {"atxmega256a3b", AVR264K, AVR16K, AVR4K},
-+      {"atxmega256a3bu",AVR264K, AVR16K, AVR4K},
-       {"atxmega256d3",  AVR264K, AVR16K, AVR4K},
-       {"atmega2560",    AVR256K, AVR8K,  AVR4K},
-@@ -132,6 +133,7 @@ avr_device_t avr[] =
-       {"atxmega128a1",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a1u", AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a3",  AVR136K, AVR8K,  AVR2K},
-+      {"atxmega128b1",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128d3",  AVR136K, AVR8K,  AVR2K},
-       {"at43usb320",    AVR128K, 608UL,  0UL},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-05-24 11:34:25.000000000 +0530
-+++ gas/config/tc-avr.c        2012-05-24 11:39:23.000000000 +0530
-@@ -265,7 +265,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega64a1", AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
-   {"atxmega64a1u",AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
-   {"atxmega128a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
--  {"atxmega128b1", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-+  {"atxmega128b1", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-@@ -453,6 +453,7 @@ md_show_usage (FILE *stream)
-       "                   avr5  - enhanced AVR core with up to 64K program memory\n"
-       "                   avr51 - enhanced AVR core with up to 128K program memory\n"
-       "                   avr6  - enhanced AVR core with up to 256K program memory\n"
-+      "                   avrxmega2 - XMEGA, > 8K, < 64K FLASH, < 64K RAM\n"
-       "                   avrxmega3 - XMEGA, > 8K, <= 64K FLASH, > 64K RAM\n"
-       "                   avrxmega4 - XMEGA, > 64K, <= 128K FLASH, <= 64K RAM\n"
-       "                   avrxmega5 - XMEGA, > 64K, <= 128K FLASH, > 64K RAM\n"
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-05-24 11:12:14.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-05-24 11:34:53.000000000 +0530
-@@ -103,7 +103,7 @@ atxmega64a1u).
- Instruction set avrxmega6 is for the XMEGA AVR core with up to 256K program
- memory space and less than 64K data space (MCU types: atxmega128a3,
- atxmega128d3, atxmega192a3, atxmega128b1, atxmega192d3, atxmega256a3, 
--atxmega256a3b, atxmega256a3bu, atxmega192d3).
-+atxmega256a3b, atxmega256a3bu).
- Instruction set avrxmega7 is for the XMEGA AVR core with up to 256K program
- memory space and greater than 64K data space (MCU types: atxmega128a1,
-diff -Naurp ld/Makefile.am ld/Makefile.am
---- ld/Makefile.am     2012-05-24 11:12:14.000000000 +0530
-+++ ld/Makefile.am     2012-05-24 11:34:53.000000000 +0530
-@@ -163,13 +163,13 @@ ALL_EMULATION_SOURCES = \
-       eavr5.c \
-       eavr51.c \
-       eavr6.c \
--      eavrxmega1.o \
--      eavrxmega2.o \
--      eavrxmega3.o \
--      eavrxmega4.o \
--      eavrxmega5.o \
--      eavrxmega6.o \
--      eavrxmega7.o \
-+      eavrxmega1.c \
-+      eavrxmega2.c \
-+      eavrxmega3.c \
-+      eavrxmega4.c \
-+      eavrxmega5.c \
-+      eavrxmega6.c \
-+      eavrxmega7.c \
-       ecoff_i860.c \
-       ecoff_sparc.c \
-       ecrisaout.c \
-diff -Naurp ld/Makefile.in ld/Makefile.in
---- ld/Makefile.in     2012-05-24 11:12:14.000000000 +0530
-+++ ld/Makefile.in     2012-05-24 11:34:53.000000000 +0530
-@@ -469,13 +469,13 @@ ALL_EMULATION_SOURCES = \
-       eavr5.c \
-       eavr51.c \
-       eavr6.c \
--      eavrxmega1.o \
--      eavrxmega2.o \
--      eavrxmega3.o \
--      eavrxmega4.o \
--      eavrxmega5.o \
--      eavrxmega6.o \
--      eavrxmega7.o \
-+      eavrxmega1.c \
-+      eavrxmega2.c \
-+      eavrxmega3.c \
-+      eavrxmega4.c \
-+      eavrxmega5.c \
-+      eavrxmega6.c \
-+      eavrxmega7.c \
-       ecoff_i860.c \
-       ecoff_sparc.c \
-       ecrisaout.c \
diff --git a/401-binutils-atmega48hvf.patch b/401-binutils-atmega48hvf.patch
new file mode 100644 (file)
index 0000000..b60fce5
--- /dev/null
@@ -0,0 +1,48 @@
+diff -Naurp binutils/size.c binutils/size.c
+--- binutils/size.c    2012-12-17 16:57:40.000000000 +0530
++++ binutils/size.c    2012-12-17 16:58:00.000000000 +0530
+@@ -103,6 +103,7 @@ static int return_code = 0;
+ #define AVR32K 32768UL
+ #define AVR36K 36864UL
+ #define AVR40K 40960UL
++#define AVR48K 49152UL
+ #define AVR52K 53248UL
+ #define AVR64K 65536UL
+ #define AVR68K 69632UL
+@@ -343,6 +344,7 @@ avr_device_t avr[] =
+       {"at90s4433",     AVR4K,   AVR128, AVR256},
+       {"at90s4434",     AVR4K,   352UL,  AVR256},
+       {"atmega48",      AVR4K,   AVR512, AVR256},
++      {"atmega48hvf",   AVR48K,  AVR2K,  AVR1K},
+       {"atmega48a",     AVR4K,   AVR512, AVR256},
+       {"atmega48pa",    AVR4K,   AVR512, AVR256},
+       {"atmega48p",     AVR4K,   AVR512, AVR256},
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2012-12-17 16:57:40.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-17 16:58:00.000000000 +0530
+@@ -243,6 +243,7 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega16hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
+   {"atmega32hvb",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega32hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
++  {"atmega48hvf",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega64hve",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"at90can32" , AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"at90can64" , AVR_ISA_AVR5,    bfd_mach_avr5},
+diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
+--- gas/doc/c-avr.texi 2012-12-17 16:57:40.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-17 16:58:00.000000000 +0530
+@@ -78,10 +78,10 @@ atmega64rfr2, atmega640, atmega644, atme
+ atmega644pa, atmega645, atmega645a, atmega645p, atmega6450, atmega6450a,
+ atmega6450p, atmega649, atmega649a, atmega649p, atmega6490, atmega6490a,
+ atmega6490p, atmega16hva, atmega16hva2, atmega16hvb, atmega16hvbrevb, 
+-atmega32hvb, atmega32hvbrevb, atmega64hve, at90can32, at90can64, at90pwm161,
+-at90pwm216, at90pwm316, atmega32c1, atmega64c1, atmega16m1, atmega32m1,
+-atmega64m1, atmega16u4, atmega32u4, atmega32u6, at90usb646, at90usb647, at94k,
+-at90scr100, ata5790, ata5795).
++atmega32hvb, atmega48hvf, atmega32hvbrevb, atmega64hve, at90can32, at90can64,
++at90pwm161,at90pwm216, at90pwm316, atmega32c1, atmega64c1, atmega16m1,
++atmega32m1, atmega64m1, atmega16u4, atmega32u4, atmega32u6, at90usb646,
++at90usb647, at94k, at90scr100, ata5790, ata5795).
+ Instruction set avr51 is for the enhanced AVR core with exactly 128K program
+ memory space (MCU types: atmega128, atmega128a, atmega1280, atmega1281, 
diff --git a/401-binutils-avrtiny10.patch b/401-binutils-avrtiny10.patch
deleted file mode 100644 (file)
index 472e4ae..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-diff -Naurp bfd/archures.c bfd/archures.c
---- bfd/archures.c     2011-08-02 04:34:19.000000000 +0530
-+++ bfd/archures.c     2011-12-22 12:00:37.000000000 +0530
-@@ -388,6 +388,7 @@ DESCRIPTION
- .#define bfd_mach_avrxmega5 105
- .#define bfd_mach_avrxmega6 106
- .#define bfd_mach_avrxmega7 107
-+.#define bfd_mach_avrtiny10 201
- .  bfd_arch_bfin,        {* ADI Blackfin *}
- .#define bfd_mach_bfin          1
- .  bfd_arch_cr16,       {* National Semiconductor CompactRISC (ie CR16). *}
-diff -Naurp bfd/bfd-in2.h bfd/bfd-in2.h
---- bfd/bfd-in2.h      2011-09-16 06:45:18.000000000 +0530
-+++ bfd/bfd-in2.h      2011-12-22 12:00:37.000000000 +0530
-@@ -2095,6 +2095,7 @@ enum bfd_architecture
- #define bfd_mach_avrxmega5 105
- #define bfd_mach_avrxmega6 106
- #define bfd_mach_avrxmega7 107
-+#define bfd_mach_avrtiny10 201
-   bfd_arch_bfin,        /* ADI Blackfin */
- #define bfd_mach_bfin          1
-   bfd_arch_cr16,       /* National Semiconductor CompactRISC (ie CR16). */
-diff -Naurp bfd/cpu-avr.c bfd/cpu-avr.c
---- bfd/cpu-avr.c      2011-03-22 23:40:42.000000000 +0530
-+++ bfd/cpu-avr.c      2011-12-22 12:00:37.000000000 +0530
-@@ -154,7 +154,10 @@ static const bfd_arch_info_type arch_inf
-   N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[16]),
-   
-   /* Xmega 7 */
--  N (24, bfd_mach_avrxmega7, "avr:107", FALSE, NULL)
-+  N (24, bfd_mach_avrxmega7, "avr:107", FALSE, & arch_info_struct[17]),
-+  
-+  /* attiny 10 */
-+  N (16, bfd_mach_avrtiny10, "avr:201", FALSE, NULL)
-   
- };
-diff -Naurp bfd/elf32-avr.c bfd/elf32-avr.c
---- bfd/elf32-avr.c    2011-06-02 19:13:14.000000000 +0530
-+++ bfd/elf32-avr.c    2011-12-22 12:00:37.000000000 +0530
-@@ -1326,6 +1326,10 @@ bfd_elf_avr_final_write_processing (bfd 
-     case bfd_mach_avrxmega7:
-       val = E_AVR_MACH_XMEGA7;
-       break;
-+
-+    case bfd_mach_avrtiny10:
-+      val = E_AVR_MACH_AVRTINY10;
-+      break;
-     }
-   elf_elfheader (abfd)->e_machine = EM_AVR;
-@@ -1416,6 +1420,10 @@ elf32_avr_object_p (bfd *abfd)
-       case E_AVR_MACH_XMEGA7:
-         e_set = bfd_mach_avrxmega7;
-         break;
-+
-+      case E_AVR_MACH_AVRTINY10:
-+        e_set = bfd_mach_avrtiny10;
-+        break;
-       }
-     }
-   return bfd_default_set_arch_mach (abfd, bfd_arch_avr,
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-22 12:02:01.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-22 12:00:37.000000000 +0530
-@@ -90,6 +90,7 @@ static struct mcu_type_s mcu_types[] =
-   {"avrxmega5",  AVR_ISA_XMEGA,   bfd_mach_avrxmega5},
-   {"avrxmega6",  AVR_ISA_XMEGA,   bfd_mach_avrxmega6},
-   {"avrxmega7",  AVR_ISA_XMEGA,   bfd_mach_avrxmega7},
-+  {"avrtiny10",  AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-   {"at90s1200",  AVR_ISA_1200,    bfd_mach_avr1},
-   {"attiny11",   AVR_ISA_AVR1,    bfd_mach_avr1},
-   {"attiny12",   AVR_ISA_AVR1,    bfd_mach_avr1},
-@@ -275,6 +276,12 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega256d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega128a1", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
-   {"atxmega128a1u", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
-+  {"attiny4",      AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-+  {"attiny5",      AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-+  {"attiny9",      AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-+  {"attiny10",     AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-+  {"attiny20",     AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-+  {"attiny40",     AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-   {NULL, 0, 0}
- };
-@@ -459,6 +466,7 @@ md_show_usage (FILE *stream)
-       "                   avrxmega5 - XMEGA, > 64K, <= 128K FLASH, > 64K RAM\n"
-       "                   avrxmega6 - XMEGA, > 128K, <= 256K FLASH, <= 64K RAM\n"
-       "                   avrxmega7 - XMEGA, > 128K, <= 256K FLASH, > 64K RAM\n"
-+      "                   avrtiny10 - tiny devices with 16 gp registers\n"
-       "                   or immediate microcontroller name.\n"));
-   fprintf (stream,
-       _("  -mlist-devices   list all supported devices\n"
-@@ -809,6 +817,17 @@ avr_operand (struct avr_opcodes_s *opcod
-         op_mask = avr_get_constant (str, 31);
-         str = input_line_pointer;
-       }
-+        if (strcmp(avr_mcu->name, "avrtiny10") == 0 
-+           || strcmp(avr_mcu->name, "attiny10") == 0
-+           || strcmp(avr_mcu->name, "attiny4")  == 0
-+           || strcmp(avr_mcu->name, "attiny5")  == 0
-+           || strcmp(avr_mcu->name, "attiny9")  == 0
-+           || strcmp(avr_mcu->name, "attiny20") == 0
-+           || strcmp(avr_mcu->name, "attiny40") == 0)
-+      {
-+                if(op_mask < 16)
-+                as_bad (_("register number above 15 required"));
-+      }
-       if (op_mask <= 31)
-       {
-diff -Naurp include/elf/avr.h include/elf/avr.h
---- include/elf/avr.h  2011-03-22 23:40:44.000000000 +0530
-+++ include/elf/avr.h  2011-12-22 12:00:37.000000000 +0530
-@@ -47,6 +47,7 @@
- #define E_AVR_MACH_XMEGA5 105
- #define E_AVR_MACH_XMEGA6 106
- #define E_AVR_MACH_XMEGA7 107
-+#define E_AVR_MACH_AVRTINY10 201
- /* Relocations.  */
- START_RELOC_NUMBERS (elf_avr_reloc_type)
-diff -Naurp include/opcode/avr.h include/opcode/avr.h
---- include/opcode/avr.h       2011-12-22 11:59:33.000000000 +0530
-+++ include/opcode/avr.h       2011-12-22 12:00:37.000000000 +0530
-@@ -72,6 +72,8 @@
-                         AVR_ISA_ELPM | AVR_ISA_ELPMX | AVR_ISA_SPM | \
-                         AVR_ISA_BRK | AVR_ISA_EIND | AVR_ISA_MOVW)
-+#define AVR_ISA_AVRTINY10 (AVR_ISA_1200 | AVR_ISA_BRK | AVR_ISA_SRAM)
-+
- #define REGISTER_P(x) ((x) == 'r'             \
-                      || (x) == 'd'            \
-                      || (x) == 'w'            \
-@@ -161,8 +163,8 @@ AVR_INSN (sez,  "",    "1001010000011000
- AVR_INSN (bclr, "S",   "100101001SSS1000", 1, AVR_ISA_1200, 0x9488)
- AVR_INSN (bset, "S",   "100101000SSS1000", 1, AVR_ISA_1200, 0x9408)
--AVR_INSN (icall,"",    "1001010100001001", 1, AVR_ISA_2xxx, 0x9509)
--AVR_INSN (ijmp, "",    "1001010000001001", 1, AVR_ISA_2xxx, 0x9409)
-+AVR_INSN (icall,"",    "1001010100001001", 1, AVR_ISA_SRAM, 0x9509)
-+AVR_INSN (ijmp, "",    "1001010000001001", 1, AVR_ISA_SRAM, 0x9409)
- AVR_INSN (lpm,  "?",   "1001010111001000", 1, AVR_ISA_TINY1,0x95c8)
- AVR_INSN (lpm,  "r,z", "1001000ddddd010+", 1, AVR_ISA_LPMX, 0x9004)
-@@ -262,8 +264,8 @@ AVR_INSN (dec,  "r",   "1001010rrrrr1010
- AVR_INSN (inc,  "r",   "1001010rrrrr0011", 1, AVR_ISA_1200, 0x9403)
- AVR_INSN (lsr,  "r",   "1001010rrrrr0110", 1, AVR_ISA_1200, 0x9406)
- AVR_INSN (neg,  "r",   "1001010rrrrr0001", 1, AVR_ISA_1200, 0x9401)
--AVR_INSN (pop,  "r",   "1001000rrrrr1111", 1, AVR_ISA_2xxx, 0x900f)
--AVR_INSN (push, "r",   "1001001rrrrr1111", 1, AVR_ISA_2xxx, 0x920f)
-+AVR_INSN (pop,  "r",   "1001000rrrrr1111", 1, AVR_ISA_SRAM, 0x900f)
-+AVR_INSN (push, "r",   "1001001rrrrr1111", 1, AVR_ISA_SRAM, 0x920f)
- AVR_INSN (ror,  "r",   "1001010rrrrr0111", 1, AVR_ISA_1200, 0x9407)
- AVR_INSN (swap, "r",   "1001010rrrrr0010", 1, AVR_ISA_1200, 0x9402)
-@@ -275,8 +277,8 @@ AVR_INSN (fmul, "a,a", "000000110ddd1rrr
- AVR_INSN (fmuls,"a,a", "000000111ddd0rrr", 1, AVR_ISA_MUL,  0x0380)
- AVR_INSN (fmulsu,"a,a","000000111ddd1rrr", 1, AVR_ISA_MUL,  0x0388)
--AVR_INSN (sts,  "i,r", "1001001ddddd0000", 2, AVR_ISA_2xxx, 0x9200)
--AVR_INSN (lds,  "r,i", "1001000ddddd0000", 2, AVR_ISA_2xxx, 0x9000)
-+AVR_INSN (sts,  "i,r", "1001001ddddd0000", 2, AVR_ISA_SRAM, 0x9200)
-+AVR_INSN (lds,  "r,i", "1001000ddddd0000", 2, AVR_ISA_SRAM, 0x9000)
- AVR_INSN (xch,  "z,r", "1001001rrrrr0100", 1, AVR_ISA_XMEGAU, 0x9204)
- AVR_INSN (las,  "z,r", "1001001rrrrr0101", 1, AVR_ISA_XMEGAU, 0x9205)
-diff -Naurp ld/configure.tgt ld/configure.tgt
---- ld/configure.tgt   2011-11-21 14:59:37.000000000 +0530
-+++ ld/configure.tgt   2011-12-22 12:00:37.000000000 +0530
-@@ -98,7 +98,7 @@ arm*-*-uclinux*)     targ_emul=armelf_linux
- arm-*-vxworks)                targ_emul=armelf_vxworks ;;
- arm*-*-conix*)                targ_emul=armelf ;;
- avr-*-*)              targ_emul=avr2
--                      targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7"
-+                      targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny10"
-                       ;;
- bfin-*-elf)           targ_emul=elf32bfin;
-                       targ_extra_emuls="elf32bfinfd"
-diff -Naurp ld/emulparams/avrtiny10.sh ld/emulparams/avrtiny10.sh
---- ld/emulparams/avrtiny10.sh 1970-01-01 05:30:00.000000000 +0530
-+++ ld/emulparams/avrtiny10.sh 2011-12-22 12:00:37.000000000 +0530
-@@ -0,0 +1,12 @@
-+ARCH=avr:201
-+MACHINE=
-+SCRIPT_NAME=avr
-+OUTPUT_FORMAT="elf32-avr"
-+MAXPAGESIZE=1
-+EMBEDDED=yes
-+TEMPLATE_NAME=elf32
-+
-+TEXT_LENGTH=4K
-+DATA_ORIGIN=0x800040
-+DATA_LENGTH=0x140
-+EXTRA_EM_FILE=avrelf
-diff -Naurp ld/Makefile.am ld/Makefile.am
---- ld/Makefile.am     2011-12-22 12:02:01.000000000 +0530
-+++ ld/Makefile.am     2011-12-22 12:00:37.000000000 +0530
-@@ -170,6 +170,7 @@ ALL_EMULATION_SOURCES = \
-       eavrxmega5.c \
-       eavrxmega6.c \
-       eavrxmega7.c \
-+      eavrtiny10.c \
-       ecoff_i860.c \
-       ecoff_sparc.c \
-       ecrisaout.c \
-@@ -818,6 +819,10 @@ eavrxmega7.c: $(srcdir)/emulparams/avrxm
-   $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-   ${GEN_DEPENDS}
-       ${GENSCRIPTS} avrxmega7 "$(tdir_avr2)"
-+eavrtiny10.c: $(srcdir)/emulparams/avrtiny10.sh \
-+  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-+  ${GEN_DEPENDS}
-+      ${GENSCRIPTS} avrtiny10 "$(tdir_avr2)"
- ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
-   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i860coff.sc ${GEN_DEPENDS}
-       ${GENSCRIPTS} coff_i860 "$(tdir_coff_i860)"
diff --git a/402-binutils-at90pwm161.patch b/402-binutils-at90pwm161.patch
deleted file mode 100644 (file)
index fce9da2..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-16 12:46:47.000000000 +0530
-+++ binutils/size.c    2011-12-16 15:05:18.000000000 +0530
-@@ -220,6 +220,7 @@ avr_device_t avr[] =
-       {"atxmega16d4",   AVR20K,  AVR2K,  AVR1K},
-       {"at76c711",      AVR16K,  AVR2K,  0UL},
-+      {"at90pwm161",    AVR16K,  AVR1K,  AVR512},
-       {"at90pwm216",    AVR16K,  AVR1K,  AVR512},
-       {"at90pwm316",    AVR16K,  AVR1K,  AVR512},
-       {"at90usb162",    AVR16K,  AVR512, AVR512},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-16 12:46:54.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-16 15:05:18.000000000 +0530
-@@ -161,6 +161,7 @@ static struct mcu_type_s mcu_types[] =
-   {"at90pwm3",   AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"at90pwm3b",  AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"at90pwm81",  AVR_ISA_AVR4,    bfd_mach_avr4},
-+  {"at90pwm161", AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega16",   AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega16a",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega161",  AVR_ISA_M161,    bfd_mach_avr5},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-16 12:46:47.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-16 15:05:18.000000000 +0530
-@@ -64,8 +64,8 @@ atmega88a, atmega88p, atmega88pa, atmega
- at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81).
- Instruction set avr5 is for the enhanced AVR core with up to 128K program
--memory space (MCU types: atmega16, atmega16a, atmega161, atmega162, atmega163,
--atmega164a, atmega164p, atmega165, atmega165a, atmega165p, atmega168,
-+memory space (MCU types: at90pwm161, atmega16, atmega16a, atmega161, atmega162,
-+atmega163, atmega164a, atmega164p, atmega165, atmega165a, atmega165p, atmega168, 
- atmega168a, atmega168p, atmega169, atmega169a, atmega169p, atmega169pa,
- atmega32, atmega323, atmega324a, atmega324p, atmega325, atmega325a, atmega325p,
- atmega325pa, atmega3250, atmega3250a, atmega3250p, atmega3250pa, atmega328,
-diff -Naurp ld/Makefile.in ld/Makefile.in
---- ld/Makefile.in     2011-12-16 12:46:47.000000000 +0530
-+++ ld/Makefile.in     2011-12-16 15:05:18.000000000 +0530
-@@ -476,6 +476,7 @@ ALL_EMULATION_SOURCES = \
-       eavrxmega5.c \
-       eavrxmega6.c \
-       eavrxmega7.c \
-+      eavrtiny10.c \
-       ecoff_i860.c \
-       ecoff_sparc.c \
-       ecrisaout.c \
-@@ -1075,6 +1076,14 @@ distclean-compile:
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr5.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr51.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavr6.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrtiny10.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega1.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega2.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega3.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega4.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega5.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega6.Po@am__quote@
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eavrxmega7.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecoff_i860.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecoff_sparc.Po@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecrisaout.Po@am__quote@
-@@ -2271,6 +2280,10 @@ eavrxmega7.c: $(srcdir)/emulparams/avrxm
-   $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-   ${GEN_DEPENDS}
-       ${GENSCRIPTS} avrxmega7 "$(tdir_avr2)"
-+eavrtiny10.c: $(srcdir)/emulparams/avrtiny10.sh \
-+  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-+  ${GEN_DEPENDS}
-+      ${GENSCRIPTS} avrtiny10 "$(tdir_avr2)"
- ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
-   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i860coff.sc ${GEN_DEPENDS}
-       ${GENSCRIPTS} coff_i860 "$(tdir_coff_i860)"
diff --git a/402-binutils-atmega26hvg.patch b/402-binutils-atmega26hvg.patch
new file mode 100644 (file)
index 0000000..0f733d9
--- /dev/null
@@ -0,0 +1,49 @@
+diff -Naurp binutils/size.c binutils/size.c
+--- binutils/size.c    2012-12-17 16:59:08.000000000 +0530
++++ binutils/size.c    2012-12-17 16:59:24.000000000 +0530
+@@ -100,6 +100,7 @@ static int return_code = 0;
+ #define AVR16K 16384UL
+ #define AVR20K 20480UL
+ #define AVR24K 24576UL
++#define AVR26K 26624UL
+ #define AVR32K 32768UL
+ #define AVR36K 36864UL
+ #define AVR40K 40960UL
+@@ -266,6 +267,8 @@ avr_device_t avr[] =
+       {"atmega32u4",    AVR32K,  2560UL, AVR1K},
+       {"atmega32u6",    AVR32K,  2560UL, AVR1K},
++      {"atmega26hvg",   AVR26K,  AVR1K,  AVR512},
++
+       {"at43usb355",    AVR24K,  1120UL,   0UL},
+       {"atxmega16a4",   AVR20K,  AVR2K,  AVR1K},
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2012-12-17 16:59:08.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-17 16:59:24.000000000 +0530
+@@ -241,6 +241,7 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega16hva2",AVR_ISA_AVR5,   bfd_mach_avr5},
+   {"atmega16hvb",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega16hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
++  {"atmega26hvg",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega32hvb",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega32hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
+   {"atmega48hvf",AVR_ISA_AVR5,    bfd_mach_avr5},
+diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
+--- gas/doc/c-avr.texi 2012-12-17 16:59:08.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-17 16:59:24.000000000 +0530
+@@ -78,10 +78,10 @@ atmega3290a, atmega3290p, atmega3290pa, 
+ atmega644pa, atmega645, atmega645a, atmega645p, atmega6450, atmega6450a,
+ atmega6450p, atmega649, atmega649a, atmega649p, atmega6490, atmega6490a,
+ atmega6490p, atmega16hva, atmega16hva2, atmega16hvb, atmega16hvbrevb, 
+-atmega32hvb, atmega48hvf, atmega32hvbrevb, atmega64hve, at90can32, at90can64,
+-at90pwm161,at90pwm216, at90pwm316, atmega32c1, atmega64c1, atmega16m1,
+-atmega32m1, atmega64m1, atmega16u4, atmega32u4, atmega32u6, at90usb646,
+-at90usb647, at94k, at90scr100, ata5790, ata5795).
++atmega26hvg, atmega32hvb, atmega48hvf, atmega32hvbrevb, atmega64hve, at90can32,
++at90can64, at90pwm161, at90pwm216, at90pwm316, atmega32c1, atmega64c1, atmega16m1,
++atmega32m1, atmega64m1, atmega16u4, atmega32u4, atmega32u6, at90usb646,at90usb647,
++at94k, at90scr100, ata5790, ata5795).
+ Instruction set avr51 is for the enhanced AVR core with exactly 128K program
+ memory space (MCU types: atmega128, atmega128a, atmega1280, atmega1281, 
similarity index 55%
rename from 425-binutils-atmxt224_224e.patch
rename to 403-binutils-atmxt224_224e.patch
index 435a34d457fc2ced49000cf7a97acaa039b083e1..67a5bddb3c41828098e1e955420b259da4adcf9e 100644 (file)
@@ -1,7 +1,7 @@
 diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-02-10 20:48:10.000000000 +0530
-+++ binutils/size.c    2012-02-10 20:49:19.000000000 +0530
-@@ -95,6 +95,7 @@ static int return_code = 0;
+--- binutils/size.c    2012-12-17 18:18:08.000000000 +0530
++++ binutils/size.c    2012-12-17 18:14:56.000000000 +0530
+@@ -96,6 +96,7 @@ static int return_code = 0;
  #define AVR2K 2048UL
  #define AVR4K 4096UL
  #define AVR8K 8192UL
@@ -9,7 +9,7 @@ diff -Naurp binutils/size.c binutils/size.c
  #define AVR14K 14336UL
  #define AVR16K 16384UL
  #define AVR20K 20480UL
-@@ -218,6 +219,8 @@ avr_device_t avr[] =
+@@ -225,6 +226,8 @@ avr_device_t avr[] =
  
        {"atmega406",     AVR40K,  AVR2K,  AVR512},
  
@@ -19,26 +19,27 @@ diff -Naurp binutils/size.c binutils/size.c
        {"atxmega32a4u",  AVR36K,  AVR4K,  AVR1K},
        {"atxmega32c4",   AVR36K,  AVR4K,  AVR1K},
 diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-02-10 20:48:10.000000000 +0530
-+++ gas/config/tc-avr.c        2012-02-10 20:49:19.000000000 +0530
-@@ -274,6 +274,8 @@ static struct mcu_type_s mcu_types[] =
+--- gas/config/tc-avr.c        2012-12-17 18:18:08.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-17 18:14:56.000000000 +0530
+@@ -280,6 +280,8 @@ static struct mcu_type_s mcu_types[] =
    {"atmega2561", AVR_ISA_AVR6,    bfd_mach_avr6},
-   {"atmega256rfa2", AVR_ISA_AVR6, bfd_mach_avr6},
    {"atmega256rfr2", AVR_ISA_AVR6, bfd_mach_avr6},
+   {"atmega2564rfr2",AVR_ISA_AVR6, bfd_mach_avr6},
 +  {"atmxt224",    AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
 +  {"atmxt224e",   AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
    {"atmxt336s",   AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
    {"atxmega16a4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega16a4u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega2},
+   {"atxmega16a4u",AVR_ISA_XMEGAU, bfd_mach_avrxmega2},
 diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-02-10 20:48:10.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-02-10 20:52:41.000000000 +0530
-@@ -89,7 +89,7 @@ atmega2560, atmega2561, atmega256rfa2, a
+--- gas/doc/c-avr.texi 2012-12-17 18:18:08.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-17 18:17:01.000000000 +0530
+@@ -94,7 +94,8 @@ atmega2560, atmega2561, atmega256rfr2).
  Instruction set avrxmega2 is for the XMEGA AVR core with 8K to 64K program
- memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u, atxmega16c4,
- atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, ,atxmega32c4, atxmega32d4, atxmega32x1,
--atmxt336s).
-+atmxt224, atmxt224e, atmxt336s).
+ memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u,
+ atxmega16c4, atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32c4, 
+-atxmega32d4, atxmega16e5, atxmega8e5, atxmega32e5, atxmega32x1, atmxt336s).
++atxmega32d4, atxmega16e5, atxmega8e5, atxmega32e5, atxmega32x1, atmxt224,
++atmxt224e, atmxt336s).
  
  Instruction set avrxmega3 is for the XMEGA AVR core with 8K to 64K program
  memory space and greater than 64K data space (MCU types: none).
diff --git a/403-binutils-new-devices.patch b/403-binutils-new-devices.patch
deleted file mode 100644 (file)
index 4de7af1..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-11-29 19:16:45.000000000 +0530
-+++ binutils/size.c    2011-11-29 19:20:58.000000000 +0530
-@@ -194,9 +194,11 @@ avr_device_t avr[] =
-       {"atmega325",     AVR32K,  AVR2K,  AVR1K},
-       {"atmega325a",    AVR32K,  AVR2K,  AVR1K},
-       {"atmega325p",    AVR32K,  AVR2K,  AVR1K},
-+      {"atmega325pa",   AVR32K,  AVR2K,  AVR1K},
-       {"atmega3250",    AVR32K,  AVR2K,  AVR1K},
-       {"atmega3250a",   AVR32K,  AVR2K,  AVR1K},
-       {"atmega3250p",   AVR32K,  AVR2K,  AVR1K},
-+      {"atmega3250pa",  AVR32K,  AVR2K,  AVR1K},
-       {"atmega328",     AVR32K,  AVR2K,  AVR1K},
-       {"atmega328p",    AVR32K,  AVR2K,  AVR1K},
-       {"atmega329",     AVR32K,  AVR2K,  AVR1K},
-@@ -206,9 +208,10 @@ avr_device_t avr[] =
-       {"atmega3290",    AVR32K,  AVR2K,  AVR1K},
-       {"atmega3290a",   AVR32K,  AVR2K,  AVR1K},
-       {"atmega3290p",   AVR32K,  AVR2K,  AVR1K},
-+      {"atmega3290pa",  AVR32K,  AVR2K,  AVR1K},
-       {"atmega32hvb",   AVR32K,  AVR2K,  AVR1K},
-+      {"atmega32hvbrevb",AVR32K, AVR2K,  AVR1K},
-       {"atmega32c1",    AVR32K,  AVR2K,  AVR1K},
--   {"atmega32hvb",   AVR32K,  AVR2K,  AVR1K},
-       {"atmega32m1",    AVR32K,  AVR2K,  AVR1K},
-       {"atmega32u2",    AVR32K,  AVR1K,  AVR1K},
-       {"atmega32u4",    AVR32K,  2560UL, AVR1K},
-@@ -244,7 +247,8 @@ avr_device_t avr[] =
-       {"atmega169pa",   AVR16K,  AVR1K,  AVR512},
-       {"atmega16hva",   AVR16K,  768UL,  AVR256},
-       {"atmega16hva2",  AVR16K,  AVR1K,  AVR256},
--   {"atmega16hvb",   AVR16K,  AVR1K,  AVR512},
-+        {"atmega16hvb",   AVR16K,  AVR1K,  AVR512},
-+        {"atmega16hvbrevb",AVR16K, AVR1K,  AVR512},
-       {"atmega16m1",    AVR16K,  AVR1K,  AVR512},
-       {"atmega16u2",    AVR16K,  AVR512, AVR512},
-       {"atmega16u4",    AVR16K,  1280UL, AVR512},
-diff -Naurp gas/doc/as.info gas/doc/as.info
---- gas/doc/as.info    2011-11-29 19:16:25.000000000 +0530
-+++ gas/doc/as.info    2011-11-29 19:20:58.000000000 +0530
-@@ -7248,7 +7248,7 @@ File: as.info,  Node: AVR Options,  Next
-      program memory space (MCU types: atmega16, atmega16a, atmega161,
-      atmega162, atmega163, atmega164a, atmega164p, atmega165,
-      atmega165a, atmega165p, atmega168, atmega168a, atmega168p,
--     atmega169, atmega169a, atmega169p, atmega169pa, atmega32,
-+     atmega169, atmega169a, atmega169p, atmega169pa, atmega16c1, atmega32,
-      atmega323, atmega324a, atmega324p, atmega325, atmega325a,
-      atmega325p, atmega325pa, atmega3250, atmega3250a, atmega3250p,
-      atmega3250pa, atmega328, atmega328p, atmega329, atmega329a,
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-11-29 19:16:45.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-11-29 19:20:43.000000000 +0530
-@@ -67,7 +67,7 @@ Instruction set avr5 is for the enhanced
- memory space (MCU types: at90pwm161, atmega16, atmega16a, atmega161, atmega162,
- atmega163, atmega164a, atmega164p, atmega165, atmega165a, atmega165p, atmega168, 
- atmega168a, atmega168p, atmega169, atmega169a, atmega169p, atmega169pa,
--atmega32, atmega323, atmega324a, atmega324p, atmega325, atmega325a, atmega325p,
-+atmega32, atmega323, atmega324a, atmega324p, atmega324pa, atmega325, atmega325a, atmega325p,
- atmega325pa, atmega3250, atmega3250a, atmega3250p, atmega3250pa, atmega328,
- atmega328p, atmega329, atmega329a, atmega329p, atmega329pa, atmega3290,
- atmega3290a, atmega3290p, atmega3290pa, atmega406, atmega64, atmega640,
diff --git a/404-binutils-atmxt112sl.patch b/404-binutils-atmxt112sl.patch
new file mode 100644 (file)
index 0000000..47b4259
--- /dev/null
@@ -0,0 +1,35 @@
+diff -Naurp binutils/size.c binutils/size.c
+--- binutils/size.c    2012-12-17 18:19:57.000000000 +0530
++++ binutils/size.c    2012-12-17 18:21:14.000000000 +0530
+@@ -224,6 +224,8 @@ avr_device_t avr[] =
+       
+       {"atmxt336s",     AVR52K,  AVR14K, 0UL},
++      {"atmxt112sl",    AVR48K,  AVR8K,  0UL},
++
+       {"atmega406",     AVR40K,  AVR2K,  AVR512},
+       {"atmxt224",      AVR36K,  AVR9K,  0UL},
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2012-12-17 18:19:57.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-17 18:21:14.000000000 +0530
+@@ -280,6 +280,7 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega2561", AVR_ISA_AVR6,    bfd_mach_avr6},
+   {"atmega256rfr2", AVR_ISA_AVR6, bfd_mach_avr6},
+   {"atmega2564rfr2",AVR_ISA_AVR6, bfd_mach_avr6},
++  {"atmxt112sl",  AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atmxt224",    AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atmxt224e",   AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atmxt336s",   AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
+--- gas/doc/c-avr.texi 2012-12-17 18:19:57.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-17 18:21:58.000000000 +0530
+@@ -95,7 +95,7 @@ Instruction set avrxmega2 is for the XME
+ memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u,
+ atxmega16c4, atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32c4, 
+ atxmega32d4, atxmega16e5, atxmega8e5, atxmega32e5, atxmega32x1, atmxt224,
+-atmxt224e, atmxt336s).
++atmxt224e, atmxt336s, atmxt112sl).
+ Instruction set avrxmega3 is for the XMEGA AVR core with 8K to 64K program
+ memory space and greater than 64K data space (MCU types: none).
diff --git a/404-binutils-attiny1634.patch b/404-binutils-attiny1634.patch
deleted file mode 100644 (file)
index ce08d47..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-16 15:12:22.000000000 +0530
-+++ binutils/size.c    2011-12-16 15:11:54.000000000 +0530
-@@ -250,6 +250,7 @@ avr_device_t avr[] =
-         {"atmega16hvb",   AVR16K,  AVR1K,  AVR512},
-         {"atmega16hvbrevb",AVR16K, AVR1K,  AVR512},
-       {"atmega16m1",    AVR16K,  AVR1K,  AVR512},
-+      {"attiny1634",    AVR16K,  AVR1K,  AVR256},
-       {"atmega16u2",    AVR16K,  AVR512, AVR512},
-       {"atmega16u4",    AVR16K,  1280UL, AVR512},
-       {"attiny167",     AVR16K,  AVR512, AVR512},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-16 15:05:18.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-16 15:11:54.000000000 +0530
-@@ -144,6 +144,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega8u2",  AVR_ISA_AVR35,   bfd_mach_avr35},
-   {"atmega16u2", AVR_ISA_AVR35,   bfd_mach_avr35},
-   {"atmega32u2", AVR_ISA_AVR35,   bfd_mach_avr35},
-+  {"attiny1634", AVR_ISA_AVR35,   bfd_mach_avr35},
-   {"atmega8",    AVR_ISA_M8,      bfd_mach_avr4},
-   {"atmega48",   AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"atmega48a",  AVR_ISA_AVR4,    bfd_mach_avr4},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-16 15:12:22.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-16 15:11:54.000000000 +0530
-@@ -55,8 +55,8 @@ Instruction set avr31 is for the classic
- memory space (MCU types: atmega103, at43usb320).
- Instruction set avr35 is for classic AVR core plus MOVW, CALL, and JMP
--instructions (MCU types: attiny167, at90usb82, at90usb162, atmega8u2,
--atmega16u2, atmega32u2).
-+instructions (MCU types: attiny167, attiny1634, at90usb82, at90usb162,
-+atmega8u2, atmega16u2, atmega32u2).
- Instruction set avr4 is for the enhanced AVR core with up to 8K program
- memory space (MCU types: atmega48, atmega48a, atmega48p, atmega8, atmega88,
diff --git a/405-binutils-atmega48pa.patch b/405-binutils-atmega48pa.patch
deleted file mode 100644 (file)
index 7054919..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-16 15:11:54.000000000 +0530
-+++ binutils/size.c    2011-12-16 15:16:27.000000000 +0530
-@@ -288,6 +288,7 @@ avr_device_t avr[] =
-       {"at90s4434",     AVR4K,   352UL,  AVR256},
-       {"atmega48",      AVR4K,   AVR512, AVR256},
-       {"atmega48a",     AVR4K,   AVR512, AVR256},
-+      {"atmega48pa",    AVR4K,   AVR512, AVR256},
-       {"atmega48p",     AVR4K,   AVR512, AVR256},
-       {"attiny4313",    AVR4K,   AVR256, AVR256},
-       {"attiny43u",     AVR4K,   AVR256, AVR64},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-16 15:11:54.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-16 15:16:27.000000000 +0530
-@@ -148,6 +148,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega8",    AVR_ISA_M8,      bfd_mach_avr4},
-   {"atmega48",   AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"atmega48a",  AVR_ISA_AVR4,    bfd_mach_avr4},
-+  {"atmega48pa", AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"atmega48p",  AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"atmega88",   AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"atmega88a",  AVR_ISA_AVR4,    bfd_mach_avr4},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-16 15:11:54.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-16 15:16:27.000000000 +0530
-@@ -59,9 +59,9 @@ instructions (MCU types: attiny167, atti
- atmega8u2, atmega16u2, atmega32u2).
- Instruction set avr4 is for the enhanced AVR core with up to 8K program
--memory space (MCU types: atmega48, atmega48a, atmega48p, atmega8, atmega88,
--atmega88a, atmega88p, atmega88pa, atmega8515, atmega8535, atmega8hva, at90pwm1,
--at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81).
-+memory space (MCU types: atmega48, atmega48a, atmega48pa, atmega48p, atmega8,
-+atmega88, atmega88a, atmega88p, atmega88pa, atmega8515, atmega8535, atmega8hva,
-+at90pwm1, at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81).
- Instruction set avr5 is for the enhanced AVR core with up to 128K program
- memory space (MCU types: at90pwm161, atmega16, atmega16a, atmega161, atmega162,
diff --git a/405-binutils-atmxt540s.patch b/405-binutils-atmxt540s.patch
new file mode 100644 (file)
index 0000000..89a3a86
--- /dev/null
@@ -0,0 +1,51 @@
+diff -Naurp binutils/size.c binutils/size.c
+--- binutils/size.c    2012-12-17 18:23:28.000000000 +0530
++++ binutils/size.c    2012-12-17 18:23:52.000000000 +0530
+@@ -97,6 +97,7 @@ static int return_code = 0;
+ #define AVR4K 4096UL
+ #define AVR8K 8192UL
+ #define AVR9K 9216UL
++#define AVR10K 10240UL
+ #define AVR14K 14336UL
+ #define AVR16K 16384UL
+ #define AVR20K 20480UL
+@@ -152,6 +153,9 @@ avr_device_t avr[] =
+       {"atmega128rfr2", AVR128K, AVR16K, AVR4K},
+       {"atmega1284rfr2",AVR128K, AVR16K, AVR4K},
+  
++      {"atmxt540s",     AVR136K, AVR10K, 0UL},
++      {"atmxt540sreva",AVR136K, AVR10K, 0UL},
++
+       {"atxmega128a1",  AVR136K, AVR8K,  AVR2K},
+       {"atxmega128a1u", AVR136K, AVR8K,  AVR2K},
+       {"atxmega128a4u", AVR136K, AVR8K,  AVR2K},
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2012-12-17 18:23:28.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-17 18:23:52.000000000 +0530
+@@ -314,6 +314,8 @@ static struct mcu_type_s mcu_types[] =
+   {"atxmega128c3", AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
+   {"atxmega128d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
+   {"atxmega128d4", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
++  {"atmxt540s",    AVR_ISA_XMEGA, bfd_mach_avrxmega6},
++  {"atmxt540sreva", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
+   {"atxmega192a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
+   {"atxmega192a3u",AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
+   {"atxmega192c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
+diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
+--- gas/doc/c-avr.texi 2012-12-17 18:23:28.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-17 18:23:52.000000000 +0530
+@@ -110,10 +110,10 @@ atxmega64a1u).
+ Instruction set avrxmega6 is for the XMEGA AVR core with larger than 64K program
+ memory space and less than 64K data space (MCU types: atxmega128a3, 
+-atxmega128a3u, atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, 
+-atxmega192a3u, atxmega128b1, atxmega128b3, atxmega192c3, atxmega192d3, 
+-atxmega256a3, atxmega256a3u, atxmega256a3b, atxmega256a3bu, atxmega256c3, 
+-atxmega256d3, atxmega384c3, atxmega256d3).
++atxmega128a3u, atxmega128c3, atxmega128d3, atxmega128d4, atmxt540s, 
++atmxt540sreva, atxmega192a3, atxmega192a3u, atxmega128b1, atxmega128b3, 
++atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3u, atxmega256a3b,
++atxmega256a3bu, atxmega256c3, atxmega256d3, atxmega384c3, atxmega256d3).
+ Instruction set avrxmega7 is for the XMEGA AVR core with larger than 64K program
+ memory space and greater than 64K data space (MCU types: atxmega128a1,
similarity index 75%
rename from 434-binutils-ata5831.patch
rename to 406-binutils-ata5831.patch
index 28165320bd55d00c4ee45d935be4efd18774d12c..30b62f68d26d5624dd54f6a1201d729774fb05c4 100644 (file)
@@ -1,59 +1,40 @@
 diff -Naurp bfd/archures.c bfd/archures.c
---- bfd/archures.c     2012-07-03 11:35:37.000000000 +0530
-+++ bfd/archures.c     2012-07-03 11:38:04.000000000 +0530
-@@ -381,6 +381,7 @@ DESCRIPTION
+--- bfd/archures.c     2012-12-17 19:41:58.000000000 +0530
++++ bfd/archures.c     2012-12-17 19:38:58.000000000 +0530
+@@ -391,6 +391,7 @@ DESCRIPTION
  .#define bfd_mach_avr5                5
  .#define bfd_mach_avr51               51
  .#define bfd_mach_avr6                6
 +.#define bfd_mach_avr7                7
+ .#define bfd_mach_avrtiny   90
  .#define bfd_mach_avrxmega1 101
  .#define bfd_mach_avrxmega2 102
- .#define bfd_mach_avrxmega3 103
 diff -Naurp bfd/cpu-avr.c bfd/cpu-avr.c
---- bfd/cpu-avr.c      2012-07-03 11:35:37.000000000 +0530
-+++ bfd/cpu-avr.c      2012-07-03 11:38:04.000000000 +0530
-@@ -134,27 +134,30 @@ static const bfd_arch_info_type arch_inf
+--- bfd/cpu-avr.c      2012-12-17 19:41:58.000000000 +0530
++++ bfd/cpu-avr.c      2012-12-17 19:38:58.000000000 +0530
+@@ -135,7 +135,7 @@ static const bfd_arch_info_type arch_inf
  
    /* 3-Byte PC.  */
    N (22, bfd_mach_avr6, "avr:6", FALSE, & arch_info_struct[10]),
-+
-+  /* 20K flash. starts at 0x8000 */
-+  N (16, bfd_mach_avr7, "avr:7", FALSE, & arch_info_struct[11]),
-   
-   /* Xmega 1 */
--  N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[11]),
-+  N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[12]),
+-
++    
+   /* Tiny core (ATTiny10 & similar) */
+   N (16, bfd_mach_avrtiny, "avr:90", FALSE, & arch_info_struct[11]),
  
-   /* Xmega 2 */
--  N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[12]),
-+  N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[13]),
-   
-   /* Xmega 3 */
--  N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[13]),
-+  N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[14]),
-   
-   /* Xmega 4 */
--  N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[14]),
-+  N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[15]),
-   
-   /* Xmega 5 */
--  N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[15]),
-+  N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[16]),
+@@ -156,6 +156,9 @@ static const bfd_arch_info_type arch_inf
    
    /* Xmega 6 */
--  N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[16]),
-+  N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[17]),
+   N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[17]),
++ 
++  /* 20K flash. starts at 0x8000 */
++  N (16, bfd_mach_avr7, "avr:7", FALSE, & arch_info_struct[18]),
    
    /* Xmega 7 */
--  N (24, bfd_mach_avrxmega7, "avr:107", FALSE, & arch_info_struct[17]),
-+  N (24, bfd_mach_avrxmega7, "avr:107", FALSE, & arch_info_struct[18]),
-   
-   /* attiny 10 */
-   N (16, bfd_mach_avrtiny10, "avr:201", FALSE, NULL)
+   N (24, bfd_mach_avrxmega7, "avr:107", FALSE, NULL)
 diff -Naurp bfd/elf32-avr.c bfd/elf32-avr.c
---- bfd/elf32-avr.c    2012-07-03 11:35:37.000000000 +0530
-+++ bfd/elf32-avr.c    2012-07-03 11:38:04.000000000 +0530
-@@ -1299,6 +1299,10 @@ bfd_elf_avr_final_write_processing (bfd 
+--- bfd/elf32-avr.c    2012-12-17 19:41:58.000000000 +0530
++++ bfd/elf32-avr.c    2012-12-17 19:38:58.000000000 +0530
+@@ -1445,6 +1445,10 @@ bfd_elf_avr_final_write_processing (bfd 
        val = E_AVR_MACH_AVR6;
        break;
  
@@ -64,7 +45,7 @@ diff -Naurp bfd/elf32-avr.c bfd/elf32-avr.c
      case bfd_mach_avrxmega1:
        val = E_AVR_MACH_XMEGA1;
        break;
-@@ -1393,6 +1397,10 @@ elf32_avr_object_p (bfd *abfd)
+@@ -1539,6 +1543,10 @@ elf32_avr_object_p (bfd *abfd)
          e_set = bfd_mach_avr6;
          break;
  
@@ -76,9 +57,9 @@ diff -Naurp bfd/elf32-avr.c bfd/elf32-avr.c
          e_set = bfd_mach_avrxmega1;
          break;
 diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-07-03 11:36:50.000000000 +0530
-+++ binutils/size.c    2012-07-03 11:38:04.000000000 +0530
-@@ -283,6 +283,8 @@ avr_device_t avr[] =
+--- binutils/size.c    2012-12-17 19:42:20.000000000 +0530
++++ binutils/size.c    2012-12-17 19:38:58.000000000 +0530
+@@ -285,6 +285,8 @@ avr_device_t avr[] =
        {"atxmega16c4",   AVR20K,  AVR2K,  AVR1K},
        {"atxmega16d4",   AVR20K,  AVR2K,  AVR1K},
  
@@ -88,9 +69,9 @@ diff -Naurp binutils/size.c binutils/size.c
        {"at90pwm161",    AVR16K,  AVR1K,  AVR512},
        {"at90pwm216",    AVR16K,  AVR1K,  AVR512},
 diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-07-03 11:36:50.000000000 +0530
-+++ gas/config/tc-avr.c        2012-07-03 11:38:04.000000000 +0530
-@@ -83,6 +83,7 @@ static struct mcu_type_s mcu_types[] =
+--- gas/config/tc-avr.c        2012-12-17 19:42:20.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-17 19:40:09.000000000 +0530
+@@ -82,6 +82,7 @@ static struct mcu_type_s mcu_types[] =
    {"avr5",       AVR_ISA_AVR51,   bfd_mach_avr5},
    {"avr51",      AVR_ISA_AVR51,   bfd_mach_avr51},
    {"avr6",       AVR_ISA_AVR6,    bfd_mach_avr6},
@@ -98,74 +79,74 @@ diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
    {"avrxmega1",  AVR_ISA_XMEGA,   bfd_mach_avrxmega1},
    {"avrxmega2",  AVR_ISA_XMEGA,   bfd_mach_avrxmega2},
    {"avrxmega3",  AVR_ISA_XMEGA,   bfd_mach_avrxmega3},
-@@ -282,6 +283,7 @@ static struct mcu_type_s mcu_types[] =
+@@ -280,6 +281,7 @@ static struct mcu_type_s mcu_types[] =
    {"atmega2561", AVR_ISA_AVR6,    bfd_mach_avr6},
-   {"atmega256rfa2", AVR_ISA_AVR6, bfd_mach_avr6},
    {"atmega256rfr2", AVR_ISA_AVR6, bfd_mach_avr6},
+   {"atmega2564rfr2",AVR_ISA_AVR6, bfd_mach_avr6},
 +  {"ata5831",    AVR_ISA_AVR7, bfd_mach_avr7},
    {"atmxt112sl",  AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
    {"atmxt224",    AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
    {"atmxt224e",   AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-@@ -514,6 +516,8 @@ md_show_usage (FILE *stream)
+@@ -519,6 +521,8 @@ md_show_usage (FILE *stream)
        "                   avr5  - enhanced AVR core with up to 64K program memory\n"
        "                   avr51 - enhanced AVR core with up to 128K program memory\n"
        "                   avr6  - enhanced AVR core with up to 256K program memory\n"
-+      "                   avr7  - enhanced AVR core with up to 20K program memory\n"
-+      "                           flash starting address is not zero\n"
++      "                   avr7  - enhanced AVR core with up to 20K program memory\n"
++      "                           flash starting address is not zero\n"
        "                   avrxmega2 - XMEGA, > 8K, < 64K FLASH, < 64K RAM\n"
        "                   avrxmega3 - XMEGA, > 8K, <= 64K FLASH, > 64K RAM\n"
        "                   avrxmega4 - XMEGA, > 64K, <= 128K FLASH, <= 64K RAM\n"
 diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-07-03 11:36:50.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-07-03 11:38:04.000000000 +0530
-@@ -87,6 +87,9 @@ atmega128rfa1, atmega128rfa2, atmega128r
+--- gas/doc/c-avr.texi 2012-12-17 19:42:20.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-17 19:38:58.000000000 +0530
+@@ -91,6 +91,9 @@ at90usb1287, m3000).
  Instruction set avr6 is for the enhanced AVR core with a 3-byte PC (MCU types:
- atmega2560, atmega2561, atmega256rfa2, atmega256rfr2).
+ atmega2560, atmega2561, atmega256rfr2, atmega2564rfr2).
  
 +Instruction set avr7 is for the enhanced AVR core with 20K flash which starts
 +from 0x8000 (MCU types: ata5831)
 +
  Instruction set avrxmega2 is for the XMEGA AVR core with 8K to 64K program
- memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u, atxmega16c4,
- atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, ,atxmega32c4, atxmega32d4,
+ memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u,
+ atxmega16c4, atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32c4, 
 diff -Naurp include/elf/avr.h include/elf/avr.h
---- include/elf/avr.h  2012-07-03 11:35:37.000000000 +0530
-+++ include/elf/avr.h  2012-07-03 11:38:04.000000000 +0530
-@@ -40,6 +40,7 @@
- #define E_AVR_MACH_AVR5 5
- #define E_AVR_MACH_AVR51 51
- #define E_AVR_MACH_AVR6 6 
-+#define E_AVR_MACH_AVR7 7 
- #define E_AVR_MACH_XMEGA1 101
- #define E_AVR_MACH_XMEGA2 102
- #define E_AVR_MACH_XMEGA3 103
+--- include/elf/avr.h  2012-12-17 19:41:58.000000000 +0530
++++ include/elf/avr.h  2012-12-17 19:38:58.000000000 +0530
+@@ -41,6 +41,7 @@
+ #define E_AVR_MACH_AVR5     5
+ #define E_AVR_MACH_AVR51   51
+ #define E_AVR_MACH_AVR6     
++#define E_AVR_MACH_AVR7     
+ #define E_AVR_MACH_AVRTINY 90
+ #define E_AVR_MACH_XMEGA1  101
+ #define E_AVR_MACH_XMEGA2  102
 diff -Naurp include/opcode/avr.h include/opcode/avr.h
---- include/opcode/avr.h       2012-07-03 11:35:37.000000000 +0530
-+++ include/opcode/avr.h       2012-07-03 11:38:04.000000000 +0530
-@@ -72,6 +72,8 @@
+--- include/opcode/avr.h       2012-12-17 19:41:58.000000000 +0530
++++ include/opcode/avr.h       2012-12-17 19:38:58.000000000 +0530
+@@ -74,6 +74,8 @@
                          AVR_ISA_ELPM | AVR_ISA_ELPMX | AVR_ISA_SPM | \
                          AVR_ISA_BRK | AVR_ISA_EIND | AVR_ISA_MOVW)
  
 +#define AVR_ISA_AVR7   (AVR_ISA_M8 | AVR_ISA_MEGA | AVR_ISA_BRK )
-+
- #define AVR_ISA_AVRTINY10 (AVR_ISA_1200 | AVR_ISA_BRK | AVR_ISA_SRAM)
++ 
+ #define AVR_ISA_AVRTINY (AVR_ISA_1200 | AVR_ISA_BRK | AVR_ISA_SRAM | \
+                          AVR_ISA_TINY)
  
- #define REGISTER_P(x) ((x) == 'r'             \
 diff -Naurp ld/configure.tgt ld/configure.tgt
---- ld/configure.tgt   2012-07-03 11:35:37.000000000 +0530
-+++ ld/configure.tgt   2012-07-03 11:38:04.000000000 +0530
-@@ -98,7 +98,7 @@ arm*-*-uclinux*)     targ_emul=armelf_linux
+--- ld/configure.tgt   2012-12-17 19:41:58.000000000 +0530
++++ ld/configure.tgt   2012-12-17 19:38:58.000000000 +0530
+@@ -118,7 +118,7 @@ arm*-*-uclinux*)   targ_emul=armelf_linux
  arm-*-vxworks)                targ_emul=armelf_vxworks ;;
  arm*-*-conix*)                targ_emul=armelf ;;
  avr-*-*)              targ_emul=avr2
--                      targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny10"
-+                      targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avr7 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny10"
+-                      targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny"
++                      targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avr7 avrxmega1 avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny"
                        ;;
  bfin-*-elf)           targ_emul=elf32bfin;
                        targ_extra_emuls="elf32bfinfd"
 diff -Naurp ld/emulparams/avr7.sh ld/emulparams/avr7.sh
 --- ld/emulparams/avr7.sh      1970-01-01 05:30:00.000000000 +0530
-+++ ld/emulparams/avr7.sh      2012-07-03 11:38:04.000000000 +0530
++++ ld/emulparams/avr7.sh      2012-12-17 19:38:58.000000000 +0530
 @@ -0,0 +1,13 @@
 +ARCH=avr:7
 +MACHINE=
@@ -181,9 +162,9 @@ diff -Naurp ld/emulparams/avr7.sh ld/emulparams/avr7.sh
 +DATA_LENGTH=0x400
 +EXTRA_EM_FILE=avrelf
 diff -Naurp ld/Makefile.am ld/Makefile.am
---- ld/Makefile.am     2012-07-03 11:35:37.000000000 +0530
-+++ ld/Makefile.am     2012-07-03 11:38:04.000000000 +0530
-@@ -163,6 +163,7 @@ ALL_EMULATION_SOURCES = \
+--- ld/Makefile.am     2012-12-17 19:41:58.000000000 +0530
++++ ld/Makefile.am     2012-12-17 19:38:58.000000000 +0530
+@@ -165,6 +165,7 @@ ALL_EMULATION_SOURCES = \
        eavr5.c \
        eavr51.c \
        eavr6.c \
@@ -191,7 +172,7 @@ diff -Naurp ld/Makefile.am ld/Makefile.am
        eavrxmega1.c \
        eavrxmega2.c \
        eavrxmega3.c \
-@@ -791,6 +792,10 @@ eavr6.c: $(srcdir)/emulparams/avr6.sh $(
+@@ -820,6 +821,10 @@ eavr6.c: $(srcdir)/emulparams/avr6.sh $(
    $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
    ${GEN_DEPENDS}
        ${GENSCRIPTS} avr6 "$(tdir_avr2)"
@@ -204,7 +185,7 @@ diff -Naurp ld/Makefile.am ld/Makefile.am
    ${GEN_DEPENDS}
 diff -Naurp ld/scripttempl/avr7.sc ld/scripttempl/avr7.sc
 --- ld/scripttempl/avr7.sc     1970-01-01 05:30:00.000000000 +0530
-+++ ld/scripttempl/avr7.sc     2012-07-03 11:38:04.000000000 +0530
++++ ld/scripttempl/avr7.sc     2012-12-17 19:38:58.000000000 +0530
 @@ -0,0 +1,255 @@
 +cat <<EOF
 +OUTPUT_FORMAT("${OUTPUT_FORMAT}","${OUTPUT_FORMAT}","${OUTPUT_FORMAT}")
diff --git a/406-binutils-atxmega_16_32_a4u.patch b/406-binutils-atxmega_16_32_a4u.patch
deleted file mode 100644 (file)
index 62f1ec2..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-22 12:06:57.000000000 +0530
-+++ binutils/size.c    2011-12-22 12:07:20.000000000 +0530
-@@ -177,11 +177,12 @@ avr_device_t avr[] =
-       {"atmega64c1",    AVR64K,  AVR4K,  AVR2K},
-       {"atmega64hve",   AVR64K,  AVR4K,  AVR1K},
-       {"atmega64m1",    AVR64K,  AVR4K,  AVR2K},
--   {"m3000",         AVR64K,  AVR4K,  0UL},
-+      {"m3000",         AVR64K,  AVR4K,  0UL},
-       {"atmega406",     AVR40K,  AVR2K,  AVR512},
-       {"atxmega32a4",   AVR36K,  AVR4K,  AVR1K},
-+      {"atxmega32a4u",  AVR36K,  AVR4K,  AVR1K},
-       {"atxmega32d4",   AVR36K,  AVR4K,  AVR1K},
-       {"at90can32",     AVR32K,  AVR2K,  AVR1K},
-@@ -220,6 +221,7 @@ avr_device_t avr[] =
-       {"at43usb355",    AVR24K,  1120UL,   0UL},
-       {"atxmega16a4",   AVR20K,  AVR2K,  AVR1K},
-+        {"atxmega16a4u",  AVR20K,  AVR2K,  AVR1K},
-       {"atxmega16d4",   AVR20K,  AVR2K,  AVR1K},
-       {"at76c711",      AVR16K,  AVR2K,  0UL},
-@@ -304,7 +306,7 @@ avr_device_t avr[] =
-       {"at90s2323",     AVR2K,   AVR128, AVR128},
-       {"at90s2333",     AVR2K,   224UL,  AVR128},
-       {"at90s2343",     AVR2K,   AVR128, AVR128},
--   {"attiny20",      AVR2K,   AVR128, 0UL},
-+      {"attiny20",      AVR2K,   AVR128, 0UL},
-       {"attiny22",      AVR2K,   224UL,  AVR128},
-       {"attiny2313",    AVR2K,   AVR128, AVR128},
-       {"attiny2313a",   AVR2K,   AVR128, AVR128},
-@@ -315,19 +317,19 @@ avr_device_t avr[] =
-       {"attiny261",     AVR2K,   AVR128, AVR128},
-       {"attiny261a",    AVR2K,   AVR128, AVR128},
-       {"attiny28",      AVR2K,   0UL,    0UL},
--   {"attiny40",      AVR2K,   AVR256, 0UL},
-+      {"attiny40",      AVR2K,   AVR256, 0UL},
-       {"at90s1200",     AVR1K,   0UL,    AVR64},
--   {"attiny9",       AVR1K,   32UL,   0UL},
--   {"attiny10",      AVR1K,   32UL,   0UL},
-+      {"attiny9",       AVR1K,   32UL,   0UL},
-+      {"attiny10",      AVR1K,   32UL,   0UL},
-       {"attiny11",      AVR1K,   0UL,    AVR64},
-       {"attiny12",      AVR1K,   0UL,    AVR64},
-       {"attiny13",      AVR1K,   AVR64,  AVR64},
-       {"attiny13a",     AVR1K,   AVR64,  AVR64},
-       {"attiny15",      AVR1K,   0UL,    AVR64},
--   {"attiny4",       AVR512,  32UL,   0UL},
--   {"attiny5",       AVR512,  32UL,   0UL},
-+      {"attiny4",       AVR512,  32UL,   0UL},
-+      {"attiny5",       AVR512,  32UL,   0UL},
- };
- static char *avrmcu = NULL;
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-22 12:06:57.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-22 12:09:01.000000000 +0530
-@@ -259,9 +259,11 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega2560", AVR_ISA_AVR6,    bfd_mach_avr6},
-   {"atmega2561", AVR_ISA_AVR6,    bfd_mach_avr6},
-   {"atxmega16a4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-+  {"atxmega16a4u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega2},
-   {"atxmega16d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega16x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega32a4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-+  {"atxmega32a4u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega2},
-   {"atxmega32d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega32x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega64a3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-22 12:06:57.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-22 12:07:20.000000000 +0530
-@@ -87,8 +87,8 @@ Instruction set avr6 is for the enhanced
- atmega2560, atmega2561).
- Instruction set avrxmega2 is for the XMEGA AVR core with 8K to 64K program
--memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16d4,
--atxmega16x1, atxmega32a4, atxmega32d4, atxmega32x1).
-+memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u,
-+atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32d4, atxmega32x1).
- Instruction set avrxmega3 is for the XMEGA AVR core with 8K to 64K program
- memory space and greater than 64K data space (MCU types: none).
similarity index 69%
rename from 435-binutils-attiny841.patch
rename to 407-binutils-attiny841.patch
index 93e12c749b153c2cd517e9e87a5bb83c5225d48e..65b49e8942f699d172aebaf18a13547328a5753f 100644 (file)
@@ -1,7 +1,7 @@
 diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-07-16 17:08:19.000000000 +0530
-+++ binutils/size.c    2012-07-16 17:07:34.000000000 +0530
-@@ -346,6 +346,7 @@ avr_device_t avr[] =
+--- binutils/size.c    2012-12-17 18:26:59.000000000 +0530
++++ binutils/size.c    2012-12-17 18:27:19.000000000 +0530
+@@ -348,6 +348,7 @@ avr_device_t avr[] =
        {"atmega8u2",     AVR8K,   AVR512, AVR512},
        {"attiny84",      AVR8K,   AVR512, AVR512},
        {"attiny84a",     AVR8K,   AVR512, AVR512},
@@ -10,9 +10,9 @@ diff -Naurp binutils/size.c binutils/size.c
        {"attiny861",     AVR8K,   AVR512, AVR512},
        {"attiny861a",    AVR8K,   AVR512, AVR512},
 diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-07-16 17:08:19.000000000 +0530
-+++ gas/config/tc-avr.c        2012-07-16 17:07:34.000000000 +0530
-@@ -124,6 +124,7 @@ static struct mcu_type_s mcu_types[] =
+--- gas/config/tc-avr.c        2012-12-17 18:26:59.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-17 18:27:19.000000000 +0530
+@@ -123,6 +123,7 @@ static struct mcu_type_s mcu_types[] =
    {"attiny25",   AVR_ISA_AVR25,   bfd_mach_avr25},
    {"attiny45",   AVR_ISA_AVR25,   bfd_mach_avr25},
    {"attiny85",   AVR_ISA_AVR25,   bfd_mach_avr25},
@@ -21,14 +21,14 @@ diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
    {"attiny261a", AVR_ISA_AVR25,   bfd_mach_avr25},
    {"attiny461",  AVR_ISA_AVR25,   bfd_mach_avr25},
 diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-07-16 17:08:19.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-07-16 17:07:34.000000000 +0530
+--- gas/doc/c-avr.texi 2012-12-17 18:26:59.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-17 18:27:19.000000000 +0530
 @@ -46,7 +46,7 @@ space plus the MOVW instruction (MCU typ
  attiny2313a, attiny24, attiny24a, attiny4313, attiny44, attiny44a, attiny84,
  attiny84a, attiny25, attiny45, attiny85, attiny261, attiny261a, attiny461,
  attiny461a, attiny861, attiny861a, attiny87, attiny43u, attiny48, attiny88,
--attiny828, at86rf401, ata6289, ata5272).
-+attiny828, attiny841, at86rf401, ata6289, ata5272).
+-attiny828, at86rf401, ata5272).
++attiny828, attiny841, at86rf401, ata5272).
  
  Instruction set avr3 is for the classic AVR core with up to 128K program
  memory space (MCU types: at43usb355, at76c711).
diff --git a/407-binutils-atxmega64_128_192_256a3u.patch b/407-binutils-atxmega64_128_192_256a3u.patch
deleted file mode 100644 (file)
index 6937975..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-05-24 11:59:06.000000000 +0530
-+++ binutils/size.c    2012-05-24 11:58:37.000000000 +0530
-@@ -120,6 +120,7 @@ typedef struct
- avr_device_t avr[] =
- {
-       {"atxmega256a3",  AVR264K, AVR16K, AVR4K},
-+      {"atxmega256a3u", AVR264K, AVR16K, AVR4K},
-       {"atxmega256a3b", AVR264K, AVR16K, AVR4K},
-       {"atxmega256a3bu",AVR264K, AVR16K, AVR4K},
-       {"atxmega256d3",  AVR264K, AVR16K, AVR4K},
-@@ -128,11 +129,13 @@ avr_device_t avr[] =
-       {"atmega2561",    AVR256K, AVR8K,  AVR4K},
-       {"atxmega192a3",  AVR200K, AVR16K, AVR2K},
-+      {"atxmega192a3u", AVR200K, AVR16K, AVR2K},
-       {"atxmega192d3",  AVR200K, AVR16K, AVR2K},
-       {"atxmega128a1",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a1u", AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a3",  AVR136K, AVR8K,  AVR2K},
-+      {"atxmega128a3u", AVR136K, AVR8K,  AVR2K},
-       {"atxmega128b1",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128d3",  AVR136K, AVR8K,  AVR2K},
-@@ -150,6 +153,7 @@ avr_device_t avr[] =
-       {"atxmega64a1",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64a1u",  AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64a3",   AVR68K,  AVR4K,  AVR2K},
-+      {"atxmega64a3u",  AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64d3",   AVR68K,  AVR4K,  AVR2K},
-       {"at90can64",     AVR64K,  AVR4K,  AVR2K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-05-24 11:59:06.000000000 +0530
-+++ gas/config/tc-avr.c        2012-05-24 12:22:35.000000000 +0530
-@@ -267,15 +267,19 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega32d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega32x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega64a3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-+  {"atxmega64a3u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-   {"atxmega64d3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64a1", AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
-   {"atxmega64a1u",AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
-   {"atxmega128a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-+  {"atxmega128a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128b1", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-+  {"atxmega192a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega192d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega256a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-+  {"atxmega256a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega256a3b",AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega256a3bu",AVR_ISA_XMEGA,bfd_mach_avrxmega6},
-   {"atxmega256d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-05-24 11:59:06.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-05-24 11:58:37.000000000 +0530
-@@ -94,16 +94,16 @@ Instruction set avrxmega3 is for the XME
- memory space and greater than 64K data space (MCU types: none).
- Instruction set avrxmega4 is for the XMEGA AVR core with up to 64K program
--memory space and less than 64K data space (MCU types: atxmega64a3, atxmega64d3).
-+memory space and less than 64K data space (MCU types: atxmega64a3, atxmega64a3u, atxmega64d3).
- Instruction set avrxmega5 is for the XMEGA AVR core with up to 64K program 
- memory space and greater than 64K data space (MCU types: atxmega64a1,
- atxmega64a1u).
- Instruction set avrxmega6 is for the XMEGA AVR core with up to 256K program
--memory space and less than 64K data space (MCU types: atxmega128a3,
--atxmega128d3, atxmega192a3, atxmega128b1, atxmega192d3, atxmega256a3, 
--atxmega256a3b, atxmega256a3bu).
-+memory space and less than 64K data space (MCU types: atxmega128a3, atxmega128a3u,
-+atxmega128d3, atxmega192a3, atxmega192a3u, atxmega128b1, atxmega192d3, atxmega256a3,
-+atxmega256a3u, atxmega256a3b, atxmega256a3bu).
- Instruction set avrxmega7 is for the XMEGA AVR core with up to 256K program
- memory space and greater than 64K data space (MCU types: atxmega128a1,
diff --git a/408-binutils-atmegarfa2.patch b/408-binutils-atmegarfa2.patch
new file mode 100644 (file)
index 0000000..750966d
--- /dev/null
@@ -0,0 +1,87 @@
+diff -Naurp binutils/size.c binutils/size.c
+--- binutils/size.c    2012-12-10 14:52:39.000000000 +0530
++++ binutils/size.c    2012-12-10 16:33:08.000000000 +0530
+@@ -132,6 +132,7 @@ avr_device_t avr[] =
+  
+       {"atxmega384d3",  AVR384K, AVR16K, AVR4K},
+   
++      {"atmega256rfa2", AVR256K, AVR32K, AVR8K},
+       {"atmega256rfr2", AVR256K, AVR32K, AVR8K},
+       {"atmega2564rfr2",AVR256K, AVR32K, AVR8K},
+  
+@@ -150,6 +151,7 @@ avr_device_t avr[] =
+       {"atxmega192c3",  AVR200K, AVR16K, AVR2K},
+       {"atxmega192d3",  AVR200K, AVR16K, AVR2K},
+   
++      {"atmega128rfa2", AVR128K, AVR16K, AVR4K},
+       {"atmega128rfr2", AVR128K, AVR16K, AVR4K},
+       {"atmega1284rfr2",AVR128K, AVR16K, AVR4K},
+  
+@@ -191,6 +193,7 @@ avr_device_t avr[] =
+       {"atxmega64d3",   AVR68K,  AVR4K,  AVR2K},
+       {"atxmega64d4",   AVR68K,  AVR4K,  AVR2K},
++      {"atmega64rfa2",  AVR64K,  AVR8K,  AVR2K},
+       {"atmega64rfr2",  AVR64K,  AVR8K,  AVR2K},
+       {"atmega644rfr2", AVR64K,  AVR8K,  AVR2K},
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2012-12-10 14:52:39.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-10 16:35:12.000000000 +0530
+@@ -218,6 +218,7 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega3290p",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega3290pa",AVR_ISA_AVR5,   bfd_mach_avr5},
+   {"atmega406",  AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"atmega64rfa2", AVR_ISA_AVR5,  bfd_mach_avr5},
+   {"atmega64rfr2", AVR_ISA_AVR5,  bfd_mach_avr5},
+   {"atmega644rfr2",AVR_ISA_AVR5,  bfd_mach_avr5},
+   {"atmega64",   AVR_ISA_AVR5,    bfd_mach_avr5},
+@@ -273,13 +274,15 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega1284", AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"atmega1284p",AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"atmega128rfa1",AVR_ISA_AVR51, bfd_mach_avr51},
++  {"atmega128rfa2",AVR_ISA_AVR51, bfd_mach_avr51},
+   {"atmega128rfr2",AVR_ISA_AVR51, bfd_mach_avr51},
+   {"atmega1284rfr2",AVR_ISA_AVR51, bfd_mach_avr51},
+   {"at90can128", AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"at90usb1286",AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"at90usb1287",AVR_ISA_AVR51,   bfd_mach_avr51},
+   {"atmega2560", AVR_ISA_AVR6,    bfd_mach_avr6},
+   {"atmega2561", AVR_ISA_AVR6,    bfd_mach_avr6},
++  {"atmega256rfa2", AVR_ISA_AVR6, bfd_mach_avr6},
+   {"atmega256rfr2", AVR_ISA_AVR6, bfd_mach_avr6},
+   {"atmega2564rfr2",AVR_ISA_AVR6, bfd_mach_avr6},
+   {"ata5831",    AVR_ISA_AVR7, bfd_mach_avr7},
+diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
+--- gas/doc/c-avr.texi 2012-12-10 14:52:39.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-10 16:39:55.000000000 +0530
+@@ -74,22 +74,22 @@ atmega324a, atmega324p, atmega324pa, atm
+ atmega325p, atmega325pa, atmega3250, atmega3250a, atmega3250p, atmega3250pa, 
+ atmega328, atmega328p, atmega329, atmega329a, atmega329p, atmega329pa, 
+ atmega3290a, atmega3290p, atmega3290pa, atmega406, atmega64, atmega64a, 
+-atmega64rfr2, atmega644rfr2, atmega640, atmega644, atmega644a, atmega644p,
+-atmega644pa, atmega645, atmega645a, atmega645p, atmega6450, atmega6450a,
+-atmega6450p, atmega649, atmega649a, atmega649p, atmega6490, atmega6490a,
+-atmega6490p, atmega16hva, atmega16hva2, atmega16hvb, atmega16hvbrevb, 
++atmega64rfa2, atmega64rfr2, atmega644rfr2, atmega640, atmega644, atmega644a,
++atmega644p, atmega644pa, atmega645, atmega645a, atmega645p, atmega6450,
++atmega6450a, atmega6450p, atmega649, atmega649a, atmega649p, atmega6490,
++atmega6490a, atmega6490p, atmega16hva, atmega16hva2, atmega16hvb, atmega16hvbrevb, 
+ atmega26hvg, atmega32hvb, atmega48hvf, atmega32hvbrevb, atmega64hve, at90can32,
+ at90can64, at90pwm161, at90pwm216, at90pwm316, atmega32c1, atmega64c1, atmega16m1,
+ atmega32m1, atmega64m1, atmega16u4, atmega32u4, atmega32u6, at90usb646,at90usb647,
+ at94k, at90scr100, ata5790, ata5795).
+ Instruction set avr51 is for the enhanced AVR core with exactly 128K program
+ memory space (MCU types: atmega128, atmega128a, atmega1280, atmega1281, 
+-atmega1284, atmega1284p, atmega128rfa1, atmega128rfr2, atmega1284rfr2,
+-at90can128, at90usb1286, at90usb1287, m3000).
++atmega1284, atmega1284p, atmega128rfa1, atmega128rfa2, atmega128rfr2,
++atmega1284rfr2, at90can128, at90usb1286, at90usb1287, m3000).
+ Instruction set avr6 is for the enhanced AVR core with a 3-byte PC (MCU types:
+-atmega2560, atmega2561, atmega256rfr2, atmega2564rfr2).
++atmega2560, atmega2561, atmega256rfa2, atmega256rfr2, atmega2564rfr2).
+ Instruction set avr7 is for the enhanced AVR core with 20K flash which starts
+ from 0x8000 (MCU types: ata5831)
diff --git a/408-binutils-atmegarfr2_a2.patch b/408-binutils-atmegarfr2_a2.patch
deleted file mode 100644 (file)
index 0d853e1..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-22 12:14:48.000000000 +0530
-+++ binutils/size.c    2011-12-22 12:12:39.000000000 +0530
-@@ -119,6 +119,9 @@ typedef struct
- avr_device_t avr[] =
- {
-+      {"atmega256rfa2", AVR256K, AVR32K, AVR8K},
-+      {"atmega256rfr2", AVR256K, AVR32K, AVR8K},
-+
-       {"atxmega256a3",  AVR264K, AVR16K, AVR4K},
-       {"atxmega256a3u", AVR264K, AVR16K, AVR4K},
-       {"atxmega256a3b", AVR264K, AVR16K, AVR4K},
-@@ -132,6 +135,9 @@ avr_device_t avr[] =
-       {"atxmega192a3u", AVR200K, AVR16K, AVR2K},
-       {"atxmega192d3",  AVR200K, AVR16K, AVR2K},
-+      {"atmega128rfa2", AVR128K, AVR16K, AVR4K},
-+      {"atmega128rfr2", AVR128K, AVR16K, AVR4K},
-+
-       {"atxmega128a1",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a1u", AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a3",  AVR136K, AVR8K,  AVR2K},
-@@ -155,6 +161,9 @@ avr_device_t avr[] =
-       {"atxmega64a3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64a3u",  AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64d3",   AVR68K,  AVR4K,  AVR2K},
-+      
-+      {"atmega64rfa2",  AVR64K,  AVR8K,  AVR2K},
-+      {"atmega64rfr2",  AVR64K,  AVR8K,  AVR2K},
-       {"at90can64",     AVR64K,  AVR4K,  AVR2K},
-       {"at90scr100",    AVR64K,  AVR4K,  AVR2K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-22 12:14:48.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-22 12:12:39.000000000 +0530
-@@ -205,6 +205,8 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega3290p",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega3290pa",AVR_ISA_AVR5,   bfd_mach_avr5},
-   {"atmega406",  AVR_ISA_AVR5,    bfd_mach_avr5},
-+  {"atmega64rfa2", AVR_ISA_AVR5,  bfd_mach_avr5},
-+  {"atmega64rfr2", AVR_ISA_AVR5,  bfd_mach_avr5},
-   {"atmega64",   AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega640",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega644",  AVR_ISA_AVR5,    bfd_mach_avr5},
-@@ -253,11 +255,15 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega1281", AVR_ISA_AVR51,   bfd_mach_avr51},
-   {"atmega1284p",AVR_ISA_AVR51,   bfd_mach_avr51},
-   {"atmega128rfa1",AVR_ISA_AVR51, bfd_mach_avr51},
-+  {"atmega128rfa2",AVR_ISA_AVR51, bfd_mach_avr51},
-+  {"atmega128rfr2",AVR_ISA_AVR51, bfd_mach_avr51},
-   {"at90can128", AVR_ISA_AVR51,   bfd_mach_avr51},
-   {"at90usb1286",AVR_ISA_AVR51,   bfd_mach_avr51},
-   {"at90usb1287",AVR_ISA_AVR51,   bfd_mach_avr51},
-   {"atmega2560", AVR_ISA_AVR6,    bfd_mach_avr6},
-   {"atmega2561", AVR_ISA_AVR6,    bfd_mach_avr6},
-+  {"atmega256rfa2", AVR_ISA_AVR6, bfd_mach_avr6},
-+  {"atmega256rfr2", AVR_ISA_AVR6, bfd_mach_avr6},
-   {"atxmega16a4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega16a4u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega2},
-   {"atxmega16d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-22 12:14:48.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-22 12:12:39.000000000 +0530
-@@ -70,10 +70,10 @@ atmega168a, atmega168p, atmega169, atmeg
- atmega32, atmega323, atmega324a, atmega324p, atmega324pa, atmega325, atmega325a, atmega325p,
- atmega325pa, atmega3250, atmega3250a, atmega3250p, atmega3250pa, atmega328,
- atmega328p, atmega329, atmega329a, atmega329p, atmega329pa, atmega3290,
--atmega3290a, atmega3290p, atmega3290pa, atmega406, atmega64, atmega640,
--atmega644, atmega644a, atmega644p, atmega644pa, atmega645, atmega645a,
--atmega645p, atmega6450, atmega6450a, atmega6450p, atmega649, atmega649a,
--atmega649p, atmega6490, atmega6490a, atmega6490p, atmega16hva, atmega16hva2,
-+atmega3290a, atmega3290p, atmega3290pa, atmega406, atmega64, atmega64rfa2,
-+atmegarfr2, atmega640, atmega644, atmega644a, atmega644p, atmega644pa, atmega645,
-+atmega645a, atmega645p, atmega6450, atmega6450a, atmega6450p, atmega649,
-+atmega649a, atmega649p, atmega6490, atmega6490a, atmega6490p, atmega16hva, atmega16hva2,
- atmega16hvb, atmega16hvbrevb, atmega32hvb, atmega32hvbrevb, atmega64hve,
- at90can32, at90can64, at90pwm161, at90pwm216, at90pwm316, atmega32c1,
- atmega64c1, atmega16m1, atmega32m1, atmega64m1, atmega16u4, atmega32u4,
-@@ -81,10 +81,10 @@ atmega32u6, at90usb646, at90usb647, at94
- Instruction set avr51 is for the enhanced AVR core with exactly 128K program
- memory space (MCU types: atmega128, atmega1280, atmega1281, atmega1284p,
--atmega128rfa1, at90can128, at90usb1286, at90usb1287, m3000).
-+atmega128rfa1, atmega128rfa2, atmega128rfr2, at90can128, at90usb1286, at90usb1287, m3000).
- Instruction set avr6 is for the enhanced AVR core with a 3-byte PC (MCU types:
--atmega2560, atmega2561).
-+atmega2560, atmega2561, atmega256rfa2, atmega256rfr2).
- Instruction set avrxmega2 is for the XMEGA AVR core with 8K to 64K program
- memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u,
diff --git a/409-binutils-ata5790n.patch b/409-binutils-ata5790n.patch
new file mode 100644 (file)
index 0000000..6414ff7
--- /dev/null
@@ -0,0 +1,34 @@
+diff -Naurp binutils/size.c binutils/size.c
+--- binutils/size.c    2012-12-10 16:44:06.000000000 +0530
++++ binutils/size.c    2012-12-10 16:59:46.000000000 +0530
+@@ -203,6 +203,7 @@ avr_device_t avr[] =
+       {"at90usb647",    AVR64K,  AVR4K,  AVR2K},
+       {"ata5505",       AVR16K,  AVR512, AVR512},
+       {"ata5790",       AVR16K,  AVR512, AVR2112},
++      {"ata5790n",      AVR16K,  AVR512, AVR2112},
+       {"ata5795",       AVR8K,   AVR512, AVR2112},
+       {"ata5272",       AVR8K,   AVR512, AVR512},
+       {"atmega64",      AVR64K,  AVR4K,  AVR2K},
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2012-12-10 16:44:06.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-10 17:00:23.000000000 +0530
+@@ -172,6 +172,7 @@ static struct mcu_type_s mcu_types[] =
+   {"at90pwm81",  AVR_ISA_AVR4,    bfd_mach_avr4},
+   {"at90pwm161", AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"ata5790",    AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"ata5790n",   AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"ata5795",    AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega16",   AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega16a",  AVR_ISA_AVR5,    bfd_mach_avr5},
+diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
+--- gas/doc/c-avr.texi 2012-12-10 16:44:06.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-10 17:01:20.000000000 +0530
+@@ -81,7 +81,7 @@ atmega6490p, atmega16hva, atmega16hva2, 
+ atmega26hvg, atmega32hvb, atmega48hvf, atmega32hvbrevb, atmega64hve, at90can32,
+ at90can64, at90pwm161, at90pwm216, at90pwm316, atmega32c1, atmega64c1, atmega16m1,
+ atmega32m1, atmega64m1, atmega16u4, atmega32u4, atmega32u6, at90usb646,at90usb647,
+-at94k, at90scr100, ata5790, ata5795).
++at94k, at90scr100, ata5790, ata5790n, ata5795).
+ Instruction set avr51 is for the enhanced AVR core with exactly 128K program
+ memory space (MCU types: atmega128, atmega128a, atmega1280, atmega1281, 
diff --git a/409-binutils-atmega165pa.patch b/409-binutils-atmega165pa.patch
deleted file mode 100644 (file)
index 2993624..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-16 15:25:58.000000000 +0530
-+++ binutils/size.c    2011-12-16 15:28:02.000000000 +0530
-@@ -253,6 +253,7 @@ avr_device_t avr[] =
-       {"atmega165a",    AVR16K,  AVR1K,  AVR512},
-       {"atmega165",     AVR16K,  AVR1K,  AVR512},
-       {"atmega165p",    AVR16K,  AVR1K,  AVR512},
-+      {"atmega165pa",   AVR16K,  AVR1K,  AVR512},
-       {"atmega168",     AVR16K,  AVR1K,  AVR512},
-       {"atmega168a",    AVR16K,  AVR1K,  AVR512},
-       {"atmega168p",    AVR16K,  AVR1K,  AVR512},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-16 15:25:58.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-16 15:28:02.000000000 +0530
-@@ -174,6 +174,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega165",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega165a", AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega165p", AVR_ISA_AVR5,    bfd_mach_avr5},
-+  {"atmega165pa",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega168",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega168a", AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega168p", AVR_ISA_AVR5,    bfd_mach_avr5},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-16 15:25:58.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-16 15:28:02.000000000 +0530
-@@ -65,7 +65,7 @@ at90pwm1, at90pwm2, at90pwm2b, at90pwm3,
- Instruction set avr5 is for the enhanced AVR core with up to 128K program
- memory space (MCU types: at90pwm161, atmega16, atmega16a, atmega161, atmega162,
--atmega163, atmega164a, atmega164p, atmega165, atmega165a, atmega165p, atmega168, 
-+atmega163, atmega164a, atmega164p, atmega165, atmega165a, atmega165p, atmega165pa, atmega168, 
- atmega168a, atmega168p, atmega169, atmega169a, atmega169p, atmega169pa,
- atmega32, atmega323, atmega324a, atmega324p, atmega324pa, atmega325, atmega325a, atmega325p,
- atmega325pa, atmega3250, atmega3250a, atmega3250p, atmega3250pa, atmega328,
diff --git a/410-binutils-atmega64hve2.patch b/410-binutils-atmega64hve2.patch
new file mode 100644 (file)
index 0000000..868affc
--- /dev/null
@@ -0,0 +1,40 @@
+diff -Naurp binutils/size.c binutils/size.c
+--- binutils/size.c    2012-12-19 14:34:56.000000000 +0530
++++ binutils/size.c    2012-12-19 14:35:04.000000000 +0530
+@@ -227,6 +227,7 @@ avr_device_t avr[] =
+       {"atmega6490p",   AVR64K,  AVR4K,  AVR2K},
+       {"atmega64c1",    AVR64K,  AVR4K,  AVR2K},
+       {"atmega64hve",   AVR64K,  AVR4K,  AVR1K},
++      {"atmega64hve2",  AVR64K,  AVR4K,  AVR1K},
+       {"atmega64m1",    AVR64K,  AVR4K,  AVR2K},
+       {"m3000",         AVR64K,  AVR4K,  0UL},
+       
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2012-12-19 14:34:56.000000000 +0530
++++ gas/config/tc-avr.c        2012-12-19 14:35:04.000000000 +0530
+@@ -250,6 +250,7 @@ static struct mcu_type_s mcu_types[] =
+   {"atmega32hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
+   {"atmega48hvf",AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"atmega64hve",AVR_ISA_AVR5,    bfd_mach_avr5},
++  {"atmega64hve2",AVR_ISA_AVR5,   bfd_mach_avr5},
+   {"at90can32" , AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"at90can64" , AVR_ISA_AVR5,    bfd_mach_avr5},
+   {"at90pwm161", AVR_ISA_AVR5,    bfd_mach_avr5},
+diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
+--- gas/doc/c-avr.texi 2012-12-19 14:31:25.000000000 +0530
++++ gas/doc/c-avr.texi 2012-12-19 14:32:18.000000000 +0530
+@@ -78,10 +78,10 @@ atmega64rfa2,atmega64rfr2, atmega640, at
+ atmega644p, atmega644pa, atmega645, atmega645a, atmega645p, atmega6450,
+ atmega6450a, atmega6450p, atmega649, atmega649a, atmega649p, atmega6490,
+ atmega6490a, atmega6490p, atmega16hva, atmega16hva2, atmega16hvb, atmega16hvbrevb, 
+-atmega26hvg, atmega32hvb, atmega48hvf, atmega32hvbrevb, atmega64hve, at90can32,
+-at90can64, at90pwm161, at90pwm216, at90pwm316, atmega32c1, atmega64c1, atmega16m1,
+-atmega32m1, atmega64m1, atmega16u4, atmega32u4, atmega32u6, at90usb646,at90usb647,
+-at94k, at90scr100, ata5790, ata5790n, ata5795).
++atmega26hvg, atmega32hvb, atmega48hvf, atmega32hvbrevb, atmega64hve, atmega64hve2,
++at90can32, at90can64, at90pwm161, at90pwm216, at90pwm316, atmega32c1, atmega64c1,
++atmega16m1, atmega32m1, atmega64m1, atmega16u4, atmega32u4, atmega32u6, at90usb646,
++at90usb647, at94k, at90scr100, ata5790, ata5790n, ata5795).
+ Instruction set avr51 is for the enhanced AVR core with exactly 128K program
+ memory space (MCU types: atmega128, atmega128a, atmega1280, atmega1281, 
diff --git a/410-binutils-atxmega384c3.patch b/410-binutils-atxmega384c3.patch
deleted file mode 100644 (file)
index e91d9f7..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-22 12:16:07.000000000 +0530
-+++ binutils/size.c    2011-12-22 12:16:21.000000000 +0530
-@@ -108,6 +108,7 @@ static int return_code = 0;
- #define AVR200K 204800UL
- #define AVR256K 262144UL
- #define AVR264K 270336UL
-+#define AVR392K 401408UL
- typedef struct
- {
-@@ -119,6 +120,8 @@ typedef struct
- avr_device_t avr[] =
- {
-+      {"atxmega384c3",  AVR392K, AVR32K, AVR4K},
-+ 
-       {"atmega256rfa2", AVR256K, AVR32K, AVR8K},
-       {"atmega256rfr2", AVR256K, AVR32K, AVR8K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-22 12:16:07.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-22 12:21:02.000000000 +0530
-@@ -290,6 +290,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega256a3b",AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega256a3bu",AVR_ISA_XMEGA,bfd_mach_avrxmega6},
-   {"atxmega256d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-+  {"atxmega384c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128a1", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
-   {"atxmega128a1u", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
-   {"attiny4",      AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-22 12:16:07.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-22 12:16:21.000000000 +0530
-@@ -103,9 +103,9 @@ atxmega64a1u).
- Instruction set avrxmega6 is for the XMEGA AVR core with up to 256K program
- memory space and less than 64K data space (MCU types: atxmega128a3, atxmega128a3u,
- atxmega128d3, atxmega192a3, atxmega192a3u, atxmega128b1, atxmega192d3, atxmega256a3,
--atxmega256a3u, atxmega256a3b, atxmega256a3bu).
-+atxmega256a3u, atxmega256a3b, atxmega256a3bu, atxmega384c3).
--Instruction set avrxmega7 is for the XMEGA AVR core with up to 256K program
-+Instruction set avrxmega7 is for the XMEGA AVR core with greater than 64K program
- memory space and greater than 64K data space (MCU types: atxmega128a1,
- atxmega128a1u).
diff --git a/411-binutils-attiny474.patch b/411-binutils-attiny474.patch
new file mode 100644 (file)
index 0000000..b9da2db
--- /dev/null
@@ -0,0 +1,38 @@
+diff -Naurp binutils/size.c binutils/size.c
+--- binutils/size.c    2013-01-28 11:54:59.000000000 +0530
++++ binutils/size.c    2013-01-28 11:58:55.000000000 +0530
+@@ -393,6 +393,7 @@ avr_device_t avr[] =
+       {"attiny26",      AVR2K,   AVR128, AVR128},
+       {"attiny261",     AVR2K,   AVR128, AVR128},
+       {"attiny261a",    AVR2K,   AVR128, AVR128},
++      {"attiny474",     AVR4K,   AVR256, AVR64},
+       {"attiny28",      AVR2K,   0UL,    0UL},
+       {"attiny40",      AVR2K,   AVR256, 0UL},
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2013-01-28 11:54:58.000000000 +0530
++++ gas/config/tc-avr.c        2013-01-28 11:57:57.000000000 +0530
+@@ -126,6 +126,7 @@ static struct mcu_type_s mcu_types[] =
+   {"attiny841",  AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"attiny261",  AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"attiny261a", AVR_ISA_AVR25,   bfd_mach_avr25},
++  {"attiny474",  AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"attiny461",  AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"attiny461a", AVR_ISA_AVR25,   bfd_mach_avr25},
+   {"attiny861",  AVR_ISA_AVR25,   bfd_mach_avr25},
+diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
+--- gas/doc/c-avr.texi 2013-01-28 11:54:58.000000000 +0530
++++ gas/doc/c-avr.texi 2013-01-28 11:59:46.000000000 +0530
+@@ -44,9 +44,9 @@ at90s8535).
+ Instruction set avr25 is for the classic AVR core with up to 8K program memory
+ space plus the MOVW instruction (MCU types: attiny13, attiny13a, attiny2313,
+ attiny2313a, attiny24, attiny24a, attiny4313, attiny44, attiny44a, attiny84,
+-attiny84a, attiny25, attiny45, attiny85, attiny261, attiny261a, attiny461,
+-attiny461a, attiny861, attiny861a, attiny87, attiny43u, attiny48, attiny88,
+-attiny828, attiny841, at86rf401, ata5272).
++attiny84a, attiny25, attiny45, attiny85, attiny261, attiny261a, attiny474, 
++attiny461, attiny461a, attiny861, attiny861a, attiny87, attiny43u, attiny48,
++attiny88,attiny828, attiny841, at86rf401, ata5272).
+ Instruction set avr3 is for the classic AVR core with up to 128K program
+ memory space (MCU types: at43usb355, at76c711).
diff --git a/412-binutils-atmxts200.patch b/412-binutils-atmxts200.patch
new file mode 100644 (file)
index 0000000..513d560
--- /dev/null
@@ -0,0 +1,34 @@
+diff -Naurp binutils/size.c binutils/size.c
+--- binutils/size.c    2013-03-25 10:48:20.000000000 +0530
++++ binutils/size.c    2013-03-25 11:17:54.000000000 +0530
+@@ -239,6 +239,7 @@ avr_device_t avr[] =
+       {"atmxt224",      AVR36K,  AVR9K,  0UL},
+       {"atmxt224e",     AVR36K,  AVR9K,  0UL},
++      {"atmxts200",     AVR16K,  AVR1K,  0UL},
+       {"atxmega32a4",   AVR36K,  AVR4K,  AVR1K},
+       {"atxmega32a4u",  AVR36K,  AVR4K,  AVR1K},
+       {"atxmega32c4",   AVR36K,  AVR4K,  AVR1K},
+diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
+--- gas/config/tc-avr.c        2013-03-25 10:48:19.000000000 +0530
++++ gas/config/tc-avr.c        2013-03-25 11:49:54.000000000 +0530
+@@ -306,6 +306,7 @@ static struct mcu_type_s mcu_types[] =
+   {"atxmega16e5", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atxmega8e5",  AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atxmega32x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
++  {"atmxts200",   AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
+   {"atxmega64a3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
+   {"atxmega64a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
+   {"atxmega64a4u",AVR_ISA_XMEGAU, bfd_mach_avrxmega4},
+diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
+--- gas/doc/c-avr.texi 2013-03-25 10:48:19.000000000 +0530
++++ gas/doc/c-avr.texi 2013-03-25 11:49:16.000000000 +0530
+@@ -98,7 +98,7 @@ Instruction set avrxmega2 is for the XME
+ memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u,
+ atxmega16c4, atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32c4, 
+ atxmega32d4, atxmega16e5, atxmega8e5, atxmega32e5, atxmega32x1, atmxt224,
+-atmxt224e, atmxt336s, atmxt112sl).
++atmxt224e, atmxt336s, atmxt112sl, atmxts200).
+ Instruction set avrxmega3 is for the XMEGA AVR core with 8K to 64K program
+ memory space and greater than 64K data space (MCU types: none).
diff --git a/412-binutils-atxmega128a4u.patch b/412-binutils-atxmega128a4u.patch
deleted file mode 100644 (file)
index 2cc4bb7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-22 12:22:14.000000000 +0530
-+++ binutils/size.c    2011-12-22 12:22:22.000000000 +0530
-@@ -143,6 +143,7 @@ avr_device_t avr[] =
-       {"atxmega128a1",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a1u", AVR136K, AVR8K,  AVR2K},
-+      {"atxmega128a4u", AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a3",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a3u", AVR136K, AVR8K,  AVR2K},
-       {"atxmega128b1",  AVR136K, AVR8K,  AVR2K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-22 12:22:14.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-22 12:23:13.000000000 +0530
-@@ -293,6 +293,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega384c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128a1", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
-   {"atxmega128a1u", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
-+  {"atxmega128a4u", AVR_ISA_XMEGAU, bfd_mach_avrxmega7},
-   {"attiny4",      AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-   {"attiny5",      AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-   {"attiny9",      AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-22 12:22:14.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-22 12:22:22.000000000 +0530
-@@ -107,7 +107,7 @@ atxmega256a3u, atxmega256a3b, atxmega256
- Instruction set avrxmega7 is for the XMEGA AVR core with greater than 64K program
- memory space and greater than 64K data space (MCU types: atxmega128a1,
--atxmega128a1u).
-+atxmega128a1u, atxmega128a4u).
- @cindex @code{-mall-opcodes} command line option, AVR
- @item -mall-opcodes
diff --git a/413-binutils-atxmega64d4.patch b/413-binutils-atxmega64d4.patch
deleted file mode 100644 (file)
index c9972a3..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-22 12:27:41.000000000 +0530
-+++ binutils/size.c    2011-12-22 12:28:09.000000000 +0530
-@@ -165,7 +165,8 @@ avr_device_t avr[] =
-       {"atxmega64a3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64a3u",  AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64d3",   AVR68K,  AVR4K,  AVR2K},
--      
-+      {"atxmega64d4",   AVR68K,  AVR4K,  AVR2K},
-+
-       {"atmega64rfa2",  AVR64K,  AVR8K,  AVR2K},
-       {"atmega64rfr2",  AVR64K,  AVR8K,  AVR2K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-22 12:27:41.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-22 12:28:09.000000000 +0530
-@@ -276,6 +276,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega64a3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64a3u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-   {"atxmega64d3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-+  {"atxmega64d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64a1", AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
-   {"atxmega64a1u",AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
-   {"atxmega128a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-22 12:27:41.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-22 12:28:09.000000000 +0530
-@@ -94,7 +94,8 @@ Instruction set avrxmega3 is for the XME
- memory space and greater than 64K data space (MCU types: none).
- Instruction set avrxmega4 is for the XMEGA AVR core with up to 64K program
--memory space and less than 64K data space (MCU types: atxmega64a3, atxmega64a3u, atxmega64d3).
-+memory space and less than 64K data space (MCU types: atxmega64a3, atxmega64a3u,
-+atxmega64d3, atxmega64d4).
- Instruction set avrxmega5 is for the XMEGA AVR core with up to 64K program 
- memory space and greater than 64K data space (MCU types: atxmega64a1,
diff --git a/414-binutils-atmega164pa_168pa_32a_64a.patch b/414-binutils-atmega164pa_168pa_32a_64a.patch
deleted file mode 100644 (file)
index f695b88..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-16 15:36:12.000000000 +0530
-+++ binutils/size.c    2011-12-16 15:38:01.000000000 +0530
-@@ -175,6 +175,7 @@ avr_device_t avr[] =
-       {"at90usb646",    AVR64K,  AVR4K,  AVR2K},
-       {"at90usb647",    AVR64K,  AVR4K,  AVR2K},
-       {"atmega64",      AVR64K,  AVR4K,  AVR2K},
-+      {"atmega64a",     AVR64K,  AVR4K,  AVR2K},
-       {"atmega640",     AVR64K,  AVR8K,  AVR4K},
-       {"atmega644",     AVR64K,  AVR4K,  AVR2K},
-       {"atmega644a",    AVR64K,  AVR4K,  AVR2K},
-@@ -206,6 +207,7 @@ avr_device_t avr[] =
-       {"at90can32",     AVR32K,  AVR2K,  AVR1K},
-       {"at94k",         AVR32K,  AVR4K,  0UL},
-       {"atmega32",      AVR32K,  AVR2K,  AVR1K},
-+      {"atmega32a",     AVR32K,  AVR2K,  AVR1K},
-       {"atmega323",     AVR32K,  AVR2K,  AVR1K},
-       {"atmega324a",    AVR32K,  AVR2K,  AVR1K},
-       {"atmega324p",    AVR32K,  AVR2K,  AVR1K},
-@@ -255,6 +257,7 @@ avr_device_t avr[] =
-       {"atmega164",     AVR16K,  AVR1K,  AVR512},
-       {"atmega164a",    AVR16K,  AVR1K,  AVR512},
-       {"atmega164p",    AVR16K,  AVR1K,  AVR512},
-+      {"atmega164pa",   AVR16K,  AVR1K,  AVR512},
-       {"atmega165a",    AVR16K,  AVR1K,  AVR512},
-       {"atmega165",     AVR16K,  AVR1K,  AVR512},
-       {"atmega165p",    AVR16K,  AVR1K,  AVR512},
-@@ -262,6 +265,7 @@ avr_device_t avr[] =
-       {"atmega168",     AVR16K,  AVR1K,  AVR512},
-       {"atmega168a",    AVR16K,  AVR1K,  AVR512},
-       {"atmega168p",    AVR16K,  AVR1K,  AVR512},
-+      {"atmega168pa",   AVR16K,  AVR1K,  AVR512},
-       {"atmega169",     AVR16K,  AVR1K,  AVR512},
-       {"atmega169a",    AVR16K,  AVR1K,  AVR512},
-       {"atmega169p",    AVR16K,  AVR1K,  AVR512},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-16 15:36:12.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-16 15:38:01.000000000 +0530
-@@ -171,6 +171,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega163",  AVR_ISA_M161,    bfd_mach_avr5},
-   {"atmega164a", AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega164p", AVR_ISA_AVR5,    bfd_mach_avr5},
-+  {"atmega164pa",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega165",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega165a", AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega165p", AVR_ISA_AVR5,    bfd_mach_avr5},
-@@ -178,11 +179,13 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega168",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega168a", AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega168p", AVR_ISA_AVR5,    bfd_mach_avr5},
-+  {"atmega168pa",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega169",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega169a", AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega169p", AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega169pa",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega32",   AVR_ISA_AVR5,    bfd_mach_avr5},
-+  {"atmega32a",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega323",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega324a", AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega324p", AVR_ISA_AVR5,    bfd_mach_avr5},
-@@ -209,6 +212,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega64rfa2", AVR_ISA_AVR5,  bfd_mach_avr5},
-   {"atmega64rfr2", AVR_ISA_AVR5,  bfd_mach_avr5},
-   {"atmega64",   AVR_ISA_AVR5,    bfd_mach_avr5},
-+  {"atmega64a",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega640",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega644",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega644a", AVR_ISA_AVR5,    bfd_mach_avr5},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-16 15:36:12.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-16 15:38:01.000000000 +0530
-@@ -65,12 +65,12 @@ at90pwm1, at90pwm2, at90pwm2b, at90pwm3,
- Instruction set avr5 is for the enhanced AVR core with up to 128K program
- memory space (MCU types: at90pwm161, atmega16, atmega16a, atmega161, atmega162,
--atmega163, atmega164a, atmega164p, atmega165, atmega165a, atmega165p, atmega165pa, atmega168, 
--atmega168a, atmega168p, atmega169, atmega169a, atmega169p, atmega169pa,
--atmega32, atmega323, atmega324a, atmega324p, atmega324pa, atmega325, atmega325a, atmega325p,
-+atmega163, atmega164a, atmega164p, atmega164pa, atmega165, atmega165a, atmega165p, atmega165pa, atmega168, 
-+atmega168a, atmega168p, atmega168pa, atmega169, atmega169a, atmega169p, atmega169pa,
-+atmega32, atmega32a, atmega323, atmega324a, atmega324p, atmega324pa, atmega325, atmega325a, atmega325p,
- atmega325pa, atmega3250, atmega3250a, atmega3250p, atmega3250pa, atmega328,
- atmega328p, atmega329, atmega329a, atmega329p, atmega329pa, atmega3290,
--atmega3290a, atmega3290p, atmega3290pa, atmega406, atmega64, atmega64rfa2,
-+atmega3290a, atmega3290p, atmega3290pa, atmega406, atmega64, atmega64a, atmega64rfa2,
- atmegarfr2, atmega640, atmega644, atmega644a, atmega644p, atmega644pa, atmega645,
- atmega645a, atmega645p, atmega6450, atmega6450a, atmega6450p, atmega649,
- atmega649a, atmega649p, atmega6490, atmega6490a, atmega6490p, atmega16hva, atmega16hva2,
diff --git a/415-binutils-atxmega64_128_b3.patch b/415-binutils-atxmega64_128_b3.patch
deleted file mode 100644 (file)
index cf7ff99..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-05-24 12:35:24.000000000 +0530
-+++ binutils/size.c    2012-05-24 12:34:25.000000000 +0530
-@@ -147,6 +147,7 @@ avr_device_t avr[] =
-       {"atxmega128a3",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a3u", AVR136K, AVR8K,  AVR2K},
-       {"atxmega128b1",  AVR136K, AVR8K,  AVR2K},
-+      {"atxmega128b3",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128d3",  AVR136K, AVR8K,  AVR2K},
-       {"at43usb320",    AVR128K, 608UL,  0UL},
-@@ -164,6 +165,7 @@ avr_device_t avr[] =
-       {"atxmega64a1u",  AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64a3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64a3u",  AVR68K,  AVR4K,  AVR2K},
-+      {"atxmega64b3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64d3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64d4",   AVR68K,  AVR4K,  AVR2K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-05-24 12:35:24.000000000 +0530
-+++ gas/config/tc-avr.c        2012-05-24 13:33:13.000000000 +0530
-@@ -279,6 +279,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega32x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega64a3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64a3u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-+  {"atxmega64b3", AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-   {"atxmega64d3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64a1", AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
-@@ -286,6 +287,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega128a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega128a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128b1", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-+  {"atxmega128b3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-05-24 12:35:24.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-05-24 12:34:25.000000000 +0530
-@@ -95,7 +95,7 @@ memory space and greater than 64K data s
- Instruction set avrxmega4 is for the XMEGA AVR core with up to 64K program
- memory space and less than 64K data space (MCU types: atxmega64a3, atxmega64a3u,
--atxmega64d3, atxmega64d4).
-+atxmega64b3, atxmega64d3, atxmega64d4).
- Instruction set avrxmega5 is for the XMEGA AVR core with up to 64K program 
- memory space and greater than 64K data space (MCU types: atxmega64a1,
-@@ -103,7 +103,7 @@ atxmega64a1u).
- Instruction set avrxmega6 is for the XMEGA AVR core with up to 256K program
- memory space and less than 64K data space (MCU types: atxmega128a3, atxmega128a3u,
--atxmega128d3, atxmega192a3, atxmega192a3u, atxmega128b1, atxmega192d3, atxmega256a3,
-+atxmega128d3, atxmega192a3, atxmega192a3u, atxmega128b1, atxmega128b3, atxmega192d3, atxmega256a3,
- atxmega256a3u, atxmega256a3b, atxmega256a3bu, atxmega384c3).
- Instruction set avrxmega7 is for the XMEGA AVR core with greater than 64K program
diff --git a/416-binutils-atxmega64b1.patch b/416-binutils-atxmega64b1.patch
deleted file mode 100644 (file)
index 251ae87..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-05-24 13:36:19.000000000 +0530
-+++ binutils/size.c    2012-05-24 13:36:30.000000000 +0530
-@@ -165,6 +165,7 @@ avr_device_t avr[] =
-       {"atxmega64a1u",  AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64a3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64a3u",  AVR68K,  AVR4K,  AVR2K},
-+      {"atxmega64b1",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64b3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64d3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64d4",   AVR68K,  AVR4K,  AVR2K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-05-24 13:36:19.000000000 +0530
-+++ gas/config/tc-avr.c        2012-05-24 13:37:46.000000000 +0530
-@@ -279,6 +279,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega32x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega64a3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64a3u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-+  {"atxmega64b1", AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-   {"atxmega64b3", AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-   {"atxmega64d3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-05-24 13:36:19.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-05-24 13:36:30.000000000 +0530
-@@ -95,7 +95,7 @@ memory space and greater than 64K data s
- Instruction set avrxmega4 is for the XMEGA AVR core with up to 64K program
- memory space and less than 64K data space (MCU types: atxmega64a3, atxmega64a3u,
--atxmega64b3, atxmega64d3, atxmega64d4).
-+atxmega64b1, atxmega64b3, atxmega64d3, atxmega64d4).
- Instruction set avrxmega5 is for the XMEGA AVR core with up to 64K program 
- memory space and greater than 64K data space (MCU types: atxmega64a1,
diff --git a/417-binutils-atmega_8a_128a_1284.patch b/417-binutils-atmega_8a_128a_1284.patch
deleted file mode 100644 (file)
index 4260b3c..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-16 15:50:12.000000000 +0530
-+++ binutils/size.c    2011-12-16 15:51:32.000000000 +0530
-@@ -155,8 +155,10 @@ avr_device_t avr[] =
-       {"at90usb1286",   AVR128K, AVR8K,  AVR4K},
-       {"at90usb1287",   AVR128K, AVR8K,  AVR4K},
-       {"atmega128",     AVR128K, AVR4K,  AVR4K},
-+      {"atmega128a",    AVR128K, AVR4K,  AVR4K},
-       {"atmega1280",    AVR128K, AVR8K,  AVR4K},
-       {"atmega1281",    AVR128K, AVR8K,  AVR4K},
-+      {"atmega1284",    AVR128K, AVR16K, AVR4K},
-       {"atmega1284p",   AVR128K, AVR16K, AVR4K},
-       {"atmega128rfa1", AVR128K, AVR16K, AVR4K},
-       {"atmega103",     AVR128K, 4000UL, AVR4K},
-@@ -295,6 +297,7 @@ avr_device_t avr[] =
-       {"at90usb82",     AVR8K,   AVR512, AVR512},
-       {"ata6289",       AVR8K,   AVR512, 320UL},
-       {"atmega8",       AVR8K,   AVR1K,  AVR512},
-+      {"atmega8a",      AVR8K,   AVR1K,  AVR512},
-       {"atmega8515",    AVR8K,   AVR512, AVR512},
-       {"atmega8535",    AVR8K,   AVR512, AVR512},
-       {"atmega88",      AVR8K,   AVR1K,  AVR512},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-16 15:50:12.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-16 15:51:32.000000000 +0530
-@@ -146,6 +146,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega32u2", AVR_ISA_AVR35,   bfd_mach_avr35},
-   {"attiny1634", AVR_ISA_AVR35,   bfd_mach_avr35},
-   {"atmega8",    AVR_ISA_M8,      bfd_mach_avr4},
-+  {"atmega8a",   AVR_ISA_M8,      bfd_mach_avr4},
-   {"atmega48",   AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"atmega48a",  AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"atmega48pa", AVR_ISA_AVR4,    bfd_mach_avr4},
-@@ -256,8 +257,10 @@ static struct mcu_type_s mcu_types[] =
-   {"at94k",      AVR_ISA_94K,     bfd_mach_avr5},
-   {"m3000",      AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega128",  AVR_ISA_AVR51,   bfd_mach_avr51},
-+  {"atmega128a", AVR_ISA_AVR51,   bfd_mach_avr51},
-   {"atmega1280", AVR_ISA_AVR51,   bfd_mach_avr51},
-   {"atmega1281", AVR_ISA_AVR51,   bfd_mach_avr51},
-+  {"atmega1284", AVR_ISA_AVR51,   bfd_mach_avr51},
-   {"atmega1284p",AVR_ISA_AVR51,   bfd_mach_avr51},
-   {"atmega128rfa1",AVR_ISA_AVR51, bfd_mach_avr51},
-   {"atmega128rfa2",AVR_ISA_AVR51, bfd_mach_avr51},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-16 15:50:12.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-16 15:51:32.000000000 +0530
-@@ -59,7 +59,7 @@ instructions (MCU types: attiny167, atti
- atmega8u2, atmega16u2, atmega32u2).
- Instruction set avr4 is for the enhanced AVR core with up to 8K program
--memory space (MCU types: atmega48, atmega48a, atmega48pa, atmega48p, atmega8,
-+memory space (MCU types: atmega48, atmega48a, atmega48pa, atmega48p, atmega8, atmega8a
- atmega88, atmega88a, atmega88p, atmega88pa, atmega8515, atmega8535, atmega8hva,
- at90pwm1, at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81).
-@@ -80,7 +80,7 @@ atmega64c1, atmega16m1, atmega32m1, atme
- atmega32u6, at90usb646, at90usb647, at94k, at90scr100).
- Instruction set avr51 is for the enhanced AVR core with exactly 128K program
--memory space (MCU types: atmega128, atmega1280, atmega1281, atmega1284p,
-+memory space (MCU types: atmega128, atmega128a, atmega1280, atmega1281, atmega1284, atmega1284p,
- atmega128rfa1, atmega128rfa2, atmega128rfr2, at90can128, at90usb1286, at90usb1287, m3000).
- Instruction set avr6 is for the enhanced AVR core with a 3-byte PC (MCU types:
diff --git a/418-binutils-atxmega64a4u.patch b/418-binutils-atxmega64a4u.patch
deleted file mode 100644 (file)
index 08dd483..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-05-24 13:45:31.000000000 +0530
-+++ binutils/size.c    2012-05-24 13:39:53.000000000 +0530
-@@ -167,6 +167,7 @@ avr_device_t avr[] =
-       {"atxmega64a1u",  AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64a3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64a3u",  AVR68K,  AVR4K,  AVR2K},
-+      {"atxmega64a4u",  AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64b1",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64b3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64d3",   AVR68K,  AVR4K,  AVR2K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-05-24 13:45:31.000000000 +0530
-+++ gas/config/tc-avr.c        2012-05-24 13:42:34.000000000 +0530
-@@ -282,6 +282,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega32x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega64a3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64a3u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-+  {"atxmega64a4u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-   {"atxmega64b1", AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-   {"atxmega64b3", AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-   {"atxmega64d3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-05-24 13:45:31.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-05-24 13:39:53.000000000 +0530
-@@ -95,7 +95,7 @@ memory space and greater than 64K data s
- Instruction set avrxmega4 is for the XMEGA AVR core with up to 64K program
- memory space and less than 64K data space (MCU types: atxmega64a3, atxmega64a3u,
--atxmega64b1, atxmega64b3, atxmega64d3, atxmega64d4).
-+atxmega64a4u, atxmega64b1, atxmega64b3, atxmega64d3, atxmega64d4).
- Instruction set avrxmega5 is for the XMEGA AVR core with up to 64K program 
- memory space and greater than 64K data space (MCU types: atxmega64a1,
diff --git a/419-binutils-atxmega128d4.patch b/419-binutils-atxmega128d4.patch
deleted file mode 100644 (file)
index e4357c9..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-05-24 13:56:07.000000000 +0530
-+++ binutils/size.c    2012-05-24 13:55:34.000000000 +0530
-@@ -149,6 +149,7 @@ avr_device_t avr[] =
-       {"atxmega128b1",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128b3",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128d3",  AVR136K, AVR8K,  AVR2K},
-+      {"atxmega128d4",  AVR136K, AVR8K,  AVR2K},
-       {"at43usb320",    AVR128K, 608UL,  0UL},
-       {"at90can128",    AVR128K, AVR4K,  AVR4K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-05-24 13:56:07.000000000 +0530
-+++ gas/config/tc-avr.c        2012-05-24 13:55:34.000000000 +0530
-@@ -294,6 +294,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega128b1", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128b3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-+  {"atxmega128d4", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega192d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-05-24 13:56:07.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-05-24 13:55:34.000000000 +0530
-@@ -103,7 +103,7 @@ atxmega64a1u).
- Instruction set avrxmega6 is for the XMEGA AVR core with up to 256K program
- memory space and less than 64K data space (MCU types: atxmega128a3, atxmega128a3u,
--atxmega128d3, atxmega192a3, atxmega192a3u, atxmega128b1, atxmega128b3, atxmega192d3, atxmega256a3,
-+atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega128b1, atxmega128b3, atxmega192d3, atxmega256a3,
- atxmega256a3u, atxmega256a3b, atxmega256a3bu, atxmega384c3).
- Instruction set avrxmega7 is for the XMEGA AVR core with greater than 64K program
diff --git a/421-binutils-atxmega16c4_32c4_128c3_256c3.patch b/421-binutils-atxmega16c4_32c4_128c3_256c3.patch
deleted file mode 100644 (file)
index 519511b..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-05-24 13:51:13.000000000 +0530
-+++ binutils/size.c    2012-05-24 13:48:23.000000000 +0530
-@@ -131,6 +131,7 @@ avr_device_t avr[] =
-       {"atxmega256a3u", AVR264K, AVR16K, AVR4K},
-       {"atxmega256a3b", AVR264K, AVR16K, AVR4K},
-       {"atxmega256a3bu",AVR264K, AVR16K, AVR4K},
-+      {"atxmega256c3",  AVR264K, AVR16K, AVR4K},
-       {"atxmega256d3",  AVR264K, AVR16K, AVR4K},
-       {"atmega2560",    AVR256K, AVR8K,  AVR4K},
-@@ -150,6 +151,7 @@ avr_device_t avr[] =
-       {"atxmega128a3u", AVR136K, AVR8K,  AVR2K},
-       {"atxmega128b1",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128b3",  AVR136K, AVR8K,  AVR2K},
-+      {"atxmega128c3",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128d3",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128d4",  AVR136K, AVR8K,  AVR2K},
-@@ -213,6 +215,7 @@ avr_device_t avr[] =
-       {"atxmega32a4",   AVR36K,  AVR4K,  AVR1K},
-       {"atxmega32a4u",  AVR36K,  AVR4K,  AVR1K},
-+      {"atxmega32c4",   AVR36K,  AVR4K,  AVR1K},
-       {"atxmega32d4",   AVR36K,  AVR4K,  AVR1K},
-       {"at90can32",     AVR32K,  AVR2K,  AVR1K},
-@@ -253,6 +256,7 @@ avr_device_t avr[] =
-       {"atxmega16a4",   AVR20K,  AVR2K,  AVR1K},
-         {"atxmega16a4u",  AVR20K,  AVR2K,  AVR1K},
-+      {"atxmega16c4",   AVR20K,  AVR2K,  AVR1K},
-       {"atxmega16d4",   AVR20K,  AVR2K,  AVR1K},
-       {"at76c711",      AVR16K,  AVR2K,  0UL},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-05-24 13:51:13.000000000 +0530
-+++ gas/config/tc-avr.c        2012-05-24 13:49:35.000000000 +0530
-@@ -275,10 +275,12 @@ static struct mcu_type_s mcu_types[] =
-   {"atmxt336s",   AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega16a4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega16a4u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega2},
-+  {"atxmega16c4", AVR_ISA_XMEGAU,  bfd_mach_avrxmega2}, 
-   {"atxmega16d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega16x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega32a4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega32a4u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega2},
-+  {"atxmega32c4", AVR_ISA_XMEGAU,  bfd_mach_avrxmega2},
-   {"atxmega32d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega32x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega64a3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-@@ -294,6 +296,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega128a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128b1", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128b3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-+  {"atxmega128c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega128d4", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-@@ -303,6 +306,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega256a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega256a3b",AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega256a3bu",AVR_ISA_XMEGA,bfd_mach_avrxmega6},
-+  {"atxmega256c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega256d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega384c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128a1", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-05-24 13:51:13.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-05-24 13:48:23.000000000 +0530
-@@ -87,8 +87,9 @@ Instruction set avr6 is for the enhanced
- atmega2560, atmega2561, atmega256rfa2, atmega256rfr2).
- Instruction set avrxmega2 is for the XMEGA AVR core with 8K to 64K program
--memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u,
--atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32d4, atxmega32x1, atmxt336s).
-+memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u, atxmega16c4,
-+atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, ,atxmega32c4, atxmega32d4, atxmega32x1,
-+atmxt336s).
- Instruction set avrxmega3 is for the XMEGA AVR core with 8K to 64K program
- memory space and greater than 64K data space (MCU types: none).
-@@ -103,8 +104,9 @@ atxmega64a1u).
- Instruction set avrxmega6 is for the XMEGA AVR core with up to 256K program
- memory space and less than 64K data space (MCU types: atxmega128a3, atxmega128a3u,
--atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega128b1, atxmega128b3, atxmega192d3, atxmega256a3,
--atxmega256a3u, atxmega256a3b, atxmega256a3bu, atxmega384c3).
-+atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega128b1,
-+atxmega128b3, atxmega192d3, atxmega256a3, atxmega256a3u, atxmega256a3b, atxmega256a3bu,
-+atxmega256c3, atxmega256d3, atxmega384c3).
- Instruction set avrxmega7 is for the XMEGA AVR core with greater than 64K program
- memory space and greater than 64K data space (MCU types: atxmega128a1,
diff --git a/422-binutils-atxmega384d3.patch b/422-binutils-atxmega384d3.patch
deleted file mode 100644 (file)
index 94a0c4f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-22 12:45:34.000000000 +0530
-+++ binutils/size.c    2011-12-22 12:45:45.000000000 +0530
-@@ -110,6 +110,7 @@ static int return_code = 0;
- #define AVR200K 204800UL
- #define AVR256K 262144UL
- #define AVR264K 270336UL
-+#define AVR384K 393216UL
- #define AVR392K 401408UL
- typedef struct
-@@ -123,6 +124,8 @@ typedef struct
- avr_device_t avr[] =
- {
-       {"atxmega384c3",  AVR392K, AVR32K, AVR4K},
-+
-+      {"atxmega384d3",  AVR384K, AVR16K, AVR4K},
-  
-       {"atmega256rfa2", AVR256K, AVR32K, AVR8K},
-       {"atmega256rfr2", AVR256K, AVR32K, AVR8K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-22 12:45:34.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-22 12:46:09.000000000 +0530
-@@ -309,6 +309,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega256c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega256d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega384c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-+  {"atxmega384d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega128a1", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
-   {"atxmega128a1u", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
-   {"atxmega128a4u", AVR_ISA_XMEGAU, bfd_mach_avrxmega7},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-22 12:45:34.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-22 12:45:45.000000000 +0530
-@@ -106,7 +106,7 @@ Instruction set avrxmega6 is for the XME
- memory space and less than 64K data space (MCU types: atxmega128a3, atxmega128a3u,
- atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega128b1,
- atxmega128b3, atxmega192d3, atxmega256a3, atxmega256a3u, atxmega256a3b, atxmega256a3bu,
--atxmega256c3, atxmega256d3, atxmega384c3).
-+atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3).
- Instruction set avrxmega7 is for the XMEGA AVR core with greater than 64K program
- memory space and greater than 64K data space (MCU types: atxmega128a1,
diff --git a/423-binutils-atmega48hvf.patch b/423-binutils-atmega48hvf.patch
deleted file mode 100644 (file)
index 3352879..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-16 16:16:32.000000000 +0530
-+++ binutils/size.c    2011-12-16 16:22:02.000000000 +0530
-@@ -102,6 +102,7 @@ static int return_code = 0;
- #define AVR32K 32768UL
- #define AVR36K 36864UL
- #define AVR40K 40960UL
-+#define AVR48K 49152UL
- #define AVR52K 53248UL
- #define AVR64K 65536UL
- #define AVR68K 69632UL
-@@ -331,6 +332,7 @@ avr_device_t avr[] =
-       {"at90s4433",     AVR4K,   AVR128, AVR256},
-       {"at90s4434",     AVR4K,   352UL,  AVR256},
-       {"atmega48",      AVR4K,   AVR512, AVR256},
-+      {"atmega48hvf",   AVR48K,  AVR2K,  AVR1K},
-       {"atmega48a",     AVR4K,   AVR512, AVR256},
-       {"atmega48pa",    AVR4K,   AVR512, AVR256},
-       {"atmega48p",     AVR4K,   AVR512, AVR256},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-16 16:16:32.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-16 16:22:02.000000000 +0530
-@@ -237,6 +237,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega16hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
-   {"atmega32hvb",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega32hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
-+  {"atmega48hvf",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega64hve",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"at90can32" , AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"at90can64" , AVR_ISA_AVR5,    bfd_mach_avr5},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-16 16:19:33.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-16 16:22:02.000000000 +0530
-@@ -74,8 +74,8 @@ atmega3290a, atmega3290p, atmega3290pa, 
- atmegarfr2, atmega640, atmega644, atmega644a, atmega644p, atmega644pa, atmega645,
- atmega645a, atmega645p, atmega6450, atmega6450a, atmega6450p, atmega649,
- atmega649a, atmega649p, atmega6490, atmega6490a, atmega6490p, atmega16hva, atmega16hva2,
--atmega16hvb, atmega16hvbrevb, atmega32hvb, atmega32hvbrevb, atmega64hve,
--at90can32, at90can64, at90pwm161, at90pwm216, at90pwm316, atmega32c1,
-+atmega16hvb, atmega16hvbrevb, atmega32hvb, atmega32hvbrevb, atmega48hvf, atmega64hve,
-+at90can32, at90can64, at90pwm216, at90pwm316, atmega32c1,
- atmega64c1, atmega16m1, atmega32m1, atmega64m1, atmega16u4, atmega32u4,
- atmega32u6, at90usb646, at90usb647, at94k, at90scr100).
diff --git a/424-binutils-atmega26hvg.patch b/424-binutils-atmega26hvg.patch
deleted file mode 100644 (file)
index 5bffc8f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2011-12-22 12:53:39.000000000 +0530
-+++ binutils/size.c    2011-12-22 12:53:45.000000000 +0530
-@@ -99,6 +99,7 @@ static int return_code = 0;
- #define AVR16K 16384UL
- #define AVR20K 20480UL
- #define AVR24K 24576UL
-+#define AVR26K 26624UL
- #define AVR32K 32768UL
- #define AVR36K 36864UL
- #define AVR40K 40960UL
-@@ -256,6 +257,8 @@ avr_device_t avr[] =
-       {"atmega32u4",    AVR32K,  2560UL, AVR1K},
-       {"atmega32u6",    AVR32K,  2560UL, AVR1K},
-+      {"atmega26hvg",   AVR26K,  AVR1K,  AVR512},
-+
-       {"at43usb355",    AVR24K,  1120UL,   0UL},
-       {"atxmega16a4",   AVR20K,  AVR2K,  AVR1K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2011-12-22 12:53:39.000000000 +0530
-+++ gas/config/tc-avr.c        2011-12-22 12:53:45.000000000 +0530
-@@ -235,6 +235,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega16hva2",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega16hvb",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega16hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
-+  {"atmega26hvg",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega32hvb",AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega32hvbrevb",AVR_ISA_AVR5,bfd_mach_avr5},
-   {"atmega48hvf",AVR_ISA_AVR5,    bfd_mach_avr5},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2011-12-22 12:53:39.000000000 +0530
-+++ gas/doc/c-avr.texi 2011-12-22 12:53:45.000000000 +0530
-@@ -74,7 +74,7 @@ atmega3290a, atmega3290p, atmega3290pa, 
- atmegarfr2, atmega640, atmega644, atmega644a, atmega644p, atmega644pa, atmega645,
- atmega645a, atmega645p, atmega6450, atmega6450a, atmega6450p, atmega649,
- atmega649a, atmega649p, atmega6490, atmega6490a, atmega6490p, atmega16hva, atmega16hva2,
--atmega16hvb, atmega16hvbrevb, atmega32hvb, atmega32hvbrevb, atmega48hvf, atmega64hve,
-+atmega16hvb, atmega16hvbrevb, atmega26hvg, atmega32hvb, atmega32hvbrevb, atmega48hvf, atmega64hve,
- at90can32, at90can64, at90pwm216, at90pwm316, atmega32c1,
- atmega64c1, atmega16m1, atmega32m1, atmega64m1, atmega16u4, atmega32u4,
- atmega32u6, at90usb646, at90usb647, at94k, at90scr100).
diff --git a/426-binutils-atxmega192c3.patch b/426-binutils-atxmega192c3.patch
deleted file mode 100644 (file)
index ed93d18..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-05-24 13:59:33.000000000 +0530
-+++ binutils/size.c    2012-05-24 13:59:02.000000000 +0530
-@@ -145,6 +145,7 @@ avr_device_t avr[] =
-       {"atxmega192a3",  AVR200K, AVR16K, AVR2K},
-       {"atxmega192a3u", AVR200K, AVR16K, AVR2K},
-+      {"atxmega192c3",  AVR200K, AVR16K, AVR2K},
-       {"atxmega192d3",  AVR200K, AVR16K, AVR2K},
-       {"atmega128rfa2", AVR128K, AVR16K, AVR4K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-05-24 13:59:33.000000000 +0530
-+++ gas/config/tc-avr.c        2012-05-24 14:00:01.000000000 +0530
-@@ -305,6 +305,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega128d4", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-+  {"atxmega192c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega192d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega256a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega256a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-05-24 13:59:33.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-05-24 13:59:02.000000000 +0530
-@@ -105,7 +105,7 @@ atxmega64a1u).
- Instruction set avrxmega6 is for the XMEGA AVR core with up to 256K program
- memory space and less than 64K data space (MCU types: atxmega128a3, atxmega128a3u,
- atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega128b1,
--atxmega128b3, atxmega192d3, atxmega256a3, atxmega256a3u, atxmega256a3b, atxmega256a3bu,
-+atxmega128b3, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3u, atxmega256a3b, atxmega256a3bu,
- atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3).
- Instruction set avrxmega7 is for the XMEGA AVR core with greater than 64K program
diff --git a/427-binutils-atmxt112sl.patch b/427-binutils-atmxt112sl.patch
deleted file mode 100644 (file)
index 44be7a0..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-02-10 21:04:14.000000000 +0530
-+++ binutils/size.c    2012-02-10 21:04:48.000000000 +0530
-@@ -218,6 +218,8 @@ avr_device_t avr[] =
-       
-       {"atmxt336s",     AVR52K,  AVR14K, 0UL},
-+      {"atmxt112sl",    AVR48K,  AVR8K,  0UL},
-+
-       {"atmega406",     AVR40K,  AVR2K,  AVR512},
-       {"atmxt224",      AVR36K,  AVR9K,  0UL},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-02-10 21:04:14.000000000 +0530
-+++ gas/config/tc-avr.c        2012-02-10 21:04:48.000000000 +0530
-@@ -274,6 +274,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atmega2561", AVR_ISA_AVR6,    bfd_mach_avr6},
-   {"atmega256rfa2", AVR_ISA_AVR6, bfd_mach_avr6},
-   {"atmega256rfr2", AVR_ISA_AVR6, bfd_mach_avr6},
-+  {"atmxt112sl",  AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atmxt224",    AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atmxt224e",   AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atmxt336s",   AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-02-10 21:04:14.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-02-10 21:06:26.000000000 +0530
-@@ -88,8 +88,8 @@ atmega2560, atmega2561, atmega256rfa2, a
- Instruction set avrxmega2 is for the XMEGA AVR core with 8K to 64K program
- memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u, atxmega16c4,
--atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, ,atxmega32c4, atxmega32d4, atxmega32x1,
--atmxt224, atmxt224e, atmxt336s).
-+atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, ,atxmega32c4, atxmega32d4,
-+atxmega32x1, atmxt224, atmxt224e, atmxt336s, atmxt112sl).
- Instruction set avrxmega3 is for the XMEGA AVR core with 8K to 64K program
- memory space and greater than 64K data space (MCU types: none).
diff --git a/428-binutils-atxmega64c3.patch b/428-binutils-atxmega64c3.patch
deleted file mode 100644 (file)
index 83788d3..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-05-24 14:09:02.000000000 +0530
-+++ binutils/size.c    2012-05-24 14:06:13.000000000 +0530
-@@ -182,6 +182,7 @@ avr_device_t avr[] =
-       {"atxmega64a4u",  AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64b1",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64b3",   AVR68K,  AVR4K,  AVR2K},
-+      {"atxmega64c3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64d3",   AVR68K,  AVR4K,  AVR2K},
-       {"atxmega64d4",   AVR68K,  AVR4K,  AVR2K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-05-24 14:09:02.000000000 +0530
-+++ gas/config/tc-avr.c        2012-05-24 14:07:22.000000000 +0530
-@@ -293,6 +293,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega64a4u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-   {"atxmega64b1", AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-   {"atxmega64b3", AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-+  {"atxmega64c3", AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-   {"atxmega64d3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64a1", AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-05-24 14:09:02.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-05-24 14:06:13.000000000 +0530
-@@ -96,7 +96,7 @@ memory space and greater than 64K data s
- Instruction set avrxmega4 is for the XMEGA AVR core with up to 64K program
- memory space and less than 64K data space (MCU types: atxmega64a3, atxmega64a3u,
--atxmega64a4u, atxmega64b1, atxmega64b3, atxmega64d3, atxmega64d4).
-+atxmega64a4u, atxmega64b1, atxmega64b3, atxmega64c3, atxmega64d3, atxmega64d4).
- Instruction set avrxmega5 is for the XMEGA AVR core with up to 64K program 
- memory space and greater than 64K data space (MCU types: atxmega64a1,
diff --git a/429-binutils-ata6285_6286.patch b/429-binutils-ata6285_6286.patch
deleted file mode 100644 (file)
index 3235ada..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-02-15 13:57:10.000000000 +0530
-+++ binutils/size.c    2012-02-16 16:51:58.000000000 +0530
-@@ -319,6 +319,8 @@ avr_device_t avr[] =
-       {"at90s8515",     AVR8K,   AVR512, AVR512},
-       {"at90s8535",     AVR8K,   AVR512, AVR512},
-       {"at90usb82",     AVR8K,   AVR512, AVR512},
-+      {"ata6285",       AVR8K,   AVR512, 320UL},
-+      {"ata6286",       AVR8K,   AVR512, 320UL},
-       {"ata6289",       AVR8K,   AVR512, 320UL},
-       {"atmega8",       AVR8K,   AVR1K,  AVR512},
-       {"atmega8a",      AVR8K,   AVR1K,  AVR512},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-02-15 13:57:09.000000000 +0530
-+++ gas/config/tc-avr.c        2012-02-17 11:06:57.000000000 +0530
-@@ -147,6 +147,8 @@ static struct mcu_type_s mcu_types[] =
-   {"attiny1634", AVR_ISA_AVR35,   bfd_mach_avr35},
-   {"atmega8",    AVR_ISA_M8,      bfd_mach_avr4},
-   {"atmega8a",   AVR_ISA_M8,      bfd_mach_avr4},
-+  {"ata6285",    AVR_ISA_AVR4,    bfd_mach_avr4},
-+  {"ata6286",    AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"atmega48",   AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"atmega48a",  AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"atmega48pa", AVR_ISA_AVR4,    bfd_mach_avr4},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-02-15 13:57:09.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-02-16 16:51:58.000000000 +0530
-@@ -61,7 +61,7 @@ atmega8u2, atmega16u2, atmega32u2).
- Instruction set avr4 is for the enhanced AVR core with up to 8K program
- memory space (MCU types: atmega48, atmega48a, atmega48pa, atmega48p, atmega8, atmega8a
- atmega88, atmega88a, atmega88p, atmega88pa, atmega8515, atmega8535, atmega8hva,
--at90pwm1, at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81).
-+at90pwm1, at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81, ata6285, ata6286).
- Instruction set avr5 is for the enhanced AVR core with up to 128K program
- memory space (MCU types: at90pwm161, atmega16, atmega16a, atmega161, atmega162,
diff --git a/430-binutils-attiny828.patch b/430-binutils-attiny828.patch
deleted file mode 100644 (file)
index de8cd1d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-05-30 18:16:01.000000000 +0530
-+++ binutils/size.c    2012-05-30 18:16:01.000000000 +0530
-@@ -356,6 +356,7 @@ avr_device_t avr[] =
-       {"attiny461",     AVR4K,   AVR256, AVR256},
-       {"attiny461a",    AVR4K,   AVR256, AVR256},
-       {"attiny48",      AVR4K,   AVR256, AVR64},
-+      {"attiny828",     AVR8K,   AVR512, AVR256},
-       {"at86rf401",     AVR2K,   224UL,  AVR128},
-       {"at90s2313",     AVR2K,   AVR128, AVR128},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-05-30 18:16:01.000000000 +0530
-+++ gas/config/tc-avr.c        2012-05-30 18:16:01.000000000 +0530
-@@ -132,6 +132,7 @@ static struct mcu_type_s mcu_types[] =
-   {"attiny43u",  AVR_ISA_AVR25,   bfd_mach_avr25},
-   {"attiny48",   AVR_ISA_AVR25,   bfd_mach_avr25},
-   {"attiny88",   AVR_ISA_AVR25,   bfd_mach_avr25},
-+  {"attiny828",  AVR_ISA_AVR25,   bfd_mach_avr25}, 
-   {"at86rf401",  AVR_ISA_RF401,   bfd_mach_avr25},
-   {"ata6289",    AVR_ISA_AVR25,   bfd_mach_avr25},
-   {"at43usb355", AVR_ISA_AVR3,    bfd_mach_avr3},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-05-30 18:16:01.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-05-30 18:16:01.000000000 +0530
-@@ -46,7 +46,7 @@ space plus the MOVW instruction (MCU typ
- attiny2313a, attiny24, attiny24a, attiny4313, attiny44, attiny44a, attiny84,
- attiny84a, attiny25, attiny45, attiny85, attiny261, attiny261a, attiny461,
- attiny461a, attiny861, attiny861a, attiny87, attiny43u, attiny48, attiny88,
--at86rf401, ata6289).
-+attiny828, at86rf401, ata6289).
- Instruction set avr3 is for the classic AVR core with up to 128K program
- memory space (MCU types: at43usb355, at76c711).
diff --git a/431-binutils-ata5790_5790N_5795.patch b/431-binutils-ata5790_5790N_5795.patch
deleted file mode 100644 (file)
index 755253e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-02-27 11:45:17.000000000 +0530
-+++ binutils/size.c    2012-02-27 11:49:07.000000000 +0530
-@@ -91,6 +91,7 @@ static int return_code = 0;
- #define AVR128 128UL
- #define AVR256 256UL
- #define AVR512 512UL
-+#define AVR2112 2112UL
- #define AVR1K 1024UL
- #define AVR2K 2048UL
- #define AVR4K 4096UL
-@@ -193,6 +194,9 @@ avr_device_t avr[] =
-       {"at90scr100",    AVR64K,  AVR4K,  AVR2K},
-       {"at90usb646",    AVR64K,  AVR4K,  AVR2K},
-       {"at90usb647",    AVR64K,  AVR4K,  AVR2K},
-+      {"ata5790",       AVR16K,  AVR512, AVR2112},
-+      {"ata5790n",      AVR16K,  AVR512, AVR2112},
-+      {"ata5795",       AVR8K,   AVR512, AVR2112},
-       {"atmega64",      AVR64K,  AVR4K,  AVR2K},
-       {"atmega64a",     AVR64K,  AVR4K,  AVR2K},
-       {"atmega640",     AVR64K,  AVR8K,  AVR4K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-02-27 11:45:17.000000000 +0530
-+++ gas/config/tc-avr.c        2012-02-27 11:46:30.000000000 +0530
-@@ -168,6 +168,9 @@ static struct mcu_type_s mcu_types[] =
-   {"at90pwm3b",  AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"at90pwm81",  AVR_ISA_AVR4,    bfd_mach_avr4},
-   {"at90pwm161", AVR_ISA_AVR5,    bfd_mach_avr5},
-+  {"ata5790",    AVR_ISA_AVR5,    bfd_mach_avr5},
-+  {"ata5790n",   AVR_ISA_AVR5,    bfd_mach_avr5},
-+  {"ata5795",    AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega16",   AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega16a",  AVR_ISA_AVR5,    bfd_mach_avr5},
-   {"atmega161",  AVR_ISA_M161,    bfd_mach_avr5},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-02-27 11:45:17.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-02-27 11:46:30.000000000 +0530
-@@ -77,7 +77,8 @@ atmega649a, atmega649p, atmega6490, atme
- atmega16hvb, atmega16hvbrevb, atmega26hvg, atmega32hvb, atmega32hvbrevb, atmega48hvf, atmega64hve,
- at90can32, at90can64, at90pwm216, at90pwm316, atmega32c1,
- atmega64c1, atmega16m1, atmega32m1, atmega64m1, atmega16u4, atmega32u4,
--atmega32u6, at90usb646, at90usb647, at94k, at90scr100).
-+atmega32u6, at90usb646, at90usb647, at94k, at90scr100,
-+ata5790, ata5790n, ata5795).
- Instruction set avr51 is for the enhanced AVR core with exactly 128K program
- memory space (MCU types: atmega128, atmega128a, atmega1280, atmega1281, atmega1284, atmega1284p,
diff --git a/432-binutils-ata5272_5505.patch b/432-binutils-ata5272_5505.patch
deleted file mode 100644 (file)
index 0b42dae..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-03-27 20:30:42.000000000 +0530
-+++ binutils/size.c    2012-03-29 10:32:25.000000000 +0530
-@@ -194,9 +194,11 @@ avr_device_t avr[] =
-       {"at90scr100",    AVR64K,  AVR4K,  AVR2K},
-       {"at90usb646",    AVR64K,  AVR4K,  AVR2K},
-       {"at90usb647",    AVR64K,  AVR4K,  AVR2K},
-+      {"ata5505",       AVR16K,  AVR512, AVR512},
-       {"ata5790",       AVR16K,  AVR512, AVR2112},
-       {"ata5790n",      AVR16K,  AVR512, AVR2112},
-       {"ata5795",       AVR8K,   AVR512, AVR2112},
-+      {"ata5272",       AVR8K,   AVR512, AVR512},
-       {"atmega64",      AVR64K,  AVR4K,  AVR2K},
-       {"atmega64a",     AVR64K,  AVR4K,  AVR2K},
-       {"atmega640",     AVR64K,  AVR8K,  AVR4K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-03-27 20:30:42.000000000 +0530
-+++ gas/config/tc-avr.c        2012-03-30 13:57:40.000000000 +0530
-@@ -108,6 +108,7 @@ static struct mcu_type_s mcu_types[] =
-   {"at90s8515",  AVR_ISA_AVR2,    bfd_mach_avr2},
-   {"at90c8534",  AVR_ISA_AVR2,    bfd_mach_avr2},
-   {"at90s8535",  AVR_ISA_AVR2,    bfd_mach_avr2},
-+  {"ata5272",    AVR_ISA_AVR25,   bfd_mach_avr25},
-   {"attiny13",   AVR_ISA_AVR25,   bfd_mach_avr25},
-   {"attiny13a",  AVR_ISA_AVR25,   bfd_mach_avr25},
-   {"attiny2313", AVR_ISA_AVR25,   bfd_mach_avr25},
-@@ -142,6 +143,7 @@ static struct mcu_type_s mcu_types[] =
-   {"attiny167",  AVR_ISA_AVR35,   bfd_mach_avr35},
-   {"at90usb82",  AVR_ISA_AVR35,   bfd_mach_avr35},
-   {"at90usb162", AVR_ISA_AVR35,   bfd_mach_avr35},
-+  {"ata5505",    AVR_ISA_AVR35,   bfd_mach_avr35},
-   {"atmega8u2",  AVR_ISA_AVR35,   bfd_mach_avr35},
-   {"atmega16u2", AVR_ISA_AVR35,   bfd_mach_avr35},
-   {"atmega32u2", AVR_ISA_AVR35,   bfd_mach_avr35},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-03-27 20:30:42.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-03-30 13:59:41.000000000 +0530
-@@ -46,7 +46,7 @@ space plus the MOVW instruction (MCU typ
- attiny2313a, attiny24, attiny24a, attiny4313, attiny44, attiny44a, attiny84,
- attiny84a, attiny25, attiny45, attiny85, attiny261, attiny261a, attiny461,
- attiny461a, attiny861, attiny861a, attiny87, attiny43u, attiny48, attiny88,
--attiny828, at86rf401, ata6289).
-+attiny828, at86rf401, ata6289, ata5272).
- Instruction set avr3 is for the classic AVR core with up to 128K program
- memory space (MCU types: at43usb355, at76c711).
-@@ -56,7 +56,7 @@ memory space (MCU types: atmega103, at43
- Instruction set avr35 is for classic AVR core plus MOVW, CALL, and JMP
- instructions (MCU types: attiny167, attiny1634, at90usb82, at90usb162,
--atmega8u2, atmega16u2, atmega32u2).
-+atmega8u2, atmega16u2, atmega32u2, ata5505).
- Instruction set avr4 is for the enhanced AVR core with up to 8K program
- memory space (MCU types: atmega48, atmega48a, atmega48pa, atmega48p, atmega8, atmega8a
diff --git a/433-binutils-atmxt540s.patch b/433-binutils-atmxt540s.patch
deleted file mode 100644 (file)
index d231b3b..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-06-28 16:09:08.000000000 +0530
-+++ binutils/size.c    2012-06-28 16:13:56.000000000 +0530
-@@ -97,6 +97,7 @@ static int return_code = 0;
- #define AVR4K 4096UL
- #define AVR8K 8192UL
- #define AVR9K 9216UL
-+#define AVR10K 10240UL
- #define AVR14K 14336UL
- #define AVR16K 16384UL
- #define AVR20K 20480UL
-@@ -152,6 +153,9 @@ avr_device_t avr[] =
-       {"atmega128rfa2", AVR128K, AVR16K, AVR4K},
-       {"atmega128rfr2", AVR128K, AVR16K, AVR4K},
-+      {"atmxt540s",     AVR136K, AVR10K, 0UL},
-+      {"atmxt540sreva",AVR136K, AVR10K, 0UL},
-+
-       {"atxmega128a1",  AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a1u", AVR136K, AVR8K,  AVR2K},
-       {"atxmega128a4u", AVR136K, AVR8K,  AVR2K},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-06-28 16:09:08.000000000 +0530
-+++ gas/config/tc-avr.c        2012-06-28 16:15:11.000000000 +0530
-@@ -313,6 +313,8 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega128c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega128d4", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-+  {"atmxt540s",    AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-+  {"atmxt540sreva", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega192a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega192c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-06-28 16:09:08.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-06-28 16:16:53.000000000 +0530
-@@ -105,9 +105,10 @@ atxmega64a1u).
- Instruction set avrxmega6 is for the XMEGA AVR core with up to 256K program
- memory space and less than 64K data space (MCU types: atxmega128a3, atxmega128a3u,
--atxmega128c3, atxmega128d3, atxmega128d4, atxmega192a3, atxmega192a3u, atxmega128b1,
--atxmega128b3, atxmega192c3, atxmega192d3, atxmega256a3, atxmega256a3u, atxmega256a3b, atxmega256a3bu,
--atxmega256c3, atxmega256d3, atxmega384c3, atxmega384d3).
-+atxmega128c3, atxmega128d3, atxmega128d4, atmxt540s, atmxt540sreva, atxmega192a3,
-+atxmega192a3u, atxmega128b1, atxmega128b3, atxmega192c3, atxmega192d3, atxmega256a3,
-+atxmega256a3u, atxmega256a3b, atxmega256a3bu, atxmega256c3, atxmega256d3, atxmega384c3,
-+atxmega384d3).
- Instruction set avrxmega7 is for the XMEGA AVR core with greater than 64K program
- memory space and greater than 64K data space (MCU types: atxmega128a1,
diff --git a/436-binutils-atxmega32_16_8e5.patch b/436-binutils-atxmega32_16_8e5.patch
deleted file mode 100644 (file)
index 7866b58..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -Naurp binutils/size.c binutils/size.c
---- binutils/size.c    2012-10-16 17:02:14.000000000 +0530
-+++ binutils/size.c    2012-10-16 17:01:47.000000000 +0530
-@@ -239,6 +239,9 @@ avr_device_t avr[] =
-       {"atxmega32a4u",  AVR36K,  AVR4K,  AVR1K},
-       {"atxmega32c4",   AVR36K,  AVR4K,  AVR1K},
-       {"atxmega32d4",   AVR36K,  AVR4K,  AVR1K},
-+      {"atxmega32e5",   AVR36K,  AVR4K,  AVR1K},
-+      {"atxmega16e5",   AVR20K,  AVR2K,  AVR512},
-+      {"atxmega8e5",    AVR10K,  AVR1K,  AVR512},
-       {"at90can32",     AVR32K,  AVR2K,  AVR1K},
-       {"at94k",         AVR32K,  AVR4K,  0UL},
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-10-16 17:02:14.000000000 +0530
-+++ gas/config/tc-avr.c        2012-10-16 17:01:47.000000000 +0530
-@@ -298,6 +298,9 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega32a4u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega2},
-   {"atxmega32c4", AVR_ISA_XMEGAU,  bfd_mach_avrxmega2},
-   {"atxmega32d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-+  {"atxmega32e5", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-+  {"atxmega16e5", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-+  {"atxmega8e5",  AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega32x1", AVR_ISA_XMEGA,  bfd_mach_avrxmega2},
-   {"atxmega64a3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64a3u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega4},
-diff -Naurp gas/doc/c-avr.texi gas/doc/c-avr.texi
---- gas/doc/c-avr.texi 2012-10-16 17:02:14.000000000 +0530
-+++ gas/doc/c-avr.texi 2012-10-16 17:01:47.000000000 +0530
-@@ -92,7 +92,7 @@ from 0x8000 (MCU types: ata5831)
- Instruction set avrxmega2 is for the XMEGA AVR core with 8K to 64K program
- memory space and less than 64K data space (MCU types: atxmega16a4, atxmega16a4u, atxmega16c4,
--atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, ,atxmega32c4, atxmega32d4,
-+atxmega16d4, atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32c4, atxmega32d4, atxmega32e5, atxmega16e5, atxmega8e5,
- atxmega32x1, atmxt224, atmxt224e, atmxt336s, atmxt112sl).
- Instruction set avrxmega3 is for the XMEGA AVR core with 8K to 64K program
diff --git a/500-binutils-avrtc530-backported.patch b/500-binutils-avrtc530-backported.patch
new file mode 100644 (file)
index 0000000..8ee28a9
--- /dev/null
@@ -0,0 +1,33 @@
+diff -Naurp ld/scripttempl/avr7.sc ld/scripttempl/avr7.sc
+--- ld/scripttempl/avr7.sc     2013-03-22 16:10:14.000000000 +0530
++++ ld/scripttempl/avr7.sc     2013-03-22 16:19:16.000000000 +0530
+@@ -161,7 +161,7 @@ SECTIONS
+   .data       ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
+   {
+     ${RELOCATING+ PROVIDE (__data_start = .) ; }
+-    *(.data)
++    KEEP (*(.data))
+     *(.data*)
+     *(.rodata)  /* We need to include .rodata here if gcc is used */
+     *(.rodata*) /* with -fdata-sections.  */
+@@ -195,7 +195,7 @@ SECTIONS
+   .eeprom ${RELOCATING-0}:
+   {
+-    *(.eeprom*)
++    KEEP (*(.eeprom*))
+     ${RELOCATING+ __eeprom_end = . ; }
+   } ${RELOCATING+ > eeprom}
+diff -Naurp ld/scripttempl/avr.sc ld/scripttempl/avr.sc
+--- ld/scripttempl/avr.sc      2013-03-22 16:10:00.000000000 +0530
++++ ld/scripttempl/avr.sc      2013-03-22 16:19:13.000000000 +0530
+@@ -199,7 +199,7 @@ SECTIONS
+   .eeprom ${RELOCATING-0}:
+   {
+-    *(.eeprom*)
++    KEEP (*(.eeprom*))
+     ${RELOCATING+ __eeprom_end = . ; }
+   } ${RELOCATING+ > eeprom}
diff --git a/500-binutils-bug13789.patch b/500-binutils-bug13789.patch
deleted file mode 100644 (file)
index 20d51a9..0000000
+++ /dev/null
@@ -1,379 +0,0 @@
-diff -Naurp bfd/archures.c bfd/archures.c
---- bfd/archures.c     2012-07-16 17:08:19.000000000 +0530
-+++ bfd/archures.c     2012-07-16 17:12:57.000000000 +0530
-@@ -382,6 +382,7 @@ DESCRIPTION
- .#define bfd_mach_avr51               51
- .#define bfd_mach_avr6                6
- .#define bfd_mach_avr7                7
-+.#define bfd_mach_avrtiny10 100
- .#define bfd_mach_avrxmega1 101
- .#define bfd_mach_avrxmega2 102
- .#define bfd_mach_avrxmega3 103
-@@ -389,7 +390,6 @@ DESCRIPTION
- .#define bfd_mach_avrxmega5 105
- .#define bfd_mach_avrxmega6 106
- .#define bfd_mach_avrxmega7 107
--.#define bfd_mach_avrtiny10 201
- .  bfd_arch_bfin,        {* ADI Blackfin *}
- .#define bfd_mach_bfin          1
- .  bfd_arch_cr16,       {* National Semiconductor CompactRISC (ie CR16). *}
-diff -Naurp bfd/bfd-in2.h bfd/bfd-in2.h
---- bfd/bfd-in2.h      2012-07-16 17:08:19.000000000 +0530
-+++ bfd/bfd-in2.h      2012-07-16 17:12:57.000000000 +0530
-@@ -2088,6 +2088,7 @@ enum bfd_architecture
- #define bfd_mach_avr5          5
- #define bfd_mach_avr51         51
- #define bfd_mach_avr6          6
-+#define bfd_mach_avrtiny10 100 
- #define bfd_mach_avrxmega1 101
- #define bfd_mach_avrxmega2 102
- #define bfd_mach_avrxmega3 103
-@@ -2095,7 +2096,6 @@ enum bfd_architecture
- #define bfd_mach_avrxmega5 105
- #define bfd_mach_avrxmega6 106
- #define bfd_mach_avrxmega7 107
--#define bfd_mach_avrtiny10 201
-   bfd_arch_bfin,        /* ADI Blackfin */
- #define bfd_mach_bfin          1
-   bfd_arch_cr16,       /* National Semiconductor CompactRISC (ie CR16). */
-diff -Naurp bfd/cpu-avr.c bfd/cpu-avr.c
---- bfd/cpu-avr.c      2012-07-16 17:08:19.000000000 +0530
-+++ bfd/cpu-avr.c      2012-07-16 17:12:57.000000000 +0530
-@@ -138,29 +138,29 @@ static const bfd_arch_info_type arch_inf
-   /* 20K flash. starts at 0x8000 */
-   N (16, bfd_mach_avr7, "avr:7", FALSE, & arch_info_struct[11]),
-   
-+  /* attiny 10 */
-+  N (16, bfd_mach_avrtiny10, "avr:100", FALSE, & arch_info_struct[12]),
-+
-   /* Xmega 1 */
--  N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[12]),
-+  N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[13]),
-   /* Xmega 2 */
--  N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[13]),
-+  N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[14]),
-   
-   /* Xmega 3 */
--  N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[14]),
-+  N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[15]),
-   
-   /* Xmega 4 */
--  N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[15]),
-+  N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[16]),
-   
-   /* Xmega 5 */
--  N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[16]),
-+  N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[17]),
-   
-   /* Xmega 6 */
--  N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[17]),
-+  N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[18]),
-   
-   /* Xmega 7 */
--  N (24, bfd_mach_avrxmega7, "avr:107", FALSE, & arch_info_struct[18]),
--  
--  /* attiny 10 */
--  N (16, bfd_mach_avrtiny10, "avr:201", FALSE, NULL)
-+  N (24, bfd_mach_avrxmega7, "avr:107", FALSE, NULL)
-   
- };
-diff -Naurp include/elf/avr.h include/elf/avr.h
---- include/elf/avr.h  2012-07-16 17:08:19.000000000 +0530
-+++ include/elf/avr.h  2012-07-16 17:12:57.000000000 +0530
-@@ -40,7 +40,8 @@
- #define E_AVR_MACH_AVR5 5
- #define E_AVR_MACH_AVR51 51
- #define E_AVR_MACH_AVR6 6 
--#define E_AVR_MACH_AVR7 7 
-+#define E_AVR_MACH_AVR7 7
-+#define E_AVR_MACH_AVRTINY10 100 
- #define E_AVR_MACH_XMEGA1 101
- #define E_AVR_MACH_XMEGA2 102
- #define E_AVR_MACH_XMEGA3 103
-@@ -48,7 +49,6 @@
- #define E_AVR_MACH_XMEGA5 105
- #define E_AVR_MACH_XMEGA6 106
- #define E_AVR_MACH_XMEGA7 107
--#define E_AVR_MACH_AVRTINY10 201
- /* Relocations.  */
- START_RELOC_NUMBERS (elf_avr_reloc_type)
-diff -Naurp ld/emulparams/avrtiny10.sh ld/emulparams/avrtiny10.sh
---- ld/emulparams/avrtiny10.sh 2012-07-16 17:08:19.000000000 +0530
-+++ ld/emulparams/avrtiny10.sh 2012-07-16 17:12:57.000000000 +0530
-@@ -1,12 +1,13 @@
--ARCH=avr:201
-+ARCH=avr:100
- MACHINE=
--SCRIPT_NAME=avr
-+SCRIPT_NAME=avrtiny10
- OUTPUT_FORMAT="elf32-avr"
- MAXPAGESIZE=1
- EMBEDDED=yes
- TEMPLATE_NAME=elf32
-+TEXT_ORIGIN=0x0
- TEXT_LENGTH=4K
--DATA_ORIGIN=0x800040
--DATA_LENGTH=0x140
-+DATA_ORIGIN=0x0800040
-+DATA_LENGTH=0x100
- EXTRA_EM_FILE=avrelf
-diff -Naurp ld/Makefile.am ld/Makefile.am
---- ld/Makefile.am     2012-07-16 17:08:19.000000000 +0530
-+++ ld/Makefile.am     2012-07-16 17:12:57.000000000 +0530
-@@ -825,7 +825,7 @@ eavrxmega7.c: $(srcdir)/emulparams/avrxm
-   ${GEN_DEPENDS}
-       ${GENSCRIPTS} avrxmega7 "$(tdir_avr2)"
- eavrtiny10.c: $(srcdir)/emulparams/avrtiny10.sh \
--  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
-+  $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avrtiny10.sc \
-   ${GEN_DEPENDS}
-       ${GENSCRIPTS} avrtiny10 "$(tdir_avr2)"
- ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
-diff -Naurp ld/scripttempl/avrtiny10.sc ld/scripttempl/avrtiny10.sc
---- ld/scripttempl/avrtiny10.sc        1970-01-01 05:30:00.000000000 +0530
-+++ ld/scripttempl/avrtiny10.sc        2012-07-16 17:12:57.000000000 +0530
-@@ -0,0 +1,240 @@
-+cat <<EOF
-+OUTPUT_FORMAT("${OUTPUT_FORMAT}","${OUTPUT_FORMAT}","${OUTPUT_FORMAT}")
-+OUTPUT_ARCH(${ARCH})
-+
-+MEMORY
-+{
-+  text   (rx)   : ORIGIN = $TEXT_ORIGIN, LENGTH = $TEXT_LENGTH
-+  data   (rw!x) : ORIGIN = $DATA_ORIGIN, LENGTH = $DATA_LENGTH
-+  lock      (rw!x) : ORIGIN = 0x3F00, LENGTH = 2
-+  signature (rw!x) : ORIGIN = 0x3FC0, LENGTH = 4
-+/* REVISIT: fuse(rw!x) : */
-+}
-+
-+SECTIONS
-+{
-+  /* Read-only sections, merged into text segment: */
-+  ${TEXT_DYNAMIC+${DYNAMIC}}
-+  .hash        ${RELOCATING-0} : { *(.hash)           }
-+  .dynsym      ${RELOCATING-0} : { *(.dynsym)         }
-+  .dynstr      ${RELOCATING-0} : { *(.dynstr)         }
-+  .gnu.version ${RELOCATING-0} : { *(.gnu.version)    }
-+  .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d)        }
-+  .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r)        }
-+
-+  .rel.init    ${RELOCATING-0} : { *(.rel.init)               }
-+  .rela.init   ${RELOCATING-0} : { *(.rela.init)      }
-+  .rel.text    ${RELOCATING-0} :
-+    {
-+      *(.rel.text)
-+      ${RELOCATING+*(.rel.text.*)}
-+      ${RELOCATING+*(.rel.gnu.linkonce.t*)}
-+    }
-+  .rela.text   ${RELOCATING-0} :
-+    {
-+      *(.rela.text)
-+      ${RELOCATING+*(.rela.text.*)}
-+      ${RELOCATING+*(.rela.gnu.linkonce.t*)}
-+    }
-+  .rel.fini    ${RELOCATING-0} : { *(.rel.fini)               }
-+  .rela.fini   ${RELOCATING-0} : { *(.rela.fini)      }
-+  .rel.rodata  ${RELOCATING-0} :
-+    {
-+      *(.rel.rodata)
-+      ${RELOCATING+*(.rel.rodata.*)}
-+      ${RELOCATING+*(.rel.gnu.linkonce.r*)}
-+    }
-+  .rela.rodata ${RELOCATING-0} :
-+    {
-+      *(.rela.rodata)
-+      ${RELOCATING+*(.rela.rodata.*)}
-+      ${RELOCATING+*(.rela.gnu.linkonce.r*)}
-+    }
-+  .rel.data    ${RELOCATING-0} :
-+    {
-+      *(.rel.data)
-+      ${RELOCATING+*(.rel.data.*)}
-+      ${RELOCATING+*(.rel.gnu.linkonce.d*)}
-+    }
-+  .rela.data   ${RELOCATING-0} :
-+    {
-+      *(.rela.data)
-+      ${RELOCATING+*(.rela.data.*)}
-+      ${RELOCATING+*(.rela.gnu.linkonce.d*)}
-+    }
-+  .rel.ctors   ${RELOCATING-0} : { *(.rel.ctors)      }
-+  .rela.ctors  ${RELOCATING-0} : { *(.rela.ctors)     }
-+  .rel.dtors   ${RELOCATING-0} : { *(.rel.dtors)      }
-+  .rela.dtors  ${RELOCATING-0} : { *(.rela.dtors)     }
-+  .rel.got     ${RELOCATING-0} : { *(.rel.got)                }
-+  .rela.got    ${RELOCATING-0} : { *(.rela.got)               }
-+  .rel.bss     ${RELOCATING-0} : { *(.rel.bss)                }
-+  .rela.bss    ${RELOCATING-0} : { *(.rela.bss)               }
-+  .rel.plt     ${RELOCATING-0} : { *(.rel.plt)                }
-+  .rela.plt    ${RELOCATING-0} : { *(.rela.plt)               }
-+
-+  /* Internal text space or external memory.  */
-+  .text ${RELOCATING-0} : ${RELOCATING+ AT (0x0)}
-+  {
-+    *(.vectors)
-+    KEEP(*(.vectors))
-+
-+    /* For data that needs to reside in the lower 64k of progmem.  */
-+    *(.progmem.gcc*)
-+    *(.progmem*)
-+    ${RELOCATING+. = ALIGN(2);}
-+
-+    ${CONSTRUCTING+ __trampolines_start = . ; }
-+    /* The jump trampolines for the 16-bit limited relocs will reside here.  */
-+    *(.trampolines)
-+    *(.trampolines*)
-+    ${CONSTRUCTING+ __trampolines_end = . ; }
-+
-+    /* For future tablejump instruction arrays for 3 byte pc devices.
-+       We don't relax jump/call instructions within these sections.  */
-+    *(.jumptables) 
-+    *(.jumptables*) 
-+
-+    /* For code that needs to reside in the lower 128k progmem.  */
-+    *(.lowtext)
-+    *(.lowtext*)
-+
-+    ${CONSTRUCTING+ __ctors_start = . ; }
-+    ${CONSTRUCTING+ *(.ctors) }
-+    ${CONSTRUCTING+ __ctors_end = . ; }
-+    ${CONSTRUCTING+ __dtors_start = . ; }
-+    ${CONSTRUCTING+ *(.dtors) }
-+    ${CONSTRUCTING+ __dtors_end = . ; }
-+    KEEP(SORT(*)(.ctors))
-+    KEEP(SORT(*)(.dtors))
-+
-+    /* From this point on, we don't bother about wether the insns are
-+       below or above the 16 bits boundary.  */
-+    *(.init0)  /* Start here after reset.  */
-+    KEEP (*(.init0))
-+    *(.init1)
-+    KEEP (*(.init1))
-+    *(.init2)  /* Clear __zero_reg__, set up stack pointer.  */
-+    KEEP (*(.init2))
-+    *(.init3)
-+    KEEP (*(.init3))
-+    *(.init4)  /* Initialize data and BSS.  */
-+    KEEP (*(.init4))
-+    *(.init5)
-+    KEEP (*(.init5))
-+    *(.init6)  /* C++ constructors.  */
-+    KEEP (*(.init6))
-+    *(.init7)
-+    KEEP (*(.init7))
-+    *(.init8)
-+    KEEP (*(.init8))
-+    *(.init9)  /* Call main().  */
-+    KEEP (*(.init9))
-+    *(.text)
-+    ${RELOCATING+. = ALIGN(2);}
-+    *(.text.*)
-+    ${RELOCATING+. = ALIGN(2);}
-+    *(.fini9)  /* _exit() starts here.  */
-+    KEEP (*(.fini9))
-+    *(.fini8)
-+    KEEP (*(.fini8))
-+    *(.fini7)
-+    KEEP (*(.fini7))
-+    *(.fini6)  /* C++ destructors.  */
-+    KEEP (*(.fini6))
-+    *(.fini5)
-+    KEEP (*(.fini5))
-+    *(.fini4)
-+    KEEP (*(.fini4))
-+    *(.fini3)
-+    KEEP (*(.fini3))
-+    *(.fini2)
-+    KEEP (*(.fini2))
-+    *(.fini1)
-+    KEEP (*(.fini1))
-+    *(.fini0)  /* Infinite loop after program termination.  */
-+    KEEP (*(.fini0))
-+    ${RELOCATING+ _etext = . ; }
-+  } ${RELOCATING+ > text}
-+
-+  .data       ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
-+  {
-+    ${RELOCATING+ PROVIDE (__data_start = .) ; }
-+    *(.data)
-+    *(.data*)
-+    *(.rodata)  /* We need to include .rodata here if gcc is used */
-+    *(.rodata*) /* with -fdata-sections.  */
-+    *(.gnu.linkonce.d*)
-+    ${RELOCATING+. = ALIGN(2);}
-+    ${RELOCATING+ _edata = . ; }
-+    ${RELOCATING+ PROVIDE (__data_end = .) ; }
-+  } ${RELOCATING+ > data}
-+
-+  .bss ${RELOCATING-0} :${RELOCATING+ AT (ADDR (.bss))}
-+  {
-+    ${RELOCATING+ PROVIDE (__bss_start = .) ; }
-+    *(.bss)
-+    *(.bss*)
-+    *(COMMON)
-+    ${RELOCATING+ PROVIDE (__bss_end = .) ; }
-+  } ${RELOCATING+ > data}
-+
-+  ${RELOCATING+ __data_load_start = LOADADDR(.data); }
-+  ${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
-+
-+  /* Global data not cleared after reset.  */
-+  .noinit ${RELOCATING-0}:
-+  {
-+    ${RELOCATING+ PROVIDE (__noinit_start = .) ; }
-+    *(.noinit*)
-+    ${RELOCATING+ PROVIDE (__noinit_end = .) ; }
-+    ${RELOCATING+ _end = . ;  }
-+    ${RELOCATING+ PROVIDE (__heap_start = .) ; }
-+  } ${RELOCATING+ > data}
-+
-+  .lock ${RELOCATING-0}:
-+  {
-+    KEEP(*(.lock*))
-+  } ${RELOCATING+ > lock}
-+
-+  .signature ${RELOCATING-0}:
-+  {
-+    KEEP(*(.signature*))
-+  } ${RELOCATING+ > signature}
-+
-+  /* Stabs debugging sections.  */
-+  .stab 0 : { *(.stab) }
-+  .stabstr 0 : { *(.stabstr) }
-+  .stab.excl 0 : { *(.stab.excl) }
-+  .stab.exclstr 0 : { *(.stab.exclstr) }
-+  .stab.index 0 : { *(.stab.index) }
-+  .stab.indexstr 0 : { *(.stab.indexstr) }
-+  .comment 0 : { *(.comment) }
-+ 
-+  /* DWARF debug sections.
-+     Symbols in the DWARF debugging sections are relative to the beginning
-+     of the section so we begin them at 0.  */
-+
-+  /* DWARF 1 */
-+  .debug          0 : { *(.debug) }
-+  .line           0 : { *(.line) }
-+
-+  /* GNU DWARF 1 extensions */
-+  .debug_srcinfo  0 : { *(.debug_srcinfo) }
-+  .debug_sfnames  0 : { *(.debug_sfnames) }
-+
-+  /* DWARF 1.1 and DWARF 2 */
-+  .debug_aranges  0 : { *(.debug_aranges) }
-+  .debug_pubnames 0 : { *(.debug_pubnames) }
-+
-+  /* DWARF 2 */
-+  .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
-+  .debug_abbrev   0 : { *(.debug_abbrev) }
-+  .debug_line     0 : { *(.debug_line) }
-+  .debug_frame    0 : { *(.debug_frame) }
-+  .debug_str      0 : { *(.debug_str) }
-+  .debug_loc      0 : { *(.debug_loc) }
-+  .debug_macinfo  0 : { *(.debug_macinfo) }
-+}
-+EOF
-+
diff --git a/501-binutils-modify-usb-xmega-isa.patch b/501-binutils-modify-usb-xmega-isa.patch
deleted file mode 100644 (file)
index 2f02310..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-07-16 17:11:12.000000000 +0530
-+++ gas/config/tc-avr.c        2012-07-16 17:29:16.000000000 +0530
-@@ -311,7 +311,7 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega64d3", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64d4", AVR_ISA_XMEGA,  bfd_mach_avrxmega4},
-   {"atxmega64a1", AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
--  {"atxmega64a1u",AVR_ISA_XMEGA,  bfd_mach_avrxmega5},
-+  {"atxmega64a1u",AVR_ISA_XMEGAU,  bfd_mach_avrxmega5},
-   {"atxmega128a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega128a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega128b1", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-@@ -328,13 +328,13 @@ static struct mcu_type_s mcu_types[] =
-   {"atxmega256a3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega256a3u",AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega256a3b",AVR_ISA_XMEGA, bfd_mach_avrxmega6},
--  {"atxmega256a3bu",AVR_ISA_XMEGA,bfd_mach_avrxmega6},
-+  {"atxmega256a3bu",AVR_ISA_XMEGAU,bfd_mach_avrxmega6},
-   {"atxmega256c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega256d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega384c3", AVR_ISA_XMEGAU, bfd_mach_avrxmega6},
-   {"atxmega384d3", AVR_ISA_XMEGA, bfd_mach_avrxmega6},
-   {"atxmega128a1", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
--  {"atxmega128a1u", AVR_ISA_XMEGA, bfd_mach_avrxmega7},
-+  {"atxmega128a1u", AVR_ISA_XMEGAU, bfd_mach_avrxmega7},
-   {"atxmega128a4u", AVR_ISA_XMEGAU, bfd_mach_avrxmega7},
-   {"attiny4",      AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
-   {"attiny5",      AVR_ISA_AVRTINY10, bfd_mach_avrtiny10},
diff --git a/502-binutils-add-config-section-tiny.patch b/502-binutils-add-config-section-tiny.patch
deleted file mode 100644 (file)
index 8e96775..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -Naurp ld/scripttempl/avrtiny10.sc ld/scripttempl/avrtiny10.sc
---- ld/scripttempl/avrtiny10.sc        2012-04-03 11:50:08.000000000 +0530
-+++ ld/scripttempl/avrtiny10.sc        2012-04-03 11:52:48.000000000 +0530
-@@ -6,9 +6,13 @@ MEMORY
- {
-   text   (rx)   : ORIGIN = $TEXT_ORIGIN, LENGTH = $TEXT_LENGTH
-   data   (rw!x) : ORIGIN = $DATA_ORIGIN, LENGTH = $DATA_LENGTH
--  lock      (rw!x) : ORIGIN = 0x3F00, LENGTH = 2
--  signature (rw!x) : ORIGIN = 0x3FC0, LENGTH = 4
--/* REVISIT: fuse(rw!x) : */
-+
-+  /* Provide offsets for config, lock and signature to match
-+     production file format. Ignore offsets in datasheet.  */
-+
-+  config(rw!x)     : ORIGIN = 0x820000, LENGTH = 2
-+  lock      (rw!x) : ORIGIN = 0x830000, LENGTH = 2
-+  signature (rw!x) : ORIGIN = 0x840000, LENGTH = 4
- }
- SECTIONS
-@@ -202,6 +206,11 @@ SECTIONS
-     KEEP(*(.signature*))
-   } ${RELOCATING+ > signature}
-+  .config ${RELOCATING-0}:
-+  {
-+    KEEP(*(.config*))
-+  } ${RELOCATING+ > config}
-+
-   /* Stabs debugging sections.  */
-   .stab 0 : { *(.stab) }
-   .stabstr 0 : { *(.stabstr) }
diff --git a/503-binutils-avrtc193-tiny.patch b/503-binutils-avrtc193-tiny.patch
deleted file mode 100644 (file)
index b42cf3c..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-diff -Naurp bfd/elf32-avr.c bfd/elf32-avr.c
---- bfd/elf32-avr.c    2012-07-20 18:32:17.000000000 +0530
-+++ bfd/elf32-avr.c    2012-07-20 18:31:38.000000000 +0530
-@@ -516,6 +516,21 @@ static reloc_howto_type elf_avr_howto_ta
-        0x000000ff,            /* src_mask */
-        0x000000ff,            /* dst_mask */
-        FALSE),                /* pcrel_offset */
-+  /* 7 bit immediate for LDS/STS in AVR8L (Tiny architecture) */
-+  HOWTO (R_AVR_7_LDS16,         /* type */
-+         0,
-+         0,
-+         8,
-+         FALSE,
-+         0,
-+         complain_overflow_bitfield,
-+         bfd_elf_generic_reloc,
-+         "R_AVR_7_LDS16",
-+         FALSE,
-+         0xffff,
-+         0xffff,
-+         FALSE),
-+
- };
- /* Map BFD reloc types to AVR ELF reloc types.  */
-@@ -554,7 +569,8 @@ static const struct avr_reloc_map avr_re
-   { BFD_RELOC_AVR_LDI,              R_AVR_LDI  },
-   { BFD_RELOC_AVR_6,                R_AVR_6    },
-   { BFD_RELOC_AVR_6_ADIW,           R_AVR_6_ADIW },
--  { BFD_RELOC_8,                    R_AVR_8 }
-+  { BFD_RELOC_8,                    R_AVR_8 },
-+  { BFD_RELOC_AVR_7_LDS16,          R_AVR_7_LDS16 }
- };
- /* Meant to be filled one day with the wrap around address for the
-@@ -1085,6 +1101,17 @@ avr_final_link_relocate (reloc_howto_typ
-       bfd_put_16 (input_bfd, (bfd_vma) srel & 0xffff, contents+2);
-       break;
-+    case R_AVR_7_LDS16:
-+      contents += rel->r_offset;
-+      srel = (bfd_signed_vma) relocation + rel->r_addend;
-+      if ((srel & 0xFFFF) < 0x40 || (srel & 0xFFFF) > 0xbf)
-+        return bfd_reloc_outofrange;
-+      srel = srel & 0x7f;
-+      x = bfd_get_16 (input_bfd, contents);
-+      x |= (srel & 0x0f) | ((srel & 0x30) << 5) | ((srel & 0x40) << 2);
-+      bfd_put_16 (input_bfd, x, contents);
-+      break;
-+
-     case R_AVR_16_PM:
-       use_stubs = (!htab->no_stubs);
-       contents += rel->r_offset;
-diff -Naurp bfd/reloc.c bfd/reloc.c
---- bfd/reloc.c        2011-07-24 19:50:06.000000000 +0530
-+++ bfd/reloc.c        2012-07-20 18:31:38.000000000 +0530
-@@ -4314,6 +4314,11 @@ ENUM
- ENUMDOC
-   This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
-   instructions
-+ENUM
-+  BFD_RELOC_AVR_7_LDS16
-+ENUMDOC
-+  This is a 7 bit reloc for the AVR that stores offset for 16bit sts/lds
-+  instructions meant for tiny parts
- ENUM
-   BFD_RELOC_RX_NEG8
-diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
---- gas/config/tc-avr.c        2012-07-20 18:33:14.000000000 +0530
-+++ gas/config/tc-avr.c        2012-07-20 18:31:38.000000000 +0530
-@@ -879,17 +879,12 @@ avr_operand (struct avr_opcodes_s *opcod
-         op_mask = avr_get_constant (str, 31);
-         str = input_line_pointer;
-       }
--        if (strcmp(avr_mcu->name, "avrtiny10") == 0 
--           || strcmp(avr_mcu->name, "attiny10") == 0
--           || strcmp(avr_mcu->name, "attiny4")  == 0
--           || strcmp(avr_mcu->name, "attiny5")  == 0
--           || strcmp(avr_mcu->name, "attiny9")  == 0
--           || strcmp(avr_mcu->name, "attiny20") == 0
--           || strcmp(avr_mcu->name, "attiny40") == 0)
--      {
--                if(op_mask < 16)
--                as_bad (_("register number above 15 required"));
--      }
-+
-+      if (avr_mcu->mach == bfd_mach_avrtiny10)
-+      {
-+        if (op_mask < 16 || op_mask > 31)
-+           as_bad (_("register not supported"));
-+      } 
-       if (op_mask <= 31)
-       {
-@@ -1029,6 +1024,12 @@ avr_operand (struct avr_opcodes_s *opcod
-                  &op_expr, FALSE, BFD_RELOC_16);
-       break;
-+    case 'j':
-+      str = parse_exp (str, &op_expr);
-+      fix_new_exp (frag_now, where, opcode->insn_size * 2,
-+                   &op_expr, FALSE, BFD_RELOC_AVR_7_LDS16);
-+      break;
-+
-     case 'M':
-       {
-       bfd_reloc_code_real_type r_type;
-@@ -1337,6 +1338,16 @@ md_apply_fix (fixS *fixP, valueT * valP,
-         bfd_putl16 ((bfd_vma) insn | LDI_IMMEDIATE (value), where);
-         break;
-+        case BFD_RELOC_AVR_7_LDS16:
-+          if ((value < 0x40) || (value > 0xBF))
-+            as_warn_where (fixP->fx_file, fixP->fx_line,
-+                          _("operand out of range: 0x%lx"), (unsigned long)value);   
-+          insn |= value & 0xF;
-+          insn |= (value & 0x30) << 5;
-+          insn |= (value & 0x40) << 2;
-+          bfd_putl16 ((bfd_vma) insn, where);
-+          break;
-+ 
-       case BFD_RELOC_AVR_6:
-         if ((value > 63) || (value < 0))
-           as_bad_where (fixP->fx_file, fixP->fx_line,
-@@ -1522,7 +1533,18 @@ md_assemble (char *str)
-   if (!op[0])
-     as_bad (_("can't find opcode "));
--  opcode = (struct avr_opcodes_s *) hash_find (avr_hash, op);
-+  /* To handle Tiny (AVR8L) architecture peculiarities */
-+  if (avr_mcu->isa & AVR_ISA_TINY)
-+  {
-+    if (*op == 'l' && *(op+1) == 'd' && *(op+2) == 's' && !*(op+3))
-+      opcode = (struct avr_opcodes_s *) hash_find (avr_hash, "lds16");
-+    else if (*op == 's' && *(op+1) == 't' && *(op+2) == 's' && !*(op+3))
-+      opcode = (struct avr_opcodes_s *) hash_find (avr_hash, "sts16"); 
-+    else
-+      opcode = (struct avr_opcodes_s *) hash_find (avr_hash, op);
-+  }
-+  else
-+    opcode = (struct avr_opcodes_s *) hash_find (avr_hash, op);
-   if (opcode == NULL)
-     {
-diff -Naurp include/elf/avr.h include/elf/avr.h
---- include/elf/avr.h  2012-07-20 18:33:00.000000000 +0530
-+++ include/elf/avr.h  2012-07-20 18:31:38.000000000 +0530
-@@ -79,6 +79,7 @@ START_RELOC_NUMBERS (elf_avr_reloc_type)
-      RELOC_NUMBER (R_AVR_LO8_LDI_GS,         24)
-      RELOC_NUMBER (R_AVR_HI8_LDI_GS,         25)
-      RELOC_NUMBER (R_AVR_8,                  26)
-+     RELOC_NUMBER (R_AVR_7_LDS16,              27)
- END_RELOC_NUMBERS (R_AVR_max)
- #endif /* _ELF_AVR_H */
-diff -Naurp include/opcode/avr.h include/opcode/avr.h
---- include/opcode/avr.h       2012-07-20 18:32:17.000000000 +0530
-+++ include/opcode/avr.h       2012-07-20 18:31:38.000000000 +0530
-@@ -22,6 +22,7 @@
- #define AVR_ISA_LPM   0x0002 /* device has LPM */
- #define AVR_ISA_LPMX  0x0004 /* device has LPM Rd,Z[+] */
- #define AVR_ISA_SRAM  0x0008 /* device has SRAM (LD, ST, PUSH, POP, ...) */
-+#define AVR_ISA_TINY  0x0010 /* device has AVR8L core specific encodings */
- #define AVR_ISA_MEGA  0x0020 /* device has >8K program memory (JMP and CALL
-                               supported, no 8K wrap on RJMP and RCALL) */
- #define AVR_ISA_MUL   0x0040 /* device has new core (MUL, FMUL, ...) */
-@@ -74,7 +75,7 @@
- #define AVR_ISA_AVR7   (AVR_ISA_M8 | AVR_ISA_MEGA | AVR_ISA_BRK )
--#define AVR_ISA_AVRTINY10 (AVR_ISA_1200 | AVR_ISA_BRK | AVR_ISA_SRAM)
-+#define AVR_ISA_AVRTINY10 (AVR_ISA_1200 | AVR_ISA_BRK | AVR_ISA_SRAM | AVR_ISA_TINY)
- #define REGISTER_P(x) ((x) == 'r'             \
-                      || (x) == 'd'            \
-@@ -281,6 +282,8 @@ AVR_INSN (fmulsu,"a,a","000000111ddd1rrr
- AVR_INSN (sts,  "i,r", "1001001ddddd0000", 2, AVR_ISA_SRAM, 0x9200)
- AVR_INSN (lds,  "r,i", "1001000ddddd0000", 2, AVR_ISA_SRAM, 0x9000)
-+AVR_INSN (sts16,"j,d", "10101kkkddddkkkk", 1, AVR_ISA_TINY, 0xA800)
-+AVR_INSN (lds16,"d,j", "10100kkkddddkkkk", 1, AVR_ISA_TINY, 0xA000)
- AVR_INSN (xch,  "z,r", "1001001rrrrr0100", 1, AVR_ISA_XMEGAU, 0x9204)
- AVR_INSN (las,  "z,r", "1001001rrrrr0101", 1, AVR_ISA_XMEGAU, 0x9205)
-diff -Naurp opcodes/avr-dis.c opcodes/avr-dis.c
---- opcodes/avr-dis.c  2011-07-01 21:41:27.000000000 +0530
-+++ opcodes/avr-dis.c  2012-07-20 18:31:38.000000000 +0530
-@@ -187,7 +187,15 @@ avr_operand (unsigned int insn, unsigned
-     case 'i':
-       sprintf (buf, "0x%04X", insn2);
-       break;
--      
-+    case 'j':
-+      {
-+        unsigned int val = ((insn & 0xf) | ((insn & 0x600) >> 5)
-+                                         | ((insn & 0x100) >> 2));
-+        if (val > 0 && !(insn & 0x100))
-+          val |= 0x80;
-+        sprintf (buf, "0x%02x", val);
-+      }
-+      break;
-     case 'M':
-       sprintf (buf, "0x%02X", ((insn & 0xf00) >> 4) | (insn & 0xf));
-       sprintf (comment, "%d", ((insn & 0xf00) >> 4) | (insn & 0xf));
-@@ -379,8 +387,19 @@ print_insn_avr (bfd_vma addr, disassembl
-       comment2[0] = 0;
-     }
--  (*prin) (stream, "%s", ok ? opcode->name : ".word");
--
-+  if (ok)
-+  {
-+    /* In order to print 2byte sts/lds properly */ 
-+    if (!strncmp(opcode->name, "sts16", 5))
-+      (*prin) (stream, "%s", "sts");
-+    else if (!strncmp(opcode->name, "lds16", 5))
-+      (*prin) (stream, "%s", "lds");
-+    else 
-+      (*prin) (stream, "%s", opcode->name);
-+  }
-+  else
-+    (*prin) (stream, "%s", ".word");
-+    
-   if (*op1)
-       (*prin) (stream, "\t%s", op1);
diff --git a/504-binutils-avrtc530-backported.patch b/504-binutils-avrtc530-backported.patch
deleted file mode 100644 (file)
index 138c5a4..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Naurp ld/scripttempl/avr.sc ld/scripttempl/avr.sc
---- ld/scripttempl/avr.sc      2011-03-22 01:37:42.000000000 +0530
-+++ ld/scripttempl/avr.sc      2012-07-24 12:13:29.000000000 +0530
-@@ -161,7 +161,10 @@ SECTIONS
-   .data       ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
-   {
-     ${RELOCATING+ PROVIDE (__data_start = .) ; }
--    *(.data)
-+    /* --gc-sections will delete empty .data. This leads to wrong start
-+       addresses for subsequent sections because -Tdata= from the command
-+       line will have no effect, see PR13697.  Thus, keep .data  */
-+    KEEP (*(.data))
-     *(.data*)
-     *(.rodata)  /* We need to include .rodata here if gcc is used */
-     *(.rodata*) /* with -fdata-sections.  */
-@@ -195,7 +198,7 @@ SECTIONS
-   .eeprom ${RELOCATING-0}:
-   {
--    *(.eeprom*)
-+    KEEP(*(.eeprom*))
-     ${RELOCATING+ __eeprom_end = . ; }
-   } ${RELOCATING+ > eeprom}
index eec42f0b33634b0a764986b450f9571b15ce85db..9df9f2a4a39152180102bacc813eac365dd08a32 100644 (file)
@@ -5,65 +5,43 @@ Summary(pl.UTF-8):    Skrośne narzędzia programistyczne GNU dla AVR - binutils
 Summary(pt_BR.UTF-8):  Utilitários para desenvolvimento de binários da GNU - AVR binutils
 Summary(tr.UTF-8):     GNU geliştirme araçları - AVR binutils
 Name:          crossavr-binutils
-Version:       2.22
-Release:       3
+Version:       2.23.1
+Release:       1
 Epoch:         1
 Patch0:                am.patch
-# Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 3.4.1.830
-Patch100:      300-binutils-avr-size.patch
-Patch101:      301-binutils-avr-coff.patch
-Patch102:      302-binutils-as-dwarf.patch
-Patch103:      303-binutils-dwarf2-AVRStudio-workaround.patch
-Patch104:      304-binutils-bug13113.patch
-Patch105:      305-binutils-new-usb-insns.patch
-Patch106:      306-binutils-bug15573-AVRTC-419.patch
-Patch107:      307-binutils-fix-AVRTC-424.patch
-Patch108:      400-binutils-xmega.patch
-Patch109:      401-binutils-avrtiny10.patch
-Patch110:      402-binutils-at90pwm161.patch
-Patch111:      403-binutils-new-devices.patch
-Patch112:      404-binutils-attiny1634.patch
-Patch113:      405-binutils-atmega48pa.patch
-Patch114:      406-binutils-atxmega_16_32_a4u.patch
-Patch115:      407-binutils-atxmega64_128_192_256a3u.patch
-Patch116:      408-binutils-atmegarfr2_a2.patch
-Patch117:      409-binutils-atmega165pa.patch
-Patch118:      410-binutils-atxmega384c3.patch
-Patch119:      412-binutils-atxmega128a4u.patch
-Patch120:      413-binutils-atxmega64d4.patch
-Patch121:      414-binutils-atmega164pa_168pa_32a_64a.patch
-Patch122:      415-binutils-atxmega64_128_b3.patch
-Patch123:      416-binutils-atxmega64b1.patch
-Patch124:      417-binutils-atmega_8a_128a_1284.patch
-Patch125:      418-binutils-atxmega64a4u.patch
-Patch126:      419-binutils-atxmega128d4.patch
-Patch127:      420-binutils-atmxt336s.patch
-Patch128:      421-binutils-atxmega16c4_32c4_128c3_256c3.patch
-Patch129:      422-binutils-atxmega384d3.patch
-Patch130:      423-binutils-atmega48hvf.patch
-Patch131:      424-binutils-atmega26hvg.patch
-Patch132:      425-binutils-atmxt224_224e.patch
-Patch133:      426-binutils-atxmega192c3.patch
-Patch134:      427-binutils-atmxt112sl.patch
-Patch135:      428-binutils-atxmega64c3.patch
-Patch136:      429-binutils-ata6285_6286.patch
-Patch137:      430-binutils-attiny828.patch
-Patch138:      431-binutils-ata5790_5790N_5795.patch
-Patch139:      432-binutils-ata5272_5505.patch
-Patch140:      433-binutils-atmxt540s.patch
-Patch141:      434-binutils-ata5831.patch
-Patch142:      435-binutils-attiny841.patch
-Patch143:      436-binutils-atxmega32_16_8e5.patch
-Patch144:      500-binutils-bug13789.patch
-Patch145:      501-binutils-modify-usb-xmega-isa.patch
-Patch146:      502-binutils-add-config-section-tiny.patch
-Patch147:      503-binutils-avrtc193-tiny.patch
-Patch148:      504-binutils-avrtc530-backported.patch
-Patch149:      505-binutils-avrtc446.patch
+# Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 3.4.2
+# http://distribute.atmel.no/tools/opensource/Atmel-AVR-Toolchain-3.4.2/avr/avr-patches.tar.gz
+Patch100:      001-xmega-Makefile_am-typo.patch
+Patch101:      002-tinycore-support.patch
+Patch102:      003-RMW-insn-constriant.patch
+Patch103:      004-new-part-supports.patch
+Patch104:      005-additional-part-supports.patch
+Patch105:      006-xmega-showuage-typo.patch
+Patch106:      007-ata6289-architecture-correction.patch
+Patch107:      008-add-usersig-section.patch
+Patch108:      009-dwarf-relax-fix.patch
+Patch109:      010-disable-demand-paging.patch
+Patch110:      200-binutils-avr-size.patch
+Patch111:      201-binutils-dwarf2-AVRStudio-workaround.patch
+Patch112:      202-binutils-bug13113.patch
+Patch113:      400-binutils-atmxt336s.patch
+Patch114:      401-binutils-atmega48hvf.patch
+Patch115:      402-binutils-atmega26hvg.patch
+Patch116:      403-binutils-atmxt224_224e.patch
+Patch117:      404-binutils-atmxt112sl.patch
+Patch118:      405-binutils-atmxt540s.patch
+Patch119:      406-binutils-ata5831.patch
+Patch120:      407-binutils-attiny841.patch
+Patch121:      408-binutils-atmegarfa2.patch
+Patch122:      409-binutils-ata5790n.patch
+Patch123:      410-binutils-atmega64hve2.patch
+Patch124:      411-binutils-attiny474.patch
+Patch125:      412-binutils-atmxts200.patch
+Patch126:      500-binutils-avrtc530-backported.patch
 License:       GPL
 Group:         Development/Tools
 Source0:       ftp://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
-# Source0-md5: ee0f10756c84979622b992a4a61ea3f5
+# Source0-md5: 33adb18c3048d057ac58d07a3f1adb38
 URL:           http://sources.redhat.com/binutils/
 BuildRequires: automake
 BuildRequires: bash
@@ -135,29 +113,6 @@ Ten pakiet zawiera wersję skrośną generującą kod dla Atmel AVR.
 %patch124 -p0
 %patch125 -p0
 %patch126 -p0
-%patch127 -p0
-%patch128 -p0
-%patch129 -p0
-%patch130 -p0
-%patch131 -p0
-%patch132 -p0
-%patch133 -p0
-%patch134 -p0
-%patch135 -p0
-%patch136 -p0
-%patch137 -p0
-%patch138 -p0
-%patch139 -p0
-%patch140 -p0
-%patch141 -p0
-%patch142 -p0
-%patch143 -p0
-%patch144 -p0
-%patch145 -p0
-%patch146 -p0
-%patch147 -p0
-%patch148 -p0
-%patch149 -p0
 
 # Remove hacks for specific autoconf version.
 echo > config/override.m4
This page took 0.788498 seconds and 4 git commands to generate.