patches/binutils/2.14/binutils-sh-relocs.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 20 13:48:26 2007 +0000 (2007-05-20)
changeset 112 ea15433daba0
permissions -rw-r--r--
Ah! I finally have a progress bar that doesn't stall the build!
- pipe size in Linux is only 8*512=4096 bytes
- pipe size is not setable
- when the feeding process spits out data faster than the eating
process can read it, then the feeding process stalls after 4KiB
of data sent to the pipe
- for us, the progress bar would spawn a sub-shell every line,
and the sub-shell would in turn spawn a 'date' command.
Which was sloooww as hell, and would cause some kind of a
starvation: the pipe was full most of the time, and the
feeding process was stalled all this time.

Now, we use internal variables and a little hack based onan offset
to determine the elapsed time. Much faster this way, but still
CPU-intensive.
yann@1
     1
Message-Id: <200307311239.h6VCdNe27056@r-rr.iij4u.or.jp>
yann@1
     2
To: dank@kegel.com
yann@1
     3
Cc: kkojima@rr.iij4u.or.jp
yann@1
     4
Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
yann@1
     5
 with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
yann@1
     6
In-Reply-To: Your message of "Wed, 30 Jul 2003 21:55:54 -0700"
yann@1
     7
	<3F28A15A.5010400@kegel.com>
yann@1
     8
References: <3F28A15A.5010400@kegel.com>
yann@1
     9
Date: Thu, 31 Jul 2003 21:47:38 +0900
yann@1
    10
From: kaz Kojima <kkojima@rr.iij4u.or.jp>
yann@1
    11
yann@1
    12
Dan Kegel <dank@kegel.com> wrote:
yann@1
    13
>> I'll give binutils-2.14.90.0.5 a shot, then. 
yann@1
    14
> 
yann@1
    15
> No joy - same problem.  Guess I'll take this up on binutils and/or libc-alpha.
yann@1
    16
yann@1
    17
Please try the patch below, though it's a diff against the current
yann@1
    18
binutils CVS.
yann@1
    19
yann@1
    20
Regards,
yann@1
    21
	kaz
yann@1
    22
--
yann@1
    23
diff -u3p ORIG/src/bfd/elf32-sh.c LOCAL/src/bfd/elf32-sh.c
yann@1
    24
--- src/bfd/elf32-sh.c.old	Fri Jul 25 14:46:58 2003
yann@1
    25
+++ src/bfd/elf32-sh.c	Thu Jul 31 21:09:38 2003
yann@1
    26
@@ -6497,8 +6497,10 @@ sh_elf_check_relocs (bfd *abfd, struct b
yann@1
    27
 							  sreloc, 2))
yann@1
    28
 			return FALSE;
yann@1
    29
 		    }
yann@1
    30
+#if 0
yann@1
    31
 		  if (sec->flags & SEC_READONLY)
yann@1
    32
 		    info->flags |= DF_TEXTREL;
yann@1
    33
+#endif
yann@1
    34
 		  elf_section_data (sec)->sreloc = sreloc;
yann@1
    35
 		}
yann@1
    36
 
yann@1
    37
yann@1
    38