patches/binutils/2.13.90.0.2/rh62-binutils-2.13.90.0.2-tpoff32.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 2002-08-07  Jakub Jelinek  <jakub@redhat.com>
     2 
     3 	* elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
     4 	for R_386_TLS_TPOFF32 relocs against symndx 0.
     5 
     6 --- binutils/bfd/elf32-i386.c.jj	2002-07-30 16:14:55.000000000 +0200
     7 +++ binutils/bfd/elf32-i386.c	2002-08-07 23:41:48.000000000 +0200
     8 @@ -2561,13 +2567,17 @@ elf_i386_relocate_section (output_bfd, i
     9  	      outrel.r_offset = (htab->sgot->output_section->vma
    10  				 + htab->sgot->output_offset + off);
    11  
    12 -	      bfd_put_32 (output_bfd, 0,
    13 -			  htab->sgot->contents + off);
    14  	      indx = h && h->dynindx != -1 ? h->dynindx : 0;
    15  	      if (r_type == R_386_TLS_GD)
    16  		dr_type = R_386_TLS_DTPMOD32;
    17  	      else
    18  		dr_type = R_386_TLS_TPOFF32;
    19 +	      if (dr_type == R_386_TLS_TPOFF32 && indx == 0)
    20 +		bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
    21 +			    htab->sgot->contents + off);
    22 +	      else
    23 +		bfd_put_32 (output_bfd, 0,
    24 +			    htab->sgot->contents + off);
    25  	      outrel.r_info = ELF32_R_INFO (indx, dr_type);
    26  	      loc = (Elf32_External_Rel *) htab->srelgot->contents;
    27  	      loc += htab->srelgot->reloc_count++;