about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@bell.net>2016-06-21 18:35:22 -0400
committerMike Frysinger <vapier@gentoo.org>2016-11-12 00:44:36 -0500
commitac9ca0ac4722f49198d092b96a1d359d2aad803c (patch)
tree75129ffa6452b2341037fe39bbbef226d87f618c
parent2bd7f09e9890e72e169146293242148609aecede (diff)
downloadglibc-ac9ca0ac4722f49198d092b96a1d359d2aad803c.tar.gz
glibc-ac9ca0ac4722f49198d092b96a1d359d2aad803c.tar.xz
glibc-ac9ca0ac4722f49198d092b96a1d359d2aad803c.zip
hppa: fix loading of global pointer in _start [BZ #20277]
The patched change fixes a regression for executables compiled with the
-p option and linked with gcrt1.o.  The executables crash on startup.

This regression was introduced in 2.22 and was noticed in the gcc testsuite.

(cherry picked from commit 9765ffa71030efd8bb4f2ea4ed6e020fcb4bb714)
(cherry picked from commit 0903610fdc31efbea4309f69e5ee3e1d4f7ed29e)
-rw-r--r--sysdeps/hppa/start.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/hppa/start.S b/sysdeps/hppa/start.S
index 90d4331f5a..b7ab830e92 100644
--- a/sysdeps/hppa/start.S
+++ b/sysdeps/hppa/start.S
@@ -131,8 +131,10 @@ _start:
 	stw	%sp, -60(%sp)
 
 #ifdef SHARED
+	/* load global */
 	addil	LT'.Lp__global, %r19
 	ldw	RT'.Lp__global(%r1), %dp
+	ldw	0(%dp), %dp
 #else
 	/* load global */
 	ldil	L%$global$, %dp