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>
Tue May 08 17:48:32 2007 +0000 (2007-05-08)
changeset 78 c3868084d81a
permissions -rw-r--r--
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);

Shut uClibc finish step: there really is nothing to do;

Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);

Did not catch the make errors: fixed the pattern matching in scripts/functions;

Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;

Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
yann@1
     1
2002-08-07  Jakub Jelinek  <jakub@redhat.com>
yann@1
     2
yann@1
     3
	* elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
yann@1
     4
	for R_386_TLS_TPOFF32 relocs against symndx 0.
yann@1
     5
yann@1
     6
--- binutils/bfd/elf32-i386.c.jj	2002-07-30 16:14:55.000000000 +0200
yann@1
     7
+++ binutils/bfd/elf32-i386.c	2002-08-07 23:41:48.000000000 +0200
yann@1
     8
@@ -2561,13 +2567,17 @@ elf_i386_relocate_section (output_bfd, i
yann@1
     9
 	      outrel.r_offset = (htab->sgot->output_section->vma
yann@1
    10
 				 + htab->sgot->output_offset + off);
yann@1
    11
 
yann@1
    12
-	      bfd_put_32 (output_bfd, 0,
yann@1
    13
-			  htab->sgot->contents + off);
yann@1
    14
 	      indx = h && h->dynindx != -1 ? h->dynindx : 0;
yann@1
    15
 	      if (r_type == R_386_TLS_GD)
yann@1
    16
 		dr_type = R_386_TLS_DTPMOD32;
yann@1
    17
 	      else
yann@1
    18
 		dr_type = R_386_TLS_TPOFF32;
yann@1
    19
+	      if (dr_type == R_386_TLS_TPOFF32 && indx == 0)
yann@1
    20
+		bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
yann@1
    21
+			    htab->sgot->contents + off);
yann@1
    22
+	      else
yann@1
    23
+		bfd_put_32 (output_bfd, 0,
yann@1
    24
+			    htab->sgot->contents + off);
yann@1
    25
 	      outrel.r_info = ELF32_R_INFO (indx, dr_type);
yann@1
    26
 	      loc = (Elf32_External_Rel *) htab->srelgot->contents;
yann@1
    27
 	      loc += htab->srelgot->reloc_count++;