summaryrefslogtreecommitdiff
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
commite0e61d0b30eaa45e6d43cea71174d400f6324fe4 (patch)
tree2f5d3c8436c803cbf1c5a4a99ba740387b012352 /bfd/elf32-spu.c
parent816b793785b83304bacf7bd7e5f5e417597093e0 (diff)
downloadbinutils-redhat-e0e61d0b30eaa45e6d43cea71174d400f6324fe4.tar.gz
* 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 af7afdbc67..e2449d4b8b 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