summaryrefslogtreecommitdiff
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
commit037cf06127eae39316f341eb18048c80da4bfc56 (patch)
tree4573a4a76505751cd4e9e8e06fa58b02b6cdb804 /bfd/elf32-spu.c
parentd8289dca8a574fa9aca12c5597664a6c4418b1e0 (diff)
downloadbinutils-redhat-037cf06127eae39316f341eb18048c80da4bfc56.tar.gz
* 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 7cdcb035f4..13bf5e2a5f 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;