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

Collapse All | Expand All

(-)bfd/elf32-avr.c (-2 / +11 lines)
Lines 1503-1513 elf32_avr_relax_delete_bytes (bfd *abfd, Link Here
1503
       bfd_vma symval;
1503
       bfd_vma symval;
1504
       bfd_vma shrinked_insn_address;
1504
       bfd_vma shrinked_insn_address;
1505
1505
1506
       if (isec->reloc_count == 0)
1507
	 continue;
1508
1506
       shrinked_insn_address = (sec->output_section->vma
1509
       shrinked_insn_address = (sec->output_section->vma
1507
                                + sec->output_offset + addr - count);
1510
                                + sec->output_offset + addr - count);
1508
1511
1509
       irelend = elf_section_data (isec)->relocs + isec->reloc_count;
1512
       irel = elf_section_data (isec)->relocs;
1510
       for (irel = elf_section_data (isec)->relocs;
1513
       if (irel == NULL)
1514
	 irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, FALSE);
1515
1516
       for (irelend = irel + isec->reloc_count;
1511
            irel < irelend;
1517
            irel < irelend;
1512
            irel++)
1518
            irel++)
1513
         {
1519
         {
Lines 1564-1569 elf32_avr_relax_delete_bytes (bfd *abfd, Link Here
1564
	   /* else...Reference symbol is extern.  No need for adjusting
1570
	   /* else...Reference symbol is extern.  No need for adjusting
1565
	      the addend.  */
1571
	      the addend.  */
1566
	 }
1572
	 }
1573
1574
       if (elf_section_data (isec)->relocs == NULL)
1575
	 free (irelend - isec->reloc_count);
1567
     }
1576
     }
1568
  }
1577
  }
1569
1578

Return to bug 12161