aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-spu.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-05-14 14:40:57 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-05-14 14:40:57 +0000
commitcc210763ce675cfdc6bbf9fc1f98dd121cdf24ce (patch)
treed85ac87c828ad638ffcbc8f6dc40d75e0679de7b /bfd/elf32-spu.c
parentc1ea05bbe875208b4c493220f7013bc2f491207e (diff)
downloadgdb-cc210763ce675cfdc6bbf9fc1f98dd121cdf24ce.zip
gdb-cc210763ce675cfdc6bbf9fc1f98dd121cdf24ce.tar.gz
gdb-cc210763ce675cfdc6bbf9fc1f98dd121cdf24ce.tar.bz2
* elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
control flow graph between fragments of a function.
Diffstat (limited to 'bfd/elf32-spu.c')
-rw-r--r--bfd/elf32-spu.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index 7cdcb03..13bf5e2 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;