* elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
authorUlrich Weigand <uweigand@de.ibm.com>
Thu, 14 May 2009 14:40:57 +0000 (14:40 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Thu, 14 May 2009 14:40:57 +0000 (14:40 +0000)
control flow graph between fragments of a function.

bfd/ChangeLog
bfd/elf32-spu.c

index 6829c5ca77bb90c1df3c31e49ab317f7dae05350..2af36be92ada0a7490c2b22a3accaa0bc0e1394c 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
+       control flow graph between fragments of a function.
+
 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
index 7cdcb035f403916003ddb7543d0bd1ec680a8d45..13bf5e2a5fbd641e4e073cced97e9f6ebd544132 100644 (file)
@@ -2787,7 +2787,14 @@ mark_functions_via_relocs (asection *sec,
              callee->fun->is_func = TRUE;
            }
          else if (callee->fun->start == NULL)
-           callee->fun->start = caller;
+           {
+             struct function_info *caller_start = caller;
+             while (caller_start->start)
+               caller_start = caller_start->start;
+
+             if (caller_start != callee->fun)
+               callee->fun->start = caller_start;
+           }
          else
            {
              struct function_info *callee_start;