All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] u-boot: Avoid issues with binutils-2.25
@ 2015-04-07 14:49 Richard Purdie
  2015-04-07 15:18 ` Otavio Salvador
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2015-04-07 14:49 UTC (permalink / raw)
  To: openembedded-core

Add a patch based on one from Zhenhua Luo <zhenhua.luo@freescale.com>
in the meta-fsl-ppc layer to avoid build failures for u-boot with the
mpc8315e-rdb machine with binutils 2.25.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

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 0000000..5e9d569
--- /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,188 @@
+From 9ba002f1b1afc7af84a352f4ecab32a30d7ba353 Mon Sep 17 00:00:00 2001
+From: Zhenhua Luo <zhenhua.luo@freescale.com>
+Date: Mon, 9 Feb 2015 18:33:56 +0800
+Subject: [PATCH] powerpc/cpu/*/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_
+ definition
+
+In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in
+u-boot.lds overrides the linker built-in symbols
+(https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=b893397a4b1316610f49819344817715e4305de9),
+so the linker is treating _GLOBAL_OFFSET_TABLE_ as a definition into the .reloc section.
+
+To align with the change of binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbol
+should not be defined in sections, and the symbols in linker generated .got
+section should be used(https://sourceware.org/ml/binutils/2008-09/msg00122.html).
+
+Fixed the following build errors with binutils-2.25:
+| powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in linker created .got
+
+Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
+
+Index: git/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
++++ git/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
+@@ -44,7 +44,6 @@ SECTIONS
+     _GOT2_TABLE_ = .;
+     KEEP(*(.got2))
+     KEEP(*(.got))
+-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+     _FIXUP_TABLE_ = .;
+     KEEP(*(.fixup))
+   }
+Index: git/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
++++ git/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
+@@ -22,7 +22,6 @@ SECTIONS
+ 		_GOT2_TABLE_ = .;
+ 		KEEP(*(.got2))
+ 		KEEP(*(.got))
+-		PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+ 		_FIXUP_TABLE_ = .;
+ 		KEEP(*(.fixup))
+ 	}
+Index: git/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
++++ git/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
+@@ -29,7 +29,6 @@ SECTIONS
+ 		_GOT2_TABLE_ = .;
+ 		KEEP(*(.got2))
+ 		KEEP(*(.got))
+-		PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+ 		_FIXUP_TABLE_ = .;
+ 		KEEP(*(.fixup))
+ 	}
+Index: git/arch/powerpc/cpu/mpc85xx/u-boot.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc85xx/u-boot.lds
++++ git/arch/powerpc/cpu/mpc85xx/u-boot.lds
+@@ -50,7 +50,6 @@ SECTIONS
+     _GOT2_TABLE_ = .;
+     KEEP(*(.got2))
+     KEEP(*(.got))
+-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+     _FIXUP_TABLE_ = .;
+     KEEP(*(.fixup))
+   }
+Index: git/arch/powerpc/cpu/mpc8260/u-boot.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc8260/u-boot.lds
++++ git/arch/powerpc/cpu/mpc8260/u-boot.lds
+@@ -27,7 +27,6 @@ SECTIONS
+     _GOT2_TABLE_ = .;
+     KEEP(*(.got2))
+     KEEP(*(.got))
+-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+     _FIXUP_TABLE_ = .;
+     KEEP(*(.fixup))
+   }
+Index: git/arch/powerpc/cpu/74xx_7xx/u-boot.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/74xx_7xx/u-boot.lds
++++ git/arch/powerpc/cpu/74xx_7xx/u-boot.lds
+@@ -30,7 +30,6 @@ SECTIONS
+     _GOT2_TABLE_ = .;
+     KEEP(*(.got2))
+     KEEP(*(.got))
+-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+     _FIXUP_TABLE_ = .;
+     KEEP(*(.fixup))
+   }
+Index: git/arch/powerpc/cpu/mpc512x/u-boot.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc512x/u-boot.lds
++++ git/arch/powerpc/cpu/mpc512x/u-boot.lds
+@@ -24,7 +24,6 @@ SECTIONS
+     _GOT2_TABLE_ = .;
+     KEEP(*(.got2))
+     KEEP(*(.got))
+-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+     _FIXUP_TABLE_ = .;
+     KEEP(*(.fixup))
+     *(.fixup)
+Index: git/arch/powerpc/cpu/mpc5xx/u-boot.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc5xx/u-boot.lds
++++ git/arch/powerpc/cpu/mpc5xx/u-boot.lds
+@@ -33,7 +33,6 @@ SECTIONS
+     _GOT2_TABLE_ = .;
+     KEEP(*(.got2))
+     KEEP(*(.got))
+-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+     _FIXUP_TABLE_ = .;
+     KEEP(*(.fixup))
+   }
+Index: git/arch/powerpc/cpu/mpc5xxx/u-boot.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc5xxx/u-boot.lds
++++ git/arch/powerpc/cpu/mpc5xxx/u-boot.lds
+@@ -28,7 +28,6 @@ SECTIONS
+     _GOT2_TABLE_ = .;
+     KEEP(*(.got2))
+     KEEP(*(.got))
+-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+     _FIXUP_TABLE_ = .;
+     KEEP(*(.fixup))
+   }
+Index: git/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
++++ git/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
+@@ -24,7 +24,6 @@ SECTIONS
+ 		_GOT2_TABLE_ = .;
+ 		KEEP(*(.got2))
+ 		KEEP(*(.got))
+-		PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+ 	}
+ 	__got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
+ 
+Index: git/arch/powerpc/cpu/mpc83xx/u-boot.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc83xx/u-boot.lds
++++ git/arch/powerpc/cpu/mpc83xx/u-boot.lds
+@@ -26,7 +26,6 @@ SECTIONS
+     _GOT2_TABLE_ = .;
+     KEEP(*(.got2))
+     KEEP(*(.got))
+-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+     _FIXUP_TABLE_ = .;
+     KEEP(*(.fixup))
+   }
+Index: git/arch/powerpc/cpu/mpc86xx/u-boot.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc86xx/u-boot.lds
++++ git/arch/powerpc/cpu/mpc86xx/u-boot.lds
+@@ -32,7 +32,6 @@ SECTIONS
+     _GOT2_TABLE_ = .;
+     KEEP(*(.got2))
+     KEEP(*(.got))
+-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+     _FIXUP_TABLE_ = .;
+     KEEP(*(.fixup))
+   }
+Index: git/arch/powerpc/cpu/mpc8xx/u-boot.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/mpc8xx/u-boot.lds
++++ git/arch/powerpc/cpu/mpc8xx/u-boot.lds
+@@ -34,7 +34,6 @@ SECTIONS
+     _GOT2_TABLE_ = .;
+     KEEP(*(.got2))
+     KEEP(*(.got))
+-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+     _FIXUP_TABLE_ = .;
+     KEEP(*(.fixup))
+   }
+Index: git/arch/powerpc/cpu/ppc4xx/u-boot.lds
+===================================================================
+--- git.orig/arch/powerpc/cpu/ppc4xx/u-boot.lds
++++ git/arch/powerpc/cpu/ppc4xx/u-boot.lds
+@@ -46,7 +46,6 @@ SECTIONS
+     _GOT2_TABLE_ = .;
+     KEEP(*(.got2))
+     KEEP(*(.got))
+-    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
+     _FIXUP_TABLE_ = .;
+     KEEP(*(.fixup))
+   }
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 6feac31..70a1e54 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
 
 DEPENDS += "dtc-native"
 
+SRC_URI += "file://0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch"
+
 # This revision corresponds to the tag "v2015.01"
 # We use the revision in order to avoid having to fetch it from the repo during parse
 SRCREV = "92fa7f53f1f3f03296f8ffb14bdf1baefab83368"




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] u-boot: Avoid issues with binutils-2.25
  2015-04-07 14:49 [PATCH] u-boot: Avoid issues with binutils-2.25 Richard Purdie
@ 2015-04-07 15:18 ` Otavio Salvador
  0 siblings, 0 replies; 2+ messages in thread
From: Otavio Salvador @ 2015-04-07 15:18 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Tue, Apr 7, 2015 at 11:49 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Add a patch based on one from Zhenhua Luo <zhenhua.luo@freescale.com>
> in the meta-fsl-ppc layer to avoid build failures for u-boot with the
> mpc8315e-rdb machine with binutils 2.25.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> 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 0000000..5e9d569
> --- /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,188 @@
> +From 9ba002f1b1afc7af84a352f4ecab32a30d7ba353 Mon Sep 17 00:00:00 2001
> +From: Zhenhua Luo <zhenhua.luo@freescale.com>
> +Date: Mon, 9 Feb 2015 18:33:56 +0800
> +Subject: [PATCH] powerpc/cpu/*/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_
> + definition
> +
> +In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in
> +u-boot.lds overrides the linker built-in symbols
> +(https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=b893397a4b1316610f49819344817715e4305de9),
> +so the linker is treating _GLOBAL_OFFSET_TABLE_ as a definition into the .reloc section.
> +
> +To align with the change of binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbol
> +should not be defined in sections, and the symbols in linker generated .got
> +section should be used(https://sourceware.org/ml/binutils/2008-09/msg00122.html).
> +
> +Fixed the following build errors with binutils-2.25:
> +| powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in linker created .got
> +
> +Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>

The Upstream-Status field is missing.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-07 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-07 14:49 [PATCH] u-boot: Avoid issues with binutils-2.25 Richard Purdie
2015-04-07 15:18 ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.