]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blobdiff - binutils/patches/binutils-2.24-ldforcele.patch0
binutils: Update to 2.24
[people/pmueller/ipfire-3.x.git] / binutils / patches / binutils-2.24-ldforcele.patch0
diff --git a/binutils/patches/binutils-2.24-ldforcele.patch0 b/binutils/patches/binutils-2.24-ldforcele.patch0
new file mode 100644 (file)
index 0000000..6a46c78
--- /dev/null
@@ -0,0 +1,58 @@
+Common subdirectories: ../binutils-2.24.orig/ld/emulparams and ld/emulparams
+Common subdirectories: ../binutils-2.24.orig/ld/emultempl and ld/emultempl
+diff -cp ../binutils-2.24.orig/ld/ldlang.c ld/ldlang.c
+*** ../binutils-2.24.orig/ld/ldlang.c  2014-05-09 10:35:04.589504928 +0100
+--- ld/ldlang.c        2014-05-09 10:35:55.515661478 +0100
+*************** lang_add_output_format (const char *form
+*** 7096,7101 ****
+--- 7096,7113 ----
+              && little != NULL)
+       format = little;
+  
++       if (getenv ("LD_FORCE_LE") != NULL)
++      {
++        if (strcmp (format, "elf64-powerpc") == 0)
++          format = "elf64-powerpcle";
++        else if (strcmp (format, "elf32-powerpc") == 0)
++          format = "elf32-powerpcle";
++        else if (strcmp (format, "elf64-big") == 0)
++          format = "elf64-little";
++        else if (strcmp (format, "elf32-big") == 0)
++          format = "elf32-little";
++      }
++ 
+        output_target = format;
+      }
+  }
+Only in ld: ldlang.c.orig
+diff -cp ../binutils-2.24.orig/ld/ldmain.c ld/ldmain.c
+*** ../binutils-2.24.orig/ld/ldmain.c  2014-05-09 10:35:04.593504941 +0100
+--- ld/ldmain.c        2014-05-09 10:35:55.515661478 +0100
+*************** get_emulation (int argc, char **argv)
+*** 603,608 ****
+--- 603,620 ----
+       }
+      }
+  
++   if ((strncmp (emulation, "elf64ppc", 8) == 0
++        || strncmp (emulation, "elf32ppc", 8) == 0)
++       && getenv ("LD_FORCE_LE") != NULL)
++     {
++       size_t len = strlen (emulation);
++       char *le = xmalloc (len + 2);
++       memcpy (le, emulation, 5);
++       le[5] = 'l';
++       memcpy (le + 6, emulation + 5, len - 4);
++       emulation = le;
++     }
++ 
+    return emulation;
+  }
+  
+Only in ld: ldmain.c.orig
+Common subdirectories: ../binutils-2.24.orig/ld/ldscripts and ld/ldscripts
+Common subdirectories: ../binutils-2.24.orig/ld/.libs and ld/.libs
+Common subdirectories: ../binutils-2.24.orig/ld/po and ld/po
+Common subdirectories: ../binutils-2.24.orig/ld/scripttempl and ld/scripttempl
+Common subdirectories: ../binutils-2.24.orig/ld/testsuite and ld/testsuite
+Common subdirectories: ../binutils-2.24.orig/ld/tmpdir and ld/tmpdir