binutils 2.15 / gcc-3.3.5 (3.4.3) produce text relocations on arm

Peter S. Mazinger ps.m@gmx.net
Tue Jan 4 17:17:00 GMT 2005


On Tue, 4 Jan 2005, Daniel Jacobowitz wrote:

> On Tue, Jan 04, 2005 at 04:25:26PM +0100, Peter S. Mazinger wrote:
> > Hello!
> > 
> > I have tried some versions of binutils-2.15 (up to and including 
> > 2.15.94.0.2) in conjunction w/ gcc-3.3.5 and gcc-3.4.3, all combinations 
> > produce text relocations on x86 (using glibc / uclibc) in shared libs.
> > Can't tell if gcc or binutils produce this, maybe a linker script?
> > 
> > Please CC to me, thanks Peter
> 
> Have you checked whether you are actually producing text relocations,
> or just setting DT_TEXTREL?  I just encountered another binutils ARM
> bug which set DT_TEXTREL incorrectly.

I have checked: readelf -d file | grep TEXT

I have seen also discrepancies between arm and other archs, and used the 
attached patch too, but nothing changes

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2
-------------- next part --------------
--- bfd/elf32-arm.c.mps	2004-12-10 20:56:47.000000000 +0100
+++ bfd/elf32-arm.c	2004-12-10 20:57:41.000000000 +0100
@@ -4949,7 +4949,6 @@
 	      || !add_dynamic_entry (DT_RELSZ, 0)
 	      || !add_dynamic_entry (DT_RELENT, sizeof (Elf32_External_Rel)))
 	    return FALSE;
-	}
 
       /* If any dynamic relocs apply to a read-only section,
 	 then we need a DT_TEXTREL entry.  */
@@ -4961,10 +4960,10 @@
 	{
 	  if (!add_dynamic_entry (DT_TEXTREL, 0))
 	    return FALSE;
-	  info->flags |= DF_TEXTREL;
+	}
 	}
     }
-#undef add_synamic_entry
+#undef add_dynamic_entry
 
   return TRUE;
 }


More information about the Binutils mailing list