[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r11648 - in /fsf/trunk/libc: ./ sysdeps/powerpc/powerpc32/ sysdeps/powerpc/powerpc64/ sysdeps/s390/s390-32/elf/



Author: eglibc
Date: Thu Sep 30 00:03:16 2010
New Revision: 11648

Log:
Import glibc-mainline for 2010-09-30

Added:
    fsf/trunk/libc/sysdeps/powerpc/powerpc32/rtld-memset.c
    fsf/trunk/libc/sysdeps/powerpc/powerpc64/rtld-memset.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/sysdeps/s390/s390-32/elf/start.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Sep 30 00:03:16 2010
@@ -1,3 +1,14 @@
+2010-09-27  Luis Machado  <luisgpm@xxxxxxxxxx>
+
+	* sysdeps/powerpc/powerpc32/rtld-memset.c: New file.
+	* sysdeps/powerpc/powerpc64/rtld-memset.c: New file.
+
+2010-09-29  Andreas Krebbel  <Andreas.Krebbel@xxxxxxxxxx>
+
+	[BZ #12067]
+	* sysdeps/s390/s390-32/elf/start.S: Fix address calculation when
+	trying to locate the ELF header.
+
 2010-09-27  Andreas Schwab  <schwab@xxxxxxxxxx>
 
 	[BZ #11611]

Added: fsf/trunk/libc/sysdeps/powerpc/powerpc32/rtld-memset.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/rtld-memset.c (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/rtld-memset.c Thu Sep 30 00:03:16 2010
@@ -1,0 +1,4 @@
+/* PPCA2 has a different cache-line size than the usual 128 bytes.  To avoid
+   using code that assumes cache-line size to be 128 bytes (with dcbz
+   instructions) we use the generic code instead.  */
+#include <string/memset.c>

Added: fsf/trunk/libc/sysdeps/powerpc/powerpc64/rtld-memset.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/rtld-memset.c (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/rtld-memset.c Thu Sep 30 00:03:16 2010
@@ -1,0 +1,4 @@
+/* PPCA2 has a different cache-line size than the usual 128 bytes.  To avoid
+   using code that assumes cache-line size to be 128 bytes (with dcbz
+   instructions) we use the generic code instead.  */
+#include <string/memset.c>

Modified: fsf/trunk/libc/sysdeps/s390/s390-32/elf/start.S
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/s390-32/elf/start.S (original)
+++ fsf/trunk/libc/sysdeps/s390/s390-32/elf/start.S Thu Sep 30 00:03:16 2010
@@ -108,7 +108,7 @@
 	jne	.L20
 	cl	%r8,4(%r4)     /* p_offset == 0? */
 	jne	.L20
-	l	%r9,8(%r4)     /* r9 = p_vaddr <- ELF header address  */
+	l	%r9,8(%r4)     /* r9 = PT_LOAD.p_vaddr <- ELF header address  */
 	j	.L24
 .L20:	alr	%r4,%r0        /* r4 += AT_PHENT value */
 	brct	%r12,.L19
@@ -124,16 +124,12 @@
 .L22:	alr	%r4,%r0        /* r4 += AT_PHENT value */
 	brct	%r12,.L23
 
-	ltr	%r9,%r9        /* Load address == 0? */
-	jz	.L14           /* No checking for PIE without PT_PHDR.  */
-	j	.L21
-
-.L25:	clr	%r3,%r11       /* PT_PHDR p_vaddr == AT_PHDR? */
-	je	.L21
-	lr	%r9,%r11
-	slr	%r9,%r3        /* elf_header_addr = AT_PHDR - PT_PHDR.p_vaddr */
-
-.L21:	l	%r5,36(%r9)    /* Load the e_flags field.  */
+	j	.L14	       /* No PT_PHDR found - skip checking.  */
+
+.L25:	slr	%r11,%r3       /* AT_PHDR - PT_PHDR.p_vaddr (relocation offset)*/
+	alr	%r9,%r11       /* PT_LOAD.p_vaddr += relocation offset */
+
+	l	%r5,36(%r9)    /* Load the e_flags field.  */
 	tml	%r5,1
 	jz	.L14	       /* Binary does not require highgprs facility.  */