static reloc_howto_type *
bfd_elf32_bfd_reloc_type_lookup (abfd, code)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
unsigned int i;
static void
avr_info_to_howto_rela (abfd, cache_ptr, dst)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
arelent *cache_ptr;
Elf32_Internal_Rela *dst;
{
static asection *
elf32_avr_gc_mark_hook (abfd, info, rel, h, sym)
bfd *abfd;
- struct bfd_link_info *info;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
Elf_Internal_Rela *rel;
struct elf_link_hash_entry *h;
Elf_Internal_Sym *sym;
static boolean
elf32_avr_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
{
/* We don't use got and plt entries for avr. */
return true;
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);
static boolean
elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section,
contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
bfd *input_bfd;
asection *input_section;
val = E_AVR_MACH_AVR4;
break;
+ case bfd_mach_avr5:
+ val = E_AVR_MACH_AVR5;
+ break;
}
elf_elfheader (abfd)->e_machine = EM_AVR;
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,