summaryrefslogtreecommitdiff
path: root/recipes/binutils
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2009-10-16 16:06:55 -0700
committerKhem Raj <raj.khem@gmail.com>2009-10-16 16:06:55 -0700
commit33630af91d1027a91b43f697c86e809a770668e1 (patch)
tree21f7b101893760f3da1dae595a8e6d9cd082ea8b /recipes/binutils
parent53e184bbac79000299d378fdf24b542f65a092f2 (diff)
binutils-2.20: Add recipes for 2.20 release
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/binutils')
-rw-r--r--recipes/binutils/binutils-2.20/110-arm-eabi-conf.patch22
-rw-r--r--recipes/binutils/binutils-2.20/binutils-2.16.1-e300c2c3.patch18
-rw-r--r--recipes/binutils/binutils-2.20/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch39
-rw-r--r--recipes/binutils/binutils-2.20/binutils-arm-pr7093.patch19
-rw-r--r--recipes/binutils/binutils-2.20/binutils-uclibc-100-uclibc-conf.patch34
-rw-r--r--recipes/binutils/binutils-2.20/binutils-uclibc-300-001_ld_makefile_patch.patch50
-rw-r--r--recipes/binutils/binutils-2.20/binutils-uclibc-300-006_better_file_error.patch43
-rw-r--r--recipes/binutils/binutils-2.20/binutils-uclibc-300-012_check_ldrunpath_length.patch47
-rw-r--r--recipes/binutils/binutils-2.20/binutils-uclibc-gas-needs-libm.patch38
-rw-r--r--recipes/binutils/binutils-2.20/binutils-x86_64_i386_biarch.patch26
-rw-r--r--recipes/binutils/binutils-2.20/ld-stub-crash.patch26
-rw-r--r--recipes/binutils/binutils-2.20/uclibc-segfault.patch23
-rw-r--r--recipes/binutils/binutils-cross-sdk_2.20.bb3
-rw-r--r--recipes/binutils/binutils-cross_2.20.bb4
-rw-r--r--recipes/binutils/binutils_2.20.bb17
-rw-r--r--recipes/binutils/mingw-binutils-canadian-cross_2.20.bb4
-rw-r--r--recipes/binutils/mingw-binutils_2.20.bb1
17 files changed, 414 insertions, 0 deletions
diff --git a/recipes/binutils/binutils-2.20/110-arm-eabi-conf.patch b/recipes/binutils/binutils-2.20/110-arm-eabi-conf.patch
new file mode 100644
index 0000000000..2623301da0
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/110-arm-eabi-conf.patch
@@ -0,0 +1,22 @@
+--- /tmp/configure.ac 2008-06-22 14:14:59.000000000 +0200
++++ binutils-2.18.50.0.7/configure.ac 2008-06-22 14:15:30.000000000 +0200
+@@ -561,7 +561,7 @@
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ libgloss_dir=arm
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-qthreads"
+ noconfigdirs="$noconfigdirs target-libobjc"
+ case ${with_newlib} in
+--- /tmp/configure 2008-06-22 14:17:11.000000000 +0200
++++ binutils-2.18.50.0.7/configure 2008-06-22 14:17:56.000000000 +0200
+@@ -2307,7 +2307,7 @@
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ libgloss_dir=arm
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-qthreads"
+ noconfigdirs="$noconfigdirs target-libobjc"
+ case ${with_newlib} in
diff --git a/recipes/binutils/binutils-2.20/binutils-2.16.1-e300c2c3.patch b/recipes/binutils/binutils-2.20/binutils-2.16.1-e300c2c3.patch
new file mode 100644
index 0000000000..dfe9b18e17
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/binutils-2.16.1-e300c2c3.patch
@@ -0,0 +1,18 @@
+Adds support for Freescale Power architecture e300c2 and e300c3 cores.
+http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
+
+Leon Woestenberg <leonw@mailcan.com>
+
+Index: binutils-2.19.51.0.3/opcodes/ppc-dis.c
+===================================================================
+--- binutils-2.19.51.0.3.orig/opcodes/ppc-dis.c 2009-04-16 00:38:45.000000000 -0700
++++ binutils-2.19.51.0.3/opcodes/ppc-dis.c 2009-04-16 00:43:56.000000000 -0700
+@@ -132,6 +132,8 @@
+ | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7 | PPC_OPCODE_ALTIVEC
+ | PPC_OPCODE_VSX),
+ 0 },
++ { "pmr", (PPC_OPCODE_PMR),
++ 0 },
+ { "ppc", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32),
+ 0 },
+ { "ppc32", (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_32),
diff --git a/recipes/binutils/binutils-2.20/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/recipes/binutils/binutils-2.20/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
new file mode 100644
index 0000000000..8df5b1fea0
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
@@ -0,0 +1,39 @@
+# strip (and objcopy) fail to set the error code if there is no
+# output file name and the rename of the stripped (or copied) file
+# fails, yet the command fails to do anything. This fixes both
+# objcopy and strip.
+#
+# modification by bero: Ported to 2.16.91.0.6
+#
+#Signed-off-by: John Bowler <jbowler@acm.org>
+#Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
+---
+# binutils/objcopy.c | 8 +++++---
+# 1 file changed, 5 insertions(+), 3 deletions(-)
+#
+Index: src/binutils/objcopy.c
+===================================================================
+--- src.orig/binutils/objcopy.c 2007-08-09 13:26:03.000000000 +0100
++++ src/binutils/objcopy.c 2007-08-09 16:36:12.000000000 +0100
+@@ -2787,8 +2787,9 @@ strip_main (int argc, char *argv[])
+ if (preserve_dates)
+ set_times (tmpname, &statbuf);
+ if (output_file != tmpname)
+- smart_rename (tmpname, output_file ? output_file : argv[i],
+- preserve_dates);
++ if (smart_rename (tmpname, output_file ? output_file : argv[i],
++ preserve_dates))
++ hold_status = 1;
+ status = hold_status;
+ }
+ else
+@@ -3411,7 +3412,8 @@ copy_main (int argc, char *argv[])
+ if (preserve_dates)
+ set_times (tmpname, &statbuf);
+ if (tmpname != output_filename)
+- smart_rename (tmpname, input_filename, preserve_dates);
++ if (smart_rename (tmpname, input_filename, preserve_dates))
++ status = 1;
+ }
+ else
+ unlink_if_ordinary (tmpname);
diff --git a/recipes/binutils/binutils-2.20/binutils-arm-pr7093.patch b/recipes/binutils/binutils-2.20/binutils-arm-pr7093.patch
new file mode 100644
index 0000000000..ad4a556e0f
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/binutils-arm-pr7093.patch
@@ -0,0 +1,19 @@
+Index: binutils/bfd/elf32-arm.c
+===================================================================
+RCS file: /cvs/src/src/bfd/elf32-arm.c,v
+retrieving revision 1.162
+retrieving revision 1.163
+diff -u -r1.162 -r1.163
+--- binutils/bfd/elf32-arm.c 23 Dec 2008 09:01:45 -0000 1.162
++++ binutils/bfd/elf32-arm.c 23 Dec 2008 11:46:17 -0000 1.163
+@@ -4608,6 +4608,10 @@
+ Elf_Internal_Shdr *hdr;
+ unsigned int i, localsyms;
+
++ /* PR 7093: Make sure that we are dealing with an arm elf binary. */
++ if (! is_arm_elf (abfd))
++ return;
++
+ if ((abfd->flags & DYNAMIC) != 0)
+ return;
+
diff --git a/recipes/binutils/binutils-2.20/binutils-uclibc-100-uclibc-conf.patch b/recipes/binutils/binutils-2.20/binutils-uclibc-100-uclibc-conf.patch
new file mode 100644
index 0000000000..8de04e0fe0
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/binutils-uclibc-100-uclibc-conf.patch
@@ -0,0 +1,34 @@
+--- binutils-2.18.orig/configure
++++ binutils-2.18/configure
+@@ -2206,7 +2206,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -2504,7 +2504,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[3456789]86-*-vsta) ;; # don't add gprof back in
+ i[3456789]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.18.orig/gprof/configure
++++ binutils-2.18/gprof/configure
+@@ -4124,6 +4124,11 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
diff --git a/recipes/binutils/binutils-2.20/binutils-uclibc-300-001_ld_makefile_patch.patch b/recipes/binutils/binutils-2.20/binutils-uclibc-300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000000..04a7e61e25
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/binutils-uclibc-300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/recipes/binutils/binutils-2.20/binutils-uclibc-300-006_better_file_error.patch b/recipes/binutils/binutils-2.20/binutils-uclibc-300-006_better_file_error.patch
new file mode 100644
index 0000000000..f337611edf
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/binutils-uclibc-300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/recipes/binutils/binutils-2.20/binutils-uclibc-300-012_check_ldrunpath_length.patch b/recipes/binutils/binutils-2.20/binutils-uclibc-300-012_check_ldrunpath_length.patch
new file mode 100644
index 0000000000..498651a90c
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/binutils-uclibc-300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/recipes/binutils/binutils-2.20/binutils-uclibc-gas-needs-libm.patch b/recipes/binutils/binutils-2.20/binutils-uclibc-gas-needs-libm.patch
new file mode 100644
index 0000000000..db838cf20c
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/binutils-uclibc-gas-needs-libm.patch
@@ -0,0 +1,38 @@
+Source: Khem Raj <raj.khem@gmail.com>
+Disposition: submit upstream.
+
+Description:
+
+We do not need to have the libtool patch anymore for binutils after
+libtool has been updated upstream it include support for it. However
+for building gas natively on uclibc systems we have to link it with
+-lm so that it picks up missing symbols.
+
+/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double':
+floatformat.c:(.text+0x1ec): undefined reference to `frexp'
+floatformat.c:(.text+0x2f8): undefined reference to `ldexp'
+/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double':
+floatformat.c:(.text+0x38a): undefined reference to `ldexp'
+floatformat.c:(.text+0x3d2): undefined reference to `ldexp'
+floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp'
+collect2: ld returned 1 exit status
+make[4]: *** [as-new] Error 1
+
+Index: binutils-2.17.50/gas/configure.tgt
+===================================================================
+--- binutils-2.17.50.orig/gas/configure.tgt
++++ binutils-2.17.50/gas/configure.tgt
+@@ -408,6 +408,12 @@ case ${generic_target} in
+ *-*-netware) fmt=elf em=netware ;;
+ esac
+
++case ${generic_target} in
++ arm-*-*uclibc*)
++ need_libm=yes
++ ;;
++esac
++
+ case ${cpu_type} in
+ alpha | arm | i386 | ia64 | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k)
+ bfd_gas=yes
+
diff --git a/recipes/binutils/binutils-2.20/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.20/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000000..60544345dc
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+# Adapted to binutils 2.18.50.0.7
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
+ SHARABLE_SECTIONS=yes
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++ x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++ case "$EMULATION_NAME" in
++ *i386*) LIBPATH_SUFFIX=32 ;;
++ esac
++ ;;
++esac
diff --git a/recipes/binutils/binutils-2.20/ld-stub-crash.patch b/recipes/binutils/binutils-2.20/ld-stub-crash.patch
new file mode 100644
index 0000000000..1952649eb8
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/ld-stub-crash.patch
@@ -0,0 +1,26 @@
+Index: bfd/elf32-arm.c
+===================================================================
+RCS file: /cvs/src/src/bfd/elf32-arm.c,v
+retrieving revision 1.196
+diff -p -c -u -r1.196 elf32-arm.c
+--- bfd/elf32-arm.c 22 May 2009 11:58:44 -0000 1.196
++++ bfd/elf32-arm.c 12 Jun 2009 13:18:20 -0000
+@@ -3175,11 +3175,15 @@ arm_type_of_stub (struct bfd_link_info *
+
+ /* We have an extra 2-bytes reach because of
+ the mode change (bit 24 (H) of BLX encoding). */
++ /* A stub is needed only if this call is not throught a PLT
++ entry, because PLT stubs handle mode switching
++ already. */
+ if (branch_offset > (ARM_MAX_FWD_BRANCH_OFFSET + 2)
+ || (branch_offset < ARM_MAX_BWD_BRANCH_OFFSET)
+- || ((r_type == R_ARM_CALL) && !globals->use_blx)
+- || (r_type == R_ARM_JUMP24)
+- || (r_type == R_ARM_PLT32))
++ || ( (((r_type == R_ARM_CALL) && !globals->use_blx)
++ || (r_type == R_ARM_JUMP24)
++ || (r_type == R_ARM_PLT32))
++ && !use_plt))
+ {
+ stub_type = (info->shared | globals->pic_veneer)
+ /* PIC stubs. */
diff --git a/recipes/binutils/binutils-2.20/uclibc-segfault.patch b/recipes/binutils/binutils-2.20/uclibc-segfault.patch
new file mode 100644
index 0000000000..16a875f8eb
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/uclibc-segfault.patch
@@ -0,0 +1,23 @@
+upstream: already committed
+
+--- clean/binutils-2.19.51/bfd/elf32-arm.c 2009-05-22 12:58:44.000000000 +0100
++++ binutils-2.19.51/bfd/elf32-arm.c 2009-06-08 21:29:49.000000000 +0100
+@@ -8960,7 +8964,7 @@ elf32_arm_fix_exidx_coverage (asection *
+ struct bfd_elf_section_data *elf_sec = elf_section_data (sec);
+ Elf_Internal_Shdr *hdr = &elf_sec->this_hdr;
+
+- if (hdr->sh_type != SHT_ARM_EXIDX)
++ if (!hdr || hdr->sh_type != SHT_ARM_EXIDX)
+ continue;
+
+ if (elf_sec->linked_to)
+--- clean/binutils-2.19.51/ld/emultempl/armelf.em 2009-05-22 12:58:45.000000000 +0100
++++ binutils-2.19.51/ld/emultempl/armelf.em 2009-06-08 21:26:34.000000000 +0100
+@@ -309,6 +309,7 @@ gld${EMULATION_NAME}_finish (void)
+ asection *out_sec = sec->output_section;
+
+ if (out_sec
++ && elf_section_data (sec)
+ && elf_section_type (sec) == SHT_PROGBITS
+ && (elf_section_flags (sec) & SHF_EXECINSTR) != 0
+ && (sec->flags & SEC_EXCLUDE) == 0
diff --git a/recipes/binutils/binutils-cross-sdk_2.20.bb b/recipes/binutils/binutils-cross-sdk_2.20.bb
new file mode 100644
index 0000000000..00558ea692
--- /dev/null
+++ b/recipes/binutils/binutils-cross-sdk_2.20.bb
@@ -0,0 +1,3 @@
+require binutils_${PV}.bb
+require binutils-cross-sdk.inc
+PR = "${INC_PR}.0"
diff --git a/recipes/binutils/binutils-cross_2.20.bb b/recipes/binutils/binutils-cross_2.20.bb
new file mode 100644
index 0000000000..ca7fe0537e
--- /dev/null
+++ b/recipes/binutils/binutils-cross_2.20.bb
@@ -0,0 +1,4 @@
+FILESPATHPKG =. "binutils-${PV}:"
+require binutils_${PV}.bb
+require binutils-cross.inc
+
diff --git a/recipes/binutils/binutils_2.20.bb b/recipes/binutils/binutils_2.20.bb
new file mode 100644
index 0000000000..fd539fe59e
--- /dev/null
+++ b/recipes/binutils/binutils_2.20.bb
@@ -0,0 +1,17 @@
+require binutils.inc
+LICENSE = "GPLv3"
+
+SRC_URI = "\
+ ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \
+ file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \
+ file://110-arm-eabi-conf.patch;patch=1 \
+ file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \
+ file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
+ file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
+ file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
+ file://binutils-arm-pr7093.patch;patch=1 \
+ file://ld-stub-crash.patch;patch=1;pnum=0 \
+ "
+
+# powerpc patches
+SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
diff --git a/recipes/binutils/mingw-binutils-canadian-cross_2.20.bb b/recipes/binutils/mingw-binutils-canadian-cross_2.20.bb
new file mode 100644
index 0000000000..7f80a772f1
--- /dev/null
+++ b/recipes/binutils/mingw-binutils-canadian-cross_2.20.bb
@@ -0,0 +1,4 @@
+require mingw-binutils_${PV}.bb
+require binutils-canadian-cross.inc
+
+DEFAULT_PREFERENCE_mingw32 = "1"
diff --git a/recipes/binutils/mingw-binutils_2.20.bb b/recipes/binutils/mingw-binutils_2.20.bb
new file mode 100644
index 0000000000..0f719ed0f4
--- /dev/null
+++ b/recipes/binutils/mingw-binutils_2.20.bb
@@ -0,0 +1 @@
+require mingw-binutils.inc