if (OVL_STUB_SIZE == 16)
val -= 12;
if (((dest | to | from) & 3) != 0
- || val + 0x20000 >= 0x40000)
+ || val + 0x40000 >= 0x80000)
{
htab->stub_err = 1;
return FALSE;
&& (spu_elf_section_data (sym_sec->output_section)->u.o.ovl_index != 0
|| htab->non_overlay_stubs))
{
- count_stub (htab, NULL, NULL, nonovl_stub, h, NULL);
+ return count_stub (htab, NULL, NULL, nonovl_stub, h, NULL);
}
return TRUE;
&& (spu_elf_section_data (sym_sec->output_section)->u.o.ovl_index != 0
|| htab->non_overlay_stubs))
{
- build_stub (htab, NULL, NULL, nonovl_stub, h, NULL,
- h->root.u.def.value, sym_sec);
+ return build_stub (htab, NULL, NULL, nonovl_stub, h, NULL,
+ h->root.u.def.value, sym_sec);
}
return TRUE;
/* Fill in all the stubs. */
process_stubs (info, TRUE);
+ if (!htab->stub_err)
+ elf_link_hash_traverse (&htab->elf, build_spuear_stubs, info);
- elf_link_hash_traverse (&htab->elf, build_spuear_stubs, info);
if (htab->stub_err)
- return FALSE;
+ {
+ (*_bfd_error_handler) (_("overlay stub relocation overflow"));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
for (i = 0; i <= htab->num_overlays; i++)
{
htab->stub_sec[i]->rawsize = 0;
}
- if (htab->stub_err)
- {
- (*_bfd_error_handler) (_("overlay stub relocation overflow"));
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
htab->ovtab->contents = bfd_zalloc (htab->ovtab->owner, htab->ovtab->size);
if (htab->ovtab->contents == NULL)
return FALSE;