aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-avr.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-06-27 01:45:30 +0000
committerNick Clifton <nickc@redhat.com>2000-06-27 01:45:30 +0000
commit65aa24b6e8082b40bb8de63732b35908cbfd088a (patch)
treefdf3cf5418105392e2b0cc7fec1c89ee566de17b /bfd/elf32-avr.c
parentcc040812f5558d0d2b9c876ea0bfbb3c46e9b6dd (diff)
downloadgdb-65aa24b6e8082b40bb8de63732b35908cbfd088a.zip
gdb-65aa24b6e8082b40bb8de63732b35908cbfd088a.tar.gz
gdb-65aa24b6e8082b40bb8de63732b35908cbfd088a.tar.bz2
Applied Marek Michalkiewicz <marekm@linux.org.pl>'s patch to ehance the AVR port.
Diffstat (limited to 'bfd/elf32-avr.c')
-rw-r--r--bfd/elf32-avr.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index c64ab28..c99d667 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -548,15 +548,15 @@ avr_final_link_relocate (howto, input_bfd, input_section,
if (srel < -2048 || srel > 2047)
{
/* Apply WRAPAROUND if possible. */
- if (bfd_get_mach (input_bfd) == bfd_mach_avr2)
+ switch (bfd_get_mach (input_bfd))
{
- if (srel > 2047)
- srel -= 4096;
- else
- srel += 4096;
+ case bfd_mach_avr2:
+ case bfd_mach_avr4:
+ break;
+
+ default:
+ return bfd_reloc_overflow;
}
- else
- return bfd_reloc_overflow;
}
x = bfd_get_16 (input_bfd, contents);
@@ -899,6 +899,9 @@ bfd_elf_avr_final_write_processing (abfd, linker)
val = E_AVR_MACH_AVR4;
break;
+ case bfd_mach_avr5:
+ val = E_AVR_MACH_AVR5;
+ break;
}
elf_elfheader (abfd)->e_machine = EM_AVR;
@@ -934,6 +937,10 @@ elf32_avr_object_p (abfd)
case E_AVR_MACH_AVR4:
e_set = bfd_mach_avr4;
break;
+
+ case E_AVR_MACH_AVR5:
+ e_set = bfd_mach_avr5;
+ break;
}
}
return bfd_default_set_arch_mach (abfd, bfd_arch_avr,