mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-10 01:25:30 +08:00
* elf32-spu.c (build_stub): Allow wraparound on stub branches.
(allocate_spuear_stubs, build_spuear_stubs): Return value from count_stub/build_stub. (spu_elf_build_stubs): Correct location of stub reloc error message.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2008-06-20 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf32-spu.c (build_stub): Allow wraparound on stub branches.
|
||||||
|
(allocate_spuear_stubs, build_spuear_stubs): Return value from
|
||||||
|
count_stub/build_stub.
|
||||||
|
(spu_elf_build_stubs): Correct location of stub reloc error message.
|
||||||
|
|
||||||
2008-06-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
|
2008-06-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
|
||||||
|
|
||||||
* elf32-cr16.c (ELF_MACHINE_ALT1): Define to EM_CR16_OLD.
|
* elf32-cr16.c (ELF_MACHINE_ALT1): Define to EM_CR16_OLD.
|
||||||
|
@ -977,7 +977,7 @@ build_stub (struct spu_link_hash_table *htab,
|
|||||||
if (OVL_STUB_SIZE == 16)
|
if (OVL_STUB_SIZE == 16)
|
||||||
val -= 12;
|
val -= 12;
|
||||||
if (((dest | to | from) & 3) != 0
|
if (((dest | to | from) & 3) != 0
|
||||||
|| val + 0x20000 >= 0x40000)
|
|| val + 0x40000 >= 0x80000)
|
||||||
{
|
{
|
||||||
htab->stub_err = 1;
|
htab->stub_err = 1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1083,7 +1083,7 @@ allocate_spuear_stubs (struct elf_link_hash_entry *h, void *inf)
|
|||||||
&& (spu_elf_section_data (sym_sec->output_section)->u.o.ovl_index != 0
|
&& (spu_elf_section_data (sym_sec->output_section)->u.o.ovl_index != 0
|
||||||
|| htab->non_overlay_stubs))
|
|| 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;
|
return TRUE;
|
||||||
@ -1109,7 +1109,7 @@ build_spuear_stubs (struct elf_link_hash_entry *h, void *inf)
|
|||||||
&& (spu_elf_section_data (sym_sec->output_section)->u.o.ovl_index != 0
|
&& (spu_elf_section_data (sym_sec->output_section)->u.o.ovl_index != 0
|
||||||
|| htab->non_overlay_stubs))
|
|| htab->non_overlay_stubs))
|
||||||
{
|
{
|
||||||
build_stub (htab, NULL, NULL, nonovl_stub, h, NULL,
|
return build_stub (htab, NULL, NULL, nonovl_stub, h, NULL,
|
||||||
h->root.u.def.value, sym_sec);
|
h->root.u.def.value, sym_sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1461,10 +1461,15 @@ spu_elf_build_stubs (struct bfd_link_info *info, int emit_syms)
|
|||||||
|
|
||||||
/* Fill in all the stubs. */
|
/* Fill in all the stubs. */
|
||||||
process_stubs (info, TRUE);
|
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)
|
if (htab->stub_err)
|
||||||
|
{
|
||||||
|
(*_bfd_error_handler) (_("overlay stub relocation overflow"));
|
||||||
|
bfd_set_error (bfd_error_bad_value);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i <= htab->num_overlays; i++)
|
for (i = 0; i <= htab->num_overlays; i++)
|
||||||
{
|
{
|
||||||
@ -1477,13 +1482,6 @@ spu_elf_build_stubs (struct bfd_link_info *info, int emit_syms)
|
|||||||
htab->stub_sec[i]->rawsize = 0;
|
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);
|
htab->ovtab->contents = bfd_zalloc (htab->ovtab->owner, htab->ovtab->size);
|
||||||
if (htab->ovtab->contents == NULL)
|
if (htab->ovtab->contents == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Reference in New Issue
Block a user