summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-devtools/binutils
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadast2050-yocto-poky-29d6678fd546377459ef75cf54abeef5b969b5cf.zip
ast2050-yocto-poky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/binutils')
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/110-arm-eabi-conf.patch22
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-2.16.1-e300c2c3.patch18
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch67
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch29
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-100-uclibc-conf.patch34
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-001_ld_makefile_patch.patch50
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-006_better_file_error.patch43
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-012_check_ldrunpath_length.patch47
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-gas-needs-libm.patch38
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/binutils-x86_64_i386_biarch.patch26
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.20.1/libiberty_path_fix.patch20
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian.inc16
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb3
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross.inc25
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross_2.20.1.bb3
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross_csl-arm-2008q1.bb3
-rw-r--r--meta/recipes-devtools/binutils/binutils-crosssdk_2.20.1.bb12
-rw-r--r--meta/recipes-devtools/binutils/binutils.inc146
-rw-r--r--meta/recipes-devtools/binutils/binutils_2.20.1.bb37
-rw-r--r--meta/recipes-devtools/binutils/binutils_csl-arm-2008q1.bb25
-rw-r--r--meta/recipes-devtools/binutils/files/better_file_error.patch17
-rw-r--r--meta/recipes-devtools/binutils/files/ld_makefile.patch22
-rw-r--r--meta/recipes-devtools/binutils/files/objdump_fix.patch134
-rw-r--r--meta/recipes-devtools/binutils/files/plt32trunc.patch24
-rw-r--r--meta/recipes-devtools/binutils/files/signed_char_fix.patch12
25 files changed, 873 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/110-arm-eabi-conf.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/110-arm-eabi-conf.patch
new file mode 100644
index 0000000..2623301
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/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/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-2.16.1-e300c2c3.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-2.16.1-e300c2c3.patch
new file mode 100644
index 0000000..dfe9b18
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/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/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch
new file mode 100644
index 0000000..61517d1
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-libtool.patch
@@ -0,0 +1,67 @@
+This is because libdir has a trailing slash which breaks the comparision.
+
+RP 2/1/10
+
+Index: binutils-2.20.1/ltmain.sh
+===================================================================
+--- binutils-2.20.1.orig/ltmain.sh 2009-09-01 00:59:32.000000000 +0800
++++ binutils-2.20.1/ltmain.sh 2010-07-29 09:41:14.000000000 +0800
+@@ -2156,8 +2156,12 @@
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
++ # Strip any trailing slash from the destination.
++ func_stripname '' '/' "$libdir"
++ destlibdir=$func_stripname_result
++
+ # Determine the prefix the user has applied to our future dir.
+- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
++ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$destlibdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+@@ -5570,8 +5574,14 @@
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+- dir="$libdir"
+- absdir="$libdir"
++ # Adding 'libdir' from the .la file to our library search paths
++ # breaks crosscompilation horribly. We cheat here and don't add
++ # it, instead adding the path where we found the .la. -CL
++ dir="$abs_ladir"
++ absdir="$abs_ladir"
++ libdir="$abs_ladir"
++ #dir="$libdir"
++ #absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+@@ -5942,8 +5952,6 @@
+ add="$libdir/$linklib"
+ fi
+ else
+- # We cannot seem to hardcode it, guess we'll fake it.
+- add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+@@ -6089,7 +6097,17 @@
+ fi
+ ;;
+ *)
+- path="-L$absdir/$objdir"
++ # OE sets installed=no in staging. We need to look in $objdir and $absdir,
++ # preferring $objdir. RP 31/04/2008
++ if test -f "$absdir/$objdir/$depdepl" ; then
++ depdepl="$absdir/$objdir/$depdepl"
++ path="-L$absdir/$objdir"
++ elif test -f "$absdir/$depdepl" ; then
++ depdepl="$absdir/$depdepl"
++ path="-L$absdir"
++ else
++ path="-L$absdir/$objdir"
++ fi
+ ;;
+ esac
+ else
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch
new file mode 100644
index 0000000..c71f0ad
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-mips-pie.patch
@@ -0,0 +1,29 @@
+# "-fPIE" always triggers segmentation fault in ld.so.1 on mips platform,
+# which was first saw on dbus-daemon. Below borrow the binutils fix from
+# binutils bugzilla:
+#
+# http://sourceware.org/bugzilla/show_bug.cgi?id=10858
+#
+# Its commit message says:
+# * elfxx-mips.c (mips_elf_create_dynamic_relocation): Use section
+# sym dynindx for relocs against defined syms in PIEs.
+#
+# It's in upstream CVS now (rev 1.267), but not in current release
+#
+# By Kevin Tian <kevin.tian@intel.com>, 2010-07-15
+
+diff --git a/elfxx-mips.c b/elfxx-mips.c
+index 3a1c8ba..f6c2c1c 100644
+--- binutils-2.20.1.orig/bfd/elfxx-mips.c
++++ binutils-2.20.1/bfd/elfxx-mips.c
+@@ -5688,9 +5688,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
+
+ /* We must now calculate the dynamic symbol table index to use
+ in the relocation. */
+- if (h != NULL
+- && (!h->root.def_regular
+- || (info->shared && !info->symbolic && !h->root.forced_local)))
++ if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root))
+ {
+ indx = h->root.dynindx;
+ if (SGI_COMPAT (output_bfd))
diff --git a/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-100-uclibc-conf.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-100-uclibc-conf.patch
new file mode 100644
index 0000000..8de04e0
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/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/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-001_ld_makefile_patch.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000..04a7e61
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/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/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-006_better_file_error.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-006_better_file_error.patch
new file mode 100644
index 0000000..f337611
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/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/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-012_check_ldrunpath_length.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-300-012_check_ldrunpath_length.patch
new file mode 100644
index 0000000..498651a
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/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/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-gas-needs-libm.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-uclibc-gas-needs-libm.patch
new file mode 100644
index 0000000..db838cf
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/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/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-x86_64_i386_biarch.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..4cd9e22
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/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 @@
+ SEPARATE_GOTPLT=12
+ SHARABLE_SECTIONS=yes
+ IREL_IN_PLT=
++
++# 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/meta/recipes-devtools/binutils/binutils-2.20.1/libiberty_path_fix.patch b/meta/recipes-devtools/binutils/binutils-2.20.1/libiberty_path_fix.patch
new file mode 100644
index 0000000..36a14d7
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.20.1/libiberty_path_fix.patch
@@ -0,0 +1,20 @@
+don't let the distro compiler point to the wrong installation location
+
+Thanks to RP for helping find the source code causing the issue.
+
+2010/08/13
+Nitin A Kamble <nitin.a.kamble@intel.com>
+Index: binutils-2.20.1/libiberty/Makefile.in
+===================================================================
+--- binutils-2.20.1.orig/libiberty/Makefile.in
++++ binutils-2.20.1/libiberty/Makefile.in
+@@ -327,7 +327,8 @@ install: install_to_$(INSTALL_DEST) inst
+ # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
+ # default multilib, so we have to take CFLAGS into account as well,
+ # since it will be passed the multilib flags.
+-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
++#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
++MULTIOSDIR = ""
+ install_to_libdir: all
+ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
new file mode 100644
index 0000000..4953bc2
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
@@ -0,0 +1,16 @@
+inherit cross-canadian
+DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/libc-nativesdk zlib-nativesdk gettext-nativesdk"
+EXTRA_OECONF = "--with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
+ --program-prefix=${TARGET_PREFIX}"
+
+do_install () {
+ autotools_do_install
+
+ # We're not interested in the libs or headers, these would come from the
+ # nativesdk or target version of the binutils recipe
+ rm -rf ${D}${prefix}/${TARGET_SYS}
+ rm -f ${D}${libdir}/libbfd*
+ rm -f ${D}${libdir}/libiberty*
+ rm -f ${D}${libdir}/libopcodes*
+ rm -f ${D}${includedir}/*.h
+}
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb
new file mode 100644
index 0000000..f4a7a0e
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb
@@ -0,0 +1,3 @@
+require binutils_${PV}.bb
+require binutils-cross-canadian.inc
+PR = "r4"
diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc
new file mode 100644
index 0000000..4eeb658
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross.inc
@@ -0,0 +1,25 @@
+inherit cross
+PROVIDES = "virtual/${TARGET_PREFIX}binutils"
+
+EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
+ --program-prefix=${TARGET_PREFIX} \
+ --disable-install-libbfd \
+ --disable-werror"
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+
+ # We don't really need these, so we'll remove them...
+ rm -rf ${D}${STAGING_DIR_NATIVE}${libdir_native}/libiberty.a
+ rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}
+ rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/ldscripts
+ rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/info
+ rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/locale
+ rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/man
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/share || :
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}/gcc-lib || :
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64/gcc-lib || :
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir} || :
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64 || :
+ rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${prefix} || :
+}
diff --git a/meta/recipes-devtools/binutils/binutils-cross_2.20.1.bb b/meta/recipes-devtools/binutils/binutils-cross_2.20.1.bb
new file mode 100644
index 0000000..8c7e4bc
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross_2.20.1.bb
@@ -0,0 +1,3 @@
+require binutils_${PV}.bb
+require binutils-cross.inc
+
diff --git a/meta/recipes-devtools/binutils/binutils-cross_csl-arm-2008q1.bb b/meta/recipes-devtools/binutils/binutils-cross_csl-arm-2008q1.bb
new file mode 100644
index 0000000..8ab1e7f
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-cross_csl-arm-2008q1.bb
@@ -0,0 +1,3 @@
+require binutils_csl-arm-2008q1.bb
+require binutils-cross.inc
+PR = "r1"
diff --git a/meta/recipes-devtools/binutils/binutils-crosssdk_2.20.1.bb b/meta/recipes-devtools/binutils/binutils-crosssdk_2.20.1.bb
new file mode 100644
index 0000000..f3bc5bf
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-crosssdk_2.20.1.bb
@@ -0,0 +1,12 @@
+require binutils-cross_${PV}.bb
+
+inherit crosssdk
+
+PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
+
+PR = "r3"
+
+do_configure_prepend () {
+ sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt
+}
+
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
new file mode 100644
index 0000000..7a352b5
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -0,0 +1,146 @@
+DESCRIPTION = "A GNU collection of binary utilities"
+HOMEPAGE = "http://www.gnu.org/software/binutils/"
+BUGTRACKER = "http://sourceware.org/bugzilla/"
+SECTION = "devel"
+LICENSE = "GPLv2"
+
+DEPENDS = "flex-native bison-native"
+
+inherit autotools gettext
+
+PACKAGES += "${PN}-symlinks"
+
+FILES_${PN} = " \
+ ${bindir}/${TARGET_PREFIX}* \
+ ${libdir}/lib*-*.so \
+ ${prefix}/${TARGET_SYS}/bin/*"
+
+FILES_${PN}-dev = " \
+ ${includedir} \
+ ${libdir}/*.a \
+ ${libdir}/*.la \
+ ${libdir}/libbfd.so \
+ ${libdir}/libopcodes.so"
+
+FILES_${PN}-symlinks = " \
+ ${bindir}/addr2line \
+ ${bindir}/as \
+ ${bindir}/c++filt \
+ ${bindir}/gprof \
+ ${bindir}/ld \
+ ${bindir}/nm \
+ ${bindir}/objcopy \
+ ${bindir}/objdump \
+ ${bindir}/ranlib \
+ ${bindir}/readelf \
+ ${bindir}/size \
+ ${bindir}/strip"
+
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+
+EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
+ --enable-install-libbfd \
+ --enable-shared"
+
+EXTRA_OECONF_virtclass-native = "--enable-target=all --enable-64-bit-bfd --enable-install-libbfd"
+
+# This is necessary due to a bug in the binutils Makefiles
+# EXTRA_OEMAKE = "configure-build-libiberty all"
+
+export AR = "${HOST_PREFIX}ar"
+export AS = "${HOST_PREFIX}as"
+export LD = "${HOST_PREFIX}ld"
+export NM = "${HOST_PREFIX}nm"
+export RANLIB = "${HOST_PREFIX}ranlib"
+export OBJCOPY = "${HOST_PREFIX}objcopy"
+export OBJDUMP = "${HOST_PREFIX}objdump"
+
+export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
+export AS_FOR_TARGET = "${TARGET_PREFIX}as"
+export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
+export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
+export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
+
+export CC_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
+export CXX_FOR_HOST = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
+
+export CC_FOR_BUILD = "${BUILD_CC}"
+export CPP_FOR_BUILD = "${BUILD_CPP}"
+export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
+
+export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
+
+do_configure () {
+ (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
+ oe_runconf
+#
+# must prime config.cache to ensure the build of libiberty
+#
+ mkdir -p ${B}/build-${BUILD_SYS}
+ for i in ${CONFIG_SITE}; do
+ cat $i >> ${B}/build-${BUILD_SYS}/config.cache
+ done
+}
+
+do_install () {
+ autotools_do_install
+
+ # We don't really need these, so we'll remove them...
+ rm -rf ${D}${libdir}/ldscripts
+
+ # Fix the /usr/${TARGET_SYS}/bin/* links
+ for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
+ rm -f $l
+ ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
+ | tr -s / \
+ | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
+ done
+
+ # Install the libiberty header
+ install -d ${D}${includedir}
+ install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
+ install -m 644 ${S}/include/libiberty.h ${D}${includedir}
+
+ cd ${D}${bindir}
+
+ # Symlinks for ease of running these on the native target
+ for p in ${TARGET_SYS}-* ; do
+ ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,`
+ done
+
+ rm ${D}${bindir}/ar ${D}${bindir}/strings
+}
+
+do_install_virtclass-native () {
+ autotools_do_install
+
+ # Install the libiberty header
+ install -d ${D}${includedir}
+ install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
+ install -m 644 ${S}/include/libiberty.h ${D}${includedir}
+
+ # We only want libiberty, libbfd and libopcodes
+ rm -rf ${D}${bindir}
+ rm -rf ${D}${prefix}/${TARGET_SYS}
+ rm -rf ${D}${prefix}/lib/ldscripts
+ rm -rf ${D}${prefix}/share/info
+ rm -rf ${D}${prefix}/share/locale
+ rm -rf ${D}${prefix}/share/man
+ rmdir ${D}${prefix}/share || :
+ rmdir ${D}/${libdir}/gcc-lib || :
+ rmdir ${D}/${libdir}64/gcc-lib || :
+ rmdir ${D}/${libdir} || :
+ rmdir ${D}/${libdir}64 || :
+}
+
+pkg_postinst_${PN}-symlinks () {
+ update-alternatives --install ${bindir}/ar ar ${TARGET_SYS}-ar 100
+ update-alternatives --install ${bindir}/strings strings ${TARGET_SYS}-strings 100
+}
+
+
+pkg_prerm_${PN}-symlinks () {
+ update-alternatives --remove ar ${TARGET_SYS}-ar
+ update-alternatives --remove strings ${TARGET_SYS}-strings
+}
+
diff --git a/meta/recipes-devtools/binutils/binutils_2.20.1.bb b/meta/recipes-devtools/binutils/binutils_2.20.1.bb
new file mode 100644
index 0000000..d5cd985
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils_2.20.1.bb
@@ -0,0 +1,37 @@
+require binutils.inc
+
+PR = "r2"
+
+LIC_FILES_CHKSUM="\
+ file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
+ file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
+ file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ "
+
+SRC_URI = "\
+ ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2;name=tarball \
+ file://binutils-uclibc-100-uclibc-conf.patch \
+ file://110-arm-eabi-conf.patch \
+ file://binutils-uclibc-300-001_ld_makefile_patch.patch \
+ file://binutils-uclibc-300-006_better_file_error.patch \
+ file://binutils-uclibc-300-012_check_ldrunpath_length.patch \
+ file://binutils-uclibc-gas-needs-libm.patch \
+ file://binutils-x86_64_i386_biarch.patch \
+ file://binutils-mips-pie.patch \
+ file://binutils-libtool.patch \
+ file://libiberty_path_fix.patch \
+ "
+
+# powerpc patches
+SRC_URI += "\
+ file://binutils-2.16.1-e300c2c3.patch \
+ "
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/binutils/binutils_csl-arm-2008q1.bb b/meta/recipes-devtools/binutils/binutils_csl-arm-2008q1.bb
new file mode 100644
index 0000000..dd9b798
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils_csl-arm-2008q1.bb
@@ -0,0 +1,25 @@
+require binutils.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "\
+ http://www.codesourcery.com/gnu_toolchains/arm/portal/package2553/public/arm-none-eabi/arm-2008q1-126-arm-none-eabi.src.tar.bz2 \
+ file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \
+ 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://docs_hack2.patch;patch=1 \
+ "
+
+PV = "2.18+csl-arm-2008q1-126"
+
+S = "${WORKDIR}/binutils-stable"
+
+do_unpack2() {
+ cd ${WORKDIR}
+ tar -xvjf ./arm-2008q1-126-arm-none-eabi/binutils-2008q1-126.tar.bz2
+}
+
+addtask unpack2 after do_unpack before do_patch
diff --git a/meta/recipes-devtools/binutils/files/better_file_error.patch b/meta/recipes-devtools/binutils/files/better_file_error.patch
new file mode 100644
index 0000000..38ef529
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/better_file_error.patch
@@ -0,0 +1,17 @@
+diff -urN binutils-2.11.92.0.5/bfd/opncls.c binutils-2.11.92.0.5.new/bfd/opncls.c
+--- binutils-2.11.92.0.5/bfd/opncls.c Mon Oct 1 18:25:21 2001
++++ binutils-2.11.92.0.5.new/bfd/opncls.c Sat Oct 13 11:26:59 2001
+@@ -127,6 +127,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/meta/recipes-devtools/binutils/files/ld_makefile.patch b/meta/recipes-devtools/binutils/files/ld_makefile.patch
new file mode 100644
index 0000000..c1d2ac1
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/ld_makefile.patch
@@ -0,0 +1,22 @@
+--- binutils-2.11.90.0.19.orig/ld/Makefile.am
++++ binutils-2.11.90.0.19/ld/Makefile.am
+@@ -19,7 +19,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.11.90.0.19.orig/ld/Makefile.in
++++ binutils-2.11.90.0.19/ld/Makefile.in
+@@ -123,7 +123,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@
diff --git a/meta/recipes-devtools/binutils/files/objdump_fix.patch b/meta/recipes-devtools/binutils/files/objdump_fix.patch
new file mode 100644
index 0000000..90ad732
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/objdump_fix.patch
@@ -0,0 +1,134 @@
+From binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com Tue Feb 22 19:24:15 2005
+Return-Path: <binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com>
+Delivered-To: listarch-binutils at sources dot redhat dot com
+Received: (qmail 4446 invoked by alias); 22 Feb 2005 19:24:15 -0000
+Mailing-List: contact binutils-help at sources dot redhat dot com; run by ezmlm
+Precedence: bulk
+List-Subscribe: <mailto:binutils-subscribe at sources dot redhat dot com>
+List-Archive: <http://sources.redhat.com/ml/binutils/>
+List-Post: <mailto:binutils at sources dot redhat dot com>
+List-Help: <mailto:binutils-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
+Sender: binutils-owner at sources dot redhat dot com
+Delivered-To: mailing list binutils at sources dot redhat dot com
+Received: (qmail 4401 invoked from network); 22 Feb 2005 19:24:08 -0000
+Received: from unknown (HELO bgo1smout1.broadpark.no) (217.13.4.94)
+ by sourceware dot org with SMTP; 22 Feb 2005 19:24:08 -0000
+Received: from bgo1sminn1.broadpark.no ([217.13.4.93])
+ by bgo1smout1 dot broadpark dot no
+ (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004))
+ with ESMTP id <0ICB007QZUZCC0C0 at bgo1smout1 dot broadpark dot no> for
+ binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:18:48 +0100 (CET)
+Received: from [127.0.0.1] ([80.202.165.9]) by bgo1sminn1.broadpark.no
+ (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004))
+ with ESMTP id <0ICB006NCVBVHE21 at bgo1sminn1 dot broadpark dot no> for
+ binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:26:20 +0100 (CET)
+Date: Tue, 22 Feb 2005 20:24:08 +0100
+From: =?ISO-8859-1?Q?Stig_Petter_Olsr=F8d?= <stigpo at users dot sourceforge dot net>
+Subject: [PATCH] objdump relocation fixes for ARM disassembly
+To: binutils at sources dot redhat dot com
+Message-id: <421B86D8.8080604@users.sourceforge.net>
+MIME-version: 1.0
+Content-type: text/plain; charset=ISO-8859-1; format=flowed
+Content-transfer-encoding: 7BIT
+User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
+
+Hello,
+
+objdump disassembly did not relocate correctly for the ARM processor. It seems
+that the test for triggering the INSN_HAS_RELOC flag was void (one test killed the other,
+since octets would always be zero) and all relocations would thus fail. I changed the test
+so the flag is set when we are about to disassemble an insn that the current relocation
+entry points to. I also changed objdump_print_addr to use the current relocation entry if
+the insn has such an entry. This causes the symbol printed to be correct for both external
+symbols (from the undefined section) and local symbols.
+
+This has only been tested for the ARM processor, but I don't think it should break other
+DISASSEMBLER_NEEDS_RELOCS processors either.
+
+
+binutils/
+
+2005-02-22 Stig Petter Olsroed <stigpo@users.sourceforge.net>
+
+ * objdump.c (disassemble_bytes): Fixed relocation check for
+ DISASSEMBLER_NEEDS_RELOCS platforms to properly trigger the
+ INSN_HAS_RELOC flag. Set the current relocation entry in
+ objdump_disasm_info to allow printing the proper symbol.
+ (objdump_print_addr): Use the relocation entry in
+ objdump_disasm_info to lookup the correct symbol for
+ DISASSEMBLER_NEEDS_RELOCS platforms.
+
+--- 1/binutils/objdump.c 2005-02-22 01:50:06.000000000 +0100
++++ 2/binutils/objdump.c 2005-02-22 14:27:33.066960900 +0100
+@@ -128,6 +128,7 @@
+ arelent ** dynrelbuf;
+ long dynrelcount;
+ disassembler_ftype disassemble_fn;
++ arelent * reloc;
+ };
+
+ /* Architecture to disassemble for, or default if NULL. */
+@@ -852,6 +853,8 @@
+ {
+ struct objdump_disasm_info *aux;
+ asymbol *sym;
++ arelent *q;
++ int skip_find = 0;
+
+ if (sorted_symcount < 1)
+ {
+@@ -861,6 +864,22 @@
+ }
+
+ aux = (struct objdump_disasm_info *) info->application_data;
++
++ q = aux->reloc;
++ if (q != NULL)
++ {
++ if (q->sym_ptr_ptr != NULL && *q->sym_ptr_ptr != NULL)
++ {
++ /* Adjust the vma to the reloc */
++ vma += bfd_asymbol_value (*q->sym_ptr_ptr);
++ if (bfd_is_und_section (bfd_get_section (*q->sym_ptr_ptr)))
++ {
++ skip_find = 1;
++ sym = *q->sym_ptr_ptr;
++ }
++ }
++ }
++ if (!skip_find)
+ sym = find_symbol_for_address (vma, info, NULL);
+ objdump_print_addr_with_sym (aux->abfd, aux->sec, sym, vma, info,
+ skip_zeroes);
+@@ -1350,16 +1369,22 @@
+ info->bytes_per_chunk = 0;
+
+ #ifdef DISASSEMBLER_NEEDS_RELOCS
+- /* FIXME: This is wrong. It tests the number of octets
+- in the last instruction, not the current one. */
+- if (*relppp < relppend
+- && (**relppp)->address >= rel_offset + addr_offset
+- && ((**relppp)->address
+- < rel_offset + addr_offset + octets / opb))
++ /* Check if the current relocation entry applies to the
++ instruction we are about to disassemble.
++ This works for ARM at least.
++ */
++ if ((*relppp) < relppend
++ && ((**relppp)->address == rel_offset + addr_offset))
++ {
+ info->flags = INSN_HAS_RELOC;
++ aux->reloc = **relppp;
++ }
+ else
+ #endif
++ {
+ info->flags = 0;
++ aux->reloc = NULL;
++ }
+
+ octets = (*disassemble_fn) (section->vma + addr_offset, info);
+ info->fprintf_func = (fprintf_ftype) fprintf;
+
+
+
diff --git a/meta/recipes-devtools/binutils/files/plt32trunc.patch b/meta/recipes-devtools/binutils/files/plt32trunc.patch
new file mode 100644
index 0000000..4990f5d
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/plt32trunc.patch
@@ -0,0 +1,24 @@
+--- binutils/bfd/elf32-arm.h.orig 2004-04-22 22:11:15.000000000 -0400
++++ binutils/bfd/elf32-arm.h 2004-04-22 22:28:37.000000000 -0400
+@@ -2229,6 +2229,8 @@ elf32_arm_relocate_section (output_bfd,
+ case R_ARM_PC24:
+ case R_ARM_ABS32:
+ case R_ARM_THM_PC22:
++ case R_ARM_PLT32:
++
+ if (info->shared
+ && (
+ (!info->symbolic && h->dynindx != -1)
+@@ -2262,11 +2264,6 @@ elf32_arm_relocate_section (output_bfd,
+ relocation = 0;
+ break;
+
+- case R_ARM_PLT32:
+- if (h->plt.offset != (bfd_vma)-1)
+- relocation = 0;
+- break;
+-
+ default:
+ if (unresolved_reloc)
+ _bfd_error_handler
+
diff --git a/meta/recipes-devtools/binutils/files/signed_char_fix.patch b/meta/recipes-devtools/binutils/files/signed_char_fix.patch
new file mode 100644
index 0000000..b3709da
--- /dev/null
+++ b/meta/recipes-devtools/binutils/files/signed_char_fix.patch
@@ -0,0 +1,12 @@
+diff -urN binutils-2.11.92.0.12.3/opcodes/i386-dis.c binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c
+--- binutils-2.11.92.0.12.3/opcodes/i386-dis.c Fri Nov 16 17:05:55 2001
++++ binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c Mon Dec 31 15:55:04 2001
+@@ -1830,7 +1830,7 @@
+ * The function returns the length of this instruction in bytes.
+ */
+
+-static char intel_syntax;
++static signed char intel_syntax;
+ static char open_char;
+ static char close_char;
+ static char separator_char;
OpenPOWER on IntegriCloud