From cc210763ce675cfdc6bbf9fc1f98dd121cdf24ce Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Thu, 14 May 2009 14:40:57 +0000 Subject: [PATCH] * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the control flow graph between fragments of a function. --- bfd/ChangeLog | 5 +++++ bfd/elf32-spu.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6829c5ca77b..2af36be92ad 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2009-05-14 Ulrich Weigand + + * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the + control flow graph between fragments of a function. + 2009-05-14 Ulrich Weigand * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode, diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c index 7cdcb035f40..13bf5e2a5fb 100644 --- a/bfd/elf32-spu.c +++ b/bfd/elf32-spu.c @@ -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; -- 2.30.2