This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.12-166-g87a9793


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  87a97932bdd8a62a5eede11fdf031efd38da33ac (commit)
      from  724da3d7f42295c240f69bf874886efb9ad98510 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=87a97932bdd8a62a5eede11fdf031efd38da33ac

commit 87a97932bdd8a62a5eede11fdf031efd38da33ac
Author: Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
Date:   Wed Sep 29 11:31:42 2010 -0400

    S/390: Fix highgprs check in startup code

diff --git a/ChangeLog b/ChangeLog
index bfcadde..70505a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-29  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	[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@redhat.com>
 
 	[BZ #11611]
diff --git a/sysdeps/s390/s390-32/elf/start.S b/sysdeps/s390/s390-32/elf/start.S
index 066f7f0..8e48abb 100644
--- a/sysdeps/s390/s390-32/elf/start.S
+++ b/sysdeps/s390/s390-32/elf/start.S
@@ -108,7 +108,7 @@ _start:
 	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 @@ _start:
 .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
+	j	.L14	       /* No PT_PHDR found - skip checking.  */
 
-.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 */
+.L25:	slr	%r11,%r3       /* AT_PHDR - PT_PHDR.p_vaddr (relocation offset)*/
+	alr	%r9,%r11       /* PT_LOAD.p_vaddr += relocation offset */
 
-.L21:	l	%r5,36(%r9)    /* Load the e_flags field.  */
+	l	%r5,36(%r9)    /* Load the e_flags field.  */
 	tml	%r5,1
 	jz	.L14	       /* Binary does not require highgprs facility.  */
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                        |    6 ++++++
 sysdeps/s390/s390-32/elf/start.S |   14 +++++---------
 2 files changed, 11 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]