This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SPU overlay stub type fix


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]