From d086703d6c01362fd66a94923f3f615225f865fc Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Sun, 15 Nov 2009 14:30:29 -0500 Subject: [PATCH] Enable the use of -fPIE on hppa [BZ #6676] Use PIC relocations in start.S to support the use of -fPIE on hppa. 2009-11-15 Carlos O'Donell [BZ #6676] * sysdeps/hppa/elf/start.S: Use R_PARISC_DLTIND* relocations to support -fPIE. --- ChangeLog.hppa | 7 +++++++ sysdeps/hppa/elf/start.S | 14 +++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog.hppa b/ChangeLog.hppa index 1bec9eb..7ad0561 100644 --- a/ChangeLog.hppa +++ b/ChangeLog.hppa @@ -1,3 +1,10 @@ +2009-11-15 Carlos O'Donell + + [BZ #6676] + + * sysdeps/hppa/elf/start.S: Use R_PARISC_DLTIND* relocations + to support -fPIE. + 2009-11-08 Carlos O'Donell [BZ #10920] diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S index 216b14d..c682e9c 100644 --- a/sysdeps/hppa/elf/start.S +++ b/sysdeps/hppa/elf/start.S @@ -1,5 +1,5 @@ /* ELF startup code for HPPA. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -96,16 +96,16 @@ _start: #if SHARED /* load main (1st argument) */ - addil LR'.Lpmain, %r19 - ldw RR'.Lpmain(%r1), %r26 + addil LT'.Lpmain, %r19 + ldw RT'.Lpmain(%r1), %r26 ldw 0(%r26),%r26 /* void (*init) (void) (4th argument) */ - addil LR'.Lp__libc_csu_init, %r19 - ldw RR'.Lp__libc_csu_init(%r1), %r23 + addil LT'.Lp__libc_csu_init, %r19 + ldw RT'.Lp__libc_csu_init(%r1), %r23 ldw 0(%r23), %r23 /* void (*fini) (void) (5th argument) */ - addil LR'.Lp__libc_csu_fini, %r19 - ldw RR'.Lp__libc_csu_fini(%r1), %r22 + addil LT'.Lp__libc_csu_fini, %r19 + ldw RT'.Lp__libc_csu_fini(%r1), %r22 ldw 0(%r22), %r22 #else /* load main (1st argument) */ -- 2.7.4