summaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc32
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-02-23 13:20:00 +0100
committerAndreas Schwab <schwab@redhat.com>2010-02-23 13:20:43 +0100
commit359bd850c51f77f434224b9b2f2baffe5617f4b4 (patch)
treef8fe58324192a72f9dfb947e555f5411d416e25e /sysdeps/sparc/sparc32
parent5abc599d9ea29b8f43dfe67a6409f9cde6a869b4 (diff)
parente2f4aa547a997922d960876671fb35ea101295f8 (diff)
Merge remote branch 'origin/master' into fedora/master
Diffstat (limited to 'sysdeps/sparc/sparc32')
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index e1385f7aca..53257104a6 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -166,15 +166,19 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
in .rela.plt. */
while (rela < relaend)
{
- *(unsigned int *) rela->r_offset
- = OPCODE_SETHI_G1 | (rela->r_offset - (Elf32_Addr) plt);
- *(unsigned int *) (rela->r_offset + 4)
+ *(unsigned int *) (rela->r_offset + l->l_addr)
+ = OPCODE_SETHI_G1 | (rela->r_offset + l->l_addr
+ - (Elf32_Addr) plt);
+ *(unsigned int *) (rela->r_offset + l->l_addr + 4)
= OPCODE_BA | ((((Elf32_Addr) plt
- - rela->r_offset - 4) >> 2) & 0x3fffff);
+ - rela->r_offset - l->l_addr - 4) >> 2)
+ & 0x3fffff);
if (do_flush)
{
- __asm __volatile ("flush %0" : : "r"(rela->r_offset));
- __asm __volatile ("flush %0+4" : : "r"(rela->r_offset));
+ __asm __volatile ("flush %0" : : "r" (rela->r_offset
+ + l->l_addr));
+ __asm __volatile ("flush %0+4" : : "r" (rela->r_offset
+ + l->l_addr));
}
++rela;
}