]> 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)
committerMike Frysinger <vapier@gentoo.org>
Sat, 12 Nov 2016 05:44:36 +0000 (00:44 -0500)
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)

sysdeps/hppa/start.S

index 90d4331f5ab9696785d7361d8ff63e69e80d1ee3..b7ab830e9245d60dd4a80f949650c9a49d6bca52 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