From: John David Anglin Date: Tue, 21 Jun 2016 22:35:22 +0000 (-0400) Subject: hppa: fix loading of global pointer in _start [BZ #20277] X-Git-Tag: glibc-2.24~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9765ffa71030efd8bb4f2ea4ed6e020fcb4bb714;p=thirdparty%2Fglibc.git 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. --- diff --git a/ChangeLog b/ChangeLog index 082422866dd..c61020f435a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-06-30 John David Anglin + + [BZ #20277] + * sysdeps/hppa/start.S (_start): Correct loading of global pointer + when SHARED is defined. + 2016-06-30 H.J. Lu * sysdeps/x86/cpu-features.h (bit_arch_Prefer_ERMS): New. diff --git a/sysdeps/hppa/start.S b/sysdeps/hppa/start.S index 90d4331f5ab..b7ab830e924 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