Enable the use of -fPIE on hppa
authorCarlos O'Donell <carlos@systemhalted.org>
Sun, 15 Nov 2009 19:30:29 +0000 (14:30 -0500)
committerCarlos O'Donell <carlos@systemhalted.org>
Sun, 15 Nov 2009 19:30:29 +0000 (14:30 -0500)
[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.

ChangeLog.hppa
sysdeps/hppa/elf/start.S

index 1bec9eb..7ad0561 100644 (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]
index 216b14d..c682e9c 100644 (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) */