* elf32-spu.c (spu_elf_size_stubs): Do consider branches to
authorAlan Modra <amodra@gmail.com>
Wed, 5 Dec 2007 03:29:20 +0000 (03:29 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 5 Dec 2007 03:29:20 +0000 (03:29 +0000)
non-function symbols for overlay stubs.

bfd/ChangeLog
bfd/elf32-spu.c

index c0f367ca7c328fc8a6191a2f3e3368bf82312e25..fbe5928c06721072bb4e3976c236531d2562471f 100644 (file)
@@ -1,3 +1,8 @@
+2007-12-05  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-spu.c (spu_elf_size_stubs): Do consider branches to
+       non-function symbols for overlay stubs.
+
 2007-12-04  Bob Wilson  <bob.wilson@acm.org>
 
        * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Create DT_PLTGOT
index 7da9cb69606973a2272e71d344ecbebdc52292ae..62a922a3e49f0616bffb5a4a77c9e8c90f6ec803 100644 (file)
@@ -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;
                }