patches/binutils/2.14/100-binutils-sh-relocs.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Feb 17 22:08:06 2008 +0000 (2008-02-17)
changeset 431 8bde4c6ea47a
permissions -rw-r--r--
Robert P. J. DAY says:

apparently, the patchset for gcc 4.2.1 applies properly to the
source for gcc 4.2.2 and gcc 4.2.3. so, if you want, you can simply
add support for those last two just by augmenting menuconfig and
adding a couple symlinks for those two directories. seems like a
cheap way to add a couple new versions.
yann@402
     1
Message-Id: <200307311239.h6VCdNe27056@r-rr.iij4u.or.jp>
yann@402
     2
To: dank@kegel.com
yann@402
     3
Cc: kkojima@rr.iij4u.or.jp
yann@402
     4
Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
yann@402
     5
 with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
yann@402
     6
In-Reply-To: Your message of "Wed, 30 Jul 2003 21:55:54 -0700"
yann@402
     7
	<3F28A15A.5010400@kegel.com>
yann@402
     8
References: <3F28A15A.5010400@kegel.com>
yann@402
     9
Date: Thu, 31 Jul 2003 21:47:38 +0900
yann@402
    10
From: kaz Kojima <kkojima@rr.iij4u.or.jp>
yann@402
    11
yann@402
    12
Dan Kegel <dank@kegel.com> wrote:
yann@402
    13
>> I'll give binutils-2.14.90.0.5 a shot, then. 
yann@402
    14
> 
yann@402
    15
> No joy - same problem.  Guess I'll take this up on binutils and/or libc-alpha.
yann@402
    16
yann@402
    17
Please try the patch below, though it's a diff against the current
yann@402
    18
binutils CVS.
yann@402
    19
yann@402
    20
Regards,
yann@402
    21
	kaz
yann@402
    22
--
yann@402
    23
diff -u3p ORIG/src/bfd/elf32-sh.c LOCAL/src/bfd/elf32-sh.c
yann@402
    24
--- src/bfd/elf32-sh.c.old	Fri Jul 25 14:46:58 2003
yann@402
    25
+++ src/bfd/elf32-sh.c	Thu Jul 31 21:09:38 2003
yann@402
    26
@@ -6497,8 +6497,10 @@ sh_elf_check_relocs (bfd *abfd, struct b
yann@402
    27
 							  sreloc, 2))
yann@402
    28
 			return FALSE;
yann@402
    29
 		    }
yann@402
    30
+#if 0
yann@402
    31
 		  if (sec->flags & SEC_READONLY)
yann@402
    32
 		    info->flags |= DF_TEXTREL;
yann@402
    33
+#endif
yann@402
    34
 		  elf_section_data (sec)->sreloc = sreloc;
yann@402
    35
 		}
yann@402
    36
 
yann@402
    37
yann@402
    38