[uClibc-cvs] uClibc/ldso/ldso/powerpc elfinterp.c,1.25,1.26

Erik Andersen andersen at uclibc.org
Tue Nov 11 08:59:57 UTC 2003


Update of /var/cvs/uClibc/ldso/ldso/powerpc
In directory winder:/tmp/cvs-serv32624

Modified Files:
	elfinterp.c 
Log Message:
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.



Index: elfinterp.c
===================================================================
RCS file: /var/cvs/uClibc/ldso/ldso/powerpc/elfinterp.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- elfinterp.c	8 Nov 2003 07:42:34 -0000	1.25
+++ elfinterp.c	11 Nov 2003 08:59:53 -0000	1.26
@@ -243,27 +243,24 @@
 
 		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 @@
 
 	/* 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 @@
 
 							/* instructions were modified */
 							PPC_DCBST(reloc_addr+1);
+							PPC_SYNC;
 							PPC_ICBI(reloc_addr+1);
 						}
 					}




More information about the uClibc-cvs mailing list