]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix hppa text relocations in libc.so
authorJohn David Anglin <danglin@gcc.gnu.org>
Sat, 30 Sep 2017 23:02:57 +0000 (19:02 -0400)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sat, 30 Sep 2017 23:02:57 +0000 (19:02 -0400)
[BZ libc/22165]
* sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext): Use PIC
code to load address of __getcontext_ret when generating PIC code.

ChangeLog
sysdeps/unix/sysv/linux/hppa/getcontext.S

index 37cd69037af5f37da0a275ea165eb8edf25b6236..f639d0acb9efa69fd7128f9de5597b51ebd82f85 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-30  John David Anglin  <danglin@gcc.gnu.org>
+
+       [BZ libc/22165]
+       * sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext): Use PIC
+       code to load address of __getcontext_ret when generating PIC code.
+
 2017-09-30  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elf/Makefile (tests-static-internal): Add
index 68a74a0b7e46b637005ddc8b0c6271e87c4e5ee8..b201d8fda2351d01eeb48b5590a37dc32add2d1f 100644 (file)
@@ -145,8 +145,13 @@ ENTRY(__getcontext)
        stw     %r4, oR24(%r26)
        stw     %r5, oR25(%r26)
        stw     %r6, oR26(%r26)
+#ifdef PIC
+       addil   LT%__getcontext_ret, %r19
+       ldw     RT%__getcontext_ret(%r1), %r1
+#else
        ldil    L%__getcontext_ret, %r1
        ldo     R%__getcontext_ret(%r1), %r1
+#endif
        stw     %r1, oR2(%r26)
 
        /* Save the current signal mask.  */