1 diff -rupN bfd/archures.c bfd/archures.c
2 --- bfd/archures.c 2011-05-11 20:06:37.000000000 -0500
3 +++ bfd/archures.c 2011-05-10 13:35:37.000000000 -0500
4 @@ -368,6 +368,7 @@ DESCRIPTION
5 .#define bfd_mach_avr5 5
6 .#define bfd_mach_avr51 51
7 .#define bfd_mach_avr6 6
8 +.#define bfd_mach_avrtiny10 100
9 .#define bfd_mach_avrxmega1 101
10 .#define bfd_mach_avrxmega2 102
11 .#define bfd_mach_avrxmega3 103
12 @@ -375,7 +376,6 @@ DESCRIPTION
13 .#define bfd_mach_avrxmega5 105
14 .#define bfd_mach_avrxmega6 106
15 .#define bfd_mach_avrxmega7 107
16 -.#define bfd_mach_avrtiny10 201
17 . bfd_arch_bfin, {* ADI Blackfin *}
18 .#define bfd_mach_bfin 1
19 . bfd_arch_cr16, {* National Semiconductor CompactRISC (ie CR16). *}
20 diff -rupN bfd/bfd-in2.h bfd/bfd-in2.h
21 --- bfd/bfd-in2.h 2011-05-11 20:06:39.000000000 -0500
22 +++ bfd/bfd-in2.h 2011-05-10 13:35:37.000000000 -0500
23 @@ -2042,6 +2042,7 @@ enum bfd_architecture
24 #define bfd_mach_avr5 5
25 #define bfd_mach_avr51 51
26 #define bfd_mach_avr6 6
27 +#define bfd_mach_avrtiny10 100
28 #define bfd_mach_avrxmega1 101
29 #define bfd_mach_avrxmega2 102
30 #define bfd_mach_avrxmega3 103
31 @@ -2049,7 +2050,6 @@ enum bfd_architecture
32 #define bfd_mach_avrxmega5 105
33 #define bfd_mach_avrxmega6 106
34 #define bfd_mach_avrxmega7 107
35 -#define bfd_mach_avrtiny10 201
36 bfd_arch_bfin, /* ADI Blackfin */
37 #define bfd_mach_bfin 1
38 bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
39 diff -rupN bfd/cpu-avr.c bfd/cpu-avr.c
40 --- bfd/cpu-avr.c 2011-05-11 20:06:41.000000000 -0500
41 +++ bfd/cpu-avr.c 2011-05-10 13:35:37.000000000 -0500
42 @@ -135,29 +135,29 @@ static const bfd_arch_info_type arch_inf
44 N (22, bfd_mach_avr6, "avr:6", FALSE, & arch_info_struct[10]),
47 + N (16, bfd_mach_avrtiny10, "avr:100", FALSE, & arch_info_struct[11]),
50 - N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[11]),
51 + N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[12]),
54 - N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[12]),
55 + N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[13]),
58 - N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[13]),
59 + N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[14]),
62 - N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[14]),
63 + N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[15]),
66 - N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[15]),
67 + N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[16]),
70 - N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[16]),
71 + N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[17]),
74 - N (24, bfd_mach_avrxmega7, "avr:107", FALSE, & arch_info_struct[17]),
77 - N (16, bfd_mach_avrtiny10, "avr:201", FALSE, NULL)
78 + N (24, bfd_mach_avrxmega7, "avr:107", FALSE, NULL)
82 diff -rupN include/elf/avr.h include/elf/avr.h
83 --- include/elf/avr.h 2011-05-11 20:06:42.000000000 -0500
84 +++ include/elf/avr.h 2011-05-10 13:35:37.000000000 -0500
86 #define E_AVR_MACH_AVR5 5
87 #define E_AVR_MACH_AVR51 51
88 #define E_AVR_MACH_AVR6 6
89 +#define E_AVR_MACH_AVRTINY10 100
90 #define E_AVR_MACH_XMEGA1 101
91 #define E_AVR_MACH_XMEGA2 102
92 #define E_AVR_MACH_XMEGA3 103
94 #define E_AVR_MACH_XMEGA5 105
95 #define E_AVR_MACH_XMEGA6 106
96 #define E_AVR_MACH_XMEGA7 107
97 -#define E_AVR_MACH_AVRTINY10 201
100 START_RELOC_NUMBERS (elf_avr_reloc_type)
101 diff -rupN ld/emulparams/avrtiny10.sh ld/emulparams/avrtiny10.sh
102 --- ld/emulparams/avrtiny10.sh 2011-05-11 20:06:44.000000000 -0500
103 +++ ld/emulparams/avrtiny10.sh 2011-05-10 13:39:44.000000000 -0500
109 +SCRIPT_NAME=avrtiny10
110 OUTPUT_FORMAT="elf32-avr"
117 -DATA_ORIGIN=0x800040
119 +DATA_ORIGIN=0x0800040
122 diff -rupN ld/Makefile.am ld/Makefile.am
123 --- ld/Makefile.am 2011-05-11 20:06:47.000000000 -0500
124 +++ ld/Makefile.am 2011-05-10 13:35:37.000000000 -0500
125 @@ -764,7 +764,7 @@ eavrxmega7.c: $(srcdir)/emulparams/avrxm
127 ${GENSCRIPTS} avrxmega7 "$(tdir_avr2)"
128 eavrtiny10.c: $(srcdir)/emulparams/avrtiny10.sh \
129 - $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
130 + $(srcdir)/emultempl/avrelf.em $(ELF_DEPS) $(srcdir)/scripttempl/avrtiny10.sc \
132 ${GENSCRIPTS} avrtiny10 "$(tdir_avr2)"
133 ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
134 diff -rupN ld/scripttempl/avrtiny10.sc ld/scripttempl/avrtiny10.sc
135 --- ld/scripttempl/avrtiny10.sc 1969-12-31 18:00:00.000000000 -0600
136 +++ ld/scripttempl/avrtiny10.sc 2011-05-10 13:35:37.000000000 -0500
139 +OUTPUT_FORMAT("${OUTPUT_FORMAT}","${OUTPUT_FORMAT}","${OUTPUT_FORMAT}")
140 +OUTPUT_ARCH(${ARCH})
144 + text (rx) : ORIGIN = $TEXT_ORIGIN, LENGTH = $TEXT_LENGTH
145 + data (rw!x) : ORIGIN = $DATA_ORIGIN, LENGTH = $DATA_LENGTH
146 + lock (rw!x) : ORIGIN = 0x3F00, LENGTH = 2
147 + signature (rw!x) : ORIGIN = 0x3FC0, LENGTH = 4
148 +/* REVISIT: fuse(rw!x) : */
153 + /* Read-only sections, merged into text segment: */
154 + ${TEXT_DYNAMIC+${DYNAMIC}}
155 + .hash ${RELOCATING-0} : { *(.hash) }
156 + .dynsym ${RELOCATING-0} : { *(.dynsym) }
157 + .dynstr ${RELOCATING-0} : { *(.dynstr) }
158 + .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
159 + .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
160 + .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
162 + .rel.init ${RELOCATING-0} : { *(.rel.init) }
163 + .rela.init ${RELOCATING-0} : { *(.rela.init) }
164 + .rel.text ${RELOCATING-0} :
167 + ${RELOCATING+*(.rel.text.*)}
168 + ${RELOCATING+*(.rel.gnu.linkonce.t*)}
170 + .rela.text ${RELOCATING-0} :
173 + ${RELOCATING+*(.rela.text.*)}
174 + ${RELOCATING+*(.rela.gnu.linkonce.t*)}
176 + .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
177 + .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
178 + .rel.rodata ${RELOCATING-0} :
181 + ${RELOCATING+*(.rel.rodata.*)}
182 + ${RELOCATING+*(.rel.gnu.linkonce.r*)}
184 + .rela.rodata ${RELOCATING-0} :
187 + ${RELOCATING+*(.rela.rodata.*)}
188 + ${RELOCATING+*(.rela.gnu.linkonce.r*)}
190 + .rel.data ${RELOCATING-0} :
193 + ${RELOCATING+*(.rel.data.*)}
194 + ${RELOCATING+*(.rel.gnu.linkonce.d*)}
196 + .rela.data ${RELOCATING-0} :
199 + ${RELOCATING+*(.rela.data.*)}
200 + ${RELOCATING+*(.rela.gnu.linkonce.d*)}
202 + .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
203 + .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
204 + .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
205 + .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
206 + .rel.got ${RELOCATING-0} : { *(.rel.got) }
207 + .rela.got ${RELOCATING-0} : { *(.rela.got) }
208 + .rel.bss ${RELOCATING-0} : { *(.rel.bss) }
209 + .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
210 + .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
211 + .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
213 + /* Internal text space or external memory. */
214 + .text ${RELOCATING-0} : ${RELOCATING+ AT (0x0)}
219 + /* For data that needs to reside in the lower 64k of progmem. */
222 + ${RELOCATING+. = ALIGN(2);}
224 + ${CONSTRUCTING+ __trampolines_start = . ; }
225 + /* The jump trampolines for the 16-bit limited relocs will reside here. */
228 + ${CONSTRUCTING+ __trampolines_end = . ; }
230 + /* For future tablejump instruction arrays for 3 byte pc devices.
231 + We don't relax jump/call instructions within these sections. */
235 + /* For code that needs to reside in the lower 128k progmem. */
239 + ${CONSTRUCTING+ __ctors_start = . ; }
240 + ${CONSTRUCTING+ *(.ctors) }
241 + ${CONSTRUCTING+ __ctors_end = . ; }
242 + ${CONSTRUCTING+ __dtors_start = . ; }
243 + ${CONSTRUCTING+ *(.dtors) }
244 + ${CONSTRUCTING+ __dtors_end = . ; }
245 + KEEP(SORT(*)(.ctors))
246 + KEEP(SORT(*)(.dtors))
248 + /* From this point on, we don't bother about wether the insns are
249 + below or above the 16 bits boundary. */
250 + *(.init0) /* Start here after reset. */
254 + *(.init2) /* Clear __zero_reg__, set up stack pointer. */
258 + *(.init4) /* Initialize data and BSS. */
262 + *(.init6) /* C++ constructors. */
268 + *(.init9) /* Call main(). */
271 + ${RELOCATING+. = ALIGN(2);}
273 + ${RELOCATING+. = ALIGN(2);}
274 + *(.fini9) /* _exit() starts here. */
280 + *(.fini6) /* C++ destructors. */
292 + *(.fini0) /* Infinite loop after program termination. */
294 + ${RELOCATING+ _etext = . ; }
295 + } ${RELOCATING+ > text}
297 + .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
299 + ${RELOCATING+ PROVIDE (__data_start = .) ; }
302 + *(.rodata) /* We need to include .rodata here if gcc is used */
303 + *(.rodata*) /* with -fdata-sections. */
304 + *(.gnu.linkonce.d*)
305 + ${RELOCATING+. = ALIGN(2);}
306 + ${RELOCATING+ _edata = . ; }
307 + ${RELOCATING+ PROVIDE (__data_end = .) ; }
308 + } ${RELOCATING+ > data}
310 + .bss ${RELOCATING-0} :${RELOCATING+ AT (ADDR (.bss))}
312 + ${RELOCATING+ PROVIDE (__bss_start = .) ; }
316 + ${RELOCATING+ PROVIDE (__bss_end = .) ; }
317 + } ${RELOCATING+ > data}
319 + ${RELOCATING+ __data_load_start = LOADADDR(.data); }
320 + ${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
322 + /* Global data not cleared after reset. */
323 + .noinit ${RELOCATING-0}:
325 + ${RELOCATING+ PROVIDE (__noinit_start = .) ; }
327 + ${RELOCATING+ PROVIDE (__noinit_end = .) ; }
328 + ${RELOCATING+ _end = . ; }
329 + ${RELOCATING+ PROVIDE (__heap_start = .) ; }
330 + } ${RELOCATING+ > data}
332 + .lock ${RELOCATING-0}:
335 + } ${RELOCATING+ > lock}
337 + .signature ${RELOCATING-0}:
339 + KEEP(*(.signature*))
340 + } ${RELOCATING+ > signature}
342 + /* Stabs debugging sections. */
343 + .stab 0 : { *(.stab) }
344 + .stabstr 0 : { *(.stabstr) }
345 + .stab.excl 0 : { *(.stab.excl) }
346 + .stab.exclstr 0 : { *(.stab.exclstr) }
347 + .stab.index 0 : { *(.stab.index) }
348 + .stab.indexstr 0 : { *(.stab.indexstr) }
349 + .comment 0 : { *(.comment) }
351 + /* DWARF debug sections.
352 + Symbols in the DWARF debugging sections are relative to the beginning
353 + of the section so we begin them at 0. */
356 + .debug 0 : { *(.debug) }
357 + .line 0 : { *(.line) }
359 + /* GNU DWARF 1 extensions */
360 + .debug_srcinfo 0 : { *(.debug_srcinfo) }
361 + .debug_sfnames 0 : { *(.debug_sfnames) }
363 + /* DWARF 1.1 and DWARF 2 */
364 + .debug_aranges 0 : { *(.debug_aranges) }
365 + .debug_pubnames 0 : { *(.debug_pubnames) }
368 + .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
369 + .debug_abbrev 0 : { *(.debug_abbrev) }
370 + .debug_line 0 : { *(.debug_line) }
371 + .debug_frame 0 : { *(.debug_frame) }
372 + .debug_str 0 : { *(.debug_str) }
373 + .debug_loc 0 : { *(.debug_loc) }
374 + .debug_macinfo 0 : { *(.debug_macinfo) }