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  <carlos@codesourcery.com>

	[BZ #6676]

	* sysdeps/hppa/elf/start.S: Use R_PARISC_DLTIND* relocations
	to support -fPIE.
This commit is contained in:
Carlos O'Donell 2009-11-15 14:30:29 -05:00
parent 8ef75725ce
commit d086703d6c
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
[BZ #6676]
* sysdeps/hppa/elf/start.S: Use R_PARISC_DLTIND* relocations
to support -fPIE.
2009-11-08 Carlos O'Donell <carlos@codesourcery.com>
[BZ #10920]

View File

@ -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) */