blob: dfbcd45bea28e2551b7274a7891e323fde3034c9 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From 92598e1515b2ec3851af1f064075d0457f01272d 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
6Organization: O.S. Systems Software LTDA.
7
8In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in
9u-boot.lds overrides the linker built-in symbols
10(https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=b893397a4b1316610f49819344817715e4305de9),
11so the linker is treating _GLOBAL_OFFSET_TABLE_ as a definition into the .reloc section.
12
13To align with the change of binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbol
14should not be defined in sections, and the symbols in linker generated .got
15section should be used(https://sourceware.org/ml/binutils/2008-09/msg00122.html).
16
17Fixed the following build errors with binutils-2.25:
18| powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in linker created .got
19
20Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
21
22Upstream-Status: Pending
23---
24 arch/powerpc/cpu/mpc512x/u-boot.lds | 1 -
25 arch/powerpc/cpu/mpc5xx/u-boot.lds | 1 -
26 arch/powerpc/cpu/mpc5xxx/u-boot.lds | 1 -
27 arch/powerpc/cpu/mpc8260/u-boot.lds | 1 -
28 arch/powerpc/cpu/mpc83xx/u-boot-spl.lds | 1 -
29 arch/powerpc/cpu/mpc83xx/u-boot.lds | 1 -
30 arch/powerpc/cpu/mpc85xx/u-boot-nand.lds | 1 -
31 arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds | 1 -
32 arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 1 -
33 arch/powerpc/cpu/mpc85xx/u-boot.lds | 1 -
34 arch/powerpc/cpu/mpc86xx/u-boot.lds | 1 -
35 arch/powerpc/cpu/ppc4xx/u-boot.lds | 1 -
36 12 files changed, 12 deletions(-)
37
38diff --git a/arch/powerpc/cpu/mpc512x/u-boot.lds b/arch/powerpc/cpu/mpc512x/u-boot.lds
39index 9658b21..b32f74e 100644
40--- a/arch/powerpc/cpu/mpc512x/u-boot.lds
41+++ b/arch/powerpc/cpu/mpc512x/u-boot.lds
42@@ -24,7 +24,6 @@ SECTIONS
43 _GOT2_TABLE_ = .;
44 KEEP(*(.got2))
45 KEEP(*(.got))
46- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
47 _FIXUP_TABLE_ = .;
48 KEEP(*(.fixup))
49 *(.fixup)
50diff --git a/arch/powerpc/cpu/mpc5xx/u-boot.lds b/arch/powerpc/cpu/mpc5xx/u-boot.lds
51index 7198465..6a53571 100644
52--- a/arch/powerpc/cpu/mpc5xx/u-boot.lds
53+++ b/arch/powerpc/cpu/mpc5xx/u-boot.lds
54@@ -33,7 +33,6 @@ SECTIONS
55 _GOT2_TABLE_ = .;
56 KEEP(*(.got2))
57 KEEP(*(.got))
58- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
59 _FIXUP_TABLE_ = .;
60 KEEP(*(.fixup))
61 }
62diff --git a/arch/powerpc/cpu/mpc5xxx/u-boot.lds b/arch/powerpc/cpu/mpc5xxx/u-boot.lds
63index cd9e23f..aa80d3d 100644
64--- a/arch/powerpc/cpu/mpc5xxx/u-boot.lds
65+++ b/arch/powerpc/cpu/mpc5xxx/u-boot.lds
66@@ -28,7 +28,6 @@ SECTIONS
67 _GOT2_TABLE_ = .;
68 KEEP(*(.got2))
69 KEEP(*(.got))
70- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
71 _FIXUP_TABLE_ = .;
72 KEEP(*(.fixup))
73 }
74diff --git a/arch/powerpc/cpu/mpc8260/u-boot.lds b/arch/powerpc/cpu/mpc8260/u-boot.lds
75index 50cbf85..469fc29 100644
76--- a/arch/powerpc/cpu/mpc8260/u-boot.lds
77+++ b/arch/powerpc/cpu/mpc8260/u-boot.lds
78@@ -27,7 +27,6 @@ SECTIONS
79 _GOT2_TABLE_ = .;
80 KEEP(*(.got2))
81 KEEP(*(.got))
82- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
83 _FIXUP_TABLE_ = .;
84 KEEP(*(.fixup))
85 }
86diff --git a/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
87index 774772b..4101eaf 100644
88--- a/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
89+++ b/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
90@@ -24,7 +24,6 @@ SECTIONS
91 _GOT2_TABLE_ = .;
92 KEEP(*(.got2))
93 KEEP(*(.got))
94- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
95 }
96 __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
97
98diff --git a/arch/powerpc/cpu/mpc83xx/u-boot.lds b/arch/powerpc/cpu/mpc83xx/u-boot.lds
99index 3c177fa..dbd8bbe 100644
100--- a/arch/powerpc/cpu/mpc83xx/u-boot.lds
101+++ b/arch/powerpc/cpu/mpc83xx/u-boot.lds
102@@ -26,7 +26,6 @@ SECTIONS
103 _GOT2_TABLE_ = .;
104 KEEP(*(.got2))
105 KEEP(*(.got))
106- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
107 _FIXUP_TABLE_ = .;
108 KEEP(*(.fixup))
109 }
110diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
111index f933b21..0399f93 100644
112--- a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
113+++ b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
114@@ -44,7 +44,6 @@ SECTIONS
115 _GOT2_TABLE_ = .;
116 KEEP(*(.got2))
117 KEEP(*(.got))
118- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
119 _FIXUP_TABLE_ = .;
120 KEEP(*(.fixup))
121 }
122diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
123index b83c553..f044564 100644
124--- a/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
125+++ b/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
126@@ -22,7 +22,6 @@ SECTIONS
127 _GOT2_TABLE_ = .;
128 KEEP(*(.got2))
129 KEEP(*(.got))
130- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
131 _FIXUP_TABLE_ = .;
132 KEEP(*(.fixup))
133 }
134diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
135index 5ae7b3e..889a4c2 100644
136--- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
137+++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
138@@ -29,7 +29,6 @@ SECTIONS
139 _GOT2_TABLE_ = .;
140 KEEP(*(.got2))
141 KEEP(*(.got))
142- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
143 _FIXUP_TABLE_ = .;
144 KEEP(*(.fixup))
145 }
146diff --git a/arch/powerpc/cpu/mpc85xx/u-boot.lds b/arch/powerpc/cpu/mpc85xx/u-boot.lds
147index 2cf0b25..f15eaf3 100644
148--- a/arch/powerpc/cpu/mpc85xx/u-boot.lds
149+++ b/arch/powerpc/cpu/mpc85xx/u-boot.lds
150@@ -50,7 +50,6 @@ SECTIONS
151 _GOT2_TABLE_ = .;
152 KEEP(*(.got2))
153 KEEP(*(.got))
154- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
155 _FIXUP_TABLE_ = .;
156 KEEP(*(.fixup))
157 }
158diff --git a/arch/powerpc/cpu/mpc86xx/u-boot.lds b/arch/powerpc/cpu/mpc86xx/u-boot.lds
159index 58467c2..6c48f40 100644
160--- a/arch/powerpc/cpu/mpc86xx/u-boot.lds
161+++ b/arch/powerpc/cpu/mpc86xx/u-boot.lds
162@@ -32,7 +32,6 @@ SECTIONS
163 _GOT2_TABLE_ = .;
164 KEEP(*(.got2))
165 KEEP(*(.got))
166- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
167 _FIXUP_TABLE_ = .;
168 KEEP(*(.fixup))
169 }
170diff --git a/arch/powerpc/cpu/ppc4xx/u-boot.lds b/arch/powerpc/cpu/ppc4xx/u-boot.lds
171index 1980508..55dd4e1 100644
172--- a/arch/powerpc/cpu/ppc4xx/u-boot.lds
173+++ b/arch/powerpc/cpu/ppc4xx/u-boot.lds
174@@ -46,7 +46,6 @@ SECTIONS
175 _GOT2_TABLE_ = .;
176 KEEP(*(.got2))
177 KEEP(*(.got))
178- PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
179 _FIXUP_TABLE_ = .;
180 KEEP(*(.fixup))
181 }
182--
1832.4.6
184