mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
* elf32-spu.c (spu_elf_relocate_section): Test identical conditions
to those in process_stubs for overlay symbols.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2008-03-11 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf32-spu.c (spu_elf_relocate_section): Test identical conditions
|
||||||
|
to those in process_stubs for overlay symbols.
|
||||||
|
|
||||||
2008-03-09 Paul Brook <paul@codesourcery.com>
|
2008-03-09 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
|
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
|
||||||
|
@ -2708,7 +2708,6 @@ spu_elf_relocate_section (bfd *output_bfd,
|
|||||||
bfd_reloc_status_type r;
|
bfd_reloc_status_type r;
|
||||||
bfd_boolean unresolved_reloc;
|
bfd_boolean unresolved_reloc;
|
||||||
bfd_boolean warned;
|
bfd_boolean warned;
|
||||||
bfd_boolean branch;
|
|
||||||
|
|
||||||
r_symndx = ELF32_R_SYM (rel->r_info);
|
r_symndx = ELF32_R_SYM (rel->r_info);
|
||||||
r_type = ELF32_R_TYPE (rel->r_info);
|
r_type = ELF32_R_TYPE (rel->r_info);
|
||||||
@ -2769,12 +2768,29 @@ spu_elf_relocate_section (bfd *output_bfd,
|
|||||||
/* If this symbol is in an overlay area, we may need to relocate
|
/* If this symbol is in an overlay area, we may need to relocate
|
||||||
to the overlay stub. */
|
to the overlay stub. */
|
||||||
addend = rel->r_addend;
|
addend = rel->r_addend;
|
||||||
branch = (is_branch (contents + rel->r_offset)
|
|
||||||
|| is_hint (contents + rel->r_offset));
|
|
||||||
if (htab->stub_sec != NULL
|
if (htab->stub_sec != NULL
|
||||||
&& needs_ovl_stub (sym_name, sec, input_section, htab, branch)
|
&& sec != NULL
|
||||||
|
&& sec->output_section != NULL
|
||||||
|
&& sec->output_section->owner == output_bfd
|
||||||
&& (h == NULL
|
&& (h == NULL
|
||||||
|| (h != htab->ovly_load && h != htab->ovly_return)))
|
|| (h != htab->ovly_load && h != htab->ovly_return)))
|
||||||
|
{
|
||||||
|
bfd_boolean branch;
|
||||||
|
unsigned int sym_type;
|
||||||
|
|
||||||
|
branch = FALSE;
|
||||||
|
if (r_type == R_SPU_REL16
|
||||||
|
|| r_type == R_SPU_ADDR16)
|
||||||
|
branch = (is_branch (contents + rel->r_offset)
|
||||||
|
|| is_hint (contents + rel->r_offset));
|
||||||
|
|
||||||
|
if (h != NULL)
|
||||||
|
sym_type = h->type;
|
||||||
|
else
|
||||||
|
sym_type = ELF_ST_TYPE (sym->st_info);
|
||||||
|
|
||||||
|
if ((sym_type == STT_FUNC || branch)
|
||||||
|
&& needs_ovl_stub (sym_name, sec, input_section, htab, branch))
|
||||||
{
|
{
|
||||||
unsigned int ovl = 0;
|
unsigned int ovl = 0;
|
||||||
struct got_entry *g, **head;
|
struct got_entry *g, **head;
|
||||||
@ -2797,6 +2813,7 @@ spu_elf_relocate_section (bfd *output_bfd,
|
|||||||
relocation = g->stub_addr;
|
relocation = g->stub_addr;
|
||||||
addend = 0;
|
addend = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
r = _bfd_final_link_relocate (howto,
|
r = _bfd_final_link_relocate (howto,
|
||||||
input_bfd,
|
input_bfd,
|
||||||
|
Reference in New Issue
Block a user