This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
SPU soft-icache branching to wrong stub
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Sat, 6 Jun 2009 16:05:57 +0930
- Subject: SPU soft-icache branching to wrong stub
Silly me omitted the overlay number check. Resulted in branching to
the wrong stub when another icache line happened to have a call or
branch at the same address.
* elf32-spu.c (spu_elf_relocate_section): Match overlay number
when looking for soft-icache stubs.
Index: bfd/elf32-spu.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-spu.c,v
retrieving revision 1.81
diff -u -p -r1.81 elf32-spu.c
--- bfd/elf32-spu.c 28 May 2009 10:47:44 -0000 1.81
+++ bfd/elf32-spu.c 6 Jun 2009 06:25:37 -0000
@@ -4848,9 +4848,10 @@ spu_elf_relocate_section (bfd *output_bf
for (g = *head; g != NULL; g = g->next)
if (htab->params->ovly_flavour == ovly_soft_icache
- ? g->br_addr == (rel->r_offset
- + input_section->output_offset
- + input_section->output_section->vma)
+ ? (g->ovl == ovl
+ && g->br_addr == (rel->r_offset
+ + input_section->output_offset
+ + input_section->output_section->vma))
: g->addend == addend && (g->ovl == ovl || g->ovl == 0))
break;
if (g == NULL)
--
Alan Modra
Australia Development Lab, IBM