Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/binutils/dist/bfd Revert



details:   https://anonhg.NetBSD.org/src/rev/76a84de9b511
branches:  trunk
changeset: 771734:76a84de9b511
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Dec 02 09:40:18 2011 +0000

description:
Revert

        http://sourceware.org/ml/binutils/2010-01/msg00594.html

which broken TLS relocations for DSOs - the relocation wasn't being
adjusted wrt the GP.

A proper fix is in the pipeline.

diffstat:

 external/gpl3/binutils/dist/bfd/elf32-hppa.c |  12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diffs (36 lines):

diff -r 666e896527e7 -r 76a84de9b511 external/gpl3/binutils/dist/bfd/elf32-hppa.c
--- a/external/gpl3/binutils/dist/bfd/elf32-hppa.c      Fri Dec 02 09:06:49 2011 +0000
+++ b/external/gpl3/binutils/dist/bfd/elf32-hppa.c      Fri Dec 02 09:40:18 2011 +0000
@@ -3425,19 +3425,12 @@
     case R_PARISC_DPREL21L:
     case R_PARISC_DPREL14R:
     case R_PARISC_DPREL14F:
-    case R_PARISC_TLS_GD21L:
-    case R_PARISC_TLS_LDM21L:
-    case R_PARISC_TLS_IE21L:
       /* Convert instructions that use the linkage table pointer (r19) to
         instructions that use the global data pointer (dp).  This is the
         most efficient way of using PIC code in an incomplete executable,
         but the user must follow the standard runtime conventions for
         accessing data for this to work.  */
-      if (orig_r_type == R_PARISC_DLTIND21L
-         || (!info->shared
-             && (r_type == R_PARISC_TLS_GD21L
-                 || r_type == R_PARISC_TLS_LDM21L
-                 || r_type == R_PARISC_TLS_IE21L)))
+      if (orig_r_type == R_PARISC_DLTIND21L)
        {
          /* Convert addil instructions if the original reloc was a
             DLTIND21L.  GCC sometimes uses a register other than r19 for
@@ -3488,8 +3481,11 @@
     case R_PARISC_DLTIND21L:
     case R_PARISC_DLTIND14R:
     case R_PARISC_DLTIND14F:
+    case R_PARISC_TLS_GD21L:
     case R_PARISC_TLS_GD14R:
+    case R_PARISC_TLS_LDM21L:
     case R_PARISC_TLS_LDM14R:
+    case R_PARISC_TLS_IE21L:
     case R_PARISC_TLS_IE14R:
       value -= elf_gp (input_section->output_section->owner);
       break;



Home | Main Index | Thread Index | Old Index