This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
SPU overlay stubs for branches
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Wed, 5 Dec 2007 13:53:48 +1030
- Subject: SPU overlay stubs for branches
This fixes a bug in that branches between overlays did not generate
overlay stubs unless the destination was to a function symbol, ie. the
start of a function. If we break a function into pieces, we'd like
stubs to load the destination overlay..
* elf32-spu.c (spu_elf_size_stubs): Do consider branches to
non-function symbols for overlay stubs.
Index: bfd/elf32-spu.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-spu.c,v
retrieving revision 1.25
diff -u -p -r1.25 elf32-spu.c
--- bfd/elf32-spu.c 4 Dec 2007 03:29:43 -0000 1.25
+++ bfd/elf32-spu.c 5 Dec 2007 03:08:07 -0000
@@ -996,6 +996,7 @@ spu_elf_size_stubs (bfd *output_bfd,
sym,
sym_sec);
}
+
if (sym_type != STT_FUNC)
{
/* It's common for people to write assembly and forget
@@ -1008,7 +1009,7 @@ spu_elf_size_stubs (bfd *output_bfd,
(*_bfd_error_handler) (_("warning: call to non-function"
" symbol %s defined in %B"),
sym_sec->owner, sym_name);
- else
+ else if (insn_type == non_branch)
continue;
}
--
Alan Modra
Australia Development Lab, IBM