summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-bsp/u-boot/u-boot/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch190
-rw-r--r--meta/recipes-bsp/u-boot/u-boot_2015.01.bb2
2 files changed, 192 insertions, 0 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch b/meta/recipes-bsp/u-boot/u-boot/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch
new file mode 100644
index 0000000000..faf2985140
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/u-boot/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch
@@ -0,0 +1,190 @@
1From 9ba002f1b1afc7af84a352f4ecab32a30d7ba353 Mon Sep 17 00:00:00 2001
2From: Zhenhua Luo <zhenhua.luo@freescale.com>
3Date: Mon, 9 Feb 2015 18:33:56 +0800
4Subject: [PATCH] powerpc/cpu/*/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_
5 definition
6
7In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in
8u-boot.lds overrides the linker built-in symbols
9(https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=b893397a4b1316610f49819344817715e4305de9),
10so the linker is treating _GLOBAL_OFFSET_TABLE_ as a definition into the .reloc section.
11
12To align with the change of binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbol
13should not be defined in sections, and the symbols in linker generated .got
14section should be used(https://sourceware.org/ml/binutils/2008-09/msg00122.html).
15
16Fixed the following build errors with binutils-2.25:
17| powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in linker created .got
18
19Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
20
21Upstream-Status: Pending
22
23Index: git/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
24===================================================================
25--- git.orig/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
26+++ git/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
27@@ -44,7 +44,6 @@ SECTIONS
28 _GOT2_TABLE_ = .;
29 KEEP(*(.got2))
30 KEEP(*(.got))
31- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
32 _FIXUP_TABLE_ = .;
33 KEEP(*(.fixup))
34 }
35Index: git/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
36===================================================================
37--- git.orig/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
38+++ git/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
39@@ -22,7 +22,6 @@ SECTIONS
40 _GOT2_TABLE_ = .;
41 KEEP(*(.got2))
42 KEEP(*(.got))
43- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
44 _FIXUP_TABLE_ = .;
45 KEEP(*(.fixup))
46 }
47Index: git/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
48===================================================================
49--- git.orig/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
50+++ git/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
51@@ -29,7 +29,6 @@ SECTIONS
52 _GOT2_TABLE_ = .;
53 KEEP(*(.got2))
54 KEEP(*(.got))
55- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
56 _FIXUP_TABLE_ = .;
57 KEEP(*(.fixup))
58 }
59Index: git/arch/powerpc/cpu/mpc85xx/u-boot.lds
60===================================================================
61--- git.orig/arch/powerpc/cpu/mpc85xx/u-boot.lds
62+++ git/arch/powerpc/cpu/mpc85xx/u-boot.lds
63@@ -50,7 +50,6 @@ SECTIONS
64 _GOT2_TABLE_ = .;
65 KEEP(*(.got2))
66 KEEP(*(.got))
67- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
68 _FIXUP_TABLE_ = .;
69 KEEP(*(.fixup))
70 }
71Index: git/arch/powerpc/cpu/mpc8260/u-boot.lds
72===================================================================
73--- git.orig/arch/powerpc/cpu/mpc8260/u-boot.lds
74+++ git/arch/powerpc/cpu/mpc8260/u-boot.lds
75@@ -27,7 +27,6 @@ SECTIONS
76 _GOT2_TABLE_ = .;
77 KEEP(*(.got2))
78 KEEP(*(.got))
79- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
80 _FIXUP_TABLE_ = .;
81 KEEP(*(.fixup))
82 }
83Index: git/arch/powerpc/cpu/74xx_7xx/u-boot.lds
84===================================================================
85--- git.orig/arch/powerpc/cpu/74xx_7xx/u-boot.lds
86+++ git/arch/powerpc/cpu/74xx_7xx/u-boot.lds
87@@ -30,7 +30,6 @@ SECTIONS
88 _GOT2_TABLE_ = .;
89 KEEP(*(.got2))
90 KEEP(*(.got))
91- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
92 _FIXUP_TABLE_ = .;
93 KEEP(*(.fixup))
94 }
95Index: git/arch/powerpc/cpu/mpc512x/u-boot.lds
96===================================================================
97--- git.orig/arch/powerpc/cpu/mpc512x/u-boot.lds
98+++ git/arch/powerpc/cpu/mpc512x/u-boot.lds
99@@ -24,7 +24,6 @@ SECTIONS
100 _GOT2_TABLE_ = .;
101 KEEP(*(.got2))
102 KEEP(*(.got))
103- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
104 _FIXUP_TABLE_ = .;
105 KEEP(*(.fixup))
106 *(.fixup)
107Index: git/arch/powerpc/cpu/mpc5xx/u-boot.lds
108===================================================================
109--- git.orig/arch/powerpc/cpu/mpc5xx/u-boot.lds
110+++ git/arch/powerpc/cpu/mpc5xx/u-boot.lds
111@@ -33,7 +33,6 @@ SECTIONS
112 _GOT2_TABLE_ = .;
113 KEEP(*(.got2))
114 KEEP(*(.got))
115- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
116 _FIXUP_TABLE_ = .;
117 KEEP(*(.fixup))
118 }
119Index: git/arch/powerpc/cpu/mpc5xxx/u-boot.lds
120===================================================================
121--- git.orig/arch/powerpc/cpu/mpc5xxx/u-boot.lds
122+++ git/arch/powerpc/cpu/mpc5xxx/u-boot.lds
123@@ -28,7 +28,6 @@ SECTIONS
124 _GOT2_TABLE_ = .;
125 KEEP(*(.got2))
126 KEEP(*(.got))
127- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
128 _FIXUP_TABLE_ = .;
129 KEEP(*(.fixup))
130 }
131Index: git/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
132===================================================================
133--- git.orig/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
134+++ git/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
135@@ -24,7 +24,6 @@ SECTIONS
136 _GOT2_TABLE_ = .;
137 KEEP(*(.got2))
138 KEEP(*(.got))
139- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
140 }
141 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
142
143Index: git/arch/powerpc/cpu/mpc83xx/u-boot.lds
144===================================================================
145--- git.orig/arch/powerpc/cpu/mpc83xx/u-boot.lds
146+++ git/arch/powerpc/cpu/mpc83xx/u-boot.lds
147@@ -26,7 +26,6 @@ SECTIONS
148 _GOT2_TABLE_ = .;
149 KEEP(*(.got2))
150 KEEP(*(.got))
151- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
152 _FIXUP_TABLE_ = .;
153 KEEP(*(.fixup))
154 }
155Index: git/arch/powerpc/cpu/mpc86xx/u-boot.lds
156===================================================================
157--- git.orig/arch/powerpc/cpu/mpc86xx/u-boot.lds
158+++ git/arch/powerpc/cpu/mpc86xx/u-boot.lds
159@@ -32,7 +32,6 @@ SECTIONS
160 _GOT2_TABLE_ = .;
161 KEEP(*(.got2))
162 KEEP(*(.got))
163- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
164 _FIXUP_TABLE_ = .;
165 KEEP(*(.fixup))
166 }
167Index: git/arch/powerpc/cpu/mpc8xx/u-boot.lds
168===================================================================
169--- git.orig/arch/powerpc/cpu/mpc8xx/u-boot.lds
170+++ git/arch/powerpc/cpu/mpc8xx/u-boot.lds
171@@ -34,7 +34,6 @@ SECTIONS
172 _GOT2_TABLE_ = .;
173 KEEP(*(.got2))
174 KEEP(*(.got))
175- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
176 _FIXUP_TABLE_ = .;
177 KEEP(*(.fixup))
178 }
179Index: git/arch/powerpc/cpu/ppc4xx/u-boot.lds
180===================================================================
181--- git.orig/arch/powerpc/cpu/ppc4xx/u-boot.lds
182+++ git/arch/powerpc/cpu/ppc4xx/u-boot.lds
183@@ -46,7 +46,6 @@ SECTIONS
184 _GOT2_TABLE_ = .;
185 KEEP(*(.got2))
186 KEEP(*(.got))
187- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
188 _FIXUP_TABLE_ = .;
189 KEEP(*(.fixup))
190 }
diff --git a/meta/recipes-bsp/u-boot/u-boot_2015.01.bb b/meta/recipes-bsp/u-boot/u-boot_2015.01.bb
index 6feac3107d..70a1e545a0 100644
--- a/meta/recipes-bsp/u-boot/u-boot_2015.01.bb
+++ b/meta/recipes-bsp/u-boot/u-boot_2015.01.bb
@@ -2,6 +2,8 @@ require u-boot.inc
2 2
3DEPENDS += "dtc-native" 3DEPENDS += "dtc-native"
4 4
5SRC_URI += "file://0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch"
6
5# This revision corresponds to the tag "v2015.01" 7# This revision corresponds to the tag "v2015.01"
6# We use the revision in order to avoid having to fetch it from the repo during parse 8# We use the revision in order to avoid having to fetch it from the repo during parse
7SRCREV = "92fa7f53f1f3f03296f8ffb14bdf1baefab83368" 9SRCREV = "92fa7f53f1f3f03296f8ffb14bdf1baefab83368"