]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hppa: fix loading of global pointer in _start [BZ #20277]
authorJohn David Anglin <dave.anglin@bell.net>
Tue, 21 Jun 2016 22:35:22 +0000 (18:35 -0400)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 1 Jul 2016 10:03:03 +0000 (12:03 +0200)
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)

ChangeLog
NEWS
sysdeps/hppa/start.S

index 32e31642bdac1267f8e73197ae5e9d698eff0038..320cf004e7f3161e500eecbe7235ac247c2bb47e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-30  John David Anglin  <danglin@gcc.gnu.org>
+
+       [BZ #20277]
+       * sysdeps/hppa/start.S (_start): Correct loading of global pointer
+       when SHARED is defined.
+
 2016-06-21  Aurelien Jarno  <aurelien@aurel32.net>
 
        * sysdeps/unix/sysv/linux/mips/vfork.S (__vfork): Rename into
diff --git a/NEWS b/NEWS
index b0b981b1b777ca795504ede08966ebe0dd8518e8..923468dd2ea9e7852fdd1e78cb364e1582f8b2b3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,7 @@ Version 2.22.1
   17905, 18420, 18421, 18480, 18589, 18743, 18778, 18781, 18787, 18796,
   18870, 18887, 18921, 18928, 18969, 18985, 19003, 19018, 19048, 19058,
   19174, 19178, 19182, 19243, 19573, 19590, 19682, 19791, 19822, 19853,
-  19879, 19779, 20010, 20112.
+  19879, 19779, 20010, 20112, 20277.
 
 * The getnetbyname implementation in nss_dns had a potentially unbounded
   alloca call (in the form of a call to strdupa), leading to a stack
index cc4f243650764136da13812574e1086f62da3e32..d20cabafc522536cba306e36dc87a6d90eb351d4 100644 (file)
@@ -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