Blame SOURCES/binutils-2.24-ldforcele.patch

0b07f1
Common subdirectories: ../binutils-2.24.orig/ld/emulparams and ld/emulparams
0b07f1
Common subdirectories: ../binutils-2.24.orig/ld/emultempl and ld/emultempl
0b07f1
diff -up ../binutils-2.24.orig/ld/ldlang.c ld/ldlang.c
0b07f1
--- a/ld/ldlang.c	2014-05-09 10:35:04.589504928 +0100
0b07f1
+++ b/ld/ldlang.c	2014-05-09 10:35:55.515661478 +0100
0b07f1
@@ -7096,6 +7096,18 @@
0b07f1
 	       && little != NULL)
0b07f1
 	format = little;
0b07f1
 
0b07f1
+      if (getenv ("LD_FORCE_LE") != NULL)
0b07f1
+	{
0b07f1
+	  if (strcmp (format, "elf64-powerpc") == 0)
0b07f1
+	    format = "elf64-powerpcle";
0b07f1
+	  else if (strcmp (format, "elf32-powerpc") == 0)
0b07f1
+	    format = "elf32-powerpcle";
0b07f1
+	  else if (strcmp (format, "elf64-big") == 0)
0b07f1
+	    format = "elf64-little";
0b07f1
+	  else if (strcmp (format, "elf32-big") == 0)
0b07f1
+	    format = "elf32-little";
0b07f1
+	}
0b07f1
+
0b07f1
       output_target = format;
0b07f1
     }
0b07f1
 }
0b07f1
Only in ld: ldlang.c.orig
0b07f1
diff -up ../binutils-2.24.orig/ld/ldmain.c ld/ldmain.c
0b07f1
--- a/ld/ldmain.c	2014-05-09 10:35:04.593504941 +0100
0b07f1
+++ b/ld/ldmain.c	2014-05-09 10:35:55.515661478 +0100
0b07f1
@@ -603,6 +603,18 @@
0b07f1
 	}
0b07f1
     }
0b07f1
 
0b07f1
+  if ((strncmp (emulation, "elf64ppc", 8) == 0
0b07f1
+       || strncmp (emulation, "elf32ppc", 8) == 0)
0b07f1
+      && getenv ("LD_FORCE_LE") != NULL)
0b07f1
+    {
0b07f1
+      size_t len = strlen (emulation);
0b07f1
+      char *le = xmalloc (len + 2);
0b07f1
+      memcpy (le, emulation, 5);
0b07f1
+      le[5] = 'l';
0b07f1
+      memcpy (le + 6, emulation + 5, len - 4);
0b07f1
+      emulation = le;
0b07f1
+    }
0b07f1
+
0b07f1
   return emulation;
0b07f1
 }
0b07f1
 
0b07f1
Only in ld: ldmain.c.orig
0b07f1
Common subdirectories: ../binutils-2.24.orig/ld/ldscripts and ld/ldscripts
0b07f1
Common subdirectories: ../binutils-2.24.orig/ld/.libs and ld/.libs
0b07f1
Common subdirectories: ../binutils-2.24.orig/ld/po and ld/po
0b07f1
Common subdirectories: ../binutils-2.24.orig/ld/scripttempl and ld/scripttempl
0b07f1
Common subdirectories: ../binutils-2.24.orig/ld/testsuite and ld/testsuite
0b07f1
Common subdirectories: ../binutils-2.24.orig/ld/tmpdir and ld/tmpdir