Author: kosmo                        Date: Sun Feb 19 20:52:13 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- synchronized patches with Atmel official AVR8-GNU toolchain.
- downgraded to 2.20.1
- epoch 1

---- Files affected:
packages/crossavr-binutils:
   crossavr-binutils.spec (1.37 -> 1.38) , 300-binutils-2.20.1-avr-size.patch 
(NONE -> 1.1)  (NEW), 301-binutils-2.20.1-avr-coff.patch (NONE -> 1.1)  (NEW), 
302-binutils-2.20.1-new-sections.patch (NONE -> 1.1)  (NEW), 
303-binutils-2.20.1-as-dwarf.patch (NONE -> 1.1)  (NEW), 
304-binutils-2.20.1-dwarf2-AVRStudio-workaround.patch (NONE -> 1.1)  (NEW), 
305-binutils-2.20.1-assembler-options.patch (NONE -> 1.1)  (NEW), 
400-binutils-2.20.1-xmega.patch (NONE -> 1.1)  (NEW), 
401-binutils-2.20.1-new-devices.patch (NONE -> 1.1)  (NEW), 
402-binutils-2.20.1-avrtiny10.patch (NONE -> 1.1)  (NEW), 
403-binutils-2.20.1-xmega128a1u-64a1u.patch (NONE -> 1.1)  (NEW), 
404-binutils-2.20.1-atxmega32x1.patch (NONE -> 1.1)  (NEW), 
405-binutils-2.20.1-atxmega128b1.patch (NONE -> 1.1)  (NEW), 
406-binutils-2.20.1-atxmega256a3bu.patch (NONE -> 1.1)  (NEW), 
407-binutils-2.20.1-at90pwm161.patch (NONE -> 1.1)  (NEW), 
408-binutils-2.20.1-atmega16hvb-32hvb.patch (NONE -> 1.1)  (NEW), 
409-binutils-2.20.1-atmega32_5_50_90_pa.patch (NONE -> 1.1)  (NEW), 
410-binutils-2.20.1-attiny1634.patch (NONE -> 1.1)  (NEW), 
411-binutils-2.20.1-atmega48pa.patch (NONE -> 1.1)  (NEW), 
412-binutils-2.20.1-atxmega_16_32_a4u.patch (NONE -> 1.1)  (NEW), 
413-binutils-2.20.1-atxmega64_128_192_256a3u.patch (NONE -> 1.1)  (NEW), 
414-binutils-2.20.1-atmegarfr2_a2.patch (NONE -> 1.1)  (NEW), 
415-binutils-2.20.1-atmega165pa.patch (NONE -> 1.1)  (NEW), 
416-binutils-2.20.1-atxmega384c3.patch (NONE -> 1.1)  (NEW), 
417-binutils-2.20.1-attiny80.patch (NONE -> 1.1)  (NEW), 
418-binutils-2.20.1-atxmega128a4u.patch (NONE -> 1.1)  (NEW), 
419-binutils-2.20.1-atxmega64d4.patch (NONE -> 1.1)  (NEW), 
420-binutils-2.20.1-atmega164pa_168pa_32a_64a.patch (NONE -> 1.1)  (NEW), 
421-binutils-2.20.1-atxmega64_128_b3.patch (NONE -> 1.1)  (NEW), 
422-binutils-2.20.1-atxmega64b1.patch (NONE -> 1.1)  (NEW), 
423-binutils-2.20.1-atmega_8a_128a_1284.patch (NONE -> 1.1)  (NEW), 
424-binutils-2.20.1-atxmega64a4u.patch (NONE -> 1.1)  (NEW), 
425-binutils-2.20.1-atxmega128d4.patch (NONE -> 1.1)  (NEW), 
426-binutils-2.20.1-atmxt336s.patch (NONE -> 1.1)  (NEW), 
427-binutils-2.20.1-atxmega16c4_32c4_128c3_256c3.patch (NONE -> 1.1)  (NEW), 
428-binutils-2.20.1-atxmega384d3.patch (NONE -> 1.1)  (NEW), 
429-binutils-2.20.1-atmega48hvf.patch (NONE -> 1.1)  (NEW), 
430-binutils-2.20.1-atmega26hvg.patch (NONE -> 1.1)  (NEW), 
431-binutils-2.20.1-atmxt224_224e.patch (NONE -> 1.1)  (NEW), 
431-binutils-2.20.1-atxmega192c3.patch (NONE -> 1.1)  (NEW), 
500-binutils-2.20.1-bug13789.patch (NONE -> 1.1)  (NEW), 
501-binutils-2.20.1-bug13113.patch (NONE -> 1.1)  (NEW), 
crossavr-binutils-xmega.patch (1.3 -> NONE)  (REMOVED), 
crossavr-binutils-new-sections.patch (1.2 -> NONE)  (REMOVED), 
crossavr-binutils-avr-size.patch (1.3 -> NONE)  (REMOVED), 
crossavr-binutils-avr-coff.patch (1.3 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/crossavr-binutils/crossavr-binutils.spec
diff -u packages/crossavr-binutils/crossavr-binutils.spec:1.37 
packages/crossavr-binutils/crossavr-binutils.spec:1.38
--- packages/crossavr-binutils/crossavr-binutils.spec:1.37      Sat Jun 18 
22:33:00 2011
+++ packages/crossavr-binutils/crossavr-binutils.spec   Sun Feb 19 21:52:06 2012
@@ -6,16 +6,55 @@
 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.21
+Version:       2.20.1
 Release:       1
+Epoch:         1
+# Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 
3.3.1.481.
+Patch100:      300-binutils-2.20.1-avr-size.patch
+Patch101:      301-binutils-2.20.1-avr-coff.patch
+Patch102:      302-binutils-2.20.1-new-sections.patch
+Patch103:      303-binutils-2.20.1-as-dwarf.patch
+Patch104:      304-binutils-2.20.1-dwarf2-AVRStudio-workaround.patch
+Patch105:      305-binutils-2.20.1-assembler-options.patch
+Patch106:      400-binutils-2.20.1-xmega.patch
+Patch107:      401-binutils-2.20.1-new-devices.patch
+Patch108:      402-binutils-2.20.1-avrtiny10.patch
+Patch109:      403-binutils-2.20.1-xmega128a1u-64a1u.patch
+Patch110:      404-binutils-2.20.1-atxmega32x1.patch
+Patch111:      405-binutils-2.20.1-atxmega128b1.patch
+Patch112:      406-binutils-2.20.1-atxmega256a3bu.patch
+Patch113:      407-binutils-2.20.1-at90pwm161.patch
+Patch114:      408-binutils-2.20.1-atmega16hvb-32hvb.patch
+Patch115:      409-binutils-2.20.1-atmega32_5_50_90_pa.patch
+Patch116:      410-binutils-2.20.1-attiny1634.patch
+Patch117:      411-binutils-2.20.1-atmega48pa.patch
+Patch118:      412-binutils-2.20.1-atxmega_16_32_a4u.patch
+Patch119:      413-binutils-2.20.1-atxmega64_128_192_256a3u.patch
+Patch120:      414-binutils-2.20.1-atmegarfr2_a2.patch
+Patch121:      415-binutils-2.20.1-atmega165pa.patch
+Patch122:      416-binutils-2.20.1-atxmega384c3.patch
+Patch123:      417-binutils-2.20.1-attiny80.patch
+Patch124:      418-binutils-2.20.1-atxmega128a4u.patch
+Patch125:      419-binutils-2.20.1-atxmega64d4.patch
+Patch126:      420-binutils-2.20.1-atmega164pa_168pa_32a_64a.patch
+Patch127:      421-binutils-2.20.1-atxmega64_128_b3.patch
+Patch128:      422-binutils-2.20.1-atxmega64b1.patch
+Patch129:      423-binutils-2.20.1-atmega_8a_128a_1284.patch
+Patch130:      424-binutils-2.20.1-atxmega64a4u.patch
+Patch131:      425-binutils-2.20.1-atxmega128d4.patch
+Patch132:      426-binutils-2.20.1-atmxt336s.patch
+Patch133:      427-binutils-2.20.1-atxmega16c4_32c4_128c3_256c3.patch
+Patch134:      428-binutils-2.20.1-atxmega384d3.patch
+Patch135:      429-binutils-2.20.1-atmega48hvf.patch
+Patch136:      430-binutils-2.20.1-atmega26hvg.patch
+Patch137:      431-binutils-2.20.1-atmxt224_224e.patch
+Patch138:      431-binutils-2.20.1-atxmega192c3.patch
+Patch139:      500-binutils-2.20.1-bug13789.patch
+Patch140:      501-binutils-2.20.1-bug13113.patch
 License:       GPL
 Group:         Development/Tools
 Source0:       ftp://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
-# Source0-md5: c84c5acc9d266f1a7044b51c85a823f5
-Patch0:                %{name}-avr-size.patch
-Patch1:                %{name}-avr-coff.patch
-Patch2:                %{name}-new-sections.patch
-Patch3:                %{name}-xmega.patch
+# Source0-md5: 2b9dc8f2b7dbd5ec5992c6e29de0b764
 URL:           http://sources.redhat.com/binutils/
 BuildRequires: automake
 BuildRequires: bash
@@ -58,10 +97,47 @@
 
 %prep
 %setup -q -n binutils-%{version}
-%patch0 -p0
-%patch1 -p1
-%patch2 -p0
-%patch3 -p1
+%patch100 -p0
+%patch101 -p0
+%patch102 -p0
+%patch103 -p0
+%patch104 -p0
+%patch105 -p0
+%patch106 -p0
+%patch107 -p0
+%patch108 -p0
+%patch109 -p0
+%patch110 -p0
+%patch111 -p0
+%patch112 -p0
+%patch113 -p0
+%patch114 -p0
+%patch115 -p0
+%patch116 -p0
+%patch117 -p0
+%patch118 -p0
+%patch119 -p0
+%patch120 -p0
+%patch121 -p0
+%patch122 -p0
+%patch123 -p0
+%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
 
 %build
 cp /usr/share/automake/config.sub .
@@ -75,6 +151,7 @@
 %endif
 ./configure \
        --disable-shared \
+       --disable-werror \
        --prefix=%{_prefix} \
        --libdir=%{_libdir} \
        --mandir=%{_mandir} \
@@ -135,6 +212,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.38  2012/02/19 20:52:06  kosmo
+- synchronized patches with Atmel official AVR8-GNU toolchain.
+- downgraded to 2.20.1
+- epoch 1
+
 Revision 1.37  2011/06/18 20:33:00  bszx
 - updated to 2.21
 

================================================================
Index: packages/crossavr-binutils/300-binutils-2.20.1-avr-size.patch
diff -u /dev/null 
packages/crossavr-binutils/300-binutils-2.20.1-avr-size.patch:1.1
--- /dev/null   Sun Feb 19 21:52:13 2012
+++ packages/crossavr-binutils/300-binutils-2.20.1-avr-size.patch       Sun Feb 
19 21:52:06 2012
@@ -0,0 +1,521 @@
+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
+@@ -36,10 +36,31 @@
+ #include "getopt.h"
+ #include "bucomm.h"
+ 
+-#ifndef BSD_DEFAULT
+-#define BSD_DEFAULT 1
++typedef enum
++{
++    format_sysv = 0,
++    format_bsd = 1,
++    format_avr = 2,
++} format_type_t;
++
++
++/* Set the default format. */
++#define FORMAT_DEFAULT_SYSV 0
++#define FORMAT_DEFAULT_BSD 1
++#define FORMAT_DEFAULT_AVR 0
++
++#if FORMAT_DEFAULT_SYSV
++    #define FORMAT_DEFAULT format_sysv
++    #define FORMAT_NAME "sysv"
++#elif FORMAT_DEFAULT_BSD
++    #define FORMAT_DEFAULT format_bsd
++    #define FORMAT_NAME "berkeley"
++#elif FORMAT_DEFAULT_AVR
++    #define FORMAT_DEFAULT format_avr
++    #define FORMAT_NAME "avr"
+ #endif
+ 
++
+ /* Program options.  */
+ 
+ static enum
+@@ -48,9 +69,8 @@ static enum
+   }
+ radix = decimal;
+ 
+-/* 0 means use AT&T-style output.  */
+-static int berkeley_format = BSD_DEFAULT;
+ 
++format_type_t format = FORMAT_DEFAULT;
+ 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;
+ /* Program exit status.  */
+ static int return_code = 0;
+ 
++
++/* AVR Size specific stuff */
++
++#define AVR64 64UL
++#define AVR128 128UL
++#define AVR256 256UL
++#define AVR512 512UL
++#define AVR1K 1024UL
++#define AVR2K 2048UL
++#define AVR4K 4096UL
++#define AVR8K 8192UL
++#define AVR16K 16384UL
++#define AVR20K 20480UL
++#define AVR24K 24576UL
++#define AVR32K 32768UL
++#define AVR36K 36864UL
++#define AVR40K 40960UL
++#define AVR64K 65536UL
++#define AVR68K 69632UL
++#define AVR128K 131072UL
++#define AVR136K 139264UL
++#define AVR200K 204800UL
++#define AVR256K 262144UL
++#define AVR264K 270336UL
++
++typedef struct
++{
++    char *name;
++      long flash;
++      long ram;
++      long eeprom;
++} avr_device_t;
++
++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},
++
++      {"atxmega64a1",   AVR68K,  AVR4K,  AVR2K},
++      {"atxmega64a1u",  AVR68K,  AVR4K,  AVR2K},
++      {"atxmega64a3",   AVR68K,  AVR4K,  AVR2K},
++      {"atxmega64d3",   AVR68K,  AVR4K,  AVR2K},
++
++      {"at90can64",     AVR64K,  AVR4K,  AVR2K},
++      {"at90scr100",    AVR64K,  AVR4K,  AVR2K},
++      {"at90usb646",    AVR64K,  AVR4K,  AVR2K},
++      {"at90usb647",    AVR64K,  AVR4K,  AVR2K},
++      {"atmega64",      AVR64K,  AVR4K,  AVR2K},
++      {"atmega640",     AVR64K,  AVR8K,  AVR4K},
++      {"atmega644",     AVR64K,  AVR4K,  AVR2K},
++      {"atmega644a",    AVR64K,  AVR4K,  AVR2K},
++      {"atmega644p",    AVR64K,  AVR4K,  AVR2K},
++      {"atmega644pa",   AVR64K,  AVR4K,  AVR2K},
++      {"atmega645",     AVR64K,  AVR4K,  AVR2K},
++      {"atmega645a",    AVR64K,  AVR4K,  AVR2K},
++      {"atmega645p",    AVR64K,  AVR4K,  AVR2K},
++      {"atmega6450",    AVR64K,  AVR4K,  AVR2K},
++      {"atmega6450a",   AVR64K,  AVR4K,  AVR2K},
++      {"atmega6450p",   AVR64K,  AVR4K,  AVR2K},
++      {"atmega649",     AVR64K,  AVR4K,  AVR2K},
++      {"atmega649a",    AVR64K,  AVR4K,  AVR2K},
++      {"atmega649p",    AVR64K,  AVR4K,  AVR2K},
++      {"atmega6490",    AVR64K,  AVR4K,  AVR2K},
++      {"atmega6490a",   AVR64K,  AVR4K,  AVR2K},
++      {"atmega6490p",   AVR64K,  AVR4K,  AVR2K},
++      {"atmega64c1",    AVR64K,  AVR4K,  AVR2K},
++      {"atmega64hve",   AVR64K,  AVR4K,  AVR1K},
++      {"atmega64m1",    AVR64K,  AVR4K,  AVR2K},
++   {"m3000",         AVR64K,  AVR4K,  0UL},
++
++      {"atmega406",     AVR40K,  AVR2K,  AVR512},
++
++      {"atxmega32a4",   AVR36K,  AVR4K,  AVR1K},
++      {"atxmega32d4",   AVR36K,  AVR4K,  AVR1K},
++
++      {"at90can32",     AVR32K,  AVR2K,  AVR1K},
++      {"at94k",         AVR32K,  AVR4K,  0UL},
++      {"atmega32",      AVR32K,  AVR2K,  AVR1K},
++      {"atmega323",     AVR32K,  AVR2K,  AVR1K},
++      {"atmega324a",    AVR32K,  AVR2K,  AVR1K},
++      {"atmega324p",    AVR32K,  AVR2K,  AVR1K},
++      {"atmega324pa",   AVR32K,  AVR2K,  AVR1K},
++      {"atmega325",     AVR32K,  AVR2K,  AVR1K},
++      {"atmega325a",    AVR32K,  AVR2K,  AVR1K},
++      {"atmega325p",    AVR32K,  AVR2K,  AVR1K},
++      {"atmega3250",    AVR32K,  AVR2K,  AVR1K},
++      {"atmega3250a",   AVR32K,  AVR2K,  AVR1K},
++      {"atmega3250p",   AVR32K,  AVR2K,  AVR1K},
++      {"atmega328",     AVR32K,  AVR2K,  AVR1K},
++      {"atmega328p",    AVR32K,  AVR2K,  AVR1K},
++      {"atmega329",     AVR32K,  AVR2K,  AVR1K},
++      {"atmega329a",    AVR32K,  AVR2K,  AVR1K},
++      {"atmega329p",    AVR32K,  AVR2K,  AVR1K},
++      {"atmega329pa",   AVR32K,  AVR2K,  AVR1K},
++      {"atmega3290",    AVR32K,  AVR2K,  AVR1K},
++      {"atmega3290a",   AVR32K,  AVR2K,  AVR1K},
++      {"atmega3290p",   AVR32K,  AVR2K,  AVR1K},
++      {"atmega32hvb",   AVR32K,  AVR2K,  AVR1K},
++      {"atmega32c1",    AVR32K,  AVR2K,  AVR1K},
++   {"atmega32hvb",   AVR32K,  AVR2K,  AVR1K},
++      {"atmega32m1",    AVR32K,  AVR2K,  AVR1K},
++      {"atmega32u2",    AVR32K,  AVR1K,  AVR1K},
++      {"atmega32u4",    AVR32K,  2560UL, AVR1K},
++      {"atmega32u6",    AVR32K,  2560UL, AVR1K},
++
++      {"at43usb355",    AVR24K,  1120UL,   0UL},
++
++      {"atxmega16a4",   AVR20K,  AVR2K,  AVR1K},
++      {"atxmega16d4",   AVR20K,  AVR2K,  AVR1K},
++
++      {"at76c711",      AVR16K,  AVR2K,  0UL},
++      {"at90pwm216",    AVR16K,  AVR1K,  AVR512},
++      {"at90pwm316",    AVR16K,  AVR1K,  AVR512},
++      {"at90usb162",    AVR16K,  AVR512, AVR512},
++      {"atmega16",      AVR16K,  AVR1K,  AVR512},
++      {"atmega16a",     AVR16K,  AVR1K,  AVR512},
++      {"atmega161",     AVR16K,  AVR1K,  AVR512},
++      {"atmega162",     AVR16K,  AVR1K,  AVR512},
++      {"atmega163",     AVR16K,  AVR1K,  AVR512},
++      {"atmega164",     AVR16K,  AVR1K,  AVR512},
++      {"atmega164a",    AVR16K,  AVR1K,  AVR512},
++      {"atmega164p",    AVR16K,  AVR1K,  AVR512},
++      {"atmega165a",    AVR16K,  AVR1K,  AVR512},
++      {"atmega165",     AVR16K,  AVR1K,  AVR512},
++      {"atmega165p",    AVR16K,  AVR1K,  AVR512},
++      {"atmega168",     AVR16K,  AVR1K,  AVR512},
++      {"atmega168a",    AVR16K,  AVR1K,  AVR512},
++      {"atmega168p",    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},
++      {"atmega16m1",    AVR16K,  AVR1K,  AVR512},
++      {"atmega16u2",    AVR16K,  AVR512, AVR512},
++      {"atmega16u4",    AVR16K,  1280UL, AVR512},
++      {"attiny167",     AVR16K,  AVR512, AVR512},
++
++      {"at90c8534",     AVR8K,   352UL,  AVR512},
++      {"at90pwm1",      AVR8K,   AVR512, AVR512},
++      {"at90pwm2",      AVR8K,   AVR512, AVR512},
++      {"at90pwm2b",     AVR8K,   AVR512, AVR512},
++      {"at90pwm3",      AVR8K,   AVR512, AVR512},
++      {"at90pwm3b",     AVR8K,   AVR512, AVR512},
++      {"at90pwm81",     AVR8K,   AVR256, AVR512},
++      {"at90s8515",     AVR8K,   AVR512, AVR512},
++      {"at90s8535",     AVR8K,   AVR512, AVR512},
++      {"at90usb82",     AVR8K,   AVR512, AVR512},
++      {"ata6289",       AVR8K,   AVR512, 320UL},
++      {"atmega8",       AVR8K,   AVR1K,  AVR512},
++      {"atmega8515",    AVR8K,   AVR512, AVR512},
++      {"atmega8535",    AVR8K,   AVR512, AVR512},
++      {"atmega88",      AVR8K,   AVR1K,  AVR512},
++      {"atmega88a",     AVR8K,   AVR1K,  AVR512},
++      {"atmega88p",     AVR8K,   AVR1K,  AVR512},
++      {"atmega88pa",    AVR8K,   AVR1K,  AVR512},
++      {"atmega8hva",    AVR8K,   768UL,  AVR256},
++      {"atmega8u2",     AVR8K,   AVR512, AVR512},
++      {"attiny84",      AVR8K,   AVR512, AVR512},
++      {"attiny84a",     AVR8K,   AVR512, AVR512},
++      {"attiny85",      AVR8K,   AVR512, AVR512},
++      {"attiny861",     AVR8K,   AVR512, AVR512},
++      {"attiny861a",    AVR8K,   AVR512, AVR512},
++      {"attiny87",      AVR8K,   AVR512, AVR512},
++      {"attiny88",      AVR8K,   AVR512, AVR64},
++
++      {"at90s4414",     AVR4K,   352UL,  AVR256},
++      {"at90s4433",     AVR4K,   AVR128, AVR256},
++      {"at90s4434",     AVR4K,   352UL,  AVR256},
++      {"atmega48",      AVR4K,   AVR512, AVR256},
++      {"atmega48a",     AVR4K,   AVR512, AVR256},
++      {"atmega48p",     AVR4K,   AVR512, AVR256},
++      {"attiny4313",    AVR4K,   AVR256, AVR256},
++      {"attiny43u",     AVR4K,   AVR256, AVR64},
++      {"attiny44",      AVR4K,   AVR256, AVR256},
++      {"attiny44a",     AVR4K,   AVR256, AVR256},
++      {"attiny45",      AVR4K,   AVR256, AVR256},
++      {"attiny461",     AVR4K,   AVR256, AVR256},
++      {"attiny461a",    AVR4K,   AVR256, AVR256},
++      {"attiny48",      AVR4K,   AVR256, AVR64},
++
++      {"at86rf401",     AVR2K,   224UL,  AVR128},
++      {"at90s2313",     AVR2K,   AVR128, AVR128},
++      {"at90s2323",     AVR2K,   AVR128, AVR128},
++      {"at90s2333",     AVR2K,   224UL,  AVR128},
++      {"at90s2343",     AVR2K,   AVR128, AVR128},
++   {"attiny20",      AVR2K,   AVR128, 0UL},
++      {"attiny22",      AVR2K,   224UL,  AVR128},
++      {"attiny2313",    AVR2K,   AVR128, AVR128},
++      {"attiny2313a",   AVR2K,   AVR128, AVR128},
++      {"attiny24",      AVR2K,   AVR128, AVR128},
++      {"attiny24a",     AVR2K,   AVR128, AVR128},
++      {"attiny25",      AVR2K,   AVR128, AVR128},
++      {"attiny26",      AVR2K,   AVR128, AVR128},
++      {"attiny261",     AVR2K,   AVR128, AVR128},
++      {"attiny261a",    AVR2K,   AVR128, AVR128},
++      {"attiny28",      AVR2K,   0UL,    0UL},
++   {"attiny40",      AVR2K,   AVR256, 0UL},
++
++      {"at90s1200",     AVR1K,   0UL,    AVR64},
++   {"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},
++};
++
++static char *avrmcu = NULL;
++
++
+ static char *target = NULL;
+ 
+ /* Forward declarations.  */
+@@ -79,7 +337,8 @@ 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\
+   -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)
+   -h        --help                    Display this information\n\
+   -v        --version                 Display the program's version\n\
+ \n"),
+-#if BSD_DEFAULT
+-  "berkeley"
+-#else
+-  "sysv"
+-#endif
++FORMAT_NAME
+ );
+   list_supported_targets (program_name, stream);
+   if (REPORT_BUGS_TO[0] && status == 0)
+@@ -103,6 +359,7 @@ 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) 
+ 
+ static struct option long_options[] =
+ {
+@@ -110,6 +368,7 @@ 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},
+   {"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)
+   bfd_init ();
+   set_default_bfd_target ();
+ 
+-  while ((c = getopt_long (argc, argv, "ABHhVvdfotx", long_options,
++  while ((c = getopt_long (argc, argv, "ABCHhVvdfotx", long_options,
+                          (int *) 0)) != EOF)
+     switch (c)
+       {
+@@ -150,11 +409,15 @@ main (int argc, char **argv)
+         {
+         case 'B':
+         case 'b':
+-          berkeley_format = 1;
++          format = format_bsd;
+           break;
+         case 'S':
+         case 's':
+-          berkeley_format = 0;
++          format = format_sysv;
++          break;
++        case 'A':
++        case 'a':
++          format = format_avr;
+           break;
+         default:
+           non_fatal (_("invalid argument to --format: %s"), optarg);
+@@ -162,6 +424,10 @@ main (int argc, char **argv)
+         }
+       break;
+ 
++      case OPTION_MCU:
++      avrmcu = optarg;
++      break;
++
+       case OPTION_TARGET:
+       target = optarg;
+       break;
+@@ -190,11 +457,14 @@ main (int argc, char **argv)
+       break;
+ 
+       case 'A':
+-      berkeley_format = 0;
++      format = format_sysv;
+       break;
+       case 'B':
+-      berkeley_format = 1;
++      format = format_bsd;
+       break;
++      case 'C':
++    format = format_avr;
++    break;
+       case 'v':
+       case 'V':
+       show_version = 1;
+@@ -240,7 +509,7 @@ main (int argc, char **argv)
+     for (; optind < argc;)
+       display_file (argv[optind++]);
+ 
+-  if (show_totals && berkeley_format)
++  if (show_totals && format == format_bsd)
+     {
+       bfd_size_type total = total_textsize + total_datasize + total_bsssize;
+ 
+@@ -599,13 +869,117 @@ print_sysv_format (bfd *file)
+   printf ("\n\n");
+ }
+ 
++
++static avr_device_t *
++avr_find_device (void)
++{
++  unsigned int i;
++  if (avrmcu != NULL)
++  {
++    for (i = 0; i < sizeof(avr) / sizeof(avr[0]); i++)
++    {
++      if (strcmp(avr[i].name, avrmcu) == 0)
++      {
++        /* Match found */
++        return (&avr[i]);
++      }
++    }
++  }
++  return (NULL);
++}
++
++
++
++static void
++print_avr_format (bfd *file)
++{
++  char *avr_name = "Unknown";
++  int flashmax = 0;
++  int rammax = 0;
++  int eeprommax = 0;
++  asection *section; 
++  bfd_size_type datasize = 0;
++  bfd_size_type textsize = 0;
++  bfd_size_type bsssize = 0;
++  bfd_size_type bootloadersize = 0;
++  bfd_size_type noinitsize = 0;
++  bfd_size_type eepromsize = 0;
++
++  avr_device_t *avrdevice = avr_find_device();
++  if (avrdevice != NULL)
++  {
++    avr_name = avrdevice->name;
++    flashmax = avrdevice->flash;
++    rammax = avrdevice->ram;
++    eeprommax = avrdevice->eeprom;
++  }
++
++  if ((section = bfd_get_section_by_name (file, ".data")) != NULL)
++    datasize = bfd_section_size (file, section);
++  if ((section = bfd_get_section_by_name (file, ".text")) != NULL)
++    textsize = bfd_section_size (file, section);
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/crossavr-binutils/crossavr-binutils.spec?r1=1.37&r2=1.38&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to