SPU overlay stub type fix

Alan Modra amodra@bigpond.net.au
Thu Jun 19 17:17:00 GMT 2008


Stupid typo/thinko.  This allowed the address of a function in an
overlay to escape via a pointer.  Calling into a non-loaded overlay
doesn't work very well...

	* elf32-spu.c (needs_ovl_stub): Correctly return nonovl_stub for
	non-branch insns.

diff -urp src.old/bfd/elf32-spu.c src/bfd/elf32-spu.c
--- src.old/bfd/elf32-spu.c	2008-06-17 03:01:28.000000000 +0930
+++ src/bfd/elf32-spu.c	2008-06-20 00:49:19.000000000 +0930
@@ -819,7 +819,7 @@ needs_ovl_stub (struct elf_link_hash_ent
      section needs a stub.  */
   if (spu_elf_section_data (sym_sec->output_section)->u.o.ovl_index
        != spu_elf_section_data (input_section->output_section)->u.o.ovl_index)
-    return ovl_stub;
+    ret = ovl_stub;
 
   /* If this insn isn't a branch then we are possibly taking the
      address of a function and passing it out somehow.  */

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list