View | Details | Raw Unified | Return to bug 10409
Collapse All | Expand All

(-)bfd/elf32-arm.c (-14 / +17 lines)
Lines 3931-3938 cortex_a8_erratum_scan (bfd *input_bfd, Link Here
3931
			unsigned int *a8_fix_table_size_p,
3931
			unsigned int *a8_fix_table_size_p,
3932
			struct a8_erratum_reloc *a8_relocs,
3932
			struct a8_erratum_reloc *a8_relocs,
3933
			unsigned int num_a8_relocs,
3933
			unsigned int num_a8_relocs,
3934
			unsigned prev_num_a8_fixes,
3934
			unsigned prev_num_a8_fixes)
3935
			bfd_boolean *stub_changed_p)
3936
{
3935
{
3937
  asection *section;
3936
  asection *section;
3938
  struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
3937
  struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
Lines 4168-4174 cortex_a8_erratum_scan (bfd *input_bfd, Link Here
4168
				{
4167
				{
4169
				  free (stub_name);
4168
				  free (stub_name);
4170
				  stub_name = NULL;
4169
				  stub_name = NULL;
4171
				  *stub_changed_p = TRUE;
4172
				}
4170
				}
4173
			    }
4171
			    }
4174
4172
Lines 4292-4298 elf32_arm_size_stubs (bfd *output_bfd, Link Here
4292
      bfd *input_bfd;
4290
      bfd *input_bfd;
4293
      unsigned int bfd_indx;
4291
      unsigned int bfd_indx;
4294
      asection *stub_sec;
4292
      asection *stub_sec;
4295
      bfd_boolean stub_changed = FALSE;
4296
      unsigned prev_num_a8_fixes = num_a8_fixes;
4293
      unsigned prev_num_a8_fixes = num_a8_fixes;
4297
4294
4298
      num_a8_fixes = 0;
4295
      num_a8_fixes = 0;
Lines 4572-4579 elf32_arm_size_stubs (bfd *output_bfd, Link Here
4572
                      else
4569
                      else
4573
                	sprintf (stub_entry->output_name, STUB_ENTRY_NAME,
4570
                	sprintf (stub_entry->output_name, STUB_ENTRY_NAME,
4574
                        	 sym_name);
4571
                        	 sym_name);
4575
4576
                      stub_changed = TRUE;
4577
                    }
4572
                    }
4578
                  while (0);
4573
                  while (0);
4579
4574
Lines 4633-4651 elf32_arm_size_stubs (bfd *output_bfd, Link Here
4633
              if (cortex_a8_erratum_scan (input_bfd, info, &a8_fixes,
4628
              if (cortex_a8_erratum_scan (input_bfd, info, &a8_fixes,
4634
					  &num_a8_fixes, &a8_fix_table_size,
4629
					  &num_a8_fixes, &a8_fix_table_size,
4635
					  a8_relocs, num_a8_relocs,
4630
					  a8_relocs, num_a8_relocs,
4636
					  prev_num_a8_fixes, &stub_changed)
4631
					  prev_num_a8_fixes)
4637
		  != 0)
4632
		  != 0)
4638
		goto error_ret_free_local;
4633
		goto error_ret_free_local;
4639
	    }
4634
	    }
4640
	}
4635
	}
4641
4636
4642
      if (prev_num_a8_fixes != num_a8_fixes)
4637
      /* We may have added some stubs.  Find out the new size of the
4643
        stub_changed = TRUE;
4644
4645
      if (!stub_changed)
4646
	break;
4647
4648
      /* OK, we've added some stubs.  Find out the new size of the
4649
	 stub sections.  */
4638
	 stub sections.  */
4650
      for (stub_sec = htab->stub_bfd->sections;
4639
      for (stub_sec = htab->stub_bfd->sections;
4651
	   stub_sec != NULL;
4640
	   stub_sec != NULL;
Lines 4655-4660 elf32_arm_size_stubs (bfd *output_bfd, Link Here
4655
	  if (!strstr (stub_sec->name, STUB_SUFFIX))
4644
	  if (!strstr (stub_sec->name, STUB_SUFFIX))
4656
	    continue;
4645
	    continue;
4657
4646
4647
	  stub_sec->rawsize = stub_sec->size;
4658
	  stub_sec->size = 0;
4648
	  stub_sec->size = 0;
4659
	}
4649
	}
4660
4650
Lines 4675-4680 elf32_arm_size_stubs (bfd *output_bfd, Link Here
4675
                                              NULL);
4665
                                              NULL);
4676
          }
4666
          }
4677
4667
4668
      for (stub_sec = htab->stub_bfd->sections;
4669
	   stub_sec != NULL;
4670
	   stub_sec = stub_sec->next)
4671
	{
4672
	  if (!strstr (stub_sec->name, STUB_SUFFIX))
4673
	    continue;
4674
4675
	  if (stub_sec->rawsize != stub_sec->size)
4676
	    break;
4677
	}
4678
4679
      if (stub_sec == NULL)
4680
	break;
4678
4681
4679
      /* Ask the linker to do its stuff.  */
4682
      /* Ask the linker to do its stuff.  */
4680
      (*htab->layout_sections_again) ();
4683
      (*htab->layout_sections_again) ();

Return to bug 10409