1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/binutils/2.13.90.0.2/rh62-binutils-2.13.90.0.2-tpoff32.patch Sat Jun 16 18:01:59 2007 +0000
1.3 @@ -0,0 +1,27 @@
1.4 +2002-08-07 Jakub Jelinek <jakub@redhat.com>
1.5 +
1.6 + * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
1.7 + for R_386_TLS_TPOFF32 relocs against symndx 0.
1.8 +
1.9 +--- binutils/bfd/elf32-i386.c.jj 2002-07-30 16:14:55.000000000 +0200
1.10 ++++ binutils/bfd/elf32-i386.c 2002-08-07 23:41:48.000000000 +0200
1.11 +@@ -2561,13 +2567,17 @@ elf_i386_relocate_section (output_bfd, i
1.12 + outrel.r_offset = (htab->sgot->output_section->vma
1.13 + + htab->sgot->output_offset + off);
1.14 +
1.15 +- bfd_put_32 (output_bfd, 0,
1.16 +- htab->sgot->contents + off);
1.17 + indx = h && h->dynindx != -1 ? h->dynindx : 0;
1.18 + if (r_type == R_386_TLS_GD)
1.19 + dr_type = R_386_TLS_DTPMOD32;
1.20 + else
1.21 + dr_type = R_386_TLS_TPOFF32;
1.22 ++ if (dr_type == R_386_TLS_TPOFF32 && indx == 0)
1.23 ++ bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
1.24 ++ htab->sgot->contents + off);
1.25 ++ else
1.26 ++ bfd_put_32 (output_bfd, 0,
1.27 ++ htab->sgot->contents + off);
1.28 + outrel.r_info = ELF32_R_INFO (indx, dr_type);
1.29 + loc = (Elf32_External_Rel *) htab->srelgot->contents;
1.30 + loc += htab->srelgot->reloc_count++;