From patchwork Sat Sep 30 23:13:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 23264 Received: (qmail 89145 invoked by alias); 30 Sep 2017 23:13:28 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 88306 invoked by uid 89); 30 Sep 2017 23:13:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 spammy=H*r:sk:2017093 X-HELO: torfep02.bell.net From: John David Anglin Date: Sat, 30 Sep 2017 19:13:23 -0400 Subject: [committed] hppa: Fix hppa text relocations in libc.so To: GNU C Library Message-Id: <3F418E69-2119-4C23-93F9-CD37FF2C57C1@bell.net> Mime-Version: 1.0 (Apple Message framework v1085) The attached change fixes elf/check-textrel. We need to use PIC code to load the address of __getcontext_ret when generating PIC code. Committed to master. Dave --- John David Anglin dave.anglin@bell.net 2017-09-30 John David Anglin [BZ libc/22165] * sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext): Use PIC code to load address of __getcontext_ret when generating PIC code. diff --git a/sysdeps/unix/sysv/linux/hppa/getcontext.S b/sysdeps/unix/sysv/linux/hppa/getcontext.S index 68a74a0b7e..b201d8fda2 100644 --- a/sysdeps/unix/sysv/linux/hppa/getcontext.S +++ b/sysdeps/unix/sysv/linux/hppa/getcontext.S @@ -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. */