From: Tristan Gingold Date: Tue, 9 Dec 2008 09:51:08 +0000 (+0000) Subject: 2008-12-09 Tristan Gingold X-Git-Tag: sid-snapshot-20090201~503 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e22044af11526161ac614fbdc9d0522e1d7221b;p=external%2Fbinutils.git 2008-12-09 Tristan Gingold * cpu-avr.c (compatible): Makes avr-6 compatible only with itself. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dd67ef2..93a8de8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2008-12-09 Tristan Gingold + + * cpu-avr.c (compatible): Makes avr-6 compatible only with itself. + 2008-12-04 Andreas Krebbel * elf64-s390.c (elf_s390_check_relocs): Initialize diff --git a/bfd/cpu-avr.c b/bfd/cpu-avr.c index 364f64e..ddc410b 100644 --- a/bfd/cpu-avr.c +++ b/bfd/cpu-avr.c @@ -38,7 +38,13 @@ compatible (const bfd_arch_info_type * a, if (a->mach == b->mach) return a; - if (a->mach <= bfd_mach_avr6 && b->mach <= bfd_mach_avr6) + /* avr-6 is compatible only with itself as its call convention is not + compatible with other avr (the mcu saves the return address on 3 bytes + instead of 2). */ + if (a->mach == bfd_mach_avr6 || b->mach == bfd_mach_avr6) + return NULL; + + if (a->mach < bfd_mach_avr6 && b->mach < bfd_mach_avr6) { /* Special case for ATmega[16]03 (avr:3) and ATmega83 (avr:4). */ if ((a->mach == bfd_mach_avr3 && b->mach == bfd_mach_avr4)