summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-11-11 08:59:53 +0000
committerEric Andersen <andersen@codepoet.org>2003-11-11 08:59:53 +0000
commitf296a35b88b6af13224301a0d0f85239854a012a (patch)
treed21776946d55c080ca34485949a62180c5b017b4
parent52214b70d834ce2408da3084865565fcb81ec4f2 (diff)
Another cleanup patch from Joakim Tjernlund:
Hi again Back at work. Here is a patch that fixes the 2 errors I found yesterday. I have excluded the "data_words[index]" part for now.
-rw-r--r--ldso/ldso/powerpc/elfinterp.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/ldso/ldso/powerpc/elfinterp.c b/ldso/ldso/powerpc/elfinterp.c
index 93468c4ec..219c512d5 100644
--- a/ldso/ldso/powerpc/elfinterp.c
+++ b/ldso/ldso/powerpc/elfinterp.c
@@ -243,27 +243,24 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
ptr = (unsigned long *)tpnt->data_words;
//DPRINTF("plt_addr=%x delta=%x index=%x ptr=%x\n", plt_addr, delta, index, ptr);
+ insns += 1;
+
ptr[index] = new_addr;
+ PPC_SYNC;
/* icache sync is not necessary, since this will be a data load */
//PPC_DCBST(ptr+index);
//PPC_SYNC;
//PPC_ICBI(ptr+index);
//PPC_ISYNC;
- /* instructions were modified */
- insns[1] = OPCODE_B(delta - 4);
- PPC_DCBST(insn_addr+1);
- PPC_SYNC;
- PPC_ICBI(insn_addr+1);
- PPC_ISYNC;
-
- return new_addr;
+ insns[0] = OPCODE_B(delta - 4);
+
}
/* instructions were modified */
- PPC_DCBST(insn_addr);
+ PPC_DCBST(insns);
PPC_SYNC;
- PPC_ICBI(insn_addr);
+ PPC_ICBI(insns);
PPC_ISYNC;
return new_addr;
@@ -393,10 +390,10 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt, struct dyn_elf *scope,
/* instructions were modified */
PPC_DCBST(reloc_addr);
- PPC_DCBST(reloc_addr+1);
+ PPC_DCBST(reloc_addr+4);
PPC_SYNC;
PPC_ICBI(reloc_addr);
- PPC_ICBI(reloc_addr+1);
+ PPC_ICBI(reloc_addr+4);
PPC_ISYNC;
#if defined (__SUPPORT_LD_DEBUG__)
@@ -514,6 +511,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
/* instructions were modified */
PPC_DCBST(reloc_addr+1);
+ PPC_SYNC;
PPC_ICBI(reloc_addr+1);
}
}