View | Details | Raw Unified | Return to bug 12161 | Differences between
and this patch

Collapse All | Expand All

(-)bfd/elf32-avr.c (-43 lines)
Lines 734-781 avr_info_to_howto_rela (bfd *abfd ATTRIB Link Here
734
  cache_ptr->howto = &elf_avr_howto_table[r_type];
734
  cache_ptr->howto = &elf_avr_howto_table[r_type];
735
}
735
}
736
736
737
/* Look through the relocs for a section during the first phase.
738
   Since we don't do .gots or .plts, we just need to consider the
739
   virtual table relocs for gc.  */
740
741
static bfd_boolean
742
elf32_avr_check_relocs (bfd *abfd,
743
			struct bfd_link_info *info,
744
			asection *sec,
745
			const Elf_Internal_Rela *relocs)
746
{
747
  Elf_Internal_Shdr *symtab_hdr;
748
  struct elf_link_hash_entry **sym_hashes;
749
  const Elf_Internal_Rela *rel;
750
  const Elf_Internal_Rela *rel_end;
751
752
  if (info->relocatable)
753
    return TRUE;
754
755
  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
756
  sym_hashes = elf_sym_hashes (abfd);
757
758
  rel_end = relocs + sec->reloc_count;
759
  for (rel = relocs; rel < rel_end; rel++)
760
    {
761
      struct elf_link_hash_entry *h;
762
      unsigned long r_symndx;
763
764
      r_symndx = ELF32_R_SYM (rel->r_info);
765
      if (r_symndx < symtab_hdr->sh_info)
766
        h = NULL;
767
      else
768
	{
769
	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
770
	  while (h->root.type == bfd_link_hash_indirect
771
		 || h->root.type == bfd_link_hash_warning)
772
	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
773
	}
774
    }
775
776
  return TRUE;
777
}
778
779
static bfd_boolean
737
static bfd_boolean
780
avr_stub_is_required_for_16_bit_reloc (bfd_vma relocation)
738
avr_stub_is_required_for_16_bit_reloc (bfd_vma relocation)
781
{
739
{
Lines 2998-3004 elf32_avr_build_stubs (struct bfd_link_i Link Here
2998
#define elf_info_to_howto	             avr_info_to_howto_rela
2956
#define elf_info_to_howto	             avr_info_to_howto_rela
2999
#define elf_info_to_howto_rel	             NULL
2957
#define elf_info_to_howto_rel	             NULL
3000
#define elf_backend_relocate_section         elf32_avr_relocate_section
2958
#define elf_backend_relocate_section         elf32_avr_relocate_section
3001
#define elf_backend_check_relocs             elf32_avr_check_relocs
3002
#define elf_backend_can_gc_sections          1
2959
#define elf_backend_can_gc_sections          1
3003
#define elf_backend_rela_normal		     1
2960
#define elf_backend_rela_normal		     1
3004
#define elf_backend_final_write_processing \
2961
#define elf_backend_final_write_processing \

Return to bug 12161