public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: binutils@sourceware.org
Subject: SPU overlay stubs for branches
Date: Wed, 05 Dec 2007 03:24:00 -0000	[thread overview]
Message-ID: <20071205032348.GA10034@bubble.grove.modra.org> (raw)

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

                 reply	other threads:[~2007-12-05  3:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071205032348.GA10034@bubble.grove.modra.org \
    --to=amodra@bigpond.net.au \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).