patches/binutils/2.14/binutils-sh-relocs.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 01 16:49:15 2007 +0000 (2007-05-01)
changeset 56 07a6a48962b7
permissions -rw-r--r--
Merge patches sent by Robert P. J. Day <rpjday@mindspring.com>.
Warning: the buildroot folks purposedly removed the skip-comment patch but didn't really said why. Keeping it for the sake of having it in svn just in case (removing it will be easier thant not having it at all).
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