Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/bfd/elf32-avr.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 20 by monamour, Thu Dec 4 05:12:56 2008 UTC revision 21 by monamour, Mon Jul 27 20:34:36 2009 UTC
# Line 854  avr_final_link_relocate (reloc_howto_typ Line 854  avr_final_link_relocate (reloc_howto_typ
854          {          {
855            /* Relative distance is too large.  */            /* Relative distance is too large.  */
856    
857            /* Always apply WRAPAROUND for avr2 and avr4.  */            /* Always apply WRAPAROUND for avr2, avr25, and avr4.  */
858            switch (bfd_get_mach (input_bfd))            switch (bfd_get_mach (input_bfd))
859              {              {
860              case bfd_mach_avr2:              case bfd_mach_avr2:
861                case bfd_mach_avr25:
862              case bfd_mach_avr4:              case bfd_mach_avr4:
863                break;                break;
864    
# Line 1414  elf32_avr_relax_delete_bytes (bfd *abfd, Line 1415  elf32_avr_relax_delete_bytes (bfd *abfd,
1415    Elf_Internal_Rela *irelalign;    Elf_Internal_Rela *irelalign;
1416    Elf_Internal_Sym *isym;    Elf_Internal_Sym *isym;
1417    Elf_Internal_Sym *isymbuf = NULL;    Elf_Internal_Sym *isymbuf = NULL;
   Elf_Internal_Sym *isymend;  
1418    bfd_vma toaddr;    bfd_vma toaddr;
1419    struct elf_link_hash_entry **sym_hashes;    struct elf_link_hash_entry **sym_hashes;
1420    struct elf_link_hash_entry **end_hashes;    struct elf_link_hash_entry **end_hashes;
# Line 1552  elf32_avr_relax_delete_bytes (bfd *abfd, Line 1552  elf32_avr_relax_delete_bytes (bfd *abfd,
1552    
1553    /* Adjust the local symbols defined in this section.  */    /* Adjust the local symbols defined in this section.  */
1554    isym = (Elf_Internal_Sym *) symtab_hdr->contents;    isym = (Elf_Internal_Sym *) symtab_hdr->contents;
1555    isymend = isym + symtab_hdr->sh_info;    /* Fix PR 9841, there may be no local symbols.  */
1556    for (; isym < isymend; isym++)    if (isym != NULL)
1557      {      {
1558        if (isym->st_shndx == sec_shndx        Elf_Internal_Sym *isymend;
1559            && isym->st_value > addr  
1560            && isym->st_value < toaddr)        isymend = isym + symtab_hdr->sh_info;
1561          isym->st_value -= count;        for (; isym < isymend; isym++)
1562            {
1563              if (isym->st_shndx == sec_shndx
1564                  && isym->st_value > addr
1565                  && isym->st_value < toaddr)
1566                isym->st_value -= count;
1567            }
1568      }      }
1569    
1570    /* Now adjust the global symbols defined in this section.  */    /* Now adjust the global symbols defined in this section.  */
# Line 1628  elf32_avr_relax_section (bfd *abfd, Line 1634  elf32_avr_relax_section (bfd *abfd,
1634    static Elf_Internal_Rela *last_reloc = NULL;    static Elf_Internal_Rela *last_reloc = NULL;
1635    struct elf32_avr_link_hash_table *htab;    struct elf32_avr_link_hash_table *htab;
1636    
1637      if (link_info->relocatable)
1638        (*link_info->callbacks->einfo)
1639          (_("%P%F: --relax and -r may not be used together\n"));
1640    
1641    htab = avr_link_hash_table (link_info);    htab = avr_link_hash_table (link_info);
1642    if (htab == NULL)    if (htab == NULL)
1643      return FALSE;      return FALSE;

Legend:
Removed from v.20  
changed lines
  Added in v.21

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26