aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-spu.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-06-16 13:44:00 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2009-06-16 13:44:00 +0000
commitbe3e406de8a97acffcd445eb0e83a84e510d829a (patch)
tree61c1e8de2fe696ceb0823532fcdb157568aeef87 /bfd/elf32-spu.c
parent6de2ae4a2a0020a827f05f30dedf8dcec7e77ee0 (diff)
downloadgdb-be3e406de8a97acffcd445eb0e83a84e510d829a.zip
gdb-be3e406de8a97acffcd445eb0e83a84e510d829a.tar.gz
gdb-be3e406de8a97acffcd445eb0e83a84e510d829a.tar.bz2
* elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
also for calls.
Diffstat (limited to 'bfd/elf32-spu.c')
-rw-r--r--bfd/elf32-spu.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index af7afdb..e2449d4 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -1014,18 +1014,14 @@ needs_ovl_stub (struct elf_link_hash_entry *h,
if (spu_elf_section_data (sym_sec->output_section)->u.o.ovl_index
!= spu_elf_section_data (input_section->output_section)->u.o.ovl_index)
{
- if (call || sym_type == STT_FUNC)
+ unsigned int lrlive = 0;
+ if (branch)
+ lrlive = (contents[1] & 0x70) >> 4;
+
+ if (!lrlive && (call || sym_type == STT_FUNC))
ret = call_ovl_stub;
else
- {
- ret = br000_ovl_stub;
-
- if (branch)
- {
- unsigned int lrlive = (contents[1] & 0x70) >> 4;
- ret += lrlive;
- }
- }
+ ret = br000_ovl_stub + lrlive;
}
/* If this insn isn't a branch then we are possibly taking the