This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch [avr]: makes avr-6 incompatible with other avr architectures


Hi,

the avr6 MCUs save the return address on 3 bytes (instead of 2 for other archs). As a consequence, the
call convention is slightly different (the offset of the first argument saved on the stack differs).
To avoid inconsistencies, this patch makes ld refuse to link avr6 objects with other arch objects.


Tristan.


bfd: 2008-11-27 Tristan Gingold <gingold@adacore.com>

* cpu-avr.c (compatible): Makes avr-6 compatible only with itself.


*** cpu-avr.c 9 Aug 2008 05:35:12 -0000 1.13 --- cpu-avr.c 27 Nov 2008 15:16:26 -0000 *************** *** 38,43 **** --- 38,49 ---- if (a->mach == b->mach) return a;

+ /* 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). */



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]