[uClibc-cvs] elfinterp.c

Erik Andersen,,, andersen at uclibc.org
Sun Jun 20 05:39:06 UTC 2004


Update of /var/cvs/uClibc/ldso/ldso/powerpc
In directory nail:/tmp/cvs-serv19199/ldso/powerpc

Modified Files:
	elfinterp.c 
Log Message:
Whine about R_PPC_REL24 relocations, and tell people to compile
shared libraries with -fPIC


Index: elfinterp.c
===================================================================
RCS file: /var/cvs/uClibc/ldso/ldso/powerpc/elfinterp.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- elfinterp.c	14 Feb 2004 11:54:03 -0000	1.38
+++ elfinterp.c	20 Jun 2004 05:39:04 -0000	1.39
@@ -349,17 +349,22 @@
 		*(short *)reloc_addr = finaladdr;
 		break;
 	case R_PPC_REL24:
-	{
-		Elf32_Sword delta = finaladdr - (Elf32_Word)reloc_addr;
-		if(unlikely(delta<<6>>6 != delta)) {
-			_dl_dprintf(2, "%s: symbol '%s' R_PPC_REL24 is out of range.\n\t"
-					"Compile shared libraries with -fPIC!\n",
-				    _dl_progname, symname);
-			_dl_exit(1);
+#if 0
+		{
+			Elf32_Sword delta = finaladdr - (Elf32_Word)reloc_addr;
+			if(unlikely(delta<<6>>6 != delta)) {
+				_dl_dprintf(2, "%s: symbol '%s' R_PPC_REL24 is out of range.\n\t"
+						"Compile shared libraries with -fPIC!\n",
+						_dl_progname, symname);
+				_dl_exit(1);
+			}
+			*reloc_addr = (*reloc_addr & 0xfc000003) | (delta & 0x3fffffc);
+			break;
 		}
-		*reloc_addr = (*reloc_addr & 0xfc000003) | (delta & 0x3fffffc);
-		break;
-	}
+#else
+		_dl_dprintf(2,"R_PPC_REL24: Compile shared libraries with -fPIC!\n");
+		_dl_exit(1);
+#endif
 	default:
 		_dl_dprintf(2, "%s: can't handle reloc type ", _dl_progname);
 #if defined (__SUPPORT_LD_DEBUG__)




More information about the uClibc-cvs mailing list