Module Name:    src
Committed By:   skrll
Date:           Fri Dec  2 09:40:18 UTC 2011

Modified Files:
        src/external/gpl3/binutils/dist/bfd: elf32-hppa.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/binutils/dist/bfd/elf32-hppa.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/binutils/dist/bfd/elf32-hppa.c
diff -u src/external/gpl3/binutils/dist/bfd/elf32-hppa.c:1.3 src/external/gpl3/binutils/dist/bfd/elf32-hppa.c:1.4
--- src/external/gpl3/binutils/dist/bfd/elf32-hppa.c:1.3	Sun Sep 25 04:32:35 2011
+++ src/external/gpl3/binutils/dist/bfd/elf32-hppa.c	Fri Dec  2 09:40:18 2011
@@ -3425,19 +3425,12 @@ final_link_relocate (asection *input_sec
     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 @@ final_link_relocate (asection *input_sec
     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;

Reply via email to