]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - binutils/patches/binutils-2.24-ldforcele.patch0
binutils: Update to 2.24
[people/ms/ipfire-3.x.git] / binutils / patches / binutils-2.24-ldforcele.patch0
1 Common subdirectories: ../binutils-2.24.orig/ld/emulparams and ld/emulparams
2 Common subdirectories: ../binutils-2.24.orig/ld/emultempl and ld/emultempl
3 diff -cp ../binutils-2.24.orig/ld/ldlang.c ld/ldlang.c
4 *** ../binutils-2.24.orig/ld/ldlang.c 2014-05-09 10:35:04.589504928 +0100
5 --- ld/ldlang.c 2014-05-09 10:35:55.515661478 +0100
6 *************** lang_add_output_format (const char *form
7 *** 7096,7101 ****
8 --- 7096,7113 ----
9 && little != NULL)
10 format = little;
11
12 + if (getenv ("LD_FORCE_LE") != NULL)
13 + {
14 + if (strcmp (format, "elf64-powerpc") == 0)
15 + format = "elf64-powerpcle";
16 + else if (strcmp (format, "elf32-powerpc") == 0)
17 + format = "elf32-powerpcle";
18 + else if (strcmp (format, "elf64-big") == 0)
19 + format = "elf64-little";
20 + else if (strcmp (format, "elf32-big") == 0)
21 + format = "elf32-little";
22 + }
23 +
24 output_target = format;
25 }
26 }
27 Only in ld: ldlang.c.orig
28 diff -cp ../binutils-2.24.orig/ld/ldmain.c ld/ldmain.c
29 *** ../binutils-2.24.orig/ld/ldmain.c 2014-05-09 10:35:04.593504941 +0100
30 --- ld/ldmain.c 2014-05-09 10:35:55.515661478 +0100
31 *************** get_emulation (int argc, char **argv)
32 *** 603,608 ****
33 --- 603,620 ----
34 }
35 }
36
37 + if ((strncmp (emulation, "elf64ppc", 8) == 0
38 + || strncmp (emulation, "elf32ppc", 8) == 0)
39 + && getenv ("LD_FORCE_LE") != NULL)
40 + {
41 + size_t len = strlen (emulation);
42 + char *le = xmalloc (len + 2);
43 + memcpy (le, emulation, 5);
44 + le[5] = 'l';
45 + memcpy (le + 6, emulation + 5, len - 4);
46 + emulation = le;
47 + }
48 +
49 return emulation;
50 }
51
52 Only in ld: ldmain.c.orig
53 Common subdirectories: ../binutils-2.24.orig/ld/ldscripts and ld/ldscripts
54 Common subdirectories: ../binutils-2.24.orig/ld/.libs and ld/.libs
55 Common subdirectories: ../binutils-2.24.orig/ld/po and ld/po
56 Common subdirectories: ../binutils-2.24.orig/ld/scripttempl and ld/scripttempl
57 Common subdirectories: ../binutils-2.24.orig/ld/testsuite and ld/testsuite
58 Common subdirectories: ../binutils-2.24.orig/ld/tmpdir and ld/tmpdir