* elf32-spu.c (spu_elf_relocate_section): Match overlay number
authorAlan Modra <amodra@gmail.com>
Sat, 6 Jun 2009 06:36:52 +0000 (06:36 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 6 Jun 2009 06:36:52 +0000 (06:36 +0000)
when looking for soft-icache stubs.

bfd/ChangeLog
bfd/elf32-spu.c

index 34bb1f8..14b4df5 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-06  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-spu.c (spu_elf_relocate_section): Match overlay number
+       when looking for soft-icache stubs.
+
 2009-06-05  Tristan Gingold  <gingold@adacore.com>
 
        * mach-o.h: Update copyright year.
index db23807..af7afdb 100644 (file)
@@ -4848,9 +4848,10 @@ spu_elf_relocate_section (bfd *output_bfd,
 
          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)